Default for equation numbering should be: number only labelled equations

I want to propose that the default for equation numbering should be that things like $ a+b=c $<eq:abc> get a number but $ d + e = f $ (that does not have a label) does not. Now this is definitely a minor issue and Typst can of course be customized by adding the following to the preamble:

#show math.equation: it => {
if it.block and not it.has("label") and it.numbering != none \[
#counter(math.equation).update(v => v - 1)
#math.equation(it.body, block: true, numbering: none)
\] else { it }
}

I simply do not understand why this is not the default already and I think it should be changed. I cannot imagine that there are many people that want to number every single displayed equation in their papers. But maybe this is simply a lack of imagination on my part!

2 Likes

Yes, I agree that this shouldn’t be the default. I think the team is working towards a math update that contains an overhaul to the internals and addresses how ambiguous syntax is parsed (e.g. $f_n(x)$ currently parses as $f_(n(x))$ instead of $f_n (x)$ which is, in many people’s opinion, incorrect).

hopefully this update will address the open issues related to numbering aswell (like #380 and #3031). The team tends to prioritise issues with more attention, so if you have a github account make sure to like/contribute towards them! :grin:

Thank you! I see that this is in fact exactly #3031. It seems quite different than #380 to me (the “parent”?), but I understand that these are at least related issues.

1 Like

Yes, I’m not really up to date on the numbering discussion but reading the comments on #3031 it seems the team is aware of these issues and they were discussed, just perhaps not on the original thread.

Regarding Github, it seems the discussion on there was closed in April 2026, so it is pointless to write further text there, right?

Unless I missed something obvious, I don’t think either issue is closed, and if you can meaningfully contribute towards the design of the proposal i’d encourange you to participate!

Sorry, I am completely new to this and very easily get lost. I was referring to typst/typst · Discussions · GitHub - I now understand that this is only a part of what is happening on Github, and in particular is separate from the Issues section. In fact I came across another issue now, I guess I should make a post on Github about it then and not here?
I don’t think I am going to be able to help with the programming I’m afraid, I wouldn’t even know where to find THE design of THE proposal that you mentioned… never heard about either until now.

Ah, I didn’t even realise there was a separate discussion page on github! Indeed, it is not used any more and the forum/discord are where most conversations take place. Before posting about a new issue, you should first try to see if there has been any discussion about it to avoid duplicating known issues (though, sometimes finding these other issues can be somewhat difficult. Asking here or on the discord can be helpful, as many people will have a general idea on what is on the pipeline). If you can’t find anything, then it’s fine to post :)

And about helping with programming, that’s fine. I was mainly referring to comments that just ask for a progress update instead of being helpful. Proposing solutions, even from just a user perspective (like how it should behave, what the syntax could look like..) is helpful.

I am one of those people who prefer to number every displayed equation: the numbers are useful not only to the author but also to readers, who may want to cite an equation that the author does not reference. So whatever the default is, the other option should be easily available.