Debian Codegraph @

texmf-dist/doc/latex/coolfn/coolfndocumentation.tex

raw
1 \documentclass[12pt]{article}
2 \usepackage{coolfn}
3 \usepackage{textcsc}
4 \usepackage{xcolor}
5 \usepackage{fontspec}\definecolor{darkspringgreen}{rgb}{0.09, 0.45, 0.27}
6 \usepackage{titlesec}
7 \titleformat{\subsection}
8 {\bfseries}{\thesection.\thesubsection}{1em}{\normalfont\bfseries}
9 \usepackage[hidelinks]{hyperref}
10 \usepackage{hologo}
11 \usepackage[british]{babel}
12 \usepackage[useregional]{datetime2}
13 \DTMlangsetup[en-GB]{ord=omit}
14 \definecolor{LightGray}{gray}{0.9}
15 %\usepackage{mathpazo}
16 \IfFontExistsTF{Palatine Parliamentary}{%
17 \setromanfont[SmallCapsFeatures={LetterSpace=10},
18 RawFeature={+calt,+hlig,+liga,+dlig,+onum,+pnum},
19 BoldFont={Palatine Parliamentary Bold},
20 ItalicFont={Palatine Parliamentary Italic}
21 ]{Palatine Parliamentary Regular}
22 }{\setromanfont[RawFeature={+onum,+pnum}]{TeX Gyre PagellaX}}
23 \setmonofont[Scale=.9,BoldFont=Source Code Pro Bold]{Source Code Pro}
24
25 \usepackage{minted}
26 \date{\today\\\smallskip\ttfamily Version \coolfnversionnumber}
27 \author{Elijah Z Granet\thanks{e-mail: \href{mailto:[email protected]}{\ttfamily [email protected]}}}
28
29 \title{\texttt{coolfn}:\\A package for a cool way to typeset footnotes}
30 \begin{document}
31 \maketitle
32 \tableofcontents
33 \clearpage
34 \section{Overview}
35 Legal writing, for better or for worse,\footnote{Almost certainly for the worse, except in the very rare situations where the author is capable of mastering the art of distinctive discursive footnote writing. Far more authors think that they can pull off this delicate technique than \textit{actually} are capable of doing so. } often involves very long and discursive footnotes replete with a series of often doubtfully relevant citations (perhaps with blockquotes of even more doubtful relevance).\footnote{Here, it is apt to note, as Parke \textcsc{B} said in Parke B in \textit{Mirehouse v Rennel} (1833) 1 Cl \& F 527, 546, that:
36 \begin{quote}
37 Our common law system consists in the applying to new combinations of circumstances those rules of law which we derive from legal principles and judicial precedents; and for the sake of attaining uniformity, consistency and certainty, we must apply those rules, where they are not plainly unreasonable or inconvenient, to all cases which arise; and we are not at liberty to reject them, and to abandon all analogy to them, in those to which they have not yet been judicially applied, because we think that the rules are not as convenient and reasonable as we ourselves could have devised.\end{quote}} Consequently, the formatting of footnotes for clear numbering, delineation of internal quotations and paragraphs, and clarity takes on a great importance.
38
39 This is a subjective question, on which the typographic authorities offer many suggestions. This package simply provides a way of formatting long footnotes the author thinks is, for lack of a better word, cool. It uses a clear column of numbers separated from the footnote, of sufficient width to accommodate triple digit footnote numbers. A hanging indent emphasises the footnote as the sideways mirror of the text, reflecting the paragraph but in a different way.\footnote{Think of the classic mirroring of the main text having the case name and the footnote the legal citation.} There is no footnote rule and a very slight increase in the parskip to help the eye distinguish multi-paragraph footnotes.\footnote{Which are usually a bad idea, but should at least look nice if they must be used.}
40 \section{Usage}
41 The package has no options, and the only configurable length is the \\\mintinline{latex}{\fnindent}, which sets the indent for the hanging footnotes, and also defines the relationship of the footnote number and main footnote blocks. By default, this is set to 1 \textcsc{M}, but can be easily changed by using the simple inbuilt \LaTeX renewal macro. For example:
42 \begin{quote}
43 \mintinline{latex}{\renewcommand{\fnindent}{1.25em}}.
44 \end{quote}
45 \section{Development}
46 Bugs, feature requests, \textit{etc}, should be submitted to the project's official Githup page: (\url{https://github.com/ezgranet/coolfn/}).
47
48 \section{Licence}
49 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 \textcsc{CC-BY-SA} 3.0.
50
51 \clearpage
52 \section{Implementation}
53 \begin{minted}[
54 frame=lines,
55 framesep=2mm,
56 baselinestretch=1.2,
57 bgcolor=LightGray,
58 fontsize=\footnotesize,
59 linenos,
60 breaklines,
61 firstnumber=last
62 ]
63 {latex}
64
65 \def\coolfnversionnumber{1.2.2}
66 \ProvidesPackage{coolfn}
67 [2023/11/29\coolfnversionnumber\
68 A cool way to format footnotes]
69 % This work may be distributed and/or modified under the
70 % conditions of the LaTeX Project Public License, either version 1.3c
71 % of this license or (at your option) any later version.
72 % The latest version of this license is in
73 % http://www.latex-project.org/lppl.txt
74 % and version 1.3c or later is part of all distributions of LaTeX
75 % version 2005/12/01 or later.
76 %
77 % This work has the LPPL maintenance status `maintained'.
78 %
79 % The Current Maintainer of this work is Elijah Z Granet
80
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%
83 % FOOTNOTES
84 %%%%%%%%%%%%%%%%%%%%%%%%%%%
85 %%%%%%%%%%%%%%%%%%%%%%%%%%%
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%
87 %%%%%%%%%%%%%%%%%%%%%%%%%%%
88 % from
89 % https://tex.stackexchange.com/questions/305033/
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%
91 %%%%%%%%%%%%%%%%%%%%%%%%%%%
92 \usepackage[bottom]{footmisc}
93 \makeatletter
94 %%%%%%%%%%%%%%%%%%%%%%%%%%%
95 %%%%%%%%%%%%%%%%%%%%%%%%%%%
96 % multi paragraph footnotes
97 % are inherently pretty bad
98 % but they happen in law
99 % so might as well deal with them? so a slight spacing to compensate
100 %%%%%%%%%%%%%%%%%%%%%%%%%%
101 %%%%%%%%%%%%%%%%%%%%%%%%%%%
102 \newenvironment{Parskip}{%
103 \par
104 \parskip=0.25\baselineskip \advance\parskip by 0pt plus 1pt
105 \parindent=\z@
106 \def\@listI{\leftmargin\leftmargini
107 \topsep\z@ \parsep\parskip \itemsep\z@}
108 \let\@listi\@listI
109 \@listi
110 \def\@listii{\leftmargin\leftmarginii
111 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
112 \topsep\z@ \parsep\parskip \itemsep\z@}
113 \def\@listiii{\leftmargin\leftmarginiii
114 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
115 \topsep\z@ \parsep\parskip \itemsep\z@}
116 \partopsep=\z@
117 }{\par}
118 \makeatother
119 %%%%%%%%%%%%%%%%%%%%%%%%%%%
120 %%%%%%%%%%%%%%%%%%%%%%%%%%%
121 %
122 %%%%%%%%%%%%%%%%%%%%%%%%%%%
123 %%%%%%%%%%%%%%%%%%%%%%%%%%%
124 \newcommand{\fnindent}{1em}
125 \usepackage{calc}% for maths
126 \newlength{\lengtha}
127 \setlength{\lengtha}{\textwidth}
128 \newlength{\lengthb}%maths again
129 \newlength{\lengthc}
130
131 \setlength{\lengthc}{\fnindent}
132 \setlength{\lengthb}{1.25\lengthc}%parblock
133
134 \makeatletter
135 \@ifclassloaded{memoir}{
136 }{
137 \usepackage{hanging}
138 }
139 % for hanging paragraphs
140 \renewcommand\footnoterule{}
141 % ^ no one wants a rule sep for FN!
142 \AtBeginDocument{\flushbottom}
143 %^just to be safe
144 \makeatletter
145 \long\def\@makefntext#1{\leavevmode
146 \@makefnmark\nobreak
147 #1%
148 }
149 \makeatother
150 %%%%%%%%%%%%%%%%%%%%%%%%%%%
151 %%%%%%%%%%%%%%%%%%%%%%%%%%%
152 % the magic
153 %%%%%%%%%%%%%%%%%%%%%%%%%%%
154 %%%%%%%%%%%%%%%%%%%%%%%%%%%
155 \makeatletter
156 \renewcommand{\@makefntext}[1]{%
157 \begin{minipage}[t]{\lengthb}%
158 \noindent\normalfont%
159 \@thefnmark%
160
161 \end{minipage}%
162 \begin{minipage}[t]{\textwidth-\lengthb}%
163 \begin{Parskip}\begin{hangparas}{\lengthc}{1}
164 \noindent#1\end{hangparas}\end{Parskip}%
165 \end{minipage}%
166 }
167 \makeatother
168 %%%%%%%%%%%%%%%%%%%%%%%%%%%
169 %%%%%%%%%%%%%%%%%%%%%%%%%%%
170 %%%%%%%%%%%%%%%%%%%%%%%%%%%
171 %%%%%%%%%%%%%%%%%%%%%%%%%%%
172 \end{minted}
173
174
175
176
177
178
179
180
181 \section{Version History}
182 \subsection*{\texttt{1.2.2}}
183 \ttfamily 29 November 2023: Fixed issue with textwidth
184
185 \subsection*{\texttt{1.2.1}}
186 \ttfamily 29 November 2023: Fixed issue with memoir
187
188 \subsection*{\texttt{1.2.0}}
189
190
191
192 \ttfamily 16 November 2023: Fixed issue with width of footnote block
193
194
195 \subsection*{\texttt{1.1.0}}
196
197
198
199 \ttfamily 27 February 2023: Fixed issue with footnotes at the bottom
200
201 \subsection*{\texttt{1.0.0}}
202
203 \ttfamily 6 October 2022: Package creation
204
205
206 \end{document}