How to show latex equation numbers?

Is it possible already to show the equation numbers? For instance when I write

$$F=ma$$

I would like to get something like:

F=ma (1)

By the way Obsidian is awesome. Keep up the good work.

Thanks in advance.
Best regards.

Gafsiqueira

4 Likes

I’ve moved this to the Feature requests category

1 Like

Thanks.

I think it could be as simple as adding this: http://docs.mathjax.org/en/latest/input/tex/eqnumbers.html

1 Like

Nice! Are we able to do this or only devs?

How about something like

$$F=ma \tag{1}$$

3 Likes

Althought you have to put the numbers manually, its a good alternative. Thank you, @aroberge!

Only the devs can do this, I think, since this requires modifying JavaScript. You could mess with the internals of Obsidian, of course, but the external interface allows us to modify the CSS, but not JS.

Devs, could you take a look at this? It should only take a second to enable and is somewhat backwards compatible, in that if users don’t want number, they can just use the equation* environment instead of equation (or you can hide this option behind a flag if you’d like):

window.MathJax = {
  tex: {
    tags: 'ams'
  }
};
1 Like

Nice, thanks @singhrac

There are now several feature requests that are all essentially the same - additional control over MathJax initialization and extensions. In addition to this one I found the following:

In my opinion these should all be merged since they all deal with the fine-grain control of MathJax. If these are implemented 1-by-1 I worry that the solution will be a bit inflexible. Since MathJax is a core feature I think these should be also, but if not this topic should motivate the plugin API to be able to handle these use cases.

5 Likes

Unfortunately, due to the way mathjax is implemented this is not just as easy as flipping a switch for us. This is not likely to be implemented in the short term.

2 Likes

That’s okay, I still love you guys. Keep up the good work.

As I just saw the notes on 8.2, perhaps this will be solved? @WhiteNoise

no, but we looked into it. We enabled what we could, but we can’t enable that.

1 Like

Cool. Thanks anyways.