Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


LaTeX math via MathJax?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Tocs   Members   -  Reputation: 685

Posted 18 July 2013 - 07:28 AM

A few weeks ago I tried to make a post in the math forum with a bit of LaTeX mixed in. A sticky post said to use the "eqn" tag. The tag seems to query a server to render the latex and serve an image. However it seemed quite easy to break the server so it wouldn't output an image at all.

 

The other day I was stumbling across the internet and found http://www.mathjax.org/ which renders latex into HTML elements. It seems to function quite well. Has anyone considered this for use in the forums / journals? I did a quick search of the forums and couldn't find any mention of it. So I thought I'd post it here.



Sponsor:

#2 apatriarca   Crossbones+   -  Reputation: 2003

Posted 18 July 2013 - 08:09 AM

I have used (mainly maths related) forums featuring the insertion of LaTeX equations using MathJax and it works quite well. The only problem I have had is that, being written in JavaScript, the images are created during page loading and it can become slow when a lot of equations are used. The main advantage of MathJax is in my opinion that it is possible to copy the LaTeX code of the formula. When JavaScript is not enabled I think it simply shows the LaTeX code.

#3 Bacterius   Crossbones+   -  Reputation: 11520

Posted 18 July 2013 - 02:25 PM

That would be nice to add, indeed. I agree it can make things slower when loading a page but I think it is worth it, especially for the Math & Physics subforum, and the developer journals, as well as for articles which contain a lot of math (like the vector tutorials published a couple months ago).

 

It's really easy to implement, too, all I had to do on my website was paste the loading code into a header file and serve it with every page sent to the user, worked perfectly. There's no server load given everything is rendered by a remote CDN and then sent to the client directly. And as apatriarca says, the fact that only the formula is stored on the server makes this very future-proof.

 

PS: if this is done, please make [eqn] a MathJax tag (I think there is a way) or at least do a search & replace to convert them to dollar signs, I'd hate to see all the posts using [eqn] lost forever sad.png

 

*imaginary +1*


Edited by Bacterius, 18 July 2013 - 02:26 PM.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS