6
$\begingroup$

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

$\endgroup$
11
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Larry Wang Aug 14 '10 at 22:59
  • $\begingroup$ doh! never mind. Could one of you admins put this in the faq? $\endgroup$ – Jason S Aug 14 '10 at 23:03
  • 6
    $\begingroup$ We need a [status-already-working] :) $\endgroup$ – kennytm Aug 14 '10 at 23:04
  • $\begingroup$ @Jason: Ability to edit the FAQ is "in the works" $\endgroup$ – Larry Wang Aug 14 '10 at 23:07
  • $\begingroup$ hmmm. I don't want to edit the FAQ directly, but would be willing to propose snippets to add to it. $\endgroup$ – Jason S Aug 14 '10 at 23:29
5
$\begingroup$

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

$\endgroup$
  • 2
    $\begingroup$ Oh man, am I glad this got asked and answered! I just realized how useful this will be! $\endgroup$ – Todd Wilcox Dec 20 '12 at 23:55
  • $\begingroup$ This is great--I didn't know about it--but it doesn't work with comments. $\endgroup$ – Mars Nov 8 '17 at 17:08
  • $\begingroup$ @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$. $\endgroup$ – Martin Sleziak Nov 8 '17 at 17:22
  • $\begingroup$ It's not working for me, @MartinSleziak. Maybe it's browser or OS specific? $\endgroup$ – Mars Nov 8 '17 at 17:27
  • $\begingroup$ @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? $\endgroup$ – Martin Sleziak Nov 8 '17 at 17:31
  • $\begingroup$ @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. $\endgroup$ – Mars Nov 8 '17 at 17:44
4
$\begingroup$

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).

Viewing source of the webpage also sometime 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.)

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Ben Crowell Dec 14 '16 at 16:35
  • $\begingroup$ 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.) $\endgroup$ – Martin Sleziak Dec 14 '16 at 17:14
  • $\begingroup$ 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. $\endgroup$ – Martin Sleziak Dec 14 '16 at 17:25
  • $\begingroup$ Edit isn't an option for comments. $\endgroup$ – Mars Nov 8 '17 at 17:10
  • $\begingroup$ @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.) $\endgroup$ – Martin Sleziak Nov 8 '17 at 17:15

You must log in to answer this question.

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