# How to view LaTeX source of equations?

How do you view the source of a question, to see how the LaTeX was specified as markup?

## 3 Answers

Have you tried right-clicking on it and selecting "Show source?"

• You do have to make sure that it was rendered by MathJax, though. Before the site had TeX support, some users would use a rendering engine on another site and link to the generated images. Aug 14, 2010 at 22:59
• doh! never mind. Could one of you admins put this in the faq? Aug 14, 2010 at 23:03
• We need a [status-already-working] :) Aug 14, 2010 at 23:04
• @Jason: Ability to edit the FAQ is "in the works" Aug 14, 2010 at 23:07
• hmmm. I don't want to edit the FAQ directly, but would be willing to propose snippets to add to it. Aug 14, 2010 at 23:29

The answers posted so far focus mainly on the source for one individual formula.

Another possibility (if you want to copy a large chunk of text with several formulas) is to click on edit (and, of course, not save the edits you make, just copy the part you need).

If you do not want to click on edit - to make sure that you do not change something by mistake - you can still get to the source through the revision history. You can get to the revision history easily if the post has been edited at least once - just click on the timestamp saying "edited Date". If the post wasn't edited, you can use the button next to the post to display the timeline and then manually change the timeline to revisions in the URL.

Viewing source of the webpage also sometimes works (View/Source in Internet Explorer, Ctrl+U in Mozilla Firefox). This way has some flaws - you don't see markup, but html. If TeX-contains & (ampersound) it is changed.

The above is explicitly about getting the MathJax source from a post. (This is what was actually asked in the question.) There were a few comments asking how to view the source in comments. For this, see: Seeing the MathJax mark-up for a comment and How to copy mixture of text and latex formulas in a comment? (Although some of the suggestions given in the answers to this question - namely using MathJax menu and displaying source of the website - work for comments, too.)

• If you want to cut and paste the entire source code of somebody else's comments, including all the latex, view source seems to be the only method.
– user13618
Dec 14, 2016 at 16:35
• Also a bookmarklet mentioned here could be used. The link in that post is now that, but you can recover that bookmarklet, for example, from Wayback Machine. (Perhaps we should collect somewhere the bookmarklets which were on that site - at least some of them are often handy.) Dec 14, 2016 at 17:14
• To be more specific, you could try this to see for the whole collection and probably you should also be able copy individual bookmarklets from there. Dec 14, 2016 at 17:25
• Edit isn't an option for comments.
– Mars
Nov 8, 2017 at 17:10
• @Mars The question explicitly asks about LaTeX source in a question. If you are interested in comments, you can look at How to copy mixture of text and latex formulas in a comment? and some of the posts linked there. (And, in fact, the other method - viewing source - does work for comments.) Nov 8, 2017 at 17:15

\text{Steps:} \\ \begin{align}1.& \text{Right click this.} \\ 2. & \text{“Show Math As"} \\ 3. & \text{Click on }\TeX \ Commands. \end{align}

• Oh man, am I glad this got asked and answered! I just realized how useful this will be! Dec 20, 2012 at 23:55
• This is great--I didn't know about it--but it doesn't work with comments.
– Mars
Nov 8, 2017 at 17:08
• @Mars Actually it works also for comments. You can try it on this formula if you want to test it: $x^2+y^2=z^2$. Nov 8, 2017 at 17:22
• It's not working for me, @MartinSleziak. Maybe it's browser or OS specific?
– Mars
Nov 8, 2017 at 17:27
• @Mars Here is a post with screenshots if it helps: How do I view, but not edit, the markup for any given comment on any given StackExchange site? Nov 8, 2017 at 17:31
• @MartinSleziak--Oh, sorry--it seems to depend on context in ways I don't understand. Sometimes I have to click on the math expression itself, not just on the comment or answer. I was misled because for some reason the special popup menu (as opposed to the default browser menu) seems to appear when right-clicking on any part of Parth Kohli's answer. Other answers don't have this property.
– Mars
Nov 8, 2017 at 17:44
• @Mars That's because all of this answer is written using MathJax :) Feb 4 at 21:31