|
Ythan
ᕕ( ᐛ )ᕗ



Registered: 08/08/97
Posts: 18,840
Loc: NY/MA/VT Borderlands
Last seen: 3 seconds
|
LaTeX support in forum posts
#8377077 - 05/08/08 11:14 AM (16 years, 14 days ago) |
|
|
I saw someone mention LaTeX support in this forum a while ago and I finally got around to adding it. Just use [tex] tags and enter your expression. I've never used LaTeX myself but here are some examples from http://www.linuxjournal.com/article/7870:
Code:
[tex] \begin{displaymath} \frac{a^2 - b^2}{a + b} = a - b \end{displaymath} [/tex]

Code:
[tex] \begin{displaymath} \mathop{\mathrm{corr}}(X,Y)= \frac{\displaystyle \sum_{i=1}^n(x_i-\overline x) (y_i-\overline y)} {\displaystyle\biggl[ \sum_{i=1}^n(x_i-\overline x)^2 \sum_{i=1}^n(y_i-\overline y)^2 \biggr]^{1/2}} \end{displaymath} [/tex]

Code:
[tex] \begin{displaymath} I(z) = \sin( \frac{\pi}{2} z^2 ) \sum_{n=0}^\infty \frac{ (-1)^n \pi^{2n} }{1 \cdot 3 \cdots (4n + 1) } z^{4n + 1} -\cos( \frac{\pi}{2} z^2 ) \sum_{n=0}^\infty \frac{ (-1)^n \pi^{2n + 1} }{1 \cdot 3 \cdots (4n + 3) } z^{4n + 3} \end{displaymath} [/tex]

Code:
[tex] \psset{unit=0.5cm} \begin{pspicture}(-4,-0.5)(4,8) \psgrid[subgriddiv=0,griddots=5, gridlabels=7pt](-4,-0.5)(4,8) \psline[linewidth=1pt]{->}(-4,0)(+4,0) \psline[linewidth=1pt]{->}(0,-0.5)(0,8) \psplot[plotstyle=curve, linewidth=0.5pt]{-4}{0.9}{10 x exp} \rput[l](1,7.5){$10^x$} \psplot[plotstyle=curve,linecolor=red, linewidth=0.5pt]{-4}{3}{2 x exp} \rput[l](2.2,7.5){\color{blue}$e^x$} \psplot[plotstyle=curve,linecolor=blue, linewidth=0.5pt]{-4}{2.05}{2.7183 x exp} \rput[l](3.2,7.5){\color{red}$2^x$} \rput(4,8.5){\color{white}change\normalcolor} \rput(-4,-1){\color{white}bounding box\normalcolor} \end{pspicture} [/tex]
|
deimya
tofu and monocle



Registered: 08/26/04
Posts: 825
Loc: ausländer.ch
|
Re: LaTeX support in forum posts [Re: Ythan]
#8377146 - 05/08/08 11:37 AM (16 years, 14 days ago) |
|
|
oooh, thanks Ythan, no more excuses for handwaving 
testing 1 2

sweet !
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: LaTeX support in forum posts [Re: deimya]
#8377295 - 05/08/08 12:15 PM (16 years, 14 days ago) |
|
|

Cool. Hopefully the formulas wont scare people from the threads 
edit - hmmm, my 'q' hat doesnt work.
\mathbf{\hat{q}}_i = \frac{1}{h_i} \sum_{j=1}^{3} \mathbf{\hat{x}}_j \frac{\partial x_j}{\partial q_i}
|
Ythan
ᕕ( ᐛ )ᕗ



Registered: 08/08/97
Posts: 18,840
Loc: NY/MA/VT Borderlands
Last seen: 3 seconds
|
Re: LaTeX support in forum posts [Re: DieCommie]
#8377810 - 05/08/08 02:12 PM (16 years, 14 days ago) |
|
|
Hmmm... that could be a little tricky to track down... I'm guessing it's some sort of a font issue but I'm not sure. Just to confirm does this generated .tex file look correct?
Code:
\documentclass[10pt]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{pst-plot} \usepackage{color} \pagestyle{empty} \begin{document} \mathbf{\hat{q}}_i = \frac{1}{h_i} \sum_{j=1}^{3} \mathbf{\hat{x}}_j \frac{\partial x_j}{\partial q_i} \end{document}
|
Ythan
ᕕ( ᐛ )ᕗ



Registered: 08/08/97
Posts: 18,840
Loc: NY/MA/VT Borderlands
Last seen: 3 seconds
|
Re: LaTeX support in forum posts [Re: Ythan]
#8377862 - 05/08/08 02:27 PM (16 years, 14 days ago) |
|
|
Nevermind I figured it out, \hat is only supported in math mode, once you wrap the math in $ signs it works properly:

Should the $ signs be inserted by default? I assume that would interfere with some other functionality, does it matter?
|
DieCommie


Registered: 12/11/03
Posts: 29,258
|
Re: LaTeX support in forum posts [Re: Ythan]
#8378292 - 05/08/08 04:34 PM (16 years, 14 days ago) |
|
|
When I type a LaTeX report, I use $ signs to put the math 'in line', meaning embedded in the text. I use \[ and \] to put the math on its own separate line.
Since the only purpose of LaTeX here is to display math and not text, I see no reason why using $ signs would reduce functionality.
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 3 months, 8 days
|
Re: LaTeX support in forum posts [Re: Ythan]
#8378344 - 05/08/08 04:47 PM (16 years, 14 days ago) |
|
|
Very cool!
-------------------- Just another spore in the wind.
|
Jrsxt
Stranger


Registered: 05/14/07
Posts: 1,043
|
Re: LaTeX support in forum posts [Re: Seuss]
#8388495 - 05/11/08 09:36 AM (16 years, 11 days ago) |
|
|

Nice
|
maggotz


Registered: 06/24/06
Posts: 7,539
|
Re: LaTeX support in forum posts [Re: Ythan]
#8394557 - 05/12/08 09:29 PM (16 years, 10 days ago) |
|
|
sweet.
|
Annom
※※※※※※




Registered: 12/22/02
Posts: 6,367
Loc: Europe
Last seen: 1 year, 3 days
|
Re: LaTeX support in forum posts [Re: Ythan]
#8395689 - 05/13/08 07:54 AM (16 years, 10 days ago) |
|
|
Thank you!!!!
|
|