Author Topic: Typing math  (Read 17577 times)

0 Members and 1 Guest are viewing this topic.

Offline Daniel0Topic starter

  • Administrator
  • 'Insane!'
  • *
  • Posts: 11,817
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
Typing math
« on: January 09, 2009, 02:49:43 PM »
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]
[tex]\sum_{n = 0}^\infty \frac{1}{n!} = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n = e[/tex]
Outputs:
[tex]\sum_{n = 0}^\infty \frac{1}{n!} = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n = e[/tex]

Just in case anyone wanted to write some math that's a little more advanced than basic arithmetic.

Update:

The [tex] bbcode is now deprecated in favor of [math] and [imath]. The former is used for display mode, the latter is for inline mode.

Example of display mode:
[math]\sum_{n = 0}^\infty \frac{1}{n!} = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n = e[/math]

Inline mode is used for math in sentences, like you might want to say [imath]\frac{1+2}{5}\cdot7=\frac{21}{5}[/imath] within a sentence.
« Last Edit: September 18, 2009, 07:26:51 AM by Daniel0 »

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: Typing math
« Reply #1 on: January 10, 2009, 09:28:08 PM »
Is this a released SMF mod, or something you created? I could use it on my forum.
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

Offline Daniel0Topic starter

  • Administrator
  • 'Insane!'
  • *
  • Posts: 11,817
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
Re: Typing math
« Reply #2 on: January 11, 2009, 05:21:41 AM »

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: Typing math
« Reply #3 on: January 11, 2009, 05:45:52 AM »
Thanks
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

Offline .josh

  • Administrator
  • 'Insane!'
  • *
  • Posts: 13,325
  • Grumpy Old Man
    • View Profile
Re: Typing math
« Reply #4 on: January 11, 2009, 05:40:25 PM »
[tex]1+1=2[/tex]

fear my skills.

Did I help you? Feeling generous? Donate to me! || Donate to phpfreaks!

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: Typing math
« Reply #5 on: January 11, 2009, 05:45:51 PM »
Splendid! Here's your skill badge!

NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: Typing math
« Reply #6 on: January 11, 2009, 05:55:23 PM »
[tex]1+1=2[/tex]

fear my skills.

[tex]1+1=3[/tex]

That's how I roll.
Why doesn't anyone ever say hi, hey, or whad up world?

Offline .josh

  • Administrator
  • 'Insane!'
  • *
  • Posts: 13,325
  • Grumpy Old Man
    • View Profile
Re: Typing math
« Reply #7 on: January 11, 2009, 06:08:54 PM »
[tex]\widetilde{\underline{\zeta\Gamma\alpha\gamma\sigma}}\sqrt[n]{\underline{|\phi}\int\underline{\Sigma\eta\tau}}[/tex]

That's how I roll.
« Last Edit: January 11, 2009, 06:10:45 PM by Crayon Violent »

Did I help you? Feeling generous? Donate to me! || Donate to phpfreaks!

Offline Daniel0Topic starter

  • Administrator
  • 'Insane!'
  • *
  • Posts: 11,817
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
Re: Typing math
« Reply #8 on: January 11, 2009, 06:12:27 PM »
Yeah, that's fine but...
[tex]-1 = 1[/tex]
[tex]-1 = i \cdot i = \sqrt{-1} \cdot \sqrt{-1} = \sqrt{-1 \cdot -1} = \sqrt{1} = 1[/tex]

I win...

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: Typing math
« Reply #9 on: January 11, 2009, 06:20:07 PM »
Except

[tex] i \not = \sqrt{-1}[/tex]
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

Offline Daniel0Topic starter

  • Administrator
  • 'Insane!'
  • *
  • Posts: 11,817
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
Re: Typing math
« Reply #10 on: January 11, 2009, 06:31:12 PM »
My calculator says otherwise...

See attachment... Stupid Texas Instruments didn't bother creating an x64 driver :(

[attachment deleted by admin]

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: Typing math
« Reply #11 on: January 11, 2009, 06:42:21 PM »
Well... the definition is [tex]x^2 =  -1[/tex]

Saying that [tex] i  = \sqrt{-1}[/tex] is not incorrect as long as you make it clear, that [tex] \sqrt[/tex] operator is redefined here as compared to the one used for real numbers.

[tex]\sqrt{-x} = i \sqrt x[/tex] where [tex]0 < x \in \mathbb{R} [/tex]

« Last Edit: January 11, 2009, 06:48:20 PM by Mchl »
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

Offline Daniel0Topic starter

  • Administrator
  • 'Insane!'
  • *
  • Posts: 11,817
  • Gender: Male
  • ^bb|[^b]{2}$
    • View Profile
Re: Typing math
« Reply #12 on: January 11, 2009, 06:56:26 PM »
[tex]x^n = y \Leftrightarrow \sqrt[n]{x^n} = x = \sqrt[n]{y}[/tex], no?

It's because [tex]\sqrt{a} \cdot \sqrt{b} = \sqrt{a \cdot b}[/tex] is only true for [tex]a \in \Bbb{R}^+ \cup \{0\}[/tex] and [tex]b \in \Bbb{R}^+ \cup \{0\}[/tex] or something like that. That's the "trick" or whatever... There is another "proof" that says that any integer a equals any other integer b, I just can't remember that one, but there is of course an error in that one as well.

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: Typing math
« Reply #13 on: January 11, 2009, 10:09:58 PM »
Well, looks as though two people had reasons to use the latex addon.  lol
Why doesn't anyone ever say hi, hey, or whad up world?

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: Typing math
« Reply #14 on: January 12, 2009, 02:49:11 AM »
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading