809 B
809 B
Fabulous Fedlex
A Typst package to cite and display Swiss law articles
Usage
#import "/fabulous-fedlex/src/lib.typ" as ff
#let law-dir = "./law"
#ff.init-registries((
CP: (
color: rgb("#DE615C"),
data: json(law-dir + "/code_penal.json")
),
))
#ff.cite-law("CP", "art_11")
See more examples in example.typ
Adding registries
To add new law registries, simply follow these steps:
- Go to https://www.fedlex.admin.ch/
- Find the registry you want to add
- On the left panel, download the XML version of the document
- Using converter.py, you can then convert it into the appropriate JSON format
- Register the new registry as shown in the example, giving it a shortname (e.g. CP), and a color
- You can then use it with
cite-law