LaTeX rendering - give a rendered image

Log in to Vote
88 Votes • 13 Comments
latex {{search}} should render the results based on LaTeX semantics.
• posted 6 years and 8 months ago • type: Spice (API calls) In Development

Here is the link to the idea with more details from,
posted by [UserVoice yano] • 6 years and 5 months ago Link
You could use MathJax for rendering. If necessary that could perhaps be converted into an image client-side using HTML5 canvas.
posted by [UserVoice Jeroen] • 5 years and 8 months ago Link
We should probably make this idea more specific, since it sounds like you are all talking about rendering equations specifically. LaTeX is much, much larger than just equations, and a lot of LaTeX output differs based on the document type (cls file) and packages loaded. I think rendering \begin{equation}{...}\end{equation} or just allowing ${...}$ and text would be useful, but anything outside of that would start to get needlessly complex and would have to start approaching the functionality a cloud-based renderer like ShareLatex or ScribTeX.
posted by [UserVoice Dinre] • 5 years and 8 months ago Link
I agree with Dinre. I think rendering equations and allowing us to copy the link to a image file would be extremely useful. What about the same with tables?
posted by [UserVoice hpb] • 5 years and 7 months ago Link
I like the idea, but what exactly are the "LaTeX semantics" here? A LaTeX equation can be displayed in the browser using MathJax, but how would the actual search query be interpreted?
e.g. $E=m \times c^{2}$ should be converted to the query "E=mc^2" ?
posted by [UserVoice taddeus] • 5 years and 7 months ago Link
I have no objections to Dinre's clarification, although I'm curious about the use case. If the idea is just to use ddg as a quick and easy LaTeX renderer for formulae so they can be copied and pasted into a word processor, then the obvious way of doing that would be rendering as an image. Previous commenters have suggested MathJax, but AFAIK that uses image fonts to composite the equation in a form that's not easy copied and pasted.

Sure, you could just focus on displaying the result, but as far as I can see there's not much value in that. I can't think of a reason why I'd have raw LaTeX markup and merely want to know what it looked like, and you don't lose anything by rendering as an image.

That said, if MathJax is the only feasible way, then it's better than nothing at least, if only for the coolness value.
posted by [UserVoice Joshua Barney] • 5 years and 6 months ago Link
Looking into Sam's pull request. Thanks, Sam!
posted by [UserVoice DuckDuckGo Team] • 5 years and 5 months ago Link
Yes, that should work. Check out, which does something similar, e.g.
posted by yegg Staff5 years and 9 months ago Link
posted by samwhited 5 years and 5 months ago Link
Can this be done as a goodie that creates simple HTML, wrapping image from mathTeX web service (
posted by istepura 5 years and 9 months ago Link
I agree with the idea. We should avoid unnecessary complex results. By the way, there is a JS library named MathJax that renders LaTeX on client-side. We could take advantage of this library and get rid of any reliance on external resources.
posted by <hidden> • 5 years and 7 months ago Link
Relying on external sources for rendering this is not a good idea.
posted by <hidden> • 5 years and 8 months ago Link
Can I propose little additional feature?
* latex {{search}} in SVG
* latex {{search}} to SVG - will render to SVG instead the bitmap image.
posted by Fzzr 2 years and 8 months ago Link