diff options
author | Karl Berry <karl@freefriends.org> | 2024-01-07 21:27:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-01-07 21:27:54 +0000 |
commit | dc17f7ec95f311ba4bdb0c20ad69839d62777623 (patch) | |
tree | 4a82dbaa71dad581487add94cec6559f2bf08e29 | |
parent | c9080f6a818a36fa6d8785a8b208cc808fa9f1a0 (diff) |
ukbill (6jan24)
git-svn-id: svn://tug.org/texlive/trunk@69339 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/ukbill/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf | bin | 85004 -> 85092 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf | bin | 98484 -> 101813 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex | 59 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ukbill/ukbill.cls | 57 |
6 files changed, 109 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/ukbill/README b/Master/texmf-dist/doc/latex/ukbill/README index 1b7de43e75c..eee87a03d6d 100644 --- a/Master/texmf-dist/doc/latex/ukbill/README +++ b/Master/texmf-dist/doc/latex/ukbill/README @@ -1,6 +1,6 @@ ukbill - easily typeset UK legislation -version: 1.0.2 +version: 1.2 This package provides formatting to easily typeset draft UK legislation. The libre font Palatine Parliamentary is required to use this class: https://github.com/ezgranet/palatine-parliamentary @@ -12,6 +12,8 @@ For suggestions, feature requests, and bug reports, please use the project's GitHub site: https://github.com/ezgranet/ukbill Version history: +06/01/2024: v 1.2 fixed issues with macros not being properly used in template environment + 13/12/2022: v 1.0.2 fixed indent with nostat environment 12/12/2022: v 1.0.1 fixed errors in sample bill—no substantive changes to package diff --git a/Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf b/Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf Binary files differindex 7e2ebf234a9..8ebc864b304 100644 --- a/Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf +++ b/Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf diff --git a/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex b/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex index d194f25ef45..e6ec02f011a 100644 --- a/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex +++ b/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex @@ -3,6 +3,9 @@ \billcopyright{\ccbysa\, This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International Licence.} \publishedby{the drafter} \billtitle{Commonwealth (Designated Realms) Bill} +\billday{5} +\billmonth{March} +\billyear{2024} \billto{Make provision in connection with citizens of certain Commonwealth Realms.} \humanrights{\printdrafter\ has made the following statement, which a minister would be obliged to give under section 19(1)(a), of the Human Rights Act 1998: \vspace{1ex} diff --git a/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf b/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf Binary files differindex 0ea80331cfe..87b172449da 100644 --- a/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf +++ b/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf diff --git a/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex b/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex index a4577f8c76e..f8f1de16359 100644 --- a/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex +++ b/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex @@ -25,7 +25,7 @@ ItalicFont={Palatine Parliamentary Italic}]{Palatine Parliamentary Regular} \newcommand{\thebox}{{\boxy ▯}} %\usepackage[firstnumber=last]{fancyvrb} \usepackage{minted} -\date{\today\\\smallskip\ttfamily Version 1.0.2} +\date{\today\\\smallskip\ttfamily Version 1.2.0} \author{Elijah Z Granet\thanks{e-mail: \href{mailto:ezg21@cantab.ac.uk}{\ttfamily ezg21@cantab.ac.uk}}} \title{\texttt{ukbill}:\\A package for typesetting UK legislation} @@ -168,8 +168,8 @@ firstnumber=last ] {latex} \NeedsTeXFormat{LaTeX2e} -\def\ukbillversionnumber{1.0.3} -\ProvidesClass{ukbill}[2022-12-01 A Class for Legal Notes] +\def\ukbillversionnumber{1.2.0} +\ProvidesClass{ukbill}[2024-01-06 A Class for UK legislation] % !TeX program = lualatex % !TeX encoding = utf8 % This work may be distributed and/or modified under the @@ -200,6 +200,41 @@ firstnumber=last \end{center} \addcontentsline{toc}{chapter}{\rule{.45\textwidth}{1pt}} } +%\RequirePackage{datetime2} +%\DTMlangsetup[en-GB]{ord=omit} +\ExplSyntaxOn + +\NewExpandableDocumentCommand{\addordinal}{m} + {% #1 should be something that TeX interprets as an integer + \int_to_arabic:n { #1 } + \exp_args:Ne \ORDINAL { \deman_compute_suffix:n { #1 } } + } + +\NewDocumentCommand{\ORDINAL}{m}{\textsuperscript{\itshape #1}}% how ugly is it? + +\cs_new:Nn \deman_compute_suffix:n + { + \int_case:nnF { #1 } + {% special cases + {11}{th} + {12}{th} + {13}{th} + } + { \__deman_compute_suffix_normal:n { #1 } } + } + +\cs_new:Nn \__deman_compute_suffix_normal:n + { + \int_case:nnF { \int_mod:nn { #1 } { 10 } } + { + {1}{st} + {2}{nd} + {3}{rd} + } + {th} + } +\ExplSyntaxOff + %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -219,11 +254,23 @@ firstnumber=last \newcommand{\whereas}[1]{\def\@whereas{#1}} \newcommand{\printwhereas}{\@whereas} +%\newcommand{\billto}[1]{\def\@billto{#1}} + + \newcommand{\publishedby}[1]{\def\@publishedby{#1}} \newcommand{\printpublishedby}{\@publishedby} \def\@publishedby{\@latex@warning@no@line{No \noexpand\publishedby given}} \newcommand{\billtitle}[1]{\def\@billtitle{#1}} \newcommand{\printbilltitle}{\@billtitle} +\newcommand{\billday}[1]{\def\@billday{#1}} +\newcommand{\printbillday}{\@billday} +\def\@billday{\@latex@warning@no@line{No \noexpand\billday given}} +\newcommand{\billmonth}[1]{\def\@billmonth{#1}} +\newcommand{\printbillmonth}{\@billmonth} +\def\@billmonth{\@latex@warning@no@line{No \noexpand\billmonth given}} +\newcommand{\billyear}[1]{\def\@billyear{#1}} +\newcommand{\printbillyear}{\@billyear} +\def\@billyear{\@latex@warning@no@line{No \noexpand\billyear given}} \def\@billtitle{\@latex@warning@no@line{No \noexpand\billtitle given}} \newcommand{\humanrights}[1]{\def\@humanrights{#1}} \newcommand{\printhumanrights}{\@humanrights} @@ -496,7 +543,6 @@ BoldFont={PalatineP-Bold}, ItalicFont={PalatineP-Italic}, BoldItalicFont={PalatineP-BoldItalic}]{PalatineP-Regular} \newfontface{\extfont}[SmallCapsFont={Times New Roman}]{Times New Roman}}{\ClassWarning{Please install the Palatine Parliamentary Font}} - \RequirePackage[english]{babel} %\RequirePackage{csquotes} %\MakeOuterQuote{"} @@ -746,8 +792,7 @@ the authority of the same, as follows:― \vskip 3ex \end{center} -\normalsize To make provision in connection with the citizens of certain Commonwealth Realms - +\normalsize \printbillto \vskip 3ex \begin{center} @@ -759,7 +804,7 @@ the authority of the same, as follows:― \vspace{1ex} \begin{minipage}{.4\textwidth}\centering -\itshape Ordered, by\normalfont\ \printdrafter\itshape\ to be Printed, \normalfont 19\itshape th March \normalfont 2020\itshape. +\itshape Ordered, by\normalfont\ \printdrafter\itshape\ to be Printed, {\normalfont\addordinal{\printbillday}} \textit{\printbillmonth} \printbillyear. \end{minipage} \vspace{1ex} diff --git a/Master/texmf-dist/tex/latex/ukbill/ukbill.cls b/Master/texmf-dist/tex/latex/ukbill/ukbill.cls index ef19b7b6025..36f393a5a94 100644 --- a/Master/texmf-dist/tex/latex/ukbill/ukbill.cls +++ b/Master/texmf-dist/tex/latex/ukbill/ukbill.cls @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} -\def\ukbillversionnumber{1.0.3} -\ProvidesClass{ukbill}[2022-12-01 A Class for Legal Notes] +\def\ukbillversionnumber{1.2.0} +\ProvidesClass{ukbill}[2024-01-06 A Class for UK legislation] % !TeX program = lualatex % !TeX encoding = utf8 % This work may be distributed and/or modified under the @@ -31,6 +31,41 @@ \end{center} \addcontentsline{toc}{chapter}{\rule{.45\textwidth}{1pt}} } +%\RequirePackage{datetime2} +%\DTMlangsetup[en-GB]{ord=omit} +\ExplSyntaxOn + +\NewExpandableDocumentCommand{\addordinal}{m} + {% #1 should be something that TeX interprets as an integer + \int_to_arabic:n { #1 } + \exp_args:Ne \ORDINAL { \deman_compute_suffix:n { #1 } } + } + +\NewDocumentCommand{\ORDINAL}{m}{\textsuperscript{\itshape #1}}% how ugly is it? + +\cs_new:Nn \deman_compute_suffix:n + { + \int_case:nnF { #1 } + {% special cases + {11}{th} + {12}{th} + {13}{th} + } + { \__deman_compute_suffix_normal:n { #1 } } + } + +\cs_new:Nn \__deman_compute_suffix_normal:n + { + \int_case:nnF { \int_mod:nn { #1 } { 10 } } + { + {1}{st} + {2}{nd} + {3}{rd} + } + {th} + } +\ExplSyntaxOff + %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -50,11 +85,23 @@ \newcommand{\whereas}[1]{\def\@whereas{#1}} \newcommand{\printwhereas}{\@whereas} +%\newcommand{\billto}[1]{\def\@billto{#1}} + + \newcommand{\publishedby}[1]{\def\@publishedby{#1}} \newcommand{\printpublishedby}{\@publishedby} \def\@publishedby{\@latex@warning@no@line{No \noexpand\publishedby given}} \newcommand{\billtitle}[1]{\def\@billtitle{#1}} \newcommand{\printbilltitle}{\@billtitle} +\newcommand{\billday}[1]{\def\@billday{#1}} +\newcommand{\printbillday}{\@billday} +\def\@billday{\@latex@warning@no@line{No \noexpand\billday given}} +\newcommand{\billmonth}[1]{\def\@billmonth{#1}} +\newcommand{\printbillmonth}{\@billmonth} +\def\@billmonth{\@latex@warning@no@line{No \noexpand\billmonth given}} +\newcommand{\billyear}[1]{\def\@billyear{#1}} +\newcommand{\printbillyear}{\@billyear} +\def\@billyear{\@latex@warning@no@line{No \noexpand\billyear given}} \def\@billtitle{\@latex@warning@no@line{No \noexpand\billtitle given}} \newcommand{\humanrights}[1]{\def\@humanrights{#1}} \newcommand{\printhumanrights}{\@humanrights} @@ -327,7 +374,6 @@ BoldFont={PalatineP-Bold}, ItalicFont={PalatineP-Italic}, BoldItalicFont={PalatineP-BoldItalic}]{PalatineP-Regular} \newfontface{\extfont}[SmallCapsFont={Times New Roman}]{Times New Roman}}{\ClassWarning{Please install the Palatine Parliamentary Font}} - \RequirePackage[english]{babel} %\RequirePackage{csquotes} %\MakeOuterQuote{"} @@ -577,8 +623,7 @@ the authority of the same, as follows:― \vskip 3ex \end{center} -\normalsize To make provision in connection with the citizens of certain Commonwealth Realms - +\normalsize \printbillto \vskip 3ex \begin{center} @@ -590,7 +635,7 @@ the authority of the same, as follows:― \vspace{1ex} \begin{minipage}{.4\textwidth}\centering -\itshape Ordered, by\normalfont\ \printdrafter\itshape\ to be Printed, \normalfont 19\itshape th March \normalfont 2020\itshape. +\itshape Ordered, by\normalfont\ \printdrafter\itshape\ to be Printed, {\normalfont\addordinal{\printbillday}} \textit{\printbillmonth} \printbillyear. \end{minipage} \vspace{1ex} |