6
$\begingroup$

I am a big procrastinator when it comes to learning MathJax. I happened to remember that only before asking a question. Is there perhaps a shortcut to simply copy an equation from one part of the site and then edit according to our own question (hope this doesn't count as plagiarism for not doing the MathJax part), much like in desmos where you copy a part of an equation and then insert it somewhere else on the site.

Or maybe this feature might cause a headache, but is there a any better technique

$\endgroup$
6
  • 15
    $\begingroup$ Right-clicking on a MathJax formula (using the desktop site) brings up a menu of Math Formatting options, the top one being "Show Math As..." The "TeX Commands" subitem allows you to select the $\LaTeX$ commands that gave rise to the displayed mathematics, and you can copy and paste it between dollar signs to reproduce that formula. Try this formula: $e^{i\pi} = -1$. To avoid plagiarism, you can provide a link to that older post for context. $\endgroup$ – hardmath Feb 28 at 6:44
  • $\begingroup$ @hardmath oh thanks for letting me know about th dollar sign $\endgroup$ – Adil Mohammed Feb 28 at 6:54
  • 10
    $\begingroup$ Whenever I want to copy/paste a MathJax snippet from a question or an answer on our site I follow the procedure of 1) click the "Edit"-button under the post, 2) copy the formula from the source to the clipboard, 3) close the edit window without saving, 4) go and paste the snippet wherever it is needed. Hardmath's method is the only option when you want to copy from a comment. Somehow it feels unnatural to me, but that may say more about me rather than what is the best workflow. $\endgroup$ – Jyrki Lahtonen Feb 28 at 7:02
  • 8
    $\begingroup$ You should probably explain where do you want to copy equation from. For example, it won't be easy to get the formula from a pdf file, if you had something like that in mind. If you meant copying something from another post on this site, this was explained in previous comments and you can also check this older post on meta: How to view LaTeX source of equations? $\endgroup$ – Martin Sleziak Feb 28 at 7:37
  • 1
    $\begingroup$ You can also hit the edit button on the post in question and copy to clipboard on your computer the relevant part (e.g. Ctrl+C on Windows). This is actually explained in the answer that Martin Sleziak gave to the linked question. $\endgroup$ – Fizz Mar 4 at 4:39
  • $\begingroup$ On a Mac, control and click to show the MathJax formula. $\endgroup$ – Toby Mak Mar 13 at 4:04
8
$\begingroup$

For posts or comments on MathSE:

Right click on the formula and select Show Math As > TeX Commands

For external sites that use MathJax:

Try the same trick as above.

Otherwise use right click on the formula and select View Page source/ Inspect Element and copy from there.

For other external sites:

Unfortunately, websites like Wikipedia or Woltram mathworld embed formulae as images. However, we can use the methods suggested by Martin Sleziak and PedroSánchezTerraf in the comments:

Right click on the image and select View Source or Inspect Element. The math code can be seen in the alt text for the image, as shown in the screenshot.Finding the formula on Wikipedia

You can also find it by clicking Edit for the article or section.

Where this does not work, one can use Mathpix to obtain the Tex commands from an OCR file.

The last resort, as always, is to look for the elsewhere or type it yourself!

$\endgroup$
5
5
$\begingroup$

As a coda to the existing answer/comments, let me mention a useful last resort. If there's a tex symbol you don't know, and the site you're looking at doesn't reveal its code in a useful way (or you're reading a physical text!), you can always try the site detexify. Of course this is limited, since latex doesn't exactly line up with mathjax, but it's still very useful to know about.

$\endgroup$

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