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: 682

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.


#2 apatriarca   Crossbones+   -  Reputation: 1907

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: 10326

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.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.


- Pessimal Algorithms and Simplexity Analysis

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.