Automatic equation numbering

Javier's Avatar


13 May, 2014 12:39 PM

When selecting "Include Mathjax", it'd be good to have an option to include this script ( in the html header:

Probably the script can be included anywhere before invoking Mathjax.

Once it is included, equations can be numbered automatically and linked using labels. I have included two files showing how to number and link equations in markdown and the modified html file.

Obviously it would be better if the equation numbers and links would be visible in Marked.

  1. Support Staff 1 Posted by Brett on 14 May, 2014 01:22 AM

    Brett's Avatar

    Do you think this is something that would be widely used? I only ask because I have little knowledge of equations and their uses in documents, and have no idea what the specific situations where this would be required are.

  2. 2 Posted by Javier on 14 May, 2014 10:09 AM

    Javier's Avatar

    I think that this feature would be quite useful for students, teachers, researchers who are dealing with math, like physicists, chemists, statisticians , etc.

    In my case, I'm planning to move to markdown the notes of one course I teach on process control and it's something I really need, a lot of equations there.

    I don't know how much time you would need to invest to implement it. As far I know is something that isn't available in any markdown edit (at least for mac).

  3. Support Staff 3 Posted by Brett on 14 May, 2014 12:11 PM

    Brett's Avatar

    Shouldn't take too much time, it's just another checkbox in preferences
    that I need to fit in without making it messier. It does sound like
    something useful enough to consider.


  4. 4 Posted by Javier on 15 May, 2014 08:16 AM

    Javier's Avatar

    Maybe something like this:

    ⬜︎ Include MathJax ⬜︎ Automatic equation numbering

    I think that there is enough space there. The option "Automatic equation numbering" would be grayed if "Included MathJax" is unchecked.

  5. 5 Posted by Jaebong on 16 Jul, 2014 04:45 PM

    Jaebong's Avatar

    I also have exactly same wish with Javier.
    Now, I am using Marked2 with scrivener for my thesis.
    The equation numbering is definitely needed for student.

  6. Support Staff 6 Posted by Brett on 16 Jul, 2014 08:35 PM

    Brett's Avatar

    So this setting can be set to "AMD" or "all". See docs at:

    Which would be more useful?


  7. Support Staff 7 Posted by Brett on 16 Jul, 2014 08:36 PM

    Brett's Avatar

    And note that you can use this at any time (when MathJax is enabled) by just adding:

     <script type="text/x-mathjax-config">
       TeX: { equationNumbers: { autoNumber: "all" } }

    at the end of your document.

  8. 8 Posted by Jaebong on 17 Jul, 2014 09:14 AM

    Jaebong's Avatar

    Thank you for your quick reply.
    Actually, when I convert my scrivener text to latex, I am using "AMS" style numbering.
    I tried the above script with "AMS". But Marked doesn't show math equation with that option.

    <script type="text/x-mathjax-config">
    TeX: { equationNumbers: { autoNumber: “AMS” } }
  9. Support Staff 9 Posted by Brett on 17 Jul, 2014 11:48 AM

    Brett's Avatar

    No, the only way I could get numbers to show up was to set it to "all,"
    but I don't know how it all works…


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 265 Bytes
  • test.html 5.75 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac