[author here:]
I use MathJax. It's pretty widespread and supported by most platforms. I now write my articles in IPython notebooks with TeX equations which get rendered by MathJax. There are a few minor differences between the IPython renderings and MathJax for the web, but I fix those up with a script. (primarily just that $abc$
in IPython has to be converted to \(abc\)
for MathJax.)
Hmm, what browser/platform are you using? It's using MathJax to render the math, which should work in most browsers, unless I screwed something up (this is the first time I've used it for web math, so it's quite possible).
This is quite impressive.
Just a detail, since you explicitly mentioned TeX: do you know MathJax? It’s an incredibly mature TeX math mode renderer in the browser which produces (copyable) output much superior to rendered pictures. It’s used notably on some Stack Exchange sites and some scientific journals such as BMC.
> DISCLAIMER: Do not call this rendering "crappy". Pay some respect to the author of the mimeTeX, it took 10 years to write 10k SLOC in C and 10k lines of comments in total for each of them. See the source mimetex.c. I personally hate his approach, but the work is purely titanic.
Quality of the results and man-hours do not necessarily imply each other. And yes, I don't mean to insult the person who built it, but that output is crappy. If I'm going to render a formula for the web, I prefer MathJaX.
Mods, just add a relevant line of MathJax.
No need to install anything, works for all browsers. Just add a line or two of JS to the top of the page [if possible].
If the issue is just that certain special characters don't show up properly, this would be because certain characters have meaning to html beyond being just text. Google character escaping.
If the issue is that the mathematical expressions have complex layouts, you're in for one of those issue that seems easy to do manually but will take a lot of fiddling to get to look right.
You could look at some libraries like http://www.mathjax.org/ , which looks like it would fit the bill. But if it's one specific expression that you're using as a slogan, I'd honestly just use an image.
> I didn't know pdf had animated features.
I didn't either until I saw some Tikz examples.
> How do you suggest to go from knowing how to code in LaTeX to getting the content onto the web site?
There is the MathJax Javascript library for integrating some LaTeX features in the web, but for more complicated stuff you'll be best off generating an image or something and embedding that on your website normally. I've definitely used LaTeX to generate images then sliced them down to size for insertion into other documents. If you want to draw diagrams in the webpage that are interactive or dynamically generated then I can recommend the D3 JS library. It's fairly friendly and uses SVGs to produce really nice scalable graphics, but it's not as mature or feature-rich as Tikz and other LaTeX libraries. For the simple things that you need to do, I would say you can probably get away with MathJax and D3 without too much trouble if all you want is to embed it in a web page. It's probably easier than getting a LaTeX development environment set up.
I'm not aware of any native latex or mathml renderers for IOS. If someone knows of one, even a commercial offering, I am very interested in hearing about it.
If you are willing to use a webview to render the mathematics, MathJax [1] is a great javascript project for rendering latex or mathml. It's open source, configurable, and it has been able to handle almost everything I've needed to throw at it. You have the unfortunate overhead of needing to use webviews in places you must render math but it is possible to do this in the context of an otherwise native iOS application.
If you are looking for wysiwyg input for complex mathematics I've used mathquill[2] successfully in the context of a native iOS application before. It's been a while and it required a tad bit of customization to get right but I did eventually get it integrated as an input field in an otherwise native iOS application.
Thanks for the tutorial!
But MathML, despite being a W3C web standard, shouldn't be used. The Chrome/Chromium/Internet Explorer web browsers do not support MathML. And it's ugly too.
If possible, you should use MathJax instead.
oh that makes me think, you should add MathJax (unless you know something better) support on the blog so that you (and commenter) can easily have equations typeset nicely. It should be easy to intergrate with wordpress but obviously
I am involved with the MathJax project and happy to see your interest in using MathJax on Reddit. Makes perfect sense to me!
I wanted to add to this discussion that we've recently launched a CDN service, which makes MathJax integration even easier (see http://www.mathjax.org/2011/03/15/news/mathjax-launches-cdn-service-with-1-1-release/).
If you're not familiar with MathJax: it's an open source display engine that renders math from LaTeX and MathML dynamically, making sure it is nicely integrated into the surrounding text on all levels of zoom and across viewing devices (including tablets and smartphones). Here's an example to see MathJax in action: http://math.stackexchange.com/questions/22954/proving-that-xy-x-y-being-x-and-y-two-strings
We'd be happy to think with you on how to use MathJax, just drop a line via the contact form at mathjax.org. Cheers!
If you're interested in building a web application, check out MathJax. It basically allows you to type in LaTeX, and will take care of all the rest for you.
LaTeX is pretty much the de facto standard. If you'll be creating these formulas in some non-dynamic way or in a situation where there is guaranteed Internet access, Google has a LaTeX renderer that will work as well. here. You just have to call the URL, and it returns an image to you.
If you don't mind actually using a more mathematical language, check out Maxima (whose GUI, wxMaxima, prints nicely) or MATLAB. The learning curve for these can be a bit different, however, and you'll need these installed on any computer you want to install the program.
Org-mode? It powerfull "markdown-like" markup language with support LaTeX equations, images, links, plots, tables with excel-like formulas etc. You can easy export org files to html with CSS support (C-c C-e h) or DocBook: tex + PDF with your own packages (C-c C-e d).
You can also convert you Markdown, reStructuredText etc. files to Org-mode (and vice versa) using Pandoc.
Edit: LaTeX expressions are rendered by MathJax.
I am not sure how much Reddit allows you to alter the HTML of a subreddit, but, without any plugins, MathJax allows you to place LaTeX directly into a document and will automatically convert it into math. With the launch of the new CDN, MathJax may be a viable alternative.
Edit: It is as simple as this: Using the MathJax Content Delivery Network (CDN)
Edit 2: This could be used to preview it before posting.
You should really not be using images of your LaTeX code in the articles. It can't be selected, it can't be searched, it takes up more bandwidth and it's really ugly.
Take a look at MathJax. Oh, and in LaTeX, don't use *
, use \cdot
or just concatenation.
Hey, I'd love if we'd get full LaTeX. It would be pretty straightforward too -- e.g., add a moderator configurable setting to load MathJax in your subreddit. Yes MathJax is rather large but it only needs to be fetched once, and can be done by a CDN. And then you can do
$$\frac{\pi}{4} = \sum_{n=0}^{n=\infty}\frac{(-1)^{n}}{2n + 1}$$
or inline equations with a single dollar sign and it renders beautifully. Stackexchange for example uses it on their math-y sites (e.g., math.stackexchange.com physics.stackexchange.com).
But regardless of implementing full LaTeX, it seems natural if you allow superscripts in your markdown to also allow subscripts.
Huh? This tumblr post uses MathJax to render its equation. It works fine on Firefox/Chrome on Ubuntu without any plugins. Can you post a screenshot of how it renders on your machine?
What's the big deal? Everybody gets $\frac{10,000}{3}$ dollars. Don't we have a fractional reserve banking system (hahaha)?
.
.
Mathjax should be supported on reddit!
I agree that MathJax can be installed at each site serving the material to be rendered as math. But they also have a network of mirror sites that round-robin serving it, for those folks who have small needs and don't want to keep up.
Is it true that in the TeX the World system each new visitor will cause a fresh compilation of the text?
I agree that MathJax can be installed at each site serving the material to be rendered as math. But they also have a network of mirror sites that round-robin serving it, for those folks who have small needs and don't want to keep up.
Is it true that the in the TeX the World system each new visitor will cause a fresh compilation of the text?