sahasatvik / typst-theorems

An implementation of numbered theorem environments in typst
MIT License
195 stars 10 forks source link

Extra space after the name of an unnumbered theorem #11

Closed nullst closed 10 months ago

nullst commented 10 months ago

As shown in the example and documentation, unnumbered theorem environments appear to have extra space after the name:

Screenshot from 2023-11-04 14-03-47

It would look better if rendered as "Example: The numbers...", i.e., with no space before the colon character. This would also be consistent with the LaTeX amsthm behavior.

I don't know typst, but it seems to me that the issue appears due to the incompatibility between the lines https://github.com/sahasatvik/typst-theorems/blob/1f56a2002eae445a6de8c6883687afb43cb62d3c/theorems.typ#L34 (setting number to empty text) and https://github.com/sahasatvik/typst-theorems/blob/1f56a2002eae445a6de8c6883687afb43cb62d3c/theorems.typ#L123 (where [] is not none).

sahasatvik commented 10 months ago

I think that's exactly right, will fix!