Debian Codegraph @

texmf-dist/doc/latex/regulatory/regulatory.tex

raw
1 %% regulatory.tex
2 %% Copyright 2024 E. Nijenhuis
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either version 1.3c
6 % of this license or (at your option) any later version.
7 % The latest version of this license is in
8 % http://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions of LaTeX
10 % version 2005/12/01 or later.
11 %
12 % This work has the LPPL maintenance status ‘maintained’.
13 %
14 % The Current Maintainer of this work is E. Nijenhuis.
15 %
16 % This work consists of the files regulatory.tex,
17 % regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex,
18 % example1.bib, example2.bib,
19 % example1-nl.tex, example2-nl.tex,
20 % example1-en.tex, example2-en.tex,
21 % md-example.tex, example.md,
22 % regulatory.sty
23 \translation{%
24 \title{Package \package{regulatory}\thanks{This document corresponds to \textsf{regulatory}~\packageversion, written on \packagedate.}}
25 }{%
26 \title{Het \package{regulatory} pakket\thanks{Dit document correspondeert aan \textsf{regulatory}~\packageversion, geschreven op \packagedate.}}%
27 }
28 \author{Erik Nijenhuis\\
29 \href{mailto:[email protected]}{[email protected]}}
30 \date{\packagedate}
31 \maketitle
32 \begin{abstract}
33 % Structuur %
34 \translation{%
35 The \package{regulatory} package is well-suited for legal professionals in a broad sense. This package encompasses common structures, such as articles, sections, parts, and definitions.%
36 }{%
37 Het \package{regulatory} pakket leent zich uitstekend voor juristen in brede zin.
38 Dit pakket brengt veel voorkomende structuren, zoals artikelen, leden, onderdelen en definities.%
39 }
40
41 % Verwijzen %
42 \translation{%
43 Referring within the legal domain can be a significant challenge; therefore, this package provides an elegant way of referencing, as one would expect with standard \LaTeX{} macros, such as for a chapter using \cmd{\section}, namely through labeling. For this purpose, the \package{regulatory} package introduces its own \cmd{\rref}, \cmd{\nref}, and \cmd{\aref} macro families that provide default support for both Dutch and English.%
44 }{%
45 Verwijzen binnen het juridisch domein kan een grote uitdaging zijn, daarom biedt dit pakket een elegante manier van verwijzen, zoals men mag verwachten bij standaard \LaTeX{} macro's, zoals voor een hoofdstuk \cmd{\section}, namelijk door middel van labelen.
46 Hiervoor introduceert pakket \package{regulatory} zijn eigen \cmd{\rref}, \cmd{\nref} en \cmd{\aref} macrofamilies die standaard ondersteuning bieden voor Nederlands en Engels.%
47 }
48
49 % Definities %
50 \translation{%
51 Managing definitions uniformly across all documents can be achieved using \package{BibTeX}.
52 When it comes to referencing definitions, the \package{regulatory} package aligns with the existing \cmd{\gls} macro family of the \package{glossaries} package.%
53 }{%
54 Het beheren van definities kan eenduidig voor alle documenten met behulp van \package{BibTeX}.
55 Voor het verwijzen naar definities speelt het \package{regulatory} pakket in op de al bestaande \cmd{\gls} macrofamilie van \package{glossaries}.%
56 }
57 % Externe Documenten %
58 \translation{%
59 Referencing articles, sections, parts, and definitions is not limited to within a single document but can also be done from other documents written using the \package{regulatory} package.
60 This makes cross-referencing between documents straightforward. Consider, for example, Terms and Conditions and a Maintenance Agreement that refer to each other's articles or use each other's terms.
61 It is even possible to attach the Terms and Conditions as an appendix to the PDF file for completeness.%
62 }{%
63 Het verwijzen naar artikelen, leden, onderdelen en definities beperkt zich niet alleen tot één document, maar zijn ook aan te halen vanuit andere documenten geschreven met het \package{regulatory} pakket.
64 Op deze manier blijft het eenvoudig verwijzen voor documenten onderling.
65 Denk b\ij{}voorbeeld aan Algemene Voorwaarden en een Onderhoudsovereenkomst die naar elkaars artikelen verwijzen of elkaars begrippen gebruiken.
66 Het is zelfs mogelijk om bij documenten de Algemene Voorwaarden als bijlage in het PDF-bestand te voegen voor de volledigheid.%
67 }
68 \end{abstract}
69
70 \clearpage
71 \tableofcontents
72 \clearpage
73
74
75 \section{\translation{Usage}{Gebruik}}
76 \translation{%
77 The \package{regulatory} package is explicitly designed for generating PDF documents with \LaTeX{}.
78 Therefore, use either \texttt{pdflatex} or \texttt{lualatex}.%
79 }{%
80 Het pakket \package{regulatory} is uitdrukkelijk bedoeld voor het genereren van PDF-documenten met \LaTeX{}.
81 Gebruik daarom \texttt{pdflatex} of \texttt{lualatex}.%
82 }
83 \begin{lstlisting}[style=tex,caption={main.tex},label=code:simple]
84 \documentclass[dutch]{article}
85 \usepackage{regulatory}
86 \begin{document}
87 \article{...}
88 \end{document}
89 \end{lstlisting}
90 \translation{%
91 The example does not use any options. This means that \option{bib2gls} is active.
92 To switch back to TeX code for definition lists, the option \oarg{nobibdefs} is available.
93 Additionally, there are options such as \oarg{md,alldefs,hidelinks,nameinlink}.
94 Where \option{md} activates Markdown support, \option{alldefs} lists all definitions instead of only the used definitions within the same document (useful for Terms and Conditions where not all definitions necessarily appear), \option{hidelinks} hides all colored borders of hyperlinks, and \option{nameinlink} places the hyperlink around the label.%
95 }{%
96 Het voorbeeld gebruikt geen opties.
97 Dit houdt in dat \option{bib2gls} actief is.
98 Om terug te schakelen naar TeX code voor definitielijsten is er de optie \oarg{nobibdefs}.
99 Verder zijn er nog de opties \oarg{md,alldefs,hidelinks,nameinlink}.
100 Waar \option{md} Markdown support activeert, \option{alldefs} alle definities opsomt in plaats van alleen de gebruikte definities binnen hetzelfde document (handig voor Algemene Voorwaarden waarin niet alle definities per se voorkomen), \option{hidelinks} alle gekleurde kaders van hyperlinks verbergt en \option{nameinlink} de hyperlink om het label heen plaatst.%
101 }\\
102
103 \noindent
104 \translation{%
105 The example of \zcref{code:simple} can be generated to PDF as follows:%
106 }{%
107 Het voorbeeld van \zcref{code:simple} kan als volgt gegenereerd worden naar PDF:%
108 }
109 \begin{lstlisting}[style=bash,caption={\translation{Commandline examples}{Commandline voorbeelden}}]
110 pdflatex main
111 # Or
112 lualatex main
113 # Or keep generating
114 latexmk -pvc -lualatex -interaction=nonstopmode main
115 \end{lstlisting}
116
117 \noindent
118 \translation{%
119 Suppose definition lists are used; in that case, additional steps are added to the generation process, e.g:%
120 }{%
121 Stel er worden definitie lijsten gebruikt, dan komen er nog extra stappen bij in het generatieproces, namelijk:%
122 }
123 \begin{lstlisting}[style=Bash,caption={\translation{Commandline with definitions}{Commandline met definities}}]
124 lualatex main
125 bib2gls main
126 lualatex main
127 lualatex main
128 # Or for bibtex
129 lualatex main
130 makeglossaries main
131 lualatex main
132 lualatex main
133 \end{lstlisting}
134 \translation{%
135 In case \texttt{latexmk} is used, the command \texttt{bib2gls} or \texttt{makeglossaries} can be executed in a separate terminal. LatexMK automatically detects file changes and regenerates the document accordingly.%
136 }{%
137 In het geval gebruik gemaakt wordt van \texttt{latexmk}, dan kan er in een aparte terminal het commando \texttt{bib2gls} of \texttt{makeglossaries} gebruikt worden.
138 LatexMK ziet vanzelf de bestanden wijzigen en genereert dan het document opnieuw.%
139 }
140
141 \clearpage
142
143
144 \section{\translation{Structure}{Structuur}}\label{sec:struct}
145 \translation{%
146 This package provides familiar structures without breaking the existing functionalities of \LaTeX{}.%
147 }{%
148 Dit pakket levert bekende structuren, zonder de bestaande functionaliteiten van \LaTeX{} te breken.%
149 }
150 \DescribeMacro{\article}
151 \DescribeMacro{\para}
152 \translation{%
153 For example, consider \cmd{\article}\marg{title} and \cmd{\para}\marg{title}.
154 These are defined as separate macros and formatted using \package{titlesec}.%
155 }{%
156 Neem b\ij{}voorbeeld \cmd{\article}\marg{title} en \cmd{\para}\marg{title}.
157 Deze zijn als aparte macro's gedefinieerd en opgemaakt met behulp van \package{titlesec}.%
158 }\\
159
160 \noindent
161 \DescribeEnv{paras}
162 \translation{%
163 For the \option{paras}\footnote{%
164 Originally the naming was taken from Dutch ``artikel, lid en onderdeel'', which was hard to introduce in English, due to ambiguity reasons.%
165 Therefore, section and part are aliased to paras.%
166 } and ``subparagraphs'', a new environment has been created using \package{enumitem}.
167 The labels for the members have been adjusted to
168 }{%
169 Voor de \option{paras} en ``onderdelen'' is een nieuwe environment aangemaakt met behulp van \package{enumitem}.
170 De labels van de leden zijn aangepast naar
171 }\lstinline[style=tex]|\thearticle.\arabic*|\translation{
172 for paragraphs and
173 }{, voor leden en,
174 }\lstinline[style=tex]|\abalphnum{\arabic*)|\translation{
175 for subparagraphs.%
176 }{, voor onderdelen.}
177 \translation{%
178 For ``subparagraphs'', \cmd{\abalpnum} from the \package{fmtcount}\footnote{%
179 The Dutch language definition is now included into package \href{https://github.com/Xerdi/fmtcount}{\package{fmtcount}} itself.
180 Be sure to update the package if \texttt{fc-dutch.def} is missing} package is used to enumerate multiple subparagraphs.
181 Suppose \cmd{\alph} were used; in that case, \option{paras} (second level) would be limited to 26 subparagraphs.
182 With \cmd{\abalphnum}, for example, with a value of 125, the result is `\texttt{du}'.
183 }{%
184 Voor onderdelen wordt er gebruik gemaakt van \cmd{\abalpnum} uit pakket \package{fmtcount}\footnote{%
185 De Nederlandse taal definitie is nu inbegrepen in pakket \href{https://github.com/Xerdi/fmtcount}{\package{fmtcount}} zelf.
186 Zorg ervoor dat het pakket up to date is als \texttt{fc-dutch.def} mist.} om meerdere onderdelen te kunnen opsommen.
187 Stel er zou gebruik gemaakt worden van \cmd{\alph}, dan is \option{paras} beperkt tot 26 onderdelen.
188 Bij \cmd{\abalphnum} met b\ij{}voorbeeld een waarde van 125 is `\texttt{du}' de uitkomst.
189 }
190
191 \begin{lstlisting}[style=tex]
192 \article{Voorbeeld}
193 \begin{paras}
194 \item \textfill
195 \begin{paras}
196 \item \textfill
197 \end{paras}
198 \item \textfill
199 \end{paras}
200
201 \article{Voorbeeld2}
202 \textfill
203
204 \para{Voorbeeld3}
205 \textfill
206 \end{lstlisting}
207 \translation
208 {See \zcref{code:example1,code:example2} for more \LaTeX{} examples.}
209 {Zie \zcref{code:example1,code:example2} voor meer \LaTeX{} voorbeelden.}
210
211 \subsection{Markdown}
212 \translation{%
213 With the package option \option{md}, this package ensures that all these structures are handled.
214 However, this means that no chapters or other standard components can be typed.
215 Instead, the writer is specifically limited to the components described in this chapter.
216 Refer to \zcref{code:example-md} for a Markdown example, and check \zcref{code:md-example} to see how such a Markdown source can ultimately be used from within \LaTeX{}.
217 }{%
218 Met de pakketoptie \option{md} zorgt dit pakket ervoor dat al deze structuren gehanteerd worden.
219 Dit betekend echter wel dat er geen hoofdstukken of andere standaard onderdelen meer getypt kunnen worden.
220 In plaats daarvan is de schrijver juist beperkt tot de onderdelen omschreven in dit hoofdstuk.
221 Kijk naar \zcref{code:example-md} voor een markdown voorbeeld en naar \zcref{code:md-example} hoe zo'n Markdown bron uiteindelijk kan gebruikt worden vanuit \LaTeX{}.
222 }
223 \clearpage
224
225
226 \section{\translation{Definitions}{Definities}}
227 \translation{%
228 For referencing definitions, \package{glossaries-extra} is used.
229 This allows referencing with the \cmd{\gls}\marg{label} macro family.%
230 }{%
231 Voor het verwijzen naar definities wordt gebruik gemaakt van \package{glossaries-extra}.
232 Dit zorgt ervoor dat er met de \cmd{\gls}\marg{label} macrofamilie kan worden verwezen.%
233 }\\
234
235 \noindent
236 \DescribeEnv{definitions}
237 \DescribeEnv{externals}
238 \translation{%
239 To prevent conflicts between terms, abbreviations, and definitions, this package adds two \texttt{glossary} types.
240 Definitions within the same file are placed under the type \option{definitions}, while definitions from other documents are placed under \option{externals} (see \zcref{sec:extern}).%
241 }{%
242 Om conflicten tussen begrippen, afkortingen en definities te voorkomen voegt dit pakket twee \texttt{glossary} types toe.
243 Voor definities binnen hetzelfde bestand worden ze ingedeeld onder het type \option{definitions}, terwijl definities van andere documenten worden ingedeeld onder \option{externals} (zie \zcref{sec:extern}).%
244 }\\
245
246 \noindent
247 \DescribeMacro{\printdefs}
248 \translation{%
249 To list definitions, various macros have been added.
250 The most straightforward one, \cmd{\printdefs}\marg{width of text}, enumerates the definitions with a customized style.
251 The argument \marg{width of text} is provided for the alignment of definition labels and descriptions.%
252 }{%
253 Om definities in te laden zijn er twee macro's gedefinieerd.
254 De \cmd{\loadglsdefs}\marg{src} macro voegt BibTeX bibliotheken toe onder het type \option{definitions} en heeft als categorie \option{definitions}.
255 Gebruikte definities in deze bibliotheken zullen opgesomd worden wanneer \cmd{\printdefs} wordt aangeroepen.
256 Indien de optie \option{alldefs} bij het pakket is meegegeven, dan zullen alle definities in die bibliotheken opgesomd worden.
257 De opsomming wordt gesorteerd aan de hand van het Nederlandse woordenboek.
258 Woorden die niet voorkomen daarin zullen als eerste opgesomd worden.%
259 }\\
260
261 \noindent
262 \DescribeMacro{\describe}
263 \translation{%
264 To achieve the same result with \cmd{\describe}\marg{label}, it is first necessary to invoke \cmd{\glssetwidest}, for example, in Markdown (see \zcref{code:example-md}).
265 The \cmd{\describe} macro is well-suited for manually placing definition descriptions.
266 This macro adds an anchor point, required for functional hyperlinks.%
267 }{%
268 Om hetzelfde resultaat te behalen met \cmd{\describe}\marg{label} is het eerst nodig om \cmd{\glssetwidest} aan te roepen in b\ij{}voorbeeld Markdown (zie \zcref{code:example-md}).
269 De macro \cmd{\describe} leent zich uitstekend om handmatig definitie beschrijvingen te plaatsen.
270 Deze macro voegt namelijk een ankerpunt toe, vereist voor werkende hyperlinks.%
271 }\\
272
273 \noindent
274 \DescribeMacro{\loadglsdefs}
275 \translation{%
276 To load definitions, two macros are defined. The \cmd{\loadglsdefs}\marg{src} macro adds BibTeX libraries under the type \option{definitions} and has the category \option{definitions}.
277 Definitions used in these libraries will be listed when \cmd{\printdefs} is called.
278 If the package is given the \option{alldefs} option, then all definitions in those libraries will be listed.
279 The listing is sorted according to the Dutch dictionary.
280 Words not found in it are listed first.%
281 }{%
282 Om definities in te laden zijn er twee macro's gedefinieerd.
283 De \cmd{\loadglsdefs}\marg{src} macro voegt BibTeX bibliotheken toe onder het type \option{definitions} en heeft als categorie \option{definitions}.
284 Gebruikte definities in deze bibliotheken zullen opgesomd worden wanneer \cmd{\printdefs} wordt aangeroepen.
285 Als bij het pakket de optie \option{alldefs} is meegegeven, dan zullen alle definities in die bibliotheken opgesomd worden.
286 De opsomming wordt gesorteerd aan de hand van het Nederlandse woordenboek.
287 Woorden die niet voorkomen daarin worden als eerste opgesomd.%
288 }\\
289
290 \noindent
291 \DescribeMacro{\loadextdefs}
292 \translation{%
293 For \cmd{\loadextdefs}\oarg{category}\marg{src}, it can be useful to provide a category so that definitions from different sources can be distinguished.
294 However, it is unwise to call this macro directly since \cmd{\masterdocument} is already smartly handling it.
295 }{%
296 Voor \cmd{\loadextdefs}\oarg{category}\marg{src} kan het handig zijn om een categorie mee te geven, zodat definities van verschillende bronnen uit elkaar gehouden kunnen worden.
297 Het is echter niet aan te raden deze direct aan te roepen, aangezien \cmd{\masterdocument} hier al slim op in speelt.
298 }
299 \clearpage
300
301
302 \section{\translation{References}{Verwijzingen}}
303 \translation{%
304 For referencing articles, members, and parts, \package{zref} is used behind the scenes.
305 All components mentioned in \zcref{sec:struct} are configured for this purpose.
306 However, \package{zref} does not provide as many formatting adjustments as \package{cleveref}.
307 }{%
308 Voor het verwijzen naar artikelen, leden en onderdelen wordt onder water gebruik gemaakt van \package{zref}.
309 Alle onderdelen genoemd in \zcref{sec:struct} zijn hiervoor ingesteld, echter biedt \package{zref} niet zoveel formaat aanpassingen als \package{cleveref}.
310 }
311
312 \DescribeMacro{\rref}
313 \DescribeMacro{\Rref}
314 \translation{%
315 Due to this limitation, it was decided to develop entirely new variants, including \cmd{\rref}\marg{label}.
316 With \cmd{\rref}, one can refer to articles just as is customary for \cmd{\section}, \cmd{\subsection}, and so on.
317 The \cmd{\rref} family consists of a total of four different macros:%
318 }{%
319 Door deze beperking is er voor gekozen om geheel nieuwe varianten te ontwikkelen, waaronder \cmd{\rref}\marg{label}.
320 Er kan dus met \cmd{\rref} verwezen worden naar artikelen net als gebruikelijk is voor \cmd{\section}, \cmd{\subsection}, en dergelijke.
321 De \cmd{\rref} familie kent in totaal vier verschillende macro's:%
322 }
323 \begin{labeling}{\textbackslash{}Rref*\quad}
324 \cmditem{rref} \translation
325 {Starting with a lowercase letter and with a hyperlink.}
326 {Beginnend met een kleine letter en met hyperlink.}\\
327 \begin{tabularx}{\linewidth}{@{}X X X@{}}
328 \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\
329 \rref{ex1-art:lorem} & \rref{ex1-lid:lorem} & \rref{ex1-sub:lorem} \\
330 \end{tabularx}
331 \cmditem{rref*} \translation
332 {Starting with a lowercase letter and without a hyperlink.}
333 {Beginnend met een kleine letter en zonder hyperlink.}\\
334 \begin{tabularx}{\linewidth}{@{}X X X@{}}
335 \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\
336 \rref*{ex1-art:lorem} & \rref*{ex1-lid:lorem} & \rref*{ex1-sub:lorem} \\
337 \end{tabularx}
338 \cmditem{Rref} \translation
339 {Starting with an uppercase letter and with a hyperlink.}
340 {Beginnend met een hoofdletter en met hyperlink.}\\
341 \begin{tabularx}{\linewidth}{@{}X X X@{}}
342 \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\
343 \Rref{ex1-art:lorem} & \Rref{ex1-lid:lorem} & \Rref{ex1-sub:lorem} \\
344 \end{tabularx}
345 \cmditem{Rref*} \translation
346 {Starting with an uppercase letter and without a hyperlink.}
347 {Beginnend met een hoofdletter en zonder hyperlink.}\\
348 \begin{tabularx}{\linewidth}{@{}X X X@{}}
349 \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\
350 \Rref*{ex1-art:lorem} & \Rref*{ex1-lid:lorem} & \Rref*{ex1-sub:lorem} \\
351 \end{tabularx}
352 \end{labeling}
353 \translation{%
354 In the examples above, a notable difference is already apparent in the alternative \cmd{\zref}, namely the presentation of the reference number/letter/word and a distinct type in the title.
355 For instance, for \texttt{ex1-lid:lorem}, the title is '2.1,' and it is referenced as '(1)'.%
356 }{%
357 In de voorbeelden hierboven is al een opmerkelijk verschil te zien tussen alternatief \cmd{\zref}, namelijk de presentatie van de/het verwijsnummer/letter/woord en een afwijkend type in de titel.
358 B\ij{}voorbeeld voor \texttt{ex1-lid:lorem} is de titel `2.1' en wordt aangehaald met `eerste'.%
359 }\\
360
361 \noindent
362 \DescribeMacro{\nref}
363 \DescribeMacro{\Nref}
364 \translation{%
365 To reference with the corresponding designation, the macro family \cmd{\nref}\marg{label} has been developed.
366 This family, like \cmd{\rref}, has four variants.
367 In the following example, for simplicity, we'll only consider \cmd{\Nref}.%
368 }{%
369 Om te verwijzen met de bijbehorende benaming is er de macrofamilie \cmd{\nref}\marg{label} ontwikkeld.
370 Deze familie heeft net als \cmd{\rref} vier varianten.
371 In het volgende voorbeeld gaan we voor het gemak alleen uit van \cmd{\Nref}.%
372 }\\
373
374 \noindent
375 \begin{tabularx}{\linewidth}{@{}p{\widthof{EN}} X X X@{}}
376 & \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\
377 \translation{EN}{NL} & \Nref{ex1-art:lorem} & \Nref{ex1-lid:lorem} & \Nref{ex1-sub:lorem} \\
378 \end{tabularx}\translation{\selectlanguage{dutch}}{\selectlanguage{english}}\\
379 \begin{tabularx}{\linewidth}{@{}p{\widthof{EN}} X X X@{}}
380 \translation{NL}{EN} & \Nref{ex1-art:lorem} & \Nref{ex1-lid:lorem} & \Nref{ex1-sub:lorem}\\
381 \end{tabularx}\translation{\selectlanguage{english}}{\selectlanguage{dutch}}\\
382
383 \noindent
384 \translation{%
385 A notable difference with the alternative \cmd{\zcref} is that \cmd{\nref} can take into account the position of the designation.
386 For example, consider the outcome for the subparagraph (\meta{written ordinal} \meta{designation}).%
387 }{%
388 Een opmerkelijk verschil tussen het alternatief \cmd{\zcref} is dat \cmd{\nref} rekening kan houden met de positie van de benaming.
389 Kijk bijvoorbeeld naar de uitkomst van het lid (\meta{geschreven ordinaal} \meta{benoeming}).%
390 }\\
391
392 \noindent
393 \translation{%
394 With the macro families \cmd{\rref} and \cmd{\nref}, a lot is already possible; however, there are still many other factors to consider when it comes to referencing.
395 For example, the \cmd{\nref} macro already includes the correct designation, but when referring to a member, the corresponding article is not mentioned.%
396 }{%
397 Met de macrofamilies \cmd{\rref} en \cmd{\nref} is er dus al veel mogelijk, echter zijn er nog veel andere factoren die meespelen als het gaat om verwijzen.
398 Macro \cmd{\nref} doet bijvoorbeeld wel al de juiste benaming erbij, maar bij het verwijzen naar een lid wordt er geen bijbehorend artikel genoemd.%
399 }
400 \DescribeMacro{\aref}
401 \DescribeMacro{\Aref}
402 \translation{%
403 For complete and automatic references, the \cmd{\aref}\marg{labels...} has been developed.
404 This macro family records all components of the reference.
405 Additionally, \cmd{\aref} accepts multiple labels and connects them in the correct way.
406 This can result in a list enumeration, such as \aref{ex1-sub:lorem,ex1-sub:lorem3,ex1-sub:lorem4}, or a range, like \aref{ex1-sub:lorem,ex1-sub:lorem2,ex1-sub:lorem3,ex1-sub:lorem4}.
407 However, there is one limitation: the \option{nameinlink} option cannot be applied when multiple labels are provided. This limitation does not apply when only one label is given.
408 Another additional feature is that these references are easily translatable into Dutch:%
409 }{%
410 Voor volledige en automatische verwijzingen is de \cmd{\aref}\marg{labels...} ontwikkeld.
411 Deze macrofamilie noteert dus alle onderdelen van de verwijzing.
412 Daarnaast accepteert \cmd{\aref} meerdere labels en koppelt het de labels op de juiste manier.
413 Dit kan een lijst opsomming geven, zoals \aref{ex1-sub:lorem,ex1-sub:lorem3,ex1-sub:lorem4}, of een reeks, zoals \aref{ex1-sub:lorem,ex1-sub:lorem2,ex1-sub:lorem3,ex1-sub:lorem4}.
414 Hierop is alleen één tekortkoming, namelijk, de optie \option{nameinlink} kan niet toegepast worden wanneer er meerdere labels meegegeven worden.
415 Deze tekortkoming geldt niet wanneer er één label wordt meegegeven.
416 Een andere bijkomstigheid is dat deze verwijzingen gemakkelijk te vertalen zijn naar het Engels:%
417 }\\
418 \begin{lstlisting}[style=tex]
419 \selectlanguage{dutch} / \selectlanguage{english}
420 Zie / See \aref{ex1-sub:lorem,ex1-sub:lorem3,ex1-sub:lorem4}
421 en / and \aref{ex1-sub:lorem,ex1-sub:lorem2,ex1-sub:lorem3,ex1-sub:lorem4}.
422 \end{lstlisting}%
423 \translation{\selectlanguage{dutch}}{\selectlanguage{english}}~\\
424 \vspace*{-4em}
425 \begin{center}
426 \large
427 \translation{Zie}{See} \aref{ex1-sub:lorem,ex1-sub:lorem3,ex1-sub:lorem4}
428 \translation{en}{and} \aref{ex1-sub:lorem,ex1-sub:lorem2,ex1-sub:lorem3,ex1-sub:lorem4}.
429 \end{center}
430 \translation{\selectlanguage{english}}{\selectlanguage{dutch}}
431 \translation{The only limitation that arises is that the reference name for the document isn't translated.
432 }{De enige beperking die optreedt is dat de verwijsnaam voor het document niet vertaald is.}
433
434 \subsection{\translation{Conjunction}{Conjunctie}}
435 \DescribeMacro{\setmiddleconjunction\\\marg{format}}
436 \DescribeMacro{\setlastconjunction}
437 \DescribeMacro{\setrangeconjunction}
438 \DescribeMacro{\setconjunction\\\marg{middle}\\\marg{last}\\\marg{range}\\}
439 \translation{%
440 The linking of labels is done through \package{zref}.
441 However, thanks to the reimplementation, other macros have been written in a similar way as \package{cleveref} does, i.e:%
442 }{%
443 Het koppelen van de labels gebeurt via \package{zref}.
444 Er zijn echter dankzij de herimplementatie andere macro's geschreven op een vergelijkbare manier als \package{cleveref} dat doet, namelijk:%
445 }
446 \begin{lstlisting}[style=tex]
447 \setmiddleconjunction}{, }
448 \setlastconjunction}{ \GetTranslation{and} }
449 \setrangeconjunction}{ \GetTranslation{to} }
450 \setconjunction{, }{ \GetTranslation{and} }{ \GetTranslation{to} }
451 \end{lstlisting}
452 \DescribeMacro{\setjuncto}
453 \DescribeMacro{\unsetjuncto}
454 \translation{%
455 There are also macros to easily switch to legacy notation.
456 With \cmd{\setjuncto}, one can switch throughout the document to the conjunction word `\texttt{ jo.\textbackslash\ }'.
457 Using \cmd{\unsetjuncto} restores \cmd{\lastconjunction} back to `\texttt{ and }'.
458 If manual changes have been made to the conjunctions earlier, those changes will be overridden by one of these macros.
459 In that case, use \cmd{\setlastconjunction}\marg{value} instead of \cmd{\unsetjuncto}.
460 }{%
461 Er zijn ook macro's om gemakkelijk naar verouderde notatie te schakelen.
462 Met \cmd{\setjuncto} kan er willekeurig in het document omgeschakeld worden naar het koppelwoord `\texttt{ jo.\textbackslash\ }'.
463 Door \cmd{\unsetjuncto} te gebruiken wordt \cmd{\lastconjunction} weer terug gezet naar `\texttt{ en }'.
464 Als eerder handmatig de koppelingen zijn veranderd, dan zijn die wijzigingen door één van deze macro's overschreven.
465 Gebruik dan in plaats van \cmd{\unsetjuncto} \cmd{\setlastconjunction}\marg{waarde}.
466 }
467 \clearpage
468
469
470 \section{\translation{Interdocument References}{Interdocumentaire Verwijzingen}}\label{sec:extern}
471 \translation{Referencing Other Documents Generated with the \package{regulatory} Package is Quite Simple.}{Verwijzen naar andere documenten gegenereerd met het \package{regulatory} pakket kan vrij eenvoudig.}
472 \DescribeMacro{\refdocument\\\oarg{prefix}\\\marg{name}\\\marg{opts...}}
473 \translation{%
474 After specifying \cmd{\refdocument} in the preamble, it is possible to refer to articles, paragraphs, and subparagraphs.
475 The macro family \cmd{\aref} continues to work seamlessly, thanks to \cmd{\zexternaldocument} from \package{zref-xr}.
476 To avoid ambiguity, a special \option{prefix} can be added.
477 If a \option{prefix} is omitted, a default \option{prefix} is still applied, namely \texttt{ext-}.
478 For instance, label \texttt{lid:lorem} becomes \texttt{ext-lid:lorem}.
479 Note that the \option{prefix} does not apply when referring to definitions with \cmd{\gls}.%
480 }{%
481 Na het opgeven van \cmd{\refdocument} in de preamble kan er naar artikelen, leden en onderdelen verwezen worden.
482 De macro familie \cmd{\aref} blijft dankzij \cmd{\zexternaldocument} van \package{zref-xr} nog steeds werken.
483 Om ambiguïteit te voorkomen kan er een speciale \option{prefix} toegevoegd worden.
484 Bij het weglaten van een \option{prefix} is er alsnog een \option{prefix}, namelijk \texttt{ext-}.
485 Label \texttt{lid:lorem} wordt dan \texttt{ext-lid:lorem}.
486 Let wel dat de \option{prefix} niet geldt voor het verwijzen naar definities met \cmd{\gls}.%
487 }\\
488
489 \noindent
490 \DescribeMacro{\masterdocument\\\oarg{prefix}\\\marg{name}\\\marg{opts...}\\}
491 \translation{%
492 To create a complete link with other \package{regulatory} documents, the \cmd{\masterdocument} macro is used.
493 A complete link involves:%
494 }{%
495 Om een volledige koppeling te maken met andere \package{regulatory} documenten wordt de \cmd{\masterdocument} macro gebruikt.
496 Een volledige koppeling houdt in:%
497 }
498 \begin{enumerate}
499 \item \translation{referring with the \cmd{\aref} family}{verwijzen met de \cmd{\aref} familie};
500 \item \translation{referencing definitions with the \cmd{\gls} family}{verwijzen naar definities met de \cmd{\gls} familie};
501 \item \translation{referring to the associated document}{verwijzen naar het bijbehorende document};
502 \item \translation{a footnote with the document attached as an appendix to the first occurrence of a reference or definition}{een voetnoot met het document als bijlage bij de eerste verschijning van een verwijzing of definitie}.
503 \end{enumerate}
504 \translation{%
505 It's even possible for a document to have multiple 'master' documents, as is the case with this document (in Dutch):%
506 }{%
507 Het kan zelfs dat een document meerdere `master' documenten heeft, zoals dit document:%
508 }
509 \begin{lstlisting}[style=tex]
510 \newcommand\definitionlabel[1]{~(zie #1)}
511 \masterdocument[ex1-]{example1}{
512 defs=example1,
513 author=E. Nijenhuis,
514 subject= Voorbeeld Één,
515 description = Het éérste voorbeeld document,
516 ref label=van Voorbeeld Één,
517 def label=\definitionlabel
518 }
519
520 \masterdocument[ex2-]{example2}{
521 defs=example2,
522 author=E. Nijenhuis,
523 subject= Voorbeeld Twee,
524 description = Het tweede voorbeeld document,
525 ref label=van Voorbeeld Twee,
526 def label=\definitionlabel
527 }
528 \end{lstlisting}
529
530 \translation{%
531 Both macros \cmd{\refdocument} and \cmd{\masterdocument} have, as a third argument, a choice among the following options:
532 }{%
533 Beide macro's \cmd{\refdocument} en \cmd{\masterdocument} hebben als derde argument keuze uit de volgende opties:%
534 }
535 \begin{labeling}{\texttt{footnote label}}
536 \addtokomafont{labelinglabel}{\ttfamily}
537 \item[name] \translation{%
538 by default, the same as the first argument of the macros.%
539 }{%
540 standaard hetzelfde als het eerste argument van de macro's.%
541 }
542 \item[filename] \translation{%
543 by default, the first argument concatenated with \texttt{.pdf}.
544 This option can be overridden if the name does not correspond to the filename.%
545 }{%
546 standaard het eerste argument met \texttt{.pdf} geconcateneerd.
547 Deze optie kan overschreven worden wanneer de naam niet correspondeerd met de bestandsnaam.%
548 }
549 \item[ref label] \translation{%
550 by default, this macro has no value, and in that case, the following default value is used in \cmd{\documentlabel}:%
551 }{%
552 standaard heeft deze macro geen waarde en in dat geval wordt er in \cmd{\documentlabel} de volgende standaard waarde gebruikt:%
553 } \lstinline|\GetTranslation{of the} \artifactsubject{#1}|.
554 \translation{%
555 This macro receives the \texttt{name} of the document as an argument.%
556 }{%
557 Deze macro krijgt als argument de \texttt{name} van het document.%
558 }
559 \item[def label] \translation{%
560 by default, this macro has the following value:%
561 }{%
562 standaard heeft deze macro de volgende waarde:%
563 } \lstinline|~(\GetTranslation{see} #1)|.
564 \translation{%
565 The argument contains the \texttt{subject} with a possible footnote (depending on \texttt{referred}).%
566 }{%
567 Het argument bevat de \texttt{subject} met eventueel de footnote (afhankelijk van \texttt{referred}).%
568 }
569 \item[footnote] \translation{%
570 by default, the value is \texttt{true}, so that footnotes are added at the first occurrence.
571 This can be set to \texttt{false} to prevent this.%
572 }{%
573 standaard is de waarde \texttt{true}, zodat er voetnoten geplaatst worden bij de eerste verschijning.
574 Deze kan naar \texttt{false} gezet worden om dit te voorkomen.%
575 }
576 \item[footnote label] \translation{%
577 This macro receives the attached document with \texttt{subject} as its representation in the text.
578 By default, this macro only prints the first argument.%
579 }{%
580 deze macro krijgt als argument het bijgevoegde document met \texttt{subject} als weergave in de tekst.
581 Standaard print deze macro enkel het eerste argument.%
582 }
583 \item[url] \translation{%
584 this option is yet to be implemented.
585 The purpose of this option is to indicate the source of the document in the footnote.%
586 }{%
587 deze optie wordt is nog niet geïmplementeerd.
588 De bedoeling van deze optie is om in de voetnoot de vindplaats van het document te duiden.%
589 }
590 \item[referred] \translation{%
591 This option is for internal use.
592 \cmd{\documentfootnote} sets this value to \texttt{true}.%
593 }{%
594 deze optie is voor intern gebruik.
595 \cmd{\documentfootnote} zet deze waarde naar \texttt{true}.%
596 }
597 \item[defs] \translation{%
598 This option is used to load external definition lists under this document.
599 This way, the correct source can be mentioned for first occurrences of definitions.%
600 }{%
601 deze optie wordt gebruikt om externe definitielijsten in te laden onder dit document.
602 Op deze manier kan bij eerste verschijningen van definities de juiste bron vermeldt worden.%
603 }
604 \item[author] \translation{%
605 This option is used in \cmd{\documentattachment} for metadata purposes in some PDF viewing applications.%
606 }{%
607 deze optie wordt in \cmd{\documentattachment} gebruikt voor metadata t.b.v.\ sommige PDF-weergave applicaties.%
608 }
609 \item[subject] \translation{%
610 This option is used, like \texttt{author}, in the appendix.%
611 }{%
612 deze optie wordt net als \texttt{author} gebruikt in de bijlage.%
613 }
614 \item[description] \translation{%
615 This option is used, like \texttt{author}, in the appendix.%
616 }{%
617 deze optie wordt net als \texttt{author} gebruikt in de bijlage.%
618 }
619 \end{labeling}
620
621 \noindent
622 \DescribeMacro{\documentlabel\\\marg{label}}
623 \DescribeMacro{\documentfootnote\\\oarg{link text}\\\marg{label}}
624 \DescribeMacro{\documentattachment\\\marg{label}\\\marg{link text}}
625 \translation{%
626 For both references to definitions and articles, etc., the source is mentioned, and at the first appearance, a footnote is placed with an appendix of the document.
627 Behind the scenes, \cmd{\documentlabel}\footnote{This macro uses the label of references and not definitions.}, \cmd{\documentfootnote}, and \cmd{\documentattachment} are invoked for articles, etc., and definitions.%
628 }{%
629 Voor zowel verwijzingen naar definities als artikelen e.d.\ wordt de bron vermeldt en wordt er bij de eerste verschijning een voetnoot geplaatst met een bijlage van het exemplaar.
630 Onder water worden \cmd{\documentlabel}\footnote{Deze macro gebruikt het label van verwijzingen en dus niet van definities.} \cmd{\documentfootnote} en \cmd{\documentattachment} aangeroepen voor artikelen e.d.\ en definities.%
631 }\\
632
633 \noindent
634 \translation{These macros can be called manually.}{Deze macro's kunnen ook handmatig uitgevoerd worden.}
635 \translation{For example,}{Neem b\ij{}voorbeeld} \lstinline[style=tex]|\documentfootnote{example2}| \translation{, which results in}{wat zou leiden tot}:
636 `\documentfootnote{example2-\translation{en}{nl}}'.
637
638 \clearpage
639
640
641 \section{\translation{Language Support}{Taalondersteuning}}
642 \translation{%
643 Initially, this package only provided support for Dutch.
644 When English was implemented, certain macros were added to facilitate easy switching between languages.
645 The notation of references in English and Dutch differs to an extent that setting the language can be quite complex, but this may make it adjustable for other languages as well.%
646 }{%
647 In beginsel bood dit pakket alleen ondersteuning voor Nederlands.
648 Toen Engels geïmplementeerd werd zijn er bepaalde macro's bij gekomen, zodat er makkelijk geschakeld kan worden tussen talen.
649 De notatie van verwijzingen in het Engels en Nederlands verschilt dusdanig dat de instelling van een taal enigszins complex kan zijn.
650 Echter, dit maakt het mogelijk aanpasbaar voor andere talen.%
651 }\\
652
653 \noindent
654 \DescribeMacro{\rref@setup\\\marg{lang}\\\marg{article opts...}\\\marg{para opts...}\\\marg{sub opts...}}
655 \translation{%
656 The \cmd{\rref@setup} macro takes the \meta{language} as first argument.
657 The other three arguments accept multiple options, namely:%
658 }{%
659 De \cmd{\rref@setup} macro heeft als eerste argument \meta{de taal} die moet worden ingesteld.
660 De andere drie argumenten accepteren meerdere opties, namelijk:%
661 }
662 \begin{labeling}{\texttt{group conjunction}}
663 \addtokomafont{labelinglabel}{\ttfamily}
664 \item[name]
665 \translation{%
666 the designation in lower case.
667 For example `article', `art.', `par', et cetera.
668 Default for%
669 }{%
670 de benaming in kleine letters, b\ij{}voorbeeld `artikel', `art.', `onderdeel', enzovoort.
671 Standaard voor%
672 }\\\GetTranslation{article} \lstinline|\GetTranslation{article}|, \\\GetTranslation{paragraph} \lstinline|\GetTranslation{paragraph}| \GetTranslation{and} \\\GetTranslation{subparagraph} \lstinline|\GetTranslation{subparagraph}|.%
673 \item[Name] \translation{%
674 the designation starting with a capital letter. For example, 'Article'. Like \texttt{name}, this option defaults to using \cmd{\GetTranslation}, but with an initial capital letter.%
675 }{%
676 de benaming beginnend met een hoofdletter, b\ij{}voorbeeld `Artikel'.
677 Net als \texttt{name} gebruikt deze optie standaard \cmd{\GetTranslation}, maar dan met een hoofdletter.%
678 }
679 \item[ref format] \translation{%
680 a macro with one argument, namely the current number.
681 For example, for a member (or subparagraph in English), \cmd{\ordinalstringnum} is used for this.
682 In such cases, it is important to consider case sensitivity using \cmd{\@ifrrefcap}.
683 Example:%
684 }{%
685 een macro met één argument, namelijk het huidige nummer.
686 Voor bijvoorbeeld een lid (of subparagraph in het Engels) is hiervoor \cmd{\ordinalstringnum} gebruikt.
687 In zo'n geval is het belangrijk om rekening te houden met hoofdletter gevoeligheid d.m.v.\ \cmd{\@ifrrefcap}.
688 Voorbeeld:%
689 } \lstinline[style=tex]|\@ifrrefcap{\Ordinalstringnum{...}}{\ordinalstringnum{...}}|.
690 \item[label format] \translation{%
691 the order of the reference and the name.
692 This macro takes two arguments, namely the \texttt{name} and the result of \texttt{ref format}.
693 For example, for an article in Dutch, the order is \texttt{\{\#1 \#2\}}, for a paragraph in Dutch \texttt{\{\#2 \#1\}}, and for a paragraph/lid in English \texttt{\textbackslash@gobble\{\#1\}\#2}\footnote{\texttt{\textbackslash@gobble} processes the argument but does not print anything.}.
694 Note that you need to specify a macro.
695 In the first example, you would pass \cmd{\mylabelformat} as an option and define it as:
696 }{%
697 de volgorde van de verwijzing en de naam.
698 Deze macro krijgt twee argumenten mee, namelijk de \texttt{name} en het resultaat van \texttt{ref format}.
699 Voor bijvoorbeeld een artikel is de volgorde \texttt{\{\#1 \#2\}}, voor een lid \texttt{\{\#2 \#1\}}, en voor een paragraph/lid in het engels \texttt{\textbackslash@gobble\{\#1\}\#2}\footnote{\texttt{\textbackslash@gobble} verwerkt het argument maar print niks uit.}.
700 Let wel dat je een macro dient op te geven.
701 Bij het eerste voorbeeld zou je \cmd{\mylabelformat} als optie meegeven en zou gedefinieerd zijn als:
702 }\lstinline[style=tex]|\newcommand\mylabelformat[2]{#1 #2}|.
703 \item[group conjunction] \translation{%
704 This value indicates how it should be linked to the parent part.
705 For example (Dutch), in ``artikel\Vtextvisiblespace1\textcolor{red}{,\Vtextvisiblespace}eerste\Vtextvisiblespace lid,'' the \texttt{group conjunction} is set to \lstinline|{,~}| for the article.%
706 }{%
707 deze waarde geeft aan hoe het dient gekoppeld te worden aan het bovenliggende onderdeel.
708 Bijvoorbeeld, in ``artikel\Vtextvisiblespace1\textcolor{red}{,\Vtextvisiblespace}eerste\Vtextvisiblespace lid'' is de \texttt{group conjunction} bij de instelling van het artikel gelijk aan \lstinline|{,~}|.%
709 }
710 \item[group format] \translation{%
711 This option accepts a macro with one argument.
712 The first argument contains all subparts.
713 For example, in English, for a subparagraph/onderdeel, the article and paragraph/lid need to be surrounded by square brackets.
714 The value would then be for the subpart \texttt{{[}\#1{]}}.
715 }{%
716 deze optie accepteert een macro met één argument.
717 Het eerste argument bevat alle onderliggende onderdelen.
718 Bijvoorbeeld in het Engels dient bij een subparagraph/onderdeel het artikel en paragraph/lid omringd te worden met blokhaken.
719 De waarde is dan bij het onderdeel \texttt{{[}\#1{]}}.
720 }
721 \end{labeling}
722 \translation{%
723 These options can vary for each article, paragraph, and subparagraph.
724
725 When defining a new language, it's important to know that the default values are based on the English configuration.
726 For example, consider the Dutch configuration, including all the used helper macros:
727 }{%
728 Deze opties kunnen verschillen per artikel, lid en onderdeel.
729
730 Bij het definiëren van een nieuwe taal is het belangrijk om te weten dat de standaard waarden gebaseerd zijn op de Engelse configuratie.
731 Neem bijvoorbeeld de Nederlandse configuratie, inclusief alle gebruikte hulp macro's:%
732 }
733 \begin{lstlisting}[style=TeX,caption={\translation{Dutch configuration}{Nederlandse configuratie}},numbers=left]
734 \newcommand\rref@refformat@noop[1]{#1}
735 \newcommand\rref@refformat@parenthesis[1]{(#1)}
736 \newcommand\rref@refformat@ordinal[1]{%
737 \@ifrrefcap{%
738 \Ordinalstringnum{#1}%
739 }{%
740 \ordinalstringnum{#1}%
741 }%
742 }
743 \newcommand\rref@refformat@alpha[1]{%
744 \@ifrrefcap{%
745 \ABAlphnum{#1}%
746 }{%
747 \abalphnum{#1}%
748 }%
749 }
750 \newcommand\rref@label@prefix[2]{#1 #2}
751 \newcommand\rref@label@postfix[2]{#2 #1}
752 \newcommand\rref@label@refonly[2]{\@gobble{#1}#2}
753 \newcommand\rref@group@braced[1]{{[}#1{]~}}
754
755 \rref@setup{dutch}{
756 group conjunction={,~}
757 }{
758 ref format=\rref@refformat@ordinal,
759 label format=\rref@label@postfix,
760 group conjunction={,~},
761 group format=\rref@refformat@noop
762 }{
763 ref format=\rref@refformat@alpha,
764 label format=\rref@label@prefix,
765 group conjunction={,~},
766 group format=\rref@refformat@noop
767 }
768 \end{lstlisting}
769
770 \clearpage
771 \section*{\translation{Examples}{Voorbeelden}}\label{sec:example}
772 \lstset{numbers=left,frame=single}
773 \lstinputlisting[style=tex,numbers=left,caption={example1.tex},label={code:example1}]{example1.tex}
774
775 \lstinputlisting[style=tex,numbers=left,caption={example2.tex},label={code:example2}]{example2.tex}\clearpage
776
777 \lstinputlisting[style=tex,numbers=left,caption={md-example.tex},label={code:md-example}]{md-example.tex}\clearpage
778
779 \lstinputlisting[style=md,numbers=left,caption={example.md},label={code:example-md}]{example.md}\clearpage
780
781 \lstinputlisting[style=bib,numbers=left,caption={example1.bib}]{example1.bib}
782
783 \lstinputlisting[style=bib,numbers=left,caption={example2.bib}]{example2.bib}