Debian Codegraph @

texmf-dist/doc/latex/ukbill/ukbill-documentation.tex

raw
1 \documentclass{article}
2 \usepackage{verbatim}
3 \usepackage{xcolor}
4 \usepackage{luaquotes}
5 \usepackage{longtable}
6 \definecolor{darkspringgreen}{rgb}{0.09, 0.45, 0.27}
7 \definecolor{dsg}{rgb}{0.09, 0.45, 0.27}
8 \usepackage[hidelinks]{hyperref}
9 \usepackage{hologo}
10 \usepackage[british]{babel}
11 \usepackage[useregional]{datetime2}
12 \DTMlangsetup[en-GB]{ord=omit}
13 \definecolor{LightGray}{gray}{0.9}
14 %\usepackage{mathpazo}
15 \usepackage{fontspec}
16 \IfFontExistsTF{Palatine Parliamentary}{\setromanfont[RawFeature={+onum,+pnum},%
17 BoldFont={Palatine Parliamentary Bold},
18 ItalicFont={Palatine Parliamentary Italic}]{Palatine Parliamentary Regular}
19 }{\setromanfont[RawFeature={+onum,+pnum}]{TeX Gyre PagellaX}}
20 \setmonofont[Scale=.9]{Source Code Pro}
21 %\newfontface\primeback[Scale=1.01]{Libertinus Serif}
22 \newcommand{\primeback}{}
23
24 \newfontface\boxy{DejaVu Sans}
25 \newcommand{\thebox}{{\boxy ▯}}
26 %\usepackage[firstnumber=last]{fancyvrb}
27 \usepackage{minted}
28 \date{\today\\\smallskip\ttfamily Version 1.2.1}
29 \author{Elijah Z Granet\thanks{e-mail: \href{mailto:[email protected]}{\ttfamily [email protected]}}}
30
31 \title{\texttt{ukbill}:\\A package for typesetting UK legislation}
32
33 \begin{document}
34 \maketitle
35 \tableofcontents
36 \clearpage
37 \section{Overview}
38 This is a class for typesetting bills in the standard used by the Parliament of the United Kingdom. It is meant to be of use to students of law and politics, to Parliamentary agents and lawyers drafting private bills, and to aid in the construct of proposals for law reform. The use of this package requires the libre font `Palatine Parliamentary', which imitates the official typeface of the UK Parliament.\footnote{The font is available at this link: \url{https://github.com/ezgranet/palatine-parliamentary}}
39 \section{Usage}
40 For an example of the usage of the package, please see the attached `\texttt{immigration-bill.tex}' example in the package archive.
41
42 \subsection{Calling the package}
43 Call the package with {\color{darkspringgreen}\ttfamily \verb|\documentclass{ukbill}|}
44 \subsection{Declaring variables}
45 In your preamble, declare the following variables to populate your bill.
46 \begin{center}
47 \begin{tabular}{lp{2.5in}}
48 \bfseries Variable name & \bfseries Explanation\\
49 \ttfamily \verb|\drafter{}| & The drafter of the bill\\
50 \ttfamily \verb|\billcopyright{}| & Copyright notice at the end of the bill \\
51 \ttfamily \verb|\publishedby{}| & The publisher of the bill for notice at the end of the bill \\
52 \ttfamily\verb|\billtitle{}| & The title of the bill\\
53 \ttfamily \verb|billto{}| & { The purpose or long title of the bill}\\
54 \ttfamily \verb|\humanrights{}| & The statutorily required statement under the Human Rights Act 1998\\
55 \ttfamily \verb|\exptitle{}| & The title of the explanatory section—if you have extra notes added separately, title it `Explanatory Notes'; otherwise use `Explanatory Memorandum'\\
56 \ttfamily \verb|\exptext{}| & The content of the explanatory memorandum (or notice about separate explanatory notes)\\
57 \ttfamily \verb|\billnum{}| & The number of the bill for the cover sheet and back page\\
58 \ttfamily \verb|\whereas{}| &
59 This variable is needed \textbf{only} in the \texttt{private} option of the class. It contains the recitals, best formatted as a numbered list
60 \end{tabular}
61
62 \end{center}
63
64
65 \subsection{Bill parts}
66 The command {\color{darkspringgreen}\ttfamily\verb|\chapter|} divides the main content of the bill up into appropriate parts noted in the Table of Contents. For example, `Introductory Provisions'.
67 \subsection{Sections}
68 The section is the main unit of legislation and is titled with {\color{darkspringgreen}\ttfamily\verb|\section|}. Most sections will be numbered and numbered subsections use the {\color{darkspringgreen}\ttfamily\verb|numstat|} environment as follows:
69 \begin{minted}[
70 frame=lines,
71 framesep=2mm,
72 baselinestretch=1.2,
73 bgcolor=LightGray,
74 fontsize=\footnotesize,
75 breaklines,
76 firstnumber=last
77 ]
78 {latex}
79 \begin{numstat}
80 \item The first provision
81 \item The second provision
82 \end{numstat}
83 \end{minted}
84
85 Often, these sections will be nested with alphabetical subsubsections, Roman paragraphs, and double alphabetical (\textit{ie}, `aa') subparagraphs. These are called with {\color{darkspringgreen}\ttfamily\verb|alphstat|}, {\color{darkspringgreen}\ttfamily\verb|romstat|}, and {\color{darkspringgreen}\ttfamily\verb|twoalphstat|}, respectively.
86 \begin{minted}[
87 frame=lines,
88 framesep=2mm,
89 baselinestretch=1.2,
90 bgcolor=LightGray,
91 fontsize=\footnotesize,
92 breaklines,
93 firstnumber=last
94 ]
95 {latex}
96 \begin{numstat}
97 \item A subsection
98 \begin{alphstat}
99 \item Nesting
100 \begin{romstat}
101 \item Even more nesting
102 \begin{twoalphstat}
103 \item this is too much nesting now, lads
104 \end{twoalphstat}
105 \end{romstat}
106 \end{alphstat}
107 \item a subsection again
108 \end{numstat}
109 \end{minted}
110
111
112 Occasionally, a section will have only one provision, and therefore no numbering is needed. In this case, use the {\color{darkspringgreen}\ttfamily\verb|nostat|} environment.
113
114 \begin{minted}[
115 frame=lines,
116 framesep=2mm,
117 baselinestretch=1.2,
118 bgcolor=LightGray,
119 fontsize=\footnotesize,
120 breaklines,
121 firstnumber=last
122 ]
123 {latex}
124 \begin{nostat}
125 \item The first provision
126 \item The second provision
127 \end{nostat}
128 \end{minted}
129
130 \subsection{Schedules}
131
132 Some legislation requires schedules appended to the body of main legislation. To begin typesetting schedules (as opposed to the preceding main content of the bill), use the command {\color{darkspringgreen}\ttfamily\verb|\startschedule|}
133
134 A schedule is then named by the command {\color{darkspringgreen}\ttfamily\verb|\schedule{Name}|}, while a Part (\textit{ie}, a subset of a schedule) is called using {\color{darkspringgreen}\ttfamily\verb|\schdpart{name}|}
135
136 \subsection{The `private' Option}
137
138 Private bills have a different enacting formula and also make use of recitals. Drafting private bills therefore requires you to call the class with the option {\color{darkspringgreen}\ttfamily\verb|\documentclass[private]{ukbill}|}
139
140 \section{Future Development }
141 The package's online repository is the best place to report bugs, feature requests, or other contributions, and is located at: \\\url{github.com/ezgranet/ukbill}.
142
143 \section{Licence}
144 This project is licensed under the Latex Public Project Licence version 1.3\textit{c}. This documentation is copyright of the author but licensed under CC-BY-SA 4.0.
145 \section{Version History}
146
147 \subsection{\normalfont\texttt{1.2.1}} v 1.2.1 \ttfamily 8 January 2024: vertical indent for nostat environment fixed
148
149 \subsection{\normalfont\texttt{1.2.0}} \ttfamily 6 January 2024: fixed issues with macros not being properly used in template environment
150
151 \subsection{\normalfont\texttt{1.0.2}}
152 \ttfamily 13 December 2022: fixed an error with changes made in 1.0.2
153 \subsection{\normalfont\texttt{1.0.2}}
154 \ttfamily 13 December 2022: fixed an error with indent in the `nostat' environment
155 \subsection{\normalfont\texttt{1.0.1}}
156 \ttfamily 12 December 2022: Fixes to example documentation
157
158 \subsection{\normalfont\texttt{1.0.0}}
159 \ttfamily 1 December 2022: Class Creation
160
161
162 \clearpage\section{Implementation}
163
164 \begin{minted}[
165 frame=lines,
166 framesep=2mm,
167 baselinestretch=1.2,
168 bgcolor=LightGray,
169 fontsize=\footnotesize,
170 linenos,
171 breaklines,
172 firstnumber=last
173 ]
174 {latex}
175 \NeedsTeXFormat{LaTeX2e}
176 \def\ukbillversionnumber{1.2.0}
177 \ProvidesClass{ukbill}[2024-01-06 A Class for UK legislation]
178 % !TeX program = lualatex
179 % !TeX encoding = utf8
180 % This work may be distributed and/or modified under the
181 % conditions of the LaTeX Project Public License, either version 1.3c
182 % of this license or (at your option) any later version.
183 % The latest version of this license is in
184 % http://www.latex-project.org/lppl.txt
185 % and version 1.3c or later is part of all distributions of LaTeX
186 % version 2005/12/01 or later.
187 %
188 % This work has the LPPL maintenance status `maintained'.
189 %
190 % The Current Maintainer of this work is Elijah Z Granet
191
192
193 \LoadClass[a4paper,12pt]{memoir}
194 %%%%%%%%%%%%%%%%%%%%%%%%%%%
195 %%%%%%%%%%%%%%%%%%%%%%%%%%%
196 % schedule divisions
197 %%%%%%%%%%%%%%%%%%%%%%%%%%%
198 \newcommand{\schdpart}[1]{\subsubsection{#1}}
199 \newcommand{\startschedule}{\clearpage
200 \setcounter{schedon}{1}
201 %\setcounter{subsection}{}
202 \setcounter{part}{0}
203 \begin{center}
204 \large\textsc{SCHEDULES}
205 \end{center}
206 \addcontentsline{toc}{chapter}{\rule{.45\textwidth}{1pt}}
207 }
208 %\RequirePackage{datetime2}
209 %\DTMlangsetup[en-GB]{ord=omit}
210 \ExplSyntaxOn
211
212 \NewExpandableDocumentCommand{\addordinal}{m}
213 {% #1 should be something that TeX interprets as an integer
214 \int_to_arabic:n { #1 }
215 \exp_args:Ne \ORDINAL { \deman_compute_suffix:n { #1 } }
216 }
217
218 \NewDocumentCommand{\ORDINAL}{m}{\textsuperscript{\itshape #1}}% how ugly is it?
219
220 \cs_new:Nn \deman_compute_suffix:n
221 {
222 \int_case:nnF { #1 }
223 {% special cases
224 {11}{th}
225 {12}{th}
226 {13}{th}
227 }
228 { \__deman_compute_suffix_normal:n { #1 } }
229 }
230
231 \cs_new:Nn \__deman_compute_suffix_normal:n
232 {
233 \int_case:nnF { \int_mod:nn { #1 } { 10 } }
234 {
235 {1}{st}
236 {2}{nd}
237 {3}{rd}
238 }
239 {th}
240 }
241 \ExplSyntaxOff
242
243 %%%%%%%%%%%%%%%%%%%%%%%%%%%
244 %%%%%%%%%%%%%%%%%%%%%%%%%%%
245 %%%%%%%%%%%%%%%%%%%%%%%%%%%
246 % Variables
247 %%%%%%%%%%%%%%%%%%%%%%%%%%%
248 %%%%%%%%%%%%%%%%%%%%%%%%%%%
249 \makeatletter
250 \newcommand{\drafter}[1]{\def\@drafter{#1}}
251 \newcommand{\printdrafter}{\@drafter}
252 \def\@drafter{\@latex@warning@no@line{No \noexpand\drafter given}}
253 \newcommand{\billcopyright}[1]{\def\@billcopyright{#1}}
254 \newcommand{\printbillcopyright}{\@billcopyright}
255 \def\@billcopyright{\@latex@warning@no@line{No \noexpand\billcopyright given}}
256 \newcommand{\billto}[1]{\def\@billto{#1}}
257 \newcommand{\printbillto}{\@billto}
258 \def\@billto{\@latex@warning@no@line{No \noexpand\billto given}}
259 \newcommand{\whereas}[1]{\def\@whereas{#1}}
260 \newcommand{\printwhereas}{\@whereas}
261
262 %\newcommand{\billto}[1]{\def\@billto{#1}}
263
264
265 \newcommand{\publishedby}[1]{\def\@publishedby{#1}}
266 \newcommand{\printpublishedby}{\@publishedby}
267 \def\@publishedby{\@latex@warning@no@line{No \noexpand\publishedby given}}
268 \newcommand{\billtitle}[1]{\def\@billtitle{#1}}
269 \newcommand{\printbilltitle}{\@billtitle}
270 \newcommand{\billday}[1]{\def\@billday{#1}}
271 \newcommand{\printbillday}{\@billday}
272 \def\@billday{\@latex@warning@no@line{No \noexpand\billday given}}
273 \newcommand{\billmonth}[1]{\def\@billmonth{#1}}
274 \newcommand{\printbillmonth}{\@billmonth}
275 \def\@billmonth{\@latex@warning@no@line{No \noexpand\billmonth given}}
276 \newcommand{\billyear}[1]{\def\@billyear{#1}}
277 \newcommand{\printbillyear}{\@billyear}
278 \def\@billyear{\@latex@warning@no@line{No \noexpand\billyear given}}
279 \def\@billtitle{\@latex@warning@no@line{No \noexpand\billtitle given}}
280 \newcommand{\humanrights}[1]{\def\@humanrights{#1}}
281 \newcommand{\printhumanrights}{\@humanrights}
282 \def\@humanrights{\@latex@warning@no@line{No \noexpand\humanrightsgiven}
283 }
284 \newcommand{\exptitle}[1]{\def\@exptitle{#1}}
285 \newcommand{\printexptitle}{\@exptitle}
286 \def\@exptitle{\@latex@warning@no@line{No \noexpand\exptitle given}}
287 \newcommand{\exptext}[1]{\def\@exptext{#1}}
288 \newcommand{\printexptext}{\@exptext}
289 \def\@exptext{\@latex@warning@no@line{No \noexpand\exptext given}}
290 \newcommand{\billnum}[1]{\def\@billnum{#1}}
291 \newcommand{\printbillnum}{\@billnum}
292 \def\@billnum{\@latex@warning@no@line{No \noexpand\billnum given}}
293
294
295 \makeatother
296 %%%%%%%%%%%%%%%%%%%%%%%%%%%
297 %%%%%%%%%%%%%%%%%%%%%%%%%%%
298 % hyphenation
299 %%%%%%%%%%%%%%%%%%%%%%%%%%%
300 %%%%%%%%%%%%%%%%%%%%%%%%%%%
301 \RequirePackage[none]{hyphenat}
302 %%%%%%%%%%%%%%%%%%%%%%%%%%%
303 %%%%%%%%%%%%%%%%%%%%%%%%%%%
304 % list organisation
305 %%%%%%%%%%%%%%%%%%%%%%%%%%%
306 %%%%%%%%%%%%%%%%%%%%%%%%%%%
307 \RequirePackage{paralist}
308 \let\itemize\compactitem
309 \let\enditemize\endcompactitem
310 \let\enumerate\compactenum
311 \let\endenumerate\endcompactenum
312 \let\description\compactdesc
313 \let\enddescription\endcompactdesc
314 \pltopsep=-12pt
315 \plitemsep=0pt
316 \plparsep=0pt
317 \newcounter{schedcount}
318 \counterwithout{section}{chapter}
319
320 \counterwithin{schedcount}{subsubsection}
321 \setsecnumdepth{subsubsection}
322 \def\tocmark{\markboth{\MakeTextUppercase{}}{}}
323 \RequirePackage[absolute]{textpos}
324 \setlength{\TPHorizModule}{10mm}
325 \setlength{\TPVertModule}{10mm}
326 \TPGrid[15mm,1mm]{8}{9} % Divide page in 9x9 grid
327 \DeclareRobustCommand{\Leftblock}{{
328 \begin{textblock}{10}(0.5,1.8)\footnotesize\itshape 5\end{textblock}
329 \begin{textblock}{10}(0.5,2.7)\footnotesize\itshape 10\end{textblock}
330 \begin{textblock}{10}(0.5,3.6)\footnotesize\itshape 15\end{textblock}
331 \begin{textblock}{10}(0.5,4.5)\footnotesize\itshape 20\end{textblock}
332 \begin{textblock}{10}(0.5,5.4)\footnotesize\itshape 25\end{textblock}
333 \begin{textblock}{10}(0.5,6.3)\footnotesize\itshape 30\end{textblock}
334 \begin{textblock}{10}(0.5,7.2)\footnotesize\itshape 35\end{textblock}
335 }}
336 \DeclareRobustCommand{\Rightblock}{{
337 \begin{textblock}{10}(7.75,1.8)\footnotesize\itshape 5\end{textblock}
338 \begin{textblock}{10}(7.75,2.7)\footnotesize\itshape 10\end{textblock}
339 \begin{textblock}{10}(7.75,3.6)\footnotesize\itshape 15\end{textblock}
340 \begin{textblock}{10}(7.75,4.5)\footnotesize\itshape 20\end{textblock}
341 \begin{textblock}{10}(7.75,5.4)\footnotesize\itshape 25\end{textblock}
342 \begin{textblock}{10}(7.75,6.3)\footnotesize\itshape 30\end{textblock}
343 \begin{textblock}{10}(7.75,7.2)\footnotesize\itshape 35\end{textblock}
344 }}
345 \DeclareRobustCommand{\Firstblock}{{
346 %\begin{textblock}{10}(7.75,1.8)\footnotesize\itshape 5\end{textblock}
347 %\begin{textblock}{10}(7.75,2.7)\footnotesize\itshape 10\end{textblock}
348 %\begin{textblock}{10}(7.75,3.6)\footnotesize\itshape 15\end{textblock}
349 \begin{textblock}{10}(7.75,4.5)\footnotesize\itshape 5\end{textblock}
350 \begin{textblock}{5}(7.75,5.4)\footnotesize\itshape 10\end{textblock}
351 \begin{textblock}{10}(7.75,6.3)\footnotesize\itshape 15\end{textblock}
352 \begin{textblock}{10}(7.75,7.2)\footnotesize\itshape 20\end{textblock}
353 }}
354
355 \RequirePackage{ccicons}
356 \makepagestyle{bill}
357 \makepagestyle{billfirst}
358
359 \makeatletter
360 \makepsmarks {bill}{
361 \nouppercaseheads}
362 \makeatother
363 \makeatletter
364 \renewcommand{\bookpagemark}[1]{\itshape\thetitle\\}
365 \makepsmarks {billfirst}{
366 \nouppercaseheads}
367 \makeatother
368 \renewcommand{\bookpagemark}[1]{\noindent\itshape\thetitle\\}
369
370 % \renewcommand{\partpagemark}[1]{\itshape\thetitle\\}
371 \makepagestyle{front}
372
373 \makepagestyle{sched}
374 \makeatletter
375 \makepsmarks {sched}{
376 \nouppercaseheads}
377 \makeatother
378 \renewcommand{\bookpagemark}[1]{\itshape\thetitle\\}
379 % \renewcommand{\partpagemark}[1]{\itshape\thetitle\\}
380 \clearmark{chapter}
381 \clearmark{section}
382
383 \createmark{part}{both}{shownumber}{\partname\space}{.\space}
384
385
386 \RequirePackage[margin=3.25cm,headheight=100pt]{geometry}
387 \makeatletter
388 \makeevenfoot{front}{}{}{\printbillnum}
389 \makeoddfoot{front}{}{}{\printbillnum}
390 \makeatother
391
392 \renewcommand{\bookname}{\printbilltitle}
393 \makeheadrule{bill}{\textwidth}{1pt}
394 \makeevenhead{bill}{\Rightblock\normalsize\thepage\ifnum\value{part}>0\\\else\fi\ifnum\value{schedon}=1\\\else\fi\ifnum\value{subsubsection}>0\vskip 12pt\else\fi}{}{\footnotesize\itshape\bookname
395 \ifnum\value{schedon}=1
396 \\ \itshape Schedule \arabic{subsection}\hspace{1ex}—\hspace{1ex}\currentsubsection \else\fi
397 \ifnum\value{part}>0
398 \\Part \arabic{part}\hspace{1ex}—\hspace{1ex}\rightmark
399 \else\fi\ifnum\value{subsubsection}>0\\Part \arabic{subsubsection}\hspace{1ex}—\hspace{1ex}\currentsubsubsection\else\fi}
400 \makeoddhead{bill}{\Rightblock\footnotesize\itshape\bookname
401 \ifnum\value{schedon}=1
402 \\ \itshape Schedule \arabic{subsection}\hspace{1ex}—\hspace{1ex}\currentsubsection \else\fi
403 \ifnum\value{part}>0
404 \\Part \arabic{part}\hspace{1ex}—\hspace{1ex}\rightmark
405 \else\fi\ifnum\value{subsubsection}>0\\Part \arabic{subsubsection}\hspace{1ex}—\hspace{1ex}\currentsubsubsection\else\fi}{}{\normalsize\thepage\ifnum\value{part}>0\\\else\fi\ifnum\value{schedon}=1\\\else\fi\ifnum\value{subsubsection}>0\vskip 12pt\else\fi}
406 \makeoddfoot{bill}{}{}{}
407 %\renewcommand{\subsectionmark}[1]{#1}
408
409
410
411
412 %%%%%%%%%%%%%%%%%%%%%%%%%%%
413 %%%%%%%%%%%%%%%%%%%%%%%%%%%
414 % bill-first
415
416 %%%%%%%%%%%%%%%%%%%%%%%%%%%
417 %%%%%%%%%%%%%%%%%%%%%%%%%%%
418 \makeheadrule{billfirst}{\textwidth}{1pt}
419 \makeevenhead{billfirst}{\Firstblock\normalsize\thepage\ifnum\value{part}>0\\\else\fi\ifnum\value{schedon}=1\\\else\fi\ifnum\value{subsubsection}>0\vskip 12pt\else\fi}{}{\footnotesize\itshape\bookname
420 \ifnum\value{schedon}=1
421 \\ \itshape Schedule \arabic{subsection}\hspace{1ex}—\hspace{1ex}\currentsubsection \else\fi
422 \ifnum\value{part}>0
423 \\Part \arabic{part}\hspace{1ex}—\hspace{1ex}\rightmark
424 \else\fi\ifnum\value{subsubsection}>0\\Part \arabic{subsubsection}\hspace{1ex}—\hspace{1ex}\currentsubsubsection\else\fi}
425 \makeoddhead{billfirst}{\Firstblock\footnotesize\itshape\bookname
426 \ifnum\value{schedon}=1
427 \\ \itshape Schedule \arabic{subsection}\hspace{1ex}—\hspace{1ex}\currentsubsection \else\fi
428 \ifnum\value{part}>0
429 \\Part \arabic{part}\hspace{1ex}—\hspace{1ex}\rightmark
430 \else\fi\ifnum\value{subsubsection}>0\\Part \arabic{subsubsection}\hspace{1ex}—\hspace{1ex}\currentsubsubsection\else\fi}{}{\normalsize\thepage\ifnum\value{part}>0\\\else\fi\ifnum\value{schedon}=1\\\else\fi\ifnum\value{subsubsection}>0\vskip 12pt\else\fi}
431 \makeoddfoot{billfirst}{}{}{}
432 %\renewcommand{\subsectionmark}[1]{#1}
433
434
435
436 \renewcommand{\chaptermark}[1]{#1}
437 \cftpagenumbersoff{part}
438 \cftpagenumbersoff{chapter}
439 \cftpagenumbersoff{subsection}
440 \cftpagenumbersoff{subsubsection}
441 \renewcommand{\cftsubsectionpresnum}{\flushleft Schedule\hspace{1ex}}% Prefix to number for \subsection in ToC
442
443 \renewcommand{\cftsubsubsectionpresnum}{Part\hspace{1ex}}% Prefix to number for \subsection in ToC
444
445 \renewcommand{\thesubsection}{\arabic{subsection}}
446 \renewcommand{\thesubsubsection}{\arabic{subsubsection}}
447 \renewcommand{\cftsubsectionaftersnum}{\hspace{1ex}—\hspace{1ex}}
448 \renewcommand{\cftsubsubsectionaftersnum}{\hspace{1ex}—\hspace{1ex}}
449
450 \settocdepth{subsubsection}
451 \cftpagenumbersoff{section}
452 \makeatletter
453 \let\stdl@chapter\l@chapter
454 \renewcommand*{\l@chapter}[2]{\stdl@chapter{\centerline{#1}}{#2}}
455 \makeatother
456 \cftsetindents{subsection}{1.75cm}{10em}
457 \cftsetindents{subsubsection}{1.75cm}{10em}
458
459 \renewcommand{\cftsubsectionpresnum}{Schedule\hfill}
460 \renewcommand{\cftsubsectionaftersnum}{\quad—\quad}
461 \renewcommand{\cftsubsubsectionpresnum}{\qquad Part\hfill}
462 \renewcommand{\cftsubsubsectionaftersnum}{\quad—\quad}
463
464 %\setlength\cftsubsectionnumwidth{7.3em}
465 %\setlength\cftsubsubsectionnumwidth{4em}
466
467 \renewcommand{\title}{\printbilltitle}
468 \RequirePackage{changepage} % for the adjustwidth environment
469 \renewcommand{\part}[1]{\stepcounter{part}\markright{#1}
470 \begin{center}
471 \printpartname\hspace{1ex}\arabic{part}\\
472 \printparttitle{#1}\normalfont\normalsize\\\end{center}
473 \addcontentsline{toc}{part}{\normalsize\bfseries\printpartname\hspace{1ex}\arabic{part}\normalfont\\
474 \centerline{\normalsize\normalfont\scshape\printparttitle{#1}}}
475 }
476 \renewcommand\contentsname{CONTENTS}%
477
478 \renewcommand{\chapter}[1]{\stepcounter{chapter}\markright{#1}
479 \begin{center}
480 \itshape\printchaptertitle{#1}\normalfont\normalsize\\\end{center}
481 \addcontentsline{toc}{chapter}{\normalsize\itshape
482 \centerline{\normalsize\normalfont\itshape\printchaptertitle{#1}}}
483 }
484
485 \renewcommand{\partnamefont}{\normalfont\centering\bfseries\scshape}
486 \renewcommand{\parttitlefont}{\normalfont\centering\scshape}
487 \makeatletter
488 \renewcommand{\partnumberline}[1]{\hfil\hspace\@tocrmarg #1~}
489 \makeatother
490
491 \renewcommand{\partnumfont}{\normalfont\bfseries\centering\normalsize\scshape}
492 \renewcommand{\partnamenum}{\normalfont\bfseries\centering\normalsize\scshape}
493 \RequirePackage{setspace}
494 \renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
495 \renewcommand{\printchaptername}{\chapnamefont \@chapapp}
496 \renewcommand{\chapternamenum}{\space}
497 \renewcommand{\printchapternum}{\chapnumfont \thechapter}
498 \renewcommand{\afterchapternum}{\par\nobreak\vskip \midchapskip}
499 \renewcommand{\printchapternonum}{}
500 \renewcommand{\chapterheadstart}{}
501 \renewcommand{\printchaptername}{}
502 \renewcommand{\chapternamenum}{}
503 \renewcommand{\printchapternum}{}
504 \renewcommand{\afterchapternum}{}
505 \setlength{\parskip}{0pt}
506 \renewcommand{\printchaptertitle}[1]{\chaptitlefont #1}
507 \renewcommand{\afterchaptertitle}{\par\nobreak\vskip \afterchapskip}
508 \renewcommand{\printtoctitle}[1]{\large\scshape\centerline{\MakeUppercase{#1}}}
509 \renewcommand{\chapnamefont}{\normalfont\centering\itshape}
510 \renewcommand{\chapnumfont}{\normalfont\centering\itshape}
511 \renewcommand{\chaptitlefont}{\normalfont\centering\itshape}
512
513 \setlength{\beforechapskip}{12pt}
514 \setlength{\midchapskip}{0pt}
515 \setlength{\afterchapskip}{12pt}
516 \setbeforesecskip{-1em}
517 \setaftersecskip{-1em}
518 \setbeforesubsecskip{-1em}
519 \setaftersubsecskip{-1em}
520 \renewcommand*{\thesection}{\arabic{section}}
521 \setsecnumformat{\csname the#1\endcsname\hspace{5ex}}
522 %\setsubsecnumformat{\csname the#1\endcsname\hspace{5ex}}
523 %\setsubsecheadstyle{\bfseries}
524 %\setsubsecheadstyle{\scshape\centering}
525 %\setsubsectionnumformat{SCHEDULE\quad\csname the#1\endcsname\newline}
526 \RequirePackage[compact]{titlesec}
527 \titleformat{\subsection}[display]
528 {\normalfont\centering\scshape}{SCHEDULE \hspace{2ex }\thesubsection}{5pt}{}
529 \titleformat{\subsubsection}[display]
530 {\normalfont\centering\scshape}{Part \thesubsubsection}{5pt}{}
531
532 \setsecheadstyle{\centering\bfseries}
533 \renewcommand{\part}[1]{\stepcounter{part}\markright{#1}
534 \begin{center}
535 \normalfont\normalsize\itshape\printchaptertitle{#1}\normalfont\normalsidze\\\end{center}
536 \addcontentsline{toc}{chapter}{
537 \centerline{\normalsize\normalfont\itshape\printchaptertitle{#1}}}
538 }
539 \RequirePackage{fontspec}
540 \IfFontExistsTF{Palatine Parliamentary}{
541 \setmainfont[
542 Scale=.98,
543 SmallCapsFeatures={LetterSpace=10,RawFeature={+smcp,},},
544 BoldFeatures = {SmallCapsFont= {PalatineP-Bold},SmallCapsFeatures={%
545 RawFeature={+smcp,}%
546 }},
547 BoldFont={PalatineP-Bold},
548 ItalicFont={PalatineP-Italic},
549 BoldItalicFont={PalatineP-BoldItalic}]{PalatineP-Regular}
550 \newfontface{\extfont}[SmallCapsFont={Times New Roman}]{Times New Roman}}{\ClassWarning{Please install the Palatine Parliamentary Font}}
551 \RequirePackage[english]{babel}
552 %\RequirePackage{csquotes}
553 %\MakeOuterQuote{"}
554 %%\DeclareQuoteStyle{english}%
555 %% {{\extfont\textquotedblleft}}
556 %% [\extfont\textquotedblleft]
557 %% {{\extfont\textquotedblright}}
558 %% [0.05em]
559 %% {{\extfont\textquoteleft}}
560 %% [{\extfont\textquoteleft}]
561 %% {{\extfont\textquoteright}}
562 \RequirePackage{enumitem}
563 \newenvironment{statquote}%
564 {
565 \begin{list}{}%
566 {%
567 \setlength{\topsep}{0ex}%
568 \setlength{\partopsep}{0ex}%
569 \setlength{\parsep}{0.5ex}%
570 \setlength{\itemsep}{i}%
571 \addtolength{\leftmargin}{3em}%
572 \addtolength{\rightmargin}{3em}%
573 }%
574 \item[]}%
575 {\end{list}}
576 \newenvironment{nostat}{\begin{enumerate}[nosep,partopsep=0pt,
577 %parsep=0.5ex,
578 %itemsep=1ex,
579 labelsep=3ex,
580 leftmargin=4em,rightmargin=1.5em,label=]%
581 \item[]}%
582
583 {\end{enumerate}}
584 \newenvironment{numstat}%
585 {%
586 %\vspace{-9ex}%
587 \begin{enumerate}[nosep,partopsep=0pt,
588 %parsep=0.5ex,
589 %itemsep=1ex,
590 labelsep=3ex,
591 leftmargin=4em,rightmargin=1.5em,label=(\arabic*)]%
592 \item[]}%
593 {\end{enumerate}%
594 \vspace{1ex}\normalfont}%
595 \newenvironment{schumstat}%
596 {%
597 %\vspace{-9ex}%
598 \begin{enumerate}[nosep,partopsep=0pt,
599 %parsep=0.5ex,
600 itemsep=0ex,
601 labelsep=0ex,
602 leftmargin=0em,rightmargin=0em,label=]%
603 \item[]}%
604 {\end{enumerate}%
605 \vspace{1ex}\normalfont}%
606
607 \newcounter{alphcount}
608
609 \newenvironment{instatquote}%
610 {%
611 \setcounter{alphcount}{0}
612 \vspace{-3ex}%
613 \begin{list}{}%
614 {%
615 \setlength{\topsep}{0ex}%
616 \setlength{\partopsep}{1ex}%
617 \setlength{\parsep}{0.5ex}%
618 \setlength{\itemsep}{0ex}%
619 }%
620 \item[]}%
621 {\end{list}%
622 }%
623 \newenvironment{alphstat}%
624 {%
625 \vspace{-3ex}%
626 \begin{enumerate}[leftmargin=7.5ex,topsep=0ex,partopsep=1ex,parsep=0.5ex,itemsep=0ex,labelsep=3ex,label=({\alph*})]%
627
628 \item[]}%
629 {\end{enumerate}%
630 }%
631 \newenvironment{romstat}%
632 {%
633 \vspace{-3ex}%
634 \begin{enumerate}[topsep=0ex,partopsep=1ex,parsep=0.5ex,itemsep=0ex,label=(\roman*)]%
635
636 \item[]}%
637 {\end{enumerate}%
638 }%
639 \newenvironment{twoalphstat}%
640 {%
641 \vspace{-3ex}%
642 \begin{enumerate}[leftmargin=7.5ex,topsep=0ex,partopsep=1ex,parsep=0.5ex,itemsep=0ex,labelsep=3ex,label=({\alph*}{\alph*})]%
643
644 \item[]}%
645 {\end{enumerate}%
646 }%
647
648 \newcommand*\statquotelabel[1]{}
649
650 \newcommand{\stat}[2]{
651 \item[(#1)]#2
652 }
653
654 \newcommand{\stathead}[2]{
655 \textbf{#1}\hspace{5ex}\textbf{#2}
656 }
657
658
659
660
661 \setlength{\parindent}{0pt}
662 \RequirePackage{lettrine}
663 \setcounter{DefaultLines}{2}
664 %\renewcommand{\DefaultLraise}{0.05}
665 %\renewcommand{\DefaultLoversize}{.07}
666 %\renewcommand{\LettrineFontHook}{\initials}
667 %\RequirePackage{initials}
668 %\RequirePackage{Romantik}%\romantik{}
669 %\RequirePackage{Royal}%\royal
670
671 \newcommand{\intl}[2]{\lettrine{#1}{\hspace{1ex}\textsc{#2}}}
672 \renewcommand{\maketitle}{\thispagestyle{front}
673 \begin{center}
674 {\Huge\textbf{\title}}\\\rule{\textwidth}{1pt}\\\rule[16pt]{\textwidth}{2pt}
675 \end{center}
676 }
677 \newcommand{\schedule}[1]{\subsection{#1}}
678 \newcounter{schedon}
679 \setcounter{schedon}{0}
680
681 \newcommand{\currentsubsection}{}
682 \let\oldsubsection\subsection
683 \renewcommand{\subsection}[1]{\oldsubsection{#1}\renewcommand{\currentsubsection}{#1}}
684
685 \newcommand{\currentsubsubsection}{}
686 \let\oldsubsubsection\subsubsection
687 \renewcommand{\subsubsection}[1]{\oldsubsubsection{#1}\renewcommand{\currentsubsubsection}{#1}}
688 %%%%%%%%%%%%%%%%%%%%%%%%%%%
689 %%%%%%%%%%%%%%%%%%%%%%%%%%%
690 % enacting
691 %%%%%%%%%%%%%%%%%%%%%%%%%%%
692 %%%%%%%%%%%%%%%%%%%%%%%%%%%
693 \newcommand{\enactingformula}{
694 \intl{B}{e it enacted} by the King's most Excellent Majesty, by and with the advice and consent of the Lords Spiritual and Temporal, and Commons, in this present Parliament assembled, and by the authority of the same, as follows:---}
695
696 %%%%%%%%%%%%%%%%%%%%%%%%%%%
697 %%%%%%%%%%%%%%%%%%%%%%%%%%%
698 %enacting option
699 %%%%%%%%%%%%%%%%%%%%%%%%%%%
700 %%%%%%%%%%%%%%%%%%%%%%%%%%%
701 \DeclareOption{private}{
702 \makeatletter
703 \renewcommand{\enactingformula}{
704 \intl{W}{hereas}---
705
706 \hspace{2em}\begin{minipage}{.75\textwidth}
707
708 \printwhereas
709 \end{minipage}
710
711 \medskip
712
713 \intl{M}{ay} it therefore please Your Majesty that it may be enacted, and be it enacted, by
714 the King’s Most Excellent Majesty, by and with the advice and consent of the Lords
715 Spiritual and Temporal, and Commons, in this present Parliament assembled, and by
716 the authority of the same, as follows:―
717 }
718
719
720 \makeatother
721
722 }
723
724 \ProcessOptions\relax
725
726
727 %%%%%%%%%%%%%%%%%%%%%%%%%%%
728 %%%%%%%%%%%%%%%%%%%%%%%%%%%
729 % begindoc
730 %%%%%%%%%%%%%%%%%%%%%%%%%%%
731 %%%%%%%%%%%%%%%%%%%%%%%%%%%
732 \AtBeginDocument{\emergencystretch 3em
733 \sloppy
734 \OnehalfSpacing
735 \pagestyle{front}
736 \pagenumbering{roman}
737 \maketitle
738 \medskip
739 \extfont
740 \begin{center}\scshape\MakeUppercase{\printexptitle}\end{center}
741
742 \printexptext
743 \medskip
744
745 \begin{center}\scshape EUROPEAN CONVENTION ON HUMAN RIGHTS\end{center}
746
747 \printhumanrights
748 \normalfont
749 \clearpage\maketitle
750 \begin{KeepFromToc}
751 \normalfont\normalsize
752 \tableofcontents
753 \end{KeepFromToc}
754
755 \vskip 3ex
756 \mainmatter
757 \pagenumbering{arabic}
758 \pagestyle{bill}\thispagestyle{billfirst}
759 \begin{center}
760 \scshape a
761 \medskip
762
763 \normalfont\Huge\bfseries B\hspace{.5ex}I\hspace{.5ex}L\hspace{.5ex}L
764
765 \medskip
766
767 \normalfont\normalsize\scshape to\normalfont
768
769 \end{center}
770
771 \medskip
772
773 \noindent\footnotesize\extfont\printbillto\normalsize \normalfont
774
775 \medskip
776
777 \enactingformula
778
779 \medskip
780
781
782
783 }
784
785
786 \AtEndDocument{\cleardoublepage
787
788
789 \setcounter{page}{0}
790 \pagenumbering{arabic}
791 \setcounter{page}{1}
792 \thispagestyle{front}
793
794 \begin{center}
795 {\Huge\textbf{\title}}\\\rule{\textwidth}{1pt}\\\rule[16pt]{\textwidth}{2pt}
796 \end{center}
797
798 \begin{center}
799 \normalfont\scshape a
800 \medskip
801
802 \normalfont\Huge\bfseries B\hspace{.5ex}I\hspace{.5ex}L\hspace{.5ex}L
803
804 \vskip 3ex
805 \end{center}
806
807 \normalsize \printbillto
808 \vskip 3ex
809 \begin{center}
810
811 \normalsize\normalfont\itshape Presented by \printdrafter
812
813 \vskip 3ex
814
815 \rule{.45\textwidth}{1pt}
816 \vspace{1ex}
817
818 \begin{minipage}{.4\textwidth}\centering
819 \itshape Ordered, by\normalfont\ \printdrafter\itshape\ to be Printed, {\normalfont\addordinal{\printbillday}} \textit{\printbillmonth} \printbillyear.
820 \end{minipage}
821
822 \vspace{1ex}
823
824 \rule{.45\textwidth}{1pt}
825
826 \vskip 5ex
827
828 \normalfont\footnotesize\printbillcopyright
829
830
831 \vskip 1ex
832
833 \normalfont\scshape\MakeUppercase{Published By \printpublishedby}
834 \end{center}
835 }
836 \end{minted}
837
838
839 \end{document}