2

I've got this

\begin{align}
n &= 0 \\
n &= m + 1
\end{align}

in an org-mode buffer. When I produce a Latex output, the numbering n = 0 (1) etc. is properly placed on the right. But an HTML output places the numbering on the left. What do I need to do to have both HTML and Latex output place the equation numbering off to the right? One Latex tip was to include \documentclass[12pt,oneside,reqno]{amsart} where the reqno is apparently the key addition. I'm not sure how to include this in an org-mode file.

  • 2
    #+LaTeX_CLASS_OPTIONS: [12pt,oneside,reqno] in the beginning of Org document will instruct it to use these options with document class. You can have finer control over document class (see here: orgmode.org/worg/org-contrib/babel/examples/article-class.html ). However, this will have no effect on exported HTML. The way to figure out what to do about HTML would be to examine it in browser, look up the generated HTML and CSS, and see if it might be possible to move the number by means of CSS. – wvxvw Aug 15 '16 at 5:29
  • Yes, thank you, I've found the code. It's part of a <script type="text/x-mathjax-config"> chunk, and inside of it, part of MathJax.Hub.Config({ ..., there is TagSide: "left" which when changed to right does what I want. However, I don't know how to change my org-mode file/setup to change this. But then changing it after the output by hand would be acceptable, I guess. – 147pm Aug 15 '16 at 10:56
  • Yes, I doubt that's something you could configure from Org, but I'm not very familiar with HTML exporter. What if this configuration part is generated? And even if not, what if it was possible to generate it? Hopefully, I'll have time this weekend to look into it. Perhaps there's a simple patch that can make it configurable. – wvxvw Aug 16 '16 at 5:19
  • Yes, there has to be some org-mode control of MathJax. It wouldn't make sense not to be. Still, no one over at the org-mode list has suggested anything yet. Yes, I'm a "double-poster" vis-a-vis org-mode issues. – 147pm Aug 16 '16 at 11:01
3

When in doubt actually do read the instructions. In this case this explains how to move equation numbering:

#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler

I changed the tagside to right and all was well.

  • 1
    The original question asks "...both HTML and Latex..." but your solution applies only for HTML. Or does it also cover LaTeX? – Emacs User Sep 15 '16 at 17:12
  • 1
    @EmacsUser the original question states that it worked as desired in LaTeX, and asked how to duplicate the effect in HTML. – Tyler Sep 15 '16 at 17:24
  • 1
    Thanks for clarifying so future users will benefit. This is a very common question. – Emacs User Sep 15 '16 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.