Marmare314 / lemmify

A library for typesetting mathematical theorems in typst.
GNU General Public License v3.0
11 stars 7 forks source link

`expected string or function, found none` when heading is present #5

Closed bluebear94 closed 12 months ago

bluebear94 commented 1 year ago

Minimal working example:

#import "@preview/lemmify:0.1.1": *

#let (
  theorem, lemma, corollary,
  remark, proposition, example,
  proof, rules: thm-rules
) = default-theorems("thm-group", lang: "en")

#show: thm-rules

= Introduction

#theorem[
  If $w_1, w_2, dots, w_k >= 0$, then $L$ is star-free.
]<starfree>
Marmare314 commented 12 months ago

The problem is that you did not set a numbering for headings. So because the default style uses heading numberings this error occurs. You could either use #set heading(numbering: "1.1") or use a different theorem style (for example thm-numbering-linear).

I'm not sure if there is any good alternative to this error, since at least to me, it is not clear what else should happen in this situation. But a more explicit error message could definitely be added.

Marmare314 commented 12 months ago

Fixed by b320958.