diff options
author | Karl Berry <karl@freefriends.org> | 2024-01-18 22:25:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-01-18 22:25:12 +0000 |
commit | 114618607a80a1c78e993d90cb4618ad4c762bc8 (patch) | |
tree | 5b28a27f977ffd5b3a0cc029a0c39a225d8e5aed /Master | |
parent | 93ad2346f1037ee5b5b96948a4e0212a3f7fe4f0 (diff) |
regulatory (18jan24)
git-svn-id: svn://tug.org/texlive/trunk@69489 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
27 files changed, 2453 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/regulatory/README.md b/Master/texmf-dist/doc/latex/regulatory/README.md new file mode 100644 index 00000000000..ec9a283dc9b --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/README.md @@ -0,0 +1,27 @@ +# Regulatory + +A LaTeX package which provides macro's for crafting regulatory documents. + +## Installation +In order to install this package the `texmf` tree has to be copied to a directory LaTeX will search in. +Consult `tlmgr conf texmf TEXMFHOME` to get any ideas of where that should be. + +If it's favored to keep this tree separate from other LaTeX trees one can add a configuration to `/etc/texmf/texmf.d` which adds a TEXMF AUX TREE (Debian and derivatives only). +This can be useful when you need to change the source and/or push changes with Git. + +```bash +TEXMFAUXTREES=$HOME/src/regulatory/texmf, +``` +*/etc/texmf/texmf.d/01xerdi.cnf* + +Afterward execute `update-texmf` with root permissions. +It can be validated by the output of: `kpsewhich -var-value TEXMFAUXTREES`. +## Documentation +The documentation is available in Dutch and English and will be included in every release. +See the [releases page](https://github.com/Xerdi/regulatory/releases) for the PDF files. + +For more information on building all documentation, see [Makefile](Makefile) and [doc/Makefile](doc/Makefile) in this project. + +## License +This project is licensed under the LPPL version 1.3c and maintained by Erik Nijenhuis. +See [LICENSE.txt](LICENSE.txt) for more information. diff --git a/Master/texmf-dist/doc/latex/regulatory/example.md b/Master/texmf-dist/doc/latex/regulatory/example.md new file mode 100644 index 00000000000..9ad1a4dcae2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example.md @@ -0,0 +1,23 @@ +# Definitiones +\label{art:defs} +\glssetwidest{Nam dui} + +Lorem +: \describe{def1} +Nam dui +: \describe{def2} +Nulla +: \describe{def3} + +# Quisque ullamcorper + +1. \label{lid:lorem}\textfill +2. \label{lid:lorem2}\textfill + 1. \label{sub:lorem}\textfill~\Aref{lid:lorem}. + 2. \label{sub:lorem2}\textfill~\Aref{ex2-lid:lorem}. + 3. \label{sub:lorem3}\textfill~\Aref{lid:lorem,lid:lorem2}. + 4. \label{sub:lorem4}\textfill~\Aref{ex2-lid:lorem,ex2-lid:lorem2,ex2-lid:lorem3}. + 5. \label{sub:lorem5}\textfill~\Aref{ex2-lid:lorem,ex2-lid:lorem2,ex2-lid:lorem3,ex2-lid:lorem5}. + 6. \label{sub:lorem6}\textfill~\Gls{def1} ipsum dolor sit amed. + 7. \label{sub:lorem7}\textfill~\Aref{ex2-sub:lorem,ex2-sub:lorem2,ex2-sub:lorem4}. + 8. \label{sub:lorem8}\textfill
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/regulatory/example1-en.pdf b/Master/texmf-dist/doc/latex/regulatory/example1-en.pdf Binary files differnew file mode 100644 index 00000000000..0e08431dbf0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example1-en.pdf diff --git a/Master/texmf-dist/doc/latex/regulatory/example1-en.tex b/Master/texmf-dist/doc/latex/regulatory/example1-en.tex new file mode 100644 index 00000000000..eeb17acc994 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example1-en.tex @@ -0,0 +1,42 @@ +%% example1-en.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\documentclass[12pt,english]{article} +\usepackage{babel} +\usepackage[alldefs]{regulatory} +\usepackage{lipsum} + +\newcounter{lip} +\setcounter{lip}{1} +\newcommand\textfill{\lipsum[\arabic{lip}]\stepcounter{lip}} + +\newcommand\translation[2]{#1} + +\refdocument[ex2-]{example2-en}{% + ref label=of Example Two +} + +\loadglsdefs{example1} + +\begin{document} + \input{example1} +\end{document} diff --git a/Master/texmf-dist/doc/latex/regulatory/example1-nl.pdf b/Master/texmf-dist/doc/latex/regulatory/example1-nl.pdf Binary files differnew file mode 100644 index 00000000000..63522191b7e --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example1-nl.pdf diff --git a/Master/texmf-dist/doc/latex/regulatory/example1-nl.tex b/Master/texmf-dist/doc/latex/regulatory/example1-nl.tex new file mode 100644 index 00000000000..df01669786a --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example1-nl.tex @@ -0,0 +1,42 @@ +%% example1-nl.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\documentclass[12pt,dutch]{article} +\usepackage{babel} +\usepackage[alldefs]{regulatory} +\usepackage{lipsum} + +\newcounter{lip} +\setcounter{lip}{1} +\newcommand\textfill{\lipsum[\arabic{lip}]\stepcounter{lip}} + +\newcommand\translation[2]{#2} + +\refdocument[ex2-]{example2-nl}{% + ref label=van Voorbeeld Twee +} + +\loadglsdefs{example1} + +\begin{document} + \input{example1} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/regulatory/example1.bib b/Master/texmf-dist/doc/latex/regulatory/example1.bib new file mode 100644 index 00000000000..c1b0311764b --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example1.bib @@ -0,0 +1,15 @@ + +@entry{def1, + name = {Lorem}, + description = {\textfill} +} + +@entry{def2, + name = {Nam dui}, + description = {\textfill} +} + +@entry{def3, + name = {Nulla}, + description = {\textfill} +} diff --git a/Master/texmf-dist/doc/latex/regulatory/example1.tex b/Master/texmf-dist/doc/latex/regulatory/example1.tex new file mode 100644 index 00000000000..b9e0f1331f4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example1.tex @@ -0,0 +1,25 @@ +\begin{center} + \Huge \translation{Example One}{Voorbeeld Één} +\end{center} +\article{Definitiones}\label{art:defs} +\printdefs{Nam dui} +\article{Quisque ullamcorper}\label{art:lorem} +\begin{paras} + \item \label{lid:lorem} \textfill + \item \label{lid:lorem2} \textfill + \begin{paras} + \item \label{sub:lorem} \textfill~\Aref{lid:lorem}. + \item \label{sub:lorem2} \textfill~\Aref{ex2-lid:lorem}. + \item \label{sub:lorem3} \textfill~\Aref{lid:lorem,lid:lorem2}. + \item \label{sub:lorem4} \textfill~\Aref{ex2-lid:lorem,ex2-lid:lorem2,ex2-lid:lorem3}. + \item \label{sub:lorem5} \textfill~\Aref{ex2-lid:lorem,ex2-lid:lorem2,ex2-lid:lorem3,ex2-lid:lorem5}. + \item \label{sub:lorem6} \textfill~\Gls{def1} ipsum dolor sit amed. + \item \label{sub:lorem7} \textfill~\Aref{ex2-sub:lorem,ex2-sub:lorem2,ex2-sub:lorem4}. + \item \label{sub:lorem8} \textfill + \end{paras} +\end{paras} +\article{Etiam ac leo}\label{art:lorem2} +\para{A risus tristique nonummy} +\textfill +\article{Nulla in ipsum}\label{art:lorem3} +\textfill diff --git a/Master/texmf-dist/doc/latex/regulatory/example2-en.pdf b/Master/texmf-dist/doc/latex/regulatory/example2-en.pdf Binary files differnew file mode 100644 index 00000000000..bc253e499be --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example2-en.pdf diff --git a/Master/texmf-dist/doc/latex/regulatory/example2-en.tex b/Master/texmf-dist/doc/latex/regulatory/example2-en.tex new file mode 100644 index 00000000000..f47f7d0d9ef --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example2-en.tex @@ -0,0 +1,49 @@ +%% example2-en.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\documentclass[12pt,english]{article} +\usepackage{babel} +\usepackage{regulatory} +\usepackage{lipsum} + +\newcounter{lip} +\setcounter{lip}{1} +\newcommand\textfill{\lipsum[\arabic{lip}]\stepcounter{lip}} + +\newcommand\translation[2]{#1} + +\newcommand\definitionlabel[1]{~(see #1)} + +\masterdocument[ex1-]{example1-en}{% + defs=example1,% + author=E. Nijenhuis,% + subject= Example One,% + description = The first example document, + footnote label = Attachment:~, + ref label=of Example One, + def label=\definitionlabel +} +\loadglsdefs{example2} + +\begin{document} + \input{example2} +\end{document} diff --git a/Master/texmf-dist/doc/latex/regulatory/example2-nl.pdf b/Master/texmf-dist/doc/latex/regulatory/example2-nl.pdf Binary files differnew file mode 100644 index 00000000000..be0484a77c0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example2-nl.pdf diff --git a/Master/texmf-dist/doc/latex/regulatory/example2-nl.tex b/Master/texmf-dist/doc/latex/regulatory/example2-nl.tex new file mode 100644 index 00000000000..071cce4a009 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example2-nl.tex @@ -0,0 +1,49 @@ +%% example2-nl.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\documentclass[12pt,dutch]{article} +\usepackage{babel} +\usepackage{regulatory} +\usepackage{lipsum} + +\newcounter{lip} +\setcounter{lip}{1} +\newcommand\textfill{\lipsum[\arabic{lip}]\stepcounter{lip}} + +\newcommand\translation[2]{#2} + +\newcommand\definitionlabel[1]{~(zie #1)} + +\masterdocument[ex1-]{example1-nl}{% + defs=example1,% + author=E. Nijenhuis,% + subject= Voorbeeld Één,% + description = Het éérste voorbeeld document, + footnote label = Bijlage:~, + ref label=van Voorbeeld Één, + def label=\definitionlabel +} +\loadglsdefs{example2} + +\begin{document} + \input{example2} +\end{document} diff --git a/Master/texmf-dist/doc/latex/regulatory/example2.bib b/Master/texmf-dist/doc/latex/regulatory/example2.bib new file mode 100644 index 00000000000..555f4f976ee --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example2.bib @@ -0,0 +1,5 @@ + +@entry{def4, + name = {Suspendisse}, + description = {\textfill} +} diff --git a/Master/texmf-dist/doc/latex/regulatory/example2.tex b/Master/texmf-dist/doc/latex/regulatory/example2.tex new file mode 100644 index 00000000000..4721fad59ba --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/example2.tex @@ -0,0 +1,21 @@ +\begin{center} + \Huge \translation{Example Two}{Voorbeeld Twee} +\end{center} +\article{Pactum}\label{art:agreement} +\begin{paras} + \item \label{lid:lorem} \textfill~\Gls{def1}. + \item \label{lid:lorem2} \textfill~\Gls{def2}. + \item \label{lid:lorem3} \textfill + \item \label{lid:lorem4} \textfill + \item \label{lid:lorem5} \textfill~\Gls{def4} ipsum dolor sit amed.\\ + \printdefs{Suspendisse} + \begin{paras} + \item \label{sub:lorem} \textfill + \item \label{sub:lorem2} \textfill + \item \label{sub:lorem3} \textfill + \item \label{sub:lorem4} \textfill + \end{paras} +\end{paras} +\article{Suspendisse} +\para{Aliquam} +\textfill
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/regulatory/md-example.tex b/Master/texmf-dist/doc/latex/regulatory/md-example.tex new file mode 100644 index 00000000000..475dc773b48 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/md-example.tex @@ -0,0 +1,24 @@ +\documentclass[12pt,dutch]{article} +\usepackage{babel} +\usepackage[md,alldefs]{regulatory} +\usepackage{lipsum} + +\newcounter{lip} +\setcounter{lip}{1} +\newcommand\textfill{\lipsum[\arabic{lip}]\stepcounter{lip}} + +\refdocument[ex2-]{example2-nl}{ + defs=example2 + ref label=van Voorbeeld Twee +} + +\loadglsdefs{example1} + +\begin{document} + \begin{center} + \Huge Voorbeeld Markdown + \end{center} + + \markdownInput{example.md} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/regulatory/regulatory-en.pdf b/Master/texmf-dist/doc/latex/regulatory/regulatory-en.pdf Binary files differnew file mode 100644 index 00000000000..11f032e0168 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/regulatory-en.pdf diff --git a/Master/texmf-dist/doc/latex/regulatory/regulatory-en.tex b/Master/texmf-dist/doc/latex/regulatory/regulatory-en.tex new file mode 100644 index 00000000000..0ec1ac52b98 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/regulatory-en.tex @@ -0,0 +1,52 @@ +%% regulatory-en.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\documentclass[10pt,english]{ltxdoc} + +%! suppress = InclusionLoop +\usepackage[md]{regulatory} +\usepackage{tabularx} +\usepackage[english,dutch]{babel} + +\input{regulatory-preamble} +\newcommand\translation[2]{#1} +\masterdocument[ex1-]{example1-en}{% + defs=example1,% + author=E. Nijenhuis,% + subject= Example One,% + description = The first example document, + ref label=of Example One +} + +\masterdocument[ex2-]{example2-en}{% + defs=example2,% + author=E. Nijenhuis,% + subject= Example Two,% + description = The second example document, + ref label=of Example Two +} + +% Document +\begin{document} + \selectlanguage{english} + \input{regulatory} +\end{document} diff --git a/Master/texmf-dist/doc/latex/regulatory/regulatory-nl.pdf b/Master/texmf-dist/doc/latex/regulatory/regulatory-nl.pdf Binary files differnew file mode 100644 index 00000000000..334e4f3c551 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/regulatory-nl.pdf diff --git a/Master/texmf-dist/doc/latex/regulatory/regulatory-nl.tex b/Master/texmf-dist/doc/latex/regulatory/regulatory-nl.tex new file mode 100644 index 00000000000..af6a3e79418 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/regulatory-nl.tex @@ -0,0 +1,63 @@ +%% regulatory-nl.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\documentclass[10pt,dutch]{ltxdoc} + +%! suppress = InclusionLoop +\usepackage[md]{regulatory} +\usepackage{tabularx} +\usepackage[dutch,english]{babel} + +\input{regulatory-preamble} + +\zcRefTypeSetup{listing}{% + Name-sg = Codelijst, + name-sg = codelijst, + Name-pl = Codelijsten, + name-pl = codelijsten +} + +\renewcommand{\lstlistingname}{Codelijst} + +\newcommand\translation[2]{#2} + +\masterdocument[ex1-]{example1-nl}{% + defs=example1,% + author=E. Nijenhuis,% + subject= Voorbeeld Één,% + description = Het éérste voorbeeld document, + ref label=van Voorbeeld Één +} + +\masterdocument[ex2-]{example2-nl}{% + defs=example2,% + author=E. Nijenhuis,% + subject= Voorbeeld Twee,% + description = Het tweede voorbeeld document, + ref label=van Voorbeeld Twee +} + +% Document +\begin{document} + \selectlanguage{dutch} + \input{regulatory} +\end{document} diff --git a/Master/texmf-dist/doc/latex/regulatory/regulatory-preamble.tex b/Master/texmf-dist/doc/latex/regulatory/regulatory-preamble.tex new file mode 100644 index 00000000000..50c6db1bee0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/regulatory-preamble.tex @@ -0,0 +1,110 @@ +%% regulatory-preamble.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\usepackage{gitinfo-lua} +\usepackage{listings} + +\usepackage{fontspec} +\usepackage{textcomp} + +\def\projecturl{https://github.com/Xerdi/regulatory} + +\definecolor{greycolor}{HTML}{BFBFBF} +\definecolor{primary}{HTML}{174A67} +\definecolor{darkcolor}{HTML}{091D28} +\definecolor{greencolor}{HTML}{176734} +\colorlet{artlabel}{primary} +\colorlet{green}{greencolor} + +\lstdefinestyle{tex}{% + language=[LaTeX]TeX, + keywordsprefix={\\}, + alsoletter={\\}, + morekeywords={article,para,textfill,masterdocument,refdocument,loadglsdefs,printdefs,setmiddleconjunction,setlastconjunction,setrangeconjunction,setconjunction,markdownInput,glssetwidest,describe} +} + +\lstdefinestyle{bash}{% + language=bash, + morekeywords={pdflatex,lualatex,latexmk,makeglossaries,bib2gls} +} + +\lstdefinelanguage{Markdown}[LaTeX]{TeX}{% + sensitive=false, + morecomment=[l][\bfseries\ttfamily\color{green}]{\#}, + morecomment=[s][\bfseries\ttfamily\color{purple}]{:\ \ }{\ }, + morestring=[s][\color{black}]{\{}{\}}, + morekeywords={article,para,textfill,masterdocument,refdocument,loadglsdefs,printdefs,setmiddleconjunction,setlastconjunction,setrangeconjunction,setconjunction,markdownInput,glssetwidest,describe}, + keywordsprefix={\\}, + alsoletter={\\}, +} + +\lstdefinestyle{md}{% + language=Markdown +} + +\lstdefinelanguage{BibTeX}{% + keywords={% + article,book,collectedbook,conference,electronic,entry,ieeetranbstctl,% + inbook,incollectedbook,incollection,injournal,inproceedings,% + manual,mastersthesis,misc,patent,periodical,phdthesis,preamble,% + proceedings,standard,string,techreport,unpublished% + }, + keywordsprefix={@}, + comment=[l][\itshape]{@comment}, + sensitive=false, +} + +\lstdefinestyle{bib}{% + language=BibTeX, + morestring=[s][\bfseries\ttfamily\color{purple}]{\ \ \ \ }{\ }, + morecomment=[n][\bfseries\ttfamily\color{green}]{\ \{}{\}}, +} + +\lstset{ + title=\lstname, + basicstyle=\ttfamily, + numberstyle=\ttfamily, + numbersep=5pt, + rulecolor=\color{greycolor}, + stringstyle=\color{pink}, + keywordstyle=\color{primary}, + commentstyle=\itshape\color{darkcolor}, + breaklines=true, + captionpos=b, + tabsize=4, + showtabs=true +} + +\newcommand\package{\texttt} +\newcommand\file{\texttt} +\newcommand\option{\texttt} + +\def\packagedate{\gitdate} +\def\packageversion{\gitversion} + +%\def\cmd{\lstinline[style=tex]} +\def\cmditem#1{\item[\ttfamily\textbackslash{}#1]} + +\newcommand\Vtextvisiblespace[1][.3em]{% + \mbox{\kern.06em\vrule height.3ex}% + \vbox{\hrule width#1}% + \hbox{\vrule height.3ex}} diff --git a/Master/texmf-dist/doc/latex/regulatory/regulatory.tex b/Master/texmf-dist/doc/latex/regulatory/regulatory.tex new file mode 100644 index 00000000000..ffb0ce5ecb9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/regulatory/regulatory.tex @@ -0,0 +1,779 @@ +%% regulatory.tex +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\translation{% + \title{Package \package{regulatory}\thanks{This document corresponds to \textsf{regulatory}~\packageversion, written on \packagedate.}} +}{% + \title{Het \package{regulatory} pakket\thanks{Dit document correspondeert aan \textsf{regulatory}~\packageversion, geschreven op \packagedate.}}% +} +\author{Erik Nijenhuis\\ +\href{mailto:erik@xerdi.com}{erik@xerdi.com}} +\date{\packagedate} +\maketitle +\begin{abstract} + % Structuur % + \translation{% + 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.% + }{% + Het \package{regulatory} pakket leent zich uitstekend voor juristen in brede zin. + Dit pakket brengt veel voorkomende structuren, zoals artikelen, leden, onderdelen en definities.% + } + + % Verwijzen % + \translation{% + 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.% + }{% + 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. + Hiervoor introduceert pakket \package{regulatory} zijn eigen \cmd{\rref}, \cmd{\nref} en \cmd{\aref} macrofamilies die standaard ondersteuning bieden voor Nederlands en Engels.% + } + + % Definities % + \translation{% + Managing definitions uniformly across all documents can be achieved using \package{BibTeX}. + When it comes to referencing definitions, the \package{regulatory} package aligns with the existing \cmd{\gls} macro family of the \package{glossaries} package.% + }{% + Het beheren van definities kan eenduidig voor alle documenten met behulp van \package{BibTeX}. + Voor het verwijzen naar definities speelt het \package{regulatory} pakket in op de al bestaande \cmd{\gls} macrofamilie van \package{glossaries}.% + } + % Externe Documenten % + \translation{% + 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. + 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. + It is even possible to attach the Terms and Conditions as an appendix to the PDF file for completeness.% + }{% + 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. + Op deze manier blijft het eenvoudig verwijzen voor documenten onderling. + Denk b\ij{}voorbeeld aan Algemene Voorwaarden en een Onderhoudsovereenkomst die naar elkaars artikelen verwijzen of elkaars begrippen gebruiken. + Het is zelfs mogelijk om bij documenten de Algemene Voorwaarden als bijlage in het PDF-bestand te voegen voor de volledigheid.% + } +\end{abstract} + +\clearpage +\tableofcontents +\clearpage + + +\section{\translation{Usage}{Gebruik}} +\translation{% + The \package{regulatory} package is explicitly designed for generating PDF documents with \LaTeX{}. + Therefore, use either \texttt{pdflatex} or \texttt{lualatex}.% +}{% + Het pakket \package{regulatory} is uitdrukkelijk bedoeld voor het genereren van PDF-documenten met \LaTeX{}. + Gebruik daarom \texttt{pdflatex} of \texttt{lualatex}.% +} +\begin{lstlisting}[style=tex,caption={main.tex},label=code:simple] +\documentclass[dutch]{article} +\usepackage{regulatory} +\begin{document} + \article{...} +\end{document} +\end{lstlisting} +\translation{% + The example does not use any options. This means that \option{bib2gls} is active. + To switch back to TeX code for definition lists, the option \oarg{nobibdefs} is available. + Additionally, there are options such as \oarg{md,alldefs,hidelinks,nameinlink}. + 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.% +}{% + Het voorbeeld gebruikt geen opties. + Dit houdt in dat \option{bib2gls} actief is. + Om terug te schakelen naar TeX code voor definitielijsten is er de optie \oarg{nobibdefs}. + Verder zijn er nog de opties \oarg{md,alldefs,hidelinks,nameinlink}. + 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.% +}\\ + +\noindent +\translation{% + The example of \zcref{code:simple} can be generated to PDF as follows:% +}{% + Het voorbeeld van \zcref{code:simple} kan als volgt gegenereerd worden naar PDF:% +} +\begin{lstlisting}[style=bash,caption={\translation{Commandline examples}{Commandline voorbeelden}}] +pdflatex main +# Or +lualatex main +# Or keep generating +latexmk -pvc -lualatex -interaction=nonstopmode main +\end{lstlisting} + +\noindent +\translation{% + Suppose definition lists are used; in that case, additional steps are added to the generation process, e.g:% +}{% + Stel er worden definitie lijsten gebruikt, dan komen er nog extra stappen bij in het generatieproces, namelijk:% +} +\begin{lstlisting}[style=Bash,caption={\translation{Commandline with definitions}{Commandline met definities}}] +lualatex main +bib2gls main +lualatex main +lualatex main +# Or for bibtex +lualatex main +makeglossaries main +lualatex main +lualatex main +\end{lstlisting} +\translation{% + 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.% +}{% + 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. + LatexMK ziet vanzelf de bestanden wijzigen en genereert dan het document opnieuw.% +} + +\clearpage + + +\section{\translation{Structure}{Structuur}}\label{sec:struct} +\translation{% + This package provides familiar structures without breaking the existing functionalities of \LaTeX{}.% +}{% + Dit pakket levert bekende structuren, zonder de bestaande functionaliteiten van \LaTeX{} te breken.% +} +\DescribeMacro{\article} +\DescribeMacro{\para} +\translation{% + For example, consider \cmd{\article}\marg{title} and \cmd{\para}\marg{title}. + These are defined as separate macros and formatted using \package{titlesec}.% +}{% + Neem b\ij{}voorbeeld \cmd{\article}\marg{title} en \cmd{\para}\marg{title}. + Deze zijn als aparte macro's gedefinieerd en opgemaakt met behulp van \package{titlesec}.% +}\\ + +\noindent +\DescribeEnv{paras} +\translation{% + For the \option{paras}\footnote{% + Originally the naming was taken from Dutch ``artikel, lid en onderdeel'', which was hard to introduce in English, due to ambiguity reasons.% + Therefore, section and part are aliased to paras.% + } and ``subparagraphs'', a new environment has been created using \package{enumitem}. + The labels for the members have been adjusted to +}{% + Voor de \option{paras} en ``onderdelen'' is een nieuwe environment aangemaakt met behulp van \package{enumitem}. + De labels van de leden zijn aangepast naar +}\lstinline[style=tex]|\thearticle.\arabic*|\translation{ + for paragraphs and +}{, voor leden en, +}\lstinline[style=tex]|\abalphnum{\arabic*)|\translation{ + for subparagraphs.% +}{, voor onderdelen.} +\translation{% + For ``subparagraphs'', \cmd{\abalpnum} from the \package{fmtcount} package is used to enumerate multiple subparagraphs. + Suppose \cmd{\alph} were used; in that case, \option{paras} (second level) would be limited to 26 subparagraphs. + With \cmd{\abalphnum}, for example, with a value of 125, the result is `\texttt{du}'. +}{% + Voor onderdelen wordt er gebruik gemaakt van \cmd{\abalpnum} uit pakket \package{fmtcount}\footnote{Het pakket \package{fmtcount} heeft geen ondersteuning voor Nederlands. Dit pakket levert daarvoor de juist configuratie mee.} om meerdere onderdelen te kunnen opsommen. + Stel er zou gebruik gemaakt worden van \cmd{\alph}, dan is \option{paras} beperkt tot 26 onderdelen. + Bij \cmd{\abalphnum} met b\ij{}voorbeeld een waarde van 125 is `\texttt{du}' de uitkomst. +} + +\begin{lstlisting}[style=tex] +\article{Voorbeeld} +\begin{paras} + \item \textfill + \begin{paras} + \item \textfill + \end{paras} + \item \textfill +\end{paras} + +\article{Voorbeeld2} +\textfill + +\para{Voorbeeld3} +\textfill +\end{lstlisting} +\translation +{See \zcref{code:example1,code:example2} for more \LaTeX{} examples.} +{Zie \zcref{code:example1,code:example2} voor meer \LaTeX{} voorbeelden.} + +\subsection{Markdown} +\translation{% + With the package option \option{md}, this package ensures that all these structures are handled. + However, this means that no chapters or other standard components can be typed. + Instead, the writer is specifically limited to the components described in this chapter. + 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{}. +}{% + Met de pakketoptie \option{md} zorgt dit pakket ervoor dat al deze structuren gehanteerd worden. + Dit betekend echter wel dat er geen hoofdstukken of andere standaard onderdelen meer getypt kunnen worden. + In plaats daarvan is de schrijver juist beperkt tot de onderdelen omschreven in dit hoofdstuk. + 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{}. +} +\clearpage + + +\section{\translation{Definitions}{Definities}} +\translation{% + For referencing definitions, \package{glossaries-extra} is used. + This allows referencing with the \cmd{\gls}\marg{label} macro family.% +}{% + Voor het verwijzen naar definities wordt gebruik gemaakt van \package{glossaries-extra}. + Dit zorgt ervoor dat er met de \cmd{\gls}\marg{label} macrofamilie kan worden verwezen.% +}\\ + +\noindent +\DescribeEnv{definitions} +\DescribeEnv{externals} +\translation{% + To prevent conflicts between terms, abbreviations, and definitions, this package adds two \texttt{glossary} types. + 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}).% +}{% + Om conflicten tussen begrippen, afkortingen en definities te voorkomen voegt dit pakket twee \texttt{glossary} types toe. + 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}).% +}\\ + +\noindent +\DescribeMacro{\printdefs} +\translation{% + To list definitions, various macros have been added. + The most straightforward one, \cmd{\printdefs}\marg{width of text}, enumerates the definitions with a customized style. + The argument \marg{width of text} is provided for the alignment of definition labels and descriptions.% +}{% + Om definities in te laden zijn er twee macro's gedefinieerd. + De \cmd{\loadglsdefs}\marg{src} macro voegt BibTeX bibliotheken toe onder het type \option{definitions} en heeft als categorie \option{definitions}. + Gebruikte definities in deze bibliotheken zullen opgesomd worden wanneer \cmd{\printdefs} wordt aangeroepen. + Indien de optie \option{alldefs} bij het pakket is meegegeven, dan zullen alle definities in die bibliotheken opgesomd worden. + De opsomming wordt gesorteerd aan de hand van het Nederlandse woordenboek. + Woorden die niet voorkomen daarin zullen als eerste opgesomd worden.% +}\\ + +\noindent +\DescribeMacro{\describe} +\translation{% + 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}). + The \cmd{\describe} macro is well-suited for manually placing definition descriptions. + This macro adds an anchor point, required for functional hyperlinks.% +}{% + 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}). + De macro \cmd{\describe} leent zich uitstekend om handmatig definitie beschrijvingen te plaatsen. + Deze macro voegt namelijk een ankerpunt toe, vereist voor werkende hyperlinks.% +}\\ + +\noindent +\DescribeMacro{\loadglsdefs} +\translation{% + 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}. + Definitions used in these libraries will be listed when \cmd{\printdefs} is called. + If the package is given the \option{alldefs} option, then all definitions in those libraries will be listed. + The listing is sorted according to the Dutch dictionary. + Words not found in it are listed first.% +}{% + Om definities in te laden zijn er twee macro's gedefinieerd. + De \cmd{\loadglsdefs}\marg{src} macro voegt BibTeX bibliotheken toe onder het type \option{definitions} en heeft als categorie \option{definitions}. + Gebruikte definities in deze bibliotheken zullen opgesomd worden wanneer \cmd{\printdefs} wordt aangeroepen. + Als bij het pakket de optie \option{alldefs} is meegegeven, dan zullen alle definities in die bibliotheken opgesomd worden. + De opsomming wordt gesorteerd aan de hand van het Nederlandse woordenboek. + Woorden die niet voorkomen daarin worden als eerste opgesomd.% +}\\ + +\noindent +\DescribeMacro{\loadextdefs} +\translation{% + For \cmd{\loadextdefs}\oarg{category}\marg{src}, it can be useful to provide a category so that definitions from different sources can be distinguished. + However, it is unwise to call this macro directly since \cmd{\masterdocument} is already smartly handling it. +}{% + 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. + Het is echter niet aan te raden deze direct aan te roepen, aangezien \cmd{\masterdocument} hier al slim op in speelt. +} +\clearpage + + +\section{\translation{References}{Verwijzingen}} +\translation{% + For referencing articles, members, and parts, \package{zref} is used behind the scenes. + All components mentioned in \zcref{sec:struct} are configured for this purpose. + However, \package{zref} does not provide as many formatting adjustments as \package{cleveref}. +}{% + Voor het verwijzen naar artikelen, leden en onderdelen wordt onder water gebruik gemaakt van \package{zref}. + Alle onderdelen genoemd in \zcref{sec:struct} zijn hiervoor ingesteld, echter biedt \package{zref} niet zoveel formaat aanpassingen als \package{cleveref}. +} + +\DescribeMacro{\rref} +\DescribeMacro{\Rref} +\translation{% + Due to this limitation, it was decided to develop entirely new variants, including \cmd{\rref}\marg{label}. + With \cmd{\rref}, one can refer to articles just as is customary for \cmd{\section}, \cmd{\subsection}, and so on. + The \cmd{\rref} family consists of a total of four different macros:% +}{% + Door deze beperking is er voor gekozen om geheel nieuwe varianten te ontwikkelen, waaronder \cmd{\rref}\marg{label}. + Er kan dus met \cmd{\rref} verwezen worden naar artikelen net als gebruikelijk is voor \cmd{\section}, \cmd{\subsection}, en dergelijke. + De \cmd{\rref} familie kent in totaal vier verschillende macro's:% +} +\begin{labeling}{\textbackslash{}Rref*\quad} + \cmditem{rref} \translation + {Starting with a lowercase letter and with a hyperlink.} + {Beginnend met een kleine letter en met hyperlink.}\\ + \begin{tabularx}{\linewidth}{@{}X X X@{}} + \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\ + \rref{ex1-art:lorem} & \rref{ex1-lid:lorem} & \rref{ex1-sub:lorem} \\ + \end{tabularx} + \cmditem{rref*} \translation + {Starting with a lowercase letter and without a hyperlink.} + {Beginnend met een kleine letter en zonder hyperlink.}\\ + \begin{tabularx}{\linewidth}{@{}X X X@{}} + \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\ + \rref*{ex1-art:lorem} & \rref*{ex1-lid:lorem} & \rref*{ex1-sub:lorem} \\ + \end{tabularx} + \cmditem{Rref} \translation + {Starting with an uppercase letter and with a hyperlink.} + {Beginnend met een hoofdletter en met hyperlink.}\\ + \begin{tabularx}{\linewidth}{@{}X X X@{}} + \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\ + \Rref{ex1-art:lorem} & \Rref{ex1-lid:lorem} & \Rref{ex1-sub:lorem} \\ + \end{tabularx} + \cmditem{Rref*} \translation + {Starting with an uppercase letter and without a hyperlink.} + {Beginnend met een hoofdletter en zonder hyperlink.}\\ + \begin{tabularx}{\linewidth}{@{}X X X@{}} + \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\ + \Rref*{ex1-art:lorem} & \Rref*{ex1-lid:lorem} & \Rref*{ex1-sub:lorem} \\ + \end{tabularx} +\end{labeling} +\translation{% + 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. + For instance, for \texttt{ex1-lid:lorem}, the title is '2.1,' and it is referenced as '(1)'.% +}{% + 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. + B\ij{}voorbeeld voor \texttt{ex1-lid:lorem} is de titel `2.1' en wordt aangehaald met `eerste'.% +}\\ + +\noindent +\DescribeMacro{\nref} +\DescribeMacro{\Nref} +\translation{% + To reference with the corresponding designation, the macro family \cmd{\nref}\marg{label} has been developed. + This family, like \cmd{\rref}, has four variants. + In the following example, for simplicity, we'll only consider \cmd{\Nref}.% +}{% + Om te verwijzen met de bijbehorende benaming is er de macrofamilie \cmd{\nref}\marg{label} ontwikkeld. + Deze familie heeft net als \cmd{\rref} vier varianten. + In het volgende voorbeeld gaan we voor het gemak alleen uit van \cmd{\Nref}.% +}\\ + +\noindent +\begin{tabularx}{\linewidth}{@{}p{\widthof{EN}} X X X@{}} + & \textbf{\translation{Article}{Artikel}} & \textbf{\translation{Paragraph}{Lid}} & \textbf{\translation{Subparagraph}{Onderdeel}} \\ + \translation{EN}{NL} & \Nref{ex1-art:lorem} & \Nref{ex1-lid:lorem} & \Nref{ex1-sub:lorem} \\ +\end{tabularx}\translation{\selectlanguage{dutch}}{\selectlanguage{english}}\\ +\begin{tabularx}{\linewidth}{@{}p{\widthof{EN}} X X X@{}} + \translation{NL}{EN} & \Nref{ex1-art:lorem} & \Nref{ex1-lid:lorem} & \Nref{ex1-sub:lorem}\\ +\end{tabularx}\translation{\selectlanguage{english}}{\selectlanguage{dutch}}\\ + +\noindent +\translation{% + A notable difference with the alternative \cmd{\zcref} is that \cmd{\nref} can take into account the position of the designation. + For example, consider the outcome for the subparagraph (\meta{written ordinal} \meta{designation}).% +}{% + Een opmerkelijk verschil tussen het alternatief \cmd{\zcref} is dat \cmd{\nref} rekening kan houden met de positie van de benaming. + Kijk bijvoorbeeld naar de uitkomst van het lid (\meta{geschreven ordinaal} \meta{benoeming}).% +}\\ + +\noindent +\translation{% + 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. + For example, the \cmd{\nref} macro already includes the correct designation, but when referring to a member, the corresponding article is not mentioned.% +}{% + 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. + Macro \cmd{\nref} doet bijvoorbeeld wel al de juiste benaming erbij, maar bij het verwijzen naar een lid wordt er geen bijbehorend artikel genoemd.% +} +\DescribeMacro{\aref} +\DescribeMacro{\Aref} +\translation{% + For complete and automatic references, the \cmd{\aref}\marg{labels...} has been developed. + This macro family records all components of the reference. + Additionally, \cmd{\aref} accepts multiple labels and connects them in the correct way. + 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}. + 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. + Another additional feature is that these references are easily translatable into Dutch:% +}{% + Voor volledige en automatische verwijzingen is de \cmd{\aref}\marg{labels...} ontwikkeld. + Deze macrofamilie noteert dus alle onderdelen van de verwijzing. + Daarnaast accepteert \cmd{\aref} meerdere labels en koppelt het de labels op de juiste manier. + 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}. + Hierop is alleen één tekortkoming, namelijk, de optie \option{nameinlink} kan niet toegepast worden wanneer er meerdere labels meegegeven worden. + Deze tekortkoming geldt niet wanneer er één label wordt meegegeven. + Een andere bijkomstigheid is dat deze verwijzingen gemakkelijk te vertalen zijn naar het Engels:% +}\\ +\begin{lstlisting}[style=tex] +\selectlanguage{dutch} / \selectlanguage{english} +Zie / See \aref{ex1-sub:lorem,ex1-sub:lorem3,ex1-sub:lorem4} +en / and \aref{ex1-sub:lorem,ex1-sub:lorem2,ex1-sub:lorem3,ex1-sub:lorem4}. +\end{lstlisting}% +\translation{\selectlanguage{dutch}}{\selectlanguage{english}}~\\ +\vspace*{-4em} +\begin{center} + \large + \translation{Zie}{See} \aref{ex1-sub:lorem,ex1-sub:lorem3,ex1-sub:lorem4} + \translation{en}{and} \aref{ex1-sub:lorem,ex1-sub:lorem2,ex1-sub:lorem3,ex1-sub:lorem4}. +\end{center} +\translation{\selectlanguage{english}}{\selectlanguage{dutch}} +\translation{The only limitation that arises is that the reference name for the document isn't translated. +}{De enige beperking die optreedt is dat de verwijsnaam voor het document niet vertaald is.} + +\subsection{\translation{Conjunction}{Conjunctie}} +\DescribeMacro{\setmiddleconjunction\\\marg{format}} +\DescribeMacro{\setlastconjunction} +\DescribeMacro{\setrangeconjunction} +\DescribeMacro{\setconjunction\\\marg{middle}\\\marg{last}\\\marg{range}\\} +\translation{% + The linking of labels is done through \package{zref}. + However, thanks to the reimplementation, other macros have been written in a similar way as \package{cleveref} does, i.e:% +}{% + Het koppelen van de labels gebeurt via \package{zref}. + Er zijn echter dankzij de herimplementatie andere macro's geschreven op een vergelijkbare manier als \package{cleveref} dat doet, namelijk:% +} +\begin{lstlisting}[style=tex] +\setmiddleconjunction}{, } +\setlastconjunction}{ \GetTranslation{and} } +\setrangeconjunction}{ \GetTranslation{to} } +\setconjunction{, }{ \GetTranslation{and} }{ \GetTranslation{to} } +\end{lstlisting} +\DescribeMacro{\setjuncto} +\DescribeMacro{\unsetjuncto} +\translation{% + There are also macros to easily switch to legacy notation. + With \cmd{\setjuncto}, one can switch throughout the document to the conjunction word `\texttt{ jo.\textbackslash\ }'. + Using \cmd{\unsetjuncto} restores \cmd{\lastconjunction} back to `\texttt{ and }'. + If manual changes have been made to the conjunctions earlier, those changes will be overridden by one of these macros. + In that case, use \cmd{\setlastconjunction}\marg{value} instead of \cmd{\unsetjuncto}. +}{% + Er zijn ook macro's om gemakkelijk naar verouderde notatie te schakelen. + Met \cmd{\setjuncto} kan er willekeurig in het document omgeschakeld worden naar het koppelwoord `\texttt{ jo.\textbackslash\ }'. + Door \cmd{\unsetjuncto} te gebruiken wordt \cmd{\lastconjunction} weer terug gezet naar `\texttt{ en }'. + Als eerder handmatig de koppelingen zijn veranderd, dan zijn die wijzigingen door één van deze macro's overschreven. + Gebruik dan in plaats van \cmd{\unsetjuncto} \cmd{\setlastconjunction}\marg{waarde}. +} +\clearpage + + +\section{\translation{Interdocument References}{Interdocumentaire Verwijzingen}}\label{sec:extern} +\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.} +\DescribeMacro{\refdocument\\\oarg{prefix}\\\marg{name}\\\marg{opts...}} +\translation{% + After specifying \cmd{\refdocument} in the preamble, it is possible to refer to articles, paragraphs, and subparagraphs. + The macro family \cmd{\aref} continues to work seamlessly, thanks to \cmd{\zexternaldocument} from \package{zref-xr}. + To avoid ambiguity, a special \option{prefix} can be added. + If a \option{prefix} is omitted, a default \option{prefix} is still applied, namely \texttt{ext-}. + For instance, label \texttt{lid:lorem} becomes \texttt{ext-lid:lorem}. + Note that the \option{prefix} does not apply when referring to definitions with \cmd{\gls}.% +}{% + Na het opgeven van \cmd{\refdocument} in de preamble kan er naar artikelen, leden en onderdelen verwezen worden. + De macro familie \cmd{\aref} blijft dankzij \cmd{\zexternaldocument} van \package{zref-xr} nog steeds werken. + Om ambiguïteit te voorkomen kan er een speciale \option{prefix} toegevoegd worden. + Bij het weglaten van een \option{prefix} is er alsnog een \option{prefix}, namelijk \texttt{ext-}. + Label \texttt{lid:lorem} wordt dan \texttt{ext-lid:lorem}. + Let wel dat de \option{prefix} niet geldt voor het verwijzen naar definities met \cmd{\gls}.% +}\\ + +\noindent +\DescribeMacro{\masterdocument\\\oarg{prefix}\\\marg{name}\\\marg{opts...}\\} +\translation{% + To create a complete link with other \package{regulatory} documents, the \cmd{\masterdocument} macro is used. + A complete link involves:% +}{% + Om een volledige koppeling te maken met andere \package{regulatory} documenten wordt de \cmd{\masterdocument} macro gebruikt. + Een volledige koppeling houdt in:% +} +\begin{enumerate} + \item \translation{referring with the \cmd{\aref} family}{verwijzen met de \cmd{\aref} familie}; + \item \translation{referencing definitions with the \cmd{\gls} family}{verwijzen naar definities met de \cmd{\gls} familie}; + \item \translation{referring to the associated document}{verwijzen naar het bijbehorende document}; + \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}. +\end{enumerate} +\translation{% + It's even possible for a document to have multiple 'master' documents, as is the case with this document (in Dutch):% +}{% + Het kan zelfs dat een document meerdere `master' documenten heeft, zoals dit document:% +} +\begin{lstlisting}[style=tex] +\newcommand\definitionlabel[1]{~(zie #1)} +\masterdocument[ex1-]{example1}{ + defs=example1, + author=E. Nijenhuis, + subject= Voorbeeld Één, + description = Het éérste voorbeeld document, + ref label=van Voorbeeld Één, + def label=\definitionlabel +} + +\masterdocument[ex2-]{example2}{ + defs=example2, + author=E. Nijenhuis, + subject= Voorbeeld Twee, + description = Het tweede voorbeeld document, + ref label=van Voorbeeld Twee, + def label=\definitionlabel +} +\end{lstlisting} + +\translation{% + Both macros \cmd{\refdocument} and \cmd{\masterdocument} have, as a third argument, a choice among the following options: +}{% + Beide macro's \cmd{\refdocument} en \cmd{\masterdocument} hebben als derde argument keuze uit de volgende opties:% +} +\begin{labeling}{\texttt{footnote label}} + \addtokomafont{labelinglabel}{\ttfamily} + \item[name] \translation{% + by default, the same as the first argument of the macros.% + }{% + standaard hetzelfde als het eerste argument van de macro's.% + } + \item[filename] \translation{% + by default, the first argument concatenated with \texttt{.pdf}. + This option can be overridden if the name does not correspond to the filename.% + }{% + standaard het eerste argument met \texttt{.pdf} geconcateneerd. + Deze optie kan overschreven worden wanneer de naam niet correspondeerd met de bestandsnaam.% + } + \item[ref label] \translation{% + by default, this macro has no value, and in that case, the following default value is used in \cmd{\documentlabel}:% + }{% + standaard heeft deze macro geen waarde en in dat geval wordt er in \cmd{\documentlabel} de volgende standaard waarde gebruikt:% + } \lstinline|\GetTranslation{of the} \artifactsubject{#1}|. + \translation{% + This macro receives the \texttt{name} of the document as an argument.% + }{% + Deze macro krijgt als argument de \texttt{name} van het document.% + } + \item[def label] \translation{% + by default, this macro has the following value:% + }{% + standaard heeft deze macro de volgende waarde:% + } \lstinline|~(\GetTranslation{see} #1)|. + \translation{% + The argument contains the \texttt{subject} with a possible footnote (depending on \texttt{referred}).% + }{% + Het argument bevat de \texttt{subject} met eventueel de footnote (afhankelijk van \texttt{referred}).% + } + \item[footnote] \translation{% + by default, the value is \texttt{true}, so that footnotes are added at the first occurrence. + This can be set to \texttt{false} to prevent this.% + }{% + standaard is de waarde \texttt{true}, zodat er voetnoten geplaatst worden bij de eerste verschijning. + Deze kan naar \texttt{false} gezet worden om dit te voorkomen.% + } + \item[footnote label] \translation{% + This macro receives the attached document with \texttt{subject} as its representation in the text. + By default, this macro only prints the first argument.% + }{% + deze macro krijgt als argument het bijgevoegde document met \texttt{subject} als weergave in de tekst. + Standaard print deze macro enkel het eerste argument.% + } + \item[url] \translation{% + this option is yet to be implemented. + The purpose of this option is to indicate the source of the document in the footnote.% + }{% + deze optie wordt is nog niet geïmplementeerd. + De bedoeling van deze optie is om in de voetnoot de vindplaats van het document te duiden.% + } + \item[referred] \translation{% + This option is for internal use. + \cmd{\documentfootnote} sets this value to \texttt{true}.% + }{% + deze optie is voor intern gebruik. + \cmd{\documentfootnote} zet deze waarde naar \texttt{true}.% + } + \item[defs] \translation{% + This option is used to load external definition lists under this document. + This way, the correct source can be mentioned for first occurrences of definitions.% + }{% + deze optie wordt gebruikt om externe definitielijsten in te laden onder dit document. + Op deze manier kan bij eerste verschijningen van definities de juiste bron vermeldt worden.% + } + \item[author] \translation{% + This option is used in \cmd{\documentattachment} for metadata purposes in some PDF viewing applications.% + }{% + deze optie wordt in \cmd{\documentattachment} gebruikt voor metadata t.b.v.\ sommige PDF-weergave applicaties.% + } + \item[subject] \translation{% + This option is used, like \texttt{author}, in the appendix.% + }{% + deze optie wordt net als \texttt{author} gebruikt in de bijlage.% + } + \item[description] \translation{% + This option is used, like \texttt{author}, in the appendix.% + }{% + deze optie wordt net als \texttt{author} gebruikt in de bijlage.% + } +\end{labeling} + +\noindent +\DescribeMacro{\documentlabel\\\marg{label}} +\DescribeMacro{\documentfootnote\\\oarg{link text}\\\marg{label}} +\DescribeMacro{\documentattachment\\\marg{label}\\\marg{link text}} +\translation{% + 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. + 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.% +}{% + 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. + 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.% +}\\ + +\noindent +\translation{These macros can be called manually.}{Deze macro's kunnen ook handmatig uitgevoerd worden.} +\translation{For example,}{Neem b\ij{}voorbeeld} \lstinline[style=tex]|\documentfootnote{example2}| \translation{, which results in}{wat zou leiden tot}: +`\documentfootnote{example2-\translation{en}{nl}}'. + +\clearpage + + +\section{\translation{Language Support}{Taalondersteuning}} +\translation{% + Initially, this package only provided support for Dutch. + When English was implemented, certain macros were added to facilitate easy switching between languages. + 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.% +}{% + In beginsel bood dit pakket alleen ondersteuning voor Nederlands. + Toen Engels geïmplementeerd werd zijn er bepaalde macro's bij gekomen, zodat er makkelijk geschakeld kan worden tussen talen. + De notatie van verwijzingen in het Engels en Nederlands verschilt dusdanig dat de instelling van een taal enigszins complex kan zijn. + Echter, dit maakt het mogelijk aanpasbaar voor andere talen.% +}\\ + +\noindent +\DescribeMacro{\rref@setup\\\marg{lang}\\\marg{article opts...}\\\marg{para opts...}\\\marg{sub opts...}} +\translation{% + The \cmd{\rref@setup} macro takes the \meta{language} as first argument. + The other three arguments accept multiple options, namely:% +}{% + De \cmd{\rref@setup} macro heeft als eerste argument \meta{de taal} die moet worden ingesteld. + De andere drie argumenten accepteren meerdere opties, namelijk:% +} +\begin{labeling}{\texttt{group conjunction}} + \addtokomafont{labelinglabel}{\ttfamily} + \item[name] + \translation{% + the designation in lower case. + For example `article', `art.', `par', et cetera. + Default for% + }{% + de benaming in kleine letters, b\ij{}voorbeeld `artikel', `art.', `onderdeel', enzovoort. + Standaard voor% + }\\\GetTranslation{article} \lstinline|\GetTranslation{article}|, \\\GetTranslation{paragraph} \lstinline|\GetTranslation{paragraph}| \GetTranslation{and} \\\GetTranslation{subparagraph} \lstinline|\GetTranslation{subparagraph}|.% + \item[Name] \translation{% + 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.% + }{% + de benaming beginnend met een hoofdletter, b\ij{}voorbeeld `Artikel'. + Net als \texttt{name} gebruikt deze optie standaard \cmd{\GetTranslation}, maar dan met een hoofdletter.% + } + \item[ref format] \translation{% + a macro with one argument, namely the current number. + For example, for a member (or subparagraph in English), \cmd{\ordinalstringnum} is used for this. + In such cases, it is important to consider case sensitivity using \cmd{\@ifrrefcap}. + Example:% + }{% + een macro met één argument, namelijk het huidige nummer. + Voor bijvoorbeeld een lid (of subparagraph in het Engels) is hiervoor \cmd{\ordinalstringnum} gebruikt. + In zo'n geval is het belangrijk om rekening te houden met hoofdletter gevoeligheid d.m.v.\ \cmd{\@ifrrefcap}. + Voorbeeld:% + } \lstinline[style=tex]|\@ifrrefcap{\Ordinalstringnum{...}}{\ordinalstringnum{...}}|. + \item[label format] \translation{% + the order of the reference and the name. + This macro takes two arguments, namely the \texttt{name} and the result of \texttt{ref format}. + 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.}. + Note that you need to specify a macro. + In the first example, you would pass \cmd{\mylabelformat} as an option and define it as: + }{% + de volgorde van de verwijzing en de naam. + Deze macro krijgt twee argumenten mee, namelijk de \texttt{name} en het resultaat van \texttt{ref format}. + 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.}. + Let wel dat je een macro dient op te geven. + Bij het eerste voorbeeld zou je \cmd{\mylabelformat} als optie meegeven en zou gedefinieerd zijn als: + }\lstinline[style=tex]|\newcommand\mylabelformat[2]{#1 #2}|. + \item[group conjunction] \translation{% + This value indicates how it should be linked to the parent part. + For example (Dutch), in ``artikel\Vtextvisiblespace1\textcolor{red}{,\Vtextvisiblespace}eerste\Vtextvisiblespace lid,'' the \texttt{group conjunction} is set to \lstinline|{,~}| for the article.% + }{% + deze waarde geeft aan hoe het dient gekoppeld te worden aan het bovenliggende onderdeel. + Bijvoorbeeld, in ``artikel\Vtextvisiblespace1\textcolor{red}{,\Vtextvisiblespace}eerste\Vtextvisiblespace lid'' is de \texttt{group conjunction} bij de instelling van het artikel gelijk aan \lstinline|{,~}|.% + } + \item[group format] \translation{% + This option accepts a macro with one argument. + The first argument contains all subparts. + For example, in English, for a subparagraph/onderdeel, the article and paragraph/lid need to be surrounded by square brackets. + The value would then be for the subpart \texttt{{[}\#1{]}}. + }{% + deze optie accepteert een macro met één argument. + Het eerste argument bevat alle onderliggende onderdelen. + Bijvoorbeeld in het Engels dient bij een subparagraph/onderdeel het artikel en paragraph/lid omringd te worden met blokhaken. + De waarde is dan bij het onderdeel \texttt{{[}\#1{]}}. + } +\end{labeling} +\translation{% + These options can vary for each article, paragraph, and subparagraph. + + When defining a new language, it's important to know that the default values are based on the English configuration. + For example, consider the Dutch configuration, including all the used helper macros: +}{% + Deze opties kunnen verschillen per artikel, lid en onderdeel. + + Bij het definiëren van een nieuwe taal is het belangrijk om te weten dat de standaard waarden gebaseerd zijn op de Engelse configuratie. + Neem bijvoorbeeld de Nederlandse configuratie, inclusief alle gebruikte hulp macro's:% +} +\begin{lstlisting}[style=TeX,caption={\translation{Dutch configuration}{Nederlandse configuratie}},numbers=left] +\newcommand\rref@refformat@noop[1]{#1} +\newcommand\rref@refformat@parenthesis[1]{(#1)} +\newcommand\rref@refformat@ordinal[1]{% + \@ifrrefcap{% + \Ordinalstringnum{#1}% + }{% + \ordinalstringnum{#1}% + }% +} +\newcommand\rref@refformat@alpha[1]{% + \@ifrrefcap{% + \ABAlphnum{#1}% + }{% + \abalphnum{#1}% + }% +} +\newcommand\rref@label@prefix[2]{#1 #2} +\newcommand\rref@label@postfix[2]{#2 #1} +\newcommand\rref@label@refonly[2]{\@gobble{#1}#2} +\newcommand\rref@group@braced[1]{{[}#1{]~}} + +\rref@setup{dutch}{ + group conjunction={,~} +}{ + ref format=\rref@refformat@ordinal, + label format=\rref@label@postfix, + group conjunction={,~}, + group format=\rref@refformat@noop +}{ + ref format=\rref@refformat@alpha, + label format=\rref@label@prefix, + group conjunction={,~}, + group format=\rref@refformat@noop +} +\end{lstlisting} + +\clearpage +\section*{\translation{Examples}{Voorbeelden}}\label{sec:example} +\lstset{numbers=left,frame=single} +\lstinputlisting[style=tex,numbers=left,caption={example1.tex},label={code:example1}]{example1.tex} + +\lstinputlisting[style=tex,numbers=left,caption={example2.tex},label={code:example2}]{example2.tex}\clearpage + +\lstinputlisting[style=tex,numbers=left,caption={md-example.tex},label={code:md-example}]{md-example.tex}\clearpage + +\lstinputlisting[style=md,numbers=left,caption={example.md},label={code:example-md}]{example.md}\clearpage + +\lstinputlisting[style=bib,numbers=left,caption={example1.bib}]{example1.bib} + +\lstinputlisting[style=bib,numbers=left,caption={example2.bib}]{example2.bib} diff --git a/Master/texmf-dist/tex/latex/regulatory/fc-dutch.def b/Master/texmf-dist/tex/latex/regulatory/fc-dutch.def new file mode 100644 index 00000000000..e1e14321219 --- /dev/null +++ b/Master/texmf-dist/tex/latex/regulatory/fc-dutch.def @@ -0,0 +1,424 @@ +%% fc-dutch.def +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\ProvidesFCLanguage{dutch}[2022/06/19] + +\newcommand{\@ordinalMdutch}[2]{\edef#2{\number#1\relax.}} +\global\let\@ordinalMdutch\@ordinalMdutch +\newcommand{\@ordinalFdutch}[2]{\edef#2{\number#1\relax.}} +\global\let\@ordinalFdutch\@ordinalFdutch +\newcommand{\@ordinalNdutch}[2]{\edef#2{\number#1\relax.}} +\global\let\@ordinalNdutch\@ordinalNdutch + +\newcommand*\@@unitstringdutch[1]{% + \ifcase#1% + nul% + \or één% + \or twee% + \or drie% + \or vier% + \or vijf% + \or zes% + \or zeven% + \or acht% + \or negen% + \fi +}% +\global\let\@@unitstringdutch\@@unitstringdutch + +\global\let\@@unitstringdutch\@@unitstringdutch +\newcommand*\@@tenstringdutch[1]{% + \ifcase#1% + \or tien% + \or twintig% + \or dertig% + \or veertig% + \or vijftig% + \or zestig% + \or zeventig% + \or tachtig% + \or negentig% + \or honderd% + \fi +}% +\global\let\@@tenstringdutch\@@tenstringdutch + +\providecommand*{\honderd}{honderd}% +\providecommand*{\duizend}{duizend}% +\global\let\honderd\honderd +\global\let\duizend\duizend + +\newcommand*\@@teenstringdutch[1]{% + \ifcase#1% + tien% + \or elf% + \or twaalf% + \or dertien% + \or veertien% + \or vijftien% + \or zestien% + \or zeventien% + \or achttien% + \or negentien% + \fi +}% +\global\let\@@teenstringdutch\@@teenstringdutch + +\newcommand*{\@numberstringMdutch}[2]{% + \let\@unitstring=\@@unitstringdutch + \let\@teenstring=\@@teenstringdutch + \let\@tenstring=\@@tenstringdutch + \@@numberstringdutch{#1}{#2}% +} +\global\let\@numberstringMdutch\@numberstringMdutch +\global\let\@numberstringFdutch=\@numberstringMdutch +\global\let\@numberstringNdutch=\@numberstringMdutch + +\newcommand*{\@NumberstringMdutch}[2]{% +\@numberstringMdutch{#1}{\@@num@str}% +\edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}} +\global\let\@NumberstringMdutch\@NumberstringMdutch +\global\let\@NumberstringFdutch=\@NumberstringMdutch +\global\let\@NumberstringNdutch=\@NumberstringMdutch + +\newcommand*{\@ordinalstringMdutch}[2]{% + \let\@unitthstring=\@@unitthstringMdutch + \let\@teenthstring=\@@teenthstringMdutch + \let\@tenthstring=\@@tenthstringMdutch + \let\@unitstring=\@@unitstringdutch + \let\@teenstring=\@@teenstringdutch + \let\@tenstring=\@@tenstringdutch + \def\@thousandth{duizendste}% + \def\@hundredth{honderdste}% + \@@ordinalstringdutch{#1}{#2}% +}% +\global\let\@ordinalstringMdutch\@ordinalstringMdutch + +\global\let\@ordinalstringMdutch\@ordinalstringMdutch +\newcommand*{\@ordinalstringFdutch}[2]{% + \let\@unitthstring=\@@unitthstringFdutch + \let\@teenthstring=\@@teenthstringFdutch + \let\@tenthstring=\@@tenthstringFdutch + \let\@unitstring=\@@unitstringdutch + \let\@teenstring=\@@teenstringdutch + \let\@tenstring=\@@tenstringdutch + \def\@thousandth{duizendste}% + \def\@hundredth{honderdste}% + \@@ordinalstringdutch{#1}{#2}% +}% +\global\let\@ordinalstringFdutch\@ordinalstringFdutch + +\newcommand*{\@ordinalstringNdutch}[2]{% + \let\@unitthstring=\@@unitthstringNdutch + \let\@teenthstring=\@@teenthstringNdutch + \let\@tenthstring=\@@tenthstringNdutch + \let\@unitstring=\@@unitstringdutch + \let\@teenstring=\@@teenstringdutch + \let\@tenstring=\@@tenstringdutch + \def\@thousandth{duizendste}% + \def\@hundredth{honderdste}% + \@@ordinalstringdutch{#1}{#2}% +}% +\global\let\@ordinalstringNdutch\@ordinalstringNdutch + +\newcommand*{\@OrdinalstringMdutch}[2]{% + \@ordinalstringMdutch{#1}{\@@num@str}% + \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% +}% +\global\let\@OrdinalstringMdutch\@OrdinalstringMdutch +\newcommand*{\@OrdinalstringFdutch}[2]{% + \@ordinalstringFdutch{#1}{\@@num@str}% + \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% +}% +\global\let\@OrdinalstringFdutch\@OrdinalstringFdutch +\newcommand*{\@OrdinalstringNdutch}[2]{% + \@ordinalstringNdutch{#1}{\@@num@str}% + \edef#2{\noexpand\MakeUppercase\expandonce\@@num@str}% +}% +\global\let\@OrdinalstringNdutch\@OrdinalstringNdutch + +\newcommand*\@@unitthstringMdutch[1]{% + \ifcase#1% + nulde% + \or eerste% + \or tweede% + \or derde% + \or vierde% + \or vijfde% + \or zesde% + \or zevende% + \or achtste% + \or negende% + \fi +}% +\global\let\@@unitthstringMdutch\@@unitthstringMdutch +\newcommand*\@@tenthstringMdutch[1]{% + \ifcase#1% + \or tiende% + \or twintigste% + \or dertigste% + \or veertigste% + \or vijftigste% + \or zestigste% + \or zeventigste% + \or tachtigste% + \or negentigste% + \fi +}% +\global\let\@@tenthstringMdutch\@@tenthstringMdutch +\newcommand*\@@teenthstringMdutch[1]{% + \ifcase#1% + tiende% + \or elfde% + \or twaalfde% + \or dertiende% + \or veertiende% + \or vijftiende% + \or zestiende% + \or zeventiende% + \or achttiende% + \or negentiende% + \fi +}% +\global\let\@@teenthstringMdutch\@@teenthstringMdutch +\newcommand*\@@unitthstringFdutch[1]{% + \ifcase#1% + nullte% + \or eerste% + \or tweede% + \or derde% + \or vierde% + \or vijfde% + \or zesde% + \or zevende% + \or achtste% + \or negende% + \fi +}% +\global\let\@@unitthstringFdutch\@@unitthstringFdutch +\newcommand*\@@tenthstringFdutch[1]{% + \ifcase#1% + \or tiende% + \or twintigste% + \or dertigste% + \or veertigste% + \or vijftigste% + \or zestigste% + \or zeventigste% + \or tachtigste% + \or negentigste% + \fi +}% +\global\let\@@tenthstringFdutch\@@tenthstringFdutch +\newcommand*\@@teenthstringFdutch[1]{% + \ifcase#1% + tiende% + \or elfde% + \or twaalfde% + \or dertiende% + \or veertiende% + \or vijftiende% + \or zestiende% + \or zeventiende% + \or achttiende% + \or zegentiende% + \fi +}% +\global\let\@@teenthstringFdutch\@@teenthstringFdutch +\newcommand*\@@unitthstringNdutch[1]{% + \ifcase#1% + nulde% + \or eerste% + \or tweede% + \or derde% + \or vierde% + \or vijfde% + \or zesde% + \or zevende% + \or achtste% + \or negende% + \fi +}% +\global\let\@@teenthstringNdutch\@@teenthstringNdutch +\newcommand*\@@numberunderhundreddutch[2]{% +\ifnum#1<10\relax + \ifnum#1>0\relax + \eappto#2{\@unitstring{#1}}% + \fi +\else + \@tmpstrctr=#1\relax + \@FCmodulo{\@tmpstrctr}{10}% + \ifnum#1<20\relax + \eappto#2{\@teenstring{\@tmpstrctr}}% + \else + \ifnum\@tmpstrctr=0\relax + \else + \eappto#2{\@unitstring{\@tmpstrctr}en}% + \fi + \@tmpstrctr=#1\relax + \divide\@tmpstrctr by 10\relax + \eappto#2{\@tenstring{\@tmpstrctr}}% + \fi +\fi +}% +\global\let\@@numberunderhundreddutch\@@numberunderhundreddutch +\newcommand*\@@numberstringdutch[2]{% +\ifnum#1>99999\relax + \PackageError{fmtcount}{Out of range}% + {This macro only works for values less than 100000}% +\else + \ifnum#1<0\relax + \PackageError{fmtcount}{Negative numbers not permitted}% + {This macro does not work for negative numbers, however + you can try typing "minus" first, and then pass the modulus of + this number}% + \fi +\fi +\def#2{}% +\@strctr=#1\relax \divide\@strctr by 1000\relax +\ifnum\@strctr>1\relax + \@@numberunderhundreddutch{\@strctr}{#2}% + \appto#2{duizend}% +\else + \ifnum\@strctr=1\relax + \eappto#2{\eintausend}% + \fi +\fi +\@strctr=#1\relax +\@FCmodulo{\@strctr}{1000}% +\divide\@strctr by 100\relax +\ifnum\@strctr>1\relax + \eappto#2{\@unitstring{\@strctr}honderd}% +\else + \ifnum\@strctr=1\relax + \ifnum#1>1000\relax + \appto#2{honderd}% + \else + \eappto#2{\honderd}% + \fi + \fi +\fi +\@strctr=#1\relax +\@FCmodulo{\@strctr}{100}% +\ifnum#1=0\relax + \def#2{null}% +\else + \ifnum\@strctr=1\relax + \appto#2{één}% + \else + \@@numberunderhundreddutch{\@strctr}{#2}% + \fi +\fi +}% +\global\let\@@numberstringdutch\@@numberstringdutch +\newcommand*\@@numberunderhundredthdutch[2]{% +\ifnum#1<10\relax + \eappto#2{\@unitthstring{#1}}% +\else + \@tmpstrctr=#1\relax + \@FCmodulo{\@tmpstrctr}{10}% + \ifnum#1<20\relax + \eappto#2{\@teenthstring{\@tmpstrctr}}% + \else + \ifnum\@tmpstrctr=0\relax + \else + \eappto#2{\@unitstring{\@tmpstrctr}-en-}% + \fi + \@tmpstrctr=#1\relax + \divide\@tmpstrctr by 10\relax + \eappto#2{\@tenthstring{\@tmpstrctr}}% + \fi +\fi +}% +\global\let\@@numberunderhundredthdutch\@@numberunderhundredthdutch +\newcommand*\@@ordinalstringdutch[2]{% +\@orgargctr=#1\relax +\ifnum\@orgargctr>99999\relax + \PackageError{fmtcount}{Out of range}% + {This macro only works for values less than 100000}% +\else + \ifnum\@orgargctr<0\relax + \PackageError{fmtcount}{Negative numbers not permitted}% + {This macro does not work for negative numbers, however + you can try typing "minus" first, and then pass the modulus of + this number}% + \fi +\fi +\def#2{}% +\@strctr=\@orgargctr\divide\@strctr by 1000\relax +\ifnum\@strctr>1\relax +\@@numberunderhundreddutch{\@strctr}{#2}% + \@tmpstrctr=\@orgargctr\@FCmodulo{\@tmpstrctr}{1000}% + \ifnum\@tmpstrctr=0\relax + \eappto#2{\@thousandth}% + \else + \appto#2{duizend}% + \fi +\else + \ifnum\@strctr=1\relax + \ifnum\@orgargctr=1000\relax + \eappto#2{\@thousandth}% + \else + \eappto#2{\duizend}% + \fi + \fi +\fi +\@strctr=\@orgargctr +\@FCmodulo{\@strctr}{1000}% +\divide\@strctr by 100\relax +\ifnum\@strctr>1\relax + \@tmpstrctr=\@orgargctr \@FCmodulo{\@tmpstrctr}{100}% + \ifnum\@tmpstrctr=0\relax + \ifnum\@strctr=1\relax + \eappto#2{\@hundredth}% + \else + \eappto#2{\@unitstring{\@strctr}\@hundredth}% + \fi + \else + \eappto#2{\@unitstring{\@strctr}honderd}% + \fi +\else + \ifnum\@strctr=1\relax + \@tmpstrctr=\@orgargctr \@FCmodulo{\@tmpstrctr}{100}% + \ifnum\@tmpstrctr=0\relax + \eappto#2{\@hundredth}% + \else + \ifnum\@orgargctr>1000\relax + \appto#2{honderd}% + \else + \eappto#2{\honderd}% + \fi + \fi + \fi +\fi +\@strctr=\@orgargctr +\@FCmodulo{\@strctr}{100}% +\ifthenelse{\@strctr=0 \and \@orgargctr>0 }{}{% +\@@numberunderhundredthdutch{\@strctr}{#2}% +}% +}% +\global\let\@@ordinalstringdutch\@@ordinalstringdutch +%\FCloadlang{dutchb}% +\iffalse Local variables: \fi +\iffalse mode: docTeX \fi +\iffalse End: \fi +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/regulatory/regulatory.sty b/Master/texmf-dist/tex/latex/regulatory/regulatory.sty new file mode 100644 index 00000000000..f6b3be5e881 --- /dev/null +++ b/Master/texmf-dist/tex/latex/regulatory/regulatory.sty @@ -0,0 +1,699 @@ +%% regulatory.sty +%% Copyright 2024 E. Nijenhuis +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status ‘maintained’. +% +% The Current Maintainer of this work is E. Nijenhuis. +% +% This work consists of the files regulatory.tex, +% regulatory-preamble.tex, regulatory-nl.tex, regulatory-en.tex, +% example1.bib, example2.bib, +% example1-nl.tex, example2-nl.tex, +% example1-en.tex, example2-en.tex, +% md-example.tex, example.md, +% fc-dutch.def and regulatory.sty +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{regulatory}[2024/01/16 Xerdi's Regulatory Package] + +\RequirePackage{pgfopts} +\RequirePackage{xifthen} +\RequirePackage{keyval} +\RequirePackage{xstring} +\RequirePackage{xspace} + +\newif\ifregulatory@markdown +\newif\ifregulatory@bibtogls +\newif\ifregulatory@legacy +\newif\ifregulatory@alldefs +\pgfkeys{ + /regulatory/.is family, + /regulatory, + md/.is if=regulatory@markdown, + md=false, + bib2gls/.is if=regulatory@bibtogls, + bib2gls=true, + legacy/.is if=regulatory@legacy, + legacy=false, + alldefs/.is if=regulatory@alldefs, + alldefs=false +} + +\InputIfFileExists{regulatory.cfg}{% + \PackageInfo{regulatory}{Using local configuration file}% +}{% + \PackageInfo{regulatory}{No local configuration file}% +} + +\newboolean{regulatory@nameinlink} +\setboolean{regulatory@nameinlink}{true} + +\ProcessPgfPackageOptions{/regulatory} + +% Markdown support +\ifregulatory@markdown +\RequirePackage[hashEnumerators,definitionLists,hybrid,headerAttributes=true]{markdown} +\setkeys{markdownRenderers}{ +headingOne={\article{#1}}, +olItemWithNumber={\item{}}, +olBeginTight={\begin{paras}}, +olEndTight={\end{paras}}, +olBegin={\begin{paras}}, +olEnd={\end{paras}}, +dlBeginTight={\begin{labeling}{\@glswidestname}}, +dlEndTight={\end{labeling}}, +dlBegin={\begin{labeling}{\@glswidestname}}, +dlEnd={\end{labeling}}% +\renewcommand\markdownRendererOlItemWithNumber[1]{\item{}\label{ml:##1}} +} +\fi + +% Pakketten ná markdown (anders gaat enumitem kapot) +\RequirePackage{xcolor} +\RequirePackage{xassoccnt} +\RequirePackage{xpatch} +\RequirePackage{titlesec} +\RequirePackage{enumitem} +\RequirePackage{fmtcount} +\RequirePackage{scrextend} +\RequirePackage{xr-hyper} +\RequirePackage[user,counter,hyperref,xr]{zref} +\RequirePackage{zref-xr,zref-user,zref-clever,zref-hyperref} +\RequirePackage{hyperref} +\RequirePackage{pgf} +\RequirePackage[sanitize=none,nopostdot]{glossaries} +\ifregulatory@bibtogls +\RequirePackage[record,style=alttree]{glossaries-extra} +\else +\PackageWarning{regulatory}{Using glossaries for definitions without bib2gls. This is mostly untested.} +\fi + +\RequirePackage{attachfile2} +\RequirePackage{translations} + +\newboolean{regulatory@defslisted} +\setboolean{regulatory@defslisted}{false} + +% Kleuren +\providecolor{artlabel}{rgb}{0,0,0} +\providecolor{arttitle}{rgb}{0,0,0} +\providecolor{paralabel}{rgb}{0,0,0} +\providecolor{paratitle}{rgb}{0,0,0} +\providecolor{sublabel}{rgb}{0,0,0} +\providecolor{subtitle}{rgb}{0,0,0} + + + +% Artikelen +\newcounter{article} +\titleclass{\article}[0]{straight} +\titleformat{\article}{\normalfont\color{arttitle}}{\bfseries\color{artlabel}Artikel \thearticle.\quad}{1em}{} +\titlespacing*{\article}{0pt}{3.5ex plus 1ex minus .2ex}{5pt} + +\newcounter{para} +\titleclass{\para}{straight}[\article] +\titleformat{\para}{\normalfont\color{paratitle}}{\normalfont\color{paralabel}\thearticle.\thepara.\quad}{1em}{} +\titlespacing*{\para}{0pt}{3.5ex plus 1ex minus .2ex}{5pt} +\counterwithin{para}{article} + +\renewcommand{\thearticle}{\arabic{article}} +\renewcommand{\thepara}{\arabic{para}} +\makeatletter +\newcommand{\l@article}{\@dottedtocline{1}{1.5em}{2.3em}} +\def\toclevel@article{2} +\newcommand{\l@para}{\@dottedtocline{1}{3.8em}{2.3em}} +\def\toclevel@para{3} + +\newcounter{provisions} +\newlist{provisions}{enumerate}{1} +\setlist[provisions,1]{label=\arabic*.,align=left,itemsep=0pt} +\counterwithin{provisions}{section} + +\newlist{paras}{enumerate}{2} +\setlist[paras,1]{label=\thearticle.\arabic*.,ref=\arabic*,align=left,itemsep=0pt} +\setlist[paras,2]{label=\abalphnum{\arabic*}),ref=\arabic*,itemsep=0pt} +\counterwithin{parasi}{article} +\counterwithin{parasii}{parasi} + +\zref@newprop{article}[-1]{\number\value{article}} +\zref@newprop{para}[-1]{\ifnum\value{para}>0\number\value{para}\else\number\value{parasi}\fi} +\zref@newprop{sub}[-1]{\number\value{parasii}} +\zref@addprops{main}{article,para,sub} + +\DeclareTranslation{dutch}{article}{artikel} +\DeclareTranslation{dutch}{paragraph}{lid} +\DeclareTranslation{dutch}{subparagraph}{onderdeel} +\DeclareTranslation{dutch}{Article}{Artikel} +\DeclareTranslation{dutch}{Paragraph}{Lid} +\DeclareTranslation{dutch}{Subparagraph}{Onderdeel} +\DeclareTranslation{dutch}{to}{tot} +\DeclareTranslation{dutch}{Definitions}{Definities} +\DeclareTranslation{dutch}{of the}{van de} + +\zcRefTypeSetup{article}{% + Name-sg = \GetTranslation{Article}, + name-sg = \GetTranslation{article}, + Name-pl = Artikelen, + name-pl = artikelen +} +\zcRefTypeSetup{para}{% + Name-sg = \GetTranslation{Paragraph}, + name-sg = \GetTranslation{paragraph}, + Name-pl = Leden, + name-pl = leden +} +\zcRefTypeSetup{parasi}{% + Name-sg = \GetTranslation{Paragraph}, + name-sg = \GetTranslation{paragraph}, + Name-pl = Leden, + name-pl = leden +} +\zcRefTypeSetup{parasii}{% + Name-sg = \GetTranslation{Subparagraph}, + name-sg = \GetTranslation{subparagraph}, + Name-pl = Onderdelen, + name-pl = onderdelen +} + +\makeatother +{\catcode`\#=12 \gdef\hashchar{#}} +\makeatletter +\def\rref@linkpr{\href{\rref@current@fullurl}} + +\newboolean{rref@cap} +\def\@ifrrefcap#1#2{% + \ifthenelse{\boolean{rref@cap}}{% + #1% + \ifthenelse{\equal{#1}{}}{}{% + \setboolean{rref@cap}{false}% + }% + }{% + #2% + }% +} +\def\@ifnameinlink#1#2{% + \ifthenelse{\boolean{regulatory@nameinlink}}{#1}{#2}% +} + +\newcommand\rref@middleconjunction{, } +\newcommand\rref@lastconjunction{ \GetTranslation{and} } +\newcommand\rref@rangeconjunction{ \GetTranslation{to} } + +\newcommand\setmiddleconjunction[1]{\renewcommand\rref@middleconjunction{#1}} +\newcommand\setlastconjunction[1]{\renewcommand\rref@lastconjunction{#1}} +\newcommand\setrangeconjunction[1]{\renewcommand\rref@rangeconjunction{#1}} + +\newcommand\setconjunction[3]{% + \setmiddleconjunction{#1}% + \setlastconjunction{#1}% + \setrangeconjunction{#1}% +} + +\newcommand\setjuncto{% +\setlastconjunction{ jo.\ }% +} + +\newcommand\unsetjuncto{% +\setlastconjunction{ \GetTranslation{and} }% +} + +\ifregulatory@legacy +\setjuncto +\fi + +\newcommand\rref@refformat@noop[1]{#1} +\newcommand\rref@refformat@parenthesis[1]{(#1)} +\newcommand\rref@refformat@ordinal[1]{\@ifrrefcap{\Ordinalstringnum{#1}}{\ordinalstringnum{#1}}} +\newcommand\rref@refformat@alpha[1]{\@ifrrefcap{\ABAlphnum{#1}}{\abalphnum{#1}}} +\newcommand\rref@label@prefix[2]{#1 #2} +\newcommand\rref@label@postfix[2]{#2 #1} +\newcommand\rref@label@refonly[2]{\@gobble{#1}#2} +\newcommand\rref@group@braced[1]{{[}#1{]~}} + +\newcommand\rref@init@lang@article[1]{% + \pgfkeys{/rref/#1/article/.is family, + /rref/#1/article, + name/.initial=\GetTranslation{article}, + Name/.initial=\GetTranslation{Article}, + ref format/.initial=\rref@refformat@noop, + label format/.initial=\rref@label@prefix, + group conjunction/.initial={}, + group format/.initial=\rref@refformat@noop + } +} +\newcommand\rref@init@lang@para[1]{% + \pgfkeys{/rref/#1/para/.is family, + /rref/#1/para, + name/.initial=\GetTranslation{paragraph}, + Name/.initial=\GetTranslation{Paragraph}, + ref format/.initial=\rref@refformat@parenthesis, + label format/.initial=\rref@label@refonly, + group conjunction/.initial={,}, + group format/.initial=\rref@refformat@noop + } +} +\newcommand\rref@init@lang@sub[1]{% + \pgfkeys{/rref/#1/sub/.is family, + /rref/#1/sub, + name/.initial=\GetTranslation{subparagraph}, + Name/.initial=\GetTranslation{Subparagraph}, + ref format/.initial=\rref@refformat@ordinal, + label format/.initial=\rref@label@postfix, + group conjunction/.initial={,}, + group format/.initial=\rref@group@braced + } +} + +\newcommand\rref@setup@lang[3]{% + \pgfkeys{/rref/#1/#2,#3} +} + +\newcommand\rref@setup[4]{% + \rref@init@lang@article{#1} + \rref@init@lang@para{#1} + \rref@init@lang@sub{#1} + \rref@setup@lang{#1}{article}{#2} + \rref@setup@lang{#1}{para}{#3} + \rref@setup@lang{#1}{sub}{#4} +} + +% The defaults are already based on English, so no arguments are given. +\rref@setup{english}{}{}{} + +\rref@setup{dutch}{ + group conjunction={,~} +}{ + ref format=\rref@refformat@ordinal, + label format=\rref@label@postfix, + group conjunction={,~}, + group format=\rref@refformat@noop +}{ + ref format=\rref@refformat@alpha, + label format=\rref@label@prefix, + group conjunction={,~}, + group format=\rref@refformat@noop +}% + +\newcommand\rref@set[4][\languagename]{% + \pgfkeysgetvalue{/rref/#1/#2/#3}{#4}% +} + +\newcommand\rref@get[3][\languagename]{% + \pgfkeysvalueof{/rref/#1/#2/#3}% +} + +\newcommand\rref@name[2][\languagename]{\@ifrrefcap{\rref@get[#1]{#2}{Name}}{\rref@get[#1]{#2}{name}}} +\def\rref@article@name{\rref@name{article}} +\def\rref@para@name{\rref@name{para}} +\def\rref@sub@name{\rref@name{sub}} + +\newcommand\rref@refformat[2][\rref@current@type]{\rref@set{#1}{ref format}{\@@rrefformat}\@@rrefformat{#2}} +\newcommand\rref@labelformat[2][\rref@current@type]{\rref@set{#1}{label format}{\@@labelformat}\@@labelformat{\rref@name{#1}}{#2}} +\newcommand\rref@linkformat[2][\rref@current@type]{% + \@ifnameinlink{% + \rref@linkpr{\rref@labelformat[#1]{\rref@refformat[#1]{#2}}}% + }{% + \rref@labelformat[#1]{\rref@linkpr{\rref@refformat[#1]{#2}}}% + }% +} +\newcommand\rref@reflink[2][\rref@current@type]{% + \rref@linkpr{\rref@refformat[#1]{#2}}% +} +\newcommand\rref@groupformat[2][\rref@current@type]{% + \rref@set{#1}{group format}{\@@groupformat}\@@groupformat{#2}% +} + +\def\rref{\@ifstar\rref@star\rref@nostar} +\def\rref@star#1{% + \rref@setcurrent{#1}% + \ifnum\rref@current@value>0% + \rref@refformat{\rref@current@value}% + \else% + \zref{#1}% + \fi% +} +\def\rref@nostar#1{% + \rref@setcurrent{#1}% + \ifnum\rref@current@value>0% + \rref@linkpr{\rref@refformat{\rref@current@value}}% + \else% + \zcref[noname]{#1}% + \fi% +} +\def\Rref{\@ifstar\Rref@star\Rref@nostar} +\def\Rref@star#1{% + \setboolean{rref@cap}{true}% + \rref*{#1}% +} +\def\Rref@nostar#1{% + \setboolean{rref@cap}{true}% + \rref{#1}% +} + +\def\nref{\@ifstar\nref@star\nref@nostar} +\def\nref@star#1{% + \rref@setcurrent{#1}% + \ifnum\rref@current@value>0% + \rref@labelformat{\rref@refformat{\rref@current@value}}% + \else% + \zcref*{#1}% + \fi% +} +\def\nref@nostar#1{% + \rref@setcurrent{#1}% + \ifnum\rref@current@value>0% + \rref@linkformat{\rref@current@value}% + \else% + \zcref{#1}% + \fi% +} +\def\Nref{\@ifstar\Nref@star\Nref@nostar} +\def\Nref@star#1{% + \setboolean{rref@cap}{true}% + \nref*{#1}% +} +\def\Nref@nostar#1{% + \setboolean{rref@cap}{true}% + \nref{#1}% +} + +\def\rref@setcurrent#1{% + \def\rref@current{#1}% + \def\rref@current@counter{\zref@extract{#1}{counter}}% + \def\rref@current@article{\zref@extract{#1}{article}}% + \def\rref@current@para{\zref@extract{#1}{para}}% + \def\rref@current@sub{\zref@extract{#1}{sub}}% + \rref@settype% + \rref@setlink% +} +\def\rref@settype{% + \ifthenelse{\equal{article}{\rref@current@counter}}{% + \def\rref@current@type{article}% + \def\rref@current@value{\rref@current@article}% + \def\rref@current@fullformat{}% + }{% + \ifthenelse{\equal{para}{\rref@current@counter}\or\equal{parasi}{\rref@current@counter}}{% + \def\rref@current@type{para}% + \def\rref@current@value{\rref@current@para}% + }{% + \ifthenelse{\equal{parasii}{\rref@current@counter}}{% + \def\rref@current@type{sub}% + \def\rref@current@value{\rref@current@sub}% + }{% + \def\rref@current@type{}% + \def\rref@current@value{-1}% + }% + }% + }% +} +\def\rref@setlink{% + \def\rref@current@anchor{\zref@extract{\rref@current}{anchor}}% + \def\rref@current@url{\zref@extractdefault{\rref@current}{url}{}}% + \def\rref@current@fullurl{\rref@current@url\hashchar\rref@current@anchor}% +} +\newcommand\rref@number[1]{% + \zref@extractdefault{#1}{\rref@current@type}{-1}% +} + +\newcommand\aref@setcurrent[1]{% + \def\aref@current@reflink{\rref@reflink[\rref@current@type]{\rref@current@value}}% + \zref@ifrefcontainsprop{#1}{externaldocument}{% + \filename@parse{\expanded{\zref@extract{#1}{externaldocument}}}% + \edef\@aref@filelabel{\expanded{\filename@base}}% + \def\@aref@postlink{% + , \documentlabel{\@aref@filelabel}% + \ifthenelse{\equal{\artifactfootnote{\@aref@filelabel}}{true}\and\equal{\artifactreferred{\@aref@filelabel}}{false}}{% + \documentfootnote{\@aref@filelabel}% + }{}% + }% + }{% + \def\@aref@postlink{}% + }% + \ifthenelse{\equal{\rref@current@type}{article}}{% + \def\@aref@prefix{}% + \def\@aref@postfix{}% + }{% + \ifthenelse{\equal{\rref@current@type}{para}}{% + \def\@aref@prefix{% + \rref@labelformat[article]{\rref@current@article}\rref@get{article}{group conjunction}% + }% + \def\@aref@postfix{}% + }{% + \ifthenelse{\equal{\rref@current@type}{sub}}{% + \def\@aref@prefix{% + \rref@labelformat[article]{\rref@refformat[article]{\rref@current@article}}\rref@get{article}{group conjunction}% + \rref@labelformat[para]{\rref@refformat[para]{\rref@current@para}}\rref@get{para}{group conjunction}% + }% + \def\@aref@postfix{}% + }{% + \def\@aref@prefix{}% + \def\@aref@postfix{}% + }% + }% + }% +} + +\newcommand{\aref}[1]{% + \def\@@arefsetup##1##2{% + \rref@setcurrent{##1}% + \aref@setcurrent{##1}% + \rref@groupformat{\@aref@prefix}% + ##2% + \@aref@postfix\@aref@postlink% + }% + \IfSubStr{#1}{,}{% + \StrBefore[1]{#1}{,}[\firstarg]% + \@@arefsetup{\firstarg}{\rref@labelformat{\aref@group{#1}}}% + }{% + \@@arefsetup{#1}{\nref{#1}}% + }% +} + +\newcommand{\Aref}[1]{% + \setboolean{rref@cap}{true}% + \aref{#1}% +} + +\def\listterminator{-1} + +\newcommand\aref@group[1]{% + \bubblesort{#1}% + \expandafter\begincompaction\sortedlist,\listterminator,\relax% +} +\def\begincompaction#1,#2\relax{% + \def\startlist{#1}% + \def\currentendlist{#1}% + \findendlist#2\relax% +} +\def\findendlist#1,#2\relax{% + \ifnum\numexpr\rref@number{\currentendlist}+1\relax=\rref@number{#1}\relax% + \def\currentendlist{#1}% + \findendlist#2\relax% + \else% + \ifnum\rref@number{\startlist}=\rref@number{\currentendlist}\relax% + \ignorespaces\rref{\startlist}\unskip% + \else% + \ifnum\numexpr\rref@number{\startlist}+1\relax=\rref@number{\currentendlist}\relax% + \ignorespaces\rref{\startlist}\unskip% + \ifnum\rref@number{#1}=\listterminator\relax% + \rref@lastconjunction% + \else% + \rref@middleconjunction% + \fi\ignorespaces% + \rref{\currentendlist}\unskip% + \else% + \ignorespaces\rref{\startlist}\unskip\rref@rangeconjunction\ignorespaces% + \rref{\currentendlist}\unskip% + \fi% + \fi% + \ifnum\rref@number{#1}=\listterminator\else% + \IfStrEq{#2}{\listterminator,}{\rref@lastconjunction}{\rref@middleconjunction}\begincompaction#1,#2\relax% + \fi% + \fi% +} +\newcommand\bubblesort[1]{\def\sortedlist{}\sortlist#1,\listterminator,\relax} +\def\sortlist#1,#2,#3\relax{% + \rref@setcurrent{#1}% + \aref@setcurrent{#1}% + \ifnum\rref@number{#2}=\listterminator\relax% + \edef\sortedlist{\sortedlist#1}% + \else% + \ifnum\rref@number{#1}<\rref@number{#2}\relax% + \edef\sortedlist{\sortedlist#1,}% + \sortlist#2,#3\relax% + \else% + \let\tmp\sortedlist% + \def\sortedlist{}% + \expandafter\sortlist\tmp#2,#1,#3\relax% + \fi% + \fi% +} + +\GetAllResetLists +\RegisterPostLabelHook{\zlabel} + +\newglossary*{definitions}{Definitions} +\newglossary*{externals}{Externals} + +\newcommand\artifact@footnote@noop[1]{#1} +\newcommand\artifact@def@label@default[1]{~(\GetTranslation{see} #1)} + +\newcommand\newartifact[2]{% + \pgfkeys{ + /artifact/#1/.is family, + /artifact/#1, + name/.initial = #1, + filename/.initial = #1.pdf, + path/.initial = ./, + ref label/.initial=, + def label/.initial=\artifact@def@label@default, + footnote/.initial = true, + footnote label/.initial=\artifact@footnote@noop, + url/.initial=, + referred/.initial = false, + defs/.initial=, + author/.initial=<author>, + subject/.initial=<subject>, + description/.initial=<description> + } + \pgfkeys{/artifact/#1,#2} +} +\newcommand\@aget[2]{\pgfkeysvalueof{/artifact/#1/#2}} +\newcommand\artifact@setfootnotelabel[1]{\pgfkeysgetvalue{/artifact/#1/footnote label}{\artifactfootnotelabel}} +\newcommand\artifactname[1]{\@aget{#1}{name}} +\newcommand\artifactfullname[1]{\@aget{#1}{path}\@aget{#1}{name}} +\newcommand\artifactfilename[1]{\@aget{#1}{filename}} +\newcommand\artifactfullfilename[1]{\@aget{#1}{path}\@aget{#1}{filename}} +\newcommand\artifactfootnote[1]{\@aget{#1}{footnote}} +\newcommand\artifacturl[1]{\@aget{#1}{url}} +\newcommand\artifactreferred[1]{\@aget{#1}{referred}} +\newcommand\artifactdefs[1]{\@aget{#1}{defs}} +\newcommand\artifactauthor[1]{\@aget{#1}{author}} +\newcommand\artifactsubject[1]{\@aget{#1}{subject}} +\newcommand\artifactdescription[1]{\@aget{#1}{description}} + +\renewcommand{\glossarysection}[2][]{\@gobble{#1}\@gobble{#2}}% +\setglossarypreamble[definitions]{% + \ifnum\value{article}=0% + \article{\GetTranslation{Definitions}}\label{art:definitions}% + \vspace*{-\baselineskip}% + \else% + \ifnum\value{parasi}=0% + \vspace*{-\baselineskip}% + \fi% + \fi% +} + +\newcommand\describe[1]{\setboolean{regulatory@defslisted}{true}\glstarget{#1}{\glsentrydesc{#1}}} +\newcommand\printdefs[1]{% + \renewcommand*{\glsnamefont}[1]{\textmd{##1}}% + \setboolean{regulatory@defslisted}{true}% + \glssetwidest{#1}% + \ifnum\value{parasi}>0% + \def\@@wrapper##1{\begin{minipage}{\linewidth}##1\end{minipage}}% + \else% + \def\@@wrapper##1{##1}% + \fi% + \@@wrapper{% + \ifregulatory@bibtogls% + \printunsrtglossary[type=definitions,style=alttree,title={},nonumberlist=true]% + \else% + \printglossary[type=definitions,style=alttree,title={},nonumberlist=true]% + \fi% + }% +} + +\attachfilesetup{color=black} + +\newcommand\documentattachment[2]{% + \def\@tmpfile{\artifactfullfilename{#1}}% + \IfFileExists{\@tmpfile}{% + \textattachfile[description={\artifactdescription{#1}},subject={\artifactsubject{#1}},author={\artifactauthor{#1}}]{\@tmpfile}{#2}}% + {\texttt{#2}}% +} + +\newcommand\documentlabel[1]{% + \def\@@label{\@aget{#1}{ref label}}% + \ifthenelse{\equal{\@@label}{}}{% + \GetTranslation{of the} \artifactsubject{#1}% + }{\@@label}% +} + +\newcommand\documentfootnote[2][]{% + \pgfkeysifdefined{/artifact/#2/referred}{% + \pgfkeys{/artifact/#2,referred=true}% + \artifact@setfootnotelabel{#2}% + \ifthenelse{\equal{#1}{}}{% + \def\artifact@description{\artifactsubject{#2}}% + }{% + \def\artifact@description{#1}% + }% + \footnote{\artifactfootnotelabel{\documentattachment{#2}{\artifact@description}}}% + }{\PackageWarning{regulatory}{Artifact does not exists '#2'}\footnote{DOCUMENT NOT FOUND '#2'}} +} + +\edef\@regulatory@bib@selection{} +\ifregulatory@alldefs +\edef\@regulatory@bib@selection{,selection=all} +\fi + +\newcommand\loadglsdefs[1]{% + \setboolean{regulatory@defslisted}{true}% + \ifregulatory@bibtogls% + \GlsXtrLoadResources[type=definitions,src={#1},sort={nl-NL},category={defs}\@regulatory@bib@selection]% + \else% + \loadglsentries[definitions]{#1}% + \fi% +} + +\newcommand\loadextdefs[2][externals]{% + \ifregulatory@bibtogls% + \GlsXtrLoadResources[type=externals,src={#2},sort={nl-NL},category={#1}]% + \else%}{% + \loadglsentries[externals]{#2}% + \fi%}% + \glsdefpostlink{#1}{% + \ifthenelse{\equal{\artifactreferred{#1}}{true}}{}{% + \@aget{#1}{def label}{% + \artifactsubject{#1}% + \documentfootnote{#1}% + }% + }% + }% +} + +\newcommand\refdocument[3][ext-]{% + \newartifact{#2}{footnote=false,#3}% + \zexternaldocument[#1]{\artifactfullname{#2}}[#2]% +} + +\newcommand\masterdocument[3][ext-]{% + \newartifact{#2}{#3}% + \zexternaldocument[#1]{\artifactfullname{#2}}[#2]% + \ifthenelse{\equal{\string\artifactdefs{#2}}{}}{% + \PackageWarning{regulatory}{No definitions given to the master document. \the\gls commands will therefore not work.}% + }{% + \PackageWarning{regulatory}{Agreement file loads #1, #2, #3.} + \loadextdefs[#2]{\artifactdefs{#2}}% + \ifregulatory@bibtogls% + \glssetcategoryattribute{#2}{targeturl}{\artifactfilename{#2}}% + \glssetcategoryattribute{#2}{targetname}{\glolinkprefix\glslabel}% + \fi% + }% +} + +\AtEndPreamble{% +\ifregulatory@bibtogls\else% +\ifthenelse{\boolean{regulatory@defslisted}}{\makeglossaries}{}% +\fi% +} +\AtEndDocument{% +\ifregulatory@alldefs\glsaddallunused\fi% +} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index dbc0d702739..19efd05bf64 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -722,7 +722,7 @@ my @TLP_working = qw( readablecv readarray realboxes realhats realscripts realtranspose rec-thy recipe recipebook recipecard recorder-fingering recycle rectopma refcheck refcount refenums reflectgraphics refman refstyle - regcount regexpatch register regstats + regcount regexpatch register regstats regulatory reledmac relenc relsize reotex repeatindex repere repltext rerunfilecheck rescansync resmes resolsysteme resphilosophica responsive rest-api diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 08dad6a36ae..ec538ea95ec 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -777,6 +777,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'latex-base', "die 'skipping, use latex'", 'latex-bib-ex', "die 'skipping, author request'", 'latex-bib2-ex', "die 'skipping, author request'", + 'latex-dependency-grapher', "die 'skipping, java'", 'latex-dev', "die 'skipping, use latex-base-dev (and more)'", 'latex-doc', "die 'skipping, use latex'", 'latex-doc-dev', "die 'skipping, use latex-base-dev'", @@ -1843,6 +1844,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'quran-id' => '&POST_onelevel', 'quizztex' => '&POST_onelevel', 'recipebook' => '&POST_rmsymlink', + 'regulatory' => '&POST_onelevel', 'resolsysteme' => '&POST_onelevel', 'rouequestions' => '&POST_onelevel', 'sanskrit' => '&POSTsanskrit', diff --git a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc index 3d0ca12bfe2..ff2dea861f4 100644 --- a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc @@ -182,6 +182,7 @@ depend prtec depend ptptex depend qrbill depend quantumarticle +depend regulatory depend resphilosophica depend resumecls depend revtex diff --git a/Master/tlpkg/tlpsrc/regulatory.tlpsrc b/Master/tlpkg/tlpsrc/regulatory.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/regulatory.tlpsrc |