DarkWater Posted January 10, 2009 Share Posted January 10, 2009 I just noticed a LaTeX icon. When did you guys add this? 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. Quote Link to comment https://forums.phpfreaks.com/topic/140243-latex-support/ Share on other sites More sharing options...
Daniel0 Posted January 10, 2009 Share Posted January 10, 2009 I only bothered to post it here because that's where it was most relevant: http://www.phpfreaks.com/forums/index.php/topic,233363.0.html What do you mean with nl2br() ruining it though? Quote Link to comment https://forums.phpfreaks.com/topic/140243-latex-support/#findComment-733932 Share on other sites More sharing options...
DarkWater Posted January 10, 2009 Author Share Posted January 10, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/140243-latex-support/#findComment-733939 Share on other sites More sharing options...
Daniel0 Posted January 10, 2009 Share Posted January 10, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/140243-latex-support/#findComment-733944 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.