typst-community / glossarium

Glossarium is a simple typst glossary.
MIT License
41 stars 11 forks source link

Use before last `set page()` fails #21

Closed TomVer99 closed 9 months ago

TomVer99 commented 9 months ago

In my document, I have a "pre-TOC" section. This section has a different footer so after this, I use the set page to change the footer. However this results in the following error:

expected string or function, found nonetypst

In print-glossary on line 141. It specifically goes wrong on:

x.page-numbering()

In (lines 138 - 142).

                  .map(
                    (x) => link(
                      x,
                    )[#numbering(x.page-numbering(), ..counter(page).at(x))],
                  )

I am using 0.2.6

To replicate (same exact situation as me): Create a document using this template: https://github.com/TomVer99/FHICT-typst-template

Set up at least 1 term. Put some text in the body (it does not matter how much). Use a term in the pre-toc of the document. I am confident this is not an error on my side, but if it is I apologise.

slashformotion commented 9 months ago

Hello @TomVer99, I have a few question to help with debugging:

TomVer99 commented 9 months ago

Hello @TomVer99, I have a few question to help with debugging:

  • Can you reproduce this without the template?
  • What version of typst are you using ?

Hi there,

My apologies, it turned out to be an error in my template. I forgot to set the numbering in the set page(...). It now works fine :).

My apologies, Tom

slashformotion commented 9 months ago

no problem