typst-community / glossarium

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

Descriptions do no show up #44

Closed chaxor closed 5 months ago

chaxor commented 5 months ago

As the title says.

It is also extremely simple to reproduce:

#import "@preview/glossarium:0.4.1": make-glossary, print-glossary, gls, glspl
#show: make-glossary
#set page(paper: "us-letter")

Would you eat a #gls("buffer") ? I heard #glspl("buffer") are tasty.

= Glossary
#print-glossary(
  ( (
      key: "buffer",
      short: "buffer",
      description: "A place to store stuff. THIS DOES NOT SHOW UP BUT SHOULD!",
      group: "computer"
    ),),
)

typst compile test.typ && zathura test.pdf

--> No text visible of "THIS DOES NOT SHOW UP BUT SHOULD!"

I don't really know why this occurs. Perhaps a misspelling of "description" somewhere, or there needs to be a #let or something. https://github.com/ENIB-Community/glossarium/blob/397220671c9a3f690839a63aab2fb5772713b5c7/glossarium.typ#L537C1-L539C3

I tried to follow this code base, but it's particularly difficult to follow due to the long and unclear naming conventions. I couldn't figure out why default-print-gloss, default-print-reference, default-print-glossary, etc were all required to be nested into strange structures for example.

My best guess is that it's something like a typo from the name collisions or getting lost in the shuffle of the nested function calls.

chaxor commented 5 months ago

Aha, I figured this one out. I was looking at the main branch while using the latest version. The version 0.4.1 branch is much much more concise and nicer, so I found the problem immediately:

Use 'desc' instead of 'description'. I was trying several other combinations like 'descr'.

So the answer is: use desc as the key - not description.