On some other SE sites, code in between dollar signs gets rendered as mathematics (using MathJaX, I believe). This doesn't seem to work here? Why not? And how do I get round it?

share
1  
See this question. You should know the answer to this, since you requested the behaviour :) –  Lev Bishop Apr 18 '11 at 18:02
7  
@Lev: My apologies, I meant to leave a comment on this but forgot. This is a "FAQ" question - I don't want to know the answer but I want to be able to point people to this question if they wonder about it. –  Loop Space Apr 18 '11 at 18:11
    
This online LaTeX-to-png converter by Kyle Woodward can be helpful for short runs: 1.618034.com/latex.php –  episanty Feb 18 '13 at 18:03

2 Answers 2

On this site, we want to see the actual code far more often than we want to see the rendered output, so MathJaX is not enabled for this site. If you want to show the result of some input, you need to create an image of the output and upload it. One of the simplest methods of getting an image from your code is to use the standalone package (see Compile a latex document into a png image that's as short as possible. for more details). To upload it, click on the "add image" button at the top of the text box (the box symbol next to the one with the 1s and 0s) and, if you have at least 10 reputation points, you will be able to upload the image and have it embedded in your question/answer.

share
    
2  
Also, MathJaX does not use TeX and thus renders differently and doesn't support all of (La)TeX and its packages. –  Caramdir Jun 1 '12 at 3:34
    
People wanting to show ConTeXt output can use \startTEXpage...\stopTEXpage. The resulting PDF will be exactly as large as the content. You can upload the result directly --- tex.se takes care of the conversion to PNG. –  Esteis Dec 8 '12 at 13:52
2  
As someone who includes images in almost all of his questions and answers, can I say that this behaviour is annoying and IMHO basically unjustified? Make the escape code as complicated as you will but why don't you let people decide whether they want to show code, exactly rendered result or just the ballpark? In this question of mine I had to fiddle around with HTML markup and I really missed math.SX who use TeX where we don't tex.stackexchange.com/q/102149/13450 –  Christian Mar 12 '13 at 17:18
    
@Christian I'm sorry you feel like that, but your last remark shows the source of the problem. Maths-SX does not use TeX. They use MathJaX. MathJaX is not TeX. I don't know a lot about MathJaX, but I don't think it supports siunitx and certainly doesn't support pgfmath. So MathJaX wouldn't have helped you and you would still have had to fiddle around with the HTML markup (not that I understand what fiddling you needed to do, sorry for being dense). What is so hard about uploading a screenshot? –  Loop Space Mar 12 '13 at 19:15
    
@AndrewStacey Well, nothing is hard about uploading a screenshot. It's just time consuming and it's actually more time consuming then fiddling around with unicode chars and markup. When I said "TeX", I meant TeX markup/syntax, not one of the actual kernels. Now I'm going to add an answer because I need to upload a screenshot ;) –  Christian Mar 12 '13 at 19:22

Just as a follow-up to the exchange with Andrew in the other answer, this is what my fiddling vs. what I would have like looks on tex.SE compared to math.SX:

tex.SE

math.SX

No, it's not dramatic that this doesn't work and I could help myself with simple markup and by digging for that $\times$ sign. My point is, that it is a simple convenience that is already implemented, whose availability doesn't hurt anybody and creating an actual TeX file for this, compiling it, converting it to a PNG file and uploading it is so overkill for this use case. And I'm not even sure how well inline images work here.

And concerning the HTML/unicode solution compared to the TeX syntax: the latter might not be rendered by TeX but it still looks much better than what I came up with. Yes, I might have fetched a real minus sign from some unicode table, too, but the more work I have to invest to make such a simple thing look decent, the stronger – I feel – my point becomes really.

Just as a convenience, here's my question again that sparked these posts: Omit zeros before the decimal point and convert scientific notation in siunitx

share
    
I'd say an image isn't really essential in your case, as a 'reference' version can be constructed happily in TeX code: $.80$ $-.12$, etc. Also it's about common cases: tex-sx is not a site about maths, it's about typesetting, and most of the time that's not maths. –  Joseph Wright Mar 13 '13 at 8:07
1  
In this case I feel that you want to use MathJaX to produce a particular rendering on the screen and the fact that MathJaX emulates TeX is irrelevant to this - it is simply convenient because you know it. Moreover, your question (as I read it) isn't about the look of the output but its format, in which case getting the right unicode characters isn't so important. Even simply writing 4.44 x 10^{-16} would do to show what output you want. So I'm afraid that I disagree with your conclusion and still think that MathJaX would cause more hassle than its worth. –  Loop Space Mar 13 '13 at 10:00
    
@AndrewStacey You are right in your analysis that it's a mere convenience for the author and the reader of a post but so is TeX itself. It's not like an ugly book doesn't convey the same information as one with beautiful typesetting. And yes, it's just for math and it just makes sense because people on the site already know the syntax. I could accept this as a simple difference in opinion if I understood what exactly the hassle is that MathJaX would cause. You only said "people don't want this" and "there are alternatives", none of which is about hassle. –  Christian Mar 13 '13 at 11:25
    
This particular question-and-answer was meant as a quick reference for people to link to. There was more discussion on meta and my arguments can be found at meta.tex.stackexchange.com/q/7/86 –  Loop Space Mar 13 '13 at 12:14
    
@AndrewStacey Thanks for the pointer. None of the arguments there apply but I'll shut up anyway because it's pretty clear that you've made up your mind and I'm not going to change that. I can use the time I saved by not discussing this further to make like a million screenshots and figure out how to inline them. –  Christian Mar 13 '13 at 20:01
    
When I first started hanging out here, having no mathjax support seemed stupid but as time passed by I'm now very very happy that it's not turned on. Especially the problems we had with a few of new users here it would have been a true nightmare. I understand why you feel this choice is dumb but I'm almost sure that your views will change especially when you start spotting the difference of MathJax and TeX from a distance and seeing how people force themselves for the proper commands to communicate in TeX lingo. –  percusse Mar 13 '13 at 22:31
    
@percusse I'm sure I'll one day start to see the woman in the red dress but that still doesn't make such a post user-friendly to beginners, i.e. people who have been using TeX for less than 20 years or so :) –  Christian Mar 14 '13 at 7:31
    
@Christian: I think you'll find that once you set up a system for easily taking screenshots, the problem basically disappears. For example, on Ubuntu I just press the Windows key and draw a rectangle around the desired area, and it automatically saves that as an image in a predefined folder. Click "Upload image", select the file, done. Since you're going to have a LaTeX editor and PDF viewer open when working on a question anyway, this really only requires minimal effort. –  Jake Mar 16 '13 at 13:21
    
@Jake Yeah well, up until now, I much prefer a workflow that is independent on screen resolution and subpixel rendering by using the Gimp to render a PDF page into an image. Should I more often need a quick and ugly screenshot to cater to the needs of TeX.SE, I might need to set up such a mechanism as well. It would not make using math that I don't yet have in a TeX file much more easy to produce. –  Christian Mar 16 '13 at 14:19
    
I could combine your suggestion with a system that makes producing math from TeX syntax more easy ... like math.SE, thereby utterly perverting the intentions of this artificial restriction which – I must confess – would fill me with great joy and deep satisfaction. –  Christian Mar 16 '13 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .