#Trouble with the glossarium:0.2.3 package

88 messages · Page 1 of 1 (latest)

blissful prairie
#

Im trying to use this package, and followed the setup instructions. But I cannot get it working. I THINK it is because of the fact im using this package in my own template, because if I use it in a new file, it works without issue. Could someone help me? I have no clue what the issue is or how I could fix it.

I import the package from @preview in my template file, and the line immediately after, I set the show make-glossary rule. Then in the file that uses the template I use the gls function and the print-glossary function. Using the @ or gls functions prevent my document from generating a PDF.

#

In my template:

#import "@preview/glossarium:0.2.3": make-glossary, print-glossary, gls, glspl
#show: make-glossary
...
#let fhict_doc(
...
) = {
...
body
...
}

In my use file:

#import my template
#show: fhict_doc.with(
...
)
...
// TEST text, @kuleuven. and more Text.

TEST 2 #gls("kuleuven")

TEST 3

#pagebreak()
#print-glossary((
  (
    key: "kuleuven",
    short: "KU Leuven",
    long: "Katholieke Universiteit Leuven",
    desc: [Fugiat do fugiat est minim ullamco est eu duis minim nisi tempor adipisicing do _sunt_.],
  ),
),
show-all: true
)
#

My document does generate without using the print-glossary, but then i get this:

#

If I do the reverse, with show-all disabled. nothing shows up but it does generate

blissful prairie
#

found out im getting this error

brazen sail
#

In my template:

#import "@preview/glossarium:0.2.3": make-glossary, print-glossary, gls, glspl

...
#let fhict_doc(
...
) = {

#show: make-glossary

body
...
}
blissful prairie
#

ill try that o7

#

that does not work :(

#

I did the show right before my body

#

and in my usage file:

Test text #gls("kuleuven") test text

#print-glossary(
(
  (
    key: "kuleuven",
    short: "KU Leuven",
    long: "Katholieke Universiteit Leuven",
    desc: [Fugiat do fugiat est minim ullamco est eu duis   minim nisi tempor adipisicing do _sunt_. #gls("vub")],
  ),
))
#

and im getting the same error

#

it seems its something with page numbering?

#

I will push it on a new branch and share it here

#

this is the up to date version, that is not working

brazen sail
#

Let me see

blissful prairie
#

ah, and im using teh showcase.typ as the doc that should generate the pdf

brazen sail
#

Ok

#

Try putting the show: make-glossary at the top of your template function?

blissful prairie
#

nop :(

brazen sail
#

I can’t really test it right now

blissful prairie
brazen sail
#

What it the compiler output ?

blissful prairie
#

Im using the VSCode LSP

little totem
#

it's like writing things outside of the exported functions - nothing happens

#

instead, you need to add the show rule inside your template function (so the show rule will apply to the modified content returned by said function), and then use #show: template_function to wrap your normal document in it

#

that might of course not be the full problem here but it's certainly part of it

little totem
#

take a look, for instance, at the line of code the error message is pointing to

blissful prairie
blissful prairie
#

but that still gives me the same error

little totem
#

yeah the error is unrelated

blissful prairie
#

ah

blissful prairie
#

specifially on the x.page-numbering() function

little totem
#

seems like page-numbering() returned none

#

did you change your page numbering?

blissful prairie
#

yes

little totem
#

then thats probably it

brazen sail
#

Set the page numbering to “1”

blissful prairie
#
  counter(page).update(1)
brazen sail
#

To see if it works

#

Set page(numbering: “1”)

blissful prairie
#

THANK YOU

#

omgggg

#

that was it!

#

YES

#

thank you both so much!!

#

typst is a lot easier than latex, but still very complex haha

#

my smooth brain sometimes cant keep up

#

😂

little totem
#

unfortunately simplicity and customizability are always at odds lol

blissful prairie
#

yeah haha

#

thats why im making a template, so i only have to do this stuff once, and can enjoy it later

little totem
#

that's the spirit

#

i made a template for some cool headers a few months ago and now i just use them without thinking

#

so yeah lol

blissful prairie
#

oh shi, that looks cool

#

i love lurking here, there is so much cool stuff that comes flying by

little totem
#

resending to cut off the ugly top

#

lol

blissful prairie
#

haha

little totem
#

i thought about making it a package but kinda lazy tbh

#

lol

blissful prairie
#

haha

#

a giant package with loads of header choices

little totem
#

also the in-triangle at the second one is just a white triangle lol

#

so with different backgrounds that wouldnt work very well

blissful prairie
#

ahhhh

#

yeaaa

#

wasnt there someone who wanted to detect background color recently in here?

little totem
#

yeah there was

#

but that sounds like an insurmountable task

#

lol

blissful prairie
#

😂

#

that does sound like a lot of work

little totem
#

yeah

#

either way we can live with what we got for now lol

#

i could probably work around this by using a polygon to draw the background instead of a rectangle

blissful prairie
#

oh yea

#

just 1 extra point needed really

little totem
#

yeah

#

but the triangle is too convenient 😢

#

lol

blissful prairie
#

😂