summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-04-16 03:00:53 +0000
committerNorbert Preining <norbert@preining.info>2024-04-16 03:00:53 +0000
commit9800bfd04f16cdf2663b542883c67de4d0926b21 (patch)
treeed9cb7e96c3286ab92931b79ceab86a2fbab9376 /macros
parentefca04f9a0ac7156dacf34c21a20614e34e37ca2 (diff)
CTAN sync 202404160300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/README8
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/RELEASE26
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.pdfbin1245018 -> 1247496 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.tex75
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.pdfbin233089 -> 233075 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.tex2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-sample.pdfbin182889 -> 182891 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-legal-sample.pdfbin64860 -> 64859 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-noteref-demo.pdfbin87995 -> 87997 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-intro.pdfbin280404 -> 280489 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-sample.pdfbin158653 -> 158659 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.pdfbin68316 -> 68320 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.tex2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-sample.pdfbin157473 -> 157473 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/dates-test.bib69
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-dates-common.cbx79
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx39
-rw-r--r--macros/latex/contrib/epcqrcode/README5
-rw-r--r--macros/latex/contrib/epcqrcode/epcqrcode-doc.pdfbin160738 -> 159912 bytes
-rw-r--r--macros/latex/contrib/epcqrcode/epcqrcode.dtx11
-rw-r--r--macros/latex/contrib/epcqrcode/epcqrcode.ins4
-rw-r--r--macros/latex/contrib/fontscale/CHANGELOG.md62
-rw-r--r--macros/latex/contrib/fontscale/README.txt10
-rw-r--r--macros/latex/contrib/fontscale/beery.cls8
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex74
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex72
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex72
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.pdfbin129725 -> 131367 bytes
-rw-r--r--macros/latex/contrib/fontscale/fontscale-manual.tex767
-rw-r--r--macros/latex/contrib/fontscale/fontscale.sty2613
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md13
-rw-r--r--macros/latex/contrib/siunitx/siunitx-abbreviation.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin645101 -> 645640 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx15
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin703728 -> 703738 bytes
-rw-r--r--macros/latex/contrib/tugboat/NEWS14
-rw-r--r--macros/latex/contrib/tugboat/ltubguid.ltx4
-rw-r--r--macros/latex/contrib/tugboat/ltubguid.pdfbin328791 -> 328892 bytes
-rw-r--r--macros/latex/contrib/tugboat/tugboat-code.pdfbin521480 -> 523488 bytes
-rw-r--r--macros/latex/contrib/tugboat/tugboat.bst4
-rw-r--r--macros/latex/contrib/tugboat/tugboat.dtx188
-rw-r--r--macros/latex/contrib/tugboat/tugboat.ins4
-rw-r--r--macros/plain/contrib/tugboat/tubguide.pdfbin207800 -> 207800 bytes
-rw-r--r--macros/plain/contrib/tugboat/tugboat.cmn17
-rw-r--r--macros/plain/contrib/tugboat/tugboat.sty20
47 files changed, 2302 insertions, 1981 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/README b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/README
index 1c8ed3d79a..92d9894feb 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/README
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/README
@@ -1,7 +1,7 @@
IMPORTANT NOTE:
This is the package formerly known as biblatex-chicago-notes-df. It
-is designed for use with the latest version (3.18b) of biblatex. The
+is designed for use with the latest version (3.20) of biblatex. The
package contains the 17th-edition Chicago style files, and I am also
maintaining the 16th-edition files for those for whom they remain a
necessity, though I have deprecated these older files and will remove
@@ -12,10 +12,10 @@ If you have used the package before, then you should be sure to
consult the RELEASE file to find out what alterations you may need to
make to your .bib files and document preambles to bring them up to
date. Most particularly please note that biber is now the required
-backend for all the included styles (version 2.18 is designed for use
+backend for all the included styles (version 2.20 is designed for use
with the latest biblatex).
-README (version 2.3a, 2022-11-17):
+README (version 2.3b, 2024-04-15):
Biblatex-chicago contains three biblatex styles implementing the
specifications of the Chicago Manual of Style, 17th edition. The
@@ -107,7 +107,7 @@ familiar from other packages:
Changelog: See the RELEASE file, and also the end of
biblatex-chicago.pdf.
-Copyright (c) 2008-2022 David Fussner. This package is
+Copyright (c) 2008-2024 David Fussner. This package is
author-maintained. This work may be copied, distributed and/or
modified under the conditions of the LaTeX Project Public License,
either version 1.3 of this license or (at your option) any later
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/RELEASE b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/RELEASE
index 6710cdb5cd..7000790ede 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/RELEASE
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/RELEASE
@@ -1,3 +1,27 @@
+Release notes for version 2.3b [2024-04-15]:
+
+This is an interim bug-fix release, mainly to address the following
+breaking change:
+
+ - The most recent biblatex (3.20) has added a new name template
+ (\DeclareNamehashTemplate) for users requiring non-Western name
+ handling in their reference apparatus, so if you use
+ biblatex-chicago's "cmsnameparts" option then running biber will
+ fail and LaTeX will not process your documents. This update should
+ rectify that, while still being compatible with earlier versions of
+ biblatex. Thanks to Philipp Immel for alerting me.
+
+ - I have also added a package-specific definition of the standard
+ citation command \citetitle to the author-date styles, as the
+ standard definition sometimes fails there. Thanks to Geoffery
+ Zheng for reporting this.
+
+ - Users of the "authordate-trad" style may need to remove some
+ \bibstring commands from the start of "title" fields in their .bib
+ files, or else set the biblatex option "casechanger=latex2e".
+ Please see section 10 or section 5.2, s.v. "title" in
+ biblatex-chicago.pdf.
+
Release notes for version 2.3a [2022-11-17]:
This release backports a bug-fix from the most recent LaTeX3
@@ -2314,7 +2338,7 @@ Changelog for version 0.7 [2008-08-18]:
- First public release
-Copyright (c) 2008-2022 David Fussner. This package is
+Copyright (c) 2008-2024 David Fussner. This package is
author-maintained. This work may be copied, distributed and/or
modified under the conditions of the LaTeX Project Public License,
either version 1.3 of this license or (at your option) any later
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.pdf
index 360c89392c..b76f21b7ce 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.tex b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.tex
index 03f2413a32..4d5632861e 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.tex
@@ -117,7 +117,7 @@ HyphenChar={-}]
Style files for biblatex
\vspace{.3\baselineskip}
-\sffamily\normalsize\bfseries David Fussner\qquad Version 2.3a\\
+\sffamily\normalsize\bfseries David Fussner\qquad Version 2.3b\\
\href{mailto:djf027@googlemail.com}{djf027@googlemail.com}\\ \today
\end{center}
@@ -217,15 +217,16 @@ clickable link to an external document.
\begin{itemize}{}{}
\item The \textsf{biblatex} package, of course! The current version
- --- 3.18b at the time of writing --- has received extensive testing,
+ --- 3.20 at the time of writing --- has received extensive testing,
and contains features and bug fixes upon which my code relies.
- Please don't use any earlier version. \textsf{Biblatex} requires
- several packages, and it strongly recommends several more:
+ Earlier versions may work, but I recommend the latest.
+ \textsf{Biblatex} requires several packages, and it strongly
+ recommends several more:
\begin{itemize}{}{}
\item \textsf{biber} --- the next-generation \textsc{Bib}\TeX\
replacement by Philip Kime and Fran\c{c}ois Charette, available
from SourceForge (required). You should use the latest version,
- 2.18, to work with \textsf{biblatex} 3.18b and
+ 2.20, to work with \textsf{biblatex} 3.20 and
\textsf{biblatex-chicago}; please note that any other backend will
not produce accurate results.
\item e-\TeX\ (required)
@@ -240,7 +241,7 @@ clickable link to an external document.
\item \textsf{babel} --- a standard package (\emph{strongly}
recommended)
\item \textsf{csquotes} --- available from CTAN (recommended).
- Please upgrade to the latest version of \textsf{csquotes} (5.2n).
+ Please upgrade to the latest version of \textsf{csquotes} (5.2o).
\end{itemize}
\item The standard \textsf{expl3} and \textsf{xparse} packages are
loaded automatically for most users, and if they aren't
@@ -436,7 +437,7 @@ clickable link to an external document.
\subsection{License}
\label{sec:lppl}
-Copyright \copyright\ 2008--2022 David Fussner. This package is
+Copyright \copyright\ 2008--2024 David Fussner. This package is
author-maintained. This work may be copied, distributed and/or
modified under the conditions of the \LaTeX\ Project Public License,
either version 1.3 of this license or (at your option) any later
@@ -13147,19 +13148,18 @@ formatted in italics will cause the capitalization algorithm to stop
and leave all of that material as it is, so your .bib entry would need
to have a field something like this:
-\mylittlespace\hspace*{1em}\texttt{title = \{}\cmd{bibstring\{reviewof\}}
+\mylittlespace\hspace*{1em}\texttt{title = \{review of}
\cmd{mkbibemph\{The Chicago manual of style\}\}}
-\mylittlespace (As an aside, the use of the \texttt{reviewof}
-bibstring isn't strictly necessary here, but it helps with portability
-across languages and across the two Chicago styles. If you've noticed
-a lot of lowercase letters starting fields in \textsf{dates-test.bib},
-they're present because in the notes \&\ bibliography style
-capitalization is complicated by notes using commas where the
-bibliography uses periods, and words like \enquote{review} start in
-uppercase only if the context demands it. There's considerably less
-of this in the author-date styles [note the \textsf{*titleaddon}
-fields], but it still pays to be aware of the issue.)
+\mylittlespace (As\colmarginpar{\textsf{biblatex} 3.20} an aside, a
+\cmd{bibstring} at the start of a title field no longer works as it
+used to in the \textsf{trad} style, due to changes in the handling of
+the \cmd{MakeSentenceCase} command. You can still use them if you set
+the \texttt{casechanger} option to \texttt{latex2e}, but otherwise you
+can just provide the actual string, as here. The lowercase letter at
+the start isn't strictly necessary unless you're going to cite the
+work by title instead of by author-date. [Compare the notes \&\
+bibliography style, and also the \textsf{*titleaddon} fields.])
\mylittlespace With regard to italics, the rules of
\textsf{biblatex-chicago-authordate-trad} are as follows:
@@ -16525,6 +16525,7 @@ to a specific naming scheme. You'll need at least:
\begin{verbatim}
\DeclareSortingNamekeyTemplate[<templatename>]{<specification>}
\DeclareUniquenameTemplate[<templatename>]{<specification>}
+\DeclareNamehashTemplate[<templatename>]{<specification>}
\newbibmacro*{name:<templatename>}[<no. of nameparts as digit>]{<code>}
\csdef{cmssort:<templatename>}{\usebibmacro{name:<templatename>}...}
\csdef{cmslabel:<templatename>}{...\usebibmacro{name:<templatename>}...}
@@ -16541,13 +16542,14 @@ then you'll also need:
\end{verbatim}}
If you want to be able to use the your new template name as the
-default template, you'll need to wrap the first two declarations like
+default template, you'll need to wrap the first three declarations like
so:
{\small
\begin{verbatim}
\cms@template@wrapper{\DeclareSortingNamekeyTemplate}[<templatename>]{<spec>}
\cms@template@wrapper{\DeclareUniquenameTemplate}[<templatename>]{<spec>}
+\cms@template@wrapper{\DeclareNamehashTemplate}[<templatename>]{<spec>}
\end{verbatim}}
If your specification requires new name parts, you can copy
@@ -16752,6 +16754,13 @@ title, particularly Unicode ones. If you are using
set of curly braces \{\}\ at the start of the field, but I shall look
into this further.
+\mylittlespace Please\colmarginpar{\textsf{biblatex} 3.20} note, also,
+that in the \textsf{authordate-trad} style you can no longer by
+default use a \cmd{bibstring} at the start of a \textsf{title} field,
+due to the case-changing code in \cmd{MakeSentenceCase}. You can
+either set \texttt{casechanger=latex2e} in the preamble or just write
+the string you need in the\ .bib file.
+
\mylittlespace Patrick Danilevici's Romanian localization
(\textsf{cms-romanian.lbx}) required some fairly extensive changes to
the basic package code, so it's possible that I could improve the
@@ -16770,7 +16779,33 @@ do my best to fix them.
\section{Revision History}
\label{sec:history}
-\textbf{2.3a: Released \today}
+\textbf{2.3b: Released \today}
+
+\mylittlespace This is an interim bug-fix release, mainly to address
+the following breaking change:
+
+\begin{itemize}
+\item The most recent \textsf{biblatex} (3.20) has added a new name
+ template (\mycolor{\cmd{DeclareNamehashTemplate}}) for users
+ requiring non-Western name handling in their reference apparatus, so
+ if you use \textsf{biblatex-chicago's} \texttt{cmsnameparts} option
+ then running \textsf{biber} will fail and \LaTeX\ will not process
+ your documents. This update should rectify that, while still being
+ compatible with earlier versions of \textsf{biblatex}. Thanks to
+ Philipp Immel for alerting me.
+\item I have also added a package-specific definition of the standard
+ citation command \cmd{citetitle} to the author-date styles, as the
+ standard definition sometimes fails there. Thanks to Geoffery Zheng
+ for reporting this.
+\item Users of the \textsf{authordate-trad} style may need to remove
+ some \cmd{bibstring} commands from the start of \textsf{title}
+ fields in their\ .bib files, or else set the \textsf{biblatex}
+ option \texttt{casechanger=latex2e}. Please see
+ section~\ref{sec:bugs} or section~\ref{sec:fields:authdate}, s.v.\
+ \textsf{title}.
+\end{itemize}
+
+\textbf{2.3a: Released November 11, 2022}
\mylittlespace This release backports a bug-fix from the most recent
\LaTeX 3 programming layer. If you are using \textsf{biblatex} 3.18b
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.pdf
index 9bec0f838a..4c29a4e7aa 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.tex b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.tex
index ce73187927..9ec5628d07 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-intro.tex
@@ -102,7 +102,7 @@ author-date specification you will need to use \textsf{biber} to
process your .bib files, as \textsc{Bib}\TeX\ (and its more recent
variants) will no longer provide all the features the style requires.
For this release, you really need the current versions of
-\textsf{biber} (2.18) and \textsf{biblatex} (3.18b), which contain
+\textsf{biber} (2.20) and \textsf{biblatex} (3.20), which contain
features and bug-fixes on which my own code relies. The advice that
follows in this document assumes that you are using \textsf{biber}; if
you wish to continue using \textsc{Bib}\TeX\ then you need
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-sample.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-sample.pdf
index 320fd9992d..91b56ea09a 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-sample.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-dates-sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-legal-sample.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-legal-sample.pdf
index 74207ffb42..d2ad5aeb43 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-legal-sample.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-legal-sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-noteref-demo.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-noteref-demo.pdf
index e4afcb084a..60e3b31025 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-noteref-demo.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-noteref-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-intro.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-intro.pdf
index 4d3ee06024..de77e00d03 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-intro.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-intro.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-sample.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-sample.pdf
index 9d07d47fee..8634c2040d 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-sample.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-notes-sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.pdf
index 26f5668cba..7928a46d10 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.tex b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.tex
index 9a19f2a010..e59f4757bf 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-appendix.tex
@@ -76,7 +76,7 @@ HyphenChar={-}]
author = {Barcott, Bruce},
date = {2000-04-16},
entrysubtype = {magazine},
- title = {\bibstring{reviewof} \mkbibemph{The last marlin: The story of a family at sea}, \bibstring{by} {Fred Waitzkin}},
+ title = {review of \mkbibemph{The last marlin: The story of a family at sea}, by {Fred Waitzkin}},
pages = 7
}
\end{lstlisting}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-sample.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-sample.pdf
index f82bc3416a..5be01f087f 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-sample.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/cms-trad-sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/dates-test.bib b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/dates-test.bib
index f6f0a1b980..f5ba90f5a3 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/dates-test.bib
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/dates-test.bib
@@ -371,28 +371,30 @@
author = {Barcott, Bruce},
date = {2000-04-16},
entrysubtype = {magazine},
- title = {\bibstring{reviewof} \mkbibemph{The last marlin: The
- story of a family at sea}, \bibstring{by} {Fred Waitzkin}},
+ title = {review of \mkbibemph{The last marlin: The story of a
+ family at sea}, by {Fred Waitzkin}},
pages = 7,
annotation = {Because of the absence of quotation marks around the
\textsf{title} in the \texttt{trad} style, the
\textsf{Article} and \textsf{Review} entry types are
more or less interchangeable. This entry presents a
review from a newspaper, with keyword
- \texttt{magazine} in \textsf{entrysubtype}, and with
- \cmd{bibstring\{reviewof\}} in the \textsf{title}
- field. You could just write \enquote{review of}
- instead, but the \cmd{bibstring} makes the entry
- portable across languages. Note the formatting of
- the reviewed book's title using \cmd{mkbibemph}, and
- the sentence-style capitalization you have to
- provide by hand for the \texttt{trad} style, because
- the curly braces of \cmd{mkbibemph} protect the text
- from the automatic sentence-style capitalization
- provided by the package. \textsf{Biblatex-chicago}
- never modifies the capitalization of the
- \textsf{journaltitle}, so that field should always
- work properly across styles.}
+ \texttt{magazine} in \textsf{entrysubtype}. A
+ \cmd{bibstring\{reviewof\}} at the start of the
+ \textsf{title} field won't work anymore in the
+ \textsf{trad} style unless you change the setting of
+ the \texttt{casechanger} option to \texttt{latex2e}.
+ Instead of that you can just write \enquote{review
+ of.} Note the formatting of the reviewed book's
+ title using \cmd{mkbibemph}, and the sentence-style
+ capitalization you have to provide by hand for the
+ \texttt{trad} style, because the curly braces of
+ \cmd{mkbibemph} protect the text from the automatic
+ sentence-style capitalization provided by the
+ package. \textsf{Biblatex-chicago} never modifies
+ the capitalization of the \textsf{journaltitle}, so
+ that field should always work properly across
+ styles.}
}
@Book{barrows:reading,
@@ -3223,29 +3225,30 @@
@Article{ratliff:review:15,
author = {Ratliff, Ben},
- title = {\bibstring{reviewof} \mkbibemph{The mystery of
- samba: Popular music and national identity in
- Brazil}, \bibstring{by} {Hermano Vianna},
- \parteditandtrans {John Charles Chasteen}},
+ title = {review of \mkbibemph{The mystery of samba: Popular
+ music and national identity in Brazil}, by {Hermano
+ Vianna}, \parteditandtrans {John Charles Chasteen}},
journaltitle = {Lingua Franca},
date = {1999-04},
volume = 9,
pages = {B13--B14},
annotation = {An Article entry presenting a review from a
scholarly journaltitle, hence no entrysubtype
- needed. Note the bibstrings in the title of the
- review, and the formatting of the title of the book
- reviewed there, for the trad style. Also note the
- use of parteditandtrans. The author-date system
- doesn't absolutely require the use of these
- mechanisms, which were invented to cope with the
- differences between notes and bibliography in the
- other Chicago style. Still, although simply writing
- "ed. and trans." yourself will suffice, using these
- mechanisms will make your .bib file work across
- multiple languages, and will also allow it to work,
- with fewer modifications, in the notes \&
- bibliography style, should that be needed.}
+ needed. A bibstring at the start of the title no
+ longer works in the trad style, unless you set the
+ casechanger option to "latex2e" in your
+ preamble. Note the formatting of the title of the
+ book reviewed, and also the use of
+ parteditandtrans. The author-date system doesn't
+ absolutely require the use of this latter mechanism,
+ which was invented to cope with the differences
+ between notes and bibliography in the other Chicago
+ style. Still, although simply writing "ed. and
+ trans." yourself will suffice, using the mechanism
+ will make your .bib file work across multiple
+ languages, and will also allow it to work, with
+ fewer modifications, in the notes \& bibliography
+ style, should that be needed.}
}
@Article{reaves:rosen,
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-dates-common.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-dates-common.cbx
index 7cfe99f699..b1320bf695 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-dates-common.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-dates-common.cbx
@@ -4,7 +4,7 @@
% list) for the two author-date styles of the Chicago Manual of Style,
% 17th edition.
-\ProvidesFile{chicago-dates-common.cbx}[2022/11/17 v 3.18b biblatex
+\ProvidesFile{chicago-dates-common.cbx}[2024/04/15 v 3.20 biblatex
citation style]
%%%% Biblatex initialization + Chicago options + Toggles %%%%
@@ -1034,6 +1034,43 @@ citation style]
\namepart{given}
}
+ %% Biblatex version 3.20 added this declaration to its name-parts
+ %% apparatus, and you need one for each new style you add when using
+ %% that version, or else documents won't compile. I include them
+ %% here inside the \ifdef test because earlier versions of biblatex
+ %% don't define the command.
+
+ \ifdef{\DeclareNamehashTemplate}{%
+ \DeclareNamehashTemplate[western]{
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{suffix}
+ }%
+ \cms@template@wrapper{\DeclareNamehashTemplate}[russian]{
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{suffix}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{patronymic}
+ }%
+ \cms@template@wrapper{\DeclareNamehashTemplate}[ethiopian]{
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{suffix}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{patronymic}
+ \namepart[hashscope=full]{papponymic}
+ }%
+ \cms@template@wrapper{\DeclareNamehashTemplate}[cjk]{
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{suffix}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{cjk}
+ }%
+ }{}%
+
%% These bibmacros print the names when the standard biblatex
%% equivalents are insufficient. You only need to provide a new one
%% for a new style if standard biblatex doesn't provide one that is
@@ -2068,6 +2105,46 @@ citation style]
{}%
{\usebibmacro{postnote}}
+\DeclareCiteCommand{\citetitle}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexfield{indextitle}}
+ {}%
+ \ifthenelse{\ifentrytype{article}\OR\ifentrytype{review}\OR
+ \ifentrytype{suppperiodical}}%
+ {\iffieldundef{shorttitle}%
+ {\iffieldundef{title}%
+ {\iffieldundef{shortjournal}%
+ {\iffieldundef{journaltitle}
+ {}%
+ {\printtext[cmsyearhyper]{\printfield{journaltitle}}}}%
+ {\printtext[cmsyearhyper]{\printfield{shortjournal}}}}%
+ {\printtext[cmsyearhyper]{\printfield{title}}}}%
+ {\printtext[cmsyearhyper]{\printfield[title]{shorttitle}}}}%
+ {\printtext[cmsyearhyper]{\printfield[citetitle]{labeltitle}}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citetitle}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexfield{indextitle}}
+ {}%
+ \ifthenelse{\ifentrytype{article}\OR\ifentrytype{review}\OR
+ \ifentrytype{suppperiodical}}%
+ {\iffieldundef{title}%
+ {\iffieldundef{journaltitle}
+ {}%
+ {\printtext[cmsyearhyper]{\printfield{journaltitle}}}}%
+ {\printtext[cmsyearhyper]{\printfield{title}}}}%
+ {\printtext[cmsyearhyper]{\printfield{title}}}}%
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
\DeclareCiteCommand{\atcite}
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
index f5b2f942e0..1f9fd8771c 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-chicago/latex/chicago-notes.cbx
@@ -4,7 +4,7 @@
% formatted according to the specifications of the Chicago Manual of
% Style.
-\ProvidesFile{chicago-notes.cbx}[2022/11/17 v 3.18b biblatex citation style]
+\ProvidesFile{chicago-notes.cbx}[2024/04/15 v 3.20 biblatex citation style]
%%%% Biblatex initialization + Chicago options + Toggles %%%%
@@ -1623,6 +1623,43 @@
\namepart{given}
}
+ %% Biblatex version 3.20 added this declaration to its name-parts
+ %% apparatus, and you need one for each new style you add when using
+ %% that version, or else documents won't compile. I include them
+ %% here inside the \ifdef test because earlier versions of biblatex
+ %% don't define the command.
+
+ \ifdef{\DeclareNamehashTemplate}{%
+ \DeclareNamehashTemplate[western]{
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{suffix}
+ }%
+ \cms@template@wrapper{\DeclareNamehashTemplate}[russian]{
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{suffix}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{patronymic}
+ }%
+ \cms@template@wrapper{\DeclareNamehashTemplate}[ethiopian]{
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{suffix}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{patronymic}
+ \namepart[hashscope=full]{papponymic}
+ }%
+ \cms@template@wrapper{\DeclareNamehashTemplate}[cjk]{
+ \namepart[hashscope=full]{prefix}
+ \namepart[hashscope=full]{family}
+ \namepart[hashscope=full]{suffix}
+ \namepart[hashscope=full]{given}
+ \namepart[hashscope=full]{cjk}
+ }%
+ }{}%
+
%% These bibmacros print the names when the standard biblatex
%% equivalents are insufficient. You only need to provide a new one
%% for a new style if standard biblatex doesn't provide one that is
diff --git a/macros/latex/contrib/epcqrcode/README b/macros/latex/contrib/epcqrcode/README
index e9c0ab8f86..3de8600002 100644
--- a/macros/latex/contrib/epcqrcode/README
+++ b/macros/latex/contrib/epcqrcode/README
@@ -1,13 +1,14 @@
==============================================================================
-The `epcqrcode' package v1.0
-Copyright (C) 2024 by David Wedekind, Paul Kantiem, Dr. rer. nat. Wolf Müller (epc-qr-code@proton.me)
+The `epcqrcode' package v1.1
+Copyright (C) 2024 by David Wedekind, Paul Kantiem, Wolf Müller (epc-qr-code@proton.me)
This package is a wrapper for the 'qrcode' package.
It generates valid EPC QR codes by providing syntax and validity checks for given inputs.
Changes:
- 2024-02-07 Initial version
+- 2024-04-12 Fixed minor issue
==============================================================================
This work may be distributed and/or modified under the
diff --git a/macros/latex/contrib/epcqrcode/epcqrcode-doc.pdf b/macros/latex/contrib/epcqrcode/epcqrcode-doc.pdf
index f3241ce045..bb66e53d40 100644
--- a/macros/latex/contrib/epcqrcode/epcqrcode-doc.pdf
+++ b/macros/latex/contrib/epcqrcode/epcqrcode-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/epcqrcode/epcqrcode.dtx b/macros/latex/contrib/epcqrcode/epcqrcode.dtx
index ef2d1c8441..4c1a6eb9a3 100644
--- a/macros/latex/contrib/epcqrcode/epcqrcode.dtx
+++ b/macros/latex/contrib/epcqrcode/epcqrcode.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2024 by David Wedekind, Paul Kantiem, Dr. rer. nat. Wolf Müller (epc-qr-code@proton.me)
+% Copyright (C) 2024 by David Wedekind, Paul Kantiem, Wolf Müller (epc-qr-code@proton.me)
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[2022-06-01]%
-%<package>\ProvidesPackage{epcqrcode}[2024-02-07 v1.0 dtx epcqrcode file]%
+%<package>\ProvidesPackage{epcqrcode}[2024-04-12 v1.1 dtx epcqrcode file]%
%<package>\RequirePackage{qrcode}%
%<package>\RequirePackage{xstring}%
%<package>\RequirePackage{calculator}%
@@ -37,6 +37,7 @@
% \fi
%
% \changes{v1.0}{2024/02/07}{Initial version}
+% \changes{v1.1}{2024/04/12}{Fixed minor issue}
% \GetFileInfo{epcqrcode.sty}
%
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
@@ -47,8 +48,8 @@
% \title{The \textsf{epcqrcode} package\thanks{This document
% corresponds to \textsf{epcqrcode}~\fileversion,
% dated~\filedate.}}
-% \author{David Wedekind, Paul Kantiem, Dr. rer. nat. Wolf Müller \\ epc-qr-code@proton.me}
-% \date{February 07, 2024}
+% \author{David Wedekind, Paul Kantiem, Wolf Müller \\ epc-qr-code@proton.me}
+% \date{April 12, 2024}
%
% \maketitle
%
@@ -570,7 +571,7 @@ information .store = \epcqr@information%
\addtocounter{epcqrcode@OverallLength}{\epcqrcode@NameLength}%
\StrLen{\epcqrcode@CleanedIban}[\epcqrcode@IbanLength]%
\addtocounter{epcqrcode@OverallLength}{\epcqrcode@IbanLength}%
- \ifreasonx\epcqr@amount\empty%
+ \ifx\epcqr@amount\empty%
\relax%
\else%
\StrLen{\epcqr@amount}[\epcqrcode@AmountLength]%
diff --git a/macros/latex/contrib/epcqrcode/epcqrcode.ins b/macros/latex/contrib/epcqrcode/epcqrcode.ins
index e0bd9d6bb3..846aa08011 100644
--- a/macros/latex/contrib/epcqrcode/epcqrcode.ins
+++ b/macros/latex/contrib/epcqrcode/epcqrcode.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2024 by David Wedekind, Paul Kantiem, Dr. rer. nat. Wolf Müller (epc-qr-code@proton.me)
+%% Copyright (C) 2024 by David Wedekind, Paul Kantiem, Wolf Müller (epc-qr-code@proton.me)
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -18,7 +18,7 @@
This is a generated file.
-Copyright (C) 2024 by David Wedekind, Paul Kantiem, Dr. rer. nat. Wolf Müller (epc-qr-code@proton.me)
+Copyright (C) 2024 by David Wedekind, Paul Kantiem, Wolf Müller (epc-qr-code@proton.me)
This file may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3 of this license or (at your option) any later
diff --git a/macros/latex/contrib/fontscale/CHANGELOG.md b/macros/latex/contrib/fontscale/CHANGELOG.md
new file mode 100644
index 0000000000..802fb374ef
--- /dev/null
+++ b/macros/latex/contrib/fontscale/CHANGELOG.md
@@ -0,0 +1,62 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a
+Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
+[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [v1.2.0] - 2024-04-15
+
+### Added
+- It is now documented that the keys and commands provided by this package take
+ as a value or argument a dimen, skip, floating point, or integer expression
+ instead of simply a size, skip, number, or integer.
+- This package now includes a CHANGELOG file.
+
+### Changed
+- Documentation improvements.
+
+### Fixed
+- The key `reset=preamble` and `\SetFontStep` no longer rely on undocumented
+ `expl3` features.
+- Corrected typo in the documentation.
+
+## [v1.1.1] - 2024-04-07
+
+### Changed
+- Improved performance, especially when using a musical typographic scale.
+- Small documentation improvements.
+
+## [v1.1.0] - 2024-03-31
+
+### Added
+ - `\SetFontStep`, `\SetFontScale`, `\SetFontSize`, `\ScaleFont`, and
+ `\SetFontSizeBaselineskip` are now set up to work with `\text_purify:n`.
+
+## [v1.0.3] - 2024-03-26
+
+### Changed
+- Code improvements, particularly to document commands defined with optional
+ arguments.
+
+## [v1.0.2] - 2024-03-22
+
+### Changed
+- Performance and code improvements.
+
+### Fixed
+- Fixed issue where the key `reset=preamble` relied on an unsupported `V`-type
+ `bool` argument.
+
+## [v1.0.1] - 2024-03-08
+
+### Added
+- Added the `.tex` sources for the documentation.
+- Added the CTAN link to the `.sty` and README files.
+
+## [v1.0.0] - 2024-03-06
+
+### Added
+- First official release to CTAN. \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/README.txt b/macros/latex/contrib/fontscale/README.txt
index f7cc1562b8..292cfada9b 100644
--- a/macros/latex/contrib/fontscale/README.txt
+++ b/macros/latex/contrib/fontscale/README.txt
@@ -1,5 +1,5 @@
-Package: fontscale -- A user interface for setting document font sizes
-Copyright: 2024 (c) Oliver Beery <beeryoliver@gmail.com>
-CTAN: https://ctan.org/pkg/fontscale
-Repository: https://github.com/beeryoliver/fontscale
-License: The LaTeX Project Public License 1.3c
+Package: fontscale -- A user interface for setting document font sizes
+Copyright: 2024 (c) Oliver Beery <beeryoliver@gmail.com>
+CTAN: https://ctan.org/pkg/fontscale
+Repository: https://github.com/beeryoliver/fontscale
+License: The LaTeX Project Public License 1.3c
diff --git a/macros/latex/contrib/fontscale/beery.cls b/macros/latex/contrib/fontscale/beery.cls
index d1d480ba13..bfc38f9a59 100644
--- a/macros/latex/contrib/fontscale/beery.cls
+++ b/macros/latex/contrib/fontscale/beery.cls
@@ -4,7 +4,7 @@
\NeedsTeXFormat{LaTeX2e}[2023-06-01]
\ProvidesExplClass
{beery}
- {2024-03-08}
+ {2024-04-15}
{}
{}
@@ -49,8 +49,8 @@
\NewDocumentCommand \cmd { m } { \texttt { \token_to_str:N #1 } \@ }
\NewDocumentCommand \cs { m } { \texttt { \token_to_str:c {#1} } \@ }
\NewDocumentCommand \marg { m }
- { \texttt { \c_left_brace_str #1 \c_right_brace_str } }
-\NewDocumentCommand \oarg { m } { \texttt { [ #1 ] } }
+ { \allowbreak \texttt { \c_left_brace_str #1 \c_right_brace_str } }
+\NewDocumentCommand \oarg { m } { \allowbreak \texttt { [ #1 ] } }
\NewDocumentCommand \meta { m } { \texttt { \textlangle #1 \textrangle } }
\NewDocumentCommand \cls { m } { \textsf {#1} }
\NewDocumentCommand \env { m } { \texttt {#1} }
@@ -210,7 +210,7 @@
\RequirePackage [ bottom ] { footmisc }
\renewcommand \footnoterule { }
\setlength { \skip \footins } { \c_beery_big_skip }
-
+\dim_set:Nn \footnotesep { \f@linespread \footnotesep }
\coffin_new:N \l__beery_footnote_coffin
% 1.2 = baselineskip-size-ratio
\dim_const:Nn \c_beery_footnote_baselineheight_dim
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
index d62f104635..029d304d82 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
+++ b/macros/latex/contrib/fontscale/fontscale-manual-table-classic.tex
@@ -1,37 +1,39 @@
-\ProvidesFile{fontscale-manual-table-classic.tex}[2024-03-08]
-
-\begin{table}
- \centering
- \caption
- {%
- The size of each font size command in \unit{pt} when using a classic typographic scale.%
- \label{table:classicscales}%
- }
- \bigskip
- \begin{tblr}
- {
- colspec=
- {
- l
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- }
- ,cell{1}{2-Z}={guard}
- }
- \toprule
- Command & \Key{classic-10pt} & \Key{classic-11pt} & \Key{classic-12pt} \\
- \midrule
- \cs{tiny} & 6 & 7 & 8 \\
- \cs{scriptsize} & 7 & 8 & 9 \\
- \cs{footnotesize} & 8 & 9 & 10 \\
- \cs{small} & 9 & 10 & 11 \\
- \cs{normalsize} & 10 & 11 & 12 \\
- \cs{large} & 11 & 12 & 14 \\
- \cs{Large} & 12 & 14 & 16 \\
- \cs{LARGE} & 14 & 16 & 18 \\
- \cs{huge} & 16 & 18 & 21 \\
- \cs{Huge} & 18 & 21 & 24 \\
- \bottomrule
- \end{tblr}
+\ProvidesFile
+ {fontscale-manual-table-classic.tex}
+ [2024-04-15]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The size of each font size command in \unit{pt} when using a classic typographic scale.%
+ \label{table:classicscales}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2-Z}={guard}
+ }
+ \toprule
+ Command & \Key{classic-10pt} & \Key{classic-11pt} & \Key{classic-12pt} \\
+ \midrule
+ \cs{tiny} & 6 & 7 & 8 \\
+ \cs{scriptsize} & 7 & 8 & 9 \\
+ \cs{footnotesize} & 8 & 9 & 10 \\
+ \cs{small} & 9 & 10 & 11 \\
+ \cs{normalsize} & 10 & 11 & 12 \\
+ \cs{large} & 11 & 12 & 14 \\
+ \cs{Large} & 12 & 14 & 16 \\
+ \cs{LARGE} & 14 & 16 & 18 \\
+ \cs{huge} & 16 & 18 & 21 \\
+ \cs{Huge} & 18 & 21 & 24 \\
+ \bottomrule
+ \end{tblr}
\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
index 570d67d665..8c5cc8c141 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
+++ b/macros/latex/contrib/fontscale/fontscale-manual-table-font-steps.tex
@@ -1,36 +1,38 @@
-\ProvidesFile{fontscale-manual-table-font-steps.tex}[2024-03-08]
-
-\begin{table}
- \centering
- \caption
- {%
- The step of each font size command.
- These are constants and cannot be changed.%
- \label{table:fontsteps}%
- }
- \bigskip
- \begin{tblr}
- {
- colspec=
- {
- l
- Q[si={table-format=3.2},c]
- }
- , cell{1}{2}={guard}
- }
- \toprule
- Command & Step \\
- \midrule
- \cs{tiny} & -4 \\
- \cs{scriptsize} & -3 \\
- \cs{footnotesize} & -2 \\
- \cs{small} & -1 \\
- \cs{normalsize} & 0 \\
- \cs{large} & 1 \\
- \cs{Large} & 2 \\
- \cs{LARGE} & 3 \\
- \cs{huge} & 4 \\
- \cs{Huge} & 5 \\
- \bottomrule
- \end{tblr}
+\ProvidesFile
+ {fontscale-manual-table-font-steps.tex}
+ [2024-04-15]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The step of each font size command.
+ These are constants and cannot be changed.%
+ \label{table:fontsteps}%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2}={guard}
+ }
+ \toprule
+ Command & Step \\
+ \midrule
+ \cs{tiny} & -4 \\
+ \cs{scriptsize} & -3 \\
+ \cs{footnotesize} & -2 \\
+ \cs{small} & -1 \\
+ \cs{normalsize} & 0 \\
+ \cs{large} & 1 \\
+ \cs{Large} & 2 \\
+ \cs{LARGE} & 3 \\
+ \cs{huge} & 4 \\
+ \cs{Huge} & 5 \\
+ \bottomrule
+ \end{tblr}
\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex b/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
index fad108d9e9..306578ec35 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
+++ b/macros/latex/contrib/fontscale/fontscale-manual-table-modular-musical.tex
@@ -1,36 +1,38 @@
-\ProvidesFile{fontscale-manual-table-modular-musical.tex}[2024-03-08]
-
-\begin{table}
- \centering
- \caption
- {%
- The size of each font size command when using a modular or musical typographic scale with the initial settings.
- The font sizes are in \unit{pt} and rounded to two decimal places.%
- }
- \bigskip
- \begin{tblr}
- {
- colspec=
- {
- l
- Q[si={table-format=3.2},c]
- Q[si={table-format=3.2},c]
- }
- ,cell{1}{2-3}={guard}
- }
- \toprule
- Command & \Key{modular} & \Key{musical} \\
- \midrule
- \cs{tiny} & 6.24 & 5.74 \\
- \cs{scriptsize} & 7.02 & 6.60 \\
- \cs{footnotesize} & 7.90 & 7.58 \\
- \cs{small} & 8.89 & 8.71 \\
- \cs{normalsize} & 10 & 10 \\
- \cs{large} & 11.25 & 11.49 \\
- \cs{Large} & 12.66 & 13.20 \\
- \cs{LARGE} & 14.24 & 15.16 \\
- \cs{huge} & 16.02 & 17.41 \\
- \cs{Huge} & 18.02 & 20 \\
- \bottomrule
- \end{tblr}
+\ProvidesFile
+ {fontscale-manual-table-modular-musical.tex}
+ [2024-04-15]
+
+\begin{table}
+ \centering
+ \caption
+ {%
+ The size of each font size command when using a modular or musical typographic scale with the initial settings.
+ The font sizes are in \unit{pt} and rounded to two decimal places.%
+ }
+ \bigskip
+ \begin{tblr}
+ {
+ colspec=
+ {
+ l
+ Q[si={table-format=3.2},c]
+ Q[si={table-format=3.2},c]
+ }
+ , cell{1}{2-3}={guard}
+ }
+ \toprule
+ Command & \Key{modular} & \Key{musical} \\
+ \midrule
+ \cs{tiny} & 6.24 & 5.74 \\
+ \cs{scriptsize} & 7.02 & 6.60 \\
+ \cs{footnotesize} & 7.90 & 7.58 \\
+ \cs{small} & 8.89 & 8.71 \\
+ \cs{normalsize} & 10 & 10 \\
+ \cs{large} & 11.25 & 11.49 \\
+ \cs{Large} & 12.66 & 13.20 \\
+ \cs{LARGE} & 14.24 & 15.16 \\
+ \cs{huge} & 16.02 & 17.41 \\
+ \cs{Huge} & 18.02 & 20 \\
+ \bottomrule
+ \end{tblr}
\end{table} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.pdf b/macros/latex/contrib/fontscale/fontscale-manual.pdf
index d45ffefea9..a1c5644e60 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual.pdf
+++ b/macros/latex/contrib/fontscale/fontscale-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/fontscale/fontscale-manual.tex b/macros/latex/contrib/fontscale/fontscale-manual.tex
index 8dd13a5cbe..ca5b3224fd 100644
--- a/macros/latex/contrib/fontscale/fontscale-manual.tex
+++ b/macros/latex/contrib/fontscale/fontscale-manual.tex
@@ -1,383 +1,386 @@
-\documentclass{beery}
-
-\begin{document}
-
-
-\section*
- {%
- \SetFontStep*{1}%
- The \pkg{fontscale} package%
- }
-
-A user interface for setting document font sizes
-
-Oliver Beery
-
-Version 1.1.1\quad{}7 April 2024
-
-
-\section{Introduction}
-\label{sec:intro}
-
-\subsection{About}
-\label{subsec:about}
-
-\listheading{The \pkg{fontscale} package provides the following functionalities:}
-\begin{itemize}
- \item
- Set document font sizes via a classic, modular, or musical typographic scale.
- \item
- Set arbitrary scales, sizes, and baselineskips for the standard font size commands \cs{tiny}, \cs{scriptsize}, \cs{footnotesize}, \cs{small}, \cs{normalsize}, \cs{large}, \cs{Large}, \cs{LARGE}, \cs{huge}, and \cs{Huge}.
- \item
- Set the font size settings mid\-/document or within a local group.
- \item
- Set the font size by setting the font step, scale, or size.
- \item
- Set the font size relative to the current font size.
- \item
- Use the current font step, scale, size, and baselineskip directly, for example, for printing or within calculations.
- \item
- Print sample text to test different font sizes.
- \item
- For advanced users, store the step, scale, size, and baselineskip of each font size command in \pkg{expl3} variables.
-\end{itemize}
-
-
-\subsection{Loading the package}
-\label{subsec:loading}
-
-This package requires the 10 October 2023 \pkg{l3kernel} update.
-Since this update is fairly recent, you may need to ensure that your \LaTeX{} installation is up\-/to\-/date before using this package.
-
-This package lets the user set arbitrary font sizes.
-This works with most fonts produced today, but, for historical reasons, the default Computer Modern font is available only in a number of fixed sizes.
-If you get a warning that Computer Modern is not available in the requested size, you may need to add the code \cs{RequirePackage{fix-cm}} before \cs{documentclass} to make Computer Modern available at arbitrary font sizes.
-
-\cs{usepackage}\marg{fontscale}
-\nopagebreak\newline
-\cs{fontscalesetup}\marg{\meta{keys}}
-
-Load the \pkg{fontscale} package via the usual command in the document preamble.
-This package has no package options.
-Instead, the package keys are set up via the command \cs{fontscalesetup}\marg{\meta{keys}}.
-\meta{keys} must receive a comma\-/separated list of keys and their associated values.
-The package keys are documented in \S\ref{sec:choosing} and \S\ref{sec:overwriting}.
-
-Many \LaTeX{} document classes have a font size option (\Key{10pt}, \Key{11pt}, \Key{12pt}, etc.\@) which not only changes the set of document font sizes, but also modifies additional settings such as the page layout and vertical spacing which were specifically designed to work with those font sizes.
-For this reason, you may want to set the document class font size option close to the value of \cs{normalsize} set by this package.
-
-Internally, this package sets up each font size command from \cs{tiny} to \cs{Huge} using the kernel command \cs{@setfontsize}\---they have no additional functionality beyond that of \cs{@setfontsize}.
-Unlike the standard document classes, the font size commands set up by this package do not change the vertical spacing for displayed math and list structures.
-If the user would like to add this functionality or perhaps other features to the font size commands, they can do so via hooks, which are documented in the \LaTeX{} kernel.
-
-
-\subsection{Terminology}
-\label{subsec:terminology}
-
-When using the \pkg{fontscale} package, each font size, including the standard font size commands from \cs{tiny} to \cs{Huge}, has a step, scale, size, and baselineskip.
-The latter two parameters are the familiar first and second arguments to the low\-/level font command \cs{fontsize}\marg{\meta{size}}\marg{\meta{skip}}.
-The font scale is the relative font size; the ratio of the font size to \cs{normalsize}.
-The font step is the number of font size gradations from \cs{normalsize}, which has a step of \num{0}.
-Table~\ref{table:fontsteps} lists the font step of each font size command.
-
-\input{./fontscale-manual-table-font-steps.tex}
-
-
-\section{Choosing the typographic scale}
-\label{sec:choosing}
-
-\Key{typographic-scale}
- [classic-10pt, classic-11pt, classic-12pt, modular, musical]
- [classic-10pt]
-\newline
-\Key{modular/ratio}[\meta{number}][1.125]
-\newline
-\Key{musical/ratio}[\meta{number}][2]%
-\nopagebreak\newline
-\Key{musical/notes}[\meta{integer}][5]
-
-The key \Key{typographic\-/scale} sets the font sizes using a classic, modular, or musical typographic scale.
-These are common methods of choosing a set of document font sizes.
-The choice of typographic scale initializes to \Key{classic\-/10pt}.
-
-The key \Key{typographic\-/scale} can also be set in a condensed format via the keys \Key{classic\-/10pt}, \Key{classic\-/11pt}, \Key{classic\-/12pt}, \Key{modular}, or \Key{musical}, which set the key \Key{typographic\-/scale} to the corresponding value.
-
-The classic typographic scale consists of the traditional font sizes
-\numlist{6;7;8;9;10;11;12;14;16;18;21;24;36;48;60;72}.%
-\footnote{See \S{}3.1 of \textit{The Elements of Typographic Style} by Robert Bringhurst.}
-They have been used since the sixteenth century and are the default font sizes on most computer software.
-The keys \Key{classic-10pt, classic-11pt, classic-12pt} set the size of each font size command to values based on their position in the classic typographic scale.
-The size of \cs{normalsize} is the named point size.
-The sizes of the other font size commands are the adjacent font sizes in the scale.
-Table~\ref{table:classicscales} lists the size of each font size command when using a classic typographic scale.
-
-\input{./fontscale-manual-table-classic.tex}
-
-The key \Key{modular} sets the font sizes from \cs{tiny} to \cs{Huge} using a modular typographic scale.
-In a modular scale, each font size is a fixed ratio from the adjacent font sizes.%
-\footnote{\url{https://alistapart.com/article/more-meaningful-typography/}}
-Here, the base font size is the size of \cs{normalsize}, which can be set via the key \Key{normalsize/size}[\meta{size}], more documented in \S\ref{sec:overwriting}.
-If not set, \cs{normalsize} initializes to \qty{10}{pt}.
-The modular ratio can be set via the key \Key{modular\slash{}ratio}.
-The initial modular ratio is \num{1.125}.
-
-\input{./fontscale-manual-table-modular-musical.tex}
-
-The key \Key{musical} sets the font sizes according to their position in a musical typographic scale.
-The font size is calculated using the formula:%
-\footnote
- {%
- I have referenced this article by Spencer Mortensen:
- \newline
- \url{https://spencermortensen.com/articles/typographic-scale/}%
- }
-\[ f_i = f_0 \times r ^ { i / n } \]
-$f_0$ is the base font size, the size of \cs{normalsize}.
-$f_i$ is the font size with font step~$i$.
-$n$ is the number of notes in the musical scale\---the number of font size gradations or steps above \cs{normalsize}.
-$r$ is the ratio of the musical scale, the ratio of the highest to the lowest note $ f_n / f_0 $.
-(The modular typographic scale is actually a special case of the musical typographic scale where $n=1$.)
-
-The musical ratio~$r$ and the number of notes~$n$ can be set via the keys \Key{musical\slash{}ratio} and \Key{musical\slash{}notes}.
-The initial musical ratio\---\num{2}\---and the initial number of notes\---\num{5}\---are the same as that of the classic typographic scale.%
-\footnote{Ibid.}
-Conveniently, \cs{Huge} is \num{5} steps above \cs{normalsize}.
-The font size of \cs{normalsize}~$f_0$ can be set using the key \Key{normalsize/size}[\meta{size}], more documented in \S\ref{sec:overwriting}.
-When using a musical typographic scale, \cs{normalsize} initializes to \qty{10}{pt}.%
-\footnote {I have set the initial value to \qty{10}{pt} instead of the \qty{12}{pt} recommended by the Spencer Mortensen article because this matches the default settings of the standard \LaTeXe{} document classes.}
-
-\Key{baselineskip-size-ratio}[\meta{number}][1.2]
-\KeepNextPar*
-
-The key \Key{baselineskip\-/size\-/ratio} sets the ratio of the font baselineskip to the font size.
-By default, the font baselineskip of each font size command equals its font size times \Key{baselineskip\-/size\-/ratio}.
-Users should not adjust this value unless they really know what they are doing.
-When using increased line spacing, users should prefer the low\-/level font command \cs{linespread} or the \pkg{setspace} package.
-
-
-\section{Overwriting the typographic scale}
-\label{sec:overwriting}
-
-In some situations, users may need to explicitly set the scale, size, or baselineskip of a font size command, overwriting the value set by the keys in \S\ref{sec:choosing}.
-Note that the font steps and the scale of \cs{normalsize} are constants and cannot be changed.
-
-\Key{\meta{font size command}/scale}[\meta{number}]
-\KeepNextPar*
-
-The keys \Key{\meta{font size command}\slash{}scale} set the scale of \meta{font size command} to \meta{number}, ignoring the value set by the key \Key{typographic-scale}.
-The key \Key{normalsize\slash{}scale} is not defined.
-
-\Key{\meta{font size command}/size}[\meta{size}]
-\KeepNextPar*
-
-The keys \Key{\meta{font size command}\slash{}size} set the size of \meta{font size command} to \meta{size}, ignoring the values set by the keys \Key{typographic-scale} and \Key{\meta{font size command}\slash{}scale}.
-\meta{size} supplies a default unit of \unit{pt}.
-
-The package will issue a warning if the user sets the keys \Key{\meta{font size command}\slash{}size} and \Key{\meta{font size command}\slash{}scale} for the same \meta{font size command} since the latter key will be ignored.
-
-\Key{\meta{font size command}/baselineskip}[\meta{skip}]
-\KeepNextPar*
-
-The keys \Key{\meta{font size command}\slash{}baselineskip} set the font baselineskip of \meta{font size command} to \meta{skip} instead of calculating it from the size of \meta{font size command} and \Key{baselineskip\-/size\-/ratio}.
-\meta{skip} supplies a default unit of \unit{pt}.
-
-\Key{\meta{font size command}}[\meta{size}]
-\nopagebreak\newline
-\Key{\meta{font size command}}[\meta{size}/\meta{skip}]
-
-The keys \Key{\meta{font size command}} set the keys \Key{\meta{font size command}\slash{}size} or \Key{\meta{font size command}\slash{}baselineskip} in a condensed format.
-The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, $10/12$ or $11/13$.
-The number before/after the slash is the size/leading in \unit{pts}.
-
-\Key{ignore-order}[true, false][false]
-\KeepNextPar*
-
-The user should take care to ensure that the font sizes and font baselineskips remain in the correct order when directly setting the scales, sizes, or baselineskips of the different font size commands.
-The magnitudes of the sizes and baselineskips should be ordered from \cs{tiny} to \cs{normalsize} to \cs{Huge}.
-This is important for typographic and syntactic consistency.
-This package will issue a warning if they are not in the correct order.
-The user can disable this warning via the key \Key{ignore\-/order}[true] or just \Key{ignore\-/order}.
-
-
-\section{User commands}
-\label{sec:usercommands}
-
-\subsection{Expandable font parameters}
-\label{subsec:fontparameters}
-
-\cs{CurrentFontStep}
-\nopagebreak\newline
-\cs{CurrentFontScale}
-\newline
-\cs{CurrentFontSize}
-\nopagebreak\newline
-\cs{CurrentFontBaselineskip}
-
-These are fully expandable commands that expand to the current font step, scale, size, or baselineskip.
-They can be used for printing or within calculations.
-Caution: \cs{CurrentFontStep} will expand to nothing if the current step is undefined.
-
-Internally, \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} use the kernel command \cs{f@size}.
-\cs{CurrentFontSize} expands to \texttt{f@size pt}.
-\cs{CurrentFontBaselineskip} expands to the kernel command \cs{f@baselineskip}.
-Note that the low\-/level font command \cs{fontsize}\marg{\meta{size}}\allowbreak\marg{\meta{skip}} sets \cs{f@size} before expanding its second argument.
-This means that \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} may need to be first expanded if used in \meta{skip}.
-This package provides the command \cs{SetFontSizeBaselineskip} as an alternative to \cs{fontsize} + \cs{selectfont} that avoids this issue (\S\ref{subsec:fontsize}).
-
-\subsection{More font sizing commands}
-\label{subsec:fontsize}
-
-The \pkg{fontscale} package provides the commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} which set the font size in different ways.
-The first three commands have a starred version which sets the font size relative to the current font size.
-Internally, these commands all use the low\-/level font commands \cs{fontsize}\marg{\meta{size}}\allowbreak\marg{\meta{skip}} and \cs{selectfont}.
-These commands should be used only in special cases.
-Generally, users should prefer the font size commands from \cs{tiny} to \cs{Huge} for typographic and syntactic consistency, although \cs{SetFontStep*}\marg{\meta{integer}} can use a font size command directly.
-
-\cs{SetFontStep}\marg{\meta{number}}
-\nopagebreak\newline
-\cs{SetFontStep*}\marg{\meta{number}}
-
-\cs{SetFontStep} sets the font size by setting the font step to \meta{number}.
-The starred version \cs{SetFontStep*} adds \meta{number} to the current font step.
-If the choice of typographic scale is not modular or musical, then the only valid values for \meta{number} are the integers from \num{-4} to \num{5}, corresponding to the font size commands from \cs{tiny} to \cs{Huge}.
-\cs{SetFontStep} will issue an error if the step is invalid.
-\cs{SetFontStep} sets the font baselineskip to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
-If the step matches the step of any font size command, then that font size command will be used directly.
-
-\listheading{Examples:}
-\begin{itemize}
- \item
- For example, \cs{SetFontStep}\marg{-2} and \cs{SetFontStep}\marg{2} use \cs{footnotesize} and \cs{Large}.
- Note that it is typically better to use the equivalent font size command in place of \cs{SetFontStep}\marg{\meta{integer}}.
- \item
- If the current font size is \cs{normalsize}, \cs{SetFontStep*}\marg{1} and \cs{SetFontStep*}\marg{-1} use \cs{large} and \cs{small}.
- This is useful for moving up or down a note on the typographic scale.
- \item
- If the choice of typographic scale is modular or musical, \cs{SetFontStep*}\marg{-0.5} sets the font size and font baselineskip to values between that of \cs{normalsize} and \cs{small}.
- Otherwise, it produces an error.
-\end{itemize}
-
-\cs{SetFontScale}\marg{\meta{number}}
-\nopagebreak\newline
-\cs{SetFontScale*}\marg{\meta{number}}
-
-\cs{SetFontScale} sets the font size by setting the font scale to \meta{number}.
-The font baselineskip is set to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
-The starred version \cs{SetFontScale*} adds \meta{number} to the current font scale.
-For example, \cs{SetFontScale}\marg{1.25} makes the font size 25\% larger than \cs{normalsize}.
-If the current font size is \cs{normalsize}, \cs{SetFontScale*}\marg{0.25} is equivalent to \cs{SetFontScale}\marg{1.25}.
-
-\cs{SetFontSize}\marg{\meta{size}}
-\nopagebreak\newline
-\cs{SetFontSize*}\marg{\meta{size}}
-
-\cs{SetFontSize} sets the font size to \meta{size}.
-\meta{size} supplies a default unit of \unit{pt}.
-The font baselineskip is set to the font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
-The starred version \cs{SetFontSize*} adds \meta{size} to the current size.
-For example, \cs{SetFontSize*}\marg{1} and \cs{SetFontSize*}\marg{-1pt} increase and decrease the current font size by a \unit{pt}.
-
-\cs{ScaleFont}\marg{\meta{number}}
-\KeepNextPar*
-
-Scales the current font size and the current font baselineskip by a factor of \meta{number}.
-\cs{ScaleFont} resembles the \cs{scalefont} command provided by the \pkg{scalefnt} package, except that it uses floating point calculations and clears the stretch and shrink components of the font baselineskip.
-For example, if the current font size and font baselineskip are \qty{10}{pt} and \qty{12}{pt}, using \cs{ScaleFont}\marg{0.8} will reduce them proportionally to \qty{8}{pt} and \qty{9.6}{pt}.
-
-\cs{SetFontSizeBaselineskip}\marg{\meta{size}}\marg{\meta{skip}}
-\KeepNextPar*
-
-Sets the font size and font baselineskip to \meta{size} and \meta{skip}.
-Both \meta{size} and \meta{skip} supply a default unit of \unit{pt}.
-\cs{SetFontSizeBaselineskip} can be used as an alternative to \cs{fontsize} + \cs{selectfont} as it avoids the issue with \cs{f@size} discussed in \S\ref{subsec:fontparameters}
-\vfill\pagebreak%manual
-
-\subsection{Testing and debugging}
-\label{subsec:debug}
-
-The commands documented here are intended primarily for testing and debugging.
-I have used them often when developing this package so I think users will find them helpful.
-
-\cs{PrintFontParameters}
-\nopagebreak\newline
-\cs{PrintAllFontParameters}
-
-\cs{PrintFontParameters} prints the current step, scale, size, and baselineskip in this order in a comma\-/separated list of key = value pairs.
-If the current step is undefined (as explained for \cs{SetFontStep} in \S\ref{subsec:fontsize}), it will be left blank.
-\cs{PrintAllFontParameters} prints the step, scale, size, and baselineskip of each font size command.
-
-\cs{PrintSampleText}\oarg{\meta{text}}
-\nopagebreak\newline
-\cs{PrintSampleText*}\oarg{\meta{text}}
-
-\cs{PrintSampleText} prints \meta{text} in each font size ordered from \cs{tiny} to \cs{Huge} each followed by a paragraph break.
-The starred version \cs{PrintSampleText*} reverses the sizing order.
-The \meta{text} can be changed via the optional argument, but cannot contain \cs{par} tokens.
-The default \meta{text} is \enquote{The \texttt{fontscale} package: A user interface for setting document font sizes}.
-
-\cs{PrintFontSizeCommand}
-\KeepNextPar*
-
-\cs{PrintFontSizeCommand} tests whether the current font size and font baselineskip match that of any font size command.
-If so, it prints the name of that font size command.
-If not, it instead prints \enquote{UNDEFINED\@}.
-One useful way of printing example text is by using
-\cs{PrintSampleText}\allowbreak\oarg{\cs{PrintFontSizeCommand}:\textvisiblespace{}\cs{PrintFontParameters}}.
-
-\subsection
- {%
- \texorpdfstring
- {More on \cs{fontscalesetup}}
- {More on \textbackslash{}fontscalesetup}%
- }
-\label{subsec:fontscalesetup}
-
-\cs{fontscalesetup}\marg{\meta{keys}}
-\KeepNextPar*
-
-Sets and processes the \pkg{fontscale} package keys and uses \cs{normalsize}.
-\cs{fontscalesetup} can be applied mid\-/document or locally within the current \TeX{} group.
-The key \Key{reset} is also available.
-Its value must be either \texttt{initial} or \texttt{preamble}.
-The key \Key{reset}[initial] or just \Key{reset} sets all the keys to their initial values.
-The key \Key{reset}[preamble] sets all the keys to their values at the end of the preamble (or does nothing if used before the end of the preamble).
-
-
-\section{Programming}
-\label{sec:programming}
-
-This section is relevant to \LaTeX3 programmers.
-
-The user commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} are set up to work with \cs{text_purify:n}.
-\cs{text_purify:n} will correctly remove these commands and their arguments.
-This includes the starred versions \cs{SetFontStep*}, \cs{SetFontScale*}, and \cs{SetFontSize*}.
-
-This package does not provide any public \pkg{expl3} functions.
-
-This package provides some public \pkg{expl3} variables.
-The package stores in public variables the step, scale, size, and baselineskip of each font size command.
-These variables should not be modified directly.
-Instead, they should be modified only indirectly via the command \cs{fontscalesetup}.
-
-Each takes the form:
-
-\begingroup
- \ttfamily
- \textbackslash{}c\_fontscale\_\meta{font size command}\_step\_fp
- \nopagebreak\newline
- \textbackslash{}l\_fontscale\_\meta{font size command}\_scale\_fp
- \newline
- \textbackslash{}l\_fontscale\_\meta{font size command}\_size\_dim
- \nopagebreak\newline
- \textbackslash{}l\_fontscale\_\meta{font size command}\_baselineskip\_skip
-\endgroup
-
-Exception:
-\cs{l_fontscale_normalsize_scale_fp} is not defined.
-The scale of \cs{normalsize} is instead stored as the constant \cs{c_fontscale_normalsize_scale_fp}, which always equals \num{1}.
-
-The step, scale, size, and baselineskip of each font size command are also stored in property lists, one for each font size command:
-
-\texttt{\textbackslash{}l\_fontscale\_\meta{font size command}\_prop}
-
+\documentclass{beery}
+
+\begin{document}
+
+
+\section*
+ {%
+ \SetFontStep*{1}%
+ The \pkg{fontscale} package%
+ }
+
+A user interface for setting document font sizes
+
+Oliver Beery
+
+Version 1.2.0\quad{}15 April 2024
+
+
+\section{Introduction}
+\label{sec:intro}
+
+\subsection{About}
+\label{subsec:about}
+
+\listheading{The \pkg{fontscale} package provides the following functionalities:}
+\begin{itemize}
+ \item
+ Set document font sizes via a classic, modular, or musical typographic scale.
+ \item
+ Set arbitrary scales, sizes, and baselineskips for the standard font size commands \cs{tiny}, \cs{scriptsize}, \cs{footnotesize}, \cs{small}, \cs{normalsize}, \cs{large}, \cs{Large}, \cs{LARGE}, \cs{huge}, and \cs{Huge}.
+ \item
+ Set the font size settings mid\-/document or within a local group.
+ \item
+ Set the font size by setting the font step, scale, or size.
+ \item
+ Set the font size relative to the current font size.
+ \item
+ Use the current font step, scale, size, and baselineskip directly, for example, for printing or within calculations.
+ \item
+ Print sample text to test different font sizes.
+ \item
+ For advanced users, store the step, scale, size, and baselineskip of each font size command in \pkg{expl3} variables.
+\end{itemize}
+
+\subsection{Loading the package}
+\label{subsec:loading}
+
+This package requires the 10 October 2023 \pkg{l3kernel} update.
+Since this update is fairly recent, you may need to ensure that your \LaTeX{} installation is up\-/to\-/date before using this package.
+
+This package lets the user set arbitrary font sizes.
+This works with most fonts produced today, but, for historical reasons, the default Computer Modern font is available only in a number of fixed sizes.
+If you get a warning that Computer Modern is not available in the requested size, you may need to add the code \cs{RequirePackage{fix-cm}} before \cs{documentclass} to make Computer Modern available at arbitrary font sizes.
+
+\cs{usepackage}\marg{fontscale}
+\nopagebreak\newline
+\cs{fontscalesetup}\marg{\meta{keyval list}}
+
+Load the \pkg{fontscale} package via the usual command in the document preamble.
+This package has no package options.
+Instead, the package keys are set up via the command \cs{fontscalesetup}\marg{\meta{keyval list}}.
+\meta{keyval list} must receive a comma\-/separated list of keys and their associated values.
+The package keys are documented in \S\ref{sec:choosing} and \S\ref{sec:overwriting}.
+
+Many \LaTeX{} document classes have a font size option (\Key{10pt}, \Key{11pt}, \Key{12pt}, etc.\@) which not only changes the set of document font sizes, but also modifies additional settings such as the page layout and vertical spacing which were specifically designed to work with those font sizes.
+For this reason, you may want to set the document class font size option close to the value of \cs{normalsize} set by this package.
+
+Internally, this package sets up each font size command from \cs{tiny} to \cs{Huge} using the kernel command \cs{@setfontsize}\---they have no additional functionality beyond that of \cs{@setfontsize}.
+Unlike the standard document classes, the font size commands set up by this package do not change the vertical spacing for displayed math and list structures.
+If the user would like to add this functionality or perhaps other features to the font size commands, they can do so via hooks, which are documented in the \LaTeX{} kernel.
+
+\subsection{Terminology}
+\label{subsec:terminology}
+
+When using the \pkg{fontscale} package, each font size, including the standard font size commands from \cs{tiny} to \cs{Huge}, has a step, scale, size, and baselineskip.
+The latter two parameters are the familiar first and second arguments to the low\-/level font command \cs{fontsize}\marg{\meta{dimen}}\marg{\meta{skip}}.
+The font scale is the relative font size; the ratio of the font size to \cs{normalsize}.
+The font step is the number of font size gradations from \cs{normalsize}, which has a step of \num{0}.
+Table~\ref{table:fontsteps} lists the font step of each font size command.
+
+\input{./fontscale-manual-table-font-steps.tex}
+
+This package defines many keys and commands that take as a value or argument a \meta{dim expr}, \meta{skip expr}, \meta{fp expr}, or \meta{int expr}.
+This syntax is short for a dimen, skip, floating point, or integer expression, respectively.
+See \pkg{usrguide} \S5 for more information.%
+\footnote{\url{https://ctan.org/pkg/usrguide}}
+
+
+\section{Choosing the typographic scale}
+\label{sec:choosing}
+
+\Key{typographic-scale}
+ [classic-10pt, classic-11pt, classic-12pt, modular, musical]
+ [classic-10pt]
+\newline
+\Key{modular/ratio}[\meta{fp expr}][1.125]
+\newline
+\Key{musical/ratio}[\meta{fp expr}][2]%
+\nopagebreak\newline
+\Key{musical/notes}[\meta{int expr}][5]
+
+The key \Key{typographic\-/scale} sets the font sizes using a classic, modular, or musical typographic scale.
+These are common methods of choosing a set of document font sizes.
+The choice of typographic scale initializes to \Key{classic\-/10pt}.
+
+The key \Key{typographic\-/scale} can also be set in a condensed format via the keys \Key{classic\-/10pt}, \Key{classic\-/11pt}, \Key{classic\-/12pt}, \Key{modular}, or \Key{musical}, which set the key \Key{typographic\-/scale} to the corresponding value.
+
+The classic typographic scale consists of the traditional font sizes
+\numlist{6;7;8;9;10;11;12;14;16;18;21;24;36;48;60;72}.%
+\footnote{See \S{}3.1 of \textit{The Elements of Typographic Style} by Robert Bringhurst.}
+They have been used since the sixteenth century and are the default font sizes on most computer software.
+The keys \Key{classic-10pt, classic-11pt, classic-12pt} set the size of each font size command to values based on their position in the classic typographic scale.
+The size of \cs{normalsize} is the named point size.
+The sizes of the other font size commands are the adjacent font sizes in the scale.
+Table~\ref{table:classicscales} lists the size of each font size command when using a classic typographic scale.
+
+\input{./fontscale-manual-table-classic.tex}
+
+The key \Key{modular} sets the font sizes from \cs{tiny} to \cs{Huge} using a modular typographic scale.
+In a modular scale, each font size is a fixed ratio from the adjacent font sizes.%
+\footnote{\url{https://alistapart.com/article/more-meaningful-typography/}}
+Here, the base font size is the size of \cs{normalsize}, which can be set via the key \Key{normalsize/size}[\meta{dim expr}], more documented in \S\ref{sec:overwriting}.
+If not set, \cs{normalsize} initializes to \qty{10}{pt}.
+The modular ratio can be set via the key \Key{modular\slash{}ratio}.
+The initial modular ratio is \num{1.125}.
+
+\input{./fontscale-manual-table-modular-musical.tex}
+
+The key \Key{musical} sets the font sizes according to their position in a musical typographic scale.
+The font size is calculated using the formula:%
+\footnote
+ {%
+ I have referenced this article by Spencer Mortensen:
+ \newline
+ \url{https://spencermortensen.com/articles/typographic-scale/}%
+ }
+\[ f_i = f_0 \times r ^ { i / n } \]
+$f_0$ is the base font size, the size of \cs{normalsize}.
+$f_i$ is the font size with font step~$i$.
+$n$ is the number of notes in the musical scale\---the number of font size gradations or steps above \cs{normalsize}.
+$r$ is the ratio of the musical scale, the ratio of the highest to the lowest note $ f_n / f_0 $.
+(The modular typographic scale is actually a special case of the musical typographic scale where $n=1$.)
+
+The musical ratio~$r$ and the number of notes~$n$ can be set via the keys \Key{musical\slash{}ratio} and \Key{musical\slash{}notes}.
+The initial musical ratio\---\num{2}\---and the initial number of notes\---\num{5}\---are the same as that of the classic typographic scale.%
+\footnote{Ibid.}
+Conveniently, \cs{Huge} is \num{5} steps above \cs{normalsize}.
+The font size of \cs{normalsize}~$f_0$ can be set using the key \Key{normalsize/size}[\meta{dim expr}], more documented in \S\ref{sec:overwriting}.
+When using a musical typographic scale, \cs{normalsize} initializes to \qty{10}{pt}.%
+\footnote {I have set the initial value to \qty{10}{pt} instead of the \qty{12}{pt} recommended by the Spencer Mortensen article because this matches the default settings of the standard \LaTeXe{} document classes.}
+
+\Key{baselineskip-size-ratio}[\meta{fp expr}][1.2]
+\KeepNextPar*
+
+The key \Key{baselineskip\-/size\-/ratio} sets the ratio of the font baselineskip to the font size.
+By default, the font baselineskip of each font size command equals its font size times \meta{fp expr}.
+Users should not set this key unless they really know what they are doing.
+When using increased line spacing, users should prefer the low\-/level font command \cs{linespread} or the \pkg{setspace} package.
+
+
+\section{Overwriting the typographic scale}
+\label{sec:overwriting}
+
+In some situations, users may need to explicitly set the scale, size, or baselineskip of a font size command, overwriting the value set by the keys in \S\ref{sec:choosing}.
+Note that the font steps and the scale of \cs{normalsize} are constants and cannot be changed.
+
+\Key{\meta{font size command}/scale}[\meta{fp expr}]
+\KeepNextPar*
+
+The keys \Key{\meta{font size command}\slash{}scale} set the scale of \meta{font size command} to \meta{fp expr}, ignoring the value set by the key \Key{typographic-scale}.
+The key \Key{normalsize\slash{}scale} is not defined.
+
+\Key{\meta{font size command}/size}[\meta{dim expr}]
+\KeepNextPar*
+
+The keys \Key{\meta{font size command}\slash{}size} set the size of \meta{font size command} to \meta{dim expr}, ignoring the values set by the keys \Key{typographic-scale} and \Key{\meta{font size command}\slash{}scale}.
+\meta{dim expr} supplies a default unit of \unit{pt}.
+
+The package will issue a warning if the user sets the keys \Key{\meta{font size command}\slash{}size} and \Key{\meta{font size command}\slash{}scale} for the same \meta{font size command} since the latter key will be ignored.
+
+\Key{\meta{font size command}/baselineskip}[\meta{skip expr}]
+\KeepNextPar*
+
+The keys \Key{\meta{font size command}\slash{}baselineskip} set the font baselineskip of \meta{font size command} to \meta{skip expr} instead of calculating it from the size of \meta{font size command} and \Key{baselineskip\-/size\-/ratio}.
+\meta{skip expr} supplies a default unit of \unit{pt}.
+
+\Key{\meta{font size command}}[\meta{dim expr}]
+\nopagebreak\newline
+\Key{\meta{font size command}}[\meta{dim expr}/\meta{skip expr}]
+
+The keys \Key{\meta{font size command}} set the keys \Key{\meta{font size command}\slash{}size} or \Key{\meta{font size command}\slash{}baselineskip} in a condensed format.
+The latter format resembles traditional typographic notation where the size and leading of a text can be expressed as, for example, $10/12$ or $11/13$.
+The number before/after the slash is the size/leading in \unit{pts}.
+
+\Key{ignore-order}[true, false][false]
+\KeepNextPar*
+
+The user should take care to ensure that the font sizes and font baselineskips remain in the correct order when directly setting the scales, sizes, or baselineskips of the different font size commands.
+The magnitudes of the sizes and baselineskips should be ordered from \cs{tiny} to \cs{normalsize} to \cs{Huge}.
+This is important for typographic and syntactic consistency.
+This package will issue a warning if they are not in the correct order.
+The user can disable this warning via the key \Key{ignore\-/order}[true] or just \Key{ignore\-/order}.
+
+
+\section{User commands}
+\label{sec:usercommands}
+
+\subsection{Expandable font parameters}
+\label{subsec:fontparameters}
+
+\cs{CurrentFontStep}
+\nopagebreak\newline
+\cs{CurrentFontScale}
+\newline
+\cs{CurrentFontSize}
+\nopagebreak\newline
+\cs{CurrentFontBaselineskip}
+
+These are fully expandable commands that expand to the current font step, scale, size, or baselineskip.
+They can be used for printing or within calculations.
+Caution: \cs{CurrentFontStep} will expand to nothing if the current step is undefined.
+
+Internally, \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} use the kernel command \cs{f@size}.
+\cs{CurrentFontSize} expands to \texttt{f@size pt}.
+\cs{CurrentFontBaselineskip} expands to the kernel command \cs{f@baselineskip}.
+Note that the low\-/level font command \cs{fontsize}\marg{\meta{dimen}}\marg{\meta{skip}} sets \cs{f@size} before expanding its second argument.
+This means that \cs{CurrentFontStep}, \cs{CurrentFontScale}, and \cs{CurrentFontSize} may need to be first expanded if used in \meta{skip}.
+This package provides the command \cs{SetFontSizeBaselineskip} as an alternative to \cs{fontsize} + \cs{selectfont} that avoids this issue (\S\ref{subsec:fontsize}).
+
+\subsection{More font sizing commands}
+\label{subsec:fontsize}
+
+The \pkg{fontscale} package provides the commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} which set the font size in different ways.
+The first three commands have a starred version which sets the font size relative to the current font size.
+Internally, these commands all use the low\-/level font commands \cs{fontsize} and \cs{selectfont}.
+These commands should be used only in special cases.
+Generally, users should prefer the font size commands from \cs{tiny} to \cs{Huge} for typographic and syntactic consistency, although \cs{SetFontStep*}\marg{\meta{integer}} can use a font size command directly.
+
+\cs{SetFontStep}\marg{\meta{fp expr}}
+\nopagebreak\newline
+\cs{SetFontStep*}\marg{\meta{fp expr}}
+
+\cs{SetFontStep} sets the font size by setting the font step to \meta{fp expr}.
+The starred version \cs{SetFontStep*} adds \meta{fp expr} to the current font step.
+If the choice of typographic scale is not modular or musical, then the only valid values for \meta{fp expr} are the integers from \num{-4} to \num{5}, corresponding to the font size commands from \cs{tiny} to \cs{Huge}.
+\cs{SetFontStep} will issue an error if the step is invalid.
+The starred version \cs{SetFontStep*} will also issue an error if the current step is invalid.
+\cs{SetFontStep} sets the font baselineskip to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
+If the step matches the step of any font size command, then that font size command will be used directly.
+
+\listheading{Examples:}
+\begin{itemize}
+ \item
+ For example, \cs{SetFontStep}\marg{-2} and \cs{SetFontStep}\marg{2} use \cs{footnotesize} and \cs{Large}.
+ Note that it is typically better to use the equivalent font size command in place of \cs{SetFontStep}\marg{\meta{integer}}.
+ \item
+ If the current font size is \cs{normalsize}, \cs{SetFontStep*}\marg{1} and \cs{SetFontStep*}\marg{-1} use \cs{large} and \cs{small}.
+ This is useful for moving up or down a note on the typographic scale.
+ \item
+ If the choice of typographic scale is modular or musical, \cs{SetFontStep*}\marg{-0.5} sets the font size and font baselineskip to values between that of \cs{normalsize} and \cs{small}.
+ Otherwise, it produces an error.
+\end{itemize}
+
+\cs{SetFontScale}\marg{\meta{fp expr}}
+\nopagebreak\newline
+\cs{SetFontScale*}\marg{\meta{fp expr}}
+
+\cs{SetFontScale} sets the font size by setting the font scale to \meta{fp expr}.
+The font baselineskip is set to the calculated font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
+The starred version \cs{SetFontScale*} adds \meta{fp expr} to the current font scale.
+For example, \cs{SetFontScale}\marg{1.25} makes the font size 25\% larger than \cs{normalsize}.
+If the current font size is \cs{normalsize}, \cs{SetFontScale*}\marg{0.2} is equivalent to \cs{SetFontScale}\marg{1.2}.
+
+\cs{SetFontSize}\marg{\meta{dim expr}}
+\nopagebreak\newline
+\cs{SetFontSize*}\marg{\meta{dim expr}}
+
+\cs{SetFontSize} sets the font size to \meta{dim expr}.
+\meta{dim expr} supplies a default unit of \unit{pt}.
+The font baselineskip is set to the font size \texttimes{} \Key{baselineskip\-/size\-/ratio}.
+The starred version \cs{SetFontSize*} adds \meta{dim expr} to the current size.
+For example, \cs{SetFontSize*}\marg{1} and \cs{SetFontSize*}\marg{-1pt} increase and decrease the current font size by a \unit{pt}.
+
+\cs{ScaleFont}\marg{\meta{fp expr}}
+\KeepNextPar*
+
+Scales the current font size and the current font baselineskip by a factor of \meta{fp expr}.
+\cs{ScaleFont} resembles the \cs{scalefont} command provided by the \pkg{scalefnt} package, except that it uses floating point calculations and clears the stretch and shrink components of the font baselineskip.
+For example, if the current font size and font baselineskip are \qty{10}{pt} and \qty{12}{pt}, using \cs{ScaleFont}\marg{0.8} will reduce them proportionally to \qty{8}{pt} and \qty{9.6}{pt}.
+
+\cs{SetFontSizeBaselineskip}\marg{\meta{dim expr}}\marg{\meta{skip expr}}
+\KeepNextPar*
+
+Sets the font size and font baselineskip to \meta{dim expr} and \meta{skip expr}.
+Both arguments supply a default unit of \unit{pt}.
+\cs{SetFontSizeBaselineskip} can be used as an alternative to \cs{fontsize} + \cs{selectfont} as it avoids the issue with \cs{f@size} discussed in \S\ref{subsec:fontparameters}.
+
+\subsection{Testing and debugging}
+\label{subsec:debug}
+
+The commands documented here are intended primarily for testing and debugging.
+I have used them often when developing this package so I think users will find them helpful.
+
+\cs{PrintFontParameters}
+\nopagebreak\newline
+\cs{PrintAllFontParameters}
+
+\cs{PrintFontParameters} prints the current step, scale, size, and baselineskip in this order in a comma\-/separated list of key = value pairs.
+If the current step is undefined (as explained for \cs{SetFontStep} in \S\ref{subsec:fontsize}), it will be left blank.
+\cs{PrintAllFontParameters} prints the step, scale, size, and baselineskip of each font size command.
+
+\cs{PrintSampleText}\oarg{\meta{text}}
+\nopagebreak\newline
+\cs{PrintSampleText*}\oarg{\meta{text}}
+
+\cs{PrintSampleText} prints \meta{text} in each font size ordered from \cs{tiny} to \cs{Huge} each followed by a paragraph break.
+The starred version \cs{PrintSampleText*} reverses the sizing order.
+The \meta{text} can be changed via the optional argument, but cannot contain \cs{par} tokens.
+The default \meta{text} is \enquote{The \texttt{fontscale} package: A user interface for setting document font sizes}.
+
+\cs{PrintFontSizeCommand}
+\KeepNextPar*
+
+\cs{PrintFontSizeCommand} tests whether the current font size and font baselineskip match that of any font size command.
+If so, it prints the name of that font size command.
+If not, it instead prints \enquote{UNDEFINED\@}.
+One useful way of printing example text is by using
+\cs{PrintSampleText}\oarg{\cs{PrintFontSizeCommand}:\textvisiblespace{}\cs{PrintFontParameters}}.
+
+\subsection
+ {%
+ \texorpdfstring
+ {More on \cs{fontscalesetup}}
+ {More on \textbackslash{}fontscalesetup}%
+ }
+\label{subsec:fontscalesetup}
+
+\cs{fontscalesetup}\marg{\meta{keyval list}}
+\KeepNextPar*
+
+Sets and processes the \pkg{fontscale} package keys and uses \cs{normalsize}.
+\cs{fontscalesetup} can be applied mid\-/document or locally within the current \TeX{} group.
+The key \Key{reset} is also available.
+Its value must be either \texttt{initial} or \texttt{preamble}.
+The key \Key{reset}[initial] or just \Key{reset} sets all the keys to their initial values.
+The key \Key{reset}[preamble] sets all the keys to their values at the end of the preamble (or does nothing if used before the end of the preamble).
+
+
+\section{Programming}
+\label{sec:programming}
+
+This section is relevant to \LaTeX3 programmers.
+
+The user commands \cs{SetFontStep}, \cs{SetFontScale}, \cs{SetFontSize}, \cs{ScaleFont}, and \cs{SetFontSizeBaselineskip} are set up to work with \cs{text_purify:n}.
+\cs{text_purify:n} will correctly remove these commands and their arguments.
+This includes the starred versions \cs{SetFontStep*}, \cs{SetFontScale*}, and \cs{SetFontSize*}.
+
+This package does not provide any public \pkg{expl3} functions.
+
+This package provides some public \pkg{expl3} variables.
+The package stores in public variables the step, scale, size, and baselineskip of each font size command.
+These variables should not be modified directly.
+Instead, they should be modified only indirectly via the command \cs{fontscalesetup}.
+
+Each takes the form:
+
+\begingroup
+ \ttfamily
+ \textbackslash{}c\_fontscale\_\meta{font size command}\_step\_fp
+ \nopagebreak\newline
+ \textbackslash{}l\_fontscale\_\meta{font size command}\_scale\_fp
+ \newline
+ \textbackslash{}l\_fontscale\_\meta{font size command}\_size\_dim
+ \nopagebreak\newline
+ \textbackslash{}l\_fontscale\_\meta{font size command}\_baselineskip\_skip
+\endgroup
+
+Exception:
+\cs{l_fontscale_normalsize_scale_fp} is not defined.
+The scale of \cs{normalsize} is instead stored as the constant \cs{c_fontscale_normalsize_scale_fp}, which always equals \num{1}.
+
+The step, scale, size, and baselineskip of each font size command are also stored in property lists, one for each font size command:
+
+\texttt{\textbackslash{}l\_fontscale\_\meta{font size command}\_prop}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/fontscale/fontscale.sty b/macros/latex/contrib/fontscale/fontscale.sty
index b89dccbb3c..514350189c 100644
--- a/macros/latex/contrib/fontscale/fontscale.sty
+++ b/macros/latex/contrib/fontscale/fontscale.sty
@@ -1,1315 +1,1300 @@
-% Package : fontscale -- A user interface for setting document font sizes
-% Copyright : 2024 (c) Oliver Beery <beeryoliver@gmail.com>
-% CTAN : https://ctan.org/pkg/fontscale
-% Repository: https://github.com/beeryoliver/fontscale
-% License : The LaTeX Project Public License 1.3c
-
-% The 2022-06-01 LaTeX kernel update added \ProcessKeyOptions.
-\NeedsTeXFormat{LaTeX2e}[2022-06-01]
-\ProvidesExplPackage
- {fontscale}
- {2024-04-07}
- {1.1.1}
- {A user interface for setting document font sizes}
-
-% The 2023-10-10 l3kernel update added many 'e'-variants.
-\IfExplAtLeastTF { 2023-10-10 }
- { }
- {
- \msg_new:nnn { fontscale } { expl3-out-of-date }
- {
- The~ package~ could~ not~ load.~
- The~ fontscale~ package~ requires~
- L3~ programming~ layer~ version~ 2023-10-10~ or~ later.
- }
- \msg_critical:nn { fontscale } { expl3-out-of-date }
- }
-
-% SOME VARIABLES
-
-\fp_const:Nn \c_fontscale_tiny_step_fp { -4 }
-\fp_const:Nn \c_fontscale_scriptsize_step_fp { -3 }
-\fp_const:Nn \c_fontscale_footnotesize_step_fp { -2 }
-\fp_const:Nn \c_fontscale_small_step_fp { -1 }
-\fp_const:Nn \c_fontscale_normalsize_step_fp { 0 }
-\fp_const:Nn \c_fontscale_large_step_fp { 1 }
-\fp_const:Nn \c_fontscale_Large_step_fp { 2 }
-\fp_const:Nn \c_fontscale_LARGE_step_fp { 3 }
-\fp_const:Nn \c_fontscale_huge_step_fp { 4 }
-\fp_const:Nn \c_fontscale_Huge_step_fp { 5 }
-
-\fp_const:Nn \c_fontscale_normalsize_scale_fp { 1 }
-
-\tl_const:Nn \c__fontscale_names_tl
- {
- {tiny} {scriptsize} {footnotesize} {small} {normalsize}
- {large} {Large} {LARGE} {huge} {Huge}
- }
-\tl_const:Nn \c__fontscale_names_other_tl
- {
- {tiny} {scriptsize} {footnotesize} {small}
- {large} {Large} {LARGE} {huge} {Huge}
- }
-
-\prop_new:N \l_fontscale_tiny_prop
-\prop_new:N \l_fontscale_scriptsize_prop
-\prop_new:N \l_fontscale_footnotesize_prop
-\prop_new:N \l_fontscale_small_prop
-\prop_new:N \l_fontscale_normalsize_prop
-\prop_new:N \l_fontscale_large_prop
-\prop_new:N \l_fontscale_Large_prop
-\prop_new:N \l_fontscale_LARGE_prop
-\prop_new:N \l_fontscale_huge_prop
-\prop_new:N \l_fontscale_Huge_prop
-
-\prop_put:Nnn \l_fontscale_tiny_prop { step } { -4 }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { step } { -3 }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { step } { -2 }
-\prop_put:Nnn \l_fontscale_small_prop { step } { -1 }
-\prop_put:Nnn \l_fontscale_normalsize_prop { step } { 0 }
-\prop_put:Nnn \l_fontscale_large_prop { step } { 1 }
-\prop_put:Nnn \l_fontscale_Large_prop { step } { 2 }
-\prop_put:Nnn \l_fontscale_LARGE_prop { step } { 3 }
-\prop_put:Nnn \l_fontscale_huge_prop { step } { 4 }
-\prop_put:Nnn \l_fontscale_Huge_prop { step } { 5 }
-
-\prop_put:Nnn \l_fontscale_normalsize_prop { scale } { 1 }
-
-\fp_new:N \l_fontscale_tiny_scale_fp
-\fp_new:N \l_fontscale_scriptsize_scale_fp
-\fp_new:N \l_fontscale_footnotesize_scale_fp
-\fp_new:N \l_fontscale_small_scale_fp
-\fp_new:N \l_fontscale_large_scale_fp
-\fp_new:N \l_fontscale_Large_scale_fp
-\fp_new:N \l_fontscale_LARGE_scale_fp
-\fp_new:N \l_fontscale_huge_scale_fp
-\fp_new:N \l_fontscale_Huge_scale_fp
-
-\dim_new:N \l_fontscale_tiny_size_dim
-\dim_new:N \l_fontscale_scriptsize_size_dim
-\dim_new:N \l_fontscale_footnotesize_size_dim
-\dim_new:N \l_fontscale_small_size_dim
-\dim_new:N \l_fontscale_normalsize_size_dim
-\dim_new:N \l_fontscale_large_size_dim
-\dim_new:N \l_fontscale_Large_size_dim
-\dim_new:N \l_fontscale_LARGE_size_dim
-\dim_new:N \l_fontscale_huge_size_dim
-\dim_new:N \l_fontscale_Huge_size_dim
-
-\skip_new:N \l_fontscale_tiny_baselineskip_skip
-\skip_new:N \l_fontscale_scriptsize_baselineskip_skip
-\skip_new:N \l_fontscale_footnotesize_baselineskip_skip
-\skip_new:N \l_fontscale_small_baselineskip_skip
-\skip_new:N \l_fontscale_normalsize_baselineskip_skip
-\skip_new:N \l_fontscale_large_baselineskip_skip
-\skip_new:N \l_fontscale_Large_baselineskip_skip
-\skip_new:N \l_fontscale_LARGE_baselineskip_skip
-\skip_new:N \l_fontscale_huge_baselineskip_skip
-\skip_new:N \l_fontscale_Huge_baselineskip_skip
-
-\str_new:N \l__fontscale_typographic_scale_str
-\tl_new:N \l__fontscale_keys_precompile_preamble_tl
-
-% Used in floating point expressions for speed.
-\fp_new:N \l__fontscale_normalsize_size_fp
-\fp_new:N \l__fontscale_musical_notes_fp
-
-% Temporary variables
-\fp_new:N \l__fontscale_step_fp
-\tl_new:N \l__fontscale_step_tl
-\tl_new:N \l__fontscale_scale_tl
-\dim_new:N \l__fontscale_size_dim
-\skip_new:N \l__fontscale_baselineskip_skip
-
-% INITIAL FONT PARAMETERS
-
-\fp_set:Nn \l__fontscale_normalsize_size_fp { 10 }
-
-\dim_set:Nn \l_fontscale_tiny_size_dim { 6pt }
-\dim_set:Nn \l_fontscale_scriptsize_size_dim { 7pt }
-\dim_set:Nn \l_fontscale_footnotesize_size_dim { 8pt }
-\dim_set:Nn \l_fontscale_small_size_dim { 9pt }
-\dim_set:Nn \l_fontscale_normalsize_size_dim { 10pt }
-\dim_set:Nn \l_fontscale_large_size_dim { 11pt }
-\dim_set:Nn \l_fontscale_Large_size_dim { 12pt }
-\dim_set:Nn \l_fontscale_LARGE_size_dim { 14pt }
-\dim_set:Nn \l_fontscale_huge_size_dim { 16pt }
-\dim_set:Nn \l_fontscale_Huge_size_dim { 18pt }
-
-\fp_set:Nn \l_fontscale_tiny_scale_fp { 0.6 }
-\fp_set:Nn \l_fontscale_scriptsize_scale_fp { 0.7 }
-\fp_set:Nn \l_fontscale_footnotesize_scale_fp { 0.8 }
-\fp_set:Nn \l_fontscale_small_scale_fp { 0.9 }
-\fp_set:Nn \l_fontscale_large_scale_fp { 1.1 }
-\fp_set:Nn \l_fontscale_Large_scale_fp { 1.2 }
-\fp_set:Nn \l_fontscale_LARGE_scale_fp { 1.4 }
-\fp_set:Nn \l_fontscale_huge_scale_fp { 1.6 }
-\fp_set:Nn \l_fontscale_Huge_scale_fp { 1.8 }
-
-\skip_set:Nn \l_fontscale_tiny_baselineskip_skip { 7.2pt }
-\skip_set:Nn \l_fontscale_scriptsize_baselineskip_skip { 8.4pt }
-\skip_set:Nn \l_fontscale_footnotesize_baselineskip_skip { 9.6pt }
-\skip_set:Nn \l_fontscale_small_baselineskip_skip { 10.8pt }
-\skip_set:Nn \l_fontscale_normalsize_baselineskip_skip { 12 pt }
-\skip_set:Nn \l_fontscale_large_baselineskip_skip { 13.2pt }
-\skip_set:Nn \l_fontscale_Large_baselineskip_skip { 14.4pt }
-\skip_set:Nn \l_fontscale_LARGE_baselineskip_skip { 16.8pt }
-\skip_set:Nn \l_fontscale_huge_baselineskip_skip { 19.2pt }
-\skip_set:Nn \l_fontscale_Huge_baselineskip_skip { 21.6pt }
-
-\prop_put:Nnn \l_fontscale_tiny_prop { scale } { 0.6 }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { scale } { 0.7 }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { scale } { 0.8 }
-\prop_put:Nnn \l_fontscale_small_prop { scale } { 0.9 }
-\prop_put:Nnn \l_fontscale_large_prop { scale } { 1.1 }
-\prop_put:Nnn \l_fontscale_Large_prop { scale } { 1.2 }
-\prop_put:Nnn \l_fontscale_LARGE_prop { scale } { 1.4 }
-\prop_put:Nnn \l_fontscale_huge_prop { scale } { 1.6 }
-\prop_put:Nnn \l_fontscale_Huge_prop { scale } { 1.8 }
-
-\prop_put:Nnn \l_fontscale_tiny_prop { size } { 6pt }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { size } { 7pt }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { size } { 8pt }
-\prop_put:Nnn \l_fontscale_small_prop { size } { 9pt }
-\prop_put:Nnn \l_fontscale_normalsize_prop { size } { 10pt }
-\prop_put:Nnn \l_fontscale_large_prop { size } { 11pt }
-\prop_put:Nnn \l_fontscale_Large_prop { size } { 12pt }
-\prop_put:Nnn \l_fontscale_LARGE_prop { size } { 14pt }
-\prop_put:Nnn \l_fontscale_huge_prop { size } { 16pt }
-\prop_put:Nnn \l_fontscale_Huge_prop { size } { 18pt }
-
-\prop_put:Nnn \l_fontscale_tiny_prop { baselineskip } { 7.2pt }
-\prop_put:Nnn \l_fontscale_scriptsize_prop { baselineskip } { 8.4pt }
-\prop_put:Nnn \l_fontscale_footnotesize_prop { baselineskip } { 9.6pt }
-\prop_put:Nnn \l_fontscale_small_prop { baselineskip } { 10.8pt }
-\prop_put:Nnn \l_fontscale_normalsize_prop { baselineskip } { 12 pt }
-\prop_put:Nnn \l_fontscale_large_prop { baselineskip } { 13.2pt }
-\prop_put:Nnn \l_fontscale_Large_prop { baselineskip } { 14.4pt }
-\prop_put:Nnn \l_fontscale_LARGE_prop { baselineskip } { 16.8pt }
-\prop_put:Nnn \l_fontscale_huge_prop { baselineskip } { 19.2pt }
-\prop_put:Nnn \l_fontscale_Huge_prop { baselineskip } { 21.6pt }
-
-% SOME HELPER FUNCTIONS
-
-% Sets a dimen or skip variable, supplying a default unit of pt.
-\cs_new_protected:Npn \__fontscale_dim_set_with_default_unit:Nn #1#2
- { \@defaultunits #1 = \dimexpr #2 pt \relax \relax \@nnil }
-\cs_generate_variant:Nn \__fontscale_dim_set_with_default_unit:Nn { c }
-\cs_new_protected:Npn \__fontscale_skip_set_with_default_unit:Nn #1#2
- { \@defaultunits #1 = \glueexpr #2 pt \relax \@nnil }
-\cs_generate_variant:Nn \__fontscale_skip_set_with_default_unit:Nn { c }
-
-% MESSAGES
-
-\msg_new:nnn { fontscale } { key-font-scale-ignored }
- {
- Key~ #1 / scale~
- \msg_line_context: \c_space_tl
- ignored.~
- Setting~ the~ scale~ and~ size~ keys~ for~ the~ same~
- font~ size~ command~ ignores~ the~ scale~ key.
- }
-\msg_new:nnn { fontscale } { font-sizes-out-of-order }
- {
- The~ font~ sizes~
- \msg_line_context: \c_space_tl
- are~ not~ in~ the~ correct~ order.~
- The~ magnitude~ of~ the~ font~ sizes~ should~ be~ ordered~ from~
- \token_to_str:N \tiny \c_space_tl
- to~
- \token_to_str:N \normalsize \c_space_tl
- to~
- \token_to_str:N \Huge .
- }
-\msg_new:nnn { fontscale } { font-baselineskips-out-of-order }
- {
- The~ font~ baselineskips~
- \msg_line_context: \c_space_tl
- are~ not~ in~ the~ correct~ order.~
- The~ magnitude~ of~ the~ font~ baselineskips~ should~ be~ ordered~ from~
- \token_to_str:N \tiny \c_space_tl
- to~
- \token_to_str:N \normalsize \c_space_tl
- to~
- \token_to_str:N \Huge .
- }
-\msg_new:nnn { fontscale } { font-step-out-of-bounds }
- {
- The~ font~ step~
- \msg_line_context: \c_space_tl
- must~ be~ an~ integer~ from~ -4~ to~ 5,~
- unless~ the~ choice~ of~ typographic~ scale~ is~ modular~ or~ musical.
- }
-
-% DEFINE KEYS
-
-\keys_define:nn { fontscale }
- {
- reset .choices:nn = { initial , preamble }
- {
- \int_case:nn { \l_keys_choice_int }
- {
- { 1 } { \c__fontscale_keys_precompile_initial_tl }
- { 2 } { \l__fontscale_keys_precompile_preamble_tl }
- }
- }
- , reset .default:n = initial
-
- , ignore-order .bool_set:N = \l__fontscale_ignore_order_bool
- , ignore-order .default:n = true
-
- , baselineskip-size-ratio .fp_set:N =
- \l__fontscale_baselineskip_size_ratio_fp
- , baselineskip-size-ratio .value_required:n = true
-
- , typographic-scale .choices:nn =
- { classic-10pt , classic-11pt , classic-12pt , modular , musical }
- { \str_set:Nn \l__fontscale_typographic_scale_str {#1} }
- , typographic-scale .value_required:n = true
-
- , classic-10pt .meta:n = { typographic-scale = classic-10pt }
- , classic-10pt .value_forbidden:n = true
-
- , classic-11pt .meta:n = { typographic-scale = classic-11pt }
- , classic-11pt .value_forbidden:n = true
-
- , classic-12pt .meta:n = { typographic-scale = classic-12pt }
- , classic-12pt .value_forbidden:n = true
-
- , modular .meta:n = { typographic-scale = modular }
- , modular .value_forbidden:n = true
-
- , musical .meta:n = { typographic-scale = musical }
- , musical .value_forbidden:n = true
-
- , modular / ratio .fp_set:N = \l__fontscale_modular_ratio_fp
- , modular / ratio .value_required:n = true
- }
-\keys_define:nn { fontscale / musical }
- {
- ratio .fp_set:N = \l__fontscale_musical_ratio_fp
- , ratio .value_required:n = true
-
- , notes .int_set:N = \l__fontscale_musical_notes_int
- , notes .value_required:n = true
- }
-\keys_define:nn { fontscale / tiny }
- {
- scale .tl_set:N = \l__fontscale_tiny_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_tiny_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_tiny_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / scriptsize }
- {
- scale .tl_set:N = \l__fontscale_scriptsize_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_scriptsize_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_scriptsize_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / footnotesize }
- {
- scale .tl_set:N = \l__fontscale_footnotesize_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_footnotesize_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_footnotesize_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / small }
- {
- scale .tl_set:N = \l__fontscale_small_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_small_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_small_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / normalsize }
- {
- size .tl_set:N = \l__fontscale_normalsize_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_normalsize_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / large }
- {
- scale .tl_set:N = \l__fontscale_large_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_large_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_large_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / Large }
- {
- scale .tl_set:N = \l__fontscale_Large_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_Large_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_Large_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / LARGE }
- {
- scale .tl_set:N = \l__fontscale_LARGE_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_LARGE_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_LARGE_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / huge }
- {
- scale .tl_set:N = \l__fontscale_huge_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_huge_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_huge_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale / Huge }
- {
- scale .tl_set:N = \l__fontscale_Huge_scale_tl
- , scale .value_required:n = true
-
- , size .tl_set:N = \l__fontscale_Huge_size_tl
- , size .value_required:n = true
-
- , baselineskip .tl_set:N = \l__fontscale_Huge_baselineskip_tl
- , baselineskip .value_required:n = true
- }
-\keys_define:nn { fontscale }
- {
- tiny .code:n = \__fontscale_keys_name_code:n {#1}
- , tiny .value_required:n = true
-
- , scriptsize .code:n = \__fontscale_keys_name_code:n {#1}
- , scriptsize .value_required:n = true
-
- , footnotesize .code:n = \__fontscale_keys_name_code:n {#1}
- , footnotesize .value_required:n = true
-
- , small .code:n = \__fontscale_keys_name_code:n {#1}
- , small .value_required:n = true
-
- , normalsize .code:n = \__fontscale_keys_name_code:n {#1}
- , normalsize .value_required:n = true
-
- , large .code:n = \__fontscale_keys_name_code:n {#1}
- , large .value_required:n = true
-
- , Large .code:n = \__fontscale_keys_name_code:n {#1}
- , Large .value_required:n = true
-
- , LARGE .code:n = \__fontscale_keys_name_code:n {#1}
- , LARGE .value_required:n = true
-
- , huge .code:n = \__fontscale_keys_name_code:n {#1}
- , huge .value_required:n = true
-
- , Huge .code:n = \__fontscale_keys_name_code:n {#1}
- , Huge .value_required:n = true
- }
-\cs_new_protected:Npn \__fontscale_keys_name_code:n #1
- {
- \str_if_in:nnTF {#1} { / }
- { \__fontscale_keys_name_code_split:ww #1 \q_stop }
- { \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1} }
- }
-\cs_new_protected:Npn \__fontscale_keys_name_code_split:ww #1 / #2 \q_stop
- {
- \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1}
- \tl_set:cn { l__fontscale_ \l_keys_key_str _baselineskip_tl } {#2}
- }
-
-% PRE-COMPILE KEYS
-
-% Pre-compiles the keys with their initial values. The keys are pre-compiled
-% by hand for speed.
-\tl_const:Nn \c__fontscale_keys_precompile_initial_tl
- {
- \bool_set_false:N \l__fontscale_ignore_order_bool
- \fp_set:Nn \l__fontscale_baselineskip_size_ratio_fp { 1.2 }
- \str_set:Nn \l__fontscale_typographic_scale_str { classic-10pt }
- \fp_set:Nn \l__fontscale_modular_ratio_fp { 1.125 }
- \fp_set:Nn \l__fontscale_musical_ratio_fp { 2 }
- \int_set:Nn \l__fontscale_musical_notes_int { 5 }
-
- \tl_set:Nn \l__fontscale_tiny_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_scriptsize_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_footnotesize_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_small_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_large_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Large_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_LARGE_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_huge_scale_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Huge_scale_tl { \q_no_value }
-
- \tl_set:Nn \l__fontscale_tiny_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_scriptsize_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_footnotesize_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_small_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_normalsize_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_large_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Large_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_LARGE_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_huge_size_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Huge_size_tl { \q_no_value }
-
- \tl_set:Nn \l__fontscale_tiny_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_scriptsize_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_footnotesize_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_small_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_normalsize_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_large_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Large_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_LARGE_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_huge_baselineskip_tl { \q_no_value }
- \tl_set:Nn \l__fontscale_Huge_baselineskip_tl { \q_no_value }
- }
-\c__fontscale_keys_precompile_initial_tl
-
-% Pre-compiles the keys with their values at the end of the preamble. The keys
-% are pre-compiled by hand for speed.
-\AddToHook { begindocument / before }
- { \__fontscale_keys_precompile_preamble: }
-\cs_new_protected:Npn \__fontscale_keys_precompile_preamble:
- {
- \tl_set:Ne \l__fontscale_keys_precompile_preamble_tl
- {
- \bool_if:NTF \l__fontscale_ignore_order_bool
- { \bool_set_true:N } { \bool_set_false:N }
- \l__fontscale_ignore_order_bool
- \fp_set:Nn \exp_not:N \l__fontscale_baselineskip_size_ratio_fp
- { \l__fontscale_baselineskip_size_ratio_fp }
- \str_set:Nn \exp_not:N \l__fontscale_typographic_scale_str
- { \l__fontscale_typographic_scale_str }
- \fp_set:Nn \exp_not:N \l__fontscale_modular_ratio_fp
- { \l__fontscale_modular_ratio_fp }
- \fp_set:Nn \exp_not:N \l__fontscale_musical_ratio_fp
- { \l__fontscale_musical_ratio_fp }
- \int_set:Nn \l__fontscale_musical_notes_int
- { \int_use:N \l__fontscale_musical_notes_int }
-
- \tl_set:Nn \exp_not:N \l__fontscale_tiny_scale_tl
- { \exp_not:o \l__fontscale_tiny_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_scale_tl
- { \exp_not:o \l__fontscale_scriptsize_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_scale_tl
- { \exp_not:o \l__fontscale_footnotesize_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_small_scale_tl
- { \exp_not:o \l__fontscale_small_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_large_scale_tl
- { \exp_not:o \l__fontscale_large_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Large_scale_tl
- { \exp_not:o \l__fontscale_Large_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_LARGE_scale_tl
- { \exp_not:o \l__fontscale_LARGE_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_huge_scale_tl
- { \exp_not:o \l__fontscale_huge_scale_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Huge_scale_tl
- { \exp_not:o \l__fontscale_Huge_scale_tl }
-
- \tl_set:Nn \exp_not:N \l__fontscale_tiny_size_tl
- { \exp_not:o \l__fontscale_tiny_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_size_tl
- { \exp_not:o \l__fontscale_scriptsize_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_size_tl
- { \exp_not:o \l__fontscale_footnotesize_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_small_size_tl
- { \exp_not:o \l__fontscale_small_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_normalsize_size_tl
- { \exp_not:o \l__fontscale_normalsize_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_large_size_tl
- { \exp_not:o \l__fontscale_large_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Large_size_tl
- { \exp_not:o \l__fontscale_Large_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_LARGE_size_tl
- { \exp_not:o \l__fontscale_LARGE_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_huge_size_tl
- { \exp_not:o \l__fontscale_huge_size_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Huge_size_tl
- { \exp_not:o \l__fontscale_Huge_size_tl }
-
- \tl_set:Nn \exp_not:N \l__fontscale_tiny_baselineskip_tl
- { \exp_not:o \l__fontscale_tiny_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_baselineskip_tl
- { \exp_not:o \l__fontscale_scriptsize_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_baselineskip_tl
- { \exp_not:o \l__fontscale_footnotesize_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_small_baselineskip_tl
- { \exp_not:o \l__fontscale_small_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_normalsize_baselineskip_tl
- { \exp_not:o \l__fontscale_normalsize_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_large_baselineskip_tl
- { \exp_not:o \l__fontscale_large_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Large_baselineskip_tl
- { \exp_not:o \l__fontscale_Large_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_LARGE_baselineskip_tl
- { \exp_not:o \l__fontscale_LARGE_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_huge_baselineskip_tl
- { \exp_not:o \l__fontscale_huge_baselineskip_tl }
- \tl_set:Nn \exp_not:N \l__fontscale_Huge_baselineskip_tl
- { \exp_not:o \l__fontscale_Huge_baselineskip_tl }
- }
- }
-
-% PROCESS KEYS
-
-\NewDocumentCommand \fontscalesetup { m } { \__fontscale_keys_set:n {#1} }
-\cs_new_protected:Npn \__fontscale_keys_set:n #1
- {
- \keys_set:nn { fontscale } {#1}
- \__fontscale_keys_process:
- }
-\cs_new_protected:Npn \__fontscale_keys_process:
- {
- \__fontscale_keys_process_normalsize:
- \__fontscale_keys_process_other:
- \__fontscale_keys_process_other_props:
- \__fontscale_keys_process_check_order:
- }
-% Sets the size and baselineskip of \normalsize, stores them in a property
-% list, and uses \normalsize.
-\cs_new_protected:Npn \__fontscale_keys_process_normalsize:
- {
- \quark_if_no_value:NTF \l__fontscale_normalsize_size_tl
- {
- \dim_set:Nn \l_fontscale_normalsize_size_dim
- {
- \str_case:on \l__fontscale_typographic_scale_str
- {
- { classic-10pt } { 10pt }
- { classic-11pt } { 11pt }
- { classic-12pt } { 12pt }
- { modular } { 10pt }
- { musical } { 10pt }
- }
- }
- }
- {
- \__fontscale_dim_set_with_default_unit:Nn
- \l_fontscale_normalsize_size_dim { \l__fontscale_normalsize_size_tl }
- }
- \fp_set:Nn \l__fontscale_normalsize_size_fp
- { \l_fontscale_normalsize_size_dim }
- \quark_if_no_value:NTF \l__fontscale_normalsize_baselineskip_tl
- {
- \skip_set:Nn \l_fontscale_normalsize_baselineskip_skip
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp
- * \l__fontscale_baselineskip_size_ratio_fp
- }
- }
- }
- {
- \__fontscale_skip_set_with_default_unit:Nn
- \l_fontscale_normalsize_baselineskip_skip
- { \l__fontscale_normalsize_baselineskip_tl }
- }
- \prop_put:Nno \l_fontscale_normalsize_prop { size }
- { \dim_use:N \l_fontscale_normalsize_size_dim }
- \prop_put:Nno \l_fontscale_normalsize_prop { baselineskip }
- { \skip_use:N \l_fontscale_normalsize_baselineskip_skip }
- \normalsize
- }
-% Sets the size, scale, and baselineskip of the other font size commands.
-% Issues a warning if the user sets both the scale and size keys for the same
-% font size command.
-\cs_new_protected:Npn \__fontscale_keys_process_other_classic_xpt:n #1
- {
- \dim_set:cn { l_fontscale_#1_size_dim }
- {
- \str_case:nn {#1}
- {
- { tiny } { 6pt }
- { scriptsize } { 7pt }
- { footnotesize } { 8pt }
- { small } { 9pt }
- { large } { 11pt }
- { Large } { 12pt }
- { LARGE } { 14pt }
- { huge } { 16pt }
- { Huge } { 18pt }
- }
- }
- }
-\cs_new_protected:Npn \__fontscale_keys_process_other_classic_xipt:n #1
- {
- \dim_set:cn { l_fontscale_#1_size_dim }
- {
- \str_case:nn {#1}
- {
- { tiny } { 7pt }
- { scriptsize } { 8pt }
- { footnotesize } { 9pt }
- { small } { 10pt }
- { large } { 12pt }
- { Large } { 14pt }
- { LARGE } { 16pt }
- { huge } { 18pt }
- { Huge } { 21pt }
- }
- }
- }
-\cs_new_protected:Npn \__fontscale_keys_process_other_classic_xiipt:n #1
- {
- \dim_set:cn { l_fontscale_#1_size_dim }
- {
- \str_case:nn {#1}
- {
- { tiny } { 8pt }
- { scriptsize } { 9pt }
- { footnotesize } { 10pt }
- { small } { 11pt }
- { large } { 14pt }
- { Large } { 16pt }
- { LARGE } { 18pt }
- { huge } { 21pt }
- { Huge } { 24pt }
- }
- }
- }
-\cs_new_protected:Npn \__fontscale_keys_process_other_modular:n #1
- {
- \dim_set:cn { l_fontscale_#1_size_dim }
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp * \l__fontscale_modular_ratio_fp
- ^ \use:c { c_fontscale_#1_step_fp }
- }
- }
- }
-\cs_new_protected:Npn \__fontscale_keys_process_other_musical:n #1
- {
- \dim_set:cn { l_fontscale_#1_size_dim }
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp * \l__fontscale_musical_ratio_fp
- ^ ( \use:c { c_fontscale_#1_step_fp }
- / \l__fontscale_musical_notes_fp )
- }
- }
- }
-\cs_new_protected:Npn \__fontscale_keys_process_other:
- {
- \str_case:on \l__fontscale_typographic_scale_str
- {
- { classic-10pt }
- {
- \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
- \__fontscale_keys_process_other_classic_xpt:n
- }
- { classic-11pt }
- {
- \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
- \__fontscale_keys_process_other_classic_xipt:n
- }
- { classic-12pt }
- {
- \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
- \__fontscale_keys_process_other_classic_xiipt:n
- }
- { modular }
- {
- \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
- \__fontscale_keys_process_other_modular:n
- }
- { musical }
- {
- \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
- \__fontscale_keys_process_other_musical:n
- \fp_set:Nn \l__fontscale_musical_notes_fp
- { \l__fontscale_musical_notes_int }
- }
- }
- \tl_map_function:NN \c__fontscale_names_other_tl
- \__fontscale_keys_process_other_aux:n
- }
-\cs_new_protected:Npn \__fontscale_keys_process_other_aux:n #1
- {
- \quark_if_no_value:cF { l__fontscale_#1_size_tl }
- {
- \__fontscale_dim_set_with_default_unit:cn { l_fontscale_#1_size_dim }
- { \use:c { l__fontscale_#1_size_tl } }
- \quark_if_no_value:cF { l__fontscale_#1_scale_tl }
- { \msg_warning:nnn { fontscale } { key-font-scale-ignored } {#1} }
- \prg_break:
- }
- \quark_if_no_value:cF { l__fontscale_#1_scale_tl }
- {
- \dim_set:cn { l_fontscale_#1_size_dim }
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp
- * ( \use:c { l__fontscale_#1_scale_tl } )
- }
- }
- \prg_break:
- }
- \prg_break:n { \__fontscale_keys_process_other_typographic_scale:n {#1} }
- \prg_break_point:
- \fp_set:cn { l_fontscale_#1_scale_fp }
- { \use:c { l_fontscale_#1_size_dim } / \l__fontscale_normalsize_size_fp }
- \quark_if_no_value:cTF { l__fontscale_#1_baselineskip_tl }
- {
- \skip_set:cn { l_fontscale_#1_baselineskip_skip }
- {
- \fp_to_dim:n
- {
- \use:c { l_fontscale_#1_size_dim }
- * \l__fontscale_baselineskip_size_ratio_fp
- }
- }
- }
- {
- \__fontscale_skip_set_with_default_unit:cn
- { l_fontscale_#1_baselineskip_skip }
- { \use:c { l__fontscale_#1_baselineskip_tl } }
- }
- }
-% Puts the scale, size, and baselineskip of the other font size commands in
-% property lists.
-\cs_new_protected:Npn \__fontscale_keys_process_other_props:
- {
- \prop_put:Nne \l_fontscale_tiny_prop { scale }
- { \fp_use:N \l_fontscale_tiny_scale_fp }
- \prop_put:Nne \l_fontscale_scriptsize_prop { scale }
- { \fp_use:N \l_fontscale_scriptsize_scale_fp }
- \prop_put:Nne \l_fontscale_footnotesize_prop { scale }
- { \fp_use:N \l_fontscale_footnotesize_scale_fp }
- \prop_put:Nne \l_fontscale_small_prop { scale }
- { \fp_use:N \l_fontscale_small_scale_fp }
- \prop_put:Nne \l_fontscale_large_prop { scale }
- { \fp_use:N \l_fontscale_large_scale_fp }
- \prop_put:Nne \l_fontscale_Large_prop { scale }
- { \fp_use:N \l_fontscale_Large_scale_fp }
- \prop_put:Nne \l_fontscale_LARGE_prop { scale }
- { \fp_use:N \l_fontscale_LARGE_scale_fp }
- \prop_put:Nne \l_fontscale_huge_prop { scale }
- { \fp_use:N \l_fontscale_huge_scale_fp }
- \prop_put:Nne \l_fontscale_Huge_prop { scale }
- { \fp_use:N \l_fontscale_Huge_scale_fp }
-
- \prop_put:Nno \l_fontscale_tiny_prop { size }
- { \dim_use:N \l_fontscale_tiny_size_dim }
- \prop_put:Nno \l_fontscale_scriptsize_prop { size }
- { \dim_use:N \l_fontscale_scriptsize_size_dim }
- \prop_put:Nno \l_fontscale_footnotesize_prop { size }
- { \dim_use:N \l_fontscale_footnotesize_size_dim }
- \prop_put:Nno \l_fontscale_small_prop { size }
- { \dim_use:N \l_fontscale_small_size_dim }
- \prop_put:Nno \l_fontscale_large_prop { size }
- { \dim_use:N \l_fontscale_large_size_dim }
- \prop_put:Nno \l_fontscale_Large_prop { size }
- { \dim_use:N \l_fontscale_Large_size_dim }
- \prop_put:Nno \l_fontscale_LARGE_prop { size }
- { \dim_use:N \l_fontscale_LARGE_size_dim }
- \prop_put:Nno \l_fontscale_huge_prop { size }
- { \dim_use:N \l_fontscale_huge_size_dim }
- \prop_put:Nno \l_fontscale_Huge_prop { size }
- { \dim_use:N \l_fontscale_Huge_size_dim }
-
- \prop_put:Nno \l_fontscale_tiny_prop { baselineskip }
- { \skip_use:N \l_fontscale_tiny_baselineskip_skip }
- \prop_put:Nno \l_fontscale_scriptsize_prop { baselineskip }
- { \skip_use:N \l_fontscale_scriptsize_baselineskip_skip }
- \prop_put:Nno \l_fontscale_footnotesize_prop { baselineskip }
- { \skip_use:N \l_fontscale_footnotesize_baselineskip_skip }
- \prop_put:Nno \l_fontscale_small_prop { baselineskip }
- { \skip_use:N \l_fontscale_small_baselineskip_skip }
- \prop_put:Nno \l_fontscale_large_prop { baselineskip }
- { \skip_use:N \l_fontscale_large_baselineskip_skip }
- \prop_put:Nno \l_fontscale_Large_prop { baselineskip }
- { \skip_use:N \l_fontscale_Large_baselineskip_skip }
- \prop_put:Nno \l_fontscale_LARGE_prop { baselineskip }
- { \skip_use:N \l_fontscale_LARGE_baselineskip_skip }
- \prop_put:Nno \l_fontscale_huge_prop { baselineskip }
- { \skip_use:N \l_fontscale_huge_baselineskip_skip }
- \prop_put:Nno \l_fontscale_Huge_prop { baselineskip }
- { \skip_use:N \l_fontscale_Huge_baselineskip_skip }
- }
-% Issues a warning if the font sizes or font baselineskips are not in the
-% correct order.
-\cs_new_protected:Npn \__fontscale_keys_process_check_order:
- {
- \bool_if:NF \l__fontscale_ignore_order_bool
- {
- \dim_compare:nF
- {
- \l_fontscale_tiny_size_dim
- < \l_fontscale_scriptsize_size_dim
- < \l_fontscale_footnotesize_size_dim
- < \l_fontscale_small_size_dim
- < \l_fontscale_normalsize_size_dim
- < \l_fontscale_large_size_dim
- < \l_fontscale_Large_size_dim
- < \l_fontscale_LARGE_size_dim
- < \l_fontscale_huge_size_dim
- < \l_fontscale_Huge_size_dim
- }
- { \msg_warning:nn { fontscale } { font-sizes-out-of-order } }
- \dim_compare:nF
- {
- \l_fontscale_tiny_baselineskip_skip
- < \l_fontscale_scriptsize_baselineskip_skip
- < \l_fontscale_footnotesize_baselineskip_skip
- < \l_fontscale_small_baselineskip_skip
- < \l_fontscale_normalsize_baselineskip_skip
- < \l_fontscale_large_baselineskip_skip
- < \l_fontscale_Large_baselineskip_skip
- < \l_fontscale_LARGE_baselineskip_skip
- < \l_fontscale_huge_baselineskip_skip
- < \l_fontscale_Huge_baselineskip_skip
- }
- { \msg_warning:nn { fontscale } { font-baselineskips-out-of-order } }
- }
- }
-
-% DOCUMENT COMMANDS
-
-% The internal functions of each font size command are not used elsewhere in
-% the code for compatibility with user-defined hooks
-% (e.g. \AddToHook{cmd/normalsize/after}{<user-defined-function>}).
-% Need \dim_use:N for compatibility with the microtype package.
-\DeclareDocumentCommand \tiny { } { \__fontscale_tiny: }
-\cs_new_protected:Npn \__fontscale_tiny:
- {
- \@setfontsize \tiny { \dim_use:N \l_fontscale_tiny_size_dim }
- \l_fontscale_tiny_baselineskip_skip
- }
-\DeclareDocumentCommand \scriptsize { } { \__fontscale_scriptsize: }
-\cs_new_protected:Npn \__fontscale_scriptsize:
- {
- \@setfontsize \scriptsize { \dim_use:N \l_fontscale_scriptsize_size_dim }
- \l_fontscale_scriptsize_baselineskip_skip
- }
-\DeclareDocumentCommand \footnotesize { } { \__fontscale_footnotesize: }
-\cs_new_protected:Npn \__fontscale_footnotesize:
- {
- \@setfontsize \footnotesize
- { \dim_use:N \l_fontscale_footnotesize_size_dim }
- \l_fontscale_footnotesize_baselineskip_skip
- }
-\DeclareDocumentCommand \small { } { \__fontscale_small: }
-\cs_new_protected:Npn \__fontscale_small:
- {
- \@setfontsize \small { \dim_use:N \l_fontscale_small_size_dim }
- \l_fontscale_small_baselineskip_skip
- }
-\DeclareDocumentCommand \normalsize { } { \__fontscale_normalsize: }
-\cs_new_protected:Npn \__fontscale_normalsize:
- {
- \@setfontsize \normalsize { \dim_use:N \l_fontscale_normalsize_size_dim }
- \l_fontscale_normalsize_baselineskip_skip
- }
-\DeclareDocumentCommand \large { } { \__fontscale_large: }
-\cs_new_protected:Npn \__fontscale_large:
- {
- \@setfontsize \large { \dim_use:N \l_fontscale_large_size_dim }
- \l_fontscale_large_baselineskip_skip
- }
-\DeclareDocumentCommand \Large { } { \__fontscale_Large: }
-\cs_new_protected:Npn \__fontscale_Large:
- {
- \@setfontsize \Large { \dim_use:N \l_fontscale_Large_size_dim }
- \l_fontscale_Large_baselineskip_skip
- }
-\DeclareDocumentCommand \LARGE { } { \__fontscale_LARGE: }
-\cs_new_protected:Npn \__fontscale_LARGE:
- {
- \@setfontsize \LARGE { \dim_use:N \l_fontscale_LARGE_size_dim }
- \l_fontscale_LARGE_baselineskip_skip
- }
-\DeclareDocumentCommand \huge { } { \__fontscale_huge: }
-\cs_new_protected:Npn \__fontscale_huge:
- {
- \@setfontsize \huge { \dim_use:N \l_fontscale_huge_size_dim }
- \l_fontscale_huge_baselineskip_skip
- }
-\DeclareDocumentCommand \Huge { } { \__fontscale_Huge: }
-\cs_new_protected:Npn \__fontscale_Huge:
- {
- \@setfontsize \Huge { \dim_use:N \l_fontscale_Huge_size_dim }
- \l_fontscale_Huge_baselineskip_skip
- }
-% Initializes to \normalsize.
-\normalsize
-
-\NewExpandableDocumentCommand \CurrentFontStep { }
- { \__fontscale_current_font_step: }
-\cs_new:Npn \__fontscale_current_font_step:
- {
- \dim_case:nnF { \f@size pt }
- {
- { \l_fontscale_tiny_size_dim } { -4 }
- { \l_fontscale_scriptsize_size_dim } { -3 }
- { \l_fontscale_footnotesize_size_dim } { -2 }
- { \l_fontscale_small_size_dim } { -1 }
- { \l_fontscale_normalsize_size_dim } { 0 }
- { \l_fontscale_large_size_dim } { 1 }
- { \l_fontscale_Large_size_dim } { 2 }
- { \l_fontscale_LARGE_size_dim } { 3 }
- { \l_fontscale_huge_size_dim } { 4 }
- { \l_fontscale_Huge_size_dim } { 5 }
- }
- {
- \str_case:on \l__fontscale_typographic_scale_str
- {
- { modular }
- {
- \fp_eval:n
- {
- ln ( \f@size / \l__fontscale_normalsize_size_fp )
- / ln ( \l__fontscale_modular_ratio_fp )
- }
- }
- { musical }
- {
- \fp_eval:n
- {
- \l__fontscale_musical_notes_fp
- * ln ( \f@size / \l__fontscale_normalsize_size_fp )
- / ln ( \l__fontscale_musical_ratio_fp )
- }
- }
- }
- }
- }
-
-\NewExpandableDocumentCommand \CurrentFontScale { }
- { \__fontscale_current_font_scale: }
-\cs_new:Npn \__fontscale_current_font_scale:
- { \fp_eval:n { \f@size / \l__fontscale_normalsize_size_fp } }
-
-\NewExpandableDocumentCommand \CurrentFontSize { }
- { \__fontscale_current_font_size: }
-\cs_new:Npn \__fontscale_current_font_size: { \f@size pt }
-
-\NewExpandableDocumentCommand \CurrentFontBaselineskip { }
- { \__fontscale_current_font_baselineskip: }
-\cs_new:Npn \__fontscale_current_font_baselineskip: { \f@baselineskip }
-
-\NewDocumentCommand \SetFontStep { s m }
- {
- \IfBooleanTF #1
- { \__fontscale_add_font_step:n {#2} }
- { \__fontscale_set_font_step:n {#2} }
- }
-\cs_new_protected:Npn \__fontscale_set_font_step:n #1
- {
- \fp_set:Nn \l__fontscale_step_fp {#1}
- \__fontscale_set_font_step_aux:N \l__fontscale_step_fp
- }
-\cs_new_protected:Npn \__fontscale_set_font_step_aux:N #1
- {
- \token_case_meaning:NnF #1
- {
- \c_fontscale_tiny_step_fp { \tiny }
- \c_fontscale_scriptsize_step_fp { \scriptsize }
- \c_fontscale_footnotesize_step_fp { \footnotesize }
- \c_fontscale_small_step_fp { \small }
- \c_fontscale_normalsize_step_fp { \normalsize }
- \c_fontscale_large_step_fp { \large }
- \c_fontscale_Large_step_fp { \Large }
- \c_fontscale_LARGE_step_fp { \LARGE }
- \c_fontscale_huge_step_fp { \huge }
- \c_fontscale_Huge_step_fp { \Huge }
- }
- {
- \str_case:onF \l__fontscale_typographic_scale_str
- {
- { modular }
- {
- \fontsize
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp
- * \l__fontscale_modular_ratio_fp ^ #1
- }
- }
- {
- \fp_to_dim:n
- { \f@size * \l__fontscale_baselineskip_size_ratio_fp }
- }
- \selectfont
- }
- { musical }
- {
- \fontsize
- {
- \fp_to_dim:n
- {
- \l__fontscale_normalsize_size_fp
- * \l__fontscale_musical_ratio_fp
- ^ ( #1 / \l__fontscale_musical_notes_fp )
- }
- }
- {
- \fp_to_dim:n
- { \f@size * \l__fontscale_baselineskip_size_ratio_fp }
- }
- \selectfont
- }
- }
- { \msg_error:nn { fontscale } { font-step-out-of-bounds } }
- }
- }
-\cs_new_protected:Npn \__fontscale_add_font_step:n #1
- {
- \tl_set:Ne \l__fontscale_step_tl { \__fontscale_current_font_step: }
- \tl_if_empty:NTF \l__fontscale_step_tl
- { \msg_error:nn { fontscale } { font-step-out-of-bounds } }
- {
- \fp_set:Nn \l__fontscale_step_fp { (#1) + \l__fontscale_step_tl }
- \__fontscale_add_font_step_aux:N \l__fontscale_step_fp
- }
- }
-\cs_new_eq:NN \__fontscale_add_font_step_aux:N \__fontscale_set_font_step_aux:N
-
-\NewDocumentCommand \SetFontScale { s m }
- {
- \IfBooleanTF #1
- { \__fontscale_add_font_scale:n {#2} }
- { \__fontscale_set_font_scale:n {#2} }
- }
-\cs_new_protected:Npn \__fontscale_set_font_scale:n #1
- {
- \fontsize
- { \fp_to_dim:n { \l__fontscale_normalsize_size_fp * (#1) } }
- { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
- \selectfont
- }
-\cs_new_protected:Npn \__fontscale_add_font_scale:n #1
- {
- \fontsize
- { \fp_to_dim:n { \l__fontscale_normalsize_size_fp * (#1) + \f@size } }
- { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
- \selectfont
- }
-
-\NewDocumentCommand \SetFontSize { s m }
- {
- \IfBooleanTF #1
- { \__fontscale_add_font_size:n {#2} }
- { \__fontscale_set_font_size:n {#2} }
- }
-\cs_new_protected:Npn \__fontscale_set_font_size:n #1
- {
- \__fontscale_dim_set_with_default_unit:Nn \l__fontscale_size_dim {#1}
- \fontsize \l__fontscale_size_dim
- { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
- \selectfont
- }
-\cs_new_protected:Npn \__fontscale_add_font_size:n #1
- {
- \__fontscale_dim_set_with_default_unit:Nn \l__fontscale_size_dim {#1}
- \dim_add:Nn \l__fontscale_size_dim { \f@size pt }
- \fontsize \l__fontscale_size_dim
- { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
- \selectfont
- }
-
-\NewDocumentCommand \ScaleFont { m } { \__fontscale_scalefont:n {#1} }
-\cs_new_protected:Npn \__fontscale_scalefont:n #1
- {
- \fontsize
- { \fp_to_dim:n { \f@size * (#1) } }
- { \fp_to_dim:n { \dim_to_fp:n { \f@baselineskip } * (#1) } }
- \selectfont
- }
-
-\NewDocumentCommand \SetFontSizeBaselineskip { m m }
- { \__fontscale_set_font_size_baselineskip:nn {#1} {#2} }
-\cs_new_protected:Npn \__fontscale_set_font_size_baselineskip:nn #1#2
- {
- \__fontscale_dim_set_with_default_unit:Nn \l__fontscale_size_dim {#1}
- \__fontscale_skip_set_with_default_unit:Nn \l__fontscale_baselineskip_skip
- {#2}
- \fontsize \l__fontscale_size_dim \l__fontscale_baselineskip_skip
- \selectfont
- }
-
-\NewDocumentCommand \PrintFontParameters { }
- { \__fontscale_print_font_parameters: }
-\cs_new_protected:Npn \__fontscale_print_font_parameters:
- {
- step ~=~ \__fontscale_current_font_step: ,~
- scale ~=~ \__fontscale_current_font_scale: ,~
- size ~=~ \__fontscale_current_font_size: ,~
- baselineskip ~=~ \__fontscale_current_font_baselineskip:
- }
-
-\NewDocumentCommand \PrintAllFontParameters { }
- { \__fontscale_print_all_font_parameters: }
-\cs_new_protected:Npn \__fontscale_print_all_font_parameters:
- {
- \tl_map_inline:Nn \c__fontscale_names_tl
- {
- \prop_get:cnN { l_fontscale_##1_prop } { step } \l__fontscale_step_tl
- \prop_get:cnN { l_fontscale_##1_prop } { scale } \l__fontscale_scale_tl
- \token_to_str:c {##1} \@ \c_colon_str \c_space_tl
- step ~=~ \l__fontscale_step_tl ,~
- scale ~=~ \l__fontscale_scale_tl ,~
- size ~=~ \dim_use:c { l_fontscale_##1_size_dim } ,~
- baselineskip ~=~ \skip_use:c { l_fontscale_##1_baselineskip_skip }
- \str_if_eq:nnF {##1} { Huge } { \newline }
- }
- }
-
-\NewDocumentCommand \PrintSampleText
- { s O
- {
- The~ \texttt { fontscale }~ package \c_colon_str \c_space_tl
- A~ user~ interface~ for~ setting~ document~ font~ sizes
- }
- }
- {
- \IfBooleanTF #1
- { \__fontscale_print_sample_text_descending_order:n {#2} }
- { \__fontscale_print_sample_text_ascending_order:n {#2} }
- }
-\cs_new_protected:Npn \__fontscale_print_sample_text_ascending_order:n #1
- {
- { \tiny #1 \par }
- { \scriptsize #1 \par }
- { \footnotesize #1 \par }
- { \small #1 \par }
- { \normalsize #1 \par }
- { \large #1 \par }
- { \Large #1 \par }
- { \LARGE #1 \par }
- { \huge #1 \par }
- { \Huge #1 \par }
- }
-\cs_new_protected:Npn \__fontscale_print_sample_text_descending_order:n #1
- {
- { \Huge #1 \par }
- { \huge #1 \par }
- { \LARGE #1 \par }
- { \Large #1 \par }
- { \large #1 \par }
- { \normalsize #1 \par }
- { \small #1 \par }
- { \footnotesize #1 \par }
- { \scriptsize #1 \par }
- { \tiny #1 \par }
- }
-
-\NewDocumentCommand \PrintFontSizeCommand { } { \__fontscale_print_name: }
-\cs_new_protected:Npn \__fontscale_print_name:
- {
- \dim_case:nnF { \f@size pt }
- {
- { \l_fontscale_tiny_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_tiny_baselineskip_skip }
- { \token_to_str:N \tiny } { UNDEFINED \@ }
- }
- { \l_fontscale_scriptsize_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_scriptsize_baselineskip_skip }
- { \token_to_str:N \scriptsize } { UNDEFINED \@ }
- }
- { \l_fontscale_footnotesize_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_footnotesize_baselineskip_skip }
- { \token_to_str:N \footnotesize } { UNDEFINED \@ }
- }
- { \l_fontscale_small_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_small_baselineskip_skip }
- { \token_to_str:N \small } { UNDEFINED \@ }
- }
- { \l_fontscale_normalsize_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_normalsize_baselineskip_skip }
- { \token_to_str:N \normalsize } { UNDEFINED \@ }
- }
- { \l_fontscale_large_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_large_baselineskip_skip }
- { \token_to_str:N \large } { UNDEFINED \@ }
- }
- { \l_fontscale_Large_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_Large_baselineskip_skip }
- { \token_to_str:N \Large } { UNDEFINED \@ }
- }
- { \l_fontscale_LARGE_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_LARGE_baselineskip_skip }
- { \token_to_str:N \LARGE \@ } { UNDEFINED \@ }
- }
- { \l_fontscale_huge_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_huge_baselineskip_skip }
- { \token_to_str:N \huge } { UNDEFINED \@ }
- }
- { \l_fontscale_Huge_size_dim }
- {
- \skip_if_eq:nnTF { \f@baselineskip }
- { \l_fontscale_Huge_baselineskip_skip }
- { \token_to_str:N \Huge } { UNDEFINED \@ }
- }
- }
- { UNDEFINED \@ }
- }
-
-% TEXT PURIFY
-
-\cs_new:Npn \__fontscale_text_purify_equivalent:n #1
- {
- \bool_lazy_all:nT
- {
- { \tl_if_single_p:n {#1} }
- { \tl_if_single_token_p:n #1 }
- { \token_if_eq_meaning_p:NN #1 * }
- }
- { \use_none:n }
- }
-\text_declare_purify_equivalent:Nn \SetFontStep
- { \__fontscale_text_purify_equivalent:n }
-\text_declare_purify_equivalent:Nn \SetFontScale
- { \__fontscale_text_purify_equivalent:n }
-\text_declare_purify_equivalent:Nn \SetFontSize
- { \__fontscale_text_purify_equivalent:n }
-\text_declare_purify_equivalent:Nn \ScaleFont { \use_none:n }
+% Package : fontscale -- A user interface for setting document font sizes
+% Copyright : 2024 (c) Oliver Beery <beeryoliver@gmail.com>
+% CTAN : https://ctan.org/pkg/fontscale
+% Repository: https://github.com/beeryoliver/fontscale
+% License : The LaTeX Project Public License 1.3c
+
+% The 2022-06-01 LaTeX kernel update added \ProcessKeyOptions.
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+\ProvidesExplPackage
+ {fontscale}
+ {2024-04-15}
+ {1.2.0}
+ {A user interface for setting document font sizes}
+
+% The 2023-10-10 l3kernel update added many 'e'-variants.
+\IfExplAtLeastTF { 2023-10-10 }
+ { }
+ {
+ \msg_new:nnn { fontscale } { expl3-out-of-date }
+ {
+ The~ package~ could~ not~ load.~
+ The~ fontscale~ package~ requires~
+ L3~ programming~ layer~ version~ 2023-10-10~ or~ later.
+ }
+ \msg_critical:nn { fontscale } { expl3-out-of-date }
+ }
+
+% SOME VARIABLES
+
+\fp_const:Nn \c_fontscale_tiny_step_fp { -4 }
+\fp_const:Nn \c_fontscale_scriptsize_step_fp { -3 }
+\fp_const:Nn \c_fontscale_footnotesize_step_fp { -2 }
+\fp_const:Nn \c_fontscale_small_step_fp { -1 }
+\fp_const:Nn \c_fontscale_normalsize_step_fp { 0 }
+\fp_const:Nn \c_fontscale_large_step_fp { 1 }
+\fp_const:Nn \c_fontscale_Large_step_fp { 2 }
+\fp_const:Nn \c_fontscale_LARGE_step_fp { 3 }
+\fp_const:Nn \c_fontscale_huge_step_fp { 4 }
+\fp_const:Nn \c_fontscale_Huge_step_fp { 5 }
+
+\fp_const:Nn \c_fontscale_normalsize_scale_fp { 1 }
+
+\tl_const:Nn \c__fontscale_names_tl
+ {
+ {tiny} {scriptsize} {footnotesize} {small} {normalsize}
+ {large} {Large} {LARGE} {huge} {Huge}
+ }
+\tl_const:Nn \c__fontscale_names_other_tl
+ {
+ {tiny} {scriptsize} {footnotesize} {small}
+ {large} {Large} {LARGE} {huge} {Huge}
+ }
+
+\prop_new:N \l_fontscale_tiny_prop
+\prop_new:N \l_fontscale_scriptsize_prop
+\prop_new:N \l_fontscale_footnotesize_prop
+\prop_new:N \l_fontscale_small_prop
+\prop_new:N \l_fontscale_normalsize_prop
+\prop_new:N \l_fontscale_large_prop
+\prop_new:N \l_fontscale_Large_prop
+\prop_new:N \l_fontscale_LARGE_prop
+\prop_new:N \l_fontscale_huge_prop
+\prop_new:N \l_fontscale_Huge_prop
+
+\prop_put:Nnn \l_fontscale_tiny_prop { step } { -4 }
+\prop_put:Nnn \l_fontscale_scriptsize_prop { step } { -3 }
+\prop_put:Nnn \l_fontscale_footnotesize_prop { step } { -2 }
+\prop_put:Nnn \l_fontscale_small_prop { step } { -1 }
+\prop_put:Nnn \l_fontscale_normalsize_prop { step } { 0 }
+\prop_put:Nnn \l_fontscale_large_prop { step } { 1 }
+\prop_put:Nnn \l_fontscale_Large_prop { step } { 2 }
+\prop_put:Nnn \l_fontscale_LARGE_prop { step } { 3 }
+\prop_put:Nnn \l_fontscale_huge_prop { step } { 4 }
+\prop_put:Nnn \l_fontscale_Huge_prop { step } { 5 }
+
+\prop_put:Nnn \l_fontscale_normalsize_prop { scale } { 1 }
+
+\fp_new:N \l_fontscale_tiny_scale_fp
+\fp_new:N \l_fontscale_scriptsize_scale_fp
+\fp_new:N \l_fontscale_footnotesize_scale_fp
+\fp_new:N \l_fontscale_small_scale_fp
+\fp_new:N \l_fontscale_large_scale_fp
+\fp_new:N \l_fontscale_Large_scale_fp
+\fp_new:N \l_fontscale_LARGE_scale_fp
+\fp_new:N \l_fontscale_huge_scale_fp
+\fp_new:N \l_fontscale_Huge_scale_fp
+
+\dim_new:N \l_fontscale_tiny_size_dim
+\dim_new:N \l_fontscale_scriptsize_size_dim
+\dim_new:N \l_fontscale_footnotesize_size_dim
+\dim_new:N \l_fontscale_small_size_dim
+\dim_new:N \l_fontscale_normalsize_size_dim
+\dim_new:N \l_fontscale_large_size_dim
+\dim_new:N \l_fontscale_Large_size_dim
+\dim_new:N \l_fontscale_LARGE_size_dim
+\dim_new:N \l_fontscale_huge_size_dim
+\dim_new:N \l_fontscale_Huge_size_dim
+
+\skip_new:N \l_fontscale_tiny_baselineskip_skip
+\skip_new:N \l_fontscale_scriptsize_baselineskip_skip
+\skip_new:N \l_fontscale_footnotesize_baselineskip_skip
+\skip_new:N \l_fontscale_small_baselineskip_skip
+\skip_new:N \l_fontscale_normalsize_baselineskip_skip
+\skip_new:N \l_fontscale_large_baselineskip_skip
+\skip_new:N \l_fontscale_Large_baselineskip_skip
+\skip_new:N \l_fontscale_LARGE_baselineskip_skip
+\skip_new:N \l_fontscale_huge_baselineskip_skip
+\skip_new:N \l_fontscale_Huge_baselineskip_skip
+
+\str_new:N \l__fontscale_typographic_scale_str
+
+% Used in floating point expressions for speed.
+\fp_new:N \l__fontscale_normalsize_size_fp
+\fp_new:N \l__fontscale_musical_notes_fp
+
+% Temporary variables
+\tl_new:N \l__fontscale_step_tl
+\tl_new:N \l__fontscale_scale_tl
+\dim_new:N \l__fontscale_size_dim
+\skip_new:N \l__fontscale_baselineskip_skip
+
+% INITIAL FONT PARAMETERS
+
+\fp_set:Nn \l__fontscale_normalsize_size_fp { 10 }
+
+\dim_set:Nn \l_fontscale_tiny_size_dim { 6pt }
+\dim_set:Nn \l_fontscale_scriptsize_size_dim { 7pt }
+\dim_set:Nn \l_fontscale_footnotesize_size_dim { 8pt }
+\dim_set:Nn \l_fontscale_small_size_dim { 9pt }
+\dim_set:Nn \l_fontscale_normalsize_size_dim { 10pt }
+\dim_set:Nn \l_fontscale_large_size_dim { 11pt }
+\dim_set:Nn \l_fontscale_Large_size_dim { 12pt }
+\dim_set:Nn \l_fontscale_LARGE_size_dim { 14pt }
+\dim_set:Nn \l_fontscale_huge_size_dim { 16pt }
+\dim_set:Nn \l_fontscale_Huge_size_dim { 18pt }
+
+\fp_set:Nn \l_fontscale_tiny_scale_fp { 0.6 }
+\fp_set:Nn \l_fontscale_scriptsize_scale_fp { 0.7 }
+\fp_set:Nn \l_fontscale_footnotesize_scale_fp { 0.8 }
+\fp_set:Nn \l_fontscale_small_scale_fp { 0.9 }
+\fp_set:Nn \l_fontscale_large_scale_fp { 1.1 }
+\fp_set:Nn \l_fontscale_Large_scale_fp { 1.2 }
+\fp_set:Nn \l_fontscale_LARGE_scale_fp { 1.4 }
+\fp_set:Nn \l_fontscale_huge_scale_fp { 1.6 }
+\fp_set:Nn \l_fontscale_Huge_scale_fp { 1.8 }
+
+\skip_set:Nn \l_fontscale_tiny_baselineskip_skip { 7.2pt }
+\skip_set:Nn \l_fontscale_scriptsize_baselineskip_skip { 8.4pt }
+\skip_set:Nn \l_fontscale_footnotesize_baselineskip_skip { 9.6pt }
+\skip_set:Nn \l_fontscale_small_baselineskip_skip { 10.8pt }
+\skip_set:Nn \l_fontscale_normalsize_baselineskip_skip { 12 pt }
+\skip_set:Nn \l_fontscale_large_baselineskip_skip { 13.2pt }
+\skip_set:Nn \l_fontscale_Large_baselineskip_skip { 14.4pt }
+\skip_set:Nn \l_fontscale_LARGE_baselineskip_skip { 16.8pt }
+\skip_set:Nn \l_fontscale_huge_baselineskip_skip { 19.2pt }
+\skip_set:Nn \l_fontscale_Huge_baselineskip_skip { 21.6pt }
+
+\prop_put:Nnn \l_fontscale_tiny_prop { scale } { 0.6 }
+\prop_put:Nnn \l_fontscale_scriptsize_prop { scale } { 0.7 }
+\prop_put:Nnn \l_fontscale_footnotesize_prop { scale } { 0.8 }
+\prop_put:Nnn \l_fontscale_small_prop { scale } { 0.9 }
+\prop_put:Nnn \l_fontscale_large_prop { scale } { 1.1 }
+\prop_put:Nnn \l_fontscale_Large_prop { scale } { 1.2 }
+\prop_put:Nnn \l_fontscale_LARGE_prop { scale } { 1.4 }
+\prop_put:Nnn \l_fontscale_huge_prop { scale } { 1.6 }
+\prop_put:Nnn \l_fontscale_Huge_prop { scale } { 1.8 }
+
+\prop_put:Nnn \l_fontscale_tiny_prop { size } { 6pt }
+\prop_put:Nnn \l_fontscale_scriptsize_prop { size } { 7pt }
+\prop_put:Nnn \l_fontscale_footnotesize_prop { size } { 8pt }
+\prop_put:Nnn \l_fontscale_small_prop { size } { 9pt }
+\prop_put:Nnn \l_fontscale_normalsize_prop { size } { 10pt }
+\prop_put:Nnn \l_fontscale_large_prop { size } { 11pt }
+\prop_put:Nnn \l_fontscale_Large_prop { size } { 12pt }
+\prop_put:Nnn \l_fontscale_LARGE_prop { size } { 14pt }
+\prop_put:Nnn \l_fontscale_huge_prop { size } { 16pt }
+\prop_put:Nnn \l_fontscale_Huge_prop { size } { 18pt }
+
+\prop_put:Nnn \l_fontscale_tiny_prop { baselineskip } { 7.2pt }
+\prop_put:Nnn \l_fontscale_scriptsize_prop { baselineskip } { 8.4pt }
+\prop_put:Nnn \l_fontscale_footnotesize_prop { baselineskip } { 9.6pt }
+\prop_put:Nnn \l_fontscale_small_prop { baselineskip } { 10.8pt }
+\prop_put:Nnn \l_fontscale_normalsize_prop { baselineskip } { 12 pt }
+\prop_put:Nnn \l_fontscale_large_prop { baselineskip } { 13.2pt }
+\prop_put:Nnn \l_fontscale_Large_prop { baselineskip } { 14.4pt }
+\prop_put:Nnn \l_fontscale_LARGE_prop { baselineskip } { 16.8pt }
+\prop_put:Nnn \l_fontscale_huge_prop { baselineskip } { 19.2pt }
+\prop_put:Nnn \l_fontscale_Huge_prop { baselineskip } { 21.6pt }
+
+% SOME HELPER FUNCTIONS
+
+% Sets a dimen or skip variable, supplying a default unit of pt.
+\cs_new_protected:Npn \__fontscale_dim_set_with_default_unit:Nn #1#2
+ { \@defaultunits #1 = \dimexpr #2 pt \relax \relax \@nnil }
+\cs_generate_variant:Nn \__fontscale_dim_set_with_default_unit:Nn { c }
+\cs_new_protected:Npn \__fontscale_skip_set_with_default_unit:Nn #1#2
+ { \@defaultunits #1 = \glueexpr #2 pt \relax \@nnil }
+\cs_generate_variant:Nn \__fontscale_skip_set_with_default_unit:Nn { c }
+
+% MESSAGES
+
+\msg_new:nnn { fontscale } { key-font-scale-ignored }
+ {
+ Key~ #1 / scale~
+ \msg_line_context: \c_space_tl
+ ignored.~
+ Setting~ the~ scale~ and~ size~ keys~ for~ the~ same~
+ font~ size~ command~ ignores~ the~ scale~ key.
+ }
+\msg_new:nnn { fontscale } { font-sizes-out-of-order }
+ {
+ The~ font~ sizes~
+ \msg_line_context: \c_space_tl
+ are~ not~ in~ the~ correct~ order.~
+ The~ magnitude~ of~ the~ font~ sizes~ should~ be~ ordered~ from~
+ \token_to_str:N \tiny \c_space_tl
+ to~
+ \token_to_str:N \normalsize \c_space_tl
+ to~
+ \token_to_str:N \Huge .
+ }
+\msg_new:nnn { fontscale } { font-baselineskips-out-of-order }
+ {
+ The~ font~ baselineskips~
+ \msg_line_context: \c_space_tl
+ are~ not~ in~ the~ correct~ order.~
+ The~ magnitude~ of~ the~ font~ baselineskips~ should~ be~ ordered~ from~
+ \token_to_str:N \tiny \c_space_tl
+ to~
+ \token_to_str:N \normalsize \c_space_tl
+ to~
+ \token_to_str:N \Huge .
+ }
+\msg_new:nnn { fontscale } { font-step-out-of-bounds }
+ {
+ The~ font~ step~
+ \msg_line_context: \c_space_tl
+ must~ be~ an~ integer~ from~ -4~ to~ 5,~
+ unless~ the~ choice~ of~ typographic~ scale~ is~ modular~ or~ musical.
+ }
+
+% DEFINE KEYS
+
+\keys_define:nn { fontscale }
+ {
+ reset .choices:nn = { initial , preamble }
+ { \use:c { __fontscale_keys_precompile_#1: } }
+ , reset .default:n = initial
+
+ , ignore-order .bool_set:N = \l__fontscale_ignore_order_bool
+ , ignore-order .default:n = true
+
+ , baselineskip-size-ratio .fp_set:N =
+ \l__fontscale_baselineskip_size_ratio_fp
+ , baselineskip-size-ratio .value_required:n = true
+
+ , typographic-scale .choices:nn =
+ { classic-10pt , classic-11pt , classic-12pt , modular , musical }
+ { \str_set:Nn \l__fontscale_typographic_scale_str {#1} }
+ , typographic-scale .value_required:n = true
+
+ , classic-10pt .meta:n = { typographic-scale = classic-10pt }
+ , classic-10pt .value_forbidden:n = true
+
+ , classic-11pt .meta:n = { typographic-scale = classic-11pt }
+ , classic-11pt .value_forbidden:n = true
+
+ , classic-12pt .meta:n = { typographic-scale = classic-12pt }
+ , classic-12pt .value_forbidden:n = true
+
+ , modular .meta:n = { typographic-scale = modular }
+ , modular .value_forbidden:n = true
+
+ , musical .meta:n = { typographic-scale = musical }
+ , musical .value_forbidden:n = true
+
+ , modular / ratio .fp_set:N = \l__fontscale_modular_ratio_fp
+ , modular / ratio .value_required:n = true
+ }
+\keys_define:nn { fontscale / musical }
+ {
+ ratio .fp_set:N = \l__fontscale_musical_ratio_fp
+ , ratio .value_required:n = true
+
+ , notes .int_set:N = \l__fontscale_musical_notes_int
+ , notes .value_required:n = true
+ }
+\keys_define:nn { fontscale / tiny }
+ {
+ scale .tl_set:N = \l__fontscale_tiny_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_tiny_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_tiny_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / scriptsize }
+ {
+ scale .tl_set:N = \l__fontscale_scriptsize_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_scriptsize_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_scriptsize_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / footnotesize }
+ {
+ scale .tl_set:N = \l__fontscale_footnotesize_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_footnotesize_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_footnotesize_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / small }
+ {
+ scale .tl_set:N = \l__fontscale_small_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_small_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_small_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / normalsize }
+ {
+ size .tl_set:N = \l__fontscale_normalsize_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_normalsize_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / large }
+ {
+ scale .tl_set:N = \l__fontscale_large_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_large_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_large_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / Large }
+ {
+ scale .tl_set:N = \l__fontscale_Large_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_Large_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_Large_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / LARGE }
+ {
+ scale .tl_set:N = \l__fontscale_LARGE_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_LARGE_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_LARGE_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / huge }
+ {
+ scale .tl_set:N = \l__fontscale_huge_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_huge_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_huge_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale / Huge }
+ {
+ scale .tl_set:N = \l__fontscale_Huge_scale_tl
+ , scale .value_required:n = true
+
+ , size .tl_set:N = \l__fontscale_Huge_size_tl
+ , size .value_required:n = true
+
+ , baselineskip .tl_set:N = \l__fontscale_Huge_baselineskip_tl
+ , baselineskip .value_required:n = true
+ }
+\keys_define:nn { fontscale }
+ {
+ tiny .code:n = \__fontscale_keys_name_code:n {#1}
+ , tiny .value_required:n = true
+
+ , scriptsize .code:n = \__fontscale_keys_name_code:n {#1}
+ , scriptsize .value_required:n = true
+
+ , footnotesize .code:n = \__fontscale_keys_name_code:n {#1}
+ , footnotesize .value_required:n = true
+
+ , small .code:n = \__fontscale_keys_name_code:n {#1}
+ , small .value_required:n = true
+
+ , normalsize .code:n = \__fontscale_keys_name_code:n {#1}
+ , normalsize .value_required:n = true
+
+ , large .code:n = \__fontscale_keys_name_code:n {#1}
+ , large .value_required:n = true
+
+ , Large .code:n = \__fontscale_keys_name_code:n {#1}
+ , Large .value_required:n = true
+
+ , LARGE .code:n = \__fontscale_keys_name_code:n {#1}
+ , LARGE .value_required:n = true
+
+ , huge .code:n = \__fontscale_keys_name_code:n {#1}
+ , huge .value_required:n = true
+
+ , Huge .code:n = \__fontscale_keys_name_code:n {#1}
+ , Huge .value_required:n = true
+ }
+\cs_new_protected:Npn \__fontscale_keys_name_code:n #1
+ {
+ \str_if_in:nnTF {#1} { / }
+ { \__fontscale_keys_name_code_split:ww #1 \q_stop }
+ { \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1} }
+ }
+\cs_new_protected:Npn \__fontscale_keys_name_code_split:ww #1 / #2 \q_stop
+ {
+ \tl_set:cn { l__fontscale_ \l_keys_key_str _size_tl } {#1}
+ \tl_set:cn { l__fontscale_ \l_keys_key_str _baselineskip_tl } {#2}
+ }
+
+% PRE-COMPILE KEYS
+
+% Pre-compiles the keys with their initial values. The keys are pre-compiled
+% by hand for speed.
+\cs_new_protected:Npn \__fontscale_keys_precompile_initial:
+ {
+ \bool_set_false:N \l__fontscale_ignore_order_bool
+ \fp_set:Nn \l__fontscale_baselineskip_size_ratio_fp { 1.2 }
+ \str_set:Nn \l__fontscale_typographic_scale_str { classic-10pt }
+ \fp_set:Nn \l__fontscale_modular_ratio_fp { 1.125 }
+ \fp_set:Nn \l__fontscale_musical_ratio_fp { 2 }
+ \int_set:Nn \l__fontscale_musical_notes_int { 5 }
+
+ \tl_set:Nn \l__fontscale_tiny_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_scriptsize_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_footnotesize_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_small_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_large_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_Large_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_LARGE_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_huge_scale_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_Huge_scale_tl { \q_no_value }
+
+ \tl_set:Nn \l__fontscale_tiny_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_scriptsize_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_footnotesize_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_small_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_normalsize_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_large_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_Large_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_LARGE_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_huge_size_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_Huge_size_tl { \q_no_value }
+
+ \tl_set:Nn \l__fontscale_tiny_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_scriptsize_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_footnotesize_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_small_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_normalsize_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_large_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_Large_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_LARGE_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_huge_baselineskip_tl { \q_no_value }
+ \tl_set:Nn \l__fontscale_Huge_baselineskip_tl { \q_no_value }
+ }
+\__fontscale_keys_precompile_initial:
+
+% Pre-compiles the keys with their values at the end of the preamble. The keys
+% are pre-compiled by hand for speed.
+\cs_new_eq:NN \__fontscale_keys_precompile_preamble: \prg_do_nothing
+\AddToHook { begindocument / before }
+ { \__fontscale_keys_precompile_preamble_set: }
+\cs_new_protected:Npn \__fontscale_keys_precompile_preamble_set:
+ {
+ \cs_set_protected:Npe \__fontscale_keys_precompile_preamble:
+ {
+ \bool_if:NTF \l__fontscale_ignore_order_bool
+ { \bool_set_true:N } { \bool_set_false:N }
+ \exp_not:N \l__fontscale_ignore_order_bool
+ \fp_set:Nn \exp_not:N \l__fontscale_baselineskip_size_ratio_fp
+ { \exp_not:V \l__fontscale_baselineskip_size_ratio_fp }
+ \str_set:Nn \exp_not:N \l__fontscale_typographic_scale_str
+ { \l__fontscale_typographic_scale_str }
+ \fp_set:Nn \exp_not:N \l__fontscale_modular_ratio_fp
+ { \exp_not:V \l__fontscale_modular_ratio_fp }
+ \fp_set:Nn \exp_not:N \l__fontscale_musical_ratio_fp
+ { \exp_not:V \l__fontscale_musical_ratio_fp }
+ \int_set:Nn \exp_not:N \l__fontscale_musical_notes_int
+ { \int_use:N \l__fontscale_musical_notes_int }
+
+ \tl_set:Nn \exp_not:N \l__fontscale_tiny_scale_tl
+ { \exp_not:o \l__fontscale_tiny_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_scale_tl
+ { \exp_not:o \l__fontscale_scriptsize_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_scale_tl
+ { \exp_not:o \l__fontscale_footnotesize_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_small_scale_tl
+ { \exp_not:o \l__fontscale_small_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_large_scale_tl
+ { \exp_not:o \l__fontscale_large_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_Large_scale_tl
+ { \exp_not:o \l__fontscale_Large_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_LARGE_scale_tl
+ { \exp_not:o \l__fontscale_LARGE_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_huge_scale_tl
+ { \exp_not:o \l__fontscale_huge_scale_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_Huge_scale_tl
+ { \exp_not:o \l__fontscale_Huge_scale_tl }
+
+ \tl_set:Nn \exp_not:N \l__fontscale_tiny_size_tl
+ { \exp_not:o \l__fontscale_tiny_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_size_tl
+ { \exp_not:o \l__fontscale_scriptsize_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_size_tl
+ { \exp_not:o \l__fontscale_footnotesize_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_small_size_tl
+ { \exp_not:o \l__fontscale_small_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_normalsize_size_tl
+ { \exp_not:o \l__fontscale_normalsize_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_large_size_tl
+ { \exp_not:o \l__fontscale_large_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_Large_size_tl
+ { \exp_not:o \l__fontscale_Large_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_LARGE_size_tl
+ { \exp_not:o \l__fontscale_LARGE_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_huge_size_tl
+ { \exp_not:o \l__fontscale_huge_size_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_Huge_size_tl
+ { \exp_not:o \l__fontscale_Huge_size_tl }
+
+ \tl_set:Nn \exp_not:N \l__fontscale_tiny_baselineskip_tl
+ { \exp_not:o \l__fontscale_tiny_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_scriptsize_baselineskip_tl
+ { \exp_not:o \l__fontscale_scriptsize_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_footnotesize_baselineskip_tl
+ { \exp_not:o \l__fontscale_footnotesize_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_small_baselineskip_tl
+ { \exp_not:o \l__fontscale_small_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_normalsize_baselineskip_tl
+ { \exp_not:o \l__fontscale_normalsize_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_large_baselineskip_tl
+ { \exp_not:o \l__fontscale_large_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_Large_baselineskip_tl
+ { \exp_not:o \l__fontscale_Large_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_LARGE_baselineskip_tl
+ { \exp_not:o \l__fontscale_LARGE_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_huge_baselineskip_tl
+ { \exp_not:o \l__fontscale_huge_baselineskip_tl }
+ \tl_set:Nn \exp_not:N \l__fontscale_Huge_baselineskip_tl
+ { \exp_not:o \l__fontscale_Huge_baselineskip_tl }
+ }
+ }
+
+% PROCESS KEYS
+
+\NewDocumentCommand \fontscalesetup { m } { \__fontscale_keys_set:n {#1} }
+\cs_new_protected:Npn \__fontscale_keys_set:n #1
+ {
+ \keys_set:nn { fontscale } {#1}
+ \__fontscale_keys_process:
+ }
+\cs_new_protected:Npn \__fontscale_keys_process:
+ {
+ \__fontscale_keys_process_normalsize:
+ \__fontscale_keys_process_other:
+ \__fontscale_keys_process_other_props:
+ \__fontscale_keys_process_check_order:
+ }
+% Sets the size and baselineskip of \normalsize, stores them in a property
+% list, and uses \normalsize.
+\cs_new_protected:Npn \__fontscale_keys_process_normalsize:
+ {
+ \quark_if_no_value:NTF \l__fontscale_normalsize_size_tl
+ {
+ \dim_set:Nn \l_fontscale_normalsize_size_dim
+ {
+ \str_case:on \l__fontscale_typographic_scale_str
+ {
+ { classic-10pt } { 10pt }
+ { classic-11pt } { 11pt }
+ { classic-12pt } { 12pt }
+ { modular } { 10pt }
+ { musical } { 10pt }
+ }
+ }
+ }
+ {
+ \__fontscale_dim_set_with_default_unit:Nn
+ \l_fontscale_normalsize_size_dim { \l__fontscale_normalsize_size_tl }
+ }
+ \fp_set:Nn \l__fontscale_normalsize_size_fp
+ { \l_fontscale_normalsize_size_dim }
+ \quark_if_no_value:NTF \l__fontscale_normalsize_baselineskip_tl
+ {
+ \skip_set:Nn \l_fontscale_normalsize_baselineskip_skip
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_normalsize_size_fp
+ * \l__fontscale_baselineskip_size_ratio_fp
+ }
+ }
+ }
+ {
+ \__fontscale_skip_set_with_default_unit:Nn
+ \l_fontscale_normalsize_baselineskip_skip
+ { \l__fontscale_normalsize_baselineskip_tl }
+ }
+ \prop_put:Nno \l_fontscale_normalsize_prop { size }
+ { \dim_use:N \l_fontscale_normalsize_size_dim }
+ \prop_put:Nno \l_fontscale_normalsize_prop { baselineskip }
+ { \skip_use:N \l_fontscale_normalsize_baselineskip_skip }
+ \normalsize
+ }
+% Sets the size, scale, and baselineskip of the other font size commands.
+% Issues a warning if the user sets both the scale and size keys for the same
+% font size command.
+\cs_new_protected:Npn \__fontscale_keys_process_other_classic_xpt:n #1
+ {
+ \dim_set:cn { l_fontscale_#1_size_dim }
+ {
+ \str_case:nn {#1}
+ {
+ { tiny } { 6pt }
+ { scriptsize } { 7pt }
+ { footnotesize } { 8pt }
+ { small } { 9pt }
+ { large } { 11pt }
+ { Large } { 12pt }
+ { LARGE } { 14pt }
+ { huge } { 16pt }
+ { Huge } { 18pt }
+ }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_keys_process_other_classic_xipt:n #1
+ {
+ \dim_set:cn { l_fontscale_#1_size_dim }
+ {
+ \str_case:nn {#1}
+ {
+ { tiny } { 7pt }
+ { scriptsize } { 8pt }
+ { footnotesize } { 9pt }
+ { small } { 10pt }
+ { large } { 12pt }
+ { Large } { 14pt }
+ { LARGE } { 16pt }
+ { huge } { 18pt }
+ { Huge } { 21pt }
+ }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_keys_process_other_classic_xiipt:n #1
+ {
+ \dim_set:cn { l_fontscale_#1_size_dim }
+ {
+ \str_case:nn {#1}
+ {
+ { tiny } { 8pt }
+ { scriptsize } { 9pt }
+ { footnotesize } { 10pt }
+ { small } { 11pt }
+ { large } { 14pt }
+ { Large } { 16pt }
+ { LARGE } { 18pt }
+ { huge } { 21pt }
+ { Huge } { 24pt }
+ }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_keys_process_other_modular:n #1
+ {
+ \dim_set:cn { l_fontscale_#1_size_dim }
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_normalsize_size_fp * \l__fontscale_modular_ratio_fp
+ ^ \use:c { c_fontscale_#1_step_fp }
+ }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_keys_process_other_musical:n #1
+ {
+ \dim_set:cn { l_fontscale_#1_size_dim }
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_normalsize_size_fp * \l__fontscale_musical_ratio_fp
+ ^ ( \use:c { c_fontscale_#1_step_fp }
+ / \l__fontscale_musical_notes_fp )
+ }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_keys_process_other:
+ {
+ \str_case:on \l__fontscale_typographic_scale_str
+ {
+ { classic-10pt }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
+ \__fontscale_keys_process_other_classic_xpt:n
+ }
+ { classic-11pt }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
+ \__fontscale_keys_process_other_classic_xipt:n
+ }
+ { classic-12pt }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
+ \__fontscale_keys_process_other_classic_xiipt:n
+ }
+ { modular }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
+ \__fontscale_keys_process_other_modular:n
+ }
+ { musical }
+ {
+ \cs_set_eq:NN \__fontscale_keys_process_other_typographic_scale:n
+ \__fontscale_keys_process_other_musical:n
+ \fp_set:Nn \l__fontscale_musical_notes_fp
+ { \l__fontscale_musical_notes_int }
+ }
+ }
+ \tl_map_function:NN \c__fontscale_names_other_tl
+ \__fontscale_keys_process_other_aux:n
+ }
+\cs_new_protected:Npn \__fontscale_keys_process_other_aux:n #1
+ {
+ \quark_if_no_value:cF { l__fontscale_#1_size_tl }
+ {
+ \__fontscale_dim_set_with_default_unit:cn { l_fontscale_#1_size_dim }
+ { \use:c { l__fontscale_#1_size_tl } }
+ \quark_if_no_value:cF { l__fontscale_#1_scale_tl }
+ { \msg_warning:nnn { fontscale } { key-font-scale-ignored } {#1} }
+ \prg_break:
+ }
+ \quark_if_no_value:cF { l__fontscale_#1_scale_tl }
+ {
+ \dim_set:cn { l_fontscale_#1_size_dim }
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_normalsize_size_fp
+ * ( \use:c { l__fontscale_#1_scale_tl } )
+ }
+ }
+ \prg_break:
+ }
+ \prg_break:n { \__fontscale_keys_process_other_typographic_scale:n {#1} }
+ \prg_break_point:
+ \fp_set:cn { l_fontscale_#1_scale_fp }
+ { \use:c { l_fontscale_#1_size_dim } / \l__fontscale_normalsize_size_fp }
+ \quark_if_no_value:cTF { l__fontscale_#1_baselineskip_tl }
+ {
+ \skip_set:cn { l_fontscale_#1_baselineskip_skip }
+ {
+ \fp_to_dim:n
+ {
+ \use:c { l_fontscale_#1_size_dim }
+ * \l__fontscale_baselineskip_size_ratio_fp
+ }
+ }
+ }
+ {
+ \__fontscale_skip_set_with_default_unit:cn
+ { l_fontscale_#1_baselineskip_skip }
+ { \use:c { l__fontscale_#1_baselineskip_tl } }
+ }
+ }
+% Puts the scale, size, and baselineskip of the other font size commands in
+% property lists.
+\cs_new_protected:Npn \__fontscale_keys_process_other_props:
+ {
+ \prop_put:Nne \l_fontscale_tiny_prop { scale }
+ { \fp_use:N \l_fontscale_tiny_scale_fp }
+ \prop_put:Nne \l_fontscale_scriptsize_prop { scale }
+ { \fp_use:N \l_fontscale_scriptsize_scale_fp }
+ \prop_put:Nne \l_fontscale_footnotesize_prop { scale }
+ { \fp_use:N \l_fontscale_footnotesize_scale_fp }
+ \prop_put:Nne \l_fontscale_small_prop { scale }
+ { \fp_use:N \l_fontscale_small_scale_fp }
+ \prop_put:Nne \l_fontscale_large_prop { scale }
+ { \fp_use:N \l_fontscale_large_scale_fp }
+ \prop_put:Nne \l_fontscale_Large_prop { scale }
+ { \fp_use:N \l_fontscale_Large_scale_fp }
+ \prop_put:Nne \l_fontscale_LARGE_prop { scale }
+ { \fp_use:N \l_fontscale_LARGE_scale_fp }
+ \prop_put:Nne \l_fontscale_huge_prop { scale }
+ { \fp_use:N \l_fontscale_huge_scale_fp }
+ \prop_put:Nne \l_fontscale_Huge_prop { scale }
+ { \fp_use:N \l_fontscale_Huge_scale_fp }
+
+ \prop_put:Nno \l_fontscale_tiny_prop { size }
+ { \dim_use:N \l_fontscale_tiny_size_dim }
+ \prop_put:Nno \l_fontscale_scriptsize_prop { size }
+ { \dim_use:N \l_fontscale_scriptsize_size_dim }
+ \prop_put:Nno \l_fontscale_footnotesize_prop { size }
+ { \dim_use:N \l_fontscale_footnotesize_size_dim }
+ \prop_put:Nno \l_fontscale_small_prop { size }
+ { \dim_use:N \l_fontscale_small_size_dim }
+ \prop_put:Nno \l_fontscale_large_prop { size }
+ { \dim_use:N \l_fontscale_large_size_dim }
+ \prop_put:Nno \l_fontscale_Large_prop { size }
+ { \dim_use:N \l_fontscale_Large_size_dim }
+ \prop_put:Nno \l_fontscale_LARGE_prop { size }
+ { \dim_use:N \l_fontscale_LARGE_size_dim }
+ \prop_put:Nno \l_fontscale_huge_prop { size }
+ { \dim_use:N \l_fontscale_huge_size_dim }
+ \prop_put:Nno \l_fontscale_Huge_prop { size }
+ { \dim_use:N \l_fontscale_Huge_size_dim }
+
+ \prop_put:Nno \l_fontscale_tiny_prop { baselineskip }
+ { \skip_use:N \l_fontscale_tiny_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_scriptsize_prop { baselineskip }
+ { \skip_use:N \l_fontscale_scriptsize_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_footnotesize_prop { baselineskip }
+ { \skip_use:N \l_fontscale_footnotesize_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_small_prop { baselineskip }
+ { \skip_use:N \l_fontscale_small_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_large_prop { baselineskip }
+ { \skip_use:N \l_fontscale_large_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_Large_prop { baselineskip }
+ { \skip_use:N \l_fontscale_Large_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_LARGE_prop { baselineskip }
+ { \skip_use:N \l_fontscale_LARGE_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_huge_prop { baselineskip }
+ { \skip_use:N \l_fontscale_huge_baselineskip_skip }
+ \prop_put:Nno \l_fontscale_Huge_prop { baselineskip }
+ { \skip_use:N \l_fontscale_Huge_baselineskip_skip }
+ }
+% Issues a warning if the font sizes or font baselineskips are not in the
+% correct order.
+\cs_new_protected:Npn \__fontscale_keys_process_check_order:
+ {
+ \bool_if:NF \l__fontscale_ignore_order_bool
+ {
+ \dim_compare:nF
+ {
+ \l_fontscale_tiny_size_dim
+ < \l_fontscale_scriptsize_size_dim
+ < \l_fontscale_footnotesize_size_dim
+ < \l_fontscale_small_size_dim
+ < \l_fontscale_normalsize_size_dim
+ < \l_fontscale_large_size_dim
+ < \l_fontscale_Large_size_dim
+ < \l_fontscale_LARGE_size_dim
+ < \l_fontscale_huge_size_dim
+ < \l_fontscale_Huge_size_dim
+ }
+ { \msg_warning:nn { fontscale } { font-sizes-out-of-order } }
+ \dim_compare:nF
+ {
+ \l_fontscale_tiny_baselineskip_skip
+ < \l_fontscale_scriptsize_baselineskip_skip
+ < \l_fontscale_footnotesize_baselineskip_skip
+ < \l_fontscale_small_baselineskip_skip
+ < \l_fontscale_normalsize_baselineskip_skip
+ < \l_fontscale_large_baselineskip_skip
+ < \l_fontscale_Large_baselineskip_skip
+ < \l_fontscale_LARGE_baselineskip_skip
+ < \l_fontscale_huge_baselineskip_skip
+ < \l_fontscale_Huge_baselineskip_skip
+ }
+ { \msg_warning:nn { fontscale } { font-baselineskips-out-of-order } }
+ }
+ }
+
+% DOCUMENT COMMANDS
+
+% The internal functions of each font size command are not used elsewhere in
+% the code for compatibility with user-defined hooks
+% (e.g. \AddToHook{cmd/normalsize/after}{<user-defined-function>}).
+% Need \dim_use:N for compatibility with the microtype package.
+\DeclareDocumentCommand \tiny { } { \__fontscale_tiny: }
+\cs_new_protected:Npn \__fontscale_tiny:
+ {
+ \@setfontsize \tiny { \dim_use:N \l_fontscale_tiny_size_dim }
+ \l_fontscale_tiny_baselineskip_skip
+ }
+\DeclareDocumentCommand \scriptsize { } { \__fontscale_scriptsize: }
+\cs_new_protected:Npn \__fontscale_scriptsize:
+ {
+ \@setfontsize \scriptsize { \dim_use:N \l_fontscale_scriptsize_size_dim }
+ \l_fontscale_scriptsize_baselineskip_skip
+ }
+\DeclareDocumentCommand \footnotesize { } { \__fontscale_footnotesize: }
+\cs_new_protected:Npn \__fontscale_footnotesize:
+ {
+ \@setfontsize \footnotesize
+ { \dim_use:N \l_fontscale_footnotesize_size_dim }
+ \l_fontscale_footnotesize_baselineskip_skip
+ }
+\DeclareDocumentCommand \small { } { \__fontscale_small: }
+\cs_new_protected:Npn \__fontscale_small:
+ {
+ \@setfontsize \small { \dim_use:N \l_fontscale_small_size_dim }
+ \l_fontscale_small_baselineskip_skip
+ }
+\DeclareDocumentCommand \normalsize { } { \__fontscale_normalsize: }
+\cs_new_protected:Npn \__fontscale_normalsize:
+ {
+ \@setfontsize \normalsize { \dim_use:N \l_fontscale_normalsize_size_dim }
+ \l_fontscale_normalsize_baselineskip_skip
+ }
+\DeclareDocumentCommand \large { } { \__fontscale_large: }
+\cs_new_protected:Npn \__fontscale_large:
+ {
+ \@setfontsize \large { \dim_use:N \l_fontscale_large_size_dim }
+ \l_fontscale_large_baselineskip_skip
+ }
+\DeclareDocumentCommand \Large { } { \__fontscale_Large: }
+\cs_new_protected:Npn \__fontscale_Large:
+ {
+ \@setfontsize \Large { \dim_use:N \l_fontscale_Large_size_dim }
+ \l_fontscale_Large_baselineskip_skip
+ }
+\DeclareDocumentCommand \LARGE { } { \__fontscale_LARGE: }
+\cs_new_protected:Npn \__fontscale_LARGE:
+ {
+ \@setfontsize \LARGE { \dim_use:N \l_fontscale_LARGE_size_dim }
+ \l_fontscale_LARGE_baselineskip_skip
+ }
+\DeclareDocumentCommand \huge { } { \__fontscale_huge: }
+\cs_new_protected:Npn \__fontscale_huge:
+ {
+ \@setfontsize \huge { \dim_use:N \l_fontscale_huge_size_dim }
+ \l_fontscale_huge_baselineskip_skip
+ }
+\DeclareDocumentCommand \Huge { } { \__fontscale_Huge: }
+\cs_new_protected:Npn \__fontscale_Huge:
+ {
+ \@setfontsize \Huge { \dim_use:N \l_fontscale_Huge_size_dim }
+ \l_fontscale_Huge_baselineskip_skip
+ }
+% Initializes to \normalsize.
+\normalsize
+
+\NewExpandableDocumentCommand \CurrentFontStep { }
+ { \__fontscale_current_font_step: }
+\cs_new:Npn \__fontscale_current_font_step:
+ {
+ \dim_case:nnF { \f@size pt }
+ {
+ { \l_fontscale_tiny_size_dim } { -4 }
+ { \l_fontscale_scriptsize_size_dim } { -3 }
+ { \l_fontscale_footnotesize_size_dim } { -2 }
+ { \l_fontscale_small_size_dim } { -1 }
+ { \l_fontscale_normalsize_size_dim } { 0 }
+ { \l_fontscale_large_size_dim } { 1 }
+ { \l_fontscale_Large_size_dim } { 2 }
+ { \l_fontscale_LARGE_size_dim } { 3 }
+ { \l_fontscale_huge_size_dim } { 4 }
+ { \l_fontscale_Huge_size_dim } { 5 }
+ }
+ {
+ \str_case:on \l__fontscale_typographic_scale_str
+ {
+ { modular }
+ {
+ \fp_eval:n
+ {
+ ln ( \f@size / \l__fontscale_normalsize_size_fp )
+ / ln ( \l__fontscale_modular_ratio_fp )
+ }
+ }
+ { musical }
+ {
+ \fp_eval:n
+ {
+ \l__fontscale_musical_notes_fp
+ * ln ( \f@size / \l__fontscale_normalsize_size_fp )
+ / ln ( \l__fontscale_musical_ratio_fp )
+ }
+ }
+ }
+ }
+ }
+
+\NewExpandableDocumentCommand \CurrentFontScale { }
+ { \__fontscale_current_font_scale: }
+\cs_new:Npn \__fontscale_current_font_scale:
+ { \fp_eval:n { \f@size / \l__fontscale_normalsize_size_fp } }
+
+\NewExpandableDocumentCommand \CurrentFontSize { }
+ { \__fontscale_current_font_size: }
+\cs_new:Npn \__fontscale_current_font_size: { \f@size pt }
+
+\NewExpandableDocumentCommand \CurrentFontBaselineskip { }
+ { \__fontscale_current_font_baselineskip: }
+\cs_new:Npn \__fontscale_current_font_baselineskip: { \f@baselineskip }
+
+\NewDocumentCommand \SetFontStep { s m }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_step:n {#2} }
+ { \__fontscale_set_font_step:n {#2} }
+ }
+\cs_new_protected:Npn \__fontscale_set_font_step:n #1
+ {
+ \str_case:enF { \fp_eval:n {#1} }
+ {
+ { -4 } { \tiny }
+ { -3 } { \scriptsize }
+ { -2 } { \footnotesize }
+ { -1 } { \small }
+ { 0 } { \normalsize }
+ { 1 } { \large }
+ { 2 } { \Large }
+ { 3 } { \LARGE }
+ { 4 } { \huge }
+ { 5 } { \Huge }
+ }
+ {
+ \str_case:onF \l__fontscale_typographic_scale_str
+ {
+ { modular }
+ {
+ \fontsize
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_normalsize_size_fp
+ * \l__fontscale_modular_ratio_fp ^ (#1)
+ }
+ }
+ {
+ \fp_to_dim:n
+ { \f@size * \l__fontscale_baselineskip_size_ratio_fp }
+ }
+ \selectfont
+ }
+ { musical }
+ {
+ \fontsize
+ {
+ \fp_to_dim:n
+ {
+ \l__fontscale_normalsize_size_fp
+ * \l__fontscale_musical_ratio_fp
+ ^ ( (#1) / \l__fontscale_musical_notes_fp )
+ }
+ }
+ {
+ \fp_to_dim:n
+ { \f@size * \l__fontscale_baselineskip_size_ratio_fp }
+ }
+ \selectfont
+ }
+ }
+ { \msg_error:nn { fontscale } { font-step-out-of-bounds } }
+ }
+ }
+\cs_new_protected:Npn \__fontscale_add_font_step:n #1
+ {
+ \tl_set:Ne \l__fontscale_step_tl { \__fontscale_current_font_step: }
+ \tl_if_empty:NTF \l__fontscale_step_tl
+ { \msg_error:nn { fontscale } { font-step-out-of-bounds } }
+ { \__fontscale_add_font_step_aux:n { (#1) + \l__fontscale_step_tl } }
+ }
+\cs_new_eq:NN \__fontscale_add_font_step_aux:n \__fontscale_set_font_step:n
+
+\NewDocumentCommand \SetFontScale { s m }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_scale:n {#2} }
+ { \__fontscale_set_font_scale:n {#2} }
+ }
+\cs_new_protected:Npn \__fontscale_set_font_scale:n #1
+ {
+ \fontsize
+ { \fp_to_dim:n { \l__fontscale_normalsize_size_fp * (#1) } }
+ { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
+ \selectfont
+ }
+\cs_new_protected:Npn \__fontscale_add_font_scale:n #1
+ {
+ \fontsize
+ { \fp_to_dim:n { \l__fontscale_normalsize_size_fp * (#1) + \f@size } }
+ { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
+ \selectfont
+ }
+
+\NewDocumentCommand \SetFontSize { s m }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_add_font_size:n {#2} }
+ { \__fontscale_set_font_size:n {#2} }
+ }
+\cs_new_protected:Npn \__fontscale_set_font_size:n #1
+ {
+ \__fontscale_dim_set_with_default_unit:Nn \l__fontscale_size_dim {#1}
+ \fontsize \l__fontscale_size_dim
+ { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
+ \selectfont
+ }
+\cs_new_protected:Npn \__fontscale_add_font_size:n #1
+ {
+ \__fontscale_dim_set_with_default_unit:Nn \l__fontscale_size_dim {#1}
+ \dim_add:Nn \l__fontscale_size_dim { \f@size pt }
+ \fontsize \l__fontscale_size_dim
+ { \fp_to_dim:n { \f@size * \l__fontscale_baselineskip_size_ratio_fp } }
+ \selectfont
+ }
+
+\NewDocumentCommand \ScaleFont { m } { \__fontscale_scalefont:n {#1} }
+\cs_new_protected:Npn \__fontscale_scalefont:n #1
+ {
+ \fontsize
+ { \fp_to_dim:n { \f@size * (#1) } }
+ { \fp_to_dim:n { \dim_to_fp:n { \f@baselineskip } * (#1) } }
+ \selectfont
+ }
+
+\NewDocumentCommand \SetFontSizeBaselineskip { m m }
+ { \__fontscale_set_font_size_baselineskip:nn {#1} {#2} }
+\cs_new_protected:Npn \__fontscale_set_font_size_baselineskip:nn #1#2
+ {
+ \__fontscale_dim_set_with_default_unit:Nn \l__fontscale_size_dim {#1}
+ \__fontscale_skip_set_with_default_unit:Nn \l__fontscale_baselineskip_skip
+ {#2}
+ \fontsize \l__fontscale_size_dim \l__fontscale_baselineskip_skip
+ \selectfont
+ }
+
+\NewDocumentCommand \PrintFontParameters { }
+ { \__fontscale_print_font_parameters: }
+\cs_new_protected:Npn \__fontscale_print_font_parameters:
+ {
+ step ~=~ \__fontscale_current_font_step: ,~
+ scale ~=~ \__fontscale_current_font_scale: ,~
+ size ~=~ \__fontscale_current_font_size: ,~
+ baselineskip ~=~ \__fontscale_current_font_baselineskip:
+ }
+
+\NewDocumentCommand \PrintAllFontParameters { }
+ { \__fontscale_print_all_font_parameters: }
+\cs_new_protected:Npn \__fontscale_print_all_font_parameters:
+ {
+ \tl_map_inline:Nn \c__fontscale_names_tl
+ {
+ \prop_get:cnN { l_fontscale_##1_prop } { step } \l__fontscale_step_tl
+ \prop_get:cnN { l_fontscale_##1_prop } { scale } \l__fontscale_scale_tl
+ \token_to_str:c {##1} \@ \c_colon_str \c_space_tl
+ step ~=~ \l__fontscale_step_tl ,~
+ scale ~=~ \l__fontscale_scale_tl ,~
+ size ~=~ \dim_use:c { l_fontscale_##1_size_dim } ,~
+ baselineskip ~=~ \skip_use:c { l_fontscale_##1_baselineskip_skip }
+ \str_if_eq:nnF {##1} { Huge } { \newline }
+ }
+ }
+
+\NewDocumentCommand \PrintSampleText
+ { s O
+ {
+ The~ \texttt { fontscale }~ package \c_colon_str \c_space_tl
+ A~ user~ interface~ for~ setting~ document~ font~ sizes
+ }
+ }
+ {
+ \IfBooleanTF #1
+ { \__fontscale_print_sample_text_descending_order:n {#2} }
+ { \__fontscale_print_sample_text_ascending_order:n {#2} }
+ }
+\cs_new_protected:Npn \__fontscale_print_sample_text_ascending_order:n #1
+ {
+ { \tiny #1 \par }
+ { \scriptsize #1 \par }
+ { \footnotesize #1 \par }
+ { \small #1 \par }
+ { \normalsize #1 \par }
+ { \large #1 \par }
+ { \Large #1 \par }
+ { \LARGE #1 \par }
+ { \huge #1 \par }
+ { \Huge #1 \par }
+ }
+\cs_new_protected:Npn \__fontscale_print_sample_text_descending_order:n #1
+ {
+ { \Huge #1 \par }
+ { \huge #1 \par }
+ { \LARGE #1 \par }
+ { \Large #1 \par }
+ { \large #1 \par }
+ { \normalsize #1 \par }
+ { \small #1 \par }
+ { \footnotesize #1 \par }
+ { \scriptsize #1 \par }
+ { \tiny #1 \par }
+ }
+
+\NewDocumentCommand \PrintFontSizeCommand { } { \__fontscale_print_name: }
+\cs_new_protected:Npn \__fontscale_print_name:
+ {
+ \dim_case:nnF { \f@size pt }
+ {
+ { \l_fontscale_tiny_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_tiny_baselineskip_skip }
+ { \token_to_str:N \tiny } { UNDEFINED \@ }
+ }
+ { \l_fontscale_scriptsize_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_scriptsize_baselineskip_skip }
+ { \token_to_str:N \scriptsize } { UNDEFINED \@ }
+ }
+ { \l_fontscale_footnotesize_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_footnotesize_baselineskip_skip }
+ { \token_to_str:N \footnotesize } { UNDEFINED \@ }
+ }
+ { \l_fontscale_small_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_small_baselineskip_skip }
+ { \token_to_str:N \small } { UNDEFINED \@ }
+ }
+ { \l_fontscale_normalsize_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_normalsize_baselineskip_skip }
+ { \token_to_str:N \normalsize } { UNDEFINED \@ }
+ }
+ { \l_fontscale_large_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_large_baselineskip_skip }
+ { \token_to_str:N \large } { UNDEFINED \@ }
+ }
+ { \l_fontscale_Large_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_Large_baselineskip_skip }
+ { \token_to_str:N \Large } { UNDEFINED \@ }
+ }
+ { \l_fontscale_LARGE_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_LARGE_baselineskip_skip }
+ { \token_to_str:N \LARGE \@ } { UNDEFINED \@ }
+ }
+ { \l_fontscale_huge_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_huge_baselineskip_skip }
+ { \token_to_str:N \huge } { UNDEFINED \@ }
+ }
+ { \l_fontscale_Huge_size_dim }
+ {
+ \skip_if_eq:nnTF { \f@baselineskip }
+ { \l_fontscale_Huge_baselineskip_skip }
+ { \token_to_str:N \Huge } { UNDEFINED \@ }
+ }
+ }
+ { UNDEFINED \@ }
+ }
+
+% TEXT PURIFY
+
+\cs_new:Npn \__fontscale_text_purify_equivalent:n #1
+ {
+ \bool_lazy_all:nT
+ {
+ { \tl_if_single_p:n {#1} }
+ { \tl_if_single_token_p:n #1 }
+ { \token_if_eq_meaning_p:NN #1 * }
+ }
+ { \use_none:n }
+ }
+\text_declare_purify_equivalent:Nn \SetFontStep
+ { \__fontscale_text_purify_equivalent:n }
+\text_declare_purify_equivalent:Nn \SetFontScale
+ { \__fontscale_text_purify_equivalent:n }
+\text_declare_purify_equivalent:Nn \SetFontSize
+ { \__fontscale_text_purify_equivalent:n }
+\text_declare_purify_equivalent:Nn \ScaleFont { \use_none:n }
\text_declare_purify_equivalent:Nn \SetFontSizeBaselineskip { \use_none:nn } \ No newline at end of file
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 87c775ca83..38db79ac18 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.3.14] - 2024-04-15
+
+### Fixed
+- Extension of multiple uncertainties when main value is less precise (see
+ issue [\#727](https://github.com/josephwright/siunitx/issues/727))
+
## [v3.3.13] - 2024-04-12
### Fixed
@@ -339,7 +345,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
- Options `digit-group-size`, `digit-group-first-size` and
`digit-group-other-size` to control digit grouping
- Options `display-per-mode` and `inline-per-mode` to offer additional
- flexiblity in `per-mode` control
+ flexibility in `per-mode` control
- Option `per-symbol-script-correction`
- Option `power-half-as-sqrt`
- Option `retain-negative-zero`
@@ -1396,7 +1402,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
- Allow for `bidi`/RTL when applying `\text`
- Search-and-replace in UTF-8 literal units
- Load binary-units only when requested (issue [\#201](https://github.com/josephwright/siunitx/issues/201))
-- Disable `\hightlight` in bookmarks (issue [\#207](https://github.com/josephwright/siunitx/issues/207))
+- Disable `\highlight` in bookmarks (issue [\#207](https://github.com/josephwright/siunitx/issues/207))
## [v2.5l] - 2012-11-21
@@ -2086,7 +2092,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.13...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.14...HEAD
+[v3.3.14]: https://github.com/josephwright/siunitx/compare/v3.3.13...v3.3.14
[v3.3.13]: https://github.com/josephwright/siunitx/compare/v3.3.12...v3.3.13
[v3.3.12]: https://github.com/josephwright/siunitx/compare/v3.3.11...v3.3.12
[v3.3.11]: https://github.com/josephwright/siunitx/compare/v3.3.10...v3.3.11
diff --git a/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx b/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
index f123546389..9d99fed92e 100644
--- a/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
@@ -40,7 +40,7 @@
% \GetFileInfo{siunitx.sty}
%
% \title{^^A
-% \pkg{siunitx-abbreviations} -- Abbreviatons^^A
+% \pkg{siunitx-abbreviations} -- Abbreviations^^A
% \thanks{This file describes \fileversion,
% last revised \filedate.}^^A
% }
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index cf00251427..7c2b6e2b65 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index cfa4a03e25..2b87514375 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -1117,9 +1117,11 @@
% }
% \begin{macro}[EXP]
% {\@@_parse_combine_uncert:nnnnnn, \@@_parse_combine_uncert:ennnnn}
+% \begin{macro}[EXP]{\@@_parse_combine_uncert_aux:nn}
% \begin{macro}[EXP]
% {\@@_parse_combine_uncert:nnnnnnn, \@@_parse_combine_uncert:ennnnnn}
-% \begin{macro}[EXP]{\@@_parse_combine_uncert:nnnnn}
+% \begin{macro}[EXP]
+% {\@@_parse_combine_uncert:nnnnn, \@@_parse_combine_uncert:nnenn}
% \begin{macro}[EXP]
% {
% \@@_parse_combine_uncert_aux:nnnn ,
@@ -1196,11 +1198,16 @@
{#3} {#4} {#5} {#6} { #7 #1 }
}
{
- \@@_parse_combine_uncert:nnnnn
- { #3 #1 } {#4} {#5} {#6} {#7}
+ \@@_parse_combine_uncert:nnenn { #3 #1 } {#4}
+ {
+ \tl_map_tokens:nn {#5}
+ { \@@_parse_combine_uncert_aux:nn {#1} }
+ }
+ {#6} {#7}
}
}
\cs_generate_variant:Nn \@@_parse_combine_uncert:nnnnnnn { e }
+\cs_new:Npn \@@_parse_combine_uncert_aux:nn #1#2 { {#2#1} }
% \end{macrocode}
% We now ensure that the decimal part is never entirely blank \emph{if} there
% are decimal-part uncertainty digits. There is also a need to handle the
@@ -1224,6 +1231,7 @@
{#2}
{#3}
}
+\cs_generate_variant:Nn \@@_parse_combine_uncert:nnnnn { nne }
\cs_new:Npn \@@_parse_combine_uncert_aux:nnnn #1#2#3#4
{
\@@_parse_combine_uncert_loop:neennnn
@@ -1282,6 +1290,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_parse_comparator:}
% \begin{macro}{\@@_parse_comparator_aux:Nw}
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 2c9c1efb13..a7fd28e8bc 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -272,7 +272,7 @@
% \end{variable}
%
% \begin{variable}{\l_siunitx_unit_fraction_tl}
-% The fraction function which is applied whne constructing fractional units:
+% The fraction function which is applied when constructing fractional units:
% set by |fraction-command|.
% \end{variable}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 0d79cd5fde..34a38b864a 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2024-04-12} {3.3.13}
+\ProvidesExplPackage {siunitx} {2024-04-15} {3.3.14}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 8bd9cefb62..15e5ab256a 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/tugboat/NEWS b/macros/latex/contrib/tugboat/NEWS
index 2ee5014884..2d5c0f52fa 100644
--- a/macros/latex/contrib/tugboat/NEWS
+++ b/macros/latex/contrib/tugboat/NEWS
@@ -1,7 +1,19 @@
-$Id: NEWS 533 2023-10-28 22:40:31Z karl $
+$Id: NEWS 560 2024-04-15 17:16:18Z karl $
This file records noteworthy changes. This file is public domain.
-----------------
+2.32 (2023-04-15):
+ltugboat.cls:
+- don't print leading http://.
+- increase natural space, stretch, shrink after run-in heads; before,
+ \frenchspacing was unintentionally in effect.
+- decrease \floatsep and \textfloatsep to go along with reduced
+ \abovecaption skip; increase topnumber, bottomnumber, totalnumber,
+ to further avoid going to a float page so soon.
+- allow some flexibility in glue below title.
+- new abbreviation \YAML.
+
+-----------------
2.31 (2023-10-28):
ltugboat.cls:
- input our hyphenation exceptions (ushyphex.tex) if available.
diff --git a/macros/latex/contrib/tugboat/ltubguid.ltx b/macros/latex/contrib/tugboat/ltubguid.ltx
index 4f06882574..defb17277a 100644
--- a/macros/latex/contrib/tugboat/ltubguid.ltx
+++ b/macros/latex/contrib/tugboat/ltubguid.ltx
@@ -1,4 +1,4 @@
-% $Id: ltubguid.ltx 529 2023-10-27 16:32:42Z karl $
+% $Id: ltubguid.ltx 557 2024-03-31 15:56:24Z karl $
% ltubguid.ltx - documentation for ltugboat classes.
%
% Copyright 1994-2023 TeX Users Group.
@@ -761,7 +761,7 @@ We've found that this is not confusing in practice. To enable this and
\begin{verbatim}
\usepackage[hyphens]{url}
-\usepackage[hidelinks,pdfa]{hyperref}
+\usepackage[hidelinks]{hyperref}
\end{verbatim}
\subsubsection{Url footnotes}
diff --git a/macros/latex/contrib/tugboat/ltubguid.pdf b/macros/latex/contrib/tugboat/ltubguid.pdf
index 7b6b3231f1..68ceecfb08 100644
--- a/macros/latex/contrib/tugboat/ltubguid.pdf
+++ b/macros/latex/contrib/tugboat/ltubguid.pdf
Binary files differ
diff --git a/macros/latex/contrib/tugboat/tugboat-code.pdf b/macros/latex/contrib/tugboat/tugboat-code.pdf
index 09edcef396..2f928019ca 100644
--- a/macros/latex/contrib/tugboat/tugboat-code.pdf
+++ b/macros/latex/contrib/tugboat/tugboat-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tugboat/tugboat.bst b/macros/latex/contrib/tugboat/tugboat.bst
index 0c507119b7..ce1a5c3476 100644
--- a/macros/latex/contrib/tugboat/tugboat.bst
+++ b/macros/latex/contrib/tugboat/tugboat.bst
@@ -1,4 +1,4 @@
-%%% $Id: tugboat.bst 529 2023-10-27 16:32:42Z karl $
+%%% $Id: tugboat.bst 557 2024-03-31 15:56:24Z karl $
%%% TUGboat changes are public domain.
%%%
%%% Modified for TUGboat from abbrvurl.bst:
@@ -194,6 +194,8 @@ FUNCTION {output.nonnull.original}
{ 's :=
output.state mid.sentence =
{ last.output.check "journal" = not
+ journal missing$
+ or
{ ", " * } % not a journal, normal comma+space separator
{ journal "TUGboat" = journal "\TUB" = or
{ skip$ } % TUGboat, no comma
diff --git a/macros/latex/contrib/tugboat/tugboat.dtx b/macros/latex/contrib/tugboat/tugboat.dtx
index 2a98a67ffc..ea24059825 100644
--- a/macros/latex/contrib/tugboat/tugboat.dtx
+++ b/macros/latex/contrib/tugboat/tugboat.dtx
@@ -1,8 +1,8 @@
% \iffalse (this is a meta-comment (so they say))
-% $Id: tugboat.dtx 533 2023-10-28 22:40:31Z karl $
+% $Id: tugboat.dtx 560 2024-04-15 17:16:18Z karl $
% tugboat.dtx - main source for LaTeX TUGboat classes.
%
-% Copyright 1994-2023 TeX Users Group.
+% Copyright 1994-2024 TeX Users Group.
%
% This file is part of the tugboat package.
%
@@ -28,7 +28,7 @@
%<ltugboatsty>\ProvidesPackage{ltugboat}
%<ltugprocsty>\ProvidesPackage{ltugproc}
%<ltugcomn> \ProvidesPackage{ltugcomn}
- [2023-10-28 v2.31
+ [2024-04-15 v2.32
%<ltugboatcls> TUGboat journal class%
%<ltugproccls> TUG conference proceedings class%
%<ltugboatsty|ltugprocsty> TUG compatibility package%
@@ -40,8 +40,8 @@
% \end{macrocode}
%
% \iffalse
-%
-% Note that the version control Id above relates to the number of times
+%
+% The version control Id above relates to the number of times
% the file has been checked-in, which relates to a development process
% taking place on several machines, rather than the incidence of
% significant change; the definitive version number is that in the
@@ -718,6 +718,7 @@
\def\CMkIV{\ConTeXt\ \MkIV}
\def\Cplusplus{C\plusplus}
\def\plusplus{\raisebox{.7ex}{$_{++}$}}
+% consider rm vs. bold + tb139may-automata.ltx
\def\CPU{\acro{CPU}}
\def\CSczabbr{\ensuremath{\cal C}\kern-.1667em\lower.5ex\hbox{$\cal S$}}
\def\CSS{\acro{CSS}}
@@ -931,6 +932,7 @@
\def\WEB{\texttt{WEB}\@}
\def\WEAVE{\texttt{WEAVE}\@}
\def\WYSIWYG{\acro{WYSIWYG}}
+\def\YAML{\acro{YAML}}
% \end{macrocode}
%
% Xe\TeX{} requires reflecting the first E, hence we complain if the
@@ -1286,9 +1288,15 @@
\ensuremath{\rangle}%
}
%
-% Use \tt rather than \texttt because italic typewriter is just too ugly,
+% Use \tt rather than \texttt because italic typewriter is just too strange
% and upright works well enough in both italic and bold contexts.
-% Would be nice to change catcode of _ for LaTeX3.
+% Would be nice to change catcode of _ for \LaTeX3, but we don't.
+%
+% By the way, it would be possible to substitute typewriter slanted for
+% typewriter italic in general:
+% \url{https://tex.stackexchange.com/questions/692277}.
+% But it feels like that is too intrusive a change, even though in
+% practice we always prefer tt slanted.
\DeclareRobustCommand{\cs}[1]{\texorpdfstring
{{\tt \char`\\#1}}%
{\textbackslash #1}%
@@ -1370,11 +1378,13 @@
\str_set:Nn\l_tmpa_str{#1}
\str_if_in:NnTF \l_tmpa_str {http://}
{
- \expandafter\hyper@linkurl
- \expandafter{\expandafter\Hurl\expandafter{\l_tmpa_str}}{\l_tmpa_str}
+ \tbhurl@{#1} % if http, redirect to remove protocol
+ % this version prints the http, as we originally thought was better.
+ % \expandafter\hyper@linkurl
+ % \expandafter{\expandafter\Hurl\expandafter{\l_tmpa_str}}{\l_tmpa_str}
}
{
- \str_remove_once:Nn\l_tmpa_str{https://}
+ \str_remove_once:Nn \l_tmpa_str {https://}
\expandafter\hyper@linkurl
\expandafter{\expandafter\Hurl\expandafter{\l_tmpa_str}}
{https://\l_tmpa_str}
@@ -1383,7 +1393,7 @@
\def\tbhurl@#1 % http
{
\str_set:Nn\l_tmpa_str{#1}
- \str_remove_once:Nn\l_tmpa_str{http://}
+ \str_remove_once:Nn \l_tmpa_str {http://}
\expandafter\hyper@linkurl\expandafter{\expandafter\Hurl\expandafter
{\l_tmpa_str}}{http://\l_tmpa_str}
}
@@ -1395,10 +1405,10 @@
\def\tbsurlfootnote#1{\footnote{\raggedright\tbsurl{#1}}}
\def\tbhurlfootnote#1{\footnote{\raggedright\tbhurl{#1}}}
%
-% Close up space between footnote mark and punctuation ("pre-punctuation").
+% Close up space between footnote mark and punctuation (``pre-punctuation'').
\DeclareRobustCommand{\tbppkernfoot}{\tubthinnerspace}
-% Make \! work in text mode.
+% Make \! work in text mode, for older LaTeX.
\DeclareRobustCommand{\!}{\ifmmode\mskip-\thinmuskip \else\kern-0.16667em \fi}
%
% Half a thinspace, positive and negative. Should have named these
@@ -2457,14 +2467,21 @@
% the essentially useless functionality of being able to change them
% using assignment, which I'm not about to struggle with just now...
%
-% \cs{AboveTitleSkip} and \cs{BelowTitleSkip} are what you'd expect;
+% \cs{AboveTitleSkip} is glue above the article title;
+% \cs{BelowTitleSkip} is glue below the authors in the title block.
% \cs{strulethickness} is the value to use for \cs{fboxrule} when
% setting the title, and for the rule above titles when there is no box.
%
+% For \cs{BelowTitleSkip}, add some stretch and shrink since the first
+% column of an article often needs it; otherwise, a first column of all
+% text will come out underfull. Use |plus2pt| since that is the same
+% as the glue above sections, but |minus1pt| since we'd usually prefer
+% to shrink somewhere else if possible.
+%
% \begin{macrocode}
-\newskip\AboveTitleSkip \AboveTitleSkip=12\p@
-\newskip\BelowTitleSkip \BelowTitleSkip=8\p@
-\newdimen\strulethickness \strulethickness=.6\p@
+\newskip\AboveTitleSkip \AboveTitleSkip=12pt
+\newskip\BelowTitleSkip \BelowTitleSkip=8pt plus2pt minus1pt
+\newdimen\strulethickness \strulethickness=.6pt
% \end{macrocode}
%
% \cs{@sectitle} actually generates the section title (in a rather
@@ -2571,7 +2588,9 @@
\else
% \end{macrocode}
% Since we have \(\mathtt{\cs{BelowTitleSkip}} + \mathtt{4pt} =
-% \mathtt{\cs{baselineskip}}\), we say:
+% \mathtt{\cs{baselineskip}}\), we skip by |4pt| here. However, an
+% all-text first column still comes out underfull, maybe because of the
+% top rule? Thus \cs{BelowTitleSkip} is given a little stretch and shrink.
% \begin{macrocode}
\nobreak \vskip 4\p@
{%
@@ -2653,66 +2672,80 @@
%
% The \cs{tubsecfmt} macro defines our standard formatting for section
% titles: ragged right, french spacing, no hyphenation.
+% The \cs{tubruninsecfmt} macro is the simpler form for run-in section
+% headings (when the afterskip is negative), with the afterskip glue
+% given by \cs{tubruninglue}.
% The \cs{tubsechook} macro allows overriding the defaults.
%
% \begin{macrocode}
\def\tubsechook{}
\def\tubsecfmt{\normalsize\bf\raggedright\frenchspacing\nohyphens\tubsechook}
+\def\tubruninglue{-1em plus-2\fontdimen3\font minus-\fontdimen4\font}
+\def\tubruninsecfmt{\normalsize\bf\tubsechook}
%
\if@numbersec
- \def\section{\TB@startsection{{section}%
- 1%
- \z@
- {-8\p@ \@plus-2\p@ \@minus-2\p@}%
- {4\p@}%
- {\tubsecfmt}}}
- \def\subsection{\TB@startsection{{subsection}%
- 2%
- \z@
- {-8\p@ \@plus-2\p@ \@minus-2\p@}%
- {4\p@}%
- {\tubsecfmt}}}
- \def\subsubsection{\TB@startsection{{subsubsection}%
- 3%
- \z@
- {-8\p@ \@plus-2\p@ \@minus-2\p@}%
- {4\p@}%
- {\tubsecfmt}}}
- \def\paragraph{\TB@startsection{{paragraph}%
- 4%
- \z@
- {4\p@ \@plus1\p@ \@minus1\p@}%
- {-1em}%
- {\normalsize\bf\tubsechook}}}
-% \end{macrocode}
-%
-% Now the version if class option \textsc{nonumber} is in effect,
+ \def\section{\TB@startsection{%
+ {section} % name of counter
+ {1} % level
+ {0pt} % indent
+ {-8pt plus-2pt minus-2pt} % beforeskip; negative -> \noindent after
+ {4pt} % afterskip; negative -> hspace for run-in
+ {\tubsecfmt}}} % style
+ %
+ \def\subsection{\TB@startsection{%
+ {subsection}%
+ 2%
+ \z@
+ {-8\p@ \@plus-2\p@ \@minus-2\p@}%
+ {4\p@}%
+ {\tubsecfmt}}}
+ %
+ \def\subsubsection{\TB@startsection{%
+ {subsubsection}%
+ 3%
+ \z@
+ {-8\p@ \@plus-2\p@ \@minus-2\p@}%
+ {4\p@}%
+ {\tubsecfmt}}}
+ %
+ \def\paragraph{\TB@startsection{%
+ {paragraph}%
+ 4%
+ \z@
+ {4\p@ \@plus1\p@ \@minus1\p@}%
+ {\tubruninglue}
+ {\tubruninsecfmt}}}
+% \end{macrocode}
+%
+% Now the version if class option \texttt{nonumber} is in effect,
% i.e., if \cs{if@numbersec} is false.
%
% \begin{macrocode}
\else
\setcounter{secnumdepth}{0}
- \def\section{\TB@nolimelabel
- \TB@startsection{{section}%
- 1%
- \z@
- {-8\p@ \@plus-2\p@ \@minus-2\p@}%
- {4\p@}%
- {\tubsecfmt}}}
- \def\subsection{\TB@nolimelabel
- \TB@startsection{{subsection}%
- 2%
- \z@
- {-8\p@ \@plus-2\p@ \@minus-2\p@}%
- {-0.5em\@plus-\fontdimen3\font}%
- {\tubsecfmt}}}
- \def\subsubsection{\TB@nolimelabel
- \TB@startsection{{subsubsection}%
- 3%
- \parindent
- {-8\p@ \@plus-2\p@ \@minus-2\p@}%
- {-0.5em\@plus-\fontdimen3\font}%
- {\tubsecfmt}}}
+ \def\section{\TB@nolimelabel\TB@startsection{%
+ {section}% same as numbeed
+ 1%
+ \z@
+ {-8\p@ \@plus-2\p@ \@minus-2\p@}%
+ {4\p@}%
+ {\tubsecfmt}}}
+ %
+ \def\subsection{\TB@nolimelabel\TB@startsection{%
+ {subsection}%
+ 2%
+ \z@
+ {-8\p@ \@plus-2\p@ \@minus-2\p@}%
+ {\tubruninglue}
+ {\tubruninsecfmt}}}
+ %
+ \def\subsubsection{\TB@nolimelabel\TB@startsection{
+ {subsubsection}%
+ 3%
+ \parindent
+ {-8\p@ \@plus-2\p@ \@minus-2\p@}%
+ {\tubruninglue}
+ {\tubruninsecfmt}}}
\fi
% \end{macrocode}
%
@@ -3075,7 +3108,23 @@
% Let's reduce the default space above captions a bit, and give it some
% flexibility. The default is |10pt|, which seems too much.
% \begin{macrocode}
-\setlength\abovecaptionskip{3pt plus2pt minus1pt}
+\setlength\abovecaptionskip{3pt plus1pt minus1pt}
+% \end{macrocode}
+%
+% Let's also reduce the space between floats, and between floats and text.
+% The |\dbl...| versions of these parameters are not used, even though
+% we're typesetting in double columns.
+% \begin{macrocode}
+\setlength\floatsep { 9pt plus3pt minus2pt} % default 12pt plus2pt minus2pt
+\setlength\textfloatsep{12pt plus4pt minus3pt} % default 20pt plus2pt minus4pt
+% \end{macrocode}
+%
+% We want to allow more floats at the top/bottom/everywhere on
+% a page; all depends on their content.
+% \begin{macrocode}
+\setcounter{bottomnumber}{2} % default 1
+\setcounter{topnumber}{4} % default 2
+\setcounter{totalnumber}{6} % default 3
% \end{macrocode}
%
% \subsection{Size changing commands}
@@ -3883,12 +3932,11 @@
% \begin{macrocode}
\gdef\nomarkfootnote#1#2{\begingroup
\def\thefootnote{}%
- % no period, please, also no fnmark.
+ % no period, please, also no fnmark. Also no hyperref warning.
\def\@makefntext##1{##1}%
\def\Hy@Warning##1{}%
\footnotetext{\noindent #1#2}%
- \endgroup
-}
+\endgroup}
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex/contrib/tugboat/tugboat.ins b/macros/latex/contrib/tugboat/tugboat.ins
index 7d2d450f2f..0fd52dac14 100644
--- a/macros/latex/contrib/tugboat/tugboat.ins
+++ b/macros/latex/contrib/tugboat/tugboat.ins
@@ -1,10 +1,10 @@
-% $Id: tugboat.ins 458 2023-01-16 18:44:30Z karl $
+% $Id: tugboat.ins 555 2024-01-24 17:27:21Z karl $
% tugboat.ins
%% This file will generate fast loadable files and documentation
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1994-2023 TeX Users Group.
+%% Copyright 1994-2024 TeX Users Group.
%%
%% This file is part of the tugboat package.
%%
diff --git a/macros/plain/contrib/tugboat/tubguide.pdf b/macros/plain/contrib/tugboat/tubguide.pdf
index 08ee36e297..18dc201945 100644
--- a/macros/plain/contrib/tugboat/tubguide.pdf
+++ b/macros/plain/contrib/tugboat/tubguide.pdf
Binary files differ
diff --git a/macros/plain/contrib/tugboat/tugboat.cmn b/macros/plain/contrib/tugboat/tugboat.cmn
index b51f03acd3..68ba0695f1 100644
--- a/macros/plain/contrib/tugboat/tugboat.cmn
+++ b/macros/plain/contrib/tugboat/tugboat.cmn
@@ -1,6 +1,6 @@
%% @texfile{
%% filename = "tugboat.cmn",
-%% copyright = "Copyright 1993-1996,2006,2008,2011-2023 TeX Users Group.
+%% copyright = "Copyright 1993-1996,2006,2008,2011-2024 TeX Users Group.
%% Unlimited copying and redistribution of this file
%% are permitted as long as this file is not
%% modified. Modifications (and redistribution of
@@ -19,7 +19,7 @@
%% definitions for abbreviations and logos that
%% appear in TUGboat."
%% }
-%% $Id: tugboat.cmn 534 2023-10-29 01:17:51Z karl $
+%% $Id: tugboat.cmn 561 2024-04-15 17:28:40Z karl $
% do nothing when reading this file a second time.
\ifx\tugboatcmn\undefined
@@ -29,8 +29,8 @@
\fi
\next
-\def\fileversion{v1.29}
-\def\filedate{2023-10-28}
+\def\fileversion{v1.30}
+\def\filedate{2024-04-15}
\message{File `TUGBOAT.CMN' \fileversion \space\space <\filedate>}
@@ -97,7 +97,7 @@
\ifx\tugstyloaded@\undefined\let\tugstyloaded@\plaintubstyle\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+% emacs-page
% ***** abbreviations and logos *****
%
@@ -219,7 +219,6 @@
\def\Thanh{H\`an~Th\^e\llap{\raise.5ex\hbox{\'{}}}~Th\`anh}
\def\TIFF{\acro{TIFF}}
\def\TikZ{Ti{\it k}Z}
-\def\TP{{\sl \TeX:\ The Program\/}}
\def\ttn{{\sl TTN}\spacefactor1000 }
\def\TTN{{\sl \TeX{} and TUG NEWS}\spacefactor1000 }
\def\tubfont{\sl} % redefined in other situations
@@ -259,7 +258,7 @@
\def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+% emacs-page
% ***** utility registers and definitions *****
%
@@ -743,7 +742,7 @@
\def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
-
+% emacs-page
% Some hyphenation exceptions, plus read our entire
% ushyphex.tex file if present -- unless \tubomithyphenations
% is defined, in which case do nothing (needed for tb*hyf.tex).
@@ -1024,6 +1023,8 @@ that may not be obvious. For full definitions, see real code above.
Version Date Changes
------- --------- ---------------------------------------------------
+1.30 15 Apr 24 remove duplicate \TP definition.
+
1.29 28 Oct 23 in \AllTeX, kern around ).
define \pdfTeX and \pdfLaTeX with italic corrections.
define \LMTX.
diff --git a/macros/plain/contrib/tugboat/tugboat.sty b/macros/plain/contrib/tugboat/tugboat.sty
index 529d8bf420..88f8d03662 100644
--- a/macros/plain/contrib/tugboat/tugboat.sty
+++ b/macros/plain/contrib/tugboat/tugboat.sty
@@ -1,6 +1,6 @@
%% @texfile{
%% filename = "tugboat.sty",
-%% copyright = "Copyright 1993,1999,2003,2006,2011-2023 TeX Users Group.
+%% copyright = "Copyright 1993,1999,2003,2006,2011-2024 TeX Users Group.
%% Unlimited copying and redistribution of this file
%% are permitted as long as this file is not
%% modified. Modifications (and redistribution of
@@ -18,11 +18,11 @@
%% for preparation of items in TUGboat, the
%% Communications of the TeX Users Group.",
%% }
-%% $Id: tugboat.sty 534 2023-10-29 01:17:51Z karl $
+%% $Id: tugboat.sty 561 2024-04-15 17:28:40Z karl $
\def\thistubstyle{plain}
-\def\fileversion{v1.29}
-\def\filedate{2023-10-28}
+\def\fileversion{v1.30}
+\def\filedate{2024-03-31}
% general items
@@ -504,7 +504,9 @@
%
% Macros so we can use the same code as tugboat.dtx.
\newif\iftubomitdoioption % explicit option when posting early
-\newif\iftubsecondcolstart % we'll add if ever needed for plain
+
+\newif\iftubsecondcolstart % when we splice, e.g., tb139wermuth-isdim
+\newdimen\tubcolwidthandgutter
\newif\iftubfinaloption % set in tugboat.dates
\def\tbsurl#1{{\tt #1}} % we don't try to have live urls in plain
\def\tbhurl#1{{\tt #1}} % we don't try to have live urls in plain
@@ -522,7 +524,7 @@
doi.org/\tubdoiprefix/\volno-\issno/\jobname}%
\scriptsize
\vskip\baselineskip
- \iftubsecondcolstart \moveright \tubcolwidthandgutter \fi
+ \iftubsecondcolstart \moveright\tubcolwidthandgutter \fi
\rlap{\expandafter\tbsurl\expandafter{\thedoi}}%
\vss
}%
@@ -1365,6 +1367,10 @@
\def\article{%
\@allowspanningfigsfalse
+ \iftubsecondcolstart % if splicing, start in col.2
+ \null\newcol % and set horizontal shift
+ \tubcolwidthandgutter=\colwd \advance\tubcolwidthandgutter by \intercolwd
+ \fi
\ifSecTitle \global\SecTitlefalse
\else \vskip\AboveTitleSkip
\kern\topskip
@@ -2243,6 +2249,8 @@
Version Date Changes
------- --------- ---------------------------------------------------
+1.30 15 Apr 24 implement \iftubsecondcolstart for tb139wermuth-isdim.
+
1.29 28 Oct 23 introduce \abovecaptionskipamount, reduce to \smallskip
a la ltugboat.