5
$\begingroup$

Sometimes an answer posted on math.stackexchange is long, containing sections, formula numbering, cross-references and even a bibliography with in-text citations, like a little article. It is unwieldy to write such answers directly in MathJax. A much better approach would be to write the answer in LaTeX and then convert it to MathJax. Is this possible? How?

$\endgroup$
  • $\begingroup$ Could you give an example of such an answer? $\endgroup$ – quid Jun 25 '17 at 10:31
  • $\begingroup$ @quid: This answer, for instance, exhibits some of these features, namely sections and a bibliography. This answer, which I once wrote, has sections and could have benefitted from formula numbering, if only I was able to accomplish it easily. $\endgroup$ – Evan Aad Jun 25 '17 at 10:35
  • 2
    $\begingroup$ Thanks for the illustrative examples. A remark, formatting on SE other than that for math is not done by MathJax; instead Markdown (and HTML) is used. Thus, what you likely actually want is a LaTeX to this mix of Markdown and MathJax. $\endgroup$ – quid Jun 25 '17 at 10:46
  • 1
    $\begingroup$ It's not exactly what you are asking for, but perhaps some of the editors supporting MathJax and MarkDown could be useful. $\endgroup$ – Martin Sleziak Jun 25 '17 at 11:23
  • $\begingroup$ @MartinSleziak: That's a good start, however another good reason for a conversion program is I occasionally find myself wanting to incorporate stuff that I wrote on math.stackexchange into my own personal documents, which are written exclusively in LaTeX. If they could have been composed originally in LaTeX, it would have made matters so much easier! $\endgroup$ – Evan Aad Jun 25 '17 at 11:29
  • 3
    $\begingroup$ @EvanAad There are some tools related to what you ask in your last comment (i.e., incorporating MSE posts in LaTeX documents; meaning converting MathJax+MarkDown -> TeX, which is the opposite direction than what you mention in question). Although I assume they only convert basic stuff. You can have a look at Save the answer in TEX? and Save the answer in TeX/PDF - revisioned (or some other related posts). $\endgroup$ – Martin Sleziak Jun 25 '17 at 11:43
  • $\begingroup$ I have not looked into it, but a possibility is to check with meta on TeX - LaTeX to see how they handle this. They may know of a StackApps userscript that deals with this as well. $\endgroup$ – Gypsy Spellweaver Jun 28 '17 at 1:49
  • $\begingroup$ @GypsySpellweaver: You can't typeset mathematics on the TeX forum. $\endgroup$ – Evan Aad Jun 28 '17 at 2:07
  • $\begingroup$ If they have a user script for converting LaTeX into markdown+LaTeX for posting to their site, perhaps it could also handle converting LaTeX into markdown+MathJax. Or be modifiable to handle your use case. Just a trail to follow, as I don't know if such a thing exists. Since they deal with LaTeX a lot, someone there might have done something along these lines. $\endgroup$ – Gypsy Spellweaver Jun 28 '17 at 2:10
  • $\begingroup$ @GypsySpellweaver: AFAIK the only way to display a typeset document fragment on the TeX forum is by embedding a screenshot or a pdf file. $\endgroup$ – Evan Aad Jun 28 '17 at 2:20
  • $\begingroup$ Oh, well. It was a thought I had for investigation. Sorry it didn't pan out. $\endgroup$ – Gypsy Spellweaver Jun 28 '17 at 2:23

You must log in to answer this question.

Browse other questions tagged .