I am trying to modify the way the sources are shown in my Typst document. For this I am modifying a csl to fit my needs. In doing so I encountered a problem:
The type of field that Typst seems to forward from the .bib file to csl seems to be determined by some sort of ‘if field exists’ or maybe regex. It does not seem to use the stated type in the .bib. I was trying to modify the way a @legislation is shown, but depending on whether the url field is present and starts with an ‘https://’ it seems to fall into webpage or default (or maybe something else, I did only test for webpage and legislation).
This leads to two questions:
- Is there an easy way to determine what type typst assigns to each bibentry before forwarding it to my csl?
- Has someone found a way to target legislation with an csl that does not make me check certain markers in csl again to determine the entries that where supposed to be legislation?
All of this might not even help me though, as I still need to find a may to make legislation citable but still not show up in bibliography. Doing it through csl seems to create the problem of an newline where the entry got suppressed. I have not found a different way to do it though, without having to write custom bib management. Is there any better way? (The style guides do often require to exclude legislation from the bibliography…)