Jump to content

LaTeX support?


Recommended Posts

I just noticed a LaTeX icon.  When did you guys add this? :o  Does it support basically any LaTeX features?  I'm guessing it just passes the stuff in the tags off to LaTeX and then runs some stuff to output it as a PNG.  Wikipedia does the same thing.

 

Testing:

[tex]\begin{equation}2Al(s) + 6HCl(aq) \rightarrow 2AlCl_{3}(aq) + 3H_{2}(g)\end{equation}[/tex]

 

EDIT: You guys need to stop nl2br() from killing it. D:  I put it all one line to fix it for my little test, but otherwise it has <br /> in there.

Link to comment
https://forums.phpfreaks.com/topic/140243-latex-support/
Share on other sites

Oh, I wasn't aware that we didn't need to put ourselves into an equation environment.  I used:

\begin{equation}

2Al(s) + 6HCl(aq) \rightarrow 2AlCl_{3}(aq) + 3H_{2}(g)

\end{equation}

 

To write the thing in the original post.  If run directly, however, it gives:

[tex]

\begin{equation}

2Al(s) + 6HCl(aq) \rightarrow 2AlCl_{3}(aq) + 3H_{2}(g)

\end{equation}

[/tex]

 

Because nl2br() passes through and adds <br /> in.  It's not a problem for one-liners I guess.

Link to comment
https://forums.phpfreaks.com/topic/140243-latex-support/#findComment-733939
Share on other sites

It's starts within an equation environment, so you don't need to do that. Moreover, it's passed as a query string to a parser which generates a PNG, so having multiple lines is not possible. You can, however, do this:

[tex]1+2=3[/tex]
[tex]5! = 120[/tex]

for multiple lines.

Link to comment
https://forums.phpfreaks.com/topic/140243-latex-support/#findComment-733944
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.