chore: add example
This commit is contained in:
BIN
example.pdf
Normal file
BIN
example.pdf
Normal file
Binary file not shown.
48
example.typ
Normal file
48
example.typ
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#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")
|
||||||
|
),
|
||||||
|
CC: (
|
||||||
|
color: rgb("#5CBDDE"),
|
||||||
|
data: json(law-dir + "/code_civil.json")
|
||||||
|
),
|
||||||
|
CO: (
|
||||||
|
color: rgb("#A95CDE"),
|
||||||
|
data: json(law-dir + "/code_obligations.json")
|
||||||
|
),
|
||||||
|
CPP: (
|
||||||
|
color: rgb("#dba74d"),
|
||||||
|
data: json(law-dir + "/code_procedure.json")
|
||||||
|
),
|
||||||
|
LPD: (
|
||||||
|
color: rgb("#9BDE5C"),
|
||||||
|
data: json(law-dir + "/lpd.json")
|
||||||
|
),
|
||||||
|
LDA: (
|
||||||
|
color: rgb("#DECC5C"),
|
||||||
|
data: json(law-dir + "/lda.json")
|
||||||
|
)
|
||||||
|
))
|
||||||
|
|
||||||
|
// Show article 13 (first one)
|
||||||
|
#ff.cite-law("CC", "art_13")
|
||||||
|
|
||||||
|
// Show second article 13
|
||||||
|
#ff.cite-law("CC", ("art_13", 1))
|
||||||
|
|
||||||
|
// Show whole path (with numbers)
|
||||||
|
#ff.cite-law("CC", "art_13", whole-path: true)
|
||||||
|
|
||||||
|
// Show article 11 of CP
|
||||||
|
#ff.cite-law("CP", "art_11")
|
||||||
|
|
||||||
|
// Only show paragraph 2
|
||||||
|
#ff.cite-law("CP", "art_11", par: 2)
|
||||||
|
|
||||||
|
// Highlight third part of second paragraph
|
||||||
|
#ff.cite-law("CP", "art_11", highlight: (1, 2))
|
||||||
Reference in New Issue
Block a user