texlive[69339] Master/texmf-dist: ukbill (6jan24)
commits+karl at tug.org
commits+karl at tug.org
Sun Jan 7 22:27:54 CET 2024
Revision: 69339
https://tug.org/svn/texlive?view=revision&revision=69339
Author: karl
Date: 2024-01-07 22:27:54 +0100 (Sun, 07 Jan 2024)
Log Message:
-----------
ukbill (6jan24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/ukbill/README
trunk/Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf
trunk/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex
trunk/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf
trunk/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex
trunk/Master/texmf-dist/tex/latex/ukbill/ukbill.cls
Modified: trunk/Master/texmf-dist/doc/latex/ukbill/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ukbill/README 2024-01-07 21:27:45 UTC (rev 69338)
+++ trunk/Master/texmf-dist/doc/latex/ukbill/README 2024-01-07 21:27:54 UTC (rev 69339)
@@ -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 @@
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
Modified: trunk/Master/texmf-dist/doc/latex/ukbill/immigration-bill.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex 2024-01-07 21:27:45 UTC (rev 69338)
+++ trunk/Master/texmf-dist/doc/latex/ukbill/immigration-bill.tex 2024-01-07 21:27:54 UTC (rev 69339)
@@ -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}
Modified: trunk/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex 2024-01-07 21:27:45 UTC (rev 69338)
+++ trunk/Master/texmf-dist/doc/latex/ukbill/ukbill-documentation.tex 2024-01-07 21:27:54 UTC (rev 69339)
@@ -25,7 +25,7 @@
\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 at cantab.ac.uk}{\ttfamily ezg21 at cantab.ac.uk}}}
\title{\texttt{ukbill}:\\A package for typesetting UK legislation}
@@ -168,8 +168,8 @@
]
{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 @@
\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 @@
\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 at warning@no at 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 at warning@no at line{No \noexpand\billday given}}
+\newcommand{\billmonth}[1]{\def\@billmonth{#1}}
+\newcommand{\printbillmonth}{\@billmonth}
+\def\@billmonth{\@latex at warning@no at line{No \noexpand\billmonth given}}
+\newcommand{\billyear}[1]{\def\@billyear{#1}}
+\newcommand{\printbillyear}{\@billyear}
+\def\@billyear{\@latex at warning@no at line{No \noexpand\billyear given}}
\def\@billtitle{\@latex at warning@no at line{No \noexpand\billtitle given}}
\newcommand{\humanrights}[1]{\def\@humanrights{#1}}
\newcommand{\printhumanrights}{\@humanrights}
@@ -496,7 +543,6 @@
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 @@
\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 @@
\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}
Modified: trunk/Master/texmf-dist/tex/latex/ukbill/ukbill.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ukbill/ukbill.cls 2024-01-07 21:27:45 UTC (rev 69338)
+++ trunk/Master/texmf-dist/tex/latex/ukbill/ukbill.cls 2024-01-07 21:27:54 UTC (rev 69339)
@@ -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 at warning@no at 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 at warning@no at line{No \noexpand\billday given}}
+\newcommand{\billmonth}[1]{\def\@billmonth{#1}}
+\newcommand{\printbillmonth}{\@billmonth}
+\def\@billmonth{\@latex at warning@no at line{No \noexpand\billmonth given}}
+\newcommand{\billyear}[1]{\def\@billyear{#1}}
+\newcommand{\printbillyear}{\@billyear}
+\def\@billyear{\@latex at warning@no at line{No \noexpand\billyear given}}
\def\@billtitle{\@latex at warning@no at line{No \noexpand\billtitle given}}
\newcommand{\humanrights}[1]{\def\@humanrights{#1}}
\newcommand{\printhumanrights}{\@humanrights}
@@ -327,7 +374,6 @@
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 @@
\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 @@
\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}
More information about the tex-live-commits
mailing list.