summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.dtx10
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.ins2
-rw-r--r--Master/texmf-dist/source/latex/babel/bbcompat.dtx2
-rw-r--r--Master/texmf-dist/source/latex/babel/locale.zipbin1088254 -> 1089081 bytes
-rw-r--r--Master/texmf-dist/source/latex/base/ltpara.dtx22
-rw-r--r--Master/texmf-dist/source/latex/base/ltvers.dtx2
-rw-r--r--Master/texmf-dist/source/latex/bib2qr/bib2qr.dtx594
-rw-r--r--Master/texmf-dist/source/latex/bib2qr/bib2qr.ins85
-rw-r--r--Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx90
-rw-r--r--Master/texmf-dist/source/latex/changebar/changebar.dtx158
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-article.dtx1038
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-en.dbj611
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-fr.dbj603
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-class.dbj39
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-english.mbs420
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-french.mbs370
-rw-r--r--Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-merlin.mbs8009
-rw-r--r--Master/texmf-dist/source/latex/colortbl/colortbl.dtx34
-rw-r--r--Master/texmf-dist/source/latex/delimset/delimset.dtx1202
-rw-r--r--Master/texmf-dist/source/latex/delimset/delimset.ins4
-rw-r--r--Master/texmf-dist/source/latex/doibanner/doibanner.dtx412
-rw-r--r--Master/texmf-dist/source/latex/doibanner/doibanner.ins85
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx424
-rw-r--r--Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx244
-rw-r--r--Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx27
-rw-r--r--Master/texmf-dist/source/latex/heria/heria.dtx151
-rw-r--r--Master/texmf-dist/source/latex/heria/heria.ins4
-rw-r--r--Master/texmf-dist/source/latex/hypcap/hypcap.dtx (renamed from Master/texmf-dist/source/latex/oberdiek/hypcap.dtx)73
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hluatex.dtx4
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx2
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx2
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.dtx9
-rw-r--r--Master/texmf-dist/source/latex/hyperref/xr-hyper.dtx2
-rw-r--r--Master/texmf-dist/source/latex/iwonamath/Makefile6
-rw-r--r--Master/texmf-dist/source/latex/iwonamath/iwonamath.dtx6
-rw-r--r--Master/texmf-dist/source/latex/lastpage/lastpage.drv13
-rw-r--r--Master/texmf-dist/source/latex/lastpage/lastpage.dtx179
-rw-r--r--Master/texmf-dist/source/latex/lastpage/lastpage.ins20
-rw-r--r--Master/texmf-dist/source/latex/lettrine/lettrine.dtx32
-rw-r--r--Master/texmf-dist/source/latex/lni/lni.dtx108
-rw-r--r--Master/texmf-dist/source/latex/mailing/mailing.dtx38
-rw-r--r--Master/texmf-dist/source/latex/mailing/mailing.ins42
-rw-r--r--Master/texmf-dist/source/latex/mathastext/mathastext.dtx5913
-rw-r--r--Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx2
-rw-r--r--Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx187
-rw-r--r--Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx19
-rw-r--r--Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx42
-rw-r--r--Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx58
-rw-r--r--Master/texmf-dist/source/latex/moremath/moremath.dtx5515
-rw-r--r--Master/texmf-dist/source/latex/moremath/moremath.ins66
-rw-r--r--Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx225
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/aliascnt.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/bmpsize.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/centernot.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/chemarr.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/classlist.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/colonequals.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/dvipscol.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/engord.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/enparen.dtx10
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/fibnum.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/flags.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx8
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hypgotoe.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/ifdraft.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/iflang.dtx8
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/oberdiek.ins4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/oberdiek.tex33
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdfcolparallel.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdfcolparcolumns.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pdfcrypt.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/resizegather.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/scrindex.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx6
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/settobox.dtx4
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/stackrel.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/stampinclude.dtx6
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/tabularht.dtx6
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/tabularkv.dtx2
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/thepdfnumber.dtx12
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/twoopt.dtx2
-rw-r--r--Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx91
-rw-r--r--Master/texmf-dist/source/latex/orcidlink/orcidlink.ins4
-rw-r--r--Master/texmf-dist/source/latex/overarrows/overarrows.dtx1142
-rw-r--r--Master/texmf-dist/source/latex/pdfx/pdfx.dtx1536
-rw-r--r--Master/texmf-dist/source/latex/pdfx/pdfx.ins4
-rw-r--r--Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx8728
-rw-r--r--Master/texmf-dist/source/latex/preview/preview.dtx14
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx4
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx49
-rw-r--r--Master/texmf-dist/source/latex/se2thesis/se2colors.dtx2
-rw-r--r--Master/texmf-dist/source/latex/se2thesis/se2fonts.dtx2
-rw-r--r--Master/texmf-dist/source/latex/se2thesis/se2packages.dtx2
-rw-r--r--Master/texmf-dist/source/latex/se2thesis/se2thesis.dtx87
-rw-r--r--Master/texmf-dist/source/latex/sillypage/sillypage.dtx34
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx1
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx2
-rw-r--r--Master/texmf-dist/source/latex/sjtutex/sjtutex.dtx31
-rw-r--r--Master/texmf-dist/source/latex/spelatex/spelatex.dtx462
-rw-r--r--Master/texmf-dist/source/latex/subeqn/subeqn.dtx57
-rw-r--r--Master/texmf-dist/source/latex/subeqn/subeqn.ins49
-rw-r--r--Master/texmf-dist/source/latex/subeqnarray/subeqnarray.dtx85
-rw-r--r--Master/texmf-dist/source/latex/subeqnarray/subeqnarray.ins56
-rw-r--r--Master/texmf-dist/source/latex/supertabular/supertabular.dtx323
-rw-r--r--Master/texmf-dist/source/latex/synthslant/Makefile133
-rw-r--r--Master/texmf-dist/source/latex/synthslant/synthslant.dtx752
-rw-r--r--Master/texmf-dist/source/latex/synthslant/synthslant.ins21
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx16
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx20
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx10
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx36
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx23
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx10
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx13
-rw-r--r--Master/texmf-dist/source/latex/telprint/telprint.dtx (renamed from Master/texmf-dist/source/latex/oberdiek/telprint.dtx)79
-rw-r--r--Master/texmf-dist/source/latex/texvc/Makefile17
-rw-r--r--Master/texmf-dist/source/latex/texvc/texvc.dtx48
-rw-r--r--Master/texmf-dist/source/latex/texvc/texvc.ins84
-rw-r--r--Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx46
-rw-r--r--Master/texmf-dist/source/latex/typog/Makefile183
-rw-r--r--Master/texmf-dist/source/latex/typog/typog.dtx3217
-rw-r--r--Master/texmf-dist/source/latex/typog/typog.ins30
-rw-r--r--Master/texmf-dist/source/latex/uantwerpendocs/uantwerpendocs.dtx20
-rw-r--r--Master/texmf-dist/source/latex/ulthese/ulthese.dtx2046
-rw-r--r--Master/texmf-dist/source/latex/ulthese/ulthese.ins43
-rw-r--r--Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx16
-rw-r--r--Master/texmf-dist/source/latex/ut-thesis/ut-thesis.ins21
137 files changed, 34889 insertions, 12162 deletions
diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx
index 6b6da6ed7cf..19db3457599 100644
--- a/Master/texmf-dist/source/latex/babel/babel.dtx
+++ b/Master/texmf-dist/source/latex/babel/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2024/06/02 v24.6 The Babel package]
+\ProvidesFile{babel.dtx}[2024/06/26 v24.7 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -5479,8 +5479,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=24.6>>
-%<<date=2024/06/02>>
+%<<version=24.7>>
+%<<date=2024/06/26>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -15351,8 +15351,8 @@ end
}}}&%
\bbl@foreach\babeltempb{&%
\bbl@forkv{{##1}}{&%
- \in@{,####1,}{,nil,step,data,remove,insert,string,no,pre,&%
- no,post,penalty,kashida,space,spacefactor,kern,node,after,}&%
+ \in@{,####1,}{,nil,step,data,remove,insert,string,no,pre,no,&%
+ post,penalty,kashida,space,spacefactor,kern,node,after,norule,}&%
\ifin@\else
\bbl@error{bad-transform-option}{####1}{}{}&%
\fi}}&%
diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins
index 70cf2a0be70..9c640a94cbe 100644
--- a/Master/texmf-dist/source/latex/babel/babel.ins
+++ b/Master/texmf-dist/source/latex/babel/babel.ins
@@ -26,7 +26,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
-\def\filedate{2024/06/02}
+\def\filedate{2024/06/26}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx
index e4d9db47084..d88b690b23a 100644
--- a/Master/texmf-dist/source/latex/babel/bbcompat.dtx
+++ b/Master/texmf-dist/source/latex/babel/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2024/06/02 v24.6]
+\ProvidesFile{bbcompat.dtx}[2024/06/26 v24.7]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip
index 10907ced5ca..f351a76a957 100644
--- a/Master/texmf-dist/source/latex/babel/locale.zip
+++ b/Master/texmf-dist/source/latex/babel/locale.zip
Binary files differ
diff --git a/Master/texmf-dist/source/latex/base/ltpara.dtx b/Master/texmf-dist/source/latex/base/ltpara.dtx
index f102d68e0d6..b9158564622 100644
--- a/Master/texmf-dist/source/latex/base/ltpara.dtx
+++ b/Master/texmf-dist/source/latex/base/ltpara.dtx
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpara.dtx}
- [2024/05/16 v1.0m LaTeX Kernel (paragraph hooks)]
+ [2024/06/23 v1.0n LaTeX Kernel (paragraph hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -819,6 +819,18 @@
\@@_handle_indent:
% \the \everypar % <--- done differently below
}
+% \end{macrocode}
+% \changes{v1.0n}{2024/06/23}
+% {Append \cs{everypar} toks to \cs{g_@@_standard_everypar_tl},
+% rollback 2023/06/01 (gh/1386)}
+% \begin{macrocode}
+%<latexrelease>\cs_set:Npn \@@_tmp:w #1#2#3#4#5 { }
+%<latexrelease>\tl_gput_right:Nx \g_@@_standard_everypar_tl {
+%<latexrelease> \exp_not:N \the
+%<latexrelease> \exp_not:N \toks
+%<latexrelease> \exp_after:wN \@@_tmp:w \token_to_meaning:N \everypar
+%<latexrelease> \c_space_tl
+%<latexrelease>}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2021/06/01}
%<latexrelease> {\g_@@_standard_everypar_tl}{minipage~ fix}
@@ -917,10 +929,10 @@
% the paragraph text starts.
% \begin{macrocode}
\tl_gput_right:Nx \g_@@_standard_everypar_tl {
- \exp_not:N \the
- \exp_not:N \toks
- \the \allocationnumber
- \c_space_tl
+ \exp_not:N \the
+ \exp_not:N \toks
+ \the \allocationnumber
+ \c_space_tl
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/base/ltvers.dtx b/Master/texmf-dist/source/latex/base/ltvers.dtx
index 557b7b4878b..15e662d843c 100644
--- a/Master/texmf-dist/source/latex/base/ltvers.dtx
+++ b/Master/texmf-dist/source/latex/base/ltvers.dtx
@@ -115,7 +115,7 @@
{2024-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{1}
+\def\patch@level{2}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
diff --git a/Master/texmf-dist/source/latex/bib2qr/bib2qr.dtx b/Master/texmf-dist/source/latex/bib2qr/bib2qr.dtx
new file mode 100644
index 00000000000..980c2002c22
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bib2qr/bib2qr.dtx
@@ -0,0 +1,594 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2024 Christian Schreinemachers
+%
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The current maintainer of this work is Christian Schreinemachers.
+%
+% This work consists of the files
+% README.md
+% bib2qr.dtx
+% bib2qr.ins
+% and the derived files
+% bib2qr.sty
+% bib2qr.pdf
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{bib2qr}
+%<package> [2024-07-31 v0.2 Cite BibTeX entries with QR codes]
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage[toc]{multitoc}
+\usepackage{geometry}
+\usepackage{fancyvrb}
+% Declare example reference entries
+\begin{filecontents}[overwrite]{example-references.bib}
+ @software{bib2qr,
+ author = {Schreinemachers, Christian},
+ title = {bib2qr - A LaTeX package for citing BibTeX entries with QR codes},
+ url = {https://codeberg.org/Cs137/bib2qr/releases/tag/v0.2},
+ version = {v0.2},
+ date = {2024-07-31}
+ }
+ @article{Doe2024,
+ author = {Doe, Jane},
+ title = {A comprehensive study on example generation},
+ journal = {Journal of Examples},
+ year = {2024},
+ volume = {42},
+ pages = {1982--2024},
+ doi = {10.1234/example.2024.001}
+ }
+ @article{Mustermann2023,
+ author = {Mustermann, Erika},
+ title = {Limitations in including electronic references in articles},
+ journal = {Journal of Examples},
+ year = {2023},
+ volume = {23},
+ pages = {624--666}
+ }
+\end{filecontents}
+\usepackage[style=authoryear,sorting=none]{biblatex}
+\addbibresource{example-references.bib}
+\usepackage[%
+ pdfusetitle,%
+ hyperindex=false,%
+ pdfsubject={LaTeX package documentation},%
+ pdfkeywords={bib2qr, biblatex, latex, qrcode, documentation}%
+]{hyperref}
+\usepackage{scrextend}
+\usepackage{cleveref}
+\usepackage[qrwidth=1.25cm]{bib2qr}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\DoNotIndex{\begin,\DeclareBibliographyDriver,\DeclareCiteCommand,\DeclareFieldFormat,
+ \DeclareKeys,\dimexpr,\edef,\end,\equal,\fullcite,\hspace,\IfBeginWith,
+ \ifboolexpr,\iffieldundef,\ifthenelse,\linewidth,\multicitedelim,
+ \NewDocumentCommand,\newcommand,\noindent,\par,\parindent,\printfield,
+ \ProcessKeyOptions,\qrcode,\RequirePackage,\relax,\SetKeys,\space,
+ \thefield,\usebibmacro,\usedriver}
+\setcounter{IndexColumns}{2}
+\setlength{\IndexMin}{40ex}
+\setlength{\columnseprule}{.4pt}
+\addtolength{\oddsidemargin}{2cm}
+\addtolength{\textwidth}{-2cm}
+\begin{document}
+ \DocInput{bib2qr.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \pagestyle{headings}
+%
+% \newcommand*{\package}[1]{\textsf{#1}}
+% \newcommand*{\ctanpkg}[1]{\href{https://ctan.org/pkg/#1}{\package{#1}}}
+% \newcommand*{\opt}[1]{\texttt{#1}}
+% \newcommand*{\default}[1]{(default: \opt{#1})}
+%
+%
+% ^^A -----------------------------
+%
+% \changes{v0.2}{2024-07-31}{%
+% Initial release,
+% convert into dtx,
+% add documentation,
+% rename internal macros,
+% add \opt{qrdelimiter} option
+% }
+% \changes{v0.1}{2024/06/16}{Initial version}
+%
+% \GetFileInfo{bib2qr.sty}
+%
+%
+% ^^A -----------------------------
+%
+% \title{The \package{bib2qr} package}
+% \author{Christian Schreinemachers}
+% \date{%
+% Released \filedate\thanks{%
+% \package{bib2qr}~\fileversion
+% ~(\href{https://codeberg.org/Cs137/bib2qr/releases/tag/\fileversion}{source code})}%
+% }
+% \maketitle
+%
+%
+% ^^A -----------------------------
+%
+% \begingroup
+% \hypersetup{
+% linkcolor=.,
+% citecolor=.,
+% urlcolor=.,
+% }
+% \begin{abstract}
+% The \package{bib2qr} package provides functionality to cite BibTeX entries
+% with QR codes for easy sharing and referencing. The target of the QR code
+% is the entry's digital object identifier (DOI), or URL if no DOI exists.
+% It is realised in the \cs{qrcite} macro, via the \LaTeX{} packages
+% \package{biblatex} and \package{qrcode}. In addition to the \cs{qrcite}
+% command, the package contains the \cs{qrfullcite} macro, which requires
+% only a BibTeX key as argument and allows to generate output that might
+% look as follows:\\
+% \textcolor{red}{\qrfullcite[noindent]{bib2qr}}
+% \end{abstract}
+% \endgroup
+%
+%
+% ^^A -----------------------------
+%
+% \tableofcontents
+%
+%
+% ^^A -----------------------------
+%
+% \section{Introduction}
+% ^^A
+% I like to include \href{https://en.wikipedia.org/wiki/QR_code}{quick-response (QR) codes}
+% of references on slides created with \LaTeX{} \ctanpkg{beamer}. Previously,
+% I did this by using the \ctanpkg{qrcode} package and manually declaring the
+% URL of the reference's digital object identifier (DOI). Occasionally, I also
+% add human-readable information generated via \cs{fullcite} from the
+% \ctanpkg{biblatex} package.
+%
+% To avoid manually declaring the URL and calling two separate commands for QR
+% codes and human-readable citations, I developed this \LaTeX{} package. It
+% automates the inclusion of QR codes by a \package{biblatex} bibliography
+% driver\footnote{%
+% \href{http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf\#page=166}
+% {\package{biblatex} documentation p.\,166 (v3.20)}%
+% },
+% which uses field formats to display QR codes for the entry's \opt{doi}
+% and \opt{url} fields with the \package{qrcode} package. You can cite any
+% reference from your bibliography with this driver by declaring its \meta{key}
+% to the \cs{qrcite} command. The latter is a cite command\footnote{%
+% \href{http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf\#page=186}%
+% {\package{biblatex} documentation p.\,186 (v3.20)}%
+% \label{biblatexCiteCommand}%
+% },
+% which ensures that any referenced QR code is also listed in the reference list.
+%
+% For the inclusion of both, QR codes and human-readable citation information
+% in a single step, I introduced the \cs{qrfullcite} command. It applies the
+% \cs{qrcite} command and the \cs{fullcite} command from the \package{biblatex}
+% package, ensuring clarity and ease of reference not only on \package{beamer}
+% slides, but in any \LaTeX{} document.
+%
+%
+% ^^A -----------------------------
+%
+% \section{Usage}
+% ^^A
+% Load the package in your document's preamble and specify any of the
+% options described in the next subsection as follows:
+%
+% \begin{quote}
+% \cs{usepackage}\oarg{option(s)}\{bib2qr\}
+% \end{quote}
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Options}
+% ^^A
+% In order to change the default behaviour of this package, declare one
+% or more of the options described in this subsection with your desired
+% value.
+%
+% \begin{description}
+%
+% \item[\opt{doiurlbase=\meta{string}}] \default{https://doi.org/}
+% specifies the prefix to convert a DOI string into its URL. If the DOI
+% string starts with \meta{doiurlbase}, it is used as is to generate a
+% QR code. Otherwise, the DOI string is appended to \meta{doiurlbase} to
+% form the DOI's URL, which is then used to generate the QR code.
+% In normal use cases this option does not require any adjustment.
+%
+% \item[\opt{qrdelimiter=\meta{sepcode}}] \default{\cs{space}}
+% specifies the delimiter of QR codes generated by \cs{qrcite} in multicite
+% mode. It is shown between the individual QR codes of multiple references
+% created by \cs{qrcite}\marg{key1,key2,\dots keyN} and \emph{``\dots is
+% arbitrary code to be executed after each iteration...''}\,\footref{biblatexCiteCommand}.
+% The examples shown in this document were generated considering the
+% default \opt{qrdelimiter}.
+%
+% \item[\opt{qrversion=\meta{version specification}}] \default{0}
+% sets the version of the QR code. Consult the \package{qrcode} documentation
+% for details about the \meta{version specification}\footnote{%
+% \href{http://mirrors.ctan.org/macros/latex/contrib/qrcode/qrcode.pdf\#page=3}
+% {\package{qrcode} documentation p.\,3 (v1.51)}%
+% }.
+% The examples shown in this document were generated considering the
+% default \opt{qrversion}.
+%
+% \item[\opt{qrwidth=\meta{dimen}}] \default{2cm}
+% sets the width of the QR code. The value is used to determine the
+% width for the output of the \cs{fullcite} macro and is passed to
+% \package{qrcode} as \opt{height} option. The default value is quite
+% suitable for usage in \LaTeX{} \package{beamer} slides, but in such
+% documents as this one, a smaller width might be desired. The examples
+% shown in this document were generated using \opt{qrwidth=1.25cm}.
+%
+% \end{description}
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Macros}
+% ^^A
+% \subsubsection*{\cs{qrcite}\marg{key(s)}}
+%
+% \DescribeMacro{\qrcite}
+% QR code(s) with a link to the reference's DOI or URL can be generated
+% using the \cs{qrcite} command. The target of the QR code is the entry's
+% DOI converted into a URL, or the URL iteself. In case the BibTeX entry has
+% no DOI and no URL, it does nothing besides raising a warning.
+% ^^A
+% The output for some example entries is shown underneath. If you
+% would like to replicate the examples, you can find the entries
+% sources as \cref{ssec:example_bib}. The colours are defined in the
+% examples, as this functionality is out of scope of the package
+% \package{bib2qr}. Moreover, \package{hyperlink} is configured in such
+% a way that the links in the following examples consider the font colour,
+% usually links would be presented in the colour defined as \opt{linkcolor}.
+%
+% The example displayed in blue was created via \textcolor{blue}{%
+% \cs{qrcite\{bib2qr\}}}. The QR code in red next to it was generated
+% via \textcolor{red}{\cs{qrcite\{Doe2024\}}}. The entry of the latter has a
+% DOI, while the entry of the blue example represents a BibTeX entry without
+% a DOI, but there is a value assigned to its URL field.
+% ^^A
+% The macro \cs{qrcite} is a cite command, thus it can be used to cite multiple
+% references, as shown in black (\cs{qrcite\{bib2qr,Doe2024\}}), and entries
+% cited via \cs{qrcite} are included in the document's bibliography
+% (cf. \cref{ssec:example_ref}).
+%
+% \begingroup
+% \hypersetup{
+% linkcolor=.,
+% citecolor=.,
+% urlcolor=.,
+% }
+%
+% \par\smallskip%
+% \noindent%
+% \textcolor{blue}{\qrcite{bib2qr}}
+% \textcolor{red}{\qrcite{Doe2024}}
+% \qrcite{bib2qr,Doe2024}
+% \par\medskip%
+%
+% \subsubsection*{\cs{qrfullcite}\marg{key}}
+%
+% \DescribeMacro{\qrfullcite}
+% This command displays the QR code of a BibTeX entry's DOI link or URL and
+% a full citation. The QR code is generated by \cs{qrcite} and the full
+% citation by \cs{fullcite}, provided by the package \package{biblatex}.
+% Each output is presented in individual minipages which are placed next to
+% each other, as shown in the examples underneath
+% (\textcolor{blue}{\cs{qrfullcite\{bib2qr\}}},
+% \textcolor{red}{\cs{qrfullcite[noindent]\{Doe2024\}}}).
+%
+% Please note that \cs{qrfullcite} does \textbf{not} support group
+% citations and accepts only a single \meta{key} as argument.
+%
+% \textcolor{blue}{\qrfullcite{bib2qr}}%
+% \medskip%
+% \textcolor{red}{\qrfullcite[noindent]{Doe2024}}%
+% \medskip%
+% \endgroup
+%
+% The output of \cs{qrfullcite} is considered as its own paragraph, thus it
+% may be indented, like in this document (see blue example). You can prevent
+% the latter by providing the \opt{noindent} option when calling the macro,
+% as done in the red example.
+%
+% The first minipage has the width of the package option \opt{qrwidth}
+% and displays the output of \cs{qrcite}\marg{key}. The second minipage
+% occupies the remaining width of \cs{linewidth} considering a gap of
+% \opt{0.5em} and \cs{parindent}, if the latter is not deactivated via the
+% \opt{noindent} option. It shows the output of \cs{fullcite}\marg{key}.
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Hints}
+% ^^A
+% If the \package{hyperref} package is loaded, not only the DOI/URL strings,
+% but also the QR codes are presented as links. It was modified in this
+% document to allow you to distinguish the output of the individual macro calls
+% in a better way. The previous example without any modifications of the
+% document settings and without deactivating the indentation looks as follows:\\
+%
+% \qrfullcite{Doe2024}%
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Known limitations}
+% ^^A
+% In case no QR code can be generated by \cs{qrcite} called via \cs{qrfullcite},
+% the output of \cs{fullcite} is nevertheless indented by the width assigned to
+% the \opt{qrwidth} package option and the length of the gap of \opt{0.5em}),
+% as shown in orange below (\textcolor{orange}{\cs{qrcite\{Mustermann2023\}}}).
+%
+% \textcolor{orange}{\qrfullcite{Mustermann2023}}%
+%
+%
+% ^^A -----------------------------
+%
+% \MaybeStop{
+%
+% \IndexPrologue{%
+% \section{Index}
+% Numbers written in italic refer to the page where the corresponding entry
+% is described; numbers underlined refer to the code line of the definition;
+% numbers in roman refer to the code lines where the entry is used.
+% }
+% \PrintIndex
+%
+% \GlossaryPrologue{%
+% \section{Change History}
+% The changes listed in this section aim to provide a brief overview of the
+% changes introduced into the package \package{bib2qr}. The
+% \href{https://codeberg.org/Cs137/bib2qr/}{package repository on Codeberg}
+% contains a
+% \href{https://codeberg.org/Cs137/bib2qr/src/branch/main/CHANGELOG.md}{changelog file},
+% consult it to read a detailed description of the changes introduced into
+% this package.
+% }
+% \PrintChanges
+%
+% ^^A -----------------------------
+%
+% \newpage
+% \appendix
+%
+% \section{Appendix}
+%
+% The examples presented in this document are based on the
+% BibTeX entries listed in \ref{ssec:example_bib} and result
+% in the bibliography shown as \ref{ssec:example_ref} (\package{biblatex}
+% options: \opt{style=authoryear}, \opt{sorting=none}).
+%
+% \subsection{Example BibTeX entries}
+% \label{ssec:example_bib}
+% \small{%
+% \VerbatimInput[firstline=5]{example-references.bib}
+% }
+%
+% \subsection{Example bibliography}
+% \label{ssec:example_ref}
+% \printbibliography[heading=none]
+%
+% }
+%
+%
+% ^^A -----------------------------
+%
+% \section{Implementation}
+% ^^A
+%
+% \subsection{Dependencies}
+% ^^A
+% In order to use \package{bib2qr}, the \LaTeX{} packages
+% \ctanpkg{biblatex},
+% \ctanpkg{ifthen},
+% \ctanpkg{qrcode}, and
+% \ctanpkg{xstring}
+% are required as package dependencies.
+% \iffalse
+%<*package>
+% \fi
+% \begin{macrocode}
+\RequirePackage{biblatex}
+\RequirePackage{ifthen}
+\RequirePackage{qrcode}
+\RequirePackage{xstring}
+% \end{macrocode}
+%
+%
+% \subsection{Options}
+% ^^A
+% The package options are internally available as \cs{@bibiiqr@}\meta{option}.
+% \begin{macrocode}
+\DeclareKeys[@bibiiqr]{
+ doiurlbase.store = \@bibiiqr@doiurlbase,
+ doiurlbase.usage = load,
+ qrdelimiter.store = \@bibiiqr@qrdelimiter,
+ qrdelimiter.usage = load,
+ qrversion.store = \@bibiiqr@qrversion,
+ qrversion.usage = load,
+ qrwidth.store = \@bibiiqr@qrwidth,
+ qrwidth.usage = load,
+}%
+% \end{macrocode}
+%
+% \subsubsection*{Assignement of default values}
+% \begin{macrocode}
+\SetKeys[@bibiiqr]{
+ doiurlbase=https://doi.org/,
+ qrdelimiter=\space,
+ qrversion=0,
+ qrwidth=2cm,
+}%
+% \end{macrocode}
+%
+% \subsubsection*{Processing of package options}
+% \begin{macrocode}
+\ProcessKeyOptions[@bibiiqr]\relax
+% \end{macrocode}
+%
+% \subsection{Macros}
+%
+% \begin{macro}{\@bibiiqr@showqr}
+% \marg{string}\\
+% Display a string as QR code considering the package options \opt{qrversion}
+% and \opt{qrwidth}.
+% \begin{macrocode}
+\newcommand\@bibiiqr@showqr[1]{%
+ \qrcode[height=\@bibiiqr@qrwidth,version=\@bibiiqr@qrversion]{#1}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Field formats}
+%
+% Custom field formats are defined to display a QR code of an entry's
+% \texttt{doi} and \texttt{url}.
+%
+% \begin{macro}{@bibiiqr@fldFmtDoi}
+% Field format to display a DOI field's value (converted into an URL
+% considering the option \opt{@bibiiqr@doiurlbase}) as QR code using
+% macro \cs{@bibiiqr@showqr}.
+% \begin{macrocode}
+\DeclareFieldFormat{@bibiiqr@fldFmtDoi}{%
+ \IfBeginWith{#1}{\@bibiiqr@doiurlbase}%
+ {\@bibiiqr@showqr{#1}}%
+ {\@bibiiqr@showqr{\@bibiiqr@doiurlbase#1}}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{@bibiiqr@fldFmtUrl}
+% Field format to display an URL field's value as QR code using \cs{@bibiiqr@showqr}.
+% \begin{macrocode}
+\DeclareFieldFormat{@bibiiqr@fldFmtUrl}{\@bibiiqr@showqr{#1}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Bibliography driver}
+%
+% \begin{macro}{@bibiiqr@bibDrvQR}
+% This bibliography driver
+% allows to display the QR code of an entry's DOI-, or URL field.
+% It applies the \cs{printfield}\oarg{format}\marg{field} macro, which is
+% provided by the \package{biblatex} package to displpay a QR code using the
+% \texttt{@bibiiqr@fldFmtDoi} or \texttt{@bibiiqr@fldFmtUrl} field format and
+% the corresponding field, respectively.
+%
+% The DOI is preferred and the URL is only used if no value is assigned to
+% the DOI field. If neither the DOI, nor the URL field contains a value, a
+% package warning is raised.
+%
+% \begin{macrocode}
+\DeclareBibliographyDriver{@bibiiqr@bibDrvQR}{%
+ \usebibmacro{begentry}%
+ \ifboolexpr{test{\iffieldundef{doi}}}
+ {%
+ \ifboolexpr{test{\iffieldundef{url}}}%
+% \end{macrocode}
+% The entry has no DOI and no URL: Raise a warning.
+% \begin{macrocode}
+ {%
+ \PackageWarning{bib2qr}%
+ {BibTeX entry without DOI or URL: \thefield{entrykey}}{}%
+ }%
+% \end{macrocode}
+% The entry has no DOI but an URL: Display the \texttt{url} field's
+% value using the \texttt{@bibiiqr@fldFmtUrl} field format.
+% \begin{macrocode}
+ {\printfield[@bibiiqr@fldFmtUrl]{url}}%
+ }%
+% \end{macrocode}
+% The entry has a DOI: Display the \texttt{doi} field's value using
+% the \texttt{@bibiiqr@fldFmtDoi} field format.
+% \begin{macrocode}
+ {\printfield[@bibiiqr@fldFmtDoi]{doi}}%
+ \usebibmacro{finentry}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Author commands}
+%
+% \begin{macro}{\qrcite}
+% \marg{key(s)}\\
+% Display the QR code of a BibTeX entry's DOI link or URL by introducing the
+% cite command \cs{qrcite}\marg{key}, which makes use of the previously
+% defined bibliography driver \texttt{@bibiiqr@bibDrvQR}. It requires at least
+% one BibTeX \marg{key} as argument.
+% \begin{macrocode}
+\DeclareCiteCommand{\qrcite}
+ {\usebibmacro{prenote}}%
+ {\usedriver{}{@bibiiqr@bibDrvQR}}%
+ {\@bibiiqr@qrdelimiter}%
+ {\usebibmacro{postnote}}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\qrfullcite}
+% \changes{v0.2}{2024-07-31}{Add \opt{noindent} option}
+% \oarg{option(s)}\marg{key}\\
+% Display the QR code of a singe BibTeX entry's DOI link or URL and a full
+% citation of it. Specify \opt{noindent} as option, if the output should not
+% be indented.
+% \begin{macrocode}
+\NewDocumentCommand{\qrfullcite}{O{}m}{%
+ \par%
+ \ifthenelse{\equal{#1}{noindent}}{%
+ \noindent%
+ \edef\@bibiiqr@mpiiwidth{\dimexpr\linewidth-\@bibiiqr@qrwidth-0.5em}%
+ }{%
+ \edef\@bibiiqr@mpiiwidth{%
+ \dimexpr\linewidth-\parindent-\@bibiiqr@qrwidth-0.5em}%
+ }%
+ \begin{minipage}[t]{\@bibiiqr@qrwidth}
+ \qrcite{#2}%
+ \end{minipage}
+ \hspace{0.5em}%
+ \begin{minipage}{\@bibiiqr@mpiiwidth}
+ \fullcite{#2}%
+ \end{minipage}
+ \par%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%</package>
+% \fi
+%
+%
+% ^^A -----------------------------
+%
+% \Finale
+
diff --git a/Master/texmf-dist/source/latex/bib2qr/bib2qr.ins b/Master/texmf-dist/source/latex/bib2qr/bib2qr.ins
new file mode 100644
index 00000000000..7894fdb8e38
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bib2qr/bib2qr.ins
@@ -0,0 +1,85 @@
+%%
+%% Copyright (C) 2024 Christian Schreinemachers
+%%
+%% This work may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The current maintainer of this work is Christian Schreinemachers.
+%%
+%% This work consists of the files
+%% README.md
+%% bib2qr.dtx
+%% bib2qr.ins
+%% and the derived files
+%% bib2qr.sty
+%% bib2qr.pdf
+%%
+This work has the LPPL maintenance status `maintained'.
+
+The current maintainer of this work is Christian Schreinemachers.
+
+This work consists of the files
+ README.md
+ bib2qr.dtx
+ bib2qr.ins
+and the derived files
+ bib2qr.sty
+ bib2qr.pdf
+\input docstrip.tex
+\keepsilent
+
+\preamble
+
+Copyright (C) 2024 Christian Schreinemachers
+
+This work may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008-05-04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The current maintainer of this work is
+ Christian Schreinemachers.
+
+This work consists of the files
+ bib2qr.dtx
+ bib2qr.ins
+and the derived files
+ bib2qr.sty
+ bib2qr.pdf
+
+\endpreamble
+\askforoverwritefalse
+\generate{\file{bib2qr.sty}{\from{bib2qr.dtx}{package}}}
+
+\obeyspaces
+\Msg{****************************************************}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* bib2qr.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* bib2qr.dtx through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{****************************************************}
+\endbatchfile
+%%
+%% End of file `bib2qr.ins'.
+
diff --git a/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx b/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx
index d8708af2d9f..9b4b59c73d2 100644
--- a/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx
+++ b/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx
@@ -56,7 +56,8 @@
%<*driver>
\ProvidesFile{bxjscls.dtx}
%</driver>
- [2024/01/22 v2.9b BXJS document classes]
+ [2024/07/19 v2.9c BXJS document classes]
+% [2024/01/22 v2.9b BXJS document classes]
% [2023/08/02 v2.9a BXJS document classes]
% [2023/07/17 v2.9 BXJS document classes]
% [2023/07/01 v2.8b BXJS document classes]
@@ -5515,6 +5516,20 @@
%
% \section{文書のマークアップ}
%
+% \begin{ZRnote}
+% \begin{macro}{\bxjs@phantomsection}
+% |hyperref| が読み込まれている場合に |\phantomsection| を実行する。
+% \begin{macrocode}
+\let\bxjs@phantomsection\relax
+\g@addto@macro\bxjs@begin@document@hook{%
+ \@ifpackageloaded{hyperref}{%
+ \let\bxjs@phantomsection\phantomsection
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{ZRnote}
+%
% \subsection{表題}
%
% \begin{macro}{\title}
@@ -8288,8 +8303,15 @@
\fi
\columnseprule.4pt \columnsep 2\jsZw
\ifx\multicols\@undefined
-%<book|report> \twocolumn[\@makeschapterhead{\indexname}%
-%<book|report> \addcontentsline{toc}{chapter}{\indexname}]%
+% \end{macrocode}
+% \begin{ZRnote}
+% |hyperref| 使用時に索引へのリンクが正常に作られるように、
+% |hyperref| の説明書の解説に従って |\phantomsection| を配置した。
+% \end{ZRnote}
+% \begin{macrocode}
+%<book|report> \twocolumn[\bxjs@phantomsection
+%<book|report> \addcontentsline{toc}{chapter}{\indexname}%
+%<book|report> \@makeschapterhead{\indexname}]%
%<!book&!report> \def\presectionname{}\def\postsectionname{}%
%<!book&!report> \twocolumn[\section*{\indexname}]%
\else
@@ -10847,6 +10869,56 @@
% \end{macrocode}
% \end{macro}
%
+% \paragraph{bmパッケージ対策}
+%
+% |\reDeclareMathAlphabet| を適用した数式英字フォント命令は
+% 通常の場合とは定義文の形が異なる。
+% このため |bm| パッケージを利用して |\bm{\mathrm{A}}| を
+% 実行するとエラーが発生する。
+% これを回避するため、
+% 「|\bm| の引数中では数式英字フォントの和文連動を無効にする」
+% ことにする。
+%
+% |\reDeclareMathAlphabet| の適用により例えば |\mathrm| は
+% 以下のように変更される。
+% \begin{itemize}
+% \item 適用前は |\mathrm| の一回展開は %
+% |\protect\|[|mathrm|\verb*| |] である。
+% \item 適用後は |\mathrm| の一回展開が %
+% |\protect\|[|mathrm|\verb*| |] になる。
+% \item |\|[|mathrm|\verb*| |] の一回展開は以下のようになる。\\
+% |\DualLang@mathalph@bet{\RDMAorg@mathrm}{\RDMAorg@mathmc}|
+% \item |\RDMAorg@mathrm| の一回展開は |\|[|mathrm|\verb*| |] になる。
+% \end{itemize}
+%
+% \begin{macro}{\bxjs@patch@RDMA@for@bm}
+% |\reDeclareMathAlphabet| の機能に対して |bm| パッケージ対策の
+% パッチを当てる。
+% \begin{macrocode}
+\@onlypreamble\bxjs@patch@RDMA@for@bm
+\def\bxjs@patch@RDMA@for@bm{%
+% \end{macrocode}
+% 実際に改変するのは |\DualLang@mathalph@bet| である。
+% \begin{macrocode}
+ \let\bxjs@org@DualLang@mathalph@bet\DualLang@mathalph@bet
+ \def\DualLang@mathalph@bet{%
+% \end{macrocode}
+% |\bm| の引数の中
+% (そこでは |\bm| が |\@firstofone| に等置されているので
+% これを判定に利用する)
+% では、|\DualLang@mathalph@bet| を |\@firstoftwo| の動作に変える。
+% これにより、|\mathrm| の
+% (|\protect| を無視する場合の)
+% 先頭完全展開形が、「適用」前のものと一致する。
+% このため |\bm| は「適用」の影響を受けずに正常動作できる。
+% \begin{macrocode}
+ \ifx\bm\@firstofone \expandafter\@firstoftwo
+ \else \expandafter\bxjs@org@DualLang@mathalph@bet
+ \fi}%
+}
+% \end{macrocode}
+% \end{macro}
+%
%^^A----------------
% \subsection{{\pTeX}用設定}
%
@@ -11124,19 +11196,12 @@
\g@addto@macro\bxjs@begin@document@hook{%
\ifx\reDeclareMathAlphabet\@undefined\else
% \end{macrocode}
-% |\reDeclareMathAlphabet| を適用した数式英字フォント命令は{\LaTeX}の
-% 通常の命令とは定義文の形が異なる。
-% このため |bm| パッケージを読み込んで |\bm{\mathrm{A}}| を
-% 実行するとエラーが発生する。
-% これを回避するための暫定対応として、|bm| が読み込まれた場合は
-% 数式英字フォントの和文連動を無効にする。
-% \TODO ユーザが数式英字フォントの和文連動を制御できるようにする。
+% |bm| パッケージが読込済であればパッチを適用する。
% \begin{macrocode}
- \@ifpackageloaded{bm}{}{%else
+ \@ifpackageloaded{bm}{\bxjs@patch@RDMA@for@bm}{}%
\reDeclareMathAlphabet{\mathrm}{\@mathrm}{\@mathmc}%
\reDeclareMathAlphabet{\mathbf}{\@mathbf}{\@mathgt}%
\reDeclareMathAlphabet{\mathsf}{\@mathsf}{\@mathgt}%
- }%
\fi}
\fi
% \end{macrocode}
@@ -11544,6 +11609,7 @@
\@ltj@match@familytrue
\fi
\g@addto@macro\bxjs@begin@document@hook{%
+ \@ifpackageloaded{bm}{\bxjs@patch@RDMA@for@bm}{}%
\reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}%
\reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}%
\reDeclareMathAlphabet{\mathsf}{\mathsf}{\mathgt}}%
diff --git a/Master/texmf-dist/source/latex/changebar/changebar.dtx b/Master/texmf-dist/source/latex/changebar/changebar.dtx
index 406ccf52903..58df74102c3 100644
--- a/Master/texmf-dist/source/latex/changebar/changebar.dtx
+++ b/Master/texmf-dist/source/latex/changebar/changebar.dtx
@@ -24,7 +24,7 @@
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{2954}
+% \CheckSum{2948}
%
%\iffalse
% This file is built for \LaTeXe, so we make sure an error is
@@ -39,7 +39,7 @@
\ProvidesFile{changebar.dtx}
%</dtx>
%<+package>\ProvidesPackage{changebar}
- [2024/01/09 v3.7d Indicate changes with marginal bars]
+ [2024/07/17 v3.7e Indicate changes with marginal bars]
% \end{macrocode}
%
% \section{A driver for this document}
@@ -137,7 +137,10 @@
% \changes{v3.6e}{2023/08/13}{Added supprt for luaTeX}
% \changes{v3.7b}{2023/12/28}{Added a few lines that were inadvertantly removed}
% \changes{v3.7b}{2023/12/30}{the cb2-file use delimiting chars may
-% change meaning when they end up in the wrong situation}
+% change meaning when they end up in the wrong situation}
+% \changes{v3.7e}{2024/07/17}{The us of the character `;´ as a string
+% separator clashes with it's active variant when babel/french has
+% been loaded}
%
% \title{The Changebar package
% \thanks{This file has version number \fileversion,
@@ -229,9 +232,7 @@
% \changes{v3.6a}{2011/04/30}{XeTeX added}
% \item Xe\TeX
% \changes{3.6e}{2023/08/13}{luaTeX added}
-% \begin{changebar}
% \item lua\TeX
-% \end{changebar}
% \end{itemize}
% The drivers are represented in the normal typewriter method of
% typing these names, or by the same entirely in lower case.
@@ -752,7 +753,7 @@
% \item V\TeX
% \item PDF\TeX
% \item Xe\TeX
-% \cbstart\item luaTeX\cbend
+% \item luaTeX
% \end{itemize}
%
% The intent is that the driver names should be case-insensitive,
@@ -799,10 +800,17 @@
% \end{macrocode}
% Redefine the |\cb@pdfxy| macro to write point coordinates to the
% \file{.cb2} file.
-% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter}
+% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter}
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
% \begin{macrocode}
\gdef\cb@pdfxy##1##2##3##4##5{%
- \immediate\write\cb@writexy{##1.##2p##3;##4;##5}%
+% \end{macrocode}
+% \begin{changebar}
+% \begin{macrocode}
+ \immediate\write\cb@writexy{##1.##2p##3/##4/##5}%
+% \end{macrocode}
+% \end{changebar}
+% \begin{macrocode}
\expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
\else\cb@pdftexerror\fi\fi\fi}
% \end{macrocode}
@@ -837,10 +845,17 @@
% \end{macrocode}
% Redefine the |\cb@pdfxy| macro to write point coordinates to the
% \file{.cb2} file.
-% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter}
+% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter}
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
% \begin{macrocode}
\gdef\cb@pdfxy##1##2##3##4##5{%
- \immediate\write\cb@writexy{##1.##2p##3;##4;##5}%
+% \end{macrocode}
+% \begin{changebar}
+% \begin{macrocode}
+ \immediate\write\cb@writexy{##1.##2p##3/##4/##5}%
+% \end{macrocode}
+% \end{changebar}
+% \begin{macrocode}
\expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
\gdef\sec@nd@ftw@##1 ##2{##2}
\fi}
@@ -854,7 +869,6 @@
{You are not using XeLaTeX}}
% \end{macrocode}
%
-% \begin{changebar}
% \begin{macrocode}
\DeclareOption{luaTeX}{\cb@luatexcheck}
\DeclareOption{luatex}{\cb@luatexcheck}
@@ -877,10 +891,17 @@
% \end{macrocode}
% Redefine the |\cb@pdfxy| macro to write point coordinates to the
% \file{.cb2} file.
-% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter}
+% \changes{v3.7b}{2023/12/30}{use ";" instead of ",¨ as delimiter}
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
% \begin{macrocode}
\gdef\cb@pdfxy##1##2##3##4##5{%
- \immediate\write\cb@writexy{##1.##2p##3;##4;##5}%
+% \end{macrocode}
+% \begin{changebar}
+% \begin{macrocode}
+ \immediate\write\cb@writexy{##1.##2p##3/##4/##5}%
+% \end{macrocode}
+% \end{changebar}
+% \begin{macrocode}
\expandafter\gdef\csname cb@##1.##2\endcsname{##3,##4,##5}}
\fi}
% \end{macrocode}
@@ -892,7 +913,6 @@
{luaTeX option cannot be used}%
{You are not using luaLaTeX}}
% \end{macrocode}
-% \end{changebar}
%
% The new features of \LaTeXe\ make it possible to implement the
% \Lopt{outerbars} option.
@@ -1120,6 +1140,8 @@
% compatibility mode}
% \changes{v3.3e}{1998/02/24}{Added \cs{Textures}}
% \changes{v3.5a}{2005/05/23}{Added 'PDFtex' option}
+% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
+% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option}
% \begin{macrocode}
\if@compatibility
\def\driver#1{%
@@ -1132,17 +1154,9 @@
\def\Textures{TEXTURES}%
\def\VTeX{VTEX}%
\def\pdfTeX{PDFTEX}%
-% \end{macrocode}
-% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
-% \begin{macrocode}
\def\xeTeX{XETEX}
-% \end{macrocode}
-% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option}
-% \begin{changebar}
-% \begin{macrocode}
\def\luaTeX{LUATEX}
% \end{macrocode}
-% \end{changebar}
%
% The choice has to be communicated to the macro
% \verb=\cb@setup@specials= that will be called from within
@@ -1150,6 +1164,7 @@
% \verb=\cb@driver@setup= is used. It receives a numeric value
% using \verb=\chardef=.
% \changes{v3.6a}{2011/04/30}{Added 'XeTeX' option}
+% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option}
% \begin{macrocode}
\global\chardef\cb@driver@setup=0\relax
\ifx\tempa\LN \global\chardef\cb@driver@setup=0\fi
@@ -1160,14 +1175,7 @@
\ifx\tempa\VTeX \global\chardef\cb@driver@setup=5\fi
\ifx\tempa\pdfTeX \cb@pdftexcheck\fi
\ifx\tempa\xeTeX \cb@xetexcheck\fi
-% \end{macrocode}
-% \changes{v3.6e}{2023/08/13}{Added 'luaTeX' option}
-% \begin{changebar}
-% \begin{macrocode}
\ifx\tempa\luaTeX \cb@luatexcheck\fi
-% \end{macrocode}
-% \end{changebar}
-% \begin{macrocode}
\egroup}
% \end{macrocode}
% We add \verb+\driver+ to \verb+\@preamblecmds+, which is a
@@ -1464,11 +1472,22 @@
% When the point is found it is removed from |\cb@pdfpoints|. \#9
% contains the cumulative head of the list to construct the new list
% with the entry removed. \#3--\#8 are for pattern matching.
-% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter}
+% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter}
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
+% \begin{changebar}
+% \begin{macrocode}
+ \def\cb@pdffind##1##2##3.##4p##5/##6/##7pt##8\relax##9{%
+% \end{macrocode}
+% \end{changebar}
% \begin{macrocode}
- \def\cb@pdffind##1##2##3.##4p##5;##6;##7pt##8\relax##9{%
\def\cb@next{%
- \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}%
+% \end{macrocode}
+% \begin{changebar}
+% \begin{macrocode}
+ \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5/##6/##7pt}}%
+% \end{macrocode}
+% \end{changebar}
+% \begin{macrocode}
\ifnum ##1=##3
\ifnum ##2=##4
\def\cb@pdfx{##5sp}%
@@ -1519,8 +1538,13 @@
% \begin{macro}{\cb@pdfparsexy}
% The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in
% from the \file{.cb2} file.
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
+% \begin{changebar}
+% \begin{macrocode}
+ \def\cb@pdfparsexy##1.##2p##3/##4/##5pt{%
+% \end{macrocode}
+% \end{changebar}
% \begin{macrocode}
- \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{%
\def\cb@pdfpg{##2}}%
% \end{macrocode}
% \end{macro}
@@ -1565,7 +1589,7 @@
% In order to get things in the right spot we need a little scaling
% factor. We define it here.
% \begin{macrocode}
-\def\cb@pdf@scale{0.996264009963}
+ \def\cb@pdf@scale{0.996264009963}
% \end{macrocode}
% \end{macro}
%
@@ -1636,14 +1660,12 @@
% \begin{macrocode}
\gdef\cb@checkPdfxy##1##2##3##4##5{%
\cb@@findpdfpoint{##1}{##2}%
-% \end{macrocdode}
-% \begin{changebar}
-% \begin{macrocode
+% \end{macrocode}
+% \begin{macrocode}
\ifdim##3sp=\cb@pdfx\relax
\ifdim##4sp=\cb@pdfy\relax
-% \end{macrocdode}
-% \end{changebar}
-% \begin{macrocode
+% \end{macrocode}
+% \begin{macrocode}
\ifdim##5=\cb@pdfz\relax
\else
\cb@error
@@ -1741,11 +1763,22 @@
% When the point is found it is removed from |\cb@pdfpoints|. \#9
% contains the cumulative head of the list to construct the new list
% with the entry removed. \#3--\#8 are for pattern matching.
-% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter}
+% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter}
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
+% \begin{changebar}
+% \begin{macrocode}
+ \def\cb@pdffind##1##2##3.##4p##5/##6/##7pt##8\relax##9{%
+% \end{macrocode}
+% \end{changebar}
% \begin{macrocode}
- \def\cb@pdffind##1##2##3.##4p##5;##6;##7pt##8\relax##9{%
\def\cb@next{%
- \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}%
+% \end{macrocode}
+% \begin{changebar}
+% \begin{macrocode}
+ \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5/##6/##7pt}}%
+% \end{macrocode}
+% \end{changebar}
+% \begin{macrocode}
\ifnum ##1=##3
\ifnum ##2=##4
\def\cb@pdfx{##5sp}%
@@ -1796,8 +1829,13 @@
% \begin{macro}{\cb@pdfparsexy}
% The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in
% from the \file{.cb2} file.
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
+% \begin{changebar}
+% \begin{macrocode}
+ \def\cb@pdfparsexy##1.##2p##3/##4/##5pt{%
+% \end{macrocode}
+% \end{changebar}
% \begin{macrocode}
- \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{%
\def\cb@pdfpg{##2}}%
% \end{macrocode}
% \end{macro}
@@ -1842,7 +1880,7 @@
% In order to get things in the right spot we need a little scaling
% factor. We define it here.
% \begin{macrocode}
-\def\cb@pdf@scale{0.996264009963}
+ \def\cb@pdf@scale{0.996264009963}
% \end{macrocode}
% \end{macro}
%
@@ -1934,7 +1972,6 @@
\let\cb@resetpoints\relax
% \end{macrocode}
%
-% \begin{changebar}
% \changes{v3.6e}{2023/08/13}{lua\TeX{} support added}
% The code for lua\TeX{}, like for pdf\TeX\ and Xe\TeX,
% is more elaborate as the calculations have to
@@ -2012,11 +2049,22 @@
% When the point is found it is removed from |\cb@pdfpoints|. \#9
% contains the cumulative head of the list to construct the new list
% with the entry removed. \#3--\#8 are for pattern matching.
-% \changes{v3.7b}{2023/12/30}{use ¨;¨ instead of ¨,¨ as delimiter}
+% \changes{v3.7b}{2023/12/30}{use ";" instead of "," as delimiter}
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
+% \begin{changebar}
+% \begin{macrocode}
+ \def\cb@pdffind##1##2##3.##4p##5/##6/##7pt##8\relax##9{%
+% \end{macrocode}
+% \end{changebar}
% \begin{macrocode}
- \def\cb@pdffind##1##2##3.##4p##5;##6;##7pt##8\relax##9{%
\def\cb@next{%
- \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5;##6;##7pt}}%
+% \end{macrocode}
+% \begin{changebar}
+% \begin{macrocode}
+ \cb@pdffind{##1}{##2}##8\relax{##9##3.##4p##5/##6/##7pt}}%
+% \end{macrocode}
+% \end{changebar}
+% \begin{macrocode}
\ifnum ##1=##3
\ifnum ##2=##4
\def\cb@pdfx{##5sp}%
@@ -2067,8 +2115,13 @@
% \begin{macro}{\cb@pdfparsexy}
% The |\cb@pdfparsexy| macro extracts the pagecount from an entry read in
% from the \file{.cb2} file.
+% \changes{v3.7e}{2024/07/17}{Use "/" instead of ";" as delimiter}
+% \begin{changebar}
+% \begin{macrocode}
+ \def\cb@pdfparsexy##1.##2p##3/##4/##5pt{%
+% \end{macrocode}
+% \end{changebar}
% \begin{macrocode}
- \def\cb@pdfparsexy##1.##2p##3;##4;##5pt{%
\def\cb@pdfpg{##2}}%
% \end{macrocode}
% \end{macro}
@@ -2113,7 +2166,7 @@
% In order to get things in the right spot we need a little scaling
% factor. We define it here.
% \begin{macrocode}
-\def\cb@pdf@scale{0.996264009963}
+ \def\cb@pdf@scale{0.996264009963}
% \end{macrocode}
% \end{macro}
%
@@ -2203,7 +2256,6 @@
\def\cb@maxpoint{9999999}
\let\cb@resetpoints\relax
% \end{macrocode}
-%\end{changebar}
%
% When code for other drivers should be added it can be inserted
% here. When someone makes a mistake and somehow selects an
@@ -2296,7 +2348,7 @@
\newcommand*{\nochangebars}{%
\def\cb@start[##1]{\ignorespaces}%
\def\cb@delete[##1]{}%
- \def\cb@end{\ignorespacesafterend}
+ \def\cb@end{\ignorespacesafterend}%
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-article.dtx b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-article.dtx
index 9376ddbbf3e..a750c136f54 100644
--- a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-article.dtx
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-article.dtx
@@ -3,7 +3,7 @@
% Article class for The Canadian Journal of Statistics | La revue
% canadienne de statistique
%
-% Copyright (C) Statistical Society of Canada | Société
+% Copyright (C) 2023-2024 Statistical Society of Canada | Société
% canadienne de statistique
%
% The class file and templates derived from this file are licenced
@@ -25,10 +25,10 @@
%<*driver>
\ProvidesFile{cjs-rcs-article.dtx}
%</driver>
-%<class>\NeedsTeXFormat{LaTeX2e}[2009/09/24]
+%<class>\NeedsTeXFormat{LaTeX2e}[2021/06/01]
%<class>\ProvidesClass{cjs-rcs-article}%
%<*class>
- [2023/11/29 v1.0 Article class for The Canadian Journal of
+[2024/07/30 v1.1a Article class for The Canadian Journal of
Statistics | La revue canadienne de statistique]
%</class>
%<*driver>
@@ -122,6 +122,10 @@
\OnlyDescription
\fi
+ %% Additional colors
+ \colorlet{codebg}{LightYellow1} % code background
+ \colorlet{prompt}{Orchid4} % command prompt
+
%% New \DescribeMacro type environments for class options and lengths
\NewDocElement[envlike,notoplevel,printtype=\emph{option}]{Option}{option}
\NewDocElement[macrolike,notoplevel,printtype=$\ell$]{Length}{length}
@@ -139,9 +143,12 @@
\newcommand*\CJSbstfr{\code{cjs-rcs-fr}}
\makeatother
+ %% URL of the project repository
+ \newcommand*\reposurl{https://gitlab.com/cjs-rcs/cjs-rcs-article}
+
%% Redefine \year using information from \filedate instead of using
%% compilation time
- \def\parsedate#1/#2/#3\relax{\def\year{#1}}
+ \def\parsedate#1/#2/#3\relax{\def\year{#1}\def\isodate{#1-#2-#3}}
%% Definition of a shorthand to either hyphenate a word or insert a
%% regular dash. Use in the long names of Creative Commons licences.
@@ -149,6 +156,26 @@
\useshorthands*{"}
\defineshorthand{"-}{\discretionary{-}{}{-}}
+ %% Source code
+ \usepackage{listings}
+ \lstset{%
+ basicstyle=\ttfamily\NoAutoSpacing,
+ moredelim=[is][\color{prompt}]{---}{-},
+ escapeinside=`',
+ showstringspaces=false,
+ backgroundcolor=\color{codebg},
+ frame=leftline,
+ framerule=2pt,
+ framesep=5pt,
+ xleftmargin=7.4pt
+ }
+
+ %% The \meta command from memoir needs an additionnel \normalfont to
+ %% use the document font in listings.
+ \makeatletter
+ \def\meta@font@select{\normalfont\itshape}
+ \makeatother
+
\begin{document}
\DocInput{cjs-rcs-article.dtx}
\end{document}
@@ -257,6 +284,22 @@
% CTAN.}
% \changes{1.0}{2023-11-29}{Fix various typos and cosmetic issues in
% the documentation.}
+% \changes{1.1}{2024-06-26}{Provide support to acknowledge usage of
+% data from the Alzheimer’s Disease Neuroimaging Initiative (ADNI) and
+% the Alzheimer’s Disease Neuroimaging Metabolomics Consortium
+% (ADMC).}
+% \changes{1.1}{2024-06-26}{Introduce new commands \cs{specialack} and
+% \cs{specialackmark} for the editors.}
+% \changes{1.1}{2024-06-23}{Improve the documentation, in particular
+% the installation instructions and access to the templates.}
+% \changes{1.1}{2024-07-02}{Add the References section to the table of
+% contents of the PDF.}
+% \changes{1.1}{2024-07-13}{Add the command \cs{matit} to typeset bold
+% italic in math in a portable way.}
+% \changes{1.1a}{2024-07-25}{Fix the command \cs{proglang} that would
+% disable hyphenation for the rest of the document. With thanks to
+% Enrico Gregorio (egreg) for the heads up in person at TUG 2024.}
+% \changes{1.1a}{2024-07-25}{Make the command \cs{proglang} robust.}
%
% \ifenglish%
% \title[Guide to the class {\CJSclass}]{%
@@ -353,11 +396,9 @@
% {\CJSclass} requiert une distribution {\TeX} récente et
% à jour. Nous recommandons les distributions %
% \fi
-% \href{https://tug.org/texlive}{{\TeX}~Live} %
-% --- %
+% \href{https://tug.org/texlive}{{\TeX}~Live}\ifenglish---\else~--- \fi%
% \ifenglish or its variant for macOS \else ou sa variante pour macOS \fi%
-% \href{https://tug.org/mactex}{Mac{\TeX}} %
-% --- %
+% \href{https://tug.org/mactex}{Mac{\TeX}}\ifenglish---\else~--- \fi%
% \ifenglish and \else et \fi%
% \href{https://miktex.org}{MiK{\TeX}}. %
% \ifenglish%
@@ -425,17 +466,28 @@
% \section{Démarrage rapide}
% \fi
% \label{sec:quick-start}
+% \changes{1.1}{2024-06-05}{Documentation: add a link to obtain the
+% templates in the \emph{Quick start} section.}
%
% \ifenglish%
% The class ships with templates for articles in English and in
% French. In {\TeX}~Live, these are located with the
-% documentation of the class. To quickly start writing your article,
-% copy the appropriate template to your working directory and follow
-% the brief instructions therein. %
+% documentation of the class. You may also obtain the templates from
+% the %
% \else%
% La classe est livrée avec des gabarits pour des articles en français
% et en anglais. Dans la distribution {\TeX}~Live, ceux-ci sont
-% classés avec la documentation. Pour débuter rapidement la rédaction
+% classés avec la documentation. Vous pouvez aussi les récupérer
+% depuis le %
+% \fi%
+% \href{\reposurl/-/releases/\fileversion}{%
+% \ifenglish project repository\else dépôt du projet\fi}. %
+% \ifenglish%
+% To quickly start writing your article, copy the appropriate template
+% to your working directory and follow the brief instructions
+% therein. %
+% \else%
+% Pour débuter rapidement la rédaction
% de votre article, copiez le gabarit approprié dans votre dossier de
% travail et suivez les directives succinctes qui s'y trouvent. %
% \fi
@@ -490,6 +542,9 @@
% \changes{0.91}{2023-10-16}{Change the name of the archive containing
% a ``local'' installation of the class from
% \texttt{-no-local-tex.zip} to \texttt{-project-install.zip}.}
+% \changes{1.1}{2024-06-05}{Documentation: provide a direct link to
+% the release corresponding to the version of the documentation in the
+% \emph{Installation} section.}
%
% \ifenglish%
% The class {\CJSclass} is distributed as the package %
@@ -507,21 +562,33 @@
% the command line: %
% \else%
% via le réseau de sites \emph{Comprehensive {\TeX} Archive Network}
-% (CTAN). Elle fait partie des distributions {\TeX} standards telles
-% que {TeX}~Live, Mac{\TeX} et MiK{\TeX}. Nous recommandons fortement
-% d'installer ou de mettre à jour le paquetage à l'aide du
+% (CTAN). Celui-ci fait partie des distributions {\TeX} standards
+% telles que {TeX}~Live, Mac{\TeX} et MiK{\TeX}. Nous recommandons
+% fortement d'installer ou de mettre à jour le paquetage à l'aide du
% gestionnaire de paquetages de votre distribution {\TeX}. Par
-% exemple, avec {\TeX}~Live, vous pouvez effectuer ces opérations dans
-% l'assistant graphique, ou encore avec l'une ou l'autre des commandes
-% ci-dessous: %
+% exemple, avec {\TeX}~Live, vous pouvez effectuer ces opérations
+% dans l'assistant graphique, ou encore avec l'une ou l'autre des
+% commandes ci-dessous: %
+% \fi
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+---$- tlmgr install cjs-rcs-article
+\end{lstlisting}
+% \iffalse
+%</example>
% \fi
-% \begin{quote}
-% \code{tlmgr install cjs-rcs-article}
-% \end{quote}
% \ifenglish or\else ou\fi
-% \begin{quote}
-% \code{tlmgr update cjs-rcs-article}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+---$- tlmgr update cjs-rcs-article
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
%
% \ifenglish%
% If you are not in position to install packages or update the {\TeX}
@@ -530,23 +597,23 @@
% limited in scope to your project. Download the archive %
% \else%
% S'il vous est impossible d'installer des paquetages ou de mettre à
-% jour la distribution {\TeX} --- notamment si vous utilisez une
-% plateforme de rédaction en ligne --- vous pouvez procéder à une
+% jour la distribution {\TeX}~--- notamment si vous utilisez une
+% plateforme de rédaction en ligne~--- vous pouvez procéder à une
% installation simplifiée de la classe, mais dont la portée sera
% limitée à votre projet. Pour ce faire, téléchargez l'archive %
% \fi%
% \code{cjs-rcs-article-project-install.zip} %
% \ifenglish from the \else depuis le \fi%
-% \href{https://gitlab.com/cjs-rcs/cjs-rcs-article/-/releases}{%
-% \ifenglish project repository\else dépôt du projet\fi} %
+% \href{\reposurl/-/releases/\fileversion}{%
+% \ifenglish project repository\else dépôt du projet\fi}, %
% \ifenglish%
-% and uncompress it in the directory of your project. You will then
-% have access to all the essential files of the class within this
-% project. %
+% uncompress it and place its contents in the directory of your
+% project. You will then have access to all the essential files of the
+% class within this project. %
% \else%
-% et décompressez celle-ci dans le répertoire de votre projet. Vous
-% disposerez alors de tous les fichiers essentiels de la classe à
-% l'intérieur de ce projet. %
+% décompressez celle-ci et placez son contenu dans le répertoire de
+% votre projet. Vous disposerez alorsà l'intérieur de ce projet de
+% tous les fichiers essentiels de la classe. %
% \fi
%
% \ifenglish%
@@ -631,7 +698,7 @@
% {pdf\LaTeX} utilise les versions Type~1 des polices STIX~Two et
% Fira. Or, la technologie Type~1 PostScript étant aujourd'hui
% obsolète, ces polices ne sont plus mises à jour. Le moteur
-% {\XeLaTeX} utilise les plus modernes --- et complètes --- versions
+% {\XeLaTeX} utilise les plus modernes~--- et complètes~--- versions
% OpenType des polices.}, %
% nous recommandons de compiler votre manuscript avec le plus moderne
% moteur {\XeLaTeX}. %
@@ -643,24 +710,34 @@
% \subsection{Gabarits}
% \fi
% \label{sec:usage:templates}
+% \changes{1.1}{2024-06-05}{Documentation: add a link to the templates
+% in the \emph{Templates} sub-section.}
%
% \ifenglish%
% The class is distributed with templates for articles in English
% and in French. If you are using the version of the class included
% with your {\TeX} distribution, the templates may be located with the
-% documentation (this is the case in {\TeX}~Live). If you installed
-% the class manually by following the instructions in
-% \autoref{sec:installation}, the templates reside in your working
-% directory. %
+% documentation (this is the case in {\TeX}~Live). You may also obtain
+% them from the %
% \else
% La classe est distribuée avec des gabarits pour des articles en français
% et en anglais. Si vous utilisez la version de la classe fournie avec
% votre distribution {\TeX}, les gabarits peuvent être classés avec
-% la documentation (c'est le cas dans {\TeX}~Live). Si vous avez
+% la documentation (c'est le cas dans {\TeX}~Live). Vous pouvez aussi
+% les récupérer depuis le %
+% \fi
+% \href{\reposurl/-/releases/\fileversion}{%
+% \ifenglish project repository\else dépôt du projet\fi}. %%
+% \ifenglish
+% If you installed the class manually by following the instructions in
+% \autoref{sec:installation}, the templates reside in your working
+% directory. %
+% \else%
+% Si vous avez
% plutôt installé la classe manuellement en suivant les instructions
% de la \autoref{sec:installation}, les gabarits se trouvent dans
% votre dossier de travail. %
-% \fi
+% \fi%
%
% \ifenglish%
% We strongly encourage to start from a template to write your
@@ -705,13 +782,19 @@
% \label{sec:usage:options}
%
% \ifenglish%
-% The class is loaded with the command %
+% The class is loaded with the command: %
% \else%
-% On charge la classe avec la commande %
+% On charge la classe avec la commande: %
+% \fi
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\documentclass`\oarg{options}\marg{cjs-rcs-article}'
+\end{lstlisting}
+% \iffalse
+%</example>
% \fi
-% \begin{quote}
-% \cmdprint{\documentclass}\oarg{options}\code{\{cjs-rcs-article\}}
-% \end{quote}
% \ifenglish%
% Some \meta{options} of the class are intended for the authors,
% whereas others are instead intended for the editors of {\TheCJS*}.
@@ -931,22 +1014,28 @@
% du titre qui sera utilisée dans les entêtes. La syntaxe de la
% commande est donc: %
% \fi
-% \begin{quote}
-% \def\OPT{\ifenglish Short title\else Titre court\fi}
-% \def\ARG{\ifenglish Full title\else Titre complet\fi}
-% \cmdprint{\title}\oarg{\OPT}\marg{\ARG}
-% \end{quote}
-% \ifenglish%
-% Write the title in sentence style, that is, with only an initial
-% capital. In English, also capitalize the first word after a colon.
-% Break a long title needing more than one line using \code{\bs\bs}
-% or \cmdprint{\newline}. %
-% \else%
-% Entrez le titre en minuscules (sauf pour la majuscule initiale).
-% En anglais, utilisez toutefois une majuscule initiale après un
-% deux-points. Vous devez couper manuellement avec \code{\bs\bs} ou
-% \cmdprint{\newline} un titre qui nécessite plus d'une ligne.
-% \fi
+% \iffalse
+%<*example>
+% \fi
+\def\OPT{\ifenglish Short title\else Titre court\fi}
+\def\ARG{\ifenglish Full title\else Titre complet\fi}
+\begin{lstlisting}
+\title`\oarg{\OPT}\marg{\ARG}'
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% \ifenglish%
+% Write the title in sentence style, that is, with only an initial
+% capital. In English, also capitalize the first word after a colon.
+% Break a long title needing more than one line using \code{\bs\bs}
+% or \cmdprint{\newline}. %
+% \else%
+% Entrez le titre en minuscules (sauf pour la majuscule initiale).
+% En anglais, utilisez toutefois une majuscule initiale après un
+% deux-points. Vous devez couper manuellement avec \code{\bs\bs} ou
+% \cmdprint{\newline} un titre qui nécessite plus d'une ligne.
+% \fi
% \end{DescribeMacro}
%
% \ifenglish%
@@ -994,11 +1083,17 @@
% informations relatives à un auteur de l'article. Sa syntaxe
% générale est la suivante: %
% \fi
-% \begin{quote}
-% \def\FORENAME{\ifenglish Forename\else Prénom\fi}
-% \def\SURNAME{\ifenglish Surname\else Nom\fi}
-% \cmdprint{\author}\oarg{options}\code{\{}\meta{\FORENAME}\code{ }\cmdprint{\surname}\marg{\SURNAME}\code{\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\def\FORENAME{\ifenglish Forename\else Prénom\fi}
+\def\SURNAME{\ifenglish Surname\else Nom\fi}
+\begin{lstlisting}
+\author`\oarg{options}'{`\meta{\FORENAME}' \surname`\marg{\SURNAME}'}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish%
% The \meta{Surname} must be entered using the command
% \cmd{\surname}. Write the \meta{Forename} and \meta{Surname} in
@@ -1113,15 +1208,27 @@
% \def\FORENAME{\ifenglish Forename\else Prénom\fi}
% \def\SURNAME{\ifenglish Surname\else Nom\fi}
% \item \ifenglish For the corresponding author\else Pour l'auteur correspondant\fi:
-% \begin{quote}
-% \cmdprint{\author}\code{[orcid=}\meta{id}\code{, email=}\meta{\EMAIL}\code{, corresponding]} \\
-% \verb+ +\code{\{}\meta{\FORENAME}\code{ }\cmdprint{\surname}\marg{\SURNAME}\code{\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\author[orcid=`\meta{id}', email=`\meta{\EMAIL}', corresponding]
+ {`\meta{\FORENAME}' \surname`\marg{\SURNAME}'}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \item \ifenglish For all other authors\else Pour tous les autres auteurs\fi:
-% \begin{quote}
-% \cmdprint{\author}\code{[orcid=}\meta{id}\code{, email=}\meta{\EMAIL}\code{]} \\
-% \verb+ +\code{\{}\meta{\FORENAME}\code{ }\cmdprint{\surname}\marg{\SURNAME}\code{\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\author[orcid=`\meta{id}', email=`\meta{\EMAIL}']
+ {`\meta{\FORENAME}' \surname`\marg{\SURNAME}'}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \end{itemize}
% \end{DescribeMacro}
% \end{DescribeMacro}
@@ -1136,11 +1243,17 @@
% mentionné dans la commande \cmd{\author} qui la précède. La forme
% générale de l'affiliation est: %
% \fi
-% \begin{quote}
-% \def\AFFIL{\ifenglish Department, University, City, Country\else%
-% Département, Université, Ville, Pays\fi}
-% \cmd{\affil}\marg{\AFFIL}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\def\AFFIL{\ifenglish Department, University, City, Country\else%
+ Département, Université, Ville, Pays\fi}
+\begin{lstlisting}
+\affil`\marg{\AFFIL}'
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish%
% Give the country name in the main language of the article. %
% \else%
@@ -1164,13 +1277,19 @@
% premier auteur suivi de la locution «et collab.» (en français) ou
% «et al.» (en anglais): %
% \fi
-% \begin{quote}
-% \def\SURNAME{\ifenglish Surname\else Nom\fi}
-% \def\ETAL{\ifenglish et al.\else et collab.\fi}
-% \def\ETCOLLAB{\ifenglish et collab.\else et al.\fi}
-% \cmdprint{\runningauthor}\code{\{}\meta{\SURNAME}\code{ \ETAL\}} \\
-% \cmdprint{\runningauthor}\code{\{}\meta{\SURNAME}\code{ \ETCOLLAB\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\def\SURNAME{\ifenglish Surname\else Nom\fi}
+\def\ETAL{\ifenglish et al.\else et collab.\fi}
+\def\ETCOLLAB{\ifenglish et collab.\else et al.\fi}
+\begin{lstlisting}
+\runningauthor{`\meta{\SURNAME} \ETAL'}
+\runningauthor{`\meta{\SURNAME} \ETCOLLAB'}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \end{DescribeMacro}
%
% \ifenglish%
@@ -1224,16 +1343,22 @@
% mots-clés de l'article. Il s'utilise comme une liste
% \code{itemize} ou \code{enumerate}: %
% \fi
-% \begin{quote}
-% \def\KEYWORDC{\ifenglish Key word\else Mot-clé\fi}
-% \def\KEYWORD{\ifenglish key word\else mot-clé\fi}
-% \cmdprint{\begin}\code{\{keywords\}} \\
-% \cmdprint{\item} \emph{{\KEYWORDC} 1} \\
-% \cmdprint{\item} \emph{{\KEYWORD} 2} \\
-% \cmdprint{\item} \emph{{\KEYWORD} 3} \\
-% \code{...} \\
-% \cmdprint{\end}\code{\{keywords\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\def\KEYWORDC{\ifenglish Key word\else Mot-clé\fi}
+\def\KEYWORD{\ifenglish key word\else mot-clé\fi}
+\begin{lstlisting}
+\begin{keywords}
+\item `\normalfont\itshape{\KEYWORDC} 1'
+\item `\normalfont\itshape{\KEYWORD} 2'
+\item `\normalfont\itshape{\KEYWORD} 3'
+...
+\end{keywords}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish%
% As shown above, use an initial capital for the first key word
% only. Punctuation will be added automatically. %
@@ -1261,15 +1386,21 @@
% classification mathématique par matières de l'article. Son
% interface est la suivante: %
% \fi
-% \begin{quote}
-% \def\LEVEL{\ifenglish level\else niveau\fi}
-% \def\CODE{\ifenglish code\else rubrique\fi}
-% \cmdprint{\begin}\code{\{classification\}}\oarg{type} \\
-% \cmdprint{\item}\oarg{\LEVEL} \emph{{\CODE} 1}, \emph{{\CODE} 2}, \dots \\
-% \cmdprint{\item}\oarg{\LEVEL} \emph{{\CODE} 1}, \emph{{\CODE} 2}, \dots \\
-% \code{...} \\
-% \cmdprint{\end}\code{\{classification\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\def\LEVEL{\ifenglish level\else niveau\fi}
+\def\CODE{\ifenglish code\else rubrique\fi}
+\begin{lstlisting}
+\begin{classification}`\oarg{type}'
+\item`\oarg{\LEVEL} \normalfont\itshape{\CODE} 1, {\CODE} 2, \dots'
+\item`\oarg{\LEVEL} \normalfont\itshape{\CODE} 1, {\CODE} 2, \dots'
+...
+\end{classification}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish%
% The classification system used is %
% \else%
@@ -1331,7 +1462,53 @@
% les options \code{review}, \code{supplement} et \code{nocjs},
% l'espace est remplacé par un pied de page contenant le numéro de
% page. %
-% \fi%
+% \fi
+%
+% \ifenglish%
+% \subsubsection{ADNI data use agreement}
+% \else%
+% \subsubsection{Contrat d'utilisation des données de l'ADNI}
+% \fi
+% \label{sec:usage:titling:adni}
+%
+% \ifenglish%
+% The Alzheimer’s Disease Neuroimaging Initiative (ADNI) %
+% \else%
+% Le %
+% \fi
+% \href{https://adni.loni.usc.edu/wp-content/uploads/how_to_apply/ADNI_DSP_Policy.pdf}{\ifenglish Data Sharing and Publication Policy\else contrat d'utilisation des données\fi} %
+% \ifenglish%
+% requires authors using their data to acknowledge ADNI in the list of
+% authors and give a specific statement on the title page. %
+% \else%
+% de l'Alzheimer’s Disease Neuroimaging Initiative (ADNI) stipule que
+% les auteurs qui ont recours à leurs données doivent reconnaitre la
+% contribution de l'ADNI parmi les auteurs et inclure une déclaration
+% spécifique sur la page de titre de l'article. %
+% \fi
+%
+% \begin{DescribeMacro}{\ADNIacknowledgement}
+% \ifenglish%
+% The command \cmd{\ADNIacknowledgement} adds these two
+% requirements. The command has no arguments; simply insert it after
+% the declarations of the authors. %
+% \else%
+% La commande \cmd{\ADNIacknowledgement} ajoute ces deux exigences.
+% La commande n'a aucun argument; insérez simplement celle-ci après
+% toutes les autres définitions des auteurs. %
+% \fi
+% \end{DescribeMacro}
+%
+% \begin{DescribeMacro}{\ADMCacknowledgement}
+% \ifenglish%
+% Similarly, the command \cmd{\ADMCacknowledgement} acknowledges the
+% Alzheimer’s Disease Meta\-bo\-lomics Consortium (ADMC). %
+% \else%
+% De manière analogue, la commande \cmd{\ADMCacknowledgement}
+% reconnait la contribution du
+% Alzheimer’s Disease Metabolomics Consortium (ADMC). %
+% \fi
+% \end{DescribeMacro}
%
% \ifenglish%
% \subsection{Back matter information}
@@ -1342,17 +1519,19 @@
%
% \ifenglish%
% Articles in {\TheCJS} end with elements forming the so-called back
-% matter: supplementary material available online, acknowledgements,
-% etc. The class {\CJSclass} provides specialized environments to
-% enter this information. See \autoref{tab:titling} for a summary; the
-% detailed descriptions follow. %
+% matter: supplementary material available online, data sharing
+% statement, acknowledgements, etc. The class {\CJSclass} provides
+% specialized environments to enter this information. See
+% \autoref{tab:titling} for a summary; the detailed descriptions
+% follow. %
% \else%
% Un article de {\LaRevue} se termine par la présentation d'un
% ensemble d'informations dans des parties annexes: matériel
-% additionnel disponible en ligne, remerciements, etc. La classe
-% {\CJSclass} définit des environnements pour entrer ce type
-% d'information de manière uniforme. Le \autoref{tab:backmatter} en
-% présente un sommaire; les descriptions détaillées suivent. \fi
+% additionnel disponible en ligne, conditions de partage des données,
+% remerciements, etc. La classe {\CJSclass} définit des environnements
+% pour entrer ce type d'information de manière uniforme. Le
+% \autoref{tab:backmatter} en présente un sommaire; les descriptions
+% détaillées suivent. \fi
%
% \begin{table}[t]
% \centering
@@ -1428,18 +1607,34 @@
% \fi
% \end{DescribeEnv}
%
+% \changes{1.1}{2024-01-23}{Documentation: revise the description of
+% the \texttt{sharing} environment now that the CJS adhered to the
+% Expects Data Sharing editorial policy of Wiley.}
% \begin{DescribeEnv}{sharing}
+% \def\POLICYNAME{\ifenglish Expects Data Sharing\else \emph{Expects Data Sharing}\fi}
+% \ifenglish%
+% {\TheCJS} adheres to the %
+% \else%
+% {\LaRevue} respecte la politique éditoriale %
+% \fi%
+% \href{https://authorservices.wiley.com/author-resources/Journal-Authors/open-access/data-sharing-citation/data-sharing-policy.html}{\POLICYNAME} %
% \ifenglish%
-% If you wish to share data or the code, use the environment
-% \code{sharing} to describe how to access this material, providing
-% a persistent identifier, such as a digital object identifier (DOI)
-% or a URL. %
+% editorial policy of Wiley. Therefore, you must use the environment
+% \code{sharing} to make a statement about the availability or
+% absence of shared data. In case of ethical or legal concerns, we
+% encourage you to provide synthetic data instead if possible.
+% Provide a persistent identifier to access the data, such as a
+% digital object identifier (DOI) or a URL. You may also use the
+% environment to describe how to access shared computer code. %
% \else%
-% Si vous mettez les données ou le code de votre article à
-% disposition, utilisez l'environnement \code{sharing} pour
-% expliquer comment accéder à ce matériel et pour indiquer un lien
-% permanent, comme un identificateur d'objets numériques (DOI) ou
-% une adresse URL. %
+% de Wiley. Par conséquent, vous devez utiliser l'environnement
+% \code{sharing} pour préciser les conditions de partage des données
+% de recherche, ou encore leur absence, le cas échéant. En cas
+% d'enjeux éthiques ou légaux, veuillez utiliser si possible des
+% données de synthèse. Indiquez un lien permanent pour accéder aux
+% données, comme un identificateur d'objets numériques (DOI) ou une
+% adresse URL. Vous pouvez aussi utiliser l'environnement pour
+% indiquer comment accéder à du code informatique partagé. %
% \fi
% \end{DescribeEnv}
%
@@ -1644,10 +1839,16 @@
% la page de titre du présent document a été composée avec la commande
% suivante: %
% \fi
-% \begin{quote}
-% \cmd{\licence}\code{\{\{}\cmdprint{\ccbysa*}\code{\} {\year}, Statistical Society of Canada \{}\cmdprint{\textbar}\code{\}} \\
-% \verb+ +\code{Société canadienne de statistique\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\licence{{\ccbysa*} `\year', Statistical Society of Canada {\textbar}
+ Société canadienne de statistique}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
%
% \ifenglish%
% \subsection{Mathematics}
@@ -1655,6 +1856,8 @@
% \subsection{Mathématiques}
% \fi
% \label{sec:usage:mathematics}
+% \changes{1.1}{2024-01-23}{Documentation: specify that the class is
+% not compatible with the package \textbf{amssymb}.}
%
% \ifenglish%
% The class automatically loads the packages %
@@ -1666,16 +1869,18 @@
% \ifenglish%
% and, when the document is compiled with {\XeLaTeX}, %
% \else%
-% et, lorsque le document est compilé avec {\XeLaTeX},
+% et, lorsque le document est compilé avec {\XeLaTeX}, %
% \fi%
% \href{https://ctan.org/pkg/unicode-math}{\pkg{unicode-math}}. %
% \ifenglish%
-% The class also defines a number of commands and environments to
-% standardize the typesetting of mathematical content in {\TheCJS}.
+% Note that it is not compatible with the package \pkg{amssymb}. The
+% class also defines a number of commands and environments to
+% standardize the typesetting of mathematical content in {\TheCJS}. %
% \else%
-% Elle définit également des commandes et des environnements pour
-% assurer une mise en forme standardisée des mathématiques dans
-% {\LaRevue}.
+% En revanche, elle n'est pas compatible avec le paquetage
+% \pkg{amssymb}. La classe définit également des commandes et des
+% environnements pour assurer une mise en forme standardisée des
+% mathématiques dans {\LaRevue}. %
% \fi
%
% \ifenglish%
@@ -1724,6 +1929,9 @@
% \cmd{\mat} &
% \ifenglish matrix or vector \else matrice ou vecteur \fi &
% \cmdprint{\mat}\code{\{A\}} & $\mat{A}$ \\
+% \cmd{\matit} &
+% \ifenglish matrix or vector (italic) \else matrice ou vecteur (italique) \fi &
+% \cmdprint{\matit}\code{\{x\}} & $\matit{x}$ \\
% \cmd{\trsp} &
% \ifenglish transposition \else transposée \fi &
% \cmdprint{\mat}\code{\{A\}}\cmdprint{\trsp} & $\mat{A}\trsp$ \\
@@ -1800,7 +2008,7 @@
% \begin{tabbing}
% \hspace*{2.5em}\=\cmd{\prdist}\code{\{E\}(\cmd{\lambda})}%
% \quad\=$\rightarrow$ \quad\=$\prdist{N}(0, 1)$ \quad\=\kill
-% \>\cmd{\prdist}\code{\{N\}(0, 1)}%
+% \>\cmd{\prdist}\code{\{N\}(0, 1)} %
% \>$\rightarrow$ %
% \>$\prdist{N}(0, 1)$ %
% \>(\ifenglish Normal\else normale\fi) \\
@@ -1816,26 +2024,36 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\mat}
-% \begin{DescribeMacro}{\trsp}
-% \begin{DescribeMacro}{\tr}
-% \begin{DescribeMacro}{\diag}
+% \begin{DescribeMacro}{\matit}
% \ifenglish%
% The command \cmd{\mat} typesets a variable in roman bold, a style
% often used for matrices and vectors (hence the name of the
-% command). To indicate matrix transposition, use only the command
-% \cmd{\trsp}. The commands \cmd{\tr} and \cmd{\diag} define two
-% other common linear algebra operators, the trace and the
-% diagonal. %
+% command). The command \cmd{\matit} is similar, but for a variable
+% in bold italic.
% \else%
% La commande \cmd{\mat} compose une variable en romain gras, ce qui
% est souvent utilisé pour les matrices et les vecteurs (d'où le nom
-% de la commande). Pour indiquer la transposée d'une matrice,
-% utilisez uniquement la commande \cmd{\trsp}. Les commandes
-% \cmd{\tr} et \cmd{\diag} définissent deux autres opérateurs
-% courants en algèbre linéaire, la trace et la diagonale. %
+% de la commande). La commande \cmd{\matit} produit plutôt une
+% variable en gras italique.
% \fi
% \end{DescribeMacro}
% \end{DescribeMacro}
+%
+% \begin{DescribeMacro}{\trsp}
+% \begin{DescribeMacro}{\tr}
+% \begin{DescribeMacro}{\diag}
+% \ifenglish%
+% To indicate matrix transposition, use only the command
+% \cmd{\trsp}. The commands \cmd{\tr} and \cmd{\diag} define
+% two other common linear algebra operators, the trace and the
+% diagonal. %
+% \else%
+% Pour indiquer la transposée d'une matrice, utilisez uniquement la
+% commande \cmd{\trsp}. Les commandes \cmd{\tr} et \cmd{\diag}
+% définissent deux autres opérateurs courants en algèbre linéaire,
+% la trace et la diagonale. %
+% \fi
+% \end{DescribeMacro}
% \end{DescribeMacro}
% \end{DescribeMacro}
%
@@ -1999,6 +2217,23 @@
% Évitez si possible les indices doubles et n'utilisez jamais
% d'indices triples. %
% \fi
+% \changes{1.1}{2024-03-06}{Documentation: add an advice on the
+% typesetting of bold symbols in mathematics.}
+% \item %
+% \ifenglish%
+% Bold in mathematics is a tricky issue. Use the aforementioned
+% class commands \cmdprint{\mat} and \cmdprint{\matit} to generate
+% bold symbols reliably across {\TeX} engines. With {\XeLaTeX},
+% \cmdprint{\mat} also works with Greek letters (that will be
+% typeset in italic). %
+% \else%
+% La composition en gras en mathématiques est une opération
+% délicate. Utilisez les commandes de la classe \cmdprint{\mat} et
+% \cmdprint{\matit} mentionnées précédemment pour composer
+% automatiquement des symboles en gras quelque soit le moteur
+% {\TeX}. Avec {\XeLaTeX}, \cmdprint{\mat} fonctionne aussi avec les
+% lettres grecques (qui sont alors composées en italique). %
+% \fi
% \item %
% \ifenglish%
% Always use the command \cmdprint{\ell} to obtain the symbol
@@ -2094,13 +2329,19 @@
% («équation», «inégalité», «relation», etc.), ainsi que par une
% espace insécable: %
% \fi
-% \begin{quote}
-% \def\LABEL{\ifenglish label\else étiquette\fi}
-% \def\EQN{\ifenglish equation\else équation\fi}
-% \def\INEQ{\ifenglish inequalities\else inégalités\fi}
-% \code{\EQN~}\cmdprint{\eqref}\marg{\LABEL} \\
-% \code{\INEQ~}\cmdprint{\eqref}\marg{\LABEL}\code{{-}{-}}\cmdprint{\eqref}\marg{\LABEL}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+ \def\LABEL{\ifenglish label\else étiquette\fi}
+ \def\EQN{\ifenglish equation\else équation\fi}
+ \def\INEQ{\ifenglish inequalities\else inégalités\fi}
+\begin{lstlisting}
+`\EQN'~\eqref`\marg{\LABEL}'
+`\INEQ'~\eqref`\marg{\LABEL}'--\eqref`\marg{\LABEL}'
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \end{itemize}
%
% \ifenglish%
@@ -2533,72 +2774,137 @@
% description pour un nouvel environnement \meta{env}, insérez la
% commande suivante dans le préambule de votre document: %
% \fi
-% \begin{quote}
-% \cmdprint{\addto}\cmdprint{\extras}\code{\languagename}\code{\{}\cmdprint{\def}\code{\bs}\meta{env}\code{autorefname}\marg{description}\code{\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\addto\extras`\languagename'{\def\`\meta{env}'autorefname`\marg{description}'}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish%
% (If the main language of the article is French, replace
% \cmdprint{\extras}\code{\languagename} by
-% \cmdprint{\extrasfrench}.)\footnote{%
+% \cmdprint{\extrasfrench}.\footnote{%
% For further details, see Section~6 of the documentation of
-% \pkg{hyperref}.} %
+% \pkg{hyperref}.}) %
% \else%
% (Si la langue principale de l'article est l'anglais, remplacez
% \cmdprint{\extras}\code{\languagename} par
-% \cmdprint{\extrasenglish}.)\footnote{%
+% \cmdprint{\extrasenglish}.\footnote{%
% Consultez au besoin la section~6 de la documentation de
-% \pkg{hyperref}.} %
+% \pkg{hyperref}.}) %
% \fi
%
% \begin{DescribeMacro}{\texorpdfstring}
% \changes{0.93}{2023-11-07}{Fix the name of a command from
% \cs{textorpdfstring} to the correct \cs{texorpdfstring} in the
-% documentation.}
+% documentation.}%
+% \changes{1.1}{2024-03-12}{Documentation: mention to also use
+% \cs{texorpdfstring} to fix \texttt{Token not allowed in a PDF
+% string} warnings.}
% \ifenglish%
-% The compilation of your manuscript may halt with the error message
+% The package \pkg{hyperref} builds the table of contents of the
+% PDF. If you use mathematical notation or symbols in a section
+% title, compilation of your manuscript may either result in
+% warnings of the form %
+% \else%
+% Le paquetage \pkg{hyperref} se charge de produire la table des
+% matières du fichier PDF. Si vous utilisez de la notation ou des
+% symboles mathématiques dans un titre de section, la compilation de
+% votre article pourrait soit résulter en des avertissements de la
+% forme %
+% \fi%
% \begin{quote}
-% \code{Improper alphabetic constant}
+% Token not allowed in a PDF string
% \end{quote}
-% The reason is most likely that you use a mathematical symbol in a
-% section title that \pkg{hyperref} is not able to properly
-% translate for the table of contents of the PDF. If you need
-% the symbol, try wrapping it in \cmd{\texorpdfstring}. This
-% command takes two arguments: the symbol that should appear in the
-% document, and the replacement text for the table of contents. For
-% example, you would replace %
+% \ifenglish%
+% or halt with the error message %
% \else%
-% Il se pourrait que la compilation de votre article échoue avec le
-% message d'erreur
+% ou échouer avec le message d'erreur %
+% \fi%
% \begin{quote}
% \code{Improper alphabetic constant}
% \end{quote}
-% La cause en est probablement un symbole mathématique placé dans un
-% titre de section que \pkg{hyperref} n'arrive pas à traduire pour
-% la table des matières du fichier PDF. Si vous ne pouvez vous
-% passer du symbole dans le titre, essayez d'utiliser la commande
-% \cmd{\texorpdfstring} dans celui-ci. Cette commande requiert deux
-% arguments: le texte qui doit apparaitre dans le document et celui
-% qui peut figurer dans la table des matières. Par exemple, vous
-% devriez remplacer %
+% \ifenglish%
+% If you need the notation or symbol in the title, wrap it in
+% \cmd{\texorpdfstring}. This command takes two arguments: the
+% notation or symbol that should appear in the document, and the
+% replacement text for the table of contents. For example, you would
+% replace %
+% \else%
+% Si vous ne pouvez vous passer de la notation ou du symbole dans le
+% titre, utilisez la commande \cmd{\texorpdfstring} dans celui-ci.
+% Cette commande requiert deux arguments: le texte qui doit
+% apparaitre dans le document et celui qui peut figurer dans la
+% table des matières. Par exemple, vous devriez remplacer %
% \fi%
-% \def\TEXT{Contribution \ifenglish of \else de \fi}
-% \begin{quote}
-% \cmdprint{\subsection}\code{\{\TEXT $}\cmdprint{\beta}\code{$\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\def\TEXT{\ifenglish Algorithm for\else Algorithme pour\fi}
+\begin{lstlisting}
+\section{`\TEXT' $U_n$}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% \ifenglish%
+% by something along the lines of %
+% \else%
+% par quelque chose comme %
+% \fi%
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\section{`\TEXT' \texorpdfstring{$U_n$}{U[n]}}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% \ifenglish%
+% You would also replace %
+% \else
+% De même, vous devriez remplacer %
+% \fi%
+% \iffalse
+%<*example>
+% \fi
+\def\TEXT{Contribution \ifenglish of\else de\fi}
+\begin{lstlisting}
+\subsection{`\TEXT' $\beta$}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish by\else par\fi
-% \begin{quote}
-% \cmdprint{\subsection}\code{\{\TEXT}\cmdprint{\texorpdfstring}\code{\{$}\cmdprint{\beta}\code{$\}\{beta\}\}}
-% \end{quote}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\subsection{`\TEXT' \texorpdfstring{$\beta$}{beta}}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% \ifenglish or even\else ou encore\fi
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\subsection{`\TEXT' \texorpdfstring{$\beta$}{`β'}}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
% \ifenglish%
-% or, even better if you can enter Unicode characters on the
-% keyboard, by %
+% if you can enter Unicode characters on the keyboard. %
% \else%
-% ou même, si vous pouvez entrer des caractères Unicode au clavier,
-% par %
+% si vous êtes en mesure d'entrer des caractères Unicode au
+% clavier. %
% \fi
-% \begin{quote}
-% \cmdprint{\subsection}\code{\{\TEXT}\cmdprint{\texorpdfstring}\code{\{$}\cmdprint{\beta}\code{$\}\{β\}\}}
-% \end{quote}
% \end{DescribeMacro}
%
% \warningbox{%
@@ -2782,12 +3088,12 @@
% \fi
% \item %
% \ifenglish%
-% (Optional) Appendices --- sections numbered A, B, \dots\ after the
-% command \cmd{\appendix} --- for proofs and longer mathematical
+% (Optional) Appendices---sections numbered A, B, \dots\ after the
+% command \cmd{\appendix}---for proofs and longer mathematical
% arguments. Each appendix must be cited in the main article. %
% \else%
-% (Optionnel) Les annexes --- des sections numérotées A, B, \dots\
-% suite à la commande \cmd{\appendix} ---- pour les démontrations de
+% (Optionnel) Les annexes~--- des sections numérotées A, B, \dots\
+% suite à la commande \cmd{\appendix}~--- pour les démontrations de
% théorèmes ou autres longs développements mathématiques. Chaque
% annexe doit être citée dans l'article. %
% \fi
@@ -2871,10 +3177,11 @@
% \end{itemize}
% Les informations de la page de titre et des parties annexes peuvent
% toujours figurer dans le code source. Autrement dit, vous pouvez
-% créer le matérial additionnel directement à partir du même préambule
-% --- ou gabarit --- que votre article principal; il suffit d'ajouter
+% créer le matérial additionnel directement à partir du même
+% préambule que votre article principal; il suffit d'ajouter
% \code{supplement} aux options de la classe. %
-% \fi \endgroup
+% \fi
+% \endgroup
%
% \ifenglish%
% The option \code{supplement} is compatible with the option
@@ -2955,7 +3262,7 @@
% at the bottom of the first page. The option has no other effect on
% the rendering of the article. %
% \else%
-% L'option \code{final} --- qui a préséance sur \code{review} ---
+% L'option \code{final}~--- qui a préséance sur \code{review}~---
% active la vérification que les informations de publication et que
% l'historique de révision sont fournis. De plus, si les
% informations d'octroi de licence sont fournies à l'aide des
@@ -3006,10 +3313,79 @@
% \else%
% AAAA-MM-JJ. Par exemple: %
% \fi
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\received{`\isodate'}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% \end{DescribeMacro}
+% \end{DescribeMacro}
+%
+% \begin{DescribeMacro}{\specialack}
+% \ifenglish%
+% The command \cmd{\specialack} provides a generic interface to
+% give special acknowledgement on the title page, such as the one
+% required by ADNI (\autoref{sec:usage:titling:adni}). The
+% command takes two arguments: %
+% \else%
+% La commande \cmd{\specialack} permet de reconnaitre une
+% contribution spéciale sur la page de titre, telle que celle exigée
+% par l'ADNI (\autoref{sec:usage:titling:adni}). La commande requiert
+% deux arguments: %
+% \fi%
% \begin{quote}
-% \cmdprint{\received}\code{\{2023-06-20\}}
+% \cmdprint{\specialack}\marg{\ifenglish by-line\else signature\fi}\marg{\ifenglish statement\else déclaration\fi}
% \end{quote}
+% \ifenglish%
+% The \meta{by-line} is inserted in the list of authors, whereas the
+% \meta{statement} is typeset at the bottom of the title page, with
+% the licensing information. Each argument may be empty, in which
+% case the corresponding information is not printed. For example,
+% the command \cmd{\ADNIacknowledgement} is effectively defined
+% as: %
+% \else%
+% La \meta{signature} est ajoutée à la liste des auteurs, alors que
+% la \meta{déclaration} est affichée au bas de la page de titre,
+% avec la déclaration de licence. Chaque argument peut être vide,
+% auquel cas l'information correspondante n'est pas affichée. À
+% titre d'exemple, la commande \cmd{\ADNIacknowledgement} est
+% définie ainsi: %
+% \fi%
+% \begin{quote}
+% \cmdprint{\specialack}\code{\{}\cmdprint{\CJS@adnibyline}\code{\}\{}\cmdprint{\CJS@adnistatement}\code{\}}
+% \end{quote}
+% \ifenglish%
+% (The internal commands \cmd{\CJS@adnibyline} and
+% \cmd{\CJS@adnistatement} typeset the official ADNI by-line and
+% statement. The analogous commands \cmd{\CJS@admcbyline} and
+% \cmd{\CJS@admcstatement} serve the same purpose for the
+% Alzheimer’s Disease Metabolomics Consortium.) %
+% \else%
+% (Les commandes internes \cmd{\CJS@adnibyline} et
+% \cmd{\CJS@adnistatement} contiennent le texte officiel de la
+% signature et de la déclaration de l'ADNI. Les commandes analogues
+% \cmd{\CJS@admcbyline} et \cmd{\CJS@admcstatement} pour
+% l'Alzheimer’s Disease Metabolomics Consortium sont également
+% définies dans la classe.) %
+% \fi%
% \end{DescribeMacro}
+%
+% \begin{DescribeMacro}{\specialackmark}
+% \ifenglish%
+% The command \cmd{\specialackmark} sets the footnote marker used by
+% \cmd{\specialack}. The default definition of the marker is: %
+% \else%
+% La commande \cmd{\specialackmark} permet de modifier l'appel de
+% note de bas de page utilisé par \cmd{\specialack}. La définition
+% par défaut de l'appel de note est: %
+% \fi%
+% \begin{quote}
+% \cmdprint{\textsuperscript}\code{\{}\cmdprint{\ensuremath}\code{\{*\}\}}
+% \end{quote}
% \end{DescribeMacro}
%
% \ifenglish%
@@ -3118,6 +3494,7 @@
\newif\ifCJS@final \CJS@finalfalse % final version?
\newif\ifCJS@titlingfooter \CJS@titlingfooterfalse % footer on title page?
\newif\ifCJS@journalinfo \CJS@journalinfotrue % display journal info?
+\newif\ifCJS@specialack \CJS@specialackfalse % special acknowledgement?
\newif\ifCJS@fancybreak \CJS@fancybreaktrue % display fancy break?
\newif\ifCJS@history \CJS@historyfalse % history present?
\newif\ifCJS@corrauth \CJS@corrauthfalse % corresponding author?
@@ -3198,13 +3575,6 @@
% Useful packages like \pkg{iftex} and \pkg{etoolbox} are already
% loaded by \class{memoir}.
%
-% The package \pkg{iflang} provides expandable checks for the current
-% language based on the macro \cmdprint{\languagename} or hyphenation
-% patterns.
-% \begin{macrocode}
-\RequirePackage{iflang}
-% \end{macrocode}
-%
% We rely on \pkg{natbib} for author-year citations. This package must
% be loaded before \pkg{babel}. The option \code{sectionbib} ensures
% that the bibliography (or list of references) is typeset as a
@@ -3369,6 +3739,9 @@
% {\LuaTeX}, commands from \pkg{fontspec} and \pkg{unicode-math} load
% the OpenType variants of the fonts. The encoding is UTF-8 by default
% for these engines.
+% \changes{1.1}{2024-03-06}{Implementation: explicitly set the option
+% \texttt{bold-style!=TeX} when loading the math font with the modern
+% engines.}
% \begin{macrocode}
\iftutex
\RequirePackage[babel=true]{microtype}
@@ -3388,7 +3761,7 @@
[
Extension = .otf,
Scale = 1,
- Ligatures = TeX
+ bold-style = TeX
]
\setmathfont{FiraMath-Regular}
[
@@ -3436,7 +3809,8 @@
% \label{sec:implementation:layout:colours}
%
% We define some colours used by the class. First, the three main
-% colours of {\TheCJS} logo: %
+% colours of {\TheCJS} logo, hand-picked from the SVG code of the
+% latter: %
% \textcolor{CJSpink}{\rule{1.5em}{1.2ex}} %
% \textcolor{CJSred}{\rule{1.5em}{1.2ex}} %
% \textcolor{CJSyellow}{\rule{1.5em}{1.2ex}}\,.
@@ -3455,8 +3829,8 @@
\definecolor{CJSurl}{rgb}{0.6,0,0} % external links
\definecolor{CJScitation}{rgb}{0,0.5,0} % citations
% \end{macrocode}
-% Finally, the colour of the ORCID icon\footnote{%
-% See \url{https://info.orcid.org/brand-guidelines}.}: %
+% Finally, the colour of the %
+% \href{https://info.orcid.org/brand-guidelines}{ORCID icon}: %
% \textcolor{CJSorcid}{\rule{1.5em}{1.2ex}}\,.
% \begin{macrocode}
\definecolor{CJSorcid}{HTML}{A6CE39}
@@ -3497,12 +3871,12 @@
% The decorative element is created using plain {\TeX} rules. Its
% height and depth are identical to the journal information.
% \begin{macrocode}
-\setbox\z@=\vbox{\sffamily\hbox{\CJS@journalname}\hbox{\bfseries V,}}
\newsavebox\CJS@journalornament
\setbox\CJS@journalornament=\vbox{%
+ \setbox\z@=\vbox{\sffamily\hbox{\CJS@journalname}\hbox{\bfseries V,}}
\setbox\tw@\hbox{\vrule \@width4pt\@height\ht\z@\@depth\dp\z@}
- \hbox{\textcolor{CJSpink}{\copy\tw@}\kern2pt%
- \textcolor{CJSred}{\copy\tw@}\kern2pt%
+ \hbox{\textcolor{CJSpink}{\copy\tw@}\kern2pt
+ \textcolor{CJSred}{\copy\tw@}\kern2pt
\textcolor{CJSyellow}{\copy\tw@}\kern6pt}}
% \end{macrocode}
%
@@ -3535,7 +3909,7 @@
%
% First, a command to set the font.
% \begin{macrocode}
-\newcommand*\CJS@setheadfootfont{%
+\def\CJS@setheadfootfont{%
\firalining\fontsize{9}{13}\selectfont}
% \end{macrocode}
%
@@ -3545,7 +3919,7 @@
\newlength\CJS@headdivheight
\settoheight\CJS@headdivheight{\CJS@setheadfootfont 1}
\setlength\CJS@headdivheight{0.9\CJS@headdivheight}
-\newcommand*\CJS@headdivrule{%
+\def\CJS@headdivrule{%
\rule[0.05\CJS@headdivheight]{0.75\normalrulethickness}{\CJS@headdivheight}}
% \end{macrocode}
%
@@ -3614,7 +3988,7 @@
% \label{sec:implementation:layout:titles}
%
% The \class{memoir} class assumes that sectioning starts at the
-% chapter level --- even with the \code{article} option. To get around
+% chapter level---even with the \code{article} option. To get around
% this requirement, we disable the effect of \cmdprint{\chapter}. A
% desirable side effect is to make \cmd{\autoref} work correctly for
% appendices.
@@ -4160,6 +4534,11 @@
\fancybreak{\pfbreakdisplay}
\fi
% \end{macrocode}
+% \changes{1.1}{2024-06-19}{Implementation: fix the positioning of the
+% licensing information at the bottom of the title page.}
+% \changes{1.1}{2024-06-26}{Implementation: include the special
+% acknowledgement statement in the licensing information, if
+% required.}
% Finally, unless overridden by a class option, allocate space
% for the licence statement at the bottom of the title page. By
% default, a notice indicates that the licence will appear
@@ -4173,11 +4552,12 @@
\iflanguage{french}{Futur emplacement de la déclaration de licence.}%
{Licence statement to appear here.}}
\begin{figure}[!b]
- \raisebox{0pt}[0pt][\footskip]{%
+ \raisebox{0pt}[0pt][\dimexpr\CJS@licenceht-\footskip\relax]{%
\vbox{%
\CJS@setlicencefont
\rule{\textwidth}{\normalrulethickness}
\parbox[t][\CJS@licenceht][t]{\textwidth}{%
+ \ifCJS@specialack\CJS@specialackstatement\fi
\ifCJS@final\CJS@licence \else\textit\CJS@notice \fi}}}
\end{figure}
\fi
@@ -4185,6 +4565,45 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{ADNI data use agreement}
+% \label{sec:implementation:titling:adni}
+%
+% \changes{1.1}{2024-06-26}{Implementation: define the new commands
+% \cs{ADNIacknowledgement} and \cs{ADMCacknowledgement}.}
+% \begin{macro}{\ADNIacknowledgement}
+% \begin{macro}{\ADMCacknowledgement}
+% The commands \cmd{\ADNIacknowledgement} and
+% \cmd{\ADMCacknowledgement} automatically create special
+% acknowledgements for the Alzheimer’s Disease Neuroimaging
+% Initiative (ADNI) and the Alzheimer’s Disease Metabolomics
+% Consortium (ADMC), respectively.
+% \begin{macrocode}
+\newcommand*\CJS@adnibyline{for the Alzheimer’s Disease Neuroimaging Initiative}
+\newcommand*\CJS@adnistatement{%
+ Data used in preparation of this article were obtained
+ from the \href{https://adni.loni.usc.edu}{Alzheimer’s Disease Neuroimaging Initiative}
+ (ADNI) database. As such, the investigators within the ADNI
+ contributed to the design and implementation of ADNI and/or provided
+ data but did not participate in the analysis or writing of this
+ report. A complete listing of ADNI investigators can be found at:
+ \url{https://adni.loni.usc.edu/wp-content/uploads/how_to_apply/ADNI_Acknowledgement_List.pdf}.}
+\newcommand*\CJS@admcbyline{for the Alzheimer’s Disease Metabolomics Consortium}
+\newcommand*\CJS@admcstatement{%
+ Data used in preparation of this article were generated by the
+ Alzheimer’s Disease Metabolomics Consortium (ADMC). As such, the
+ investigators within the ADMC provided data but did not participate
+ in analysis or writing of this report. A complete listing of ADMC
+ investigators can be found at:
+ \url{https://sites.duke.edu/adnimetab/team/}.}
+\newcommand*\ADNIacknowledgement{%
+ \specialack{\CJS@adnibyline}{\CJS@adnistatement}}
+\newcommand*\ADMCacknowledgement{%
+ \renewcommand*\CJS@specialackmark{\textsuperscript{\ensuremath{**}}}
+ \specialack{\CJS@admcbyline}{\CJS@admcstatement}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Back matter}
% \label{sec:implementation:backmatter}
%
@@ -4292,20 +4711,20 @@
%
% First, set the font for the licence statement.
% \begin{macrocode}
-\newcommand*\CJS@setlicencefont{%
+\def\CJS@setlicencefont{%
\firalining\fontsize{8pt}{9pt}\selectfont}
% \end{macrocode}
%
% \begin{macro}{\CJS@measurelicence}
-% We need to compute the required space for a licence statement. The
-% internal command \cmd{\CJS@measurelicence} measures the total
-% height of either the licence statement provided with
-% \cmd{\licence}, or the seemingly longest version of the license
-% statement used by the publisher. The command is used inside
-% \cmd{\maketitle}.
+% We need to compute the required space for a licence statement and,
+% possibly, the ADNI statement. The internal command
+% \cmd{\CJS@measurelicence} measures the total height required using
+% either the licence statement provided with \cmd{\licence}, or the
+% seemingly longest version of the license statement used by the
+% publisher. The command is used inside \cmd{\maketitle}.
% \begin{macrocode}
\newlength\CJS@licenceht
-\newcommand\CJS@licencesample{%
+\def\CJS@licencesample{%
{\ccbyncnd*} 2023 The Authors. The Canadian Journal of
Statistics~{\textbar}~La revue canadienne de statistique published
by Wiley Periodicals LLC on behalf of Statistical Society of
@@ -4319,7 +4738,8 @@
\newcommand\CJS@measurelicence{%
\setbox\CJS@licencebox=\vbox{%
\CJS@setlicencefont
- \ifdefempty{\CJS@licence}{\CJS@licencesample}{\CJS@licence}}
+ \ifCJS@specialack\CJS@specialackstatement\fi
+ \ifdefempty{\CJS@licence}{\CJS@licencesample}{\CJS@licence}}%
\setlength\CJS@licenceht{\dimexpr\ht\CJS@licencebox+\dp\CJS@licencebox}}
% \end{macrocode}
% \end{macro}
@@ -4343,14 +4763,17 @@
% Inspired by the package \pkg{ccicons} (not used by the class since
% \pkg{fontawesome5} contains all the Creative Commons icons).
%
+% \changes{1.1a}{2024-07-25}{Implementation: fix the generation of
+% spacing in the \cs{ccby*} commands.}
% \begin{macro}{\ccby,\ccby*}
% The command \cmd{\ccby} typesets the icons for the Attribution
% licence: {\ccby}.
% \begin{macrocode}
\newcommand*\ccby{\ccby@\@ifstar{~\faCopyright[regular]}\relax}
-\newcommand*\ccby@{\mbox{%
- \faCreativeCommons\kern0.1em%
- \faCreativeCommonsBy\kern0.1em}}
+\def\CJS@fakern{\kern0.1em}
+\def\ccby@{\mbox{%
+ \faCreativeCommons\CJS@fakern
+ \faCreativeCommonsBy\CJS@fakern}}
% \end{macrocode}
% \end{macro}
%
@@ -4359,9 +4782,9 @@
% Attribution"-ShareAlike licence: {\ccbysa}.
% \begin{macrocode}
\newcommand*\ccbysa{\ccbysa@\@ifstar{~\faCopyright[regular]}\relax}
-\newcommand*\ccbysa@{\mbox{%
- \faCreativeCommons\kern0.1em%
- \faCreativeCommonsBy\kern0.1em%
+\def\ccbysa@{\mbox{%
+ \faCreativeCommons\CJS@fakern
+ \faCreativeCommonsBy\CJS@fakern
\faCreativeCommonsSa}}
% \end{macrocode}
% \end{macro}
@@ -4371,9 +4794,9 @@
% Attribution"-NonCommercial licence: {\ccbync}.
% \begin{macrocode}
\newcommand*\ccbync{\ccbync@\@ifstar{~\faCopyright[regular]}\relax}
-\newcommand*\ccbync@{\mbox{%
- \faCreativeCommons\kern0.1em%
- \faCreativeCommonsBy\kern0.1em%
+\def\ccbync@{\mbox{%
+ \faCreativeCommons\CJS@fakern
+ \faCreativeCommonsBy\CJS@fakern
\faCreativeCommonsNc}}
% \end{macrocode}
% \end{macro}
@@ -4384,10 +4807,10 @@
% {\ccbyncsa}.
% \begin{macrocode}
\newcommand*\ccbyncsa{\ccbyncsa@\@ifstar{~\faCopyright[regular]}\relax}
-\newcommand*\ccbyncsa@{\mbox{%
- \faCreativeCommons\kern0.1em%
- \faCreativeCommonsBy\kern0.1em%
- \faCreativeCommonsNc\kern0.1em%
+\def\ccbyncsa@{\mbox{%
+ \faCreativeCommons\CJS@fakern
+ \faCreativeCommonsBy\CJS@fakern
+ \faCreativeCommonsNc\CJS@fakern
\faCreativeCommonsSa}}
% \end{macrocode}
% \end{macro}
@@ -4397,9 +4820,9 @@
% Attribution"-NoDerivatives licence: {\ccbynd}.
% \begin{macrocode}
\newcommand*\ccbynd{\ccbynd@\@ifstar{~\faCopyright[regular]}\relax}
-\newcommand*\ccbynd@{\mbox{%
- \faCreativeCommons\kern0.1em%
- \faCreativeCommonsBy\kern0.1em%
+\def\ccbynd@{\mbox{%
+ \faCreativeCommons\CJS@fakern
+ \faCreativeCommonsBy\CJS@fakern
\faCreativeCommonsNd}}
% \end{macrocode}
% \end{macro}
@@ -4409,10 +4832,10 @@
% Attribution"-NonCommercial"-NoDerivatives licence: {\ccbyncnd}.
% \begin{macrocode}
\newcommand*\ccbyncnd{\ccbyncnd@\@ifstar{~\faCopyright[regular]}\relax}
-\newcommand*\ccbyncnd@{\mbox{%
- \faCreativeCommons\kern0.1em%
- \faCreativeCommonsBy\kern0.1em%
- \faCreativeCommonsNc\kern0.1em%
+\def\ccbyncnd@{\mbox{%
+ \faCreativeCommons\CJS@fakern
+ \faCreativeCommonsBy\CJS@fakern
+ \faCreativeCommonsNc\CJS@fakern
\faCreativeCommonsNd}}
% \end{macrocode}
% \end{macro}
@@ -4447,16 +4870,20 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\mat,\trsp,\tr,\diag}
+% \changes{1.1}{2024-07-13}{Implementation: simpler definition of
+% \cs{mat} and \cs{matit} using \cs{let} instead of \cs{newcommand*}.}
+% \begin{macro}{\mat,\matit,\trsp,\tr,\diag}
% The class provides special commands to typeset matrix and vector
% names, a carefully designed transpose symbol, and the most common
% linear algebra operators.
% \begin{macrocode}
\iftutex
- \newcommand*\mat[1]{\symbf{#1}}
+ \let\mat\symbf
+ \let\matit\symbfit
\newcommand*\trsp{^{\mkern-1.5mu\symsfup{T}}}
\else
- \newcommand*\mat[1]{\mathbf{#1}}
+ \let\mat\mathbf
+ \let\matit\mathbfit
\newcommand*\trsp{^{\mkern-1.5mu\mathsf{T}}}
\fi
\DeclareMathOperator{\tr}{tr}
@@ -4530,6 +4957,8 @@
% \subsection{Computer code and software}
% \label{sec:implementation:software}
%
+% \changes{1.1a}{2024-07-25}{Implementation: prevent hyphenation in
+% \cs{proglang} using a simple \cs{mbox}.}
% \begin{macro}{\proglang}
% The command \cmd{\proglang} provides a means to uniformly typeset
% the name of a software or programming language. The command also
@@ -4537,7 +4966,7 @@
% shortcuts to the most common languages. Notice that the
% \cmd{\Cpplang} case is specially crafted.
% \begin{macrocode}
-\newcommand*\proglang[1]{{\hyphenchar\font=-1 #1}}
+\newrobustcmd*\proglang[1]{\mbox{#1}}
\newcommand*\Rlang{\proglang{R}}
\newcommand*\SASlang{\proglang{SAS}}
\newcommand*\SPSSlang{\proglang{SPSS}}
@@ -4545,13 +4974,13 @@
\newcommand*\Pylang{\proglang{Python}}
\newcommand*\Julialang{\proglang{Julia}}
\newcommand*\Clang{\proglang{C}}
-\newcommand*\CJS@plus{%
+\newcommand*\Cpplang{\proglang{C\CJS@plus\CJS@plus}}
+\def\CJS@plus{%
\ifx\f@family\sfdefault%
\protect\hspace{-.04em}\protect\raisebox{-.125ex}{\larger+}%
\else%
\protect\hspace{-.03em}\protect\raisebox{.25ex}{\smaller+}%
\fi}
-\newcommand*\Cpplang{\proglang{C\CJS@plus\CJS@plus}}
% \end{macrocode}
% \end{macro}
%
@@ -4595,10 +5024,18 @@
% is handled by \pkg{natbib}. We loaded the package with the option
% \code{sectionbib} to obtain the list of references as a section, but
% \class{memoir} will use \cmd{\section} in such instances. We want an
-% unnumbered section. To achieve this efficiently, we redefine
-% the internal command of \class{memoir}.
+% unnumbered section (yet showing in the virtual table of contents of
+% the PDF). To achieve this efficiently, we redefine the internal
+% command of \class{memoir}.
+% \changes{1.1}{2024-07-02}{Implementation: add a
+% \cs{addtocontentsline} command to the redefinition of
+% \cs{@memb@bsec} to include the References section in the virtual
+% table of contents of the PDF.}
% \begin{macrocode}
-\renewcommand{\@memb@bsec}{\section*{\bibname}\prebibhook}
+\renewcommand{\@memb@bsec}{%
+ \section*{\bibname}%
+ \addcontentsline{toc}{section}{\bibname}%
+ \prebibhook}
% \end{macrocode}
%
% Furthermore, we need to redefine the title of the section, because
@@ -4706,14 +5143,14 @@
% \end{macro}
%
% \begin{macro}{\received,\accepted}
-% The article history --- dates when the article was received and
-% accepted --- is printed at the very end of the article when present.
+% The article history---dates when the article was received and
+% accepted---is printed at the very end of the article when present.
% Its treatment involves a number of steps.
%
% First, the dates themselves are input in ISO format YYYY-MM-DD and
% converted in language dependent strings using the package
% \pkg{datetime2}. In English, we want to use the British format
-% without the ordinal for the day: ``1 January 1970''. In French, we
+% without the ordinal for the day: 1 January 1970. In French, we
% can simply rely on the default format.
% \begin{macrocode}
\DTMlangsetup[en-GB]{ord=omit}
@@ -4750,36 +5187,73 @@
% \end{macrocode}
% \end{macro}
%
+% \changes{1.1a}{2024-07-25}{Implementation: replace box registers
+% \cs{@ne} and \cs{thr@@} by \cs{z@} and \cs{tw@}.}
% We also define a decorative element similar to the one used on the
% title page, only adapted for a single line content. To create a
% balanced element, we use the height of a letter with an ascender and
% the depth of the old-style number 4.
% \begin{macrocode}
-\setbox\@ne=\vbox{\hbox{\firaoldstyle\small l4}}
\newsavebox\CJS@historyornament
\setbox\CJS@historyornament=\vbox{%
- \setbox\thr@@\hbox{\vrule \@width1.5pt\@height\ht\@ne\@depth\dp\@ne}
- \hbox{\textcolor{CJSpink}{\copy\thr@@}\kern.75pt%
- \textcolor{CJSred}{\copy\thr@@}\kern.75pt%
- \textcolor{CJSyellow}{\copy\thr@@}\kern3pt}}
+ \setbox\z@=\vbox{\hbox{\firaoldstyle\small l4}}
+ \setbox\tw@\hbox{\vrule \@width1.5pt\@height\ht\z@\@depth\dp\z@}
+ \hbox{\textcolor{CJSpink}{\copy\tw@}\kern.75pt
+ \textcolor{CJSred}{\copy\tw@}\kern.75pt
+ \textcolor{CJSyellow}{\copy\tw@}\kern3pt}}
% \end{macrocode}
%
% Finally, the history information, when present, is printed at the
% end of the article.
% \begin{macrocode}
-\newcommand*\CJS@historybox{
+\def\CJS@historybox{
\par\addvspace{2\baselineskip}\noindent%
\smash{\box\CJS@historyornament \CJS@history}\par%
\vspace*{40pt}}
\AtEndDocument{\ifCJS@journalinfo\ifCJS@history\CJS@historybox\fi\fi}
% \end{macrocode}
% \end{macro}
+%
+% \changes{1.1}{2024-06-26}{Implementation: define the new command
+% \cs{specialack}.}
+% \begin{macro}{\specialack}
+% The command \cmd{\specialack} is the generic interface to give
+% special acknowledgement on the title page. The command inserts its
+% first argument in the list of authors, and its second argument at
+% the bottom of the title page, with the licensing information. Each
+% argument may be empty, in which case the corresponding information
+% is not displayed.
+% \begin{macrocode}
+\def\CJS@specialackstatement{}
+\newcommand*\specialack[2]{%
+ \ifstrempty{#1}{}{%
+ \author{#1\CJS@specialackmark}}
+ \ifstrempty{#2}{}{%
+ \CJS@specialacktrue
+ \renewcommand*\CJS@specialackstatement{\CJS@specialackmark\,#2\medskip\newline}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{1.1}{2024-06-26}{Implementation: define the new command
+% \cs{specialackmark}.}
+% \begin{macro}{\specialackmark}
+% The command \cmd{\specialackmark} changes the footnote marker used
+% by \cmd{\specialack} from its default definition.
+% \begin{macrocode}
+\def\CJS@specialackmark{\textsuperscript{\ensuremath{*}}}
+\newcommand*\specialackmark[1]{%
+ \renewcommand*\CJS@specialackmark{#1}}
+% \end{macrocode}
+% \end{macro}
+%
%</class>
% ^^A <<<<< End of the code of the class
%
% ^^A Change notes for the templates must appear before \Finale
% \changes{0.93}{2023-11-07}{Templates: fix a missing closing brace in
% \cs{author} commands.}
+% \changes{1.1}{2024-01-23}{Templates: revise the description of the
+% \texttt{sharing} environment.}
% \Finale
%
% \iffalse
@@ -4893,18 +5367,18 @@
%<fr> %% la page de titre automatiquement.
\begin{englishabstract}
<Insert your English abstract here. The abstract should be concise
- --- up to 10 lines long --- and descriptive. Avoid symbols as much
- as possible. Formulas are strongly discouraged, and citations
- should be avoided.>
+ (up to 10 lines long) and descriptive. Avoid symbols as much as
+ possible. Formulas are strongly discouraged, and citations should
+ be avoided.>
%<fr> [Un résumé en anglais sera fourni pour les auteurs qui ne peuvent
%<fr> le préparer eux-mêmes.]
\end{englishabstract}
\begin{frenchabstract}
<Insérer le texte du résumé en français ici. Le résumé doit être
- concis --- une dizaine de lignes --- et descriptif. Éviter autant
- que possible les symboles. Les équations mathématiques sont
- fortement découragées et les citations sont à éviter.>
+ concis (une dizaine de lignes) et descriptif. Éviter autant que
+ possible les symboles. Les équations mathématiques sont fortement
+ déconseillées et les citations sont à éviter.>
%<en> [We will supply a French abstract for those authors who
%<en> can't prepare it themselves.]
\end{frenchabstract}
@@ -4958,13 +5432,15 @@
%<fr> <Texte libre>
\end{supplement}
-%<en> %% DATA SHARING (optional - comment out if unused). Describe how to
-%<en> %% access data that you wish to share. Provide a permanent link such
-%<en> %% as a Document Object Identifier (DOI) or an URL.
-%<fr> %% PARTAGE DES DONNÉES (optionnel - commenter si inutilisé).
-%<fr> %% Expliquer comment accéder à des données de l'article mises à
-%<fr> %% disposition. Fournir un lien permanent, comme un identificateur
-%<fr> %% d'objets numériques (DOI) ou une adresse URL.
+%<en> %% DATA SHARING (mandatory). In accordance with the Expect Data
+%<en> %% Sharing editorial policy of Wiley, make a statement about the
+%<en> %% availability or absence of shared data. Provide a permanent link
+%<en> %% such as a Document Object Identifier (DOI) or an URL.
+%<fr> %% PARTAGE DES DONNÉES (obligatoire). Conformément à la politique
+%<fr> %% éditoriale «Expect Data Sharing» de Wiley, vous devez indiquer
+%<fr> %% les conditions de partage des données de recherche, ou l'absence
+%<fr> %% de celles-ci, le cas échéant. Fournir un lien permanent, comme un
+%<fr> %% identificateur d'objets numériques (DOI) ou une adresse URL.
\begin{sharing}
%<en> <Free form text>
%<fr> <Texte libre>
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-en.dbj b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-en.dbj
new file mode 100644
index 00000000000..98372dceb78
--- /dev/null
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-en.dbj
@@ -0,0 +1,611 @@
+%% Driver file to produce cjs-rcs-en.bst from cjs-rcs-merlin.mbs
+%% Originally generated with makebst, version 4.1 (2003/09/08),
+%% on 2023/10/05 at 15:25, then hand edited by Vincent Goulet.
+%%
+\input docstrip
+
+\preamble
+
+Copyright (C) 2023-2024 Statistical Society of Canada | Société
+canadienne de statistique
+
+This file may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in:
+
+ https://www.latex-project.org/lppl.txt
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Vincent Goulet
+<vincent.goulet@act.ulaval.ca>.
+
+This work consists of the master bibliographic style file
+cjs-rcs-merlin.mbs, the language definition file cjs-rcs-english.mbs,
+the driver file cjs-rcs-en.dbj, and the derived file cjs-rcs-en.bst.
+
+\endpreamble
+
+\postamble
+End of customized bst file
+\endpostamble
+
+\keepsilent
+
+\askforoverwritefalse
+\def\MBopts{\from{cjs-rcs-merlin.mbs}{%
+%EXTERNAL FILES:
+%Name of language file: \cfile=cjs-rcs-english.mbs.
+%No included files.
+ head,\MBopta}
+\from{cjs-rcs-english.mbs}{\MBopta}
+\from{cjs-rcs-merlin.mbs}{tail,\MBopta}}
+\def\MBopta{%
+%INTERNAL LANGUAGE SUPPORT (if no external language file)
+% %: (def) English
+% babel,%: Babel
+%--------------------
+ exlang,%: External language file
+%STYLE OF CITATIONS:
+% %: (def) Numerical
+ ay,%: Author-year
+% alph,%: Alpha style, Jon90 or JWB90
+% alph,alf-1,%: Alpha style, Jon90
+% alph,alf-f,%: Alpha style, Jones90
+% cite,%: Cite key
+%--------------------
+%HTML OUTPUT (if non author-year citations)
+% %: (def) Normal LaTeX
+% html,%: Hypertext
+% html,htlist,%: Hypertext list
+% html,htdes,%: Hypertext with keys
+%--------------------
+%AUTHOR--YEAR SUPPORT SYSTEM (if author-year citations)
+ nat,%: Natbib
+% %: (def) Older Natbib
+% alk,%: Apalike
+% har,%: Harvard
+% ast,%: Astronomy
+% cay,%: Chicago
+% nmd,%: Named
+% cn,%: Author-date
+%--------------------
+%HARVARD EXTENSIONS INCLUDED (if Harvard support selected)
+% harnm,%: With Harvard extensions
+% %: (def) Older Harvard
+%--------------------
+%LANGUAGE FIELD
+% %: (def) No language field
+ lang,%: Add language field
+%--------------------
+%ANNOTATIONS:
+ %: (def) No annotations
+% annote,%: Annotations
+%--------------------
+%PRESENTATIONS:
+ %: (def) Do not add presentation type
+% pres,%: Add presentation, speaker not highlighted
+% pres,pres-bf,%: Presentation, speaker bold face
+% pres,pres-it,%: Presentaion, speaker italic
+% pres,pres-sc,%: Presentaion, speaker in small caps
+%--------------------
+%ORDERING OF REFERENCES (if non-author/year and non-alph)
+% %: (def) Alphabetical
+% seq-no,%: Citation order
+% seq-yr,%: Year ordered
+% seq-yrr,%: Reverse year ordered
+%--------------------
+%ORDERING OF REFERENCES (if author-year citations)
+ %: (def) Alphabetical
+% seq-lab,%: By label
+% seq-labc,%: By label and cite order
+% seq-key,%: By label and cite key
+% seq-yr,%: Year ordered
+% seq-yrr,%: Reverse year ordered
+% seq-no,%: Citation order
+%--------------------
+%ORDER ON VON PART (if not citation order)
+ %: (def) Sort on von part
+% vonx,%: Sort without von part
+%--------------------
+%IGNORE FIRST NAMES (if author-year citations)
+ %: (def) Respect first names
+% xintls,%: Sort on surname only
+%--------------------
+%AUTHOR NAMES:
+% ed-au,%: Full, surname last
+% nm-revf,%: Full, surname first
+% nm-init,ed-au,%: Initials + surname
+ nm-rev,%: Surname + initials
+% nm-rv,%: Surname + dotless initials
+% nm-rvvc,%: Surname + comma + spaceless initials
+% nm-rvx,%: Surname + pure initials
+% nm-rvcx,%: Surname + comma + pure initials
+% nm-rvv,%: Surname + spaceless initials
+% nm-rev1,%: Only first name reversed, initials
+% nm-revv1,%: First name reversed, with full names
+%--------------------
+%EDITOR NAMES IN COLLECTIONS (if author names reversed)
+ %: (def) Editor names NOT reversed
+% ed-rev,%: Editor names reversed
+%--------------------
+%POSITION OF JUNIOR (if author names reversed)
+ jnrlst,%: Junior comes last
+% %: (def) Junior between
+%--------------------
+%JUNIOR PART IN THE CITATION (if author-year citations)
+ %: (def) No `junior' part in the citations
+% jnrlab,%: `Junior' in citations
+%--------------------
+%PUNCTUATION BETWEEN AUTHOR NAMES:
+ %: (def) Author names separated by commas
+% aunm-semi,%: Names separated by semi-colon
+% aunm-sl,%: Names separated by slash
+%--------------------
+%ADJACENT REFERENCES WITH REPEATED NAMES:
+ %: (def) Author/editor names always present
+% nmdash,%: Repeated author/editor names replaced by dash
+% nmdash,nmd-2,%: Repeated author/editor names replaced by 2 dashes
+% nmdash,nmd-3,%: Repeated author/editor names replaced by 3 dashes
+%--------------------
+%NUMBER OF AUTHORS IN BIBLIOGRAPHY:
+ %: (def) All authors
+% nmlm,%: Limited authors
+%--------------------
+%AUTHORS IN CITATIONS:
+ %: (def) One author et al
+% mcite,%: Some other truncation scheme
+%--------------------
+%MAX AUTHORS BEFORE ET AL: (if regular cite not selected)
+% mct-1,%: One et al
+% mct-2,%: One, Two et al
+% mct-3,%: One, Two, Three et al
+% mct-4,%: One, Two, Three, Four et al
+% mct-5,%: One, Two, Three, Four, Five et al
+% mct-6,%: One, Two, Three, Four, Five, Six et al
+%--------------------
+%MAX AUTHORS WITHOUT ET AL: (if regular cite not selected)
+% mct-x2,%: Two authors without truncating
+% mct-x3,%: Three authors
+% mct-x4,%: Four authors
+% mct-x5,%: Five authors
+% mct-x6,%: Six authors
+%--------------------
+%TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:
+ %: (def) Normal font for author names
+% nmft,nmft-sc,%: Small caps authors
+% nmft,nmft-it,%: Italic authors
+% nmft,nmft-bf,%: Bold authors
+% nmft,nmft-def,%: User defined author font
+%--------------------
+%FONT FOR FIRST NAMES (if non-default font for authors)
+% %: (def) First names same font as surnames
+% fnm-rm,%: First names in normal font
+% fnm-def,%: First names in user defined font
+%--------------------
+%EDITOR NAMES IN INCOLLECTION ETC:
+% %: (def) Editors incollection normal font
+% nmfted,%: Editors incollection like authors
+%--------------------
+%FONT FOR `AND' IN LIST:
+% %: (def) `And' in author font
+% nmand-rm,%: `And' in normal font
+%--------------------
+%FONT OF CITATION LABELS IN TEXT (if author-year citations)
+ %: (def) Cited authors plain
+% lab,lab-it,%: Cited authors italic
+% lab,lab-sc,%: Cited authors small caps
+% lab,lab-bf,%: Cited authors bold
+% lab,lab-def,%: User defined citation font
+%--------------------
+%FONT FOR `AND' IN CITATIONS (if non-default font for citation lables)
+% %: (def) Cited `and' in author font
+% and-rm,%: Cited `and' in normal font
+%--------------------
+%FONT OF EXTRA LABEL (The extra letter on the year)
+ %: (def) Extra label plain
+% xlab-it,%: Extra label italic
+%--------------------
+%LABEL WHEN AUTHORS MISSING (if author-year citations)
+ keyxyr,%: Year blank when KEY replaces missing author
+% %: (def) Year included when KEY replaces missing author
+%--------------------
+%MISSING DATE (if author-year citations)
+% %: (def) Missing date set to ????
+ blkyear,%: Missing date left blank
+%--------------------
+%DATE POSITION:
+% %: (def) Date at end
+ dt-beg,%: Date after authors
+% dt-jnl,%: Date part of journal spec.
+% dt-end,%: Date at very end
+%--------------------
+%DATE FORMAT (if non author-year citations)
+% %: (def) Plain month and year
+% yr-par,%: Date in parentheses
+% yr-brk,%: Date in brackets
+% yr-col,%: Date preceded by colon
+% yr-per,%: Date preceded by period
+% yr-com,%: Date preceded by comma
+% yr-blk,%: Date preceded by space
+%--------------------
+%SUPPRESS MONTH:
+% %: (def) Date is month and year
+% xmth,%: Date is year only
+%--------------------
+%REVERSED DATE (if including month)
+% %: (def) Date as month year
+% dtrev,%: Date as year month
+%--------------------
+%DATE FORMAT (if author-year citations)
+% %: (def) Year plain
+ yr-par,%: Year in parentheses
+% yr-brk,%: Year in brackets
+% yr-col,%: Year preceded by colon
+% yr-per,%: Year preceded by period
+% yr-com,%: Date preceded by comma
+% yr-blk,%: Year preceded by space
+%--------------------
+%INCLUDE MONTHS:
+ %: (def) Date is year only
+% aymth,%: Include month in date
+%--------------------
+%REVERSED DATE (if including month)
+% %: (def) Date as month year
+% dtrev,%: Date as year month
+%--------------------
+%DATE PUNCTUATION (if date not at end)
+% %: (def) Date with standard block punctuation
+% yrp-col,%: Colon after date
+% yrp-semi,%: Semi-colon after date
+ yrp-per,%: Period after date
+% yrp-x,%: No punct. after date
+%--------------------
+%BLANK AFTER DATE:
+ %: (def) Space after date
+% yrpp-xsp,%: No space after date
+%--------------------
+%DATE FONT:
+ %: (def) Date in normal font
+% dtbf,%: Date in bold face
+%--------------------
+%TRUNCATE YEAR (if author-year citations)
+ note-yr,%: Year text full
+% %: (def) Year truncated
+%--------------------
+%TITLE OF ARTICLE:
+ %: (def) Title plain
+% tit-it,%: Title italic
+% tit-qq,qt-s,%: Title and punctuation in single quotes
+% tit-qq,%: Title and punctuation in double quotes
+% tit-qq,qt-g,%: Title and punctuation in guillemets
+% tit-qq,qt-s,qx,%: Title in single quotes
+% tit-qq,qx,%: Title in double quotes
+% tit-qq,qt-g,qx,%: Title in guillemets
+%--------------------
+%COLLECTION/PROCEEDINGS TITLES (if quoted title)
+% bt-qq,%: Quote collection and proceedings titles
+% %: (def) Collection and proceedings titles not in quotes
+%--------------------
+%CAPITALIZATION OF ARTICLE TITLE:
+ %: (def) Sentence style
+% atit-u,%: Title style
+%--------------------
+%ARTICLE TITLE PRESENT:
+ %: (def) Article title present
+% jtit-x,%: No article title
+%--------------------
+%JOURNAL NAMES:
+ %: (def) Periods in journal names
+% jxper,%: Dotless journal names
+%--------------------
+%JOURNAL NAME FONT:
+ %: (def) Journal name italics
+% jttl-rm,%: Journal name normal
+%--------------------
+%THESIS TITLE:
+ %: (def) Thesis titles like books
+% thtit-a,%: Thesis title like article
+% thtit-x,%: No thesis title
+%--------------------
+%TECHNICAL REPORT TITLE:
+% %: (def) Tech. report title like articles
+ trtit-b,%: Tech. report title like books
+%--------------------
+%TECHNICAL REPORT NUMBER:
+ %: (def) Tech. report and number plain
+% trnum-it,%: Tech. report and number italic
+%--------------------
+%JOURNAL VOLUME:
+ %: (def) Volume plain
+% vol-it,%: Volume italic
+% vol-bf,%: Volume bold
+% vol-2bf,%: Volume and number bold
+%--------------------
+%JOURNAL VOL AND NUMBER:
+ %: (def) Journal vol(num)
+% vnum-sp,%: Journal vol (num)
+% vnum-cm,%: Journal vol, num
+% vnum-nr,%: Journal vol, no. num
+% vnum-h,%: Journal vol, \# number
+% vnum-b,%: Journal vol number
+% vnum-x,%: Journal vol, without number
+%--------------------
+%VOLUME PUNCTUATION:
+ %: (def) Volume with colon
+% volp-sp,%: Volume with colon and space
+% volp-semi,%: Volume with semi-colon
+% volp-com,%: Volume with comma
+% volp-blk,%: Volume with blank
+%--------------------
+%YEAR IN JOURNAL SPECIFICATION:
+ %: (def) Journal year like others
+% jdt-v,%: Journal vol(year)
+% jdt-vs,%: Journal vol (year)
+% jdt-p,%: Year with pages
+% jdt-pc,%: Year, comma, pages
+%--------------------
+%PAGE NUMBERS:
+ %: (def) Start and stop page numbers
+% jpg-1,%: Only start page number
+%--------------------
+%LARGE PAGE NUMBERS:
+ %: (def) No separators for large page numbers
+% pgsep-c,%: Comma inserted over 9999
+% pgsep-s,%: Thin space inserted over 9999
+% pgsep-p,%: Period inserted over 9999
+%--------------------
+%WORD `PAGE' IN ARTICLES:
+ %: (def) Article pages numbers only
+% jwdpg,%: Include `page' in articles
+%--------------------
+%POSITION OF PAGES:
+ %: (def) Pages given mid text
+% pp-last,%: Pages at end
+%--------------------
+%WORD `VOLUME' IN ARTICLES:
+ %: (def) Article volume as number only
+% jwdvol,%: Include `volume' in articles
+%--------------------
+%NUMBER AND SERIES FOR COLLECTIONS:
+ num-xser,%: Allows number without series
+% %: (def) Standard BibTeX
+%--------------------
+%POSITION OF NUMBER AND SERIES:
+% %: (def) After chapter and pages
+ numser,%: Just before publisher
+%--------------------
+%VOLUME AND SERIES FOR BOOKS/COLLECTIONS:
+ %: (def) Vol. 23 of Series
+% ser-vol,%: Series, vol. 23
+%--------------------
+%POSITION OF VOLUME AND SERIES FOR INCOLLECTIONS:
+% %: (def) Series and volume after the editors
+ ser-ed,%: Series and volume after booktitle
+%--------------------
+%JOURNAL NAME PUNCTUATION:
+ %: (def) Comma after journal
+% jnm-x,%: Space after journal
+%--------------------
+%BOOK TITLE:
+ %: (def) Book title italic
+% btit-rm,bt-rm,%: Book title plain
+%--------------------
+%PAGES IN BOOKS:
+ %: (def) Pages in book plain
+% bkpg-par,%: Pages in book in parentheses
+% bkpg-x,%: Pages in book bare
+%--------------------
+%TOTAL PAGES OF A BOOK:
+ %: (def) Total book pages not printed
+% pg-bk,%: For book: 345 pages
+% pg-bk,pg-pre,%: Total book pages before publisher
+%--------------------
+%PUBLISHER ADDRESS:
+ %: (def) Publisher, address
+% add-pub,%: Address: Publisher
+%--------------------
+%PUBLISHER IN PARENTHESES:
+ %: (def) Publisher as normal block
+% pub-par,%: Publisher in parentheses
+% pub-date,%: Publisher and date in parentheses
+% pub-date,pub-xc,%: Publisher and date in parentheses, no comma
+% pub-date,pub-xpar,%: Publisher and date without parentheses
+% pub-date,pub-xpar,pub-xc,%: Publisher and date, no parentheses, no comma
+%--------------------
+%PUBLISHER POSITION:
+% %: (def) Publisher after chapter, pages
+% pre-pub,%: Publisher before chapter, pages
+ pre-edn,%: Publisher after edition
+%--------------------
+%ISBN NUMBER:
+ isbn,%: Include ISBN
+% %: (def) No ISBN
+%--------------------
+%ISSN NUMBER:
+% issn,%: Include ISSN
+ %: (def) No ISSN
+%--------------------
+%DOI NUMBER:
+% doi,%: Include DOI
+ url-doi,%: Format DOI as URL //dx.doi.org/doi
+% agu-doi,doi,%: Insert DOI AGU style
+% %: (def) No DOI
+%--------------------
+%`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):
+ %: (def) Word `editor' after name
+% edpar,%: `Name (editor),'
+% edpar,bkedcap,%: `Name (Editor),'
+% edparc,%: `Name, (editor)'
+% edparc,bkedcap,%: `Name, (Editor)'
+% edparxc,%: `Name (editor)'
+% edparxc,bkedcap,%: `Name (Editor)'
+%--------------------
+%EDITOR IN COLLECTIONS:
+ %: (def) Same as for edited book
+% edby,%: In booktitle, edited by ..
+% edby-par,%: In booktitle (edited by ..)
+% edby-parc,%: In booktitle, (edited by ..)
+% edby,edbyx,%: In booktitle, editor ..
+% edby,edbyw,%: In booktitle, (editor) ..
+% edby-par,edbyx,%: In booktitle (editor..)
+% edby-parc,edbyx,%: In booktitle, (editor..)
+% edby,edbyy,%: In booktitle, .., editor
+% edby-par,edbyy,%: In booktitle (.., editor)
+%--------------------
+%CAPITALIZE `EDITOR' OR `EDITED BY' (if editor capitalizable)
+% %: (def) `(editor,..)' or `(edited by..)'
+% edcap,%: `(Editor,..)' or `(Edited by..)'
+%--------------------
+%PUNCTUATION BETWEEN SECTIONS (BLOCKS):
+ %: (def) \newblock after blocks
+% blk-com,%: Comma between blocks
+% blk-com,com-semi,%: Semi-colon between blocks
+% blk-com,com-blank,%: Blanks between blocks
+% blk-tit,%: Period after titles of articles, books, etc
+% blk-tit,tit-col,%: Colon after titles of articles, books, etc
+% blk-tita,%: Period after titles of articles
+% blk-tita,tit-col,%: Colon after titles of articles
+%--------------------
+%PUNCTUATION BEFORE NOTES (if not using \newblock)
+% %: (def) Notes have regular punctuation
+% blknt,%: Notes preceded by period
+%--------------------
+%PUNCTUATION AFTER AUTHORS:
+ %: (def) Author block normal
+% au-col,%: Author block with colon
+%--------------------
+%PUNCTUATION AFTER `IN':
+ %: (def) Space after `in'
+% in-col,%: Colon after `in'
+% in-it,%: Italic `in'
+% in-col,in-it,%: Italic `in' and colon
+% in-x,%: No word `in'
+%--------------------
+%`IN' WITH JOURNAL NAMES (if using 'in' with collections)
+ %: (def) No `in' before journal name
+% injnl,%: Add `in' before journal name
+%--------------------
+%FINAL PUNCTUATION:
+ %: (def) Period at very end
+% fin-bare,%: No period at end
+%--------------------
+%ABBREVIATE WORD `PAGES' (if not using external language file)
+% %: (def) `Page(s)'
+% pp,%: `Page' abbreviated
+% ppx,%: `Page' omitted
+%--------------------
+%ABBREVIATE WORD `EDITORS':
+% %: (def) `Editor(s)'
+% ed,%: `Editor' abbreviated
+%--------------------
+%OTHER ABBREVIATIONS:
+% %: (def) No abbreviations
+% abr,%: Abbreviations
+%--------------------
+%ABBREVIATION FOR `EDITION' (if abbreviating words)
+% %: (def) `Edition' abbreviated as `edn'
+% ednx,%: `Edition' abbreviated as `ed'
+%--------------------
+%MONTHS WITH DOTS:
+% %: (def) Months with dots
+% mth-bare,%: Months without dots
+%--------------------
+%EDITION NUMBERS:
+% xedn,%: Editions as in database
+% %: (def) Write out editions
+% ord,%: Numerical editions
+%--------------------
+%Reading external language file \cfile=cjs-rcs-english.mbs
+ english,%: English language
+%ABBREVIATE WORD `PAGES'
+ %: (def) `Page(s)'
+% pp,%: `Page' abbreviated
+% ppx,%: `Page' omitted
+%--------------------
+%ABBREVIATE WORD `EDITORS':
+ %: (def) `Editor(s)'
+% ed,%: `Editor' abbreviated
+%--------------------
+%OTHER ABBREVIATIONS:
+% %: (def) No abbreviations
+ abr,%: Abbreviations
+%--------------------
+%ABBREVIATION FOR `EDITION' (if abbreviating words)
+% %: (def) `Edition' abbreviated as `edn'
+ ednx,%: `Edition' abbreviated as `ed'
+%--------------------
+%MONTHS WITH DOTS:
+ %: (def) Months with dots
+% mth-bare,%: Months without dots
+%--------------------
+%EDITION NUMBERS:
+% xedn,%: Editions as in database
+% %: (def) Write out editions
+ ord,%: Numerical editions
+%--------------------
+%STORED JOURNAL NAMES:
+ %: (def) Full journal names
+% jabr,%: Abbreviated journal names
+% jabr,jaa,%: Abbreviated with astronomy shorthands
+%--------------------
+%AMPERSAND:
+ %: (def) Use word `and'
+% amper,%: Use ampersand
+% varand,%: Use \BIBand
+%--------------------
+%COMMA BEFORE `AND':
+ %: (def) Comma before `and'
+% and-xcom,%: No comma before `and'
+% and-com,%: Comma even with 2 authors
+%--------------------
+%COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS (if using comma before `and' with authors)
+% and-com-ed,%: Comma with 2 editors
+% %: (def) Two editors without comma
+%--------------------
+%NO `AND' IN REFERENCE LIST:
+ %: (def) With `and'
+% xand,%: No `and'
+%--------------------
+%COMMA BEFORE `ET AL':
+% %: (def) Comma before `et al'
+ etal-xc,%: No comma before `et al'
+%--------------------
+%FONT OF `ET AL':
+ %: (def) Plain et al
+% etal-it,%: Italic et al
+% etal-rm,%: Roman et al
+%--------------------
+%ADDITIONAL REVTeX DATA FIELDS:
+ %: (def) No additional fields
+% revdata,eprint,url,url-blk,%: Include REVTeX data fields
+%--------------------
+%E-PRINT DATA FIELD: (without REVTeX fields)
+ %: (def) Do not include eprint field
+% eprint,%: Include eprint and archive fields
+%--------------------
+%URL ADDRESS: (without REVTeX fields)
+% %: (def) No URL
+ url,url-blk,%: Include URL
+% url,url-nt,%: URL as note
+% url,url-nl,%: URL on new line
+%--------------------
+%REFERENCE COMPONENT TAGS:
+ %: (def) No reference component tags
+% bibinfo,%: Reference component tags
+%--------------------
+%EMPHASIS: (affects all so-called italics)
+ %: (def) Use emphasis
+% em-it,%: Use true italics
+% em-x,%: No italics
+% em-ul,%: Underlining
+%--------------------
+%COMPATIBILITY WITH PLAIN TEX:
+ nfss,%: Use LaTeX commands
+% plntx,%: Use only Plain TeX
+%--------------------
+,{%
+ }}
+\generate{\file{cjs-rcs-en.bst}{\MBopts}}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-fr.dbj b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-fr.dbj
new file mode 100644
index 00000000000..13be31421c3
--- /dev/null
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-bst-fr.dbj
@@ -0,0 +1,603 @@
+%% Driver file to produce cjs-rcs-fr.bst from cjs-rcs-merlin.mbs
+%% Originally generated with makebst, version 4.1 (2003/09/08),
+%% on 2023/10/11 at 12:01, then hand edited by Vincent Goulet.
+%%
+\input docstrip
+
+\preamble
+
+Copyright (C) 2023-2024 Statistical Society of Canada | Société
+canadienne de statistique
+
+This file may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in:
+
+ https://www.latex-project.org/lppl.txt
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Vincent Goulet
+<vincent.goulet@act.ulaval.ca>.
+
+This work consists of the master bibliographic style file
+cjs-rcs-merlin.mbs, the language definition file cjs-rcs-french.mbs,
+the driver file cjs-rcs-fr.dbj, and the derived file cjs-rcs-fr.bst.
+
+\endpreamble
+
+\postamble
+End of customized bst file
+\endpostamble
+
+\keepsilent
+
+\askforoverwritefalse
+\def\MBopts{\from{cjs-rcs-merlin.mbs}{%
+%EXTERNAL FILES:
+%Name of language file: \cfile=cjs-rcs-french.mbs.
+%No included files.
+ head,\MBopta}
+\from{cjs-rcs-french.mbs}{\MBopta}
+\from{cjs-rcs-merlin.mbs}{tail,\MBopta}}
+\def\MBopta{%
+%INTERNAL LANGUAGE SUPPORT (if no external language file)
+% %: (def) English
+% babel,%: Babel
+%--------------------
+ exlang,%: External language file
+%STYLE OF CITATIONS:
+% %: (def) Numerical
+ ay,%: Author-year
+% alph,%: Alpha style, Jon90 or JWB90
+% alph,alf-1,%: Alpha style, Jon90
+% alph,alf-f,%: Alpha style, Jones90
+% cite,%: Cite key
+%--------------------
+%HTML OUTPUT (if non author-year citations)
+% %: (def) Normal LaTeX
+% html,%: Hypertext
+% html,htlist,%: Hypertext list
+% html,htdes,%: Hypertext with keys
+%--------------------
+%AUTHOR--YEAR SUPPORT SYSTEM (if author-year citations)
+ nat,%: Natbib
+% %: (def) Older Natbib
+% alk,%: Apalike
+% har,%: Harvard
+% ast,%: Astronomy
+% cay,%: Chicago
+% nmd,%: Named
+% cn,%: Author-date
+%--------------------
+%HARVARD EXTENSIONS INCLUDED (if Harvard support selected)
+% harnm,%: With Harvard extensions
+% %: (def) Older Harvard
+%--------------------
+%LANGUAGE FIELD
+% %: (def) No language field
+ lang,%: Add language field
+%--------------------
+%ANNOTATIONS:
+ %: (def) No annotations
+% annote,%: Annotations
+%--------------------
+%PRESENTATIONS:
+ %: (def) Do not add presentation type
+% pres,%: Add presentation, speaker not highlighted
+% pres,pres-bf,%: Presentation, speaker bold face
+% pres,pres-it,%: Presentaion, speaker italic
+% pres,pres-sc,%: Presentaion, speaker in small caps
+%--------------------
+%ORDERING OF REFERENCES (if non-author/year and non-alph)
+% %: (def) Alphabetical
+% seq-no,%: Citation order
+% seq-yr,%: Year ordered
+% seq-yrr,%: Reverse year ordered
+%--------------------
+%ORDERING OF REFERENCES (if author-year citations)
+ %: (def) Alphabetical
+% seq-lab,%: By label
+% seq-labc,%: By label and cite order
+% seq-key,%: By label and cite key
+% seq-yr,%: Year ordered
+% seq-yrr,%: Reverse year ordered
+% seq-no,%: Citation order
+%--------------------
+%ORDER ON VON PART (if not citation order)
+% %: (def) Sort on von part
+ vonx,%: Sort without von part
+%--------------------
+%IGNORE FIRST NAMES (if author-year citations)
+ %: (def) Respect first names
+% xintls,%: Sort on surname only
+%--------------------
+%AUTHOR NAMES:
+% ed-au,%: Full, surname last
+% nm-revf,%: Full, surname first
+% nm-init,ed-au,%: Initials + surname
+% nm-rev,%: Surname + initials
+% nm-rv,%: Surname + dotless initials
+% nm-rvvc,%: Surname + comma + spaceless initials
+% nm-rvx,%: Surname + pure initials
+% nm-rvcx,%: Surname + comma + pure initials
+% nm-rvv,%: Surname + spaceless initials
+ nm-rev1,%: Only first name reversed, initials
+% nm-revv1,%: First name reversed, with full names
+%--------------------
+%EDITOR NAMES IN COLLECTIONS (if author names reversed)
+ %: (def) Editor names NOT reversed
+% ed-rev,%: Editor names reversed
+%--------------------
+%POSITION OF JUNIOR (if author names reversed)
+ jnrlst,%: Junior comes last
+% %: (def) Junior between
+%--------------------
+%JUNIOR PART IN THE CITATION (if author-year citations)
+ %: (def) No `junior' part in the citations
+% jnrlab,%: `Junior' in citations
+%--------------------
+%PUNCTUATION BETWEEN AUTHOR NAMES:
+ %: (def) Author names separated by commas
+% aunm-semi,%: Names separated by semi-colon
+% aunm-sl,%: Names separated by slash
+%--------------------
+%ADJACENT REFERENCES WITH REPEATED NAMES:
+ %: (def) Author/editor names always present
+% nmdash,%: Repeated author/editor names replaced by dash
+% nmdash,nmd-2,%: Repeated author/editor names replaced by 2 dashes
+% nmdash,nmd-3,%: Repeated author/editor names replaced by 3 dashes
+%--------------------
+%NUMBER OF AUTHORS IN BIBLIOGRAPHY:
+ %: (def) All authors
+% nmlm,%: Limited authors
+%--------------------
+%AUTHORS IN CITATIONS:
+ %: (def) One author et al
+% mcite,%: Some other truncation scheme
+%--------------------
+%MAX AUTHORS BEFORE ET AL: (if regular cite not selected)
+% mct-1,%: One et al
+% mct-2,%: One, Two et al
+% mct-3,%: One, Two, Three et al
+% mct-4,%: One, Two, Three, Four et al
+% mct-5,%: One, Two, Three, Four, Five et al
+% mct-6,%: One, Two, Three, Four, Five, Six et al
+%--------------------
+%MAX AUTHORS WITHOUT ET AL: (if regular cite not selected)
+% mct-x2,%: Two authors without truncating
+% mct-x3,%: Three authors
+% mct-x4,%: Four authors
+% mct-x5,%: Five authors
+% mct-x6,%: Six authors
+%--------------------
+%TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:
+ %: (def) Normal font for author names
+% nmft,nmft-sc,%: Small caps authors
+% nmft,nmft-it,%: Italic authors
+% nmft,nmft-bf,%: Bold authors
+% nmft,nmft-def,%: User defined author font
+%--------------------
+%FONT FOR FIRST NAMES (if non-default font for authors)
+% %: (def) First names same font as surnames
+% fnm-rm,%: First names in normal font
+% fnm-def,%: First names in user defined font
+%--------------------
+%EDITOR NAMES IN INCOLLECTION ETC:
+% %: (def) Editors incollection normal font
+% nmfted,%: Editors incollection like authors
+%--------------------
+%FONT FOR `AND' IN LIST:
+% %: (def) `And' in author font
+% nmand-rm,%: `And' in normal font
+%--------------------
+%FONT OF CITATION LABELS IN TEXT (if author-year citations)
+ %: (def) Cited authors plain
+% lab,lab-it,%: Cited authors italic
+% lab,lab-sc,%: Cited authors small caps
+% lab,lab-bf,%: Cited authors bold
+% lab,lab-def,%: User defined citation font
+%--------------------
+%FONT FOR `AND' IN CITATIONS (if non-default font for citation lables)
+% %: (def) Cited `and' in author font
+% and-rm,%: Cited `and' in normal font
+%--------------------
+%FONT OF EXTRA LABEL (The extra letter on the year)
+ %: (def) Extra label plain
+% xlab-it,%: Extra label italic
+%--------------------
+%LABEL WHEN AUTHORS MISSING (if author-year citations)
+ keyxyr,%: Year blank when KEY replaces missing author
+% %: (def) Year included when KEY replaces missing author
+%--------------------
+%MISSING DATE (if author-year citations)
+% %: (def) Missing date set to ????
+ blkyear,%: Missing date left blank
+%--------------------
+%DATE POSITION:
+% %: (def) Date at end
+ dt-beg,%: Date after authors
+% dt-jnl,%: Date part of journal spec.
+% dt-end,%: Date at very end
+%--------------------
+%DATE FORMAT (if non author-year citations)
+% %: (def) Plain month and year
+% yr-par,%: Date in parentheses
+% yr-brk,%: Date in brackets
+% yr-col,%: Date preceded by colon
+% yr-per,%: Date preceded by period
+% yr-com,%: Date preceded by comma
+% yr-blk,%: Date preceded by space
+%--------------------
+%SUPPRESS MONTH:
+% %: (def) Date is month and year
+% xmth,%: Date is year only
+%--------------------
+%REVERSED DATE (if including month)
+% %: (def) Date as month year
+% dtrev,%: Date as year month
+%--------------------
+%DATE FORMAT (if author-year citations)
+% %: (def) Year plain
+% yr-par,%: Year in parentheses
+% yr-brk,%: Year in brackets
+% yr-col,%: Year preceded by colon
+ yr-per,%: Year preceded by period
+% yr-com,%: Date preceded by comma
+% yr-blk,%: Year preceded by space
+%--------------------
+%INCLUDE MONTHS:
+ %: (def) Date is year only
+% aymth,%: Include month in date
+%--------------------
+%REVERSED DATE (if including month)
+% %: (def) Date as month year
+% dtrev,%: Date as year month
+%--------------------
+%DATE PUNCTUATION (if date not at end)
+ %: (def) Date with standard block punctuation
+% yrp-col,%: Colon after date
+% yrp-semi,%: Semi-colon after date
+% yrp-per,%: Period after date
+% yrp-x,%: No punct. after date
+%--------------------
+%BLANK AFTER DATE:
+ %: (def) Space after date
+% yrpp-xsp,%: No space after date
+%--------------------
+%DATE FONT:
+ %: (def) Date in normal font
+% dtbf,%: Date in bold face
+%--------------------
+%TRUNCATE YEAR (if author-year citations)
+ note-yr,%: Year text full
+% %: (def) Year truncated
+%--------------------
+%TITLE OF ARTICLE:
+% %: (def) Title plain
+% tit-it,%: Title italic
+% tit-qq,qt-s,%: Title and punctuation in single quotes
+% tit-qq,%: Title and punctuation in double quotes
+% tit-qq,qt-g,%: Title and punctuation in guillemets
+% tit-qq,qt-s,qx,%: Title in single quotes
+% tit-qq,qx,%: Title in double quotes
+ tit-qq,qt-g,qx,%: Title in guillemets
+%--------------------
+%COLLECTION/PROCEEDINGS TITLES (if quoted title)
+% bt-qq,%: Quote collection and proceedings titles
+ %: (def) Collection and proceedings titles not in quotes
+%--------------------
+%CAPITALIZATION OF ARTICLE TITLE:
+ %: (def) Sentence style
+% atit-u,%: Title style
+%--------------------
+%ARTICLE TITLE PRESENT:
+ %: (def) Article title present
+% jtit-x,%: No article title
+%--------------------
+%JOURNAL NAMES:
+ %: (def) Periods in journal names
+% jxper,%: Dotless journal names
+%--------------------
+%JOURNAL NAME FONT:
+ %: (def) Journal name italics
+% jttl-rm,%: Journal name normal
+%--------------------
+%THESIS TITLE:
+ %: (def) Thesis titles like books
+% thtit-a,%: Thesis title like article
+% thtit-x,%: No thesis title
+%--------------------
+%TECHNICAL REPORT TITLE:
+% %: (def) Tech. report title like articles
+ trtit-b,%: Tech. report title like books
+%--------------------
+%TECHNICAL REPORT NUMBER:
+ %: (def) Tech. report and number plain
+% trnum-it,%: Tech. report and number italic
+%--------------------
+%JOURNAL VOLUME:
+ %: (def) Volume plain
+% vol-it,%: Volume italic
+% vol-bf,%: Volume bold
+% vol-2bf,%: Volume and number bold
+%--------------------
+%JOURNAL VOL AND NUMBER:
+% %: (def) Journal vol(num)
+% vnum-sp,%: Journal vol (num)
+% vnum-cm,%: Journal vol, num
+ vnum-nr,%: Journal vol, no. num
+% vnum-h,%: Journal vol, \# number
+% vnum-b,%: Journal vol number
+% vnum-x,%: Journal vol, without number
+%--------------------
+%VOLUME PUNCTUATION:
+% %: (def) Volume with colon
+% volp-sp,%: Volume with colon and space
+% volp-semi,%: Volume with semi-colon
+ volp-com,%: Volume with comma
+% volp-blk,%: Volume with blank
+%--------------------
+%YEAR IN JOURNAL SPECIFICATION:
+ %: (def) Journal year like others
+% jdt-v,%: Journal vol(year)
+% jdt-vs,%: Journal vol (year)
+% jdt-p,%: Year with pages
+% jdt-pc,%: Year, comma, pages
+%--------------------
+%PAGE NUMBERS:
+ %: (def) Start and stop page numbers
+% jpg-1,%: Only start page number
+%--------------------
+%LARGE PAGE NUMBERS:
+% %: (def) No separators for large page numbers
+% pgsep-c,%: Comma inserted over 9999
+ pgsep-s,%: Thin space inserted over 9999
+% pgsep-p,%: Period inserted over 9999
+%--------------------
+%WORD `PAGE' IN ARTICLES:
+% %: (def) Article pages numbers only
+ jwdpg,%: Include `page' in articles
+%--------------------
+%POSITION OF PAGES:
+ %: (def) Pages given mid text
+% pp-last,%: Pages at end
+%--------------------
+%WORD `VOLUME' IN ARTICLES:
+% %: (def) Article volume as number only
+ jwdvol,%: Include `volume' in articles
+%--------------------
+%NUMBER AND SERIES FOR COLLECTIONS:
+ num-xser,%: Allows number without series
+% %: (def) Standard BibTeX
+%--------------------
+%POSITION OF NUMBER AND SERIES:
+% %: (def) After chapter and pages
+ numser,%: Just before publisher
+%--------------------
+%VOLUME AND SERIES FOR BOOKS/COLLECTIONS:
+% %: (def) Vol. 23 of Series
+ ser-vol,%: Series, vol. 23
+%--------------------
+%POSITION OF VOLUME AND SERIES FOR INCOLLECTIONS:
+% %: (def) Series and volume after the editors
+ ser-ed,%: Series and volume after booktitle
+%--------------------
+%JOURNAL NAME PUNCTUATION:
+ %: (def) Comma after journal
+% jnm-x,%: Space after journal
+%--------------------
+%BOOK TITLE:
+ %: (def) Book title italic
+% btit-rm,bt-rm,%: Book title plain
+%--------------------
+%PAGES IN BOOKS:
+ %: (def) Pages in book plain
+% bkpg-par,%: Pages in book in parentheses
+% bkpg-x,%: Pages in book bare
+%--------------------
+%TOTAL PAGES OF A BOOK:
+% %: (def) Total book pages not printed
+ pg-bk,%: For book: 345 pages
+% pg-bk,pg-pre,%: Total book pages before publisher
+%--------------------
+%PUBLISHER ADDRESS:
+ %: (def) Publisher, address
+% add-pub,%: Address: Publisher
+%--------------------
+%PUBLISHER IN PARENTHESES:
+ %: (def) Publisher as normal block
+% pub-par,%: Publisher in parentheses
+% pub-date,%: Publisher and date in parentheses
+% pub-date,pub-xc,%: Publisher and date in parentheses, no comma
+% pub-date,pub-xpar,%: Publisher and date without parentheses
+% pub-date,pub-xpar,pub-xc,%: Publisher and date, no parentheses, no comma
+%--------------------
+%PUBLISHER POSITION:
+% %: (def) Publisher after chapter, pages
+ pre-pub,%: Publisher before chapter, pages
+ pre-edn,%: Publisher after edition
+%--------------------
+%ISBN NUMBER:
+ isbn,%: Include ISBN
+% %: (def) No ISBN
+%--------------------
+%ISSN NUMBER:
+% issn,%: Include ISSN
+ %: (def) No ISSN
+%--------------------
+%DOI NUMBER:
+% doi,%: Include DOI
+ url-doi,%: Format DOI as URL //doi.org/doi
+% agu-doi,doi,%: Insert DOI AGU style
+% %: (def) No DOI
+%--------------------
+%`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):
+% %: (def) Word `editor' after name
+% edpar,%: `Name (editor),'
+% edpar,bkedcap,%: `Name (Editor),'
+% edparc,%: `Name, (editor)'
+% edparc,bkedcap,%: `Name, (Editor)'
+ edparxc,%: `Name (editor)'
+% edparxc,bkedcap,%: `Name (Editor)'
+%--------------------
+%EDITOR IN COLLECTIONS:
+% %: (def) Same as for edited book
+ edby,%: In booktitle, edited by ..
+% edby-par,%: In booktitle (edited by ..)
+% edby-parc,%: In booktitle, (edited by ..)
+% edby,edbyx,%: In booktitle, editor ..
+% edby,edbyw,%: In booktitle, (editor) ..
+% edby-par,edbyx,%: In booktitle (editor..)
+% edby-parc,edbyx,%: In booktitle, (editor..)
+% edby,edbyy,%: In booktitle, .., editor
+% edby-par,edbyy,%: In booktitle (.., editor)
+%--------------------
+%CAPITALIZE `EDITOR' OR `EDITED BY' (if editor capitalizable)
+% %: (def) `(editor,..)' or `(edited by..)'
+% edcap,%: `(Editor,..)' or `(Edited by..)'
+%--------------------
+%PUNCTUATION BETWEEN SECTIONS (BLOCKS):
+% %: (def) \newblock after blocks
+ blk-com,%: Comma between blocks
+% blk-com,com-semi,%: Semi-colon between blocks
+% blk-com,com-blank,%: Blanks between blocks
+% blk-tit,%: Period after titles of articles, books, etc
+% blk-tit,tit-col,%: Colon after titles of articles, books, etc
+% blk-tita,%: Period after titles of articles
+% blk-tita,tit-col,%: Colon after titles of articles
+%--------------------
+%PUNCTUATION BEFORE NOTES (if not using \newblock)
+% %: (def) Notes have regular punctuation
+ blknt,%: Notes preceded by period
+%--------------------
+%PUNCTUATION AFTER AUTHORS:
+ %: (def) Author block normal
+% au-col,%: Author block with colon
+%--------------------
+%PUNCTUATION AFTER `IN':
+ %: (def) Space after `in'
+% in-col,%: Colon after `in'
+% in-it,%: Italic `in'
+% in-col,in-it,%: Italic `in' and colon
+% in-x,%: No word `in'
+%--------------------
+%`IN' WITH JOURNAL NAMES (if using 'in' with collections)
+ %: (def) No `in' before journal name
+% injnl,%: Add `in' before journal name
+%--------------------
+%FINAL PUNCTUATION:
+ %: (def) Period at very end
+% fin-bare,%: No period at end
+%--------------------
+%ABBREVIATE WORD `PAGES' (if not using external language file)
+% %: (def) `Page(s)'
+% pp,%: `Page' abbreviated
+% ppx,%: `Page' omitted
+%--------------------
+%ABBREVIATE WORD `EDITORS':
+% %: (def) `Editor(s)'
+% ed,%: `Editor' abbreviated
+%--------------------
+%OTHER ABBREVIATIONS:
+% %: (def) No abbreviations
+% abr,%: Abbreviations
+%--------------------
+%ABBREVIATION FOR `EDITION' (if abbreviating words)
+% %: (def) `Edition' abbreviated as `edn'
+% ednx,%: `Edition' abbreviated as `ed'
+%--------------------
+%MONTHS WITH DOTS:
+% %: (def) Months with dots
+% mth-bare,%: Months without dots
+%--------------------
+%EDITION NUMBERS:
+% xedn,%: Editions as in database
+% %: (def) Write out editions
+% ord,%: Numerical editions
+%--------------------
+%Reading external language file \cfile=cjs-rcs-french.mbs
+ french,%: French language
+%ABBREVIATE WORD `PAGES':
+% %: (def) `Page(s)'
+ pp,%: `Page' abbreviated
+% ppx,%: `Page' omitted
+%--------------------
+%ABBREVIATE WORD `EDITEUR:
+% %: (def) `\'Editeur(s)'
+ ed,%: `\'Editeur' abbreviated
+%--------------------
+%OTHER ABBREVIATIONS:
+% %: (def) No abbreviations
+ abr,%: Abbreviations
+%--------------------
+%EDITION NUMBERS:
+% xedn,%: Editions as in database
+% %: (def) Write out editions
+ ord,%: Numerical editions
+%--------------------
+%STORED JOURNAL NAMES:
+ %: (def) Full journal names
+% jabr,%: Abbreviated journal names
+% jabr,jaa,%: Abbreviated with astronomy shorthands
+%--------------------
+%AMPERSAND:
+ %: (def) Use word `and'
+% amper,%: Use ampersand
+% varand,%: Use \BIBand
+%--------------------
+%COMMA BEFORE `AND':
+% %: (def) Comma before `and'
+ and-xcom,%: No comma before `and'
+% and-com,%: Comma even with 2 authors
+%--------------------
+%COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS (if using comma before `and' with authors)
+% and-com-ed,%: Comma with 2 editors
+% %: (def) Two editors without comma
+%--------------------
+%NO `AND' IN REFERENCE LIST:
+ %: (def) With `and'
+% xand,%: No `and'
+%--------------------
+%COMMA BEFORE `ET AL':
+% %: (def) Comma before `et al'
+ etal-xc,%: No comma before `et al'
+%--------------------
+%FONT OF `ET AL':
+ %: (def) Plain et al
+% etal-it,%: Italic et al
+% etal-rm,%: Roman et al
+%--------------------
+%ADDITIONAL REVTeX DATA FIELDS:
+ %: (def) No additional fields
+% revdata,eprint,url,url-blk,%: Include REVTeX data fields
+%--------------------
+%E-PRINT DATA FIELD: (without REVTeX fields)
+ %: (def) Do not include eprint field
+% eprint,%: Include eprint and archive fields
+%--------------------
+%URL ADDRESS: (without REVTeX fields)
+% %: (def) No URL
+ url,url-blk,%: Include URL
+% url,url-nt,%: URL as note
+% url,url-nl,%: URL on new line
+%--------------------
+%REFERENCE COMPONENT TAGS:
+ %: (def) No reference component tags
+% bibinfo,%: Reference component tags
+%--------------------
+%EMPHASIS: (affects all so-called italics)
+ %: (def) Use emphasis
+% em-it,%: Use true italics
+% em-x,%: No italics
+% em-ul,%: Underlining
+%--------------------
+%COMPATIBILITY WITH PLAIN TEX:
+ nfss,%: Use LaTeX commands
+% plntx,%: Use only Plain TeX
+%--------------------
+,{%
+ }}
+\generate{\file{cjs-rcs-fr.bst}{\MBopts}}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-class.dbj b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-class.dbj
new file mode 100644
index 00000000000..3ef16366bdf
--- /dev/null
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-class.dbj
@@ -0,0 +1,39 @@
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\nopostamble
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2023-2024 Statistical Society of Canada | Société
+canadienne de statistique
+
+This file may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in:
+
+ https://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of LaTeX
+version 2006/05/20 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Vincent Goulet
+<vincent.goulet@act.ulaval.ca>.
+
+This work consists of the file cjs-rcs-article.dtx and the derived
+files cjs-rcs-article.cls, cjs-rcs-article-fr.tex, cjs-template.tex
+and rcs-gabarit.tex.
+
+\endpreamble
+
+\generate{
+ \file{cjs-rcs-article.cls}{\from{cjs-rcs-article.dtx}{class}}
+ \file{cjs-rcs-article-fr.tex}{\nopreamble\from{cjs-rcs-article.dtx}{fr-doc}}
+ \file{cjs-template.tex}{\nopreamble\from{cjs-rcs-article.dtx}{template,en}}
+ \file{rcs-gabarit.tex}{\nopreamble\from{cjs-rcs-article.dtx}{template,fr}}
+}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-english.mbs b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-english.mbs
new file mode 100644
index 00000000000..18f0ccbd780
--- /dev/null
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-english.mbs
@@ -0,0 +1,420 @@
+% \iffalse meta-comment -*- mode: doctex -*-
+%
+% English language definition file of the master bibliography style
+% for The Canadian Journal of Statistics | La revue canadienne de
+% statistique
+%
+% Copyright (C) 2023-2024 Statistical Society of Canada | Société
+% canadienne de statistique
+%
+% This file may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Vincent Goulet
+% <vincent.goulet@act.ulaval.ca>.
+%
+% This work derives from english.mbs, part of the custom-bib
+% collection, a contribution to the LaTeX2e system.
+% Copyright 1994-2002 Patrick W Daly
+% Max-Planck-Institut f\"ur Sonnensystemforschung
+% Max-Planck-Str. 2
+% D-37191 Katlenburg-Lindau
+% Germany
+% E-mail: daly@mps.mpg.de
+%
+ %-------------------------------------------------------------------
+ % Begin module:
+%\fi
+ % \ProvidesFile{cjs-rcs-english.mbs}[2024/07/30 v1.1a (VG, PWD)]
+%\iffalse
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}%
+\documentclass[nocjs,x11names,french,english]{cjs-rcs-article}
+
+ %% Loading doc.sty creates some conflicts with the class and memoir. We
+ %% need to:
+ %%
+ %% - keep a copy of the class' \maketitle command;
+ %% - undefine the 'glossary' environment created by memoir;
+ %% - restore the standard LaTeX commands for the glossary that
+ %% doc.sty relies upon.
+ \let\makeCJStitle\maketitle % keep class definition
+ \let\theglossary\relax % avoid conflict with doc.sty
+ \let\endtheglossary\relax % avoid conflict with doc.sty
+ \makeatletter
+ \def\makeglossary{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo
+ \def\glossary{\@bsphack\begingroup
+ \@sanitize
+ \@wrglossary}\typeout
+ {Writing glossary file \jobname.glo }%
+ \let\makeglossary\@empty
+ }
+ \@onlypreamble\makeglossary
+ \def\@wrglossary#1{%
+ \protected@write\@glossaryfile{}%
+ {\string\glossaryentry{#1}{\thepage}}%
+ \endgroup
+ \@esphack}
+ \def\glossary{\@bsphack\begingroup\@sanitize\@index}
+ \@twosidefalse\@mparswitchfalse % turn off twoside option
+ \makeatother
+ \usepackage{doc}
+ \def\changes#1#2#3{\glossary{#1>#3}} % simplified
+ \DisableCrossrefs
+ \CodelineNumbered
+ \RecordChanges
+ \OnlyDescription
+ \DontCheckModules
+
+ \AtEndPreamble{%
+ \hypersetup{%
+ pdfauthor = {Statistical Society of Canada},
+ pdftitle = {French language definition file cjs-rcs-french.mbs}}}
+
+ %% Configuration of the glossary
+ \addto\extrasenglish{%
+ \def\glossaryname{History of changes}}
+ \GlossaryPrologue{\section*{\glossaryname}%
+ \addcontentsline{toc}{section}{\glossaryname}}
+ \setlength{\GlossaryMin}{5cm}
+
+ %% Additional semantic typesetting
+ \newcommand*\class[1]{\textsf{#1}}
+ \newcommand*\dtx{\textsf{docstrip}}
+
+ %% Name of the journal
+ \makeatletter
+ \newcommand*\TheCJS{\@ifstar{\emph{The Journal}}{\emph{\CJS@journalname@en}}}
+ \newcommand*\LaRevue{\@ifstar{\emph{La revue}}{\emph{\CJS@journalname@fr}}}
+ \newcommand*\CJSclass{\class{cjs-rcs-article}}
+ \newcommand*\CJSbsten{\texttt{cjs-rcs-en.bst}}
+ \newcommand*\CJSbstfr{\texttt{cjs-rcs-fr.bst}}
+ \makeatother
+
+ %% Redefine \year using information from \filedate instead of using
+ %% compilation time
+ \def\parsedate#1/#2/#3\relax{\def\year{#1}}
+
+ \MakeShortVerb{\|}
+
+\begin{document}
+ \DocInput{cjs-rcs-english.mbs}
+\end{document}
+%</driver>
+% end of meta-comment \fi
+% \GetFileInfo{cjs-rcs-english.mbs}
+% \expandafter\parsedate\filedate\relax
+%
+% \changes{0.9}{2023-10-14}{Initial version based on version 4.2 of
+% \texttt{english.mbs} from \textbf{custom-bib}.}
+% \changes{0.93}{2023-11-06}{Add a prefix v in the version number like
+% the main file.}
+% \changes{1.0}{2023-11-29}{First official release distributed through
+% CTAN.}
+%
+% \title[English language definition file \filename]{%
+% English language definition file \\
+% of the master bibliographic style file \\
+% for \TheCJS}
+% \author{Statistical Society of Canada}
+% \affil{Developed by Vincent Goulet, Université Laval}
+%
+% \begin{englishabstract}
+% The list of references in {\TheCJS} is typeset using the
+% bibliographic styles {\CJSbsten} for articles in English and
+% {\CJSbstfr} for articles in French. These styles are created using
+% the program \texttt{makebst} from the master bibliographic file
+% \texttt{cjs-rcs-merlin.mbs}, and the language definition files
+% \texttt{cjs-rcs-english.mbs} and \texttt{cjs-rcs-french.mbs}.
+% \end{englishabstract}
+% \begin{frenchabstract}
+% La liste des références dans {\LaRevue} est composée avec les
+% style de bibliographie {\CJSbstfr} pour les articles en français
+% et {\CJSbsten} pour les articles en anglais. Ceux-ci sont générés
+% par le programme \texttt{makebst} à partir du fichier maitre
+% \texttt{cjs-rcs-merlin.mbs} et des fichiers de localisation
+% \texttt{cjs-rcs-english.mbs} et \texttt{cjs-rcs-french.mbs}.
+% \end{frenchabstract}
+%
+% ^^A abusing the 'classification' environment. The final period is
+% ^^A added by the environment.
+% \begin{classification}[Version]
+% \item[] This is the documentation for the file \code{\filename}
+% {\fileversion}, dated {\filedate}
+% \end{classification}
+%
+% \licence{{\year}, Statistical Society of Canada~{\textbar}~Société
+% canadienne de statistique}
+%
+% \makeCJStitle
+%
+% \section{Introduction}
+%
+% This file is to be used as a language definition file with the
+% master bibliographic file for {\TheCJS}. The language it defines is
+% English.
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for ENGLISH}
+\wr{\spsp\spsp english,\pc: English language}
+
+\beginoptiongroup{ABBREVIATE WORD `PAGES'}{}
+\optdef{*}{}{`Page(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
+\optdef{x}{ppx}{`Page' omitted}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{ABBREVIATE WORD `EDITORS':}{}
+\optdef{*}{}{`Editor(s)'}{(no abbreviation)}
+\optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
+\getans
+\endoptiongroup
+\beginoptiongroup{OTHER ABBREVIATIONS:}{}
+\optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+\endoptiongroup
+\beginoptiongroup{ABBREVIATION FOR `EDITION'
+ (if abbreviating words)}
+ {\if\ans a*\fi}%
+\optdef{*}{}{`Edition' abbreviated as `edn'}{}
+\optdef{a}{ednx}{`Edition' abbreviated as `ed'}{}
+\getans
+\beginoptiongroup{MONTHS WITH DOTS:}{}
+\optdef{*}{}{Months with dots}{as Jan.}
+\optdef{x}{mth-bare}{Months without dots}{as Feb Mar}
+\getans
+\endoptiongroup
+\endoptiongroup
+\beginoptiongroup{EDITION NUMBERS:}{}
+\optdef{*}{xedn}{Editions as in database}{saving much processing memory}
+\optdef{w}{}{Write out editions}{as first, second, third, etc}
+\optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
+\getans
+\endoptiongroup
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+%<!ed>{ "editors" }
+%<ed>{ "eds." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "editor" }
+%<ed>{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "edition" }
+%<abr&!ednx>{ "edn." }
+%<abr&ednx>{ "ed." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volume" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "number" }
+%<abr>{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+%<!pp&!ppx>{ "pages" }
+%<pp>{ "pp." }
+%<!pp&ppx>{ "" }
+
+FUNCTION {bbl.page}
+%<!pp&!ppx>{ "page" }
+%<pp>{ "p." }
+%<!pp&ppx>{ "" }
+
+%<*revdata>
+FUNCTION {bbl.eidpp}
+{ "pages" }
+
+%</revdata>
+FUNCTION {bbl.chapter}
+%<!abr>{ "chapter" }
+%<abr>{ "chap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Technical Report" }
+%<abr>{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+%<*!xedn>
+FUNCTION {bbl.first}
+%<!ord>{ "First" }
+%<ord>{ "1st" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Second" }
+%<ord>{ "2nd" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Third" }
+%<ord>{ "3rd" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Fourth" }
+%<ord>{ "4th" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Fifth" }
+%<ord>{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+% \end{macrocode}
+% This function adds English endings for ordinals 1, 2, 3. However, if
+% the second last digit is 1, then the ending is `th' for all last digits.
+% So far, all other languages included do not have this problem, and it is
+% sufficient to add the \textsl{th} equivalent. This might change with further
+% languages.
+%
+% \begin{macrocode}
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%</!xedn>
+%<*!abr>
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+%</abr>
+%</!options&!driver>
+ % End module: cjs-rcs-english.mbs
+% \end{macrocode}
+% \Finale
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-french.mbs b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-french.mbs
new file mode 100644
index 00000000000..4d3a76021c9
--- /dev/null
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-french.mbs
@@ -0,0 +1,370 @@
+% \iffalse meta-comment -*- mode: doctex -*-
+%
+% French language definition file of the master bibliography style for
+% The Canadian Journal of Statistics | La revue canadienne de
+% statistique
+%
+% Copyright (C) 2023-2024 Statistical Society of Canada | Société
+% canadienne de statistique
+%
+% This file may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Vincent Goulet
+% <vincent.goulet@act.ulaval.ca>.
+%
+% This work derives from french.mbs, part of the custom-bib
+% collection, a contribution to the LaTeX2e system.
+% Copyright 1994-2002 Patrick W Daly
+% Max-Planck-Institut f\"ur Sonnensystemforschung
+% Max-Planck-Str. 2
+% D-37191 Katlenburg-Lindau
+% Germany
+% E-mail: daly@mps.mpg.de
+%
+ %-------------------------------------------------------------------
+ % Begin module:
+%\fi
+ % \ProvidesFile{cjs-rcs-french.mbs}[2024/07/30 v1.1a (VG, PWD)]
+%\iffalse
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}%
+\documentclass[nocjs,x11names,french,english]{cjs-rcs-article}
+
+ %% Loading doc.sty creates some conflicts with the class and memoir. We
+ %% need to:
+ %%
+ %% - keep a copy of the class' \maketitle command;
+ %% - undefine the 'glossary' environment created by memoir;
+ %% - restore the standard LaTeX commands for the glossary that
+ %% doc.sty relies upon.
+ \let\makeCJStitle\maketitle % keep class definition
+ \let\theglossary\relax % avoid conflict with doc.sty
+ \let\endtheglossary\relax % avoid conflict with doc.sty
+ \makeatletter
+ \def\makeglossary{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo
+ \def\glossary{\@bsphack\begingroup
+ \@sanitize
+ \@wrglossary}\typeout
+ {Writing glossary file \jobname.glo }%
+ \let\makeglossary\@empty
+ }
+ \@onlypreamble\makeglossary
+ \def\@wrglossary#1{%
+ \protected@write\@glossaryfile{}%
+ {\string\glossaryentry{#1}{\thepage}}%
+ \endgroup
+ \@esphack}
+ \def\glossary{\@bsphack\begingroup\@sanitize\@index}
+ \@twosidefalse\@mparswitchfalse % turn off twoside option
+ \makeatother
+ \usepackage{doc}
+ \def\changes#1#2#3{\glossary{#1>#3}} % simplified
+ \DisableCrossrefs
+ \CodelineNumbered
+ \RecordChanges
+ \OnlyDescription
+ \DontCheckModules
+
+ \AtEndPreamble{%
+ \hypersetup{%
+ pdfauthor = {Statistical Society of Canada},
+ pdftitle = {French language definition file cjs-rcs-french.mbs}}}
+
+ %% Configuration of the glossary
+ \addto\extrasenglish{%
+ \def\glossaryname{History of changes}}
+ \GlossaryPrologue{\section*{\glossaryname}%
+ \addcontentsline{toc}{section}{\glossaryname}}
+ \setlength{\GlossaryMin}{5cm}
+
+ %% Additional semantic typesetting
+ \newcommand*\class[1]{\textsf{#1}}
+ \newcommand*\dtx{\textsf{docstrip}}
+
+ %% Name of the journal
+ \makeatletter
+ \newcommand*\TheCJS{\@ifstar{\emph{The Journal}}{\emph{\CJS@journalname@en}}}
+ \newcommand*\LaRevue{\@ifstar{\emph{La revue}}{\emph{\CJS@journalname@fr}}}
+ \newcommand*\CJSclass{\class{cjs-rcs-article}}
+ \newcommand*\CJSbsten{\texttt{cjs-rcs-en.bst}}
+ \newcommand*\CJSbstfr{\texttt{cjs-rcs-fr.bst}}
+ \makeatother
+
+ %% Redefine \year using information from \filedate instead of using
+ %% compilation time
+ \def\parsedate#1/#2/#3\relax{\def\year{#1}}
+
+ \MakeShortVerb{\|}
+
+\begin{document}
+ \DocInput{cjs-rcs-french.mbs}
+\end{document}
+%</driver>
+% end of meta-comment \fi
+% \GetFileInfo{cjs-rcs-french.mbs}
+% \expandafter\parsedate\filedate\relax
+%
+% \changes{0.9}{2023-10-14}{Initial version based on version 4.2 of
+% \texttt{french.mbs} from \textbf{custom-bib}.}
+% \changes{0.93}{2023-11-06}{Add a prefix v in the version number like
+% the main file.}
+% \changes{1.0}{2023-11-29}{First official release distributed through
+% CTAN.}
+%
+% \title[French language definition file \filename]{%
+% French language definition file \\
+% of the master bibliographic style file \\
+% for \TheCJS}
+% \author{Statistical Society of Canada}
+% \affil{Developed by Vincent Goulet, Université Laval}
+%
+% \begin{englishabstract}
+% The list of references in {\TheCJS} is typeset using the
+% bibliographic styles {\CJSbsten} for articles in English and
+% {\CJSbstfr} for articles in French. These styles are created using
+% the program \texttt{makebst} from the master bibliographic file
+% \texttt{cjs-rcs-merlin.mbs}, and the language definition files
+% \texttt{cjs-rcs-english.mbs} and \texttt{cjs-rcs-french.mbs}.
+% \end{englishabstract}
+% \begin{frenchabstract}
+% La liste des références dans {\LaRevue} est composée avec les
+% style de bibliographie {\CJSbstfr} pour les articles en français
+% et {\CJSbsten} pour les articles en anglais. Ceux-ci sont générés
+% par le programme \texttt{makebst} à partir du fichier maitre
+% \texttt{cjs-rcs-merlin.mbs} et des fichiers de localisation
+% \texttt{cjs-rcs-english.mbs} et \texttt{cjs-rcs-french.mbs}.
+% \end{frenchabstract}
+%
+% ^^A abusing the 'classification' environment. The final period is
+% ^^A added by the environment.
+% \begin{classification}[Version]
+% \item[] This is the documentation for the file \code{\filename}
+% {\fileversion}, dated {\filedate}
+% \end{classification}
+%
+% \licence{{\year}, Statistical Society of Canada~{\textbar}~Société
+% canadienne de statistique}
+%
+% \makeCJStitle
+%
+% \section{Introduction}
+%
+% This file is to be used as a language definition file with the
+% master bibliographic file for {\TheCJS}. The language it defines is
+% French.
+%
+% This is not a self-sufficient \texttt{.mbs} file, but rather may
+% be used together with one that contains language support via
+% external definition files.
+%
+% See the documentation for \texttt{makebst} for formatting details.
+%
+% \section{The Menu Information}
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between |%<*!options&!driver>|
+% \dots\ |%</!options&!driver>| in order to exclude it if \dtx{} is used to
+% extract only the menu information or the documentation driver.
+%
+% \begin{macrocode}
+%<*options>
+\mes{^^JOptions for FRENCH}
+\wr{\spsp\spsp french,\pc: French language}
+
+\beginoptiongroup{ABBREVIATE WORD `PAGES':}{}
+\optdef{*}{}{`Page(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
+\optdef{x}{ppx}{`Page' omitted}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{ABBREVIATE WORD `EDITEUR:}{}
+\optdef{*}{}{`\string\'Editeur(s)'}{(no abbreviation)}
+\optdef{a}{ed}{`\string\'Editeur' abbreviated}{as \string\'Ed.}
+\getans
+\endoptiongroup
+\beginoptiongroup{OTHER ABBREVIATIONS:}{}
+\optdef{*}{}{No abbreviations}{of Tome, \string\'edition, chapitre}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+\endoptiongroup
+\beginoptiongroup{EDITION NUMBERS:}{}
+\optdef{*}{xedn}{Editions as in database}{saving much processing memory}
+\optdef{w}{}{Write out editions}{as premi\string\`ere, deuxi\string\`eme,...}
+\optdef{n}{ord}{Numerical editions}{as 1re, 2e, 3e, etc}
+\getans
+\endoptiongroup
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \StopEventually{\PrintChanges}
+%
+% \section{The Coding}
+% \begin{macrocode}
+%<*!options&!driver>
+
+ % The language selected here is FRENCH
+FUNCTION {bbl.and}
+{ "et"}
+
+FUNCTION {bbl.etal}
+{ "et~collab." }
+
+FUNCTION {bbl.editors}
+%<!ed>{ "directeurs" }
+%<ed>{ "dir." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "directeur" }
+%<ed>{ "dir." }
+
+FUNCTION {bbl.edby}
+{ "sous la direction de" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "\'edition" }
+%<abr>{ "\'ed." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volume" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "de" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "num\'ero" }
+%<abr>{ "{\no}" }
+
+FUNCTION {bbl.nr}
+{ "{\no}" }
+
+FUNCTION {bbl.in}
+{ "dans" }
+
+FUNCTION {bbl.pages}
+%<!pp&!ppx>{ "pages" }
+%<pp>{ "p." }
+%<!pp&ppx>{ "" }
+
+FUNCTION {bbl.page}
+%<!pp&!ppx>{ "page" }
+%<pp>{ "p." }
+%<!pp&ppx>{ "" }
+
+%<*revdata>
+FUNCTION {bbl.eidpp}
+{ "pages" }
+
+%</revdata>
+FUNCTION {bbl.chapter}
+%<!abr>{ "chapitre" }
+%<abr>{ "chap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "rapport technique" }
+%<abr>{ "rapport technique" }
+
+FUNCTION {bbl.mthesis}
+{ "m\'emoire de ma\^itrise" }
+
+FUNCTION {bbl.phdthesis}
+{ "th\`ese de doctorat" }
+
+%<*!xedn>
+FUNCTION {bbl.first}
+%<!ord>{ "Premi\`ere" }
+%<ord>{ "1{\iere}" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Deuxi\`eme" }
+%<ord>{ "2{\ieme}" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Troisi\`eme" }
+%<ord>{ "3{\ieme}" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Quatri\`eme" }
+%<ord>{ "4{\ieme}" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Cinqui\`eme" }
+%<ord>{ "5{\ieme}" }
+
+FUNCTION {bbl.th}
+{ "{\ieme}" }
+
+%</!xedn>
+%<*!abr>
+MACRO {jan} {"janvier"}
+
+MACRO {feb} {"f\'evrier"}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"avril"}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juin"}
+
+MACRO {jul} {"juillet"}
+
+MACRO {aug} {"ao\^ut"}
+
+MACRO {sep} {"septembre"}
+
+MACRO {oct} {"octobre"}
+
+MACRO {nov} {"novembre"}
+
+MACRO {dec} {"d\'ecembre"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"jan."}
+
+MACRO {feb} {"f\'ev."}
+
+MACRO {mar} {"mars"}
+
+MACRO {apr} {"avr."}
+
+MACRO {may} {"mai"}
+
+MACRO {jun} {"juin"}
+
+MACRO {jul} {"juil."}
+
+MACRO {aug} {"ao\^ut"}
+
+MACRO {sep} {"sept."}
+
+MACRO {oct} {"oct."}
+
+MACRO {nov} {"nov."}
+
+MACRO {dec} {"d\'ec."}
+
+%</abr>
+%</!options&!driver>
+ % End module: cjs-rcs-french.mbs
+% \end{macrocode}
+% \Finale
diff --git a/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-merlin.mbs b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-merlin.mbs
new file mode 100644
index 00000000000..cf79365ffd2
--- /dev/null
+++ b/Master/texmf-dist/source/latex/cjs-rcs-article/cjs-rcs-merlin.mbs
@@ -0,0 +1,8009 @@
+% \iffalse meta-comment -*- mode: doctex -*-
+%
+% Master bibliography style for The Canadian Journal of Statistics |
+% La revue canadienne de statistique
+%
+% Copyright (C) 2023-2024 Statistical Society of Canada | Société
+% canadienne de statistique
+%
+% This file may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in:
+%
+% https://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Vincent Goulet
+% <vincent.goulet@act.ulaval.ca>.
+%
+% This work derives from merlin.mbs, part of the custom-bib
+% collection, a contribution to the LaTeX2e system.
+% Copyright 1994-2011 Patrick W Daly
+% Max-Planck-Institut f\"ur Sonnensystemforschung
+% Max-Planck-Str. 2
+% D-37191 Katlenburg-Lindau
+% Germany
+% E-mail: daly@mps.mpg.de
+%
+%<*!tail>
+% (The following notice appears in bst files generated from this file)
+ % -------------------------------------------------------------------
+ % Name and version information of the main mbs file:
+%\fi
+ % \ProvidesFile{cjs-rcs-merlin.mbs}[2024/07/30 v1.1a (VG, PWD, AO, DPC)]
+%\iffalse
+%</!tail>
+%<*a&!a>
+% The following ensures that the driver part is not seen by makebst
+% The driver part must not contain any \end other than \end{document} !
+\ifx\endoptions\undefined\let\tempx=\relax\else
+ \long\def\tempx#1\end#2{}\fi\tempx
+%</a&!a>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}%
+\documentclass[nocjs,x11names,french,english]{cjs-rcs-article}
+ \usepackage{metalogo}
+ \setlrmarginsandblock{40mm}{30mm}{*} % increase left margin
+ \checkandfixthelayout
+
+ %% Loading doc.sty creates some conflicts with the class and memoir. We
+ %% need to:
+ %%
+ %% - keep a copy of the class' \maketitle command;
+ %% - undefine the 'glossary' environment created by memoir;
+ %% - restore the standard LaTeX commands for the glossary that
+ %% doc.sty relies upon.
+ \let\makeCJStitle\maketitle % keep class definition
+ \let\theglossary\relax % avoid conflict with doc.sty
+ \let\endtheglossary\relax % avoid conflict with doc.sty
+ \makeatletter
+ \def\makeglossary{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo
+ \def\glossary{\@bsphack\begingroup
+ \@sanitize
+ \@wrglossary}\typeout
+ {Writing glossary file \jobname.glo }%
+ \let\makeglossary\@empty
+ }
+ \@onlypreamble\makeglossary
+ \def\@wrglossary#1{%
+ \protected@write\@glossaryfile{}%
+ {\string\glossaryentry{#1}{\thepage}}%
+ \endgroup
+ \@esphack}
+ \def\glossary{\@bsphack\begingroup\@sanitize\@index}
+ \@twosidefalse\@mparswitchfalse % turn off twoside option
+ \makeatother
+ \usepackage{doc}
+ \def\changes#1#2#3{\glossary{#1>#3}} % simplified
+ \DisableCrossrefs
+ \CodelineNumbered
+ \RecordChanges
+ \OnlyDescription
+ \DontCheckModules
+
+ \AtEndPreamble{%
+ \hypersetup{%
+ pdfauthor = {Statistical Society of Canada},
+ pdftitle = {Master bibliographic style cjs-rcs-merlin.mbs}}}
+
+ %% Configuration of the glossary
+ \addto\extrasenglish{%
+ \def\glossaryname{History of changes}}
+ \GlossaryPrologue{\section*{\glossaryname}%
+ \addcontentsline{toc}{section}{\glossaryname}}
+ \setlength{\GlossaryMin}{5cm}
+
+ %% Additional semantic typesetting
+ \newcommand*\class[1]{\textsf{#1}}
+ \newcommand*\btx{\textsc{Bib}\TeX}
+ \newcommand*\dtx{\textsf{docstrip}}
+
+ %% Name of the journal
+ \makeatletter
+ \newcommand*\TheCJS{\@ifstar{\emph{The Journal}}{\emph{\CJS@journalname@en}}}
+ \newcommand*\LaRevue{\@ifstar{\emph{La revue}}{\emph{\CJS@journalname@fr}}}
+ \newcommand*\CJSclass{\class{cjs-rcs-article}}
+ \newcommand*\CJSbsten{\texttt{cjs-rcs-en.bst}}
+ \newcommand*\CJSbstfr{\texttt{cjs-rcs-fr.bst}}
+ \makeatother
+
+ %% Redefine \year using information from \filedate instead of using
+ %% compilation time
+ \def\parsedate#1/#2/#3\relax{\def\year{#1}}
+
+ \MakeShortVerb{\|}
+
+\begin{document}
+ \DocInput{cjs-rcs-merlin.mbs}
+\end{document}
+%</driver>
+% end of meta-comment \fi
+% \GetFileInfo{cjs-rcs-merlin.mbs}
+% \expandafter\parsedate\filedate\relax
+%
+% \changes{0.9}{2023-10-14}{Initial version based on version 4.33 of
+% \texttt{merlin.mbs}.}
+% \changes{0.92}{2023-10-27}{Relegate the \texttt{makebst} menu
+% information to the complete documentation.}
+% \changes{0.93}{2023-11-06}{Add a prefix v in the version number like
+% the main file.}
+% \changes{1.0}{2023-11-29}{First official release distributed through
+% CTAN.}
+%
+% \title[Master bibliographic style file \filename]{%
+% Master bibliographic style file \\
+% of \TheCJS}
+% \author{Statistical Society of Canada}
+% \affil{Developed by Vincent Goulet, Université Laval}
+%
+% \begin{englishabstract}
+% The list of references in {\TheCJS} is typeset using the
+% bibliographic styles {\CJSbsten} for articles in English and
+% {\CJSbstfr} for articles in French. These styles are created using
+% the program \texttt{makebst} from the master bibliographic file
+% \texttt{cjs-rcs-merlin.mbs}, and the language definition files
+% \texttt{cjs-rcs-english.mbs} and \texttt{cjs-rcs-french.mbs}.
+% \end{englishabstract}
+% \begin{frenchabstract}
+% La liste des références dans {\LaRevue} est composée avec les
+% style de bibliographie {\CJSbstfr} pour les articles en français
+% et {\CJSbsten} pour les articles en anglais. Ceux-ci sont générés
+% par le programme \texttt{makebst} à partir du fichier maitre
+% \texttt{cjs-rcs-merlin.mbs} et des fichiers de localisation
+% \texttt{cjs-rcs-english.mbs} et \texttt{cjs-rcs-french.mbs}.
+% \end{frenchabstract}
+%
+% ^^A abusing the 'classification' environment. The final period is
+% ^^A added by the environment.
+% \begin{classification}[Version]
+% \item[] This is the documentation for the file \code{\filename}
+% {\fileversion}, dated {\filedate}
+% \end{classification}
+%
+% \licence{{\year}, Statistical Society of Canada~{\textbar}~Société
+% canadienne de statistique}
+%
+% \makeCJStitle
+%
+% \section{Introduction}
+%
+% The class {\CJSclass} typesets manuscripts immediately in accordance
+% with the presentation rules of {\TheCJS}. The class uses its own
+% bibliographic styles: {\CJSbsten} for articles in English, and
+% {\CJSbstfr} for articles in French. The style {\CJSbsten} could best
+% be described as ``not unlike \code{apalike}'', whereas {\CJSbstfr}
+% is closely derived from the style \code{francais} provided by the
+% package %
+% \href{https://ctan.org/pkg/francais-bst}{\pkg{francais-bst}}.
+%
+% The styles were originally generated using the program
+% \code{makebst} by Patrick W.~Daly. The master bibliographic style
+% and the language definition files are heavily based on their
+% counterparts of the package %
+% \href{https://ctan.org/pkg/custom-bib}{\pkg{custom-bib}}, %
+% namely \code{merlin.mbs}, \code{english.mbs}, and \code{french.mbs}.
+%
+% \section{Generation of the bibliographic styles}
+% \label{sec:generation}
+%
+% The English style {\CJSbsten} is produced from this master
+% bibliographic style file and the language definition file
+% \code{cjs-rcs-english.mbs} by running the driver
+% \code{cjs-rcs-bst-en.dbj} through {\LaTeX}:
+% \begin{quote}
+% \code{latex cjs-rcs-bst-en.dbj}
+% \end{quote}
+% The French style {\CJSbstfr} is produced similarly using the driver
+% \code{cjs-rcs-bst-fr.dbj}:
+% \begin{quote}
+% \code{latex cjs-rcs-bst-fr.dbj}
+% \end{quote}
+%
+% \section{Changes compared to \texorpdfstring{\code{merlin.mbs}}{merlin.mbs}}
+% \label{sec:changes}
+%
+% The master bibliographic style \code{\filename} introduces the following
+% changes compared to \code{merlin.mbs}.
+%
+% \begin{enumerate}
+% \item The function \code{format.url} is reworked to provide a
+% cleaner URL for digital object identifiers (DOIs). The
+% \code{merlin.mbs} definition would generate a DOI of the form
+% \begin{quote}
+% URL \texttt{http://dx.doi.org/\meta{doi}}
+% \end{quote}
+% The revised definition instead generates the simpler string
+% \begin{quote}
+% doi: \meta{doi}
+% \end{quote}
+% When the package \pkg{hyperref} is loaded, \meta{doi} is a
+% hyperlink to the now recommended URL
+% \code{https://doi.org/\meta{doi}}. This behaviour relies on a
+% command \cmd{\urldoi} provided in the \texttt{.bbl} file. If
+% needed, this command may be redefined by the user.
+% \item The command \cmd{\urlprefix} is empty. Again, this may be
+% redefined by the user.
+% \item The quotes «~» are typeset by the macro \cmd{\frquote} of
+% \pkg{babel-french} (version $\geq$ 3.1), rather than by the custom
+% commands \cmd{\guillemotleft} and \cmd{\guillemotright}.
+% \item The \code{makebst} menu information is only included in the
+% complete documentation. The latter is obtained by commenting out
+% the command \cmd{\OnlyDescription} in \code{\filename} and
+% compiling the file with {pdf\LaTeX} or {\XeLaTeX}.
+% \end{enumerate}
+%
+% \StopEventually{\PrintChanges}
+%
+% \begin{quote}
+% \itshape From this point on, the documentation is taken without
+% modification from \code{merlin.mbs} by Patrick W.~Daly, but for
+% minute details such as filenames.
+% \end{quote}
+%
+% \section{The Menu Information}\label{sec:menu}
+%
+% Here I describe the options and menu information for this particular
+% master file \texttt{\filename}. To construct a \dtx{} driver file
+% to generate a desired \texttt{.bst} file, simply process \texttt{makebst.tex}
+% with \TeX\ or \LaTeX, and give
+% \begin{quote}\code{\filename}\end{quote}
+% when prompted for the name of the master file. Then answer the questions
+% in the menus that follow. The menu information is extracted from here.
+%
+% All the menu information is nested between \dtx{} guard options
+% |%<*options>| \dots\ |%</options>|, and the last command is
+% |\endoptions|. The rest of the file is nested between
+% \begin{quote}
+% |%<*!options&!driver&!bblbst>| \dots\ |</!options&!driver&!bblbst>|
+% \end{quote}
+% in order to exclude it if \dtx{} is used to
+% extract the menu information, the documentation driver, or the
+% \texttt{babelbst.tex} file.
+%
+% The main coding is divided into two sections, the \emph{head} and
+% \emph{tail}; in between come any external language or journal name
+% support files. The head part is marked with the \dtx{} guard option
+% |<!tail>| and the tail with |<!head>|. This roundabout means of
+% doing things makes it possible to process \texttt{\filename} with
+% \texttt{.dbj} files that were generated for the older
+% \texttt{genbst.mbs} file by simply changing the name of the source
+% file. If both \texttt{head} and \texttt{tail} (and \texttt{exlang})
+% options are omitted, as they are in the older \texttt{.dbj} files,
+% \texttt{\filename} is processed completely in one pass. To include
+% external files, two passes are needed, one for each part, with the
+% external file(s) coming in between.
+%
+% Note too that if the internal language commands are taken (i.e., if
+% \texttt{exlang} option is not given) then the default language is
+% English, which is tested for as |<!babel>|. This too permits the simple
+% update of older \texttt{.dbj}, at least for English.
+%
+% \subsection*{Selecting Language}
+% Explicit words in the bibliography style, such as \textsl{and},
+% \textsl{editor}, etc.,
+% are represented by functions \texttt{bbl.and}, \texttt{bbl.editor}, and so on.
+% By default these functions translate to the normal English text, but
+% other languages are also possible.
+%
+% The definitions of these functions for other languages are contained in
+% external files. At this point, we can make use of features in
+% \texttt{makebst} (version~3.0 or later) to ask for the name of such a
+% definition file, and store it in |\cfile|. If no external file is
+% specified, then the internal definitions are taken, for which there are
+% two possibilities: English or \LaTeX{} commands (Babel).
+%
+% The commands |\MBswitch|, |\mes|, |\MBaskfile|, |\wr|, |\pc|, |\spsp| are
+% defined in \texttt{makebst.tex}.
+%
+% If |\MBswitch| does not exist, then the version of \texttt{makebst}
+% cannot support external files.
+%
+% \begin{macrocode}
+%<*options>
+\expandafter\ifx\csname beginoptiongroup\endcsname\relax
+ \mes{^^J******************^^J%
+ !!!!!! VERSION CLASH !!!!!!!!!^^J%
+ This mbs file requires makebst version 4.0 or more^^J%
+ You must update makebst to run it with this mbs file^^J%
+ No docstrip batch file can be produced on this run^^J%
+ ******************}
+ \let\temp\endinput\else\let\temp\relax\fi\temp
+
+\newif\ifnumerical
+\newif\ifmytemp
+\mes{<<< For more information about the meanings of^^J%
+ <<< the various options, see the section on ^^J%
+ <<< Menu Information in the .mbs file documentation.}
+
+\umes{EXTERNAL FILES:}
+\expandafter\ifx\csname MBswitch\endcsname\relax
+ \mes{^^J**************^^J%
+ Makebst version is less than 3.0^^J%
+ Cannot add external file for language definition^^J%
+ **************}
+ \umes{No included files.}%
+ \def\cfile{}\def\jfile{}%
+\else
+ \MBaskfile{^^JName of language definition file}(\mroot.\mext)i\cfile
+ \edef\ctemp{\mroot.\mext}
+ \ifx\ctemp\cfile\def\cfile{}\fi
+ \umes{Name of language file: \string\cfile=\cfile.}%
+% \end{macrocode}
+%
+% A second type of external file that can be added is one containing names
+% of journals that are to be prestored into the \texttt{.bst} file.
+% Several file names are allowed here, with the root names separated by
+% commas, and with the common extension added at the end. To assist later
+% parsing of the names, an additional comma is added before the extension.
+%
+% Note that in this case |\MBaskfile| treats the file(s) as output, i.e.,
+% it does not check if the file(s) actually exist.
+%
+% The macro |\Mgetnext| allows the root names to be extracted from the
+% list of file names.
+% \begin{macrocode}
+ \def\jfile{}
+ \ask{\yn}{^^JInclude file(s) for extra journal names? (NO)}
+ \mytempfalse
+ \if!\yn!\else\if\yn n\else\if\yn N\else\mytemptrue\fi\fi\fi
+ \ifmytemp
+ \MBaskfile{^^JFile to include}(physjour,geojour,photjour.mbs)o\jfile
+ \edef\jfile{\froot,.\fext}
+ \umes{Name of included files: \string\jfile=\jfile.}%
+ \else
+ \umes{No included files.}%
+ \fi
+\fi%MBswitch
+\def\Mgetnext#1,#2.#3??{\def\froot{#1}\def\Mrest{#2}\def\fext{#3}}
+% \end{macrocode}
+%
+% If no external files are specified, then both |\cfile| and |\jfile| are
+% empty. In this case, do \emph{not} set the options \texttt{head} and
+% \texttt{tail}, which control the \dtx{} passes through
+% \texttt{filename}. Now only one pass is made.
+%
+% If there is an external definition file, or an external list of
+% journal names, then some extra text must be
+% written to fit in with that already written by \texttt{makebst}. This is
+% explained in that documentation. The |\MBswitch| command turns the curly
+% braces |{..}| into normal characters, and the parentheses |(..)| take on
+% their grouping functionality. This permits unbalanced braces to be
+% written to the output file.
+%
+% \begin{macrocode}
+\if!\cfile\jfile!\else
+ \begingroup\MBswitch
+ \wr(\spsp head,\string\MBopta})
+ \if!\cfile!\else
+ \wr(\string\from{\cfile}{\string\MBopta})
+ \fi
+ \if!\jfile!\else
+ \let\jxfile\jfile
+ \loop
+% \end{macrocode}
+%
+% Parse the list of journal name files, adding a new |\from| for each one.
+%
+% \begin{macrocode}
+ \expandafter\Mgetnext\jxfile??
+ \wr(\string\from{\froot.\fext}{\string\MBopta})
+ \edef\jxfile(\Mrest.\fext)
+ \if!\Mrest!\def\Mtst(1)\else\def\Mtst()\fi
+ \if!\Mtst!
+ \repeat
+ \fi
+ \wr(\string\from{\mroot.\mext}{tail,\string\MBopta}})
+ \wr(\string\def\string\MBopta{\pc)
+ \endgroup
+\fi
+% \end{macrocode}
+%
+% Ask whether there is a need for
+% explicit English words or \LaTeX{} commands whose definitions are
+% to be found in the file \texttt{babelbst.tex}.
+%
+% \begin{macrocode}
+\beginoptiongroup{INTERNAL LANGUAGE SUPPORT
+ (if no external language file)}%
+ {\if!\cfile!\relax*\fi}%
+\optdef{*}{}{English}{words used explicitly}
+\optdef{b}{babel}{Babel}
+ {(words replaced by commands defined in babelbst.tex)}
+\getans
+\endoptiongroup
+\if!\cfile!\relax\else
+\wr{\spsp\spsp exlang,\pc: External language file}
+\fi
+% \end{macrocode}
+%
+% \subsection*{Author--year or numerical}
+% The first question is whether a numerical or author--year citation
+% style is to be used. If the latter, the supporting system is my
+% \code{natbib.sty}, which expects |\bibitem| to have an optional
+% argument containing the short form of the authors, plus year in
+% parentheses. E.g.,
+% \begin{quote}
+% |\bibitem[Daly et al.(1990)]{key}...|
+% \end{quote}
+% There is now a newer version of \texttt{natbib.sty} (v5.3) that
+% supports an optional full author list too, as
+% \begin{quote}
+% |\bibitem[Daly et al.(1990)Daly, Keppler, and Williams]{key}...|
+% \end{quote}
+% Other systems are also supported, such as the Harvard family of
+% bibliography styles (with \texttt{harvard.sty}), which have entries in the
+% form
+% \begin{quote}
+% |\harvarditem[Daly et al.]{Daly, Keppler,|\\
+% | and Williams}{1990}{key}...|
+% \end{quote}
+% or the astronomy family (with \texttt{astron.sty}) with entries like
+% \begin{quote}
+% |\bibitem[\protect\astroncite{Daly et al.}{1990}]{key}...|
+% \end{quote}
+% or the Chicago family (with \texttt{chicago.sty}) with entries like
+% \begin{quote}
+% |\bibitem[\protect\citeautheryear{Daly, Keppler, and|\\
+% | Williams}{Daly et al.}{1990}]{key}...|
+% \end{quote}
+% or the `named' variant of Chicago (with \texttt{named.sty}) with entries like
+% \begin{quote}
+% |\bibitem[\protect\citeauthoryear{Daly et al.}{1990}]{key}...|
+% \end{quote}
+% or the so-called ``author--date'' group (with \texttt{authordate1-4.sty})
+% with entries of the form
+% \begin{quote}
+% |\bibitem[\protect\citename{Daly et al.}1990]{key}...|
+% \end{quote}
+% Finally, there is the \texttt{apalike} format of Oren Patashnik, for use
+% with \texttt{apalike.sty} that has entries of the form
+% \begin{quote}
+% |\bibitem[Daly et al., 1990]{key}...|
+% \end{quote}
+%
+% In addition to numerical or author--year citation styles, there is also a
+% \texttt{cite} style available in which the label is the same as the cite
+% key. This is for listing entire contents of databases with the cite key
+% visible.
+%
+% A flag |\ifnumerical| is established because some of the following menu
+% features depend on which system is to be used.
+%
+% The \texttt{alph} option produces labels as in \texttt{alpha.bst}; options
+% \texttt{alf-1} and \texttt{alf-f} modify these. Standard is: first three
+% letters of the single author (Dal90 for Daly, 1990) and first letters of
+% first three authors (DK90 for Daly and Kopka, 1990). Alternatives are first
+% three letters of the first author, no matter how many authors there are, and
+% full name of first author.
+% \begin{macrocode}
+\beginoptiongroup{STYLE OF CITATIONS:}{}
+\optdef{*}{}{Numerical}{as in standard LaTeX}
+\optdef{a}{ay}{Author-year}{with some non-standard interface}
+\optdef{b}{alph}{Alpha style, Jon90 or JWB90}{for single or multiple authors}
+\optdef{o}{alph,alf-1}{Alpha style, Jon90}{even for multiple authors}
+\optdef{f}{alph,alf-f}{Alpha style, Jones90}{(full name of first author)}
+\optdef{c}{cite}{Cite key}{(special for listing contents of bib file)}
+\getans
+\endoptiongroup
+\if\ans a\numericalfalse\else\numericaltrue\fi
+\if\ans b\mytempfalse \else\mytemptrue \fi
+\beginoptiongroup{HTML OUTPUT
+ (if non author-year citations)}
+ {\ifnumerical*\fi}
+\optdef{*}{}{Normal LaTeX}{output}
+\optdef{h}{html}{Hypertext}{output, in HTML code, in paragraphs}
+\optdef{n}{html,htlist}{Hypertext list}{with sequence numbers}
+\optdef{k}{html,htdes}{Hypertext with keys}{for viewing databases}
+\getans
+\endoptiongroup
+\beginoptiongroup{AUTHOR--YEAR SUPPORT SYSTEM
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}
+\optdef{*}{nat}{Natbib}{for use with natbib v5.3 or later}
+\optdef{o}{}{Older Natbib}{without full authors citations}
+\optdef{l}{alk}{Apalike}{for use with apalike.sty}
+\optdef{h}{har}{Harvard}{system with harvard.sty}
+\optdef{a}{ast}{Astronomy}{system with astron.sty}
+\optdef{c}{cay}{Chicago}{system with chicago.sty}
+\optdef{n}{nmd}{Named}{system with named.sty}
+\optdef{d}{cn}{Author-date}{system with authordate1-4.sty}
+\getans
+% \end{macrocode}
+% The \texttt{harvard} family has been extended for \LaTeXe, and the new
+% \texttt{.bst} files allow the word \textsl{and} and the brackets around years
+% to be variable with commands. These features may be added too.
+% The URL field used to be exclusively part of Harvard, but now exists
+% independently of it too.
+%
+% \begin{macrocode}
+\beginoptiongroup{HARVARD EXTENSIONS INCLUDED
+ (if Harvard support selected)}
+ {\if\ans h*\fi}%
+\optdef{*}{harnm}{With Harvard extensions}{for LaTeX2e version of harvard.sty}
+\optdef{n}{}{Older Harvard}{style, for LaTeX 2.09}
+\getans
+\endoptiongroup
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Language switching}
+% A \texttt{language} field can be present to specify the original language of
+% the reference; with \verb!\setlanguage!, the hyphenation patterns are set for
+% setting the title in that language.
+% \begin{macrocode}
+\beginoptiongroup{LANGUAGE FIELD}{}
+\optdef{*}{}{No language field}{}
+\optdef{l}{lang}{Add language field}{to switch hyphenation patterns temporarily}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Annotations}
+% Annotations to a reference are additional information not normally printed
+% out in the list of references. They are used for listing databases.
+% The coding here was offered by Soren Dayton.
+% \begin{macrocode}
+\beginoptiongroup{ANNOTATIONS:}{}
+\optdef{*}{}{No annotations}{will be recognized}
+\optdef{a}{annote}{Annotations}{in annote field or in .tex file of citekey name}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Presentations}
+% Presentations are talks at meetings, oral or poster, that are not otherwise
+% published. The author making the presentation is indicated with the \texttt{key}
+% entry, which is the speaker's number within the author list. The font used
+% to highlight the speaker is either bold or italics, depending on the secondary
+% option, otherwise not highlighted.
+% \begin{macrocode}
+\beginoptiongroup{PRESENTATIONS:}{}
+\optdef{*}{}{Do not add presentation type}{for conference talks}
+\optdef{p}{pres}{Add presentation, speaker not highlighted}{}
+\optdef{b}{pres,pres-bf}{Presentation, speaker bold face}{}
+\optdef{i}{pres,pres-it}{Presentaion, speaker italic}{}
+\optdef{c}{pres,pres-sc}{Presentaion, speaker in small caps}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Ordering of the listed references}
+% Choices here depend on citation style. The default in both cases is
+% alphabetical order of all authors. For numerical style, one may also
+% choose an unsorted order, which means the order is the same as the original
+% citations. This corresponds to \texttt{unsrt.bst}. Order of citation is
+% also offered for author--year for \texttt{natbib}-type styles that can
+% also be used for numerical listings.
+%
+% Another possibility is to order first by year, then authors. This too only
+% makes sense for numerical citations. However, it is offered for author--year
+% in the event that a \texttt{natbib}-type style is used for numerical
+% listings.
+%
+% For the alpha style, the ordering is by label only, so no option is
+% offered here (|\ifnumerical| is \meta{true} and |\ifmytemp| is \meta{false}).
+%
+% For author--year, the second choice is by label. (The label is the
+% optional |\bibitem| argument, and is what is printed in place of the
+% |\cite| command.) With this option, all the papers with the same first
+% author are ordered so that the one-author papers come first, followed by
+% the two-author papers, followed by the multiple-author papers. This is a
+% more sensible system for author--year citations, and is demanded by some
+% journals (like JGR).
+%
+% One problem that can arise here is when two or more references have the
+% same set of authors and year; normally they are then ordered by the
+% title, ignoring initial words like \textsl{the} and \textsl{a}, with the
+% letters a, b,
+% c, \dots, added to the year. This can mean that a set of references with
+% a natural sequence will be put into a different order. An alternative is
+% to order them by the citation keyword instead of by title. This of course
+% assumes that the keywords in this case reflect that natural sequence.
+% \begin{macrocode}
+\let\ans\relax
+\beginoptiongroup{ORDERING OF REFERENCES
+ (if non-author/year and non-alph)}
+ {\ifnumerical\ifmytemp*\fi\fi}%
+\optdef{*}{}{Alphabetical}{by all authors}
+\optdef{c}{seq-no}{Citation order}{(unsorted, like unsrt.bst)}
+\optdef{d}{seq-yr}{Year ordered}{and then by authors}
+\optdef{r}{seq-yrr}{Reverse year ordered}{and then by authors}
+\getans
+\endoptiongroup
+%
+\beginoptiongroup{ORDERING OF REFERENCES
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{}{Alphabetical}{by all authors}
+\optdef{l}{seq-lab}{By label}%
+ {(Jones before Jones and James before Jones et al)}
+\optdef{m}{seq-labc}{By label and cite order}%
+ {(like above but all Jones et al ordered as cited)}
+\optdef{k}{seq-key}{By label and cite key}{instead of label and title, as above}
+\optdef{d}{seq-yr}{Year ordered}{and then by authors (for publication lists)}
+\optdef{r}{seq-yrr}{Reverse year ordered}{and then by authors (most recent first)}
+\optdef{c}{seq-no}{Citation order}{(unsorted, only meaningful for numericals)}
+\getans
+\endoptiongroup
+% \end{macrocode}
+% The standard \btx\ styles consider the \emph{von} part of the name to be a
+% fixed part of the surname. European usage tends to alphabetize ignoring these
+% honorifics.
+% \begin{macrocode}
+\beginoptiongroup{ORDER ON VON PART
+ (if not citation order)}
+ {\if\ans c\else*\fi}%
+\optdef{*}{}{Sort on von part}{(de la Maire before Defoe)}
+\optdef{x}{vonx}{Sort without von part}{(de la Maire after Mahone)}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% Sorting normally treats authors with the same surname but different initials
+% or first name separately; but a strict ordering by cite label would lump all
+% Smiths together.
+% \begin{macrocode}
+\beginoptiongroup{IGNORE FIRST NAMES (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{}{Respect first names}{or initials, treat as different authors}
+\optdef{x}{xintls}{Sort on surname only}{and treat all Smiths as one}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Formatting author names}
+% The default is that the full names of the authors are listed, given names
+% first, unabbreviated. Of course, if only the initials have been given in
+% the \texttt{.bib} file, then that is all that can appear in the list. Other
+% possibilities are to use initials (even if full names in the \texttt{.bib}
+% file) either before or after the surnames. A specialty of the journals of
+% the American Geophysical Union is to have only the first name with
+% reversed initials.
+%
+% If the reference is part of a larger work with editors, then the editor
+% names appear later in the reference text, usually as ``edited by \dots''
+% or as ``\emph{names} (editors)''. In these cases, the editor names are
+% not usually reversed (surname first) even if the authors' names are.
+% An option is provided to format such editor names exactly as the authors'.
+% \begin{macrocode}
+\beginoptiongroup{AUTHOR NAMES:}{}
+\optdef{*}{ed-au}{Full, surname last}{(John Frederick Smith)}
+\optdef{f}{nm-revf}{Full, surname first}{(Smith, John Frederick)}
+\optdef{i}{nm-init,ed-au}{Initials + surname}{(J. F. Smith)}
+\optdef{r}{nm-rev}{Surname + initials}{(Smith, J. F.)}
+\optdef{s}{nm-rv}{Surname + dotless initials}{(Smith J F)}
+\optdef{w}{nm-rvvc}{Surname + comma + spaceless initials}{(Smith, J.F.)}
+\optdef{x}{nm-rvx}{Surname + pure initials}{(Smith JF)}
+\optdef{y}{nm-rvcx}{Surname + comma + pure initials}{(Smith, JF)}
+\optdef{z}{nm-rvv}{Surname + spaceless initials}{(Smith J.F.)}
+\optdef{a}{nm-rev1}{Only first name reversed, initials}%
+ {(AGU style: Smith, J. F., H. K. Jones)}
+\optdef{b}{nm-revv1}{First name reversed, with full names}%
+ {(Smith, John Fred, Harry Kab Jones)}
+\getans
+\endoptiongroup
+\mytempfalse
+\if\ans f\mytemptrue\fi
+\if\ans r\mytemptrue\fi
+\if\ans s\mytemptrue\fi
+\if\ans x\mytemptrue\fi
+\if\ans y\mytemptrue\fi
+\if\ans a\mytemptrue\fi
+\if\ans b\mytemptrue\fi
+\beginoptiongroup{EDITOR NAMES IN COLLECTIONS
+ (if author names reversed)}
+ {\ifmytemp*\fi}
+\if\ans r
+\optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
+\fi
+\if\ans s
+\optdef{*}{}{Editor names NOT reversed}{as edited by J J Smith}
+\fi
+\if\ans a
+\optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith}
+\fi
+\if\ans x
+\optdef{*}{}{Editor names NOT reversed}{as edited by JJ Smith}
+\fi
+\if\ans f
+\optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith}
+\fi
+\if\ans y
+\optdef{*}{}{Editor names NOT reversed}{as edited by J.J. Smith}
+\fi
+\if\ans b
+\optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith}
+\fi
+\optdef{r}{ed-rev}{Editor names reversed}{just like authors'}
+\getans
+\beginoptiongroup{POSITION OF JUNIOR
+ (if author names reversed)}
+ {}
+\optdef{*}{jnrlst}{Junior comes last}{as Smith, John, Jr.}
+\optdef{m}{}{Junior between}{as Smith, Jr., John}
+\getans
+\endoptiongroup
+\endoptiongroup
+
+\beginoptiongroup{JUNIOR PART IN THE CITATION
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{}{No `junior' part in the citations}{but in the ref listing}
+\optdef{j}{jnrlab}{`Junior' in citations}{as well as in ref listing}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{PUNCTUATION BETWEEN AUTHOR NAMES:}{}
+\optdef{*}{}{Author names separated by commas}{}
+\optdef{s}{aunm-semi}{Names separated by semi-colon}{}
+\optdef{h}{aunm-sl}{Names separated by slash}{/}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{ADJACENT REFERENCES WITH REPEATED NAMES:}{}
+\optdef{*}{}{Author/editor names always present}{}
+\optdef{d}{nmdash}{Repeated author/editor names replaced by dash}{}
+\optdef{2}{nmdash,nmd-2}{Repeated author/editor names replaced by 2 dashes}{}
+\optdef{3}{nmdash,nmd-3}{Repeated author/editor names replaced by 3 dashes}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Number of authors}
+% Normally the complete list of authors as given in the \texttt{.bib} file is
+% presented in the reference list. However, some journals prefer to limit
+% them to a maximum. If there are more than this maximum number of author
+% names, then a minimum number plus \textsl{et al.} are listed.
+%
+% Because no test for consistency of the numbers is carried out in the
+% \texttt{.bst} file itself (it might be possible, but I found it too complex),
+% this is done here.
+% \begin{macrocode}
+\beginoptiongroup{NUMBER OF AUTHORS IN BIBLIOGRAPHY:}{}
+\optdef{*}{}{All authors}{included in listing}
+\optdef{l}{nmlm}{Limited authors}{(et al replaces missing names)}
+\getans
+\endoptiongroup
+\if\ans l
+\loop
+ \ask{\num}{Maximum number of authors (1-99)}
+ \ifnum\num>99\relax
+ \mes{*** Must be between 1 and 99}
+\repeat
+\def\parsenum#1#2{\if#2\relax\wr{\spsp\spsp x#1,\pc: Maximum of #1\space authors}
+ \else\wr{\spsp\spsp x#10,x#2,\pc: Maximum of #1#2\space authors}\fi}
+\expandafter\parsenum\num\relax
+\mes{\spsp You have selected maximum \num\space authors}
+\edef\numx{\num}
+\loop
+ \ask{\num}{Minimum number (before et al given) (1-\numx)}
+ \ifnum\num>\numx
+ \mes{*** Must be between 1 and \numx}
+\repeat
+\def\parsenum#1#2{\if#2\relax\wr{\spsp\spsp m#1,\pc: Minimum of #1\space authors}
+ \else\wr{\spsp\spsp m#10,m#2,\pc: Minimum of #1#2\space authors}\fi}
+\expandafter\parsenum\num\relax
+\mes{\spsp You have selected minimum \num\space authors}
+\fi
+
+% \end{macrocode}
+%
+% Something that I finally added after being asked many times, is to allow for
+% more than one name in the citation before inserting \textsl{et~al.}
+% to allow more than 2 authors before truncating
+% \begin{macrocode}
+\beginoptiongroup{AUTHORS IN CITATIONS:}{}
+\optdef{*}{}{One author et al}{for three or more authors}
+\optdef{m}{mcite}{Some other truncation scheme}{}
+\getans
+\endoptiongroup
+\mytempfalse
+\if\ans m\mytemptrue\fi
+\beginoptiongroup{MAX AUTHORS BEFORE ET AL:
+ (if regular cite not selected)}
+ {\ifmytemp*\fi}%
+\optdef{*}{mct-1}{One et al}{}
+\optdef{2}{mct-2}{One, Two et al}{}
+\optdef{3}{mct-3}{One, Two, Three et al}{}
+\optdef{4}{mct-4}{One, Two, Three, Four et al}{}
+\optdef{5}{mct-5}{One, Two, Three, Four, Five et al}{}
+\optdef{6}{mct-6}{One, Two, Three, Four, Five, Six et al}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{MAX AUTHORS WITHOUT ET AL:
+ (if regular cite not selected)}
+ {\ifmytemp*\fi}%
+\optdef{*}{mct-x2}{Two authors without truncating}{}
+\optdef{3}{mct-x3}{Three authors}{without truncating}
+\optdef{4}{mct-x4}{Four authors}{without truncating}
+\optdef{5}{mct-x5}{Five authors}{without truncating}
+\optdef{6}{mct-x6}{Six authors}{without truncating}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Typeface of names}
+% The author names in the list of references normally appear in the current
+% typeface. This may be changed to small caps, bold, or italics.
+%
+% Alternatively, the surnames only can be formatted, with the first names in the
+% regular font. One can also specify that the words `and' and `et~al.'\ should be
+% in the regular font, or that `et~al.'\ be italic.
+%
+% Another possibility is that the names be put into a command |\bibnamefont{..}|,
+% which must be defined in the \LaTeX\ document. By default, this command does
+% not format its argument. There is also a |\bibfnamefont| command for the first
+% names, to be user-defined.
+%
+% Editor names in a collection or in a book will not normally have these
+% fonts applied to them; this may be additionally selected.
+%
+% \begin{macrocode}
+\beginoptiongroup{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:}{}
+\optdef{*}{}{Normal font for author names}{}
+\optdef{s}{nmft,nmft-sc}{Small caps authors}{(\string\sc)}
+\optdef{i}{nmft,nmft-it}{Italic authors}{(\string\it\space or \string\em)}
+\optdef{b}{nmft,nmft-bf}{Bold authors}{(\string\bf)}
+\optdef{u}{nmft,nmft-def}{User defined author font}{(\string\bibnamefont)}
+\getans
+\endoptiongroup
+\mytempfalse
+\if\ans i\mytemptrue\fi
+\if\ans s\mytemptrue\fi
+\if\ans b\mytemptrue\fi
+\if\ans u\mytemptrue\fi
+\beginoptiongroup{FONT FOR FIRST NAMES
+ (if non-default font for authors)}
+ {\ifmytemp*\fi}%
+\optdef{*}{}{First names same font as surnames}{}
+\optdef{r}{fnm-rm}{First names in normal font}{}
+\optdef{u}{fnm-def}{First names in user defined font}{(\string\bibfnamefont)}
+\getans
+\beginoptiongroup{EDITOR NAMES IN INCOLLECTION ETC:}{}
+\optdef{*}{}{Editors incollection normal font}{}
+\optdef{a}{nmfted}{Editors incollection like authors}{font}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{FONT FOR `AND' IN LIST:}{}
+\optdef{*}{}{`And' in author font}{(JONES AND JAMES)}
+\optdef{r}{nmand-rm}{`And' in normal font}{(JONES and JAMES)}
+\getans
+\endoptiongroup
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Names in Citation label}
+% This applies to author--year style only. The label is the text written
+% by the |\cite| command, and for author--year style, this is something like
+% `Daly et al.\ (1990b)'. One may select italics for the authors and for the
+% extra label attached to the year. The year always remains plain.
+%
+% This parallels the font selection for the names in the list of references
+% except that there no choice for the first names, since only surnames
+% are used in the labels. A user-defined |\citefontname| may also
+% be selected, but this \emph{must} be defined by the user since there
+% will be no default definition for it.
+%
+% If a font is selected for the cited authors, then the word `and' may be
+% optionally put in the normal font.
+%
+% It is not possible to select the type of brackets for the year, since
+% this is determined by the \LaTeX{} style option that manages the
+% author--year citations. This is not standard \LaTeX, so that there are a
+% number of private style files for achieving this.
+% \begin{macrocode}
+\beginoptiongroup{FONT OF CITATION LABELS IN TEXT
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{}{Cited authors plain}{as result of \string\cite\space command}
+\optdef{i}{lab,lab-it}{Cited authors italic}{}
+\optdef{s}{lab,lab-sc}{Cited authors small caps}{}
+\optdef{b}{lab,lab-bf}{Cited authors bold}{}
+\optdef{u}{lab,lab-def}{User defined citation font}{(\string\citenamefont)}
+\getans
+
+\mytempfalse
+\if\ans i\mytemptrue\fi
+\if\ans s\mytemptrue\fi
+\if\ans b\mytemptrue\fi
+\if\ans u\mytemptrue\fi
+\beginoptiongroup{FONT FOR `AND' IN CITATIONS
+ (if non-default font for citation lables)}
+ {\ifmytemp*\fi}%
+\optdef{*}{}{Cited `and' in author font}{}
+\optdef{r}{and-rm}{Cited `and' in normal font}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{FONT OF EXTRA LABEL
+ (The extra letter on the year)}{}
+\optdef{*}{}{Extra label plain}{}
+\optdef{i}{xlab-it}{Extra label italic}{}
+\getans
+\endoptiongroup
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Label for missing author names}
+%
+% If the author and/or editor is missing, the standard \texttt{.bst} files
+% use the \texttt{key} field in place of the names for purposes of ordering the
+% entries.
+%
+% For author--year styles, the \texttt{key} field is even inserted in the
+% reference list and in the label in place of the authors. Optionally, one can
+% suppress the year in this case, which causes \texttt{natbib} (version~7)
+% to print only that key text as a code designation for the work. Thus if
+% \texttt{KEY = "CS1-345"} and there are no authors, then |\citep| produces
+% (CS1-345) and |\citet| simply CS1-345. That is, they behave like
+% |\citeauthor|. If \texttt{natbib} did not recognize the blank year, one would
+% get (CS1-345, ) and CS1-345 (). (Earlier versions of \texttt{natbib} crash on
+% a blank year.)
+% \begin{macrocode}
+\beginoptiongroup{LABEL WHEN AUTHORS MISSING
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{keyxyr}{Year blank when KEY replaces missing author}{(for natbib 7.0)}
+\optdef{y}{}{Year included when KEY replaces missing author}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Missing date}
+% A missing date can be set to ???? or simply left blank. In the latter case,
+% \texttt{natbib} version~7 will print only the authors without any year
+% punctuation or brackets.
+%
+% \begin{macrocode}
+\beginoptiongroup{MISSING DATE
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{}{Missing date set to ????}{in label and text}
+\optdef{b}{blkyear}{Missing date left blank}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Position of date}
+% This applies to author--year style only. It makes sense to put the date
+% immediately after the author list, since the two items (author and year)
+% are the identifiers of the reference. Default position is at the
+% end of the references, before any notes. It is also possible to place
+% it even after the notes.
+%
+% Medical journals have a system where the date is part of the journal
+% specification, as Lancet 1994;45(2):34--40. Otherwise the date appears at
+% the end.
+% \begin{macrocode}
+\beginoptiongroup{DATE POSITION:}{}
+\optdef{*}{}{Date at end}{}
+\optdef{b}{dt-beg}{Date after authors}{}
+\optdef{j}{dt-jnl}{Date part of journal spec.}{(as 1994;45:34-40) else at end}
+\optdef{e}{dt-end}{Date at very end}{after any notes}
+\getans
+\endoptiongroup
+\if\ans b\mytemptrue\else\if\ans j\mytemptrue\else\mytempfalse\fi\fi
+% \end{macrocode}
+%
+% \subsection*{Format of date}
+% The year may be enclosed in parentheses, brackets, or preceded by a
+% colon. If none of these are selected, the date (month plus year) appears.
+% For author--year, the date normally consists only of the year, no month,
+% but this may be overridden.
+%
+% If the date comes just after the authors, then one might want special
+% punctuation following it, like a colon, or space only. The latter is
+% probably desirable if the date is brackets or parentheses.
+%
+% The date can even be put into bold face.
+% \begin{macrocode}
+\beginoptiongroup{DATE FORMAT
+ (if non author-year citations)}
+ {\ifnumerical*\fi}%
+\optdef{*}{}{Plain month and year}{without any brackets}
+\optdef{p}{yr-par}{Date in parentheses}{as (May 1993)}
+\optdef{b}{yr-brk}{Date in brackets}{as [May 1993]}
+\optdef{c}{yr-col}{Date preceded by colon}{as `: May 1993'}
+\optdef{d}{yr-per}{Date preceded by period}{as `. May 1993'}
+\optdef{m}{yr-com}{Date preceded by comma}{as `, May 1993'}
+\optdef{s}{yr-blk}{Date preceded by space}{only, as ` May 1993'}
+\getans
+\beginoptiongroup{SUPPRESS MONTH:}{}
+\optdef{*}{}{Date is month and year}{}
+\optdef{x}{xmth}{Date is year only}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{REVERSED DATE
+ (if including month)}
+ {\if\ans x\else*\fi}%
+\optdef{*}{}{Date as month year}{}
+\optdef{r}{dtrev}{Date as year month}{}
+\getans
+\endoptiongroup
+\endoptiongroup
+
+\beginoptiongroup{DATE FORMAT
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{}{Year plain}{without any brackets}
+\optdef{p}{yr-par}{Year in parentheses}{as (1993)}
+\optdef{b}{yr-brk}{Year in brackets}{as [1993]}
+\optdef{c}{yr-col}{Year preceded by colon}{as `: 1993'}
+\optdef{d}{yr-per}{Year preceded by period}{as `. 1993'}
+\optdef{m}{yr-com}{Date preceded by comma}{as `, 1993'}
+\optdef{s}{yr-blk}{Year preceded by space}{only, as ` 1993'}
+\getans
+\beginoptiongroup{INCLUDE MONTHS:}{}
+\optdef{*}{}{Date is year only}{without the month}
+\optdef{m}{aymth}{Include month in date}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{REVERSED DATE
+ (if including month)}
+ {\if\ans m*\fi}%
+\optdef{*}{}{Date as month year}{}
+\optdef{r}{dtrev}{Date as year month}{}
+\getans
+\endoptiongroup
+\endoptiongroup
+
+\beginoptiongroup{DATE PUNCTUATION
+ (if date not at end)}
+ {\ifmytemp*\fi}%
+\optdef{*}{}{Date with standard block punctuation}{(comma or period)}
+\optdef{c}{yrp-col}{Colon after date}{as 1994:}
+\optdef{s}{yrp-semi}{Semi-colon after date}{as 1994;}
+\optdef{p}{yrp-per}{Period after date}{even when blocks use commas}
+\optdef{x}{yrp-x}{No punct. after date}{}
+\getans
+\beginoptiongroup{BLANK AFTER DATE:}{}
+\optdef{*}{}{Space after date}{and punctuation}
+\optdef{x}{yrpp-xsp}{No space after date}{as 1994:45}
+\getans
+\endoptiongroup
+\endoptiongroup
+\beginoptiongroup{DATE FONT:}{}
+\optdef{*}{}{Date in normal font}{}
+\optdef{b}{dtbf}{Date in bold face}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% Normally in author--year citations, the \texttt{year} entry is truncated
+% to the last 4 characters, which should be the 4 digits of the year. Some
+% users have requested the possibility of suppressing this truncation so
+% that they may put text in the \texttt{year} field, such as ``in press.''
+% Another use for it is when years are given as ``1968--72''. Actually,
+% I have no idea why the year should be truncated at all.
+% \begin{macrocode}
+\beginoptiongroup{TRUNCATE YEAR
+ (if author-year citations)}
+ {\ifnumerical\else*\fi}%
+\optdef{*}{note-yr}{Year text full}{as 1990--1993 or `in press'}
+\optdef{t}{}{Year truncated}{to last 4 digits}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Article title in journal}
+% The title of an article in a journal or in a collection (a book, or
+% conference proceedings) may appear plain, in italics, within single
+% or double quotes or even in guillemets. The last is best with T1 coding; a
+% poor man's version for OT1 is provided; \LaTeXe\ is required in both cases.
+%
+% Furthermore, it may have sentence capitalization (first
+% word and word following colon) or be capitalized as in the \texttt{.bib} file
+% entry. That is why it is recommended to capitalize the entry text as it
+% should appear when fully capitalized, putting words that are always
+% capitalized in braces. Example:
+% \begin{quote}
+% |TITLE="The Results of the {Giotto} Mission"|
+% \end{quote}
+% which produces either ``The results of the Giotto mission'' or ``The
+% Results of the Giotto Mission'', depending on option.
+%
+% Additionally, the article titles may be fully suppressed.
+% \begin{macrocode}
+\beginoptiongroup{TITLE OF ARTICLE:}{}
+\optdef{*}{}{Title plain}{with no special font}
+\optdef{i}{tit-it}{Title italic}{(\string\em)}
+\optdef{q}{tit-qq,qt-s}{Title and punctuation in single quotes}{(`Title,' ..)}
+\optdef{d}{tit-qq}{Title and punctuation in double quotes}{(``Title,'' ..)}
+\optdef{g}{tit-qq,qt-g}{Title and punctuation in guillemets}{(<<Title,>> ..)}
+\optdef{x}{tit-qq,qt-s,qx}{Title in single quotes}{(`Title', ..)}
+\optdef{y}{tit-qq,qx}{Title in double quotes}{(``Title'', ..)}
+\optdef{z}{tit-qq,qt-g,qx}{Title in guillemets}{(<<Title>>, ..)}
+\getans
+\endoptiongroup
+\mytempfalse
+\if\ans q\mytemptrue\fi
+\if\ans d\mytemptrue\fi
+\if\ans g\mytemptrue\fi
+\if\ans x\mytemptrue\fi
+\if\ans y\mytemptrue\fi
+\if\ans z\mytemptrue\fi
+\beginoptiongroup{COLLECTION/PROCEEDINGS TITLES
+ (if quoted title)}
+ {\ifmytemp*\fi}%
+\optdef{*}{bt-qq}{Quote collection and proceedings titles}{too}
+\optdef{x}{}{Collection and proceedings titles not in quotes}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{CAPITALIZATION OF ARTICLE TITLE:}{}
+\optdef{*}{}{Sentence style}{(capitalize first word and those in braces)}
+\optdef{t}{atit-u}{Title style}{(just as in bib entry)}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{ARTICLE TITLE PRESENT:}{}
+\optdef{*}{}{Article title present}{in journals and proceedings}
+\optdef{x}{jtit-x}{No article title}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Journal names}
+% Abbreviated journal names normally contain periods; the periods may be
+% removed with this option. In fact, only letters, numbers, and spacing are
+% retained.
+% \begin{macrocode}
+\beginoptiongroup{JOURNAL NAMES:}{}
+\optdef{*}{}{Periods in journal names}{are retained, as `Phys. Rev.'}
+\optdef{x}{jxper}{Dotless journal names}{as `Phys Rev'}
+\getans
+\endoptiongroup
+% \end{macrocode}
+% Journal name is normally printed in italics; can be left in normal font.
+% \begin{macrocode}
+\beginoptiongroup{JOURNAL NAME FONT:}{}
+\optdef{*}{}{Journal name italics}{}
+\optdef{r}{jttl-rm}{Journal name normal}{font}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Title of Theses and Technical Reports}
+% The title of a these (PhD or Master's) is normally treated the same
+% as that of a book. Optionally, it may be formatted like that of
+% an article.
+%
+% The title of a technical report is normally treated the same as that
+% of an article. Optionally, it may be formatted like that of a book.
+%
+% \begin{macrocode}
+\beginoptiongroup{THESIS TITLE:}{}
+\optdef{*}{}{Thesis titles like books}{}
+\optdef{a}{thtit-a}{Thesis title like article}{}
+\optdef{x}{thtit-x}{No thesis title}{}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{TECHNICAL REPORT TITLE:}{}
+\optdef{*}{}{Tech. report title like articles}{}
+\optdef{b}{trtit-b}{Tech. report title like books}{}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{TECHNICAL REPORT NUMBER:}{}
+\optdef{*}{}{Tech. report and number plain}{as `Tech. Rep. 123'}
+\optdef{i}{trnum-it}{Tech. report and number italic}%
+ {as `{\string\it\space Tech. Rep. 123'}}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Journal reference}
+% Great diversity of opinion exists as to how a journal reference is to be
+% formatted. It consists of a volume, possibly a number, and page limits.
+% The number is really only necessary if the page numbers within one volume
+% start at 1 for each physical `number'. Since journals are often bound
+% together in one volume later, it makes more sense to number the pages
+% continuously through the whole volume.
+%
+% I am only aware of one journal that used to reset the pagination for each
+% `number', in which case the number was part of the page designation.
+% I had erroneously provided an option \texttt{vnum-pg} to achieve this, but I
+% now realize that instead, for this one journal, the database entries must
+% contain \texttt{pages="(2)33--2(55)"}. This option has been removed at
+% version 3.84.
+%
+% A number of styles for journal specifications are
+% \begin{quote}
+% \begin{tabular}{l@{\qquad}l}
+% 21(2):33--55 & 21, no.\ 2: 33--55\\
+% \textbf{21}(2):33--55 & \textbf{21}, \#2, 33--55\\
+% \textit{21}(2), 33--55 & \textit{21} (2); 33--55 \\
+% 21(2) (1995) 33--55 & 21(1995), 33-55\\
+% 21(2) 33--55 & vol.~21 (2), pp.~33--55
+% \end{tabular}
+% \end{quote}
+%
+% Here both start and stop page numbers have been given; often only the
+% start page is wanted.
+%
+% It is also possible to include the year as part of the journal specification,
+% in which case the year is always in parentheses, attached snugly or with space
+% to the volume, or preceding the pages.
+%
+% \begin{macrocode}
+\beginoptiongroup{JOURNAL VOLUME:}{}
+\optdef{*}{}{Volume plain}{as vol(num)}
+\optdef{i}{vol-it}{Volume italic}{as {\string\em\space vol}(num)}
+\optdef{b}{vol-bf}{Volume bold}{as {\string\bf\space vol}(num)}
+\optdef{d}{vol-2bf}{Volume and number bold}{as {\string\bf\space vol(num)}}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% The form of the `number' is also given: in parentheses, with `no.',
+% with \#, or omitted. The \texttt{vnum-b} option is meant to be used
+% with \texttt{jdt-v} and \texttt{jdt-vs} but could be used alone.
+% \begin{macrocode}
+\beginoptiongroup{JOURNAL VOL AND NUMBER:}{}
+\optdef{*}{}{Journal vol(num)}{as 34(2)}
+\optdef{s}{vnum-sp}{Journal vol (num)}{as 34 (2)}
+\optdef{c}{vnum-cm}{Journal vol, num}{as 34, 2}
+\optdef{n}{vnum-nr}{Journal vol, no. num}{as 34, no. 2}
+\optdef{h}{vnum-h}{Journal vol, \string\# number}{as 34, \string\#2}
+\optdef{b}{vnum-b}{Journal vol number}{as 34 2}
+\optdef{x}{vnum-x}{Journal vol, without number}{as 34}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{VOLUME PUNCTUATION:}{}
+\optdef{*}{}{Volume with colon}{as vol(num):ppp}
+\optdef{s}{volp-sp}{Volume with colon and space}{as vol(num): ppp}
+\optdef{h}{volp-semi}{Volume with semi-colon}{as vol(num); ppp}
+\optdef{c}{volp-com}{Volume with comma}{as vol(num), ppp}
+\optdef{b}{volp-blk}{Volume with blank}{as vol(num) ppp}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{YEAR IN JOURNAL SPECIFICATION:}{}
+\optdef{*}{}{Journal year like others}{as given by date position}
+\optdef{v}{jdt-v}{Journal vol(year)}{as 34(1995)}
+\optdef{s}{jdt-vs}{Journal vol (year)}{as 34 (1995)}
+\optdef{p}{jdt-p}{Year with pages}{as 34(2), (1995) 1345--1387}
+\optdef{c}{jdt-pc}{Year, comma, pages}{as 34(2), (1995), 1345--1387}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{PAGE NUMBERS:}{}
+\optdef{*}{}{Start and stop page numbers}{given}
+\optdef{f}{jpg-1}{Only start page number}{}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{LARGE PAGE NUMBERS:}{}
+\optdef{*}{}{No separators for large page numbers}{}
+\optdef{c}{pgsep-c}{Comma inserted over 9999}{as 11,234}
+\optdef{s}{pgsep-s}{Thin space inserted over 9999}{as 11 234}
+\optdef{p}{pgsep-p}{Period inserted over 9999}{as 11.234}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{WORD `PAGE' IN ARTICLES:}{}
+\optdef{*}{}{Article pages numbers only}{as 234-256}
+\optdef{p}{jwdpg}{Include `page' in articles}{as pp. 234--256}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% Some journals want page numbers at the end, even for books, proceedings, as
+% well as for journals.
+% \begin{macrocode}
+\beginoptiongroup{POSITION OF PAGES:}{}
+\optdef{*}{}{Pages given mid text}{as is normal}
+\optdef{e}{pp-last}{Pages at end}{but before any notes}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{WORD `VOLUME' IN ARTICLES:}{}
+\optdef{*}{}{Article volume as number only}{as 21}
+\optdef{p}{jwdvol}{Include `volume' in articles}{as vol. 21}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% Fiddle with the format and location of the number/series for collections and
+% inproceedings.
+% \begin{macrocode}
+\beginoptiongroup{NUMBER AND SERIES FOR COLLECTIONS:}{}
+\optdef{*}{num-xser}{Allows number without series}{and suppresses word "number"}
+\optdef{s}{}{Standard BibTeX}{as: "number 123 in Total Works"; error if number and no series}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{POSITION OF NUMBER AND SERIES:}{}
+\optdef{*}{}{After chapter and pages}{as in standard BibTeX}
+\optdef{t}{numser}{Just before publisher}{or organization}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% Fiddle with the format and location of series and volume with books and collections.
+% \begin{macrocode}
+\beginoptiongroup{VOLUME AND SERIES FOR BOOKS/COLLECTIONS:}{}
+\optdef{*}{}{Vol. 23 of Series}{as in standard BibTeX}
+\optdef{s}{ser-vol}{Series, vol. 23}{}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{POSITION OF VOLUME AND SERIES FOR INCOLLECTIONS:}{}
+\optdef{*}{}{Series and volume after the editors}{}
+\optdef{e}{ser-ed}{Series and volume after booktitle}{and before editors}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% It is possible to decide whether the journal name should be
+% separated from the following specifications with a blank or comma.
+% \begin{macrocode}
+\beginoptiongroup{JOURNAL NAME PUNCTUATION:}{}
+\optdef{*}{}{Comma after journal}{name}
+\optdef{x}{jnm-x}{Space after journal}{name}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Books}
+% The title of a book (as opposed to an article in a book or journal) is
+% normally italicized. This may be set to the regular font.
+%
+% The page numbers in books may be set in parentheses, as (pp.\ 345--350).
+% \begin{macrocode}
+\beginoptiongroup{BOOK TITLE:}{}
+\optdef{*}{}{Book title italic}{(\string\em)}
+\optdef{p}{btit-rm,bt-rm}{Book title plain}{(no font command)}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{PAGES IN BOOKS:}{}
+\optdef{*}{}{Pages in book plain}{as pp. 50-55}
+\optdef{p}{bkpg-par}{Pages in book in parentheses}{as (pp. 50-55)}
+\optdef{x}{bkpg-x}{Pages in book bare}{as 50-55}
+\getans
+\endoptiongroup
+\beginoptiongroup{TOTAL PAGES OF A BOOK:}{}
+\optdef{*}{}{Total book pages not printed}{}
+\optdef{p}{pg-bk}{For book: 345 pages}{or pp.}
+\optdef{a}{pg-bk,pg-pre}{Total book pages before publisher}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+% Some psychology journals wish to have the publisher's address preceding
+% the name, separated by colon, as
+% \begin{quote}New York: Wiley and Sons\end{quote}
+%
+% Some journals (e.g.\ Nature) put publisher in parentheses with date,
+% as (Wiley and Sons, New York, 1983). These normally put the date in
+% parentheses at the end anyway, so this is a merging of the two sets of
+% parentheses.
+% \begin{macrocode}
+\beginoptiongroup{PUBLISHER ADDRESS:}{}
+\optdef{*}{}{Publisher, address}{as Harcourt, New York}
+\optdef{a}{add-pub}{Address: Publisher}{as New York: Harcourt}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{PUBLISHER IN PARENTHESES:}{}
+\optdef{*}{}{Publisher as normal block}{without parentheses}
+\optdef{p}{pub-par}{Publisher in parentheses}{}
+\optdef{d}{pub-date}{Publisher and date in parentheses}{(Oxford, 1994)}
+\optdef{c}{pub-date,pub-xc}{Publisher and date in parentheses, no comma}{(Oxford 1994)}
+\optdef{f}{pub-date,pub-xpar}{Publisher and date without parentheses}{Oxford, 1994}
+\optdef{k}{pub-date,pub-xpar,pub-xc}{Publisher and date, no parentheses, no comma}{Oxford 1994}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{PUBLISHER POSITION:}{}
+\optdef{*}{}{Publisher after chapter, pages}{}
+\optdef{p}{pre-pub}{Publisher before chapter, pages}{}
+\optdef{e}{pre-edn}{Publisher after edition}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{ISBN, ISSN, DOI numbers}
+% Books normally possess an ISBN number. This may be included as an
+% optional entry for \texttt{book}, \texttt{inbook}, \texttt{booklet},
+% \texttt{incollection}, \texttt{proceedings}, \texttt{inproceedings}.
+% However, it should be suppressed for \texttt{inbook} etc.\ when
+% there is a crossref to another book with the ISBN number.
+%
+% Periodicals contain an ISSN number. Add this to \texttt{article}, or
+% course, but also to \texttt{inproceedings} and \texttt{proceedings}, since
+% they are sometimes printed in a periodical.
+%
+% Journal articles that appear online are given a DOI number, something more
+% robust than a URL that can change as machines are upgraded.
+% The American Geophysical Union (AGU) uses the DOI as part of the
+% page number substitution for electronic journals, placing the number
+% where the pages would normally appear.
+% \begin{macrocode}
+\beginoptiongroup{ISBN NUMBER:}{}
+\optdef{*}{isbn}{Include ISBN}{for books, booklets, etc.}
+\optdef{x}{}{No ISBN}{}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{ISSN NUMBER:}{}
+\optdef{*}{issn}{Include ISSN}{for periodicals}
+\optdef{x}{}{No ISSN}{}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{DOI NUMBER:}{}
+\optdef{*}{doi}{Include DOI}{as "doi: number"}
+\optdef{u}{url-doi}{Format DOI as URL //doi.org/doi}{(must give url options!)}
+\optdef{a}{agu-doi,doi}{Insert DOI AGU style}{as part of page number}
+\optdef{x}{}{No DOI}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Editor of book without author}
+%
+% This is normally
+% \begin{quote}
+% J. K. James, editor
+% \end{quote}
+% but may also be
+% \begin{quote}
+% J. K. James, (editor)\\
+% J. K. James (editor),
+% \end{quote}
+% Alternatively, the word \textsl{editor} may be capitalized and/or
+% abbreviated.
+%
+% \begin{macrocode}
+\beginoptiongroup{`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):}{}
+\optdef{*}{}{Word `editor' after name}{}
+\optdef{a}{edpar}{`Name (editor),'}{in parentheses, after name, comma after}
+\optdef{b}{edpar,bkedcap}{`Name (Editor),'}{as above, editor upper case}
+\optdef{c}{edparc}{`Name, (editor)'}{in parentheses, after name, comma between}
+\optdef{d}{edparc,bkedcap}{`Name, (Editor)'}{as above, editor upper case}
+\optdef{e}{edparxc}{`Name (editor)'}{in parentheses, after name, no commas}
+\optdef{f}{edparxc,bkedcap}{`Name (Editor)'}{as above, editor upper case}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Edited by}
+% For an article within an edited collection, the normal form is
+% \begin{quote}
+% In J. K. James, editor, \emph{Title of Collection} \dots
+% \end{quote}
+% Alternative forms are
+% \begin{quote}
+% In J. K. James (editor), \emph{Title} \dots\\
+% In \emph{Title}, edited by J. K. James \dots\\
+% In \emph{Title} (Edited by J. K. James) \dots
+% \end{quote}
+% If none of the \texttt{edby} variations is used, then the same system is
+% used as for edited books, i.e. \texttt{edpar} applies.
+% \begin{macrocode}
+\beginoptiongroup{EDITOR IN COLLECTIONS:}{}
+\optdef{*}{}{Same as for edited book}{(names before booktitle)}
+\optdef{b}{edby}{In booktitle, edited by .. }{(where .. is names)}
+\optdef{p}{edby-par}{In booktitle (edited by ..)}{}
+\optdef{c}{edby-parc}{In booktitle, (edited by ..)}{}
+\optdef{e}{edby,edbyx}{In booktitle, editor ..}{}
+\optdef{f}{edby,edbyw}{In booktitle, (editor) ..}{}
+\optdef{k}{edby-par,edbyx}{In booktitle (editor..)}{}
+\optdef{g}{edby-parc,edbyx}{In booktitle, (editor..)}{}
+\optdef{j}{edby,edbyy}{In booktitle, .., editor}{}
+\optdef{m}{edby-par,edbyy}{In booktitle (.., editor)}{}
+\getans
+\endoptiongroup
+\mytempfalse
+\if\ans p\mytemptrue\fi
+\if\ans k\mytemptrue\fi
+\if\ans c\mytemptrue\fi
+\if\ans f\mytemptrue\fi
+\beginoptiongroup{CAPITALIZE `EDITOR' OR `EDITED BY'
+ (if editor capitalizable)}
+ {\ifmytemp*\fi}%
+\optdef{*}{}{`(editor,..)' or `(edited by..)'}{in lower case}
+\optdef{c}{edcap}{`(Editor,..)' or `(Edited by..)'}{in upper case}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Block punctuation}
+% Blocks are logical sections of the reference specification, such as the
+% author block, the journal block, editor block, etc. These are normally
+% separated by periods, but alternatively a comma may be used. Another
+% choice is to use commas except after titles where a period is given.
+%
+% \LaTeX\ offers an \texttt{openbib} option, which means that the blocks
+% are not only new sentences, but new lines as well. This can only
+% function when the default option here is taken, for then the command
+% |\newblock| is placed between the blocks. This command is normally
+% defined to do nothing, but \LaTeX\ redefines it to issue a new line
+% when open bibliographies are wanted.
+% \begin{macrocode}
+\beginoptiongroup{PUNCTUATION BETWEEN SECTIONS (BLOCKS):}{}
+\optdef{*}{}{\string\newblock\space after blocks}
+ {(periods or new lines with openbib option)}
+\optdef{c}{blk-com}{Comma between blocks}{}
+\optdef{s}{blk-com,com-semi}{Semi-colon between blocks}{}
+\optdef{b}{blk-com,com-blank}{Blanks between blocks}{}
+\optdef{t}{blk-tit}{Period after titles of articles, books, etc}{else commas}
+\optdef{u}{blk-tit,tit-col}{Colon after titles of articles, books, etc}{else commas}
+\optdef{a}{blk-tita}{Period after titles of articles}{else commas}
+\optdef{d}{blk-tita,tit-col}{Colon after titles of articles}{else commas}
+\getans
+\endoptiongroup
+\mytempfalse
+\if\ans c\mytemptrue\fi
+\if\ans s\mytemptrue\fi
+\if\ans b\mytemptrue\fi
+\if\ans t\mytemptrue\fi
+\if\ans a\mytemptrue\fi
+\beginoptiongroup{PUNCTUATION BEFORE NOTES
+ (if not using \string\newblock)}
+ {\ifmytemp*\fi}%
+\optdef{*}{}{Notes have regular punctuation}{like all other blocks}
+\optdef{p}{blknt}{Notes preceded by period}{}
+\getans
+\endoptiongroup
+\beginoptiongroup{PUNCTUATION AFTER AUTHORS:}{}
+\optdef{*}{}{Author block normal}{with regular block punctuation}
+\optdef{c}{au-col}{Author block with colon}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{\textsl{In} with colon}
+% When referring to works in a collection, one begins the block describing
+% that collection with \textsl{In}. Optionally, one may add a colon.
+% \begin{macrocode}
+\beginoptiongroup{PUNCTUATION AFTER `IN':}{}
+\optdef{*}{}{Space after `in'}{for incollection or inproceedings}
+\optdef{c}{in-col}{Colon after `in'}{(as `In: ...')}
+\optdef{i}{in-it}{Italic `in'}{and space}
+\optdef{d}{in-col,in-it}{Italic `in' and colon}{}
+\optdef{x}{in-x}{No word `in'}{for edited works}
+\getans
+\endoptiongroup
+\beginoptiongroup{`IN' WITH JOURNAL NAMES
+ (if using 'in' with collections)}
+ {\if\ans x\else*\fi}
+\optdef{*}{}{No `in' before journal name}{}
+\optdef{i}{injnl}{Add `in' before journal name}{in style for incollection}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Final punctuation}
+% The punctuation at the end of the reference is normally a period. This
+% may be suppressed.
+% \begin{macrocode}
+\beginoptiongroup{FINAL PUNCTUATION:}{}
+\optdef{*}{}{Period at very end}{of the listed reference}
+\optdef{x}{fin-bare}{No period at end}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Abbreviations}
+% A number of words may be abbreviated: pages, editors, volume, chapter,
+% and so on. The first two may be independently set to abbreviation, the
+% rest with a single option.
+%
+% Additionally, the edition numbers may be
+% output as words (first, second, etc.) or as numbers (1st, 2nd, etc.).
+% (Recall that the input in the \texttt{.bib} file is always as English
+% words.)
+% \begin{macrocode}
+\beginoptiongroup{ABBREVIATE WORD `PAGES'
+ (if not using external language file)}
+ {\if!\cfile!\relax*\fi}%
+\optdef{*}{}{`Page(s)'}{(no abbreviation)}
+\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.}
+\optdef{x}{ppx}{`Page' omitted}{}
+\getans
+\beginoptiongroup{ABBREVIATE WORD `EDITORS':}{}
+\optdef{*}{}{`Editor(s)'}{(no abbreviation)}
+\optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{OTHER ABBREVIATIONS:}{}
+\optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc}
+\optdef{a}{abr}{Abbreviations}{of such words}
+\getans
+\endoptiongroup
+\beginoptiongroup{ABBREVIATION FOR `EDITION'
+ (if abbreviating words)}
+ {\if\ans a*\fi}%
+\optdef{*}{}{`Edition' abbreviated as `edn'}{}
+\optdef{a}{ednx}{`Edition' abbreviated as `ed'}{}
+\getans
+\beginoptiongroup{MONTHS WITH DOTS:}{}
+\optdef{*}{}{Months with dots}{as Jan.}
+\optdef{x}{mth-bare}{Months without dots}{as Feb Mar}
+\getans
+\endoptiongroup
+\endoptiongroup
+\beginoptiongroup{EDITION NUMBERS:}{}
+\optdef{*}{xedn}{Editions as in database}{saving much processing memory}
+\optdef{w}{}{Write out editions}{as first, second, third, etc}
+\optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc}
+\getans
+\endoptiongroup
+\endoptiongroup
+% \end{macrocode}
+%
+% The above choices about abbreviations are made only if the internal
+% languages are taken (English or \texttt{babel}). For an external language
+% definition file, these choices, along with possible other ones, are made
+% in the external file, which is read in at this point.
+% \begin{macrocode}
+\umes{Reading external language file \string\cfile=\cfile}%
+\if!\cfile!\relax\else
+ \input\cfile
+\fi
+% \end{macrocode}
+%
+% This file contains the standard set of stored journal names present in
+% the basic bibliography style files. If other files containing journal
+% names are to be included, they may only contain the options \texttt{jabr}
+% or \texttt{jaa} since these options are selected here. No option
+% menus from the journal-name files will be read in.
+% \begin{macrocode}
+\beginoptiongroup{STORED JOURNAL NAMES:}{}
+\optdef{*}{}{Full journal names}{for prestored journals}
+\optdef{a}{jabr}{Abbreviated journal names}{}
+\optdef{s}{jabr,jaa}{Abbreviated with astronomy shorthands}{like ApJ and AJ}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Variations on \textsl{and}}
+% It is possible to replace the word \textsl{and} with an ampersand \&, and to
+% specify whether a comma is to precede \textsl{and} in a list of more than two
+% names.
+%
+% A variable \textsl{and} may be provided for with the command |\BIBand|
+% in place of the word. In this case, the command must be defined in the
+% document file or some other package called. (This is intended for situations
+% where an ampersand is wanted in parenthetical citations, but the word in
+% textual ones.)
+%
+% \begin{macrocode}
+\beginoptiongroup{AMPERSAND:}{}
+\optdef{*}{}{Use word `and'}{in author lists}
+\optdef{a}{amper}{Use ampersand}{in place of `and'}
+\optdef{v}{varand}{Use \string\BIBand}{in place of `and'}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{COMMA BEFORE `AND':}{}
+\optdef{*}{}{Comma before `and'}{as `Tom, Dick, and Harry'}
+\optdef{n}{and-xcom}{No comma before `and'}{as `Tom, Dick and Harry'}
+\optdef{c}{and-com}{Comma even with 2 authors}{as `Tom, and Harry'}
+\getans
+\endoptiongroup
+\beginoptiongroup{COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS
+ (if using comma before `and' with authors)}
+ {\if\ans c*\fi}%
+\optdef{*}{and-com-ed}{Comma with 2 editors}{in collections}
+\optdef{x}{}{Two editors without comma}{as `Tom and Harry'}
+\getans
+\endoptiongroup
+\beginoptiongroup{NO `AND' IN REFERENCE LIST:}{}
+\optdef{*}{}{With `and'}{before last author in reference list}
+\optdef{x}{xand}{No `and'}{as `Tom, Dick, Harry'}
+\getans
+\endoptiongroup
+
+\beginoptiongroup{COMMA BEFORE `ET AL':}{}
+\optdef{*}{}{Comma before `et al'}{in reference list}
+\optdef{x}{etal-xc}{No comma before `et al'}{}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Font of \textsl{et al}}
+% One can chose that \textsl{et~al.}\ be put into italics.
+% Or, if the authors are in a different font from the regular one, the
+% \textsl{et~al.}\ can still be Roman.
+% \begin{macrocode}
+\beginoptiongroup{FONT OF `ET AL':}{}
+\optdef{*}{}{Plain et al}{}
+\optdef{i}{etal-it}{Italic et al}{}
+\optdef{r}{etal-rm}{Roman et al}{even when authors something else}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Additional Data Fields}\label{sec:revtex}
+% The American Physical Society's REV\TeX\ package contains \btx\ support
+% with a \texttt{bst} file generated from a variant of
+% \texttt{\filename}. The extra fields are also available here.
+% \begin{itemize}
+% \item \textbf{collaboration}: A collaboration name associated with a
+% reference.
+% \item \textbf{eprint}: The e-print citation for the reference (Los Alamos
+% or otherwise). E-print numbers can be turned into hyperlinks to the
+% online article. The output is\\
+% \hspace*{2em}|\eprint{|\textit{eprint-spec}|}|
+% \item \textbf{archive}: is an optional argument for |\eprint|, as\\
+% \hspace*{2em}|\eprint[|\textit{archive-des}|]{|\textit{eprint-spec}|}|\\
+% The \textit{archive-des} is some code such as \texttt{arXiv} that is
+% translated to a base URL by a class or package file. The default definition
+% of |\eprint| ignores \textit{archive-des} and prints \textit{eprint-spec}
+% as a URL.
+% \item \textbf{url}: A URL associated with the reference. Can be turned
+% into a hyperlink.
+% \end{itemize}
+%
+% A collaboration appears as part of the author list and the other two
+% appear at the end of the citaton. The URL field can be selected
+% independently of this option.
+%
+% In addition there are new fields for journals like Phys.\ Rev.~D that
+% no longer use page numbers.
+% \begin{itemize}
+% \item \textbf{eid}: Electronic article identifier.
+% \item \textbf{numpages}: Number of pages in an article. For use in
+% conjunction with the \textbf{eid} field when page counts are
+% desired. Deprecated when submitting to Phys.\ Rev.
+%
+% The \texttt{eprint} (with \texttt{archive}) and \texttt{url} fields may be
+% included independently of the other REV\TeX\ fields.
+%
+% The \texttt{eid} field is now always included, although it is optional for
+% the bibliography entries. This electronic identifier is a replacement for the
+% page number in electronic journals: it is the sequence number in the printed
+% volume. If present, it will be used in place of the page number.
+%
+% \end{itemize}
+%
+% \begin{macrocode}
+\beginoptiongroup{ADDITIONAL REVTeX DATA FIELDS:}{}
+\optdef{*}{}{No additional fields}{for REVTeX}
+\optdef{r}{revdata,eprint,url,url-blk}{Include REVTeX data fields}
+ {collaboration, eid, eprint, archive, numpages, url}
+\getans
+\mytemptrue
+\if\ans r\mytempfalse\fi
+\beginoptiongroup{E-PRINT DATA FIELD:
+(without REVTeX fields)}
+{\ifmytemp*\fi}
+\optdef{*}{}{Do not include eprint field}{}
+\optdef{e}{eprint}{Include eprint and archive fields}{for electronic publications}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{URL address}
+% For electronic documents with an Internet address, add a URL entry.
+% Harvard already has this, but here it is done for all styles.
+% The URL text will be set with the \verb!\url! command in the \texttt{url}
+% package by Donald Arseneau. This package must be loaded for the command
+% to work right. It allows line breaks at punctuations. Otherwise,
+% \verb!\texttt! is used instead, with no line breaks. The URL text is preceded
+% by \verb!\urlprefix! which defaults to ``URL '' but may be redefined by the
+% user to be whatever s/he wants. The final space must be included.
+%
+% Note: selecting the REV\TeX\ fields automatically includes this, so the
+% offer only is made if REV\TeX\ has been rejected.
+%
+% \begin{macrocode}
+\beginoptiongroup{URL ADDRESS:
+(without REVTeX fields)}{\ifmytemp*\fi}
+\optdef{*}{}{No URL}{for electronic (Internet) documents}
+\optdef{u}{url,url-blk}{Include URL}{as regular item block}
+\optdef{n}{url,url-nt}{URL as note}{}
+\optdef{l}{url,url-nl}{URL on new line}{after rest of reference}
+\getans
+\endoptiongroup
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Reference Component Tagging}
+% If reference component tagging is enabled, we
+% apply tags like |\bibinfo| and |\eprint| to the fields of data
+% in the content of the |\bibitem| statement. We also ensure that
+% these commands have a default meaning within the scope of the |thebibliography|
+% environment. The default definitions simply print the field and ignore the
+% tag. However, other programs or packages might make use of the tag
+% information to separate authors from title, for example.
+%
+% \begin{macrocode}
+\beginoptiongroup{REFERENCE COMPONENT TAGS:}{}
+\optdef{*}{}{No reference component tags}
+ {in the \string\bibitem\space entries}
+\optdef{b}{bibinfo}{Reference component tags}
+ {like \string\bibinfo\space in the content of \string\bibitem}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Define emphasis}
+% In everything that been mentioned so far, italicization should be
+% understood to mean `emphasize' in the \LaTeX{} sense. This means that the
+% command |\em| is used. This is not the same as |\it|, which is always
+% italics. Rather, with |\em|, the font style switches between |\rm| and
+% |\it| depending on the context. Here one may choose to true italics, or
+% to switch off italics altogether.
+% \begin{macrocode}
+\beginoptiongroup{EMPHASIS:
+ (affects all so-called italics)}{}
+\optdef{*}{}{Use emphasis}{ie, \string\em, allows font switching}
+\optdef{i}{em-it}{Use true italics}{ie, \string\it, absolute italics}
+\optdef{x}{em-x}{No italics}{at all}
+\optdef{u}{em-ul}{Underlining}{in place of italics, best with ulem package}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% \subsection*{Plain \TeX\ compatibility}
+% Bold face, italics, and emphasis are made with the \LaTeXe\ commands,
+% which makes them incompatible with the obsolete \LaTeX2.09, and with
+% Plain \TeX. There are also some extra testing for existing commands
+% that best work with \LaTeXe\ syntax.
+%
+% If the bibliography style file is to be fully compatible with Plain \TeX,
+% do not select the option \texttt{nfss} but do take \texttt{plntx}.
+% \begin{macrocode}
+\beginoptiongroup{COMPATIBILITY WITH PLAIN TEX:}{}
+\optdef{*}{nfss}{Use LaTeX commands}{which may not work with Plain TeX}
+\optdef{t}{plntx}{Use only Plain TeX}{commands for fonts and testing}
+\getans
+\endoptiongroup
+% \end{macrocode}
+%
+% Terminate the options list. If a language definition file has been called,
+% then we have a closing brace too many, so add another dummy opening brace.
+% \begin{macrocode}
+\if!\cfile\jfile!\else
+\begingroup\MBswitch
+\wr(,{\pc)
+\endgroup
+\fi
+
+\endoptions
+%</options>
+% \end{macrocode}
+%
+% \section{The Bibliographic Coding}
+%
+% \begin{macrocode}
+%<*!options&!driver&!bblbst>
+%<*!tail>
+ % For use with BibTeX version 0.99a or later
+ % -------------------------------------------------------------------
+%<*(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))>
+ % WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ % The input dbj file contains one of the options
+%<nmft-it|nmft-sc|nmft-bf|nmft-def> % nmft-it, nmft-bf, nmft-sc, or nmft-def
+%<lab-it|lab-sc|lab-bf|lab-def> % lab-it, lab-bf, lab-sc, or lab-def
+ % without the corresponding general option(s):
+%<nmft-it|nmft-sc|nmft-bf|nmft-def> % nmft
+%<lab-it|lab-sc|lab-bf|lab-def> % lab
+ % (You may be using an older dbj with a newer version of merlin.mbs)
+ % Please edit your dbj file to add the general option(s) and reprocess.
+ %
+%</(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))>
+%<*!exlang>
+%<!babel> % This bibliography style file is intended for texts in ENGLISH
+%<*babel>
+ % This bibliography style file requires a file named babelbst.tex
+ % containing the definitions of word commands like \bbleditor, etc.
+%</babel>
+%</!exlang>
+%<*exlang>
+ % This bibliography style file is intended for texts in
+%<bahasa> % BAHASA
+%<brazilian> % BRAZILIAN
+%<catalan> % CATALAN
+%<croatian> % CROATIAN
+%<czech> % CZECH
+%<danish> % DANISH
+%<dansk> % DANSK
+%<dutch> % DUTCH
+%<english> % ENGLISH
+%<esperanto> % ESPERANTO
+%<finnish> % FINNISH
+%<french> % FRENCH
+%<galacian> % GALACIAN
+%<german> % GERMAN
+%<hungarian> % HUNGARIAN
+%<italian> % ITALIAN
+%<norwegian> % NORWEGIAN
+%<norsk> % NORWEGIAN
+%<polski> % POLISH
+%<polish> % POLISH
+%<portuguese> % PORTUGUESE
+%<romanian> % ROMANIAN
+%<russian> % RUSSIAN
+%<slovak> % SLOVAK
+%<slovenian> % SLOVENIAN
+%<slovene> % SLOVENIAN
+%<spanish> % SPANISH
+%<swedish> % SWEDISH
+%<turkish> % TURKISH
+%</exlang>
+%<*!html>
+%<*ay>
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is natbib.sty by Patrick W. Daly
+%<*alk>
+ % or: apalike.sty by Oren Patashnik
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al., 1990]{key}...
+%</alk>
+%<*!(har|ast|alk|cay|nmd|cn)>
+ % The form of the \bibitem entries is
+ % \bibitem[Jones et al.(1990)]{key}...
+%<nat> % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+%<nat> % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ % \citet{key} ==>> Jones et al. (1990)
+%<nat> % \citet*{key} ==>> Jones, Baker, and Smith (1990)
+ % \citep{key} ==>> (Jones et al., 1990)
+%<nat> % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
+ % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
+ % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
+ % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
+ % \citeauthor{key} ==>> Jones et al.
+%<nat> % \citeauthor*{key} ==>> Jones, Baker, and Smith
+ % \citeyear{key} ==>> 1990
+%</!(har|ast|alk|cay|nmd|cn)>
+%<*har>
+ % or: harvard.sty by Peter Williams and Thorsten Schnier
+%<harnm> % (needs natbib v5.3 or harvard v2.0.3)
+ % The form of the bibitem entries is
+ % \harvarditem[Jones et al.]{Jones, Baker, and Smith}{1990}{key}...
+%</har>
+%<*cay>
+ % or: chicago.sty
+ % The form of the bibitem entries is
+ % \bibitem[\protect\citeauthoryear{Jones, Baker, and Smith}
+ % {Jones et al.}{1990}{key}...
+%</cay>
+%<*nmd>
+ % or: named.sty
+ % The form of the bibitem entries is
+ % \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}...
+%</nmd>
+%<*ast>
+ % or: astron.sty
+ % The form of the bibitem entries is
+ % \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}...
+%</ast>
+%<*cn>
+ % or: authordate1-4.sty
+ % The form of the bibitem entries is
+ % \bibitem[\protect\citename{Jones et al.}1990]{key}...
+%</cn>
+%</ay>
+%<*!ay>
+%<*!alph&!cite>
+ % This is a numerical citation style, and as such is standard LaTeX.
+%</!alph&!cite>
+%<*alph>
+ % This is a labelled citation style similar to the standard alpha.bst,
+ % where labels are of the form Dal90 or DBK89.
+%</alph>
+%<*cite&!alph>
+ % This is a special pseudo-numerical bibliography style, intended to be
+ % used to list all the entries in a bib database
+%</cite&!alph>
+ % It requires no extra package to interface to the main text.
+ % The form of the \bibitem entries is
+%<!alph&!cite> % \bibitem{key}...
+%<alph> % \bibitem[label]{key}...
+%<!alph&cite> % \bibitem[key]{key}...
+%<*!cite|alph>
+ % Usage of \cite is as follows:
+%<*!alph&!cite>
+ % \cite{key} ==>> [#]
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
+ % where # is a number determined by the ordering in the reference list.
+%</!alph&!cite>
+%<*alph>
+ % \cite{key} ==>> [label]
+ % \cite[chap. 2]{key} ==>> [label, chap. 2]
+ % The order in the reference list is by label.
+%</alph>
+%<*seq-no&!alph>
+ % The order in the reference list is that by which the works were originally
+ % cited in the text, or that in the database.
+%</seq-no&!alph>
+%<*!seq-no&!alph>
+ % The order in the reference list is alphabetical by authors.
+%</!seq-no&!alph>
+%</!cite|alph>
+%</!ay>
+%</!html>
+%<*html>
+ % This bibliographic style file produces HTML output instead of LaTeX.
+ % The LaTeX special characters are not translated, so that the output
+ % (which has the .bbl ending still) will have to be further massaged,
+ % and renamed with .html or .htm. The title and heading may also need
+ % to be revised.
+ %
+%<htlist&!htdes> % The output is a numbered list.
+%<htdes> % The output is an unnumbered list with the keys printed
+%<htdes> % before each entry.
+%<!htlist&!htdes> % The output is lists each entry as one paragraph.
+%</html>
+ % -------------------------------------------------------------------
+
+% \end{macrocode}
+%
+% \begin{macro}{`ENTRY'}
+% The new \texttt{harvard.sty} of \LaTeXe{} includes an entry URL, or
+% rather it is included in the new \texttt{.bst} files for it. Add it
+% here too, but only for option \texttt{harnm}.
+%
+% Books normally have an ISBN number.
+% This entry is (optionally) included, modelled after that in
+% \texttt{xbtxbst.doc}.
+% \begin{macrocode}
+ENTRY
+ { address
+%<annote> annote
+%<eprint> archive
+ author
+ booktitle
+ chapter
+%<revdata> collaboration
+%<doi|url-doi> doi
+ edition
+ editor
+ eid
+%<eprint> eprint
+ howpublished
+ institution
+%<isbn> isbn
+%<issn> issn
+ journal
+ key
+%<lang> language
+ month
+ note
+ number
+%<revdata> numpages
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+%<url|harnm|revdata> url
+ volume
+ year
+ }
+ {}
+%<!ay&!alph> { label }
+%<!ay&alph> { label extra.label sort.label }
+%<ay> { label extra.label sort.label short.list }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+% \end{macrocode}
+%
+% \begin{macro}{`init.state.consts'}
+% \begin{macrocode}
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% |s| and |t| are general-purpose scratch registers whose value does not persist
+% past the end of a function. They also do not appear to be used to communicate
+% between functions or to be clobbered within a sub-function call. Hopefully.
+% \begin{macrocode}
+STRINGS { s t}
+% \end{macrocode}
+%
+% \begin{macro}{`output.nonnull'}
+% \begin{macrocode}
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+%<!blk-com|(!com-semi&!com-blank)> { ", " * write$ }
+%<blk-com&com-semi> { "; " * write$ }
+%<blk-com&!com-semi&com-blank> { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+%<!html> "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`output'}
+% \begin{macrocode}
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`output.check'}
+% \begin{macrocode}
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`fin.entry'}
+% I have often been asked to add an annotation function. This suggestion is
+% from Soren Dayton; it inputs a file with the same name as the cite key, or
+% uses the text in the \texttt{annote} field. It will only work with \LaTeXe.
+% \begin{macrocode}
+FUNCTION {fin.entry}
+%<*!fin-bare>
+{ add.period$
+ write$
+%</!fin-bare>
+%<*fin-bare>
+{ duplicate$ empty$
+ 'pop$
+ 'write$
+ if$
+%</fin-bare>
+%<html&htdes> "</dd>" write$
+%<html&!htdes&htlist> "</li>" write$
+%<html&!htdes&!htlist> "</p>" write$
+ newline$
+%<*annote>
+%<*!html>
+ annote missing$
+ { "\bibAnnoteFile{" cite$ * "}" * write$ newline$ }
+ { "\bibAnnote{" cite$ * "}{" * annote * "}" * write$ newline$
+ }
+ if$
+%</!html>
+%<*html>
+ "<blockquote><strong>Key:</strong> "
+ cite$ * write$
+ annote missing$
+ { newline$ }
+ { "<br><strong>Annotation:</strong>" write$ newline$
+ annote write$ newline$
+ }
+ if$
+ "</blockquote>" write$ newline$
+%</html>
+%</annote>
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`new.block'}
+% \begin{macrocode}
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`new.sentence'}
+% \begin{macrocode}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`add.blank'}
+% When text is printed with \texttt{output} or
+% \texttt{output.check}, the \texttt{output.state} is set such that
+% a comma will precede the next output text. For special effects, we want to
+% suppress this comma, inserting a blank instead. Hence the
+% \texttt{output.state} is changed to \texttt{before.all}, meaning no
+% punctuation is to be inserted.
+% \begin{macrocode}
+FUNCTION {add.blank}
+{ " " * before.all 'output.state :=
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`add.colon'}
+% \begin{macrocode}
+%<*au-col|tit-col>
+FUNCTION {add.colon}
+{ duplicate$ empty$
+ 'skip$
+ { ":" * add.blank }
+ if$
+}
+
+%</au-col|tit-col>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`no.blank.or.punct'}
+% Another frill is to suppresss both blanks and punctuation. The |\hspace|
+% permits a line break at this point.
+% \begin{macrocode}
+%<*yrpp-xsp>
+FUNCTION {no.blank.or.punct}
+%<*!html>
+{ "\hspace{0pt}" * before.all 'output.state :=
+}
+%</!html>
+%<html>{ before.all 'output.state := }
+
+%</yrpp-xsp>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`date.block'}
+% The \texttt{date.block} function is used for special punctuating effects
+% after the date.
+% \begin{macrocode}
+FUNCTION {date.block}
+{
+%<*!yrp-x>
+%<yrp-col> ":" *
+%<*!yrp-col>
+%<yrp-semi> ";" *
+%<*!yrp-semi>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&!yrp-per> skip$
+%<(blk-com|blk-tit|blk-tita)&yrp-per> new.sentence
+%</!yrp-semi>
+%</!yrp-col>
+%</!yrp-x>
+%<*yrp-x|yrp-col|yrp-semi>
+%<!yrpp-xsp> add.blank
+%<yrpp-xsp> no.blank.or.punct
+%</yrp-x|yrp-col|yrp-semi>
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`not'}
+% \begin{macrocode}
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`and'}
+% \begin{macrocode}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`or'}
+% \begin{macrocode}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`non.stop'}
+% This function (my invention) tests if the last character in the string
+% on the stack is \texttt{. ! ?} by using \texttt{add.period\$}. It is to
+% be used for conditional italic correction or adding commas.
+% \begin{macrocode}
+%<*!tit-it&tit-qq>
+FUNCTION {non.stop}
+{ duplicate$
+ "}" * add.period$
+ #-1 #1 substring$ "." =
+}
+
+%</!tit-it&tit-qq>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`remove.dots'}
+% This macro removes any periods from the string on the stack. To be used
+% for undotting journal names, months, and juniors. Previously
+% \texttt{purify\$} was used for this, but that removes more than just
+% dots.
+%
+% May 2007, Joseph A. Wright (Morning Star, UK) contributed a revision to allow
+% the dot accent |\.| to be retained.
+% \begin{macrocode}
+%<*nm-rv|nm-rvx|nm-rvcx|mth-bare|jxper>
+STRINGS {z}
+
+FUNCTION {remove.dots}
+{ 'z :=
+ ""
+ { z empty$ not }
+ { z #1 #2 substring$
+ duplicate$ "\." =
+ { z #3 global.max$ substring$ 'z := * }
+ { pop$
+ z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
+ if$
+ }
+ while$
+}
+%</nm-rv|nm-rvx|nm-rvcx|mth-bare|jxper>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`new.block.checka'}
+% \begin{macrocode}
+%<*!ay>
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`new.block.checkb'}
+% \begin{macrocode}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`new.sentence.checka'}
+% \begin{macrocode}
+%<*!ay>
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`new.sentence.checkb'}
+% \begin{macrocode}
+%<*!ay>
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`field.or.null'}
+% \begin{macrocode}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`emphasize'}
+% Emphasis can be either italic or the alternating font. The font command
+% may be NFSS or regular \LaTeX~2.09 declarations.
+% \begin{macrocode}
+FUNCTION {emphasize}
+%<*!em-x>
+{ duplicate$ empty$
+ { pop$ "" }
+%<html> { "<i>" swap$ * "</i>" * }
+%<*!html>
+%<em-ul> { "\uline{" swap$ * "}" * }
+%<*!em-ul>
+%<*!nfss>
+%<!em-it> { "{\em " swap$ * "\/}" * }
+%<em-it> { "{\it " swap$ * "\/}" * }
+%</!nfss>
+%<*nfss>
+%<!em-it> { "\emph{" swap$ * "}" * }
+%<em-it> { "\textit{" swap$ * "}" * }
+%</nfss>
+%</!em-ul>
+%</!html>
+ if$
+}
+%</!em-x>
+%<em-x>{ skip$ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`bolden'}
+% The bold font command may be NFSS or the regular \LaTeX~2.09 declaration.
+% \begin{macrocode}
+%<*nmft-bf|vol-bf|vol-2bf|lab-bf|dtbf|pres-bf>
+FUNCTION {bolden}
+{ duplicate$ empty$
+ { pop$ "" }
+%<html> { "<b>" swap$ * "</b>" * }
+%<*!html>
+%<!nfss> { "{\bf " swap$ * "}" * }
+%<nfss> { "\textbf{" swap$ * "}" * }
+%</!html>
+ if$
+}
+%</nmft-bf|vol-bf|vol-2bf|lab-bf|dtbf|pres-bf>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`scaps'}
+% To put text into small caps.
+% \begin{macrocode}
+%<*lab-sc|nmft-sc|pres-sc>
+FUNCTION {scaps}
+{ duplicate$ empty$
+ { pop$ "" }
+%<html> { skip$ }
+%<*!html>
+%<!nfss> { "{\sc " swap$ * "}" * }
+%<nfss> { "\textsc{" swap$ * "}" * }
+%</!html>
+ if$
+}
+%</lab-sc|nmft-sc|pres-sc>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`bib.name.font'}
+% \begin{macro}{`bib.fname.font'}
+% \begin{macro}{`cite.name.font'}
+% Define functions for formatting the author/editor names, one for the
+% surnames (\texttt{bib.name.font}) and one for the first names
+% (\texttt{bib.fname.font}). These could be identical, or the latter is
+% deactivated if first names are not to be formatted, only the last names.
+%
+% For citations, we have \texttt{cite.name.font}. Here only surnames appear.
+%
+% It is also possible to have a user-defined font command for each, which the
+% user must define in his work. These are |\bibnamefont{}| and |\bibfnamefont{}|,
+% and some defaults are provided that simply repeat the arguments. Two commands
+% are needed if \texttt{nmft-def} and \texttt{fnm-def} are both given.
+%
+% If neither \texttt{fnm-def} nor \texttt{fnm-rm} are given, then the first names
+% are formatted the same as the surnames.
+% \begin{macrocode}
+%<*nmft>
+FUNCTION {bib.name.font}
+%<nmft-it>{ emphasize }
+%<!nmft-it&nmft-bf>{ bolden }
+%<!nmft-it&!nmft-bf&nmft-sc>{ scaps }
+%<*!nmft-it&!nmft-bf&!nmft-sc&nmft-def>
+{ duplicate$ empty$
+ { pop$ "" }
+%<!html> { "\bibnamefont{" swap$ * "}" * }
+%<html> { skip$ }
+ if$
+}
+%</!nmft-it&!nmft-bf&!nmft-sc&nmft-def>
+FUNCTION {bib.fname.font}
+%<!fnm-rm&!fnm-def>{ bib.name.font }
+%<fnm-rm>{ skip$ }
+%<*!fnm-rm&fnm-def>
+{ duplicate$ empty$
+ { pop$ "" }
+%<!html> { "\bibfnamefont{" swap$ * "}" * }
+%<html> { skip$ }
+ if$
+}
+%</!fnm-rm&fnm-def>
+%</nmft>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*lab>
+FUNCTION {cite.name.font}
+%<lab-it>{ emphasize }
+%<!lab-it&lab-bf>{ bolden }
+%<!lab-it&!lab-bf&lab-sc>{ scaps }
+%<*!lab-it&!lab-bf&!lab-sc&lab-def>
+{ duplicate$ empty$
+ { pop$ "" }
+%<!html> { "\citenamefont{" swap$ * "}" * }
+%<html> { skip$ }
+ if$
+}
+%</!lab-it&!lab-bf&!lab-sc&lab-def>
+%</lab>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{`tie.or.space.prefix'}
+% The function \texttt{tie.or.space.prefix} determines whether
+% the top item on the stack requires a tie character and
+% slips that (or a space character if not) ahead of it.
+% At this point a font switch or other function can be applied to
+% the top item on the stack, and the appropriate space found
+% just ahead of it on the stack.
+%
+% The sequence \texttt{tie.or.space.prefix} \texttt{*} \texttt{*} is a common idiom
+% for joining the top two stack objects with a tie or space
+% depending on the length of the top object.
+%
+% Another idiom is to apply \texttt{tie.or.space.prefix}, apply a font switch,
+% and then swap and join. In this case the tie or space follows the object.
+% \begin{macrocode}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`capitalize'}
+% Capitalizing is easy for regular languages, but for \texttt{babel},
+% some trickery stuff is needed; definitions of |\capitalize| and
+% |\Capitalize| are written to the \texttt{.bbl} file.
+% \begin{macrocode}
+
+FUNCTION {capitalize}
+%<!babel>{ "u" change.case$ "t" change.case$ }
+%<babel>{ "\capitalize" swap$ * }
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`space.word'}
+% The function \texttt{space.word} adds a space before and after the word or
+% words currently on the stack. This was added for the \texttt{bbl.}$nnn$
+% functions, that contain only a word without spacing, but replace explicit
+% text in the originals that were spaced out. Its seems more flexible to
+% define the word functions to be without spacing.
+% \begin{macrocode}
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!exlang>
+% \end{macrocode}
+%
+% \begin{macro}{`bbl.xxx'}
+% These are the default English words. There is no default language
+% option: one of \texttt{english} or \texttt{babel} must be given.
+% \begin{macrocode}
+%<*!babel>
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+%<!varand|html>{ "and"}
+%<varand&!html>{ "\protect\BIBand{}"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+%<!ed>{ "editors" }
+%<ed>{ "eds." }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "editor" }
+%<ed>{ "ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "edition" }
+%<abr&!ednx>{ "edn." }
+%<abr&ednx>{ "ed." }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "volume" }
+%<abr>{ "vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "number" }
+%<abr>{ "no." }
+
+FUNCTION {bbl.nr}
+{ "no." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+%<!pp&!ppx>{ "pages" }
+%<pp>{ "pp." }
+%<!pp&ppx>{ "" }
+
+FUNCTION {bbl.page}
+%<!pp&!ppx>{ "page" }
+%<pp>{ "p." }
+%<!pp&ppx>{ "" }
+
+%<*revdata>
+FUNCTION {bbl.eidpp}
+{ "pages" }
+
+%</revdata>
+FUNCTION {bbl.chapter}
+%<!abr>{ "chapter" }
+%<abr>{ "chap." }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "Technical Report" }
+%<abr>{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+%<*!xedn>
+FUNCTION {bbl.first}
+%<!ord>{ "First" }
+%<ord>{ "1st" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "Second" }
+%<ord>{ "2nd" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "Third" }
+%<ord>{ "3rd" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "Fourth" }
+%<ord>{ "4th" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "Fifth" }
+%<ord>{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+%</!xedn>
+%<*!abr>
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+%</!abr>
+%<*abr>
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+%</abr>
+%</!babel>
+% \end{macrocode}
+%
+% Here are the definitions for \texttt{babel} option, i.e., explicit
+% translations are not used, but rather only \LaTeX{} macros that must be
+% defined in the file \texttt{babelbst.tex}. This could allow automatic
+% language selection.
+% \begin{macrocode}
+%<*babel>
+ % The BABEL language selection is made here; definitions in babelbst.tex.
+FUNCTION {bbl.and}
+{ "\bbland{}"}
+
+FUNCTION {bbl.etal}
+{ "\bbletal{}"}
+
+FUNCTION {bbl.editors}
+%<!ed>{ "\bbleditors{}" }
+%<ed>{ "\bbleds{}" }
+
+FUNCTION {bbl.editor}
+%<!ed>{ "\bbleditor{}" }
+%<ed>{ "\bbled{}" }
+
+FUNCTION {bbl.edby}
+{ "\bbledby{}" }
+
+FUNCTION {bbl.edition}
+%<!abr>{ "\bbledition{}" }
+%<abr>{ "\bbledn{}" }
+
+FUNCTION {bbl.volume}
+%<!abr>{ "\bblvolume{}" }
+%<abr>{ "\bblvol{}" }
+
+FUNCTION {bbl.of}
+{ "\bblof{}" }
+
+FUNCTION {bbl.number}
+%<!abr>{ "\bblnumber{}" }
+%<abr>{ "\bblno{}" }
+
+FUNCTION {bbl.nr}
+{ "\bblno{}" }
+
+FUNCTION {bbl.in}
+{ "\bblin{}" }
+
+FUNCTION {bbl.pages}
+%<!pp&!ppx>{ "\bblpages{}" }
+%<pp>{ "\bblpp{}" }
+%<!pp&ppx>{ "" }
+
+FUNCTION {bbl.page}
+%<!pp&!ppx>{ "\bblpage{}" }
+%<pp>{ "\bblp{}" }
+%<!pp&ppx>{ "" }
+
+FUNCTION {bbl.chapter}
+%<!abr>{ "\bblchapter{}" }
+%<abr>{ "\bblchap{}" }
+
+FUNCTION {bbl.techrep}
+%<!abr>{ "\bbltechreport{}" }
+%<abr>{ "\bbltechrep{}" }
+
+FUNCTION {bbl.mthesis}
+{ "\bblmthesis{}" }
+
+FUNCTION {bbl.phdthesis}
+{ "\bblphdthesis{}" }
+
+%<*revdata>
+FUNCTION {bbl.eidpp}
+{ "\bbleidpp{}" }
+
+%</revdata>
+%<*!xedn>
+FUNCTION {bbl.first}
+%<!ord>{ "\bblfirst{}" }
+%<ord>{ "\bblfirsto{}" }
+
+FUNCTION {bbl.second}
+%<!ord>{ "\bblsecond{}" }
+%<ord>{ "\bblsecondo{}" }
+
+FUNCTION {bbl.third}
+%<!ord>{ "\bblthird{}" }
+%<ord>{ "\bblthirdo{}" }
+
+FUNCTION {bbl.fourth}
+%<!ord>{ "\bblfourth{}" }
+%<ord>{ "\bblfourtho{}" }
+
+FUNCTION {bbl.fifth}
+%<!ord>{ "\bblfifth{}" }
+%<ord>{ "\bblfiftho{}" }
+
+FUNCTION {bbl.st}
+{ "\bblst{}" }
+
+FUNCTION {bbl.nd}
+{ "\bblnd{}" }
+
+FUNCTION {bbl.rd}
+{ "\bblrd{}" }
+
+FUNCTION {bbl.th}
+{ "\bblth{}" }
+
+%</!xedn>
+MACRO {jan} {"\bbljan{}"}
+
+MACRO {feb} {"\bblfeb{}"}
+
+MACRO {mar} {"\bblmar{}"}
+
+MACRO {apr} {"\bblapr{}"}
+
+MACRO {may} {"\bblmay{}"}
+
+MACRO {jun} {"\bbljun{}"}
+
+MACRO {jul} {"\bbljul{}"}
+
+MACRO {aug} {"\bblaug{}"}
+
+MACRO {sep} {"\bblsep{}"}
+
+MACRO {oct} {"\bbloct{}"}
+
+MACRO {nov} {"\bblnov{}"}
+
+MACRO {dec} {"\bbldec{}"}
+
+%</babel>
+% \end{macrocode}
+%
+% \begin{macro}{`eng.ord'}
+% This function adds English endings for ordinals 1, 2, 3. However, if
+% the second last digit is 1, then the ending is `th' for all last digits.
+% So far, all other languages included do not have this problem, and it is
+% sufficient to add the \textsl{th} equivalent. This might change with further
+% languages.
+%
+% This function must be included with \texttt{babel} too, since that includes
+% English. This means that the language definition files must also provide
+% for |\bblst|, |\bblnd|, and |\bblrd|, setting them all equal to |\bblth|.
+%
+% \begin{macrocode}
+%<*(english|!exlang)&!xedn>
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+%</(english|!exlang)&!xedn>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</!exlang>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</!tail>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!head>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<*!jabr>
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+%</!jabr>
+% \end{macrocode}
+%
+% Journal abbreviations have been revised from the original Patashnik
+% ones with help of Conrado Badenas and the IUA recommendations.
+% \begin{macrocode}
+%<*jabr>
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+%</jabr>
+% \end{macrocode}
+%
+% \begin{macro}{`bibinfo.check'}
+% Define functions that encapsulate the argument
+% in a \TeX\ macro that allows for further processing when the
+% bibliography is processed, or allows for a separate computer
+% program to parse the |\bibitem| contents.
+%
+% The following table summarizes how each of the \btx{} entries
+% is accessed for output; these are the points where
+% the \texttt{format.bibinfo} or \texttt{bibinfo.check} functions
+% are called.
+% \subsubsection*{Trapped via \texttt{format.bibinfo}}
+% \begin{description}
+% \item[ \texttt{author} ]\texttt{format.names}
+% \item[ \texttt{collaboration} ]\texttt{format.authors}
+% \item[ \texttt{editor} ]\texttt{format.editors} (\texttt{book}, \texttt{inbook}, \texttt{proceedings}), \texttt{format.names.ed} (\texttt{format.in.ed.booktitle})
+% \item[ \texttt{eid} ]\texttt{format.journal.eid} (\texttt{format.vol.num.pages}, article) checks the output from \texttt{format.journal.pages}
+% \item[ \texttt{isbn} ]\texttt{format.isbn}
+% \item[ \texttt{issn} ]\texttt{format.issn}
+% \item[ \texttt{journal} ]\texttt{format.article.crossref}, article
+% \item[ \texttt{numpages} ]\texttt{format.journal.eid}
+% \item[ \texttt{organization} ]\texttt{format.organization.address} (\texttt{inproceedings}, \texttt{proceedings}), \texttt{manual}
+% \item[ \texttt{pages} ]\texttt{format.book}.pages (\texttt{book}, \texttt{booklet}), \texttt{format.pages} (\texttt{format.journal.pages}, \texttt{format.chapter.pages}, \texttt{article}, \texttt{inbook}, \texttt{incollection}, \texttt{inproceedings})
+% \item[ \texttt{publisher} ]\texttt{format.publisher.address} (like \texttt{output.check}, \texttt{inproceedings}, \texttt{proceedings})
+% \item[ \texttt{title} ]\texttt{format.title}, \texttt{format.btitle}, \texttt{misc}, \texttt{presort}, \texttt{bib.sort.order}
+% \item[ \texttt{volume} ]\texttt{format.bvolume}, \texttt{format.vol.num.pages}, \texttt{format.book.crossref}
+% \item[ \texttt{year} ]in optional argument of \texttt{\char`\\bibitem}, \texttt{format.date} (as part of date), \texttt{format.year}, \texttt{format.org.or.pub}
+% \item[ \texttt{booktitle} ]\texttt{format.in.ed.booktitle} (\texttt{incollection}, \texttt{inproceedings}), \texttt{format.incoll.inproc.crossref}
+% \item[ \texttt{howpublished} ]\texttt{booklet}, \texttt{misc}
+% \item[ \texttt{edition} ]\texttt{convert.edition.format.edition}
+% \item[ \texttt{institution} ]\texttt{techreport}
+% \item[ \texttt{school} ]\texttt{mastersthesis}, \texttt{phdthesis}
+% \item[ \texttt{address} ]\texttt{format.org.or.pub}, \texttt{booklet}, \texttt{manual}, \texttt{mastersthesis}, \texttt{phdthesis}, \texttt{techreport}
+% \item[ \texttt{chapter} ]\texttt{format.chapter.pages}
+% \item[ \texttt{number} ]\texttt{format.number.series}, \texttt{format.vol.num.pages}, \texttt{format.tr.number}
+% \item[ \texttt{series} ]\texttt{format.bvolume}, \texttt{format.number.series}, \texttt{format.book.crossref}
+% \item[ \texttt{type} ]\texttt{format.chapter.pages}, \texttt{format.thesis.type}, \texttt{format.tr.number}
+% \item[ \texttt{month} ]\texttt{format.date}
+% \item[ \texttt{note} ]\texttt{format.note}
+% \item[ \texttt{annote} ]\texttt{fin.entry}
+% \end{description}
+%
+% \subsubsection*{Encapsulated via \texttt{\char`\\url}}
+% \begin{description}
+% \item[ \texttt{url} ]\texttt{format.url} (\texttt{\char`\\harvardurl}, \texttt{\char`\\url}), \texttt{format.url} (\texttt{\char`\\url}), \texttt{format.note} (\texttt{\char`\\url})
+% \end{description}
+%
+% \subsubsection*{Encapsulated via \texttt{\char`\\doi}}
+% \begin{description}
+% \item[ \texttt{doi} ]\texttt{format.doi} (\texttt{\char`\\doi})
+% \end{description}
+%
+% \subsubsection*{Encapsulated via \texttt{\char`\\eprint}}
+% \begin{description}
+% \item[ \texttt{eprint} ]\texttt{format.eprint}
+% \item[ \texttt{archive} ]\texttt{format.eprint}
+% \end{description}
+%
+% \subsubsection*{Not encapsulated:}
+% \begin{description}
+% \item[ \texttt{key} ]cite key
+% \item[ \texttt{language} ]operand of \texttt{\char`\\selectlanguage}
+% \end{description}
+%
+% \subsubsection*{\texttt{bibinfo} tag, but not a \btx{} field}
+% \begin{description}
+% \item[ \texttt{date} ]\texttt{format.date}
+% \end{description}
+%
+% Provides robust access to fields, checking against \texttt{missing\$}
+% and \texttt{empty\$}. A \dtx{} option allows giving
+% a warning if either is the case.
+%
+% If not, it encapsulates the argument in a \TeX\ macro |\bibinfo|.
+% The encapsulation is enabled by the \texttt{bibinfo} \dtx{} option:
+% if turned off, it simply pops the unneeded object.
+%
+% \texttt{field} \texttt{string} \texttt{->} \texttt{encapsulated-field}
+%
+% \texttt{empty} \texttt{string} \texttt{->} \texttt{empty}
+% Side effect: warning.
+% \begin{macrocode}
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+%<bibinfo.warning> swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+%<!bibinfo.warning> pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+%<bibinfo.warning> swap$ "empty " swap$ * " in " * cite$ * warning$
+%<!bibinfo.warning> swap$ pop$
+ }
+ { swap$
+%<bibinfo> "\bibinfo{" swap$ * "}{" * swap$ * "}" *
+%<!bibinfo> pop$
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`bibinfo.warn'}
+% Replaces \texttt{output.check}
+% with \texttt{bibinfo.warn} followed by \texttt{output}.
+%
+% \texttt{field} \texttt{string} \texttt{->} \texttt{encapsulated-field}
+%
+% \texttt{empty} \texttt{string} \texttt{->} \texttt{empty}
+%
+% Side effect: warning if the field is empty.
+% Note: if the \dtx{} option \texttt{bibinfo} is not in effect,
+% then no encapsulation is done.
+% \begin{macrocode}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ "empty " swap$ * " in " * cite$ * warning$
+ }
+ { swap$
+%<bibinfo> "\bibinfo{" swap$ * "}{" * swap$ * "}" *
+%<!bibinfo> pop$
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.eprint'}
+% The access function for the \texttt{eprint} field.
+%
+% If the \texttt{bibinfo} \dtx{} option is selected, then this function
+% encapsulates the argument in a \TeX\ macro |\eprint|.
+%
+% \texttt{->} \texttt{encapsulated-URL}
+% \begin{macrocode}
+%<*eprint>
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+ 'skip$
+ { "\eprint"
+ archive empty$
+ 'skip$
+ { "[" * archive * "]" * }
+ if$
+ "{" * swap$ * "}" *
+ }
+ if$
+}
+%</eprint>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`write.url'}
+% This function taken over from \texttt{agsm.sty}, the main \texttt{harvard}
+% bib style. For non-Harvard styles that want to add the URL on a new line
+% after the reference, use this function too, but defined slightly
+% differently.
+% \begin{macrocode}
+%<*(harnm|url-nl)&!revdata>
+FUNCTION {write.url}
+%<*!html>
+{
+%<*url-doi&url>
+ doi empty$
+ { url }
+ { "http://dx.doi.org/" doi * }
+ if$
+%</url-doi&url>
+%<!url-doi|!url> url
+ duplicate$ empty$
+ { pop$ }
+%<harnm> { "\newline\harvardurl{" swap$ * "}" * write$ newline$ }
+%<!harnm&url-nl> { "\newline\urlprefix\url{" swap$ * "}" * write$ newline$ }
+ if$
+}
+%</!html>
+%<*html>
+{
+%<*url-doi&url>
+ doi empty$
+ { url }
+ { "http://dx.doi.org/" doi * }
+ if$
+%</url-doi&url>
+%<!url-doi|!url> url
+ duplicate$ empty$
+ { pop$ }
+ { duplicate$ "<br><a href=" quote$ * swap$ * quote$
+ * ">" * swap$ * "</a>" * write$ newline$ }
+ if$
+}
+%</html>
+
+%</(harnm|url-nl)&!revdata>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.url'}
+% This function is reworked for \texttt{\filename} to provide a
+% cleaner URL for DOIs. The definition of \cmd{\urldoi} is written in
+% the \texttt{.bbl} file by the function \texttt{begin.bib}. When the
+% package \pkg{hyperref} is loaded, the \meta{doi} is a hyperlink to
+% \texttt{https://doi.org/\meta{doi}}.
+% \begin{macrocode}
+%<*(url-blk&!harnm)|revdata>
+FUNCTION {format.url}
+{
+%<url-doi&url> doi empty$
+%<url-doi&url> {
+ url
+ duplicate$ empty$
+ { pop$ "" }
+%<!html> { "\urlprefix\url{" swap$ * "}" * }
+%<html> {
+%<html> duplicate$ "<a href=" quote$ * swap$ * quote$ *
+%<html> ">" * swap$ * "</a>" *
+%<html> }
+ if$
+%<*url-doi&url>
+ }
+ {
+ doi
+%<!html> "\doiprefix\urldoi{" swap$ * "}" *
+%<html> duplicate$ "doi:<a href=" quote$ * "https://doi.org/" *
+%<html> swap$ * quote$ * ">" * swap$ * "</a>" *
+ }
+ if$
+%</url-doi&url>
+}
+
+%</(url-blk&!harnm)|revdata>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`check.speaker'}
+% The \texttt{presentation} type uses the \texttt{key} entry to indicate which
+% author is the speaker, as the sequence number in the author list. The speaker's
+% name is put into a different font, depending on the extra option. If no font
+% is specified, all names are the same.
+% \begin{macrocode}
+INTEGERS { nameptr namesleft numnames }
+
+%<*pres-bf|pres-it|pres-sc>
+FUNCTION {check.speaker}
+{ key empty$ 'skip$
+ { key nameptr int.to.str$ =
+ {
+%<pres-bf> bolden
+%<pres-it&!pres-bf> emphasize
+%<pres-sc&!pres-it&!pres-bf> scaps
+ }
+ 'skip$
+ if$
+ }
+ if$
+}
+
+%</pres-bf|pres-it|pres-sc>
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{`format.names'}
+% The \texttt{harvard} package now (version 2.0.3, for \LaTeXe) uses
+% |\harvardand| in place of the word \textsl{and} so that it can be changed
+% at run time. This is allowed for with the option \texttt{harnm}, which
+% need not be used only with the \texttt{har} option.
+% This seems like a useless feature for \texttt{.bst} files made from
+% this multilanguage source. However, it is included anyway, which means
+% if \texttt{harnm} option selected, one must redefine |\harvardand|
+% in the document for the language being used.
+%
+% The location of the junior part for reversed name is not obvious. Prior
+% to version 4.0, I always had it attached to the last name, as
+% Smith, Jr, John, put it probably is better as Smith, John, Jr. For the
+% AGU \texttt{nm-rev1} I always did it this way, probably because I had a
+% good AGU example to follow. Dilemma: do I just change them all or add an
+% option to do it? The option will maintain consistency with older
+% versions, but this could also be considered a bug fix rather than a new
+% feature. Solution: use the option, since I have found other \texttt{.bst}
+% files from Beebe and Harvard that put junior between surname and first
+% name.
+%
+% |bibinfo| is a variable used to store a string telling it whether the
+% names being formatted are authors or editors, since this function is called
+% for both purposes. Every call to this function must push the string onto the stack
+% just before the call.
+% \begin{macrocode}
+STRINGS { bibinfo}
+
+% \end{macrocode}
+%
+% Stack note: if the names argument is a non-nil list, this function returns
+% one object on the stack, the formatted list of names.
+%
+% \texttt{names`string} \texttt{bibinfo`string} \texttt{->} \texttt{author-list`string}
+% \begin{macrocode}
+FUNCTION {format.names}
+{ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+% \end{macrocode}
+% Here is the author formatting when the names are not set in any special
+% font, or when the entire name set in a single special font.
+% \begin{macrocode}
+%<*!(nmft&(fnm-rm|fnm-def))>
+%<*!nm-rev1&!nm-revv1>
+%<nm-init> "{f.~}{vv~}{ll}{, jj}"
+%<*!nm-init>
+%<nm-rev&!jnrlst> "{vv~}{ll}{, jj}{, f.}"
+%<nm-rev&jnrlst> "{vv~}{ll}{, f.}{, jj}"
+%<*!nm-rev>
+%<nm-rv&!jnrlst> "{vv~}{ll}{ jj}{ f{~}}"
+%<nm-rv&jnrlst> "{vv~}{ll}{ f{~}}{ jj}"
+%<*!nm-rv>
+%<nm-rvx&!jnrlst> "{vv~}{ll}{ jj}{ f{}}"
+%<nm-rvx&jnrlst> "{vv~}{ll}{ f{}}{ jj}"
+%<*!nm-rvx>
+%<nm-rvcx&!jnrlst> "{vv~}{ll}{, jj}{, f{}}"
+%<nm-rvcx&jnrlst> "{vv~}{ll}{, f{}}{, jj}"
+%<*!nm-rvcx>
+%<nm-rvv&!jnrlst> "{vv~}{ll}{ jj}{ f{.}.}"
+%<nm-rvv&jnrlst> "{vv~}{ll}{ f{.}.}{ jj}"
+%<*!nm-rvv>
+%<nm-rvvc&!jnrlst> "{vv~}{ll}{, jj}{, f{.}.}"
+%<nm-rvvc&jnrlst> "{vv~}{ll}{, f{.}.}{, jj}"
+%<*!nm-rvvc>
+%<nm-revf&!jnrlst> "{vv~}{ll}{, jj}{, ff}"
+%<nm-revf&jnrlst> "{vv~}{ll}{, ff}{, jj}"
+%<*!nm-revf>
+ "{ff~}{vv~}{ll}{, jj}"
+%</!nm-revf>
+%</!nm-rvvc>
+%</!nm-rvv>
+%</!nm-rvcx>
+%</!nm-rvx>
+%</!nm-rv>
+%</!nm-rev>
+%</!nm-init>
+%</!nm-rev1&!nm-revv1>
+%<*nm-rev1>
+ duplicate$ #1 >
+ { "{f.~}{vv~}{ll}{, jj}" }
+%<!jnrlst> { "{vv~}{ll}{, jj}{, f.}" }
+%<jnrlst> { "{vv~}{ll}{, f.}{, jj}" }
+ if$
+%</nm-rev1>
+%<*!nm-rev1&nm-revv1>
+ duplicate$ #1 >
+ { "{ff~}{vv~}{ll}{, jj}" }
+%<!jnrlst> { "{vv~}{ll}{, jj}{, ff}" }
+%<jnrlst> { "{vv~}{ll}{, ff}{, jj}" }
+ if$
+%</!nm-rev1&nm-revv1>
+ format.name$
+%<nm-rv|nm-rvx> remove.dots
+%<nmft&nmand-rm> bib.name.font
+%</!(nmft&(fnm-rm|fnm-def))>
+% \end{macrocode}
+% Here is the author formatting when the first and last names are
+% set in (possibly different) special fonts.
+%
+% The junior part is optionally between the reversed names, or after them.
+% \begin{macrocode}
+%<*nmft&(fnm-rm|fnm-def)>
+%<*!nm-rev1&!nm-revv1>
+%<*nm-init>
+ "{f.}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</nm-init>
+%<*!nm-init>
+%<*nm-rev>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj, }{f.}"
+%<jnrlst> "{f.}{, jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</nm-rev>
+%<*!nm-rev>
+%<*nm-rv>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj }{f{~}}"
+%<jnrlst> "{f{~}}{ jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { remove.dots bib.fname.font " " swap$ * }
+ if$
+%</nm-rv>
+%<*!nm-rv>
+%<*nm-rvx>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj }{f{}}"
+%<jnrlst> "{f{}}{ jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { remove.dots bib.fname.font " " swap$ * }
+ if$
+%</nm-rvx>
+%<*!nm-rvx>
+%<*nm-rvcx>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj, }{f{}}"
+%<jnrlst> "{f{}}{, jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { remove.dots bib.fname.font ", " swap$ * }
+ if$
+%</nm-rvcx>
+%<*!nm-rvcx>
+%<*nm-rvv>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj }{f{.}.}"
+%<jnrlst> "{f{.}.}{ jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font " " swap$ * }
+ if$
+%</nm-rvv>
+%<*!nm-rvv>
+%<*nm-rvvc>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj, }{f{.}.}"
+%<jnrlst> "{f{.}.}{, jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</nm-rvvc>
+%<*!nm-rvvc>
+%<*nm-revf>
+ "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj, }{ff}"
+%<jnrlst> "{ff}{, jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</nm-revf>
+%<*!nm-revf>
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</!nm-revf>
+%</!nm-rvvc>
+%</!nm-rvv>
+%</!nm-rvcx>
+%</!nm-rvx>
+%</!nm-rv>
+%</!nm-rev>
+%</!nm-init>
+%</!nm-rev1&!nm-revv1>
+%<*nm-rev1>
+ nameptr #1 >
+ { "{f.}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ }
+ { "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj, }{f.}"
+%<jnrlst> "{f.}{, jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ }
+ if$
+%</nm-rev1>
+%<*!nm-rev1&nm-revv1>
+ nameptr #1 >
+ { "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ }
+ { "{vv~}{ll}" format.name$ bib.name.font
+ s nameptr
+%<!jnrlst> "{jj, }{ff}"
+%<jnrlst> "{ff}{, jj}"
+ format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+ }
+ if$
+%</!nm-rev1&nm-revv1>
+ *
+%</nmft&(fnm-rm|fnm-def)>
+ bibinfo bibinfo.check
+%<*pres-bf|pres-it|pres-sc>
+ type$ "presentation" =
+ { check.speaker }
+ 'skip$
+ if$
+%</pres-bf|pres-it|pres-sc>
+ 't :=
+ nameptr #1 >
+ {
+%<*nmlm>
+%<m1> nameptr #1
+%<m2> nameptr #2
+%<m3> nameptr #3
+%<m4> nameptr #4
+%<m5> nameptr #5
+%<m6> nameptr #6
+%<m7> nameptr #7
+%<m8> nameptr #8
+%<m9> nameptr #9
+%<m0> nameptr #0
+%<m10> #10 +
+%<m20> #20 +
+%<m30> #30 +
+%<m40> #40 +
+%<m50> #50 +
+%<m60> #60 +
+%<m70> #70 +
+%<m80> #80 +
+%<m90> #90 +
+ #1 + =
+%<x1> numnames #1
+%<x2> numnames #2
+%<x3> numnames #3
+%<x4> numnames #4
+%<x5> numnames #5
+%<x6> numnames #6
+%<x7> numnames #7
+%<x8> numnames #8
+%<x9> numnames #9
+%<x0> numnames #0
+%<x10> #10 +
+%<x20> #20 +
+%<x30> #30 +
+%<x40> #40 +
+%<x50> #50 +
+%<x60> #60 +
+%<x70> #70 +
+%<x80> #80 +
+%<x90> #90 +
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+%</nmlm>
+ namesleft #1 >
+%<!aunm-semi&!aunm-sl> { ", " * t * }
+%<aunm-semi> { "; " * t * }
+%<aunm-sl&!aunm-semi> { "/ " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+%<(and-com|xand)&!aunm-semi&!aunm-sl> "," *
+%<(and-com|xand)&aunm-semi> ";" *
+%<(and-com|xand)&aunm-sl&!aunm-semi> "/" *
+%<*!and-xcom&!and-com&!xand>
+ numnames #2 >
+%<etal-xc> t "others" = not and
+%<!aunm-semi&!aunm-sl> { "," * }
+%<aunm-semi> { ";" * }
+%<aunm-sl&!aunm-semi> { "/" * }
+ 'skip$
+ if$
+%</!and-xcom&!and-com&!xand>
+ t "others" =
+ {
+%<nmft&!nmand-rm&!(fnm-rm|fnm-def)&(etal-it|etal-rm)> bib.name.font
+%<*!etal-it>
+%<nmft&(nmand-rm|(fnm-rm|fnm-def))&!etal-rm> " " * bbl.etal bib.name.font *
+%<!(nmft&(nmand-rm|(fnm-rm|fnm-def)))|etal-rm> " " * bbl.etal *
+%</!etal-it>
+%<etal-it> " " * bbl.etal emphasize *
+%<nmft&!nmand-rm&!(fnm-rm|fnm-def)&!(etal-it|etal-rm)> bib.name.font
+ }
+%<*!xand>
+ {
+%<*!harnm>
+%<!amper> bbl.and
+%<amper> "\&"
+%</!harnm>
+%<harnm> "\harvardand{}"
+%<nmft&!nmand-rm&(fnm-rm|fnm-def)> bib.name.font
+ space.word * t *
+ }
+%</!xand>
+%<xand> { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+%<*nmft&!nmand-rm&!(fnm-rm|fnm-def)>
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+%</nmft&!nmand-rm&!(fnm-rm|fnm-def)>
+ } if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.names.ed'}
+% When editors are used in place of authors to identify the work, the
+% names are always formatted just like authors'. However, in collections,
+% where ``edited by'' or ``\emph{names} (editors)'' are given, it is
+% normal not to reverse the names, even if the authors' are. The option
+% \texttt{ed-rev} sees to it that editor names are always formatted exactly
+% like those of authors, being reversed if necessary.
+%
+% The option \texttt{ed-au} is identical to \texttt{ed-rev}, but is more
+% logical. It means editors (in incollections) are formatted exactly like
+% authors, with all the font, reversing, and number limitations. This is
+% selected automatically with \texttt{nm-init} and \texttt{nm-} default to save
+% programming memory.
+%
+% The option \texttt{nm-revf} in this case acts the same as the default
+% when no \texttt{nm-} option given: full names with surname last. Therefore
+% it is not necessary to test for it at all, since it, like the default,
+% has the lowest priority: any other \texttt{nm-} option clobbers it.
+%
+% The options \texttt{aunm-semi} and \texttt{aunm-sl} will put a semi-colon or
+% slash between editor names, just as for authors, when \texttt{ed-rev} not
+% selected, in keeping with the idea that in this case both authors and editors
+% are to be formatted the same.
+%
+% This function either dispatches to \texttt{format.names} or executes code
+% which is similar. In the latter case, names are always presented first
+% followed by surname (``last name''); name limit processing (\texttt{nmlm}) is not executed;
+% and endgame processing differs in being qualified by \texttt{nmfted}.
+%
+% Stack note: if the names (second) argument is a non-nil list, this function returns
+% with one object on the stack, the formatted list of names.
+%
+% \texttt{names`string} \texttt{bibinfo`string} \texttt{->} \texttt{author-list`string}
+% \begin{macrocode}
+FUNCTION {format.names.ed}
+{
+%<ed-rev|ed-au> format.names
+%<*!ed-rev&!ed-au>
+ 'bibinfo :=
+ duplicate$ empty$ 'skip$ {
+ 's :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+% \end{macrocode}
+% Editor name is handled as a single object, with no separation of first and last name.
+% \begin{macrocode}
+%<*!(nmft&nmfted&(fnm-rm|fnm-def))>
+%<nm-init|nm-rev|nm-rev1> "{f.~}{vv~}{ll}{, jj}"
+%<*!nm-init&!nm-rev&!nm-rev1>
+%<nm-revv1> "{ff~}{vv~}{ll}{, jj}"
+%<*!nm-revv1>
+%<nm-rv> "{f{~}~}{vv~}{ll}{ jj}"
+%<*!nm-rv>
+%<nm-rvx> "{f{}~}{vv~}{ll}{ jj}"
+%<*!nm-rvx>
+%<nm-rvcx> "{f{}~}{vv~}{ll}{ jj}"
+%<*!nm-rvcx>
+%<nm-rvv|nm-rvvc> "{f{.}.~}{vv~}{ll}{ jj}"
+%<*!nm-rvv&!nm-rvvc>
+ "{ff~}{vv~}{ll}{, jj}"
+%</!nm-rvv&!nm-rvvc>
+%</!nm-rvcx>
+%</!nm-rvx>
+%</!nm-rv>
+%</!nm-revv1>
+%</!nm-init&!nm-rev&!nm-rev1>
+ format.name$
+%<nm-rv|nm-rvx|nm-rvcx> remove.dots
+%<nmft&nmfted&nmand-rm> bib.name.font
+%</!(nmft&nmfted&(fnm-rm|fnm-def))>
+% \end{macrocode}
+% Editor first and last name handled separately.
+% \begin{macrocode}
+%<*(nmft&nmfted&(fnm-rm|fnm-def))>
+%<*nm-init|nm-rev|nm-rev1>
+ "{f.}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</nm-init|nm-rev|nm-rev1>
+%<*!nm-init&!nm-rev&!nm-rev1>
+%<*nm-revv1>
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</nm-revv1>
+%<*!nm-revv1>
+%<*nm-rv>
+ "{f{~}}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { remove.dots bib.fname.font " " swap$ * }
+ if$
+%</nm-rv>
+%<*!nm-rv>
+%<*nm-rvx|nm-rvcx>
+ "{f{}}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { remove.dots bib.fname.font " " swap$ * }
+ if$
+%</nm-rvx|nm-rvcx>
+%<*!nm-rvx&!nm-rvcx>
+%<*nm-rvv|nm-rvvc>
+ "{f{.}.}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font " " swap$ * }
+ if$
+%</nm-rvv|nm-rvvc>
+%<*!nm-rvv&!nm-rvvc>
+ "{ff}" format.name$ duplicate$ empty$ 'skip$
+ { tie.or.space.prefix bib.fname.font swap$ * }
+ if$
+ s nameptr
+ "{vv~}{ll}" format.name$ bib.name.font *
+ s nameptr
+ "{jj}" format.name$ duplicate$ empty$ 'skip$
+ { bib.fname.font ", " swap$ * }
+ if$
+%</!nm-rvv&!nm-rvvc>
+%</!nm-rvx&!nm-rvcx>
+%</!nm-rv>
+%</!nm-revv1>
+%</!nm-init&!nm-rev&!nm-rev1>
+ *
+%</(nmft&nmfted&(fnm-rm|fnm-def))>
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+%<!aunm-semi&!aunm-sl> { ", " * t * }
+%<aunm-semi> { "; " * t * }
+%<aunm-sl&!aunm-semi> { "/ " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+%<(and-com-ed|xand)&!aunm-semi&!aunm-sl> "," *
+%<(and-com-ed|xand)&aunm-semi> ";" *
+%<(and-com-ed|xand)&aunm-sl&!aunm-semi> "/" *
+%<*!and-xcom&!and-com-ed&!xand>
+ numnames #2 >
+%<etal-xc> t "others" = not and
+%<!aunm-semi&!aunm-sl> { "," * }
+%<aunm-semi> { ";" * }
+%<aunm-sl&!aunm-semi> { "/" * }
+ 'skip$
+ if$
+%</!and-xcom&!and-com-ed&!xand>
+ t "others" =
+ {
+
+%<nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)&(etal-it|etal-rm)> bib.name.font
+%<*!etal-it>
+%<nmft&nmfted&(nmand-rm|(fnm-rm|fnm-def))&!etal-rm> " " * bbl.etal bib.name.font *
+%<!(nmft&nmfted&(nmand-rm|(fnm-rm|fnm-def)))|etal-rm> " " * bbl.etal *
+%</!etal-it>
+%<etal-it> " " * bbl.etal emphasize *
+%<nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)&!(etal-it|etal-rm)> bib.name.font
+ }
+%<*!xand>
+ {
+%<*!harnm>
+%<!amper> bbl.and
+%<amper> "\&"
+%</!harnm>
+%<harnm> "\harvardand{}"
+%<nmft&nmfted&!nmand-rm&(fnm-rm|fnm-def)> bib.name.font
+ space.word * t *
+ }
+%</!xand>
+%<xand> { " " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+%<*nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)>
+ t "others" =
+ 'skip$
+ { bib.name.font }
+ if$
+%</nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)>
+ } if$
+%</!ed-rev&!ed-au>
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.key'}
+% \begin{macrocode}
+%<*ay>
+FUNCTION {format.key}
+{ empty$
+ { key field.or.null }
+ { "" }
+ if$
+}
+
+%</ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.authors'}
+%
+% \begin{macrocode}
+FUNCTION {format.authors}
+{ author "author" format.names
+%<*revdata>
+ duplicate$ empty$ 'skip$
+ { collaboration "collaboration" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " (" swap$ * ")" * }
+ if$
+ *
+ }
+ if$
+%</revdata>
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`get.bbl.editor'}
+% Use this function universally when accessing the ``editor'' text entity.
+% \begin{macrocode}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.editors'}
+% The option \texttt{edpar} puts the word `editor' in parentheses.
+% In \texttt{genbst.mbs}, this occurred automatically with the option
+% \texttt{ed}, to abbreviate `editor' to `ed'. In \texttt{babel.mbs},
+% this was not the case, because of complications with the word functions.
+% Now this possibility is added as a special option, which means there is
+% some inconsistency with older \texttt{.dbj} files that called \texttt{ed}:
+% the abbreviated `ed' is not put in parentheses unless \texttt{edpar} is
+% also called.
+%
+% Note that the code here is very similar to code in \texttt{format.in.ed.booktitle};
+% the two should be kept coordinated.
+% \begin{macrocode}
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+%<!edpar&!edparxc> "," *
+ " " *
+ get.bbl.editor
+%<bkedcap> capitalize
+%<edpar|edparc|edparxc> "(" swap$ * ")" *
+ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.in.editors'}
+% See the note about the option \texttt{edpar} above.
+%
+% \end{macro}
+%
+% \begin{macro}{`format.book.pages'}
+% \begin{macrocode}
+%<*pg-bk>
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check
+ duplicate$ empty$ 'skip$
+ { " " * bbl.pages * }
+ if$
+}
+%</pg-bk>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.isbn'}
+% \begin{macrocode}
+%<*isbn>
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ "ISBN " swap$ *
+ }
+ if$
+}
+
+%</isbn>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.issn'}
+% \begin{macrocode}
+%<*issn>
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ "ISSN " swap$ *
+ }
+ if$
+}
+
+%</issn>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.doi'}
+% DOIs like URLs are encapsulated by their own commands, so need no \texttt{bibinfo.check}.
+% \begin{macrocode}
+%<*doi|(url-doi&!url)>
+FUNCTION {format.doi}
+{ doi empty$
+ { "" }
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<!html> "\doi{" doi * "}" *
+%<html> "doi:" doi *
+ }
+ if$
+}
+%</doi|(url-doi&!url)>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`select.language'}
+% The \texttt{language} field code has been provided by Bernd Feige, of the
+% University of Freiburg.
+% \begin{macrocode}
+%<*lang>
+FUNCTION {select.language}
+{ duplicate$ empty$
+ 'pop$
+ { language empty$
+ 'skip$
+ { "{\selectlanguage{" language * "}" * swap$ * "}" * }
+ if$
+ }
+ if$
+}
+
+%</lang>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.note'}
+% Notes should be entered as though they were a sentence on their own.
+% However, if they appear mid-sentence rather than after a block or sentence,
+% the first letter must be lowercase. Thus if a note begins with a proper
+% noun, it must be in braces. To avoid a warning about unmatched braces
+% with the \texttt{change.case\$} function, check first if the leading
+% character is an opening brace.
+%
+% With options \texttt{url,url-nt}, the URL text is treated as a note, and
+% added here. It is output directly, not prepended to the note text. This
+% means, if the note is to be a new sentence, the URL text starts that
+% sentence, and the regular note is added to that sentence, comma between.
+%
+% \begin{macrocode}
+FUNCTION {format.note}
+{
+%<*url-nt&!revdata>
+ url empty$
+ 'skip$
+%<!html> { "\urlprefix\url{" url * "}" * output }
+%<html> { "<a href=" quote$ * url * quote$
+%<html> * ">" * url * "</a>" * output }
+ if$
+%</url-nt&!revdata>
+ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$
+ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check
+ }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.title'}
+% For a quoted title, any punctuation in the title goes inside the quote.
+% Otherwise, the comma or period following the title also goes inside.
+% Exception is with \texttt{qx} option, in which case the comma goes
+% outside, even when punctuation present; for period (\texttt{!blk-com})
+% is added outside only when punctuation is absent.
+% \begin{macrocode}
+FUNCTION {format.title}
+{ title
+%<*!atit-u>
+ duplicate$ empty$ 'skip$
+ { "t" change.case$ }
+ if$
+%</!atit-u>
+ "title" bibinfo.check
+%<*tit-it|tit-qq|lang>
+ duplicate$ empty$ 'skip$
+ {
+%<tit-it> emphasize
+%<*!tit-it&tit-qq>
+ "\enquote{" swap$ *
+%<*!qx>
+%<*blk-com>
+ non.stop
+%<!com-semi&!com-blank> { ",} " * }
+%<com-semi> { ";} " * }
+%<!com-semi&com-blank> { "} " * }
+ { "} " * }
+ if$
+%</blk-com>
+%<!blk-com> add.period$ "}" *
+%</!qx>
+%<*qx>
+%<*blk-com>
+%<!com-semi&!com-blank> "}, " *
+%<com-semi> "}; " *
+%<!com-semi&com-blank> "} " *
+%</blk-com>
+%<!blk-com> "}" *
+%</qx>
+%</!tit-it&tit-qq>
+%<lang> select.language
+ }
+ if$
+%</tit-it|tit-qq|lang>
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`end.quote.title'}
+% For a quoted title, the punctuation appears in the quotes. For commas
+% between block, this means the inter-block punctuation is already present,
+% so it must be suppressed after every \texttt{format.title output}. This
+% is done by setting the \texttt{output.state} to \texttt{before.all}, but
+% only if there really was a title. Call this macro every time after
+% titles are output.
+% \begin{macrocode}
+%<*blk-com&tit-qq>
+FUNCTION {end.quote.title}
+{ title empty$
+ 'skip$
+ { before.all 'output.state := }
+ if$
+}
+%</blk-com&tit-qq>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`end.quote.btitle'}
+% Similar to |end.quote.title| except that it is only applied if titles of
+% proceedings and collections are quoted, and if
+% neither \texttt{edby}, \texttt{edby-par}, nor \texttt{edby-par} are selected
+% (this is the default case in the relevant menu of the \texttt{makebst.tex} run).
+% These options add text after the booktitle,
+% so additional punctuation need not be suppressed. Unless there is no editor!
+%
+% Note: this function is called after the result of \texttt{format.in.ed.booktitle}
+% has been output, and attempts to predict what that output had been.
+% Would it not be better to call this function while that result is still
+% on the stack?
+% \begin{macrocode}
+%<*bt-qq>
+FUNCTION {end.quote.btitle}
+{ booktitle empty$
+ 'skip$
+%<!edby&!edby-par&!edby-parc> { before.all 'output.state := }
+%<*edby|edby-par|edby-parc>
+ { editor empty$
+ { before.all 'output.state := }
+ 'skip$
+ if$
+ }
+%</edby|edby-par|edby-parc>
+ if$
+}
+%</bt-qq>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`make.full.names'}
+% In versions before 2.2, there were two functions \texttt{calc.long.label}
+% and \texttt{format.long.lab.names} that made up the string
+% \texttt{long.label} for each entry. This contains the full author list.
+% However, there was a bug in the one routine, entered by mistake when an
+% earlier bug was removed, and more seriously, the string
+% \texttt{long.label} was limited to \texttt{entry.max\$} characters, 100 on
+% my system. Author lists were truncated. Thus, \texttt{make.full.names}
+% is used instead to enter the full list of names directly in the
+% \texttt{output.bibitem} function, without an intermediate string. This
+% involves changing the order of some function definitions, especially
+% \texttt{output.bibitem} must come later.
+% \begin{macrocode}
+%<*har|cay|nat>
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+%<!jnrlab> "{vv~}{ll}" format.name$
+%<*jnrlab>
+%<!nm-rv&!nm-rvv&!nm-rvx&!nm-rvcx> "{vv~}{ll}{, jj}" format.name$
+%<nm-rv|nm-rvv|nm-rvx|nm-rvcx> "{vv~}{ll}{ jj}" format.name$
+%</jnrlab>
+%<lab&and-rm> cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+%<*nmlm>
+%<m1> nameptr #1
+%<m2> nameptr #2
+%<m3> nameptr #3
+%<m4> nameptr #4
+%<m5> nameptr #5
+%<m6> nameptr #6
+%<m7> nameptr #7
+%<m8> nameptr #8
+%<m9> nameptr #9
+%<m0> nameptr #0
+%<m10> #10 +
+%<m20> #20 +
+%<m30> #30 +
+%<m40> #40 +
+%<m50> #50 +
+%<m60> #60 +
+%<m70> #70 +
+%<m80> #80 +
+%<m90> #90 +
+ #1 + =
+%<x1> numnames #1
+%<x2> numnames #2
+%<x3> numnames #3
+%<x4> numnames #4
+%<x5> numnames #5
+%<x6> numnames #6
+%<x7> numnames #7
+%<x8> numnames #8
+%<x9> numnames #9
+%<x0> numnames #0
+%<x10> #10 +
+%<x20> #20 +
+%<x30> #30 +
+%<x40> #40 +
+%<x50> #50 +
+%<x60> #60 +
+%<x70> #70 +
+%<x80> #80 +
+%<x90> #90 +
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+%</nmlm>
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+%<lab&!and-rm&(etal-it|etal-rm)> cite.name.font
+%<*!etal-it>
+%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font *
+%<!lab|!and-rm|etal-rm> " " * bbl.etal *
+%</!etal-it>
+%<etal-it> " " * bbl.etal emphasize *
+%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font
+ }
+ {
+%<*!harnm>
+%<*!and-xcom>
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+%</!and-xcom>
+%<!amper> bbl.and
+%<amper> "\&"
+%</!harnm>
+%<harnm> "\harvardand{}"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+%<*lab&!and-rm>
+ t "others" =
+ 'skip$
+ { cite.name.font }
+ if$
+%</lab&!and-rm>
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.full
+ { type$ "proceedings" =
+ 'editor.key.full
+ 'author.key.full
+ if$
+ }
+ if$
+}
+
+%</har|cay|nat>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`output.bibitem'}
+% A user has pointed out to me that if the label argument in square brackets
+% are put into braces (within the squares) it is then resistent to any
+% problems if square braces should appear within the label. Do this, but
+% only for the \texttt{nat} option.
+% \begin{macrocode}
+FUNCTION {output.bibitem}
+{ newline$
+%<*!html>
+%<*ay>
+%<!har&!nat> "\bibitem[" write$
+%<!har&nat> "\bibitem[{" write$
+%<har> "\harvarditem" write$
+%<nmd> "\protect\citeauthoryear{" write$
+%<ast> "\protect\astroncite{" write$
+%<cay> "\protect\citeauthoryear{" make.full.names * "}{" * write$
+%<cn> "\protect\citename{" write$
+%<!har> label write$
+%<har> make.full.names duplicate$ label =
+%<har> 'skip$
+%<har> { "[" label * "]" * write$ }
+%<har> if$
+%<har> "{" swap$ * "}{" * write$
+%<har> year duplicate$ empty$
+%<cn> ", }" year duplicate$ empty$
+%<cay|nmd|ast> "}{" year duplicate$ empty$
+%<(har|cn|cay|nmd|ast)&blkyear> { pop$ "" }
+%<(har|cn|cay|nmd|ast)&!blkyear> { pop$ "????" }
+%<har|cn|cay|nmd|ast> 'skip$
+%<har|cn|cay|nmd|ast> if$
+%<har> extra.label * "}{" * write$
+%<cn> * extra.label * "]{" * write$
+%<cay|nmd|ast> * extra.label * "}]{" * write$
+%<alk> "]{" write$
+%<!(har|cay|nmd|ast|alk|cn|nat)> ")]{" write$
+%<nat> ")" make.full.names duplicate$ short.list =
+%<nat> { pop$ }
+%<nat> { * }
+%<nat> if$
+%<nat> "}]{" * write$
+%</ay>
+%<!ay&!(cite|alph)> "\bibitem{" write$
+%<!ay&(cite|alph)> "\bibitem[" label * "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+%</!html>
+%<*html>
+%<*htdes>
+ "<dt><strong><tt>" write$
+ cite$ write$
+ "</tt></strong></dt>" write$ newline$
+ "<dd>"
+%</htdes>
+%<htlist&!htdes> "<li>"
+%<!htlist&!htdes> "<p>"
+%</html>
+ before.all 'output.state :=
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`if.digit'}
+% Add \texttt{if.digit} and \texttt{n.separate} to convert large page numbers
+% to a separated number.
+% \begin{macrocode}
+%<*pgsep-c|pgsep-s|pgsep-p>
+FUNCTION {if.digit}
+{ duplicate$ "0" =
+ swap$ duplicate$ "1" =
+ swap$ duplicate$ "2" =
+ swap$ duplicate$ "3" =
+ swap$ duplicate$ "4" =
+ swap$ duplicate$ "5" =
+ swap$ duplicate$ "6" =
+ swap$ duplicate$ "7" =
+ swap$ duplicate$ "8" =
+ swap$ "9" = or or or or or or or or or
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`n.separate'}
+% \texttt{pgsep-s}, \texttt{pgsep-p}
+% Large page numbers are to be separated in threes, with thin space, comma
+% or period. The number must be 5 digits before the separation occurs.
+% No provision is made for numbers of 7 or more digits.
+% \begin{macrocode}
+FUNCTION {n.separate}
+{ 't :=
+ ""
+ #0 'numnames :=
+ { t empty$ not }
+ { t #-1 #1 substring$ if.digit
+ { numnames #1 + 'numnames := }
+ { #0 'numnames := }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames #5 =
+ { duplicate$ #1 #2 substring$ swap$
+ #3 global.max$ substring$
+%<pgsep-c> "," swap$ * *
+%<pgsep-p> "." swap$ * *
+%<pgsep-s&!html> "\," swap$ * *
+%<pgsep-s&html> " " swap$ * *
+ }
+ 'skip$
+ if$
+ }
+ while$
+}
+%</pgsep-c|pgsep-s|pgsep-p>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`n.dashify'}
+% \begin{macrocode}
+FUNCTION {n.dashify}
+{
+%<pgsep-c|pgsep-s|pgsep-p> n.separate
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`word.in'}
+% The function \texttt{word.in} prints the word \textsl{in} for references
+% that are
+% contained in a larger work, or in conference proceedings. One may have a
+% colon after the word with the option \texttt{in-col}. If blocks of text are
+% to be separated with commas (option \texttt{blk-com}) then the word remains
+% in lower case, as it is defined in \texttt{bbl.in}; but if blocks act as
+% sentences, then it must be capitalized.
+% \begin{macrocode}
+FUNCTION {word.in}
+%<in-x>{ "" }
+%<*!in-x>
+%<blk-com|blk-tita>{ bbl.in
+%<!blk-com&!blk-tita>{ bbl.in capitalize
+%<in-col> ":" *
+%<in-it> emphasize
+ " " * }
+%</!in-x>
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.date'}
+% The new \texttt{harvard.sty} allows variable brackets around the date
+% in the reference list. It uses |\harvardyearleft| and |\harvardyearright|
+% in the \texttt{.bst} files. Allow this with the option \texttt{harnm},
+% which could actually be used without the \texttt{har} option. Note that
+% this overrides the other year formatting options, except for the preceding punctuation.
+% \begin{macrocode}
+%<*ay>
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+ {
+%<*!blkyear>
+ "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????"
+%</!blkyear>
+ }
+ 'skip$
+ if$
+%<*aymth>
+ month "month" bibinfo.check duplicate$ empty$
+ 'skip$
+ {
+%<dtrev> swap$
+ " " * swap$
+ }
+ if$
+ *
+%<mth-bare> remove.dots
+%</aymth>
+%<dtbf> bolden
+ extra.label *
+%<*!harnm>
+%<*yr-par|yr-brk|yr-col|yr-blk|yr-com|yr-per>
+ before.all 'output.state :=
+%<yr-par> " (" swap$ * ")" *
+%<!yr-par&yr-brk> " [" swap$ * "]" *
+%<!yr-par&!yr-brk&yr-col> ": " swap$ *
+%<!yr-par&!yr-brk&!yr-col&yr-com> ", " swap$ *
+%<!yr-par&!yr-brk&!yr-col&!yr-com&yr-per> after.sentence 'output.state :=
+%<!yr-par&!yr-brk&!yr-col&!yr-com&!yr-per&yr-blk> " " swap$ *
+%</yr-par|yr-brk|yr-col|yr-blk|yr-com|yr-per>
+%</!harnm>
+%<*harnm>
+ before.all 'output.state :=
+ " \harvardyearleft " swap$ * "\harvardyearright{}" *
+%<yr-col> ":" swap$ *
+%<!yr-col&yr-com> "," swap$ *
+%<!yr-col&!yr-com&yr-per> after.sentence 'output.state :=
+%<!yr-col&!yr-com&!yr-per&yr-blk> " " swap$ *
+%</harnm>
+}
+%</ay>
+%<*!ay>
+FUNCTION {format.date}
+{
+%<!xmth> month "month" bibinfo.check
+%<xmth> ""
+ duplicate$ empty$
+ year "year" bibinfo.check duplicate$ empty$
+ { swap$ 'skip$
+ { "there's a month but no year in " cite$ * warning$ }
+ if$
+ *
+ }
+ { swap$ 'skip$
+ {
+%<showstack> month year
+%<!dtrev> swap$
+ " " * swap$
+ }
+ if$
+ *
+%<mth-bare> remove.dots
+ }
+ if$
+%<dtbf> bolden
+%<*yr-par|yr-brk|yr-col|yr-com|yr-per|yr-blk>
+ duplicate$ empty$
+ 'skip$
+ {
+ before.all 'output.state :=
+%<yr-par> " (" swap$ * ")" *
+%<!yr-par&yr-brk> " [" swap$ * "]" *
+%<!yr-par&!yr-brk&yr-col> ": " swap$ *
+%<!yr-par&!yr-brk&!yr-col&yr-com> ", " swap$ *
+%<!yr-par&!yr-brk&!yr-col&!yr-com&yr-per> after.sentence 'output.state :=
+%<!yr-par&!yr-brk&!yr-col&!yr-com&!yr-per&yr-blk> " " swap$ *
+ }
+ if$
+%</yr-par|yr-brk|yr-col|yr-com|yr-per|yr-blk>
+}
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.year'}
+% For the options that put the year into the journal specifications, use a
+% special formatter separate from the regular date formatter.
+% The year is always in parentheses (except for appended to journal name).
+% \begin{macrocode}
+%<*jdt-p|jdt-pc|jdt-v|jdt-vs>
+FUNCTION{format.year}
+{ year "year" bibinfo.check duplicate$ empty$
+ { "empty year in " cite$ *
+%<ay&!blkyear> "; set to ????" *
+ warning$
+%<ay&!blkyear> pop$ "????"
+ }
+ {
+%<!ay&jdt-vs> " (" swap$ * ")" *
+%<!ay&!jdt-vs> "(" swap$ * ")" *
+ }
+ if$
+%<*ay>
+ extra.label *
+%<jdt-vs> " (" swap$ * ")" *
+%<!jdt-vs> "(" swap$ * ")" *
+%</ay>
+}
+%</jdt-p|jdt-pc|jdt-v|jdt-vs>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.btitle'}
+% \begin{macrocode}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {
+%<!btit-rm> emphasize
+%<lang> select.language
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`either.or.check'}
+% \begin{macrocode}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.bvolume'}
+% \begin{macrocode}
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { bbl.volume volume tie.or.space.prefix
+ "volume" bibinfo.check * *
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+%<*!ser-vol>
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+%</!ser-vol>
+%<ser-vol> { emphasize ", " * swap$ * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.number.series'}
+% \begin{macrocode}
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+%<*num-xser>
+ { series empty$
+ { number "number" bibinfo.check }
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+%</num-xser>
+%<*!num-xser>
+ { output.state mid.sentence =
+ { bbl.number }
+ { bbl.number capitalize }
+ if$
+ number tie.or.space.prefix "number" bibinfo.check * *
+ series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { bbl.in space.word *
+ series "series" bibinfo.check *
+ }
+ if$
+ }
+%</!num-xser>
+ if$
+ }
+ { "" }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`is.num'}
+% This function takes the single-character string on the stack and returns
+% 1 if it is a digit, else 0.
+% \begin{macrocode}
+%<*!xedn>
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`extract.num'}
+% This function tests the string on the stack to see if it begins with a
+% number. If so, that number is left on the stack; if the string contains
+% no numbers at the start, it is left unchanged. The idea is to convert
+% \textsl{1st} to \textsl{1} and leave \textsl{first} as is.
+% This is used by \code{convert.edition}.
+% \begin{macrocode}
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`convert.edition'}
+% The function \texttt{convert.edition} takes the text in the field
+% \texttt{edition} and changes it to the language-specific equivalent. As
+% originally planned for \btx, this field should contain the words
+% \textsl{First}, \textsl{Second}, etc. Being so explicit,
+% it is not so easy to translate, nor to
+% convert to \textsl{1st}, \textsl{2nd}, etc., if one wanted.
+% This function carries out the translation, by changing
+% \textsl{first} or \textsl{1} to \texttt{bbl.first}, and so
+% on. The field is reduced to lower case to make it case insensitive. If no
+% translation is found, then the original text in \texttt{edition} is used
+% instead, as it stands. However, if the original is a number greater than
+% the maximum for which text is provided, then \texttt{bbl.th} is added to
+% it.
+% \begin{macrocode}
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+%<!english&exlang> { s bbl.th * 't := }
+%<english|!exlang> { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+%</!xedn>
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.edition'}
+% This function formats the text for the edition specification, such as
+% ``Second edition''. It combines the edition number with the word
+% \textsl{edition}.
+% \begin{macrocode}
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {
+%<!xedn> convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edition" bibinfo.check
+ " " * bbl.edition *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+INTEGERS { multiresult }
+% \end{macrocode}
+%
+% \begin{macro}{`multi.page.check'}
+% \begin{macrocode}
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.pages'}
+% \begin{macrocode}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ {
+%<!bkpg-x&!ppx> bbl.pages swap$
+ n.dashify
+ }
+ {
+%<!bkpg-x&!ppx> bbl.page swap$
+ }
+ if$
+%<!bkpg-x&!ppx> tie.or.space.prefix
+ "pages" bibinfo.check
+%<!bkpg-x&!ppx> * *
+%<bkpg-par> "(" swap$ * ")" *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`first.page'}
+% \begin{macrocode}
+%<*jpg-1>
+FUNCTION {first.page}
+{ 't :=
+ ""
+ { t empty$ not t #1 #1 substring$ "-" = not and }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+}
+
+%</jpg-1>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.journal.pages'}
+% Note: this function gets called with something on the stack.
+% It may be the volume and number.
+% \begin{macrocode}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$
+ { pop$ pop$ format.pages }
+ {
+%<volp-sp> ": " *
+%<*!volp-sp>
+%<volp-blk> " " *
+%<*!volp-blk>
+%<volp-com> ", " *
+%<*!volp-com>
+%<volp-semi> "; " *
+%<!volp-semi> ":" *
+%</!volp-com>
+%</!volp-blk>
+%</!volp-sp>
+%<!jdt-v&!jdt-vs&jdt-p> format.year * " " *
+%<!jdt-v&!jdt-vs&!jdt-p&jdt-pc> format.year * ", " *
+ swap$
+%<jpg-1> first.page
+%<!jpg-1> n.dashify
+%<*jwdpg>
+ pages multi.page.check
+ 'bbl.pages
+ 'bbl.page
+ if$
+ swap$ tie.or.space.prefix
+%</jwdpg>
+ "pages" bibinfo.check
+%<jwdpg> * *
+ *
+ }
+ if$
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.journal.eid'}
+%
+% This function is called with something on the stack (journal vol, number)
+% and appends \texttt{eid} and \texttt{numpages} if those field are non-empty.
+% Very similar to \texttt{format.journal.pages}.
+%
+% For the AGU style of including the DOI as part of the EID, the DOI number
+% is appended too.
+% \begin{macrocode}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ duplicate$ empty$ 'skip$
+ {
+%<volp-sp> ": " *
+%<*!volp-sp>
+%<volp-blk> " " *
+%<*!volp-blk>
+%<volp-com> ", " *
+%<*!volp-com>
+%<volp-semi> "; " *
+%<!volp-semi> ":" *
+%</!volp-com>
+%</!volp-blk>
+%</!volp-sp>
+ }
+ if$
+ swap$ *
+%<*revdata>
+ numpages empty$ 'skip$
+ { bbl.eidpp numpages tie.or.space.prefix
+ "numpages" bibinfo.check * *
+ " (" swap$ * ")" * *
+ }
+ if$
+%</revdata>
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.vol.num.pages'}
+% Version 3.84, I have rationalized several options that placed the date in the
+% journal specifications. It was rather chaotic before, but now it should be
+% more systematic. This means some options have been removed, something that I
+% do not like to do.
+%
+% The option \texttt{pp-last} suppresses the pages in the formatting macros, and
+% sees to it that the pages are added just before any notes in those entries
+% that take pages. This applies to more than just \texttt{article}, but to
+% \texttt{inbook}, \texttt{incollection} as well.
+%
+% \begin{macrocode}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+ duplicate$ empty$ 'skip$
+ {
+%<jwdvol> bbl.volume swap$ tie.or.space.prefix
+ "volume" bibinfo.check
+%<jwdvol> * *
+ }
+ if$
+%<vol-bf&!vol-2bf> bolden
+%<!vol-bf&!vol-2bf&vol-it> emphasize
+%<jdt-v|jdt-vs> format.year *
+%<*!vnum-x>
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
+ {
+ swap$ duplicate$ empty$
+ { "there's a number but no volume in " cite$ * warning$ }
+ 'skip$
+ if$
+ swap$
+%<vnum-sp> "~(" swap$ * ")" *
+%<!vnum-sp&vnum-cm> ", " swap$ *
+%<!vnum-sp&!vnum-cm&vnum-nr> ", " bbl.nr * number tie.or.space.prefix pop$ * swap$ *
+%<!vnum-sp&!vnum-cm&!vnum-nr&vnum-h> ", \#" swap$ *
+%<!vnum-sp&!vnum-cm&!vnum-nr&!vnum-h&vnum-b> " " swap$ *
+%<!vnum-sp&!vnum-cm&!vnum-nr&!vnum-h&!vnum-b> "(" swap$ * ")" *
+ }
+ if$ *
+%<!vol-bf&vol-2bf> bolden
+%</!vnum-x>
+%<*!pp-last>
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+%</!pp-last>
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.chapter.pages'}
+% \begin{macrocode}
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+%<!pp-last> 'format.pages
+%<pp-last> { "" }
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check
+ }
+ if$
+ chapter tie.or.space.prefix
+ "chapter" bibinfo.check
+ * *
+%<*!pp-last>
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+%</!pp-last>
+ }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`bt.enquote'}
+% This is to place the booktitle for proceedings and collections into quotes.
+% If punctuation is to be included, then add a comma unless a stop already
+% exists, or add a period under the only circumstances that
+% |format.in.ed.booktitle| is followed by |new.sentence|.
+% \begin{macrocode}
+%<*bt-qq>
+FUNCTION {bt.enquote}
+{ duplicate$ empty$ 'skip$
+ { "\enquote{" swap$ *
+%<*!qx>
+ non.stop
+ { ",} " * }
+ { "}, " * }
+ if$
+%</!qx>
+%<*qx>
+ "}, " *
+%</qx>
+ }
+ if$
+}
+%</bt-qq>
+% \end{macrocode}
+%
+% \end{macro}
+%
+% \begin{macro}{`format.booktitle'}
+% The function \texttt{format.booktitle} pushes one object
+% (the book title, suitably encapsulated) onto the stack.
+% It is currently used in \texttt{format.incoll.inproc.crossref}
+% and in \texttt{format.in.ed.booktitle}, and should be used whenever accessing
+% the \texttt{booktitle} field for eventual output.
+%
+% If the book title is empty or missing, the function pushes an empty string.
+% \begin{macrocode}
+FUNCTION {format.booktitle}
+{
+ booktitle "booktitle" bibinfo.check
+%<!bt-qq&!bt-rm> emphasize
+%<bt-qq> bt.enquote
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.in.ed.booktitle'}
+% Prior to version 3.81, the \textsl{Editor} or \textsl{Edited by} in
+% parentheses was meant to be capitalized, but this did not work properly.
+% Now the option \texttt{edcap} produces this, and default is not capitalized.
+%
+% Notes on \dtx{} options:
+% \begin{itemize}
+% \item
+% The following combinations are available through the \texttt{makebst.tex} interface:
+% \begin{quote}
+% \verb+(+ \\
+% \verb+ <default>+ \\
+% \verb+ |edby ( |edbyx |edbyy|edbyw[edcap])+ \\
+% \verb+ |edby-par (|edcap|edbyx[edcap]|edbyy )+ \\
+% \verb+ |edby-parc(|edcap|edbyx )+ \\
+% \verb+)+
+% \end{quote}
+% \item
+% \texttt{edby}, \texttt{edby-par}, and \texttt{edby-parc} are mutually exclusive
+% and, except for the default, exhaustive.
+% \item
+% \texttt{edbyx}, \texttt{edbyw}, and \texttt{edbyy} are mutually exclusive
+% and, except for the default, exhaustive.
+% \item
+% \texttt{edcap} is independent of the above two groups of options.
+% \item
+% When parentheses need to be applied, we make sure that the respective
+% \dtx{} guard expressions are mutually exclusive.
+% It makes no sense for \texttt{edbyw} to be in effect if either of
+% \texttt{edby-par} or \texttt{edby-parc} is in effect.
+% \item
+% \texttt{makebst.tex} only activates \texttt{edcap} in certain cases,
+% but we do no checking here, applying it consistently to the
+% ``editor'' text entity.
+% \item
+% The code between \texttt{<!edpar>} and \verb+<edpar\|edparc>+
+% \emph{must} match the corresponding code in \texttt{format.editors}.
+% This means that in the default case, formatting is controlled by
+% a \dtx{} mechanism entirely different from the other cases.
+% \item \texttt{ser-ed} has been added to suit AGU. Result of series plus
+% volume to go between booktitle and editors; must remove \texttt{format.bvolume}
+% from \texttt{incollection} and \texttt{inproceedings}.
+% \end{itemize}
+%
+% \begin{macrocode}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+ {
+%<showstack>% btitle
+%<*ser-ed>
+ format.bvolume duplicate$ empty$ 'pop$
+ { ", " swap$ * * }
+ if$
+%</ser-ed>
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
+ {
+%<*!(edby|edby-par|edby-parc)>
+%<showstack>% btitle ednms
+%<!edpar&!edparxc> "," *
+ " " *
+ get.bbl.editor
+%<bkedcap> capitalize
+%<edpar> "(" swap$ * "), " *
+%<!edpar&(edparc|edparxc)> "(" swap$ * ") " *
+%<!edpar&!(edparc|edparxc)> ", " *
+ * swap$
+%<showstack>% eds btitle
+%</!(edby|edby-par|edby-parc)>
+%<*edby|edby-par|edby-parc>
+%<showstack>% btitle ednms
+%<edbyx|edbyy|edbyw> get.bbl.editor
+%<!(edbyx|edbyy|edbyw)> bbl.edby
+%<edcap> capitalize
+%<!(edby-par|edby-parc)&edbyw> "(" swap$ * ")" *
+%<showstack>% btitle ednms ed
+%<(edby-par|edby)&edbyy> swap$ "," *
+ " " * swap$ *
+%<showstack>% btitle ednms-ed
+%<(edby-par|edby-parc)&!edbyw> "(" swap$ * ")" *
+ swap$
+%<edby|edby-parc> "," *
+ " " * swap$
+%</edby|edby-par|edby-parc>
+%<showstack>% btitle ednms-ed (or ednms-ed btitle)
+ * }
+ if$
+%<showstack>% btitle-ednms-ed (or ednms-ed-btitle) (or btitle)
+ word.in swap$ *
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`empty.misc.check'}
+% \begin{macrocode}
+%<*!ay>
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+%<!seq-no|alph> key empty$ not and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.thesis.type'}
+% \begin{macrocode}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+ 'pop$
+ { swap$ pop$
+ "t" change.case$ "type" bibinfo.check
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.tr.number'}
+% \begin{macrocode}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+ type duplicate$ empty$
+ { pop$ bbl.techrep }
+ 'skip$
+ if$
+ "type" bibinfo.check
+ swap$ duplicate$ empty$
+ { pop$ "t" change.case$ }
+ { tie.or.space.prefix * * }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.article.crossref'}
+% The \texttt{journal} field was emphasized emplicitly, but it should be
+% done by command.
+% \begin{macrocode}
+FUNCTION {format.article.crossref}
+{
+%<*!ay>
+ key duplicate$ empty$
+ { pop$
+ journal duplicate$ empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
+ { "journal" bibinfo.check emphasize word.in swap$ * }
+ if$
+ }
+ { word.in swap$ * " " *}
+ if$
+%</!ay>
+%<ay> word.in
+%<!html> " \cite{" * crossref * "}" *
+%<html> " <tt>" * crossref * "</tt>" *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.crossref.editor'}
+% \begin{macrocode}
+%<*!ay>
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+%<nmft&nmfted&nmand-rm> bib.name.font
+ "editor" bibinfo.check
+ editor num.names$ duplicate$
+ #2 >
+ { pop$
+%<nmft&nmfted&!nmand-rm&(etal-it|etal-rm)> bib.name.font
+ "editor" bibinfo.check
+ " " * bbl.etal
+%<etal-it> emphasize
+ *
+%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> bib.name.font
+%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> "others" 't :=
+ }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+%<nmft&nmfted&!nmand-rm&(etal-it|etal-rm)> bib.name.font
+ "editor" bibinfo.check
+ " " * bbl.etal
+%<etal-it> emphasize
+ *
+%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> bib.name.font
+%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> "others" 't :=
+ }
+ {
+%<*!harnm>
+%<!amper> bbl.and space.word
+%<amper> " \& "
+%</!harnm>
+%<harnm> " \harvardand\ "
+ * editor #2 "{vv~}{ll}" format.name$
+%<nmft&nmfted&nmand-rm> bib.name.font
+ "editor" bibinfo.check
+ *
+ }
+ if$
+ }
+ if$
+ }
+ if$
+%<*nmft&nmfted&!nmand-rm>
+ t "others" =
+ 'skip$
+ { bib.name.font "editor" bibinfo.check }
+ if$
+%</nmft&nmfted&!nmand-rm>
+}
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.book.crossref'}
+% The \texttt{series} field was emphasized emplicitly, but it should be
+% done by command.
+% \begin{macrocode}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ pop$ word.in
+ }
+ { bbl.volume
+%<!(blk-com|blk-tita)> capitalize
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+ }
+ if$
+%<*!ay>
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { series emphasize * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+%</!ay>
+%<!html> " \cite{" * crossref * "}" *
+%<html> " <tt>" * crossref * "</tt>" *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.incoll.inproc.crossref'}
+% The \texttt{booktitle} field was emphasized emplicitly, but it should be
+% done by command.
+% \begin{macrocode}
+FUNCTION {format.incoll.inproc.crossref}
+{
+%<*!ay>
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { format.booktitle duplicate$ empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ }
+ { word.in swap$ * }
+ if$
+ }
+ { word.in key * " " *}
+ if$
+ }
+ { word.in format.crossref.editor * " " *}
+ if$
+%</!ay>
+%<ay> word.in
+%<!html> " \cite{" * crossref * "}" *
+%<html> " <tt>" * crossref * "</tt>" *
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.org.or.pub'}
+% Psychology journals often want \textit{address}: \textit{publisher}.
+%
+% \textsl{Nature} wants publisher and date in parentheses, and when both
+% are there, they are merged into one set.
+%
+% Call function \texttt{add.blank} before parentheses so suppress preceding
+% punctuation, which looks strange when publisher in parentheses.
+%
+% MPG Jahrbuch wants publisher and year, but without parentheses. Add
+% \texttt{pub-nopar} to be used with \texttt{pub-date}.
+%
+% Have now (3.87.h) extended this function to include the organization, if
+% present. This is for \texttt{inproceedings} and \texttt{proceedings} where
+% the publisher is optional, and organization too. If the publisher is missing,
+% but the organization present, it is formatted like the publisher. This
+% complication comes from styles that want the publisher/organization to have
+% the date included, all in parentheses.
+%
+% This function is called by \texttt{format.publisher.address} and
+% \texttt{format.organization.address}, each putting the appropriate text
+% into the stack first.
+%
+% \begin{macrocode}
+FUNCTION {format.org.or.pub}
+{ 't :=
+ ""
+%<*pub-date&!ay>
+ year empty$
+ { "empty year in " cite$ * warning$ }
+ 'skip$
+ if$
+%</pub-date&!ay>
+%<*!(pub-date&ay)>
+ address empty$ t empty$ and
+%<pub-date> year empty$ and
+ 'skip$
+ {
+%</!(pub-date&ay)>
+%<pub-par|(pub-date&!pub-xpar)> add.blank "(" *
+%<*add-pub>
+ address "address" bibinfo.check *
+ t empty$
+ 'skip$
+%</add-pub>
+%<*!add-pub>
+ t empty$
+ { address "address" bibinfo.check *
+ }
+ { t *
+ address empty$
+ 'skip$
+ { ", " * address "address" bibinfo.check * }
+ if$
+ }
+%</!add-pub>
+%<*add-pub>
+ { address empty$
+ 'skip$
+ { ": " * }
+ if$
+ t *
+ }
+%</add-pub>
+ if$
+%<*pub-date&!ay>
+ year empty$
+ 'skip$
+ { t empty$ address empty$ and
+ 'skip$
+%<!pub-xc> { ", " swap$ * * }
+%<pub-xc> { " " swap$ * * }
+ if$
+ year "year" bibinfo.check
+%<dtbf> bolden
+ *
+ }
+ if$
+%</pub-date&!ay>
+%<*pub-date&ay>
+ year duplicate$ empty$
+%<*!blkyear>
+ { "empty year in " cite$ * "; set to ????" * warning$
+ pop$ "????" }
+%</!blkyear>
+%<*blkyear>
+ { "empty year in " cite$ * warning$
+ pop$ "" }
+%</blkyear>
+%<!dtbf> { "year" bibinfo.check extra.label * }
+%<dtbf> { "year" bibinfo.check bolden extra.label * }
+ if$
+ t empty$ address empty$ and
+ { * }
+%<!pub-xc> { ", " swap$ * * }
+%<pub-xc> { " " swap$ * * }
+ if$
+%</pub-date&ay>
+%<pub-par|(pub-date&!pub-xpar)> ")" *
+%<*!(pub-date&ay)>
+ }
+ if$
+%</!(pub-date&ay)>
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.publisher.address'}
+% \begin{macrocode}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`format.organization.address'}
+% \begin{macrocode}
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`name.or.dash'}
+% This function stores what is on the stack, compares it with previous value,
+% and replaces it with a long dash if they are equal. What is on the stack
+% should be author or editor names for the current entry.
+% \begin{macrocode}
+%<*nmdash>
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+ oldname empty$
+ { s 'oldname := s }
+ { s oldname =
+%<*!au-col>
+%<!nmd-2&!nmd-3> { "---" }
+%<nmd-2&!nmd-3> { "---{}---" }
+%<nmd-3> { "---{}---{}---" }
+%</!au-col>
+%<*au-col>
+%<!nmd-2&!nmd-3> { "---" add.blank }
+%<nmd-2&!nmd-3> { "---{}---" add.blank }
+%<nmd-3> { "---{}---{}---" add.blank }
+%</au-col>
+ { s 'oldname := s }
+ if$
+ }
+ if$
+}
+
+%</nmdash>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`article'}
+% \begin{macrocode}
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<*dt-beg&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+ format.date "year" output.check
+ date.block
+%</dt-beg&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+%<*!jtit-x>
+ format.title "title" output.check
+%<blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<*blk-tit|blk-tita>
+%<!tit-col> new.sentence
+%<tit-col> add.colon
+%</blk-tit|blk-tita>
+%</!jtit-x>
+ crossref missing$
+ {
+ journal
+%<jxper> remove.dots
+ "journal" bibinfo.check
+%<!jttl-rm> emphasize
+%<injnl> word.in swap$ *
+ "journal" output.check
+%<jnm-x> add.blank
+%<*!dt-beg&!dt-end&dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+ format.date "year" output.check
+ date.block
+%</!dt-beg&!dt-end&dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+ format.vol.num.pages output
+%<doi&agu-doi> format.doi output
+%<*!dt-beg&!dt-end&!dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+ format.date "year" output.check
+%</!dt-beg&!dt-end&!dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+ }
+ { format.article.crossref output.nonnull
+%<!pp-last> format.pages output
+ }
+ if$
+%<*pp-last>
+ eid empty$
+ { format.journal.pages }
+ { format.journal.eid }
+ if$
+%</pp-last>
+%<issn> format.issn output
+%<(doi|(url-doi&!url))&!agu-doi> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v>
+%<eprint> format.eprint output
+%<*revdata>
+ format.url output
+%</revdata>
+ fin.entry
+%<harnm|url-nl> write.url
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`book'}
+% \begin{macrocode}
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+%<ay> editor format.key output
+%<!edpar&(edparc|edparxc)&!au-col> add.blank
+%<au-col> add.colon
+%<nmdash> name.or.dash
+ }
+ { format.authors output.nonnull
+%<au-col> add.colon
+%<nmdash> name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+%<dt-beg&!pub-date> format.date "year" output.check
+%<dt-beg&!pub-date> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.btitle "title" output.check
+ crossref missing$
+ { format.bvolume output
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%<!numser> format.number.series output
+%<pre-edn> format.edition output
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<numser> format.number.series output
+%<pg-bk&pg-pre> format.book.pages output
+ format.publisher.address output
+ }
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+ format.book.crossref output.nonnull
+%<!dt-beg&!dt-end&pub-date> format.date "year" output.check
+ }
+ if$
+%<!pre-edn> format.edition output
+%<!dt-beg&!dt-end&!pub-date> format.date "year" output.check
+%<isbn> format.isbn output
+%<pg-bk&!pg-pre> format.book.pages output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end&!pub-date>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end&!pub-date>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`booklet'}
+% \begin{macrocode}
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<ay&dt-beg> format.date "year" output.check
+%<!ay&dt-beg> format.date output
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.title "title" output.check
+%<blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+ howpublished "howpublished" bibinfo.check output
+ address "address" bibinfo.check output
+%<ay&!dt-beg&!dt-end> format.date "year" output.check
+%<!ay&!dt-beg&!dt-end> format.date output
+%<isbn> format.isbn output
+%<pg-bk> format.book.pages output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</ay&!dt-beg&dt-end>
+%<*!ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date output
+%</!ay&!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`inbook'}
+% The medical journals, with option \texttt{dt-jnl}, have the date as part of
+% the journal specification. For chapters in books, they want date and pages
+% to appear at the end, with a space between them. (For journals, there is to be
+% no space.) Suppress the chapter specification (for now).
+%
+% The \texttt{dt-jnl} option usually behaves as the default, except for some
+% special entries, like this one.
+%
+% Restore the chapter specification (2004 Feb 9) after someone complained.
+% There are still some bugs here. If some date punctuation is specified, say
+% with \texttt{yrp-semi} for a semi-colon after the year, this appears always,
+% even if there is no text following. But then this to be an unlikely wish anyway,
+% since such punctuation options are best suited for \texttt{dt-beg}.
+% \begin{macrocode}
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check
+%<ay> editor format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+ }
+ { format.authors output.nonnull
+%<au-col> add.colon
+%<nmdash> name.or.dash
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+%<dt-beg&!pub-date> format.date "year" output.check
+%<dt-beg&!pub-date> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.btitle "title" output.check
+ crossref missing$
+ {
+%<pre-pub&numser> format.number.series output
+%<pre-pub> format.publisher.address output
+ format.bvolume output
+%<*dt-beg|dt-end|!dt-jnl|a|!a>
+ format.chapter.pages "chapter and pages" output.check
+%</dt-beg|dt-end|!dt-jnl|a|!a>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%<!numser> format.number.series output
+%<pre-edn> format.edition output
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<!pre-pub&numser> format.number.series output
+%<!pre-pub> format.publisher.address output
+ }
+ {
+%<*dt-beg|dt-end|!dt-jnl|a|!a>
+ format.chapter.pages "chapter and pages" output.check
+%</dt-beg|dt-end|!dt-jnl|a|!a>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+ format.book.crossref output.nonnull
+%<!dt-beg&!dt-end&!dt-jnl&pub-date> format.date "year" output.check
+ }
+ if$
+%<!pre-edn> format.edition output
+%<!dt-beg&!dt-end&!dt-jnl&!pub-date> format.date "year" output.check
+%<*isbn>
+ crossref missing$
+ { format.isbn output }
+ 'skip$
+ if$
+%</isbn>
+%<*(!dt-beg&!dt-end&dt-jnl)&!pub-date>
+ format.date "year" output.check
+ date.block
+%</(!dt-beg&!dt-end&dt-jnl)&!pub-date>
+%<pp-last> format.pages "pages" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end&!pub-date>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end&!pub-date>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`incollection'}
+% \begin{macrocode}
+FUNCTION {incollection}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg&!pub-date> format.date "year" output.check
+%<dt-beg&!pub-date> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+%<*!jtit-x>
+ format.title "title" output.check
+%<blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%</!jtit-x>
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+%<bt-qq> end.quote.btitle
+%<pre-pub&numser> format.number.series output
+%<pre-pub> format.publisher.address output
+%<!ser-ed> format.bvolume output
+%<!numser> format.number.series output
+%<pre-edn> format.edition output
+ format.chapter.pages output
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<!pre-pub&numser> format.number.series output
+%<!pre-pub> format.publisher.address output
+%<!pre-edn> format.edition output
+%<!dt-beg&!dt-end&!dt-jnl&!pub-date> format.date "year" output.check
+%<isbn> format.isbn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter.pages output
+ }
+ if$
+%<*(!dt-beg&!dt-end&dt-jnl)&!pub-date>
+ format.date "year" output.check
+ date.block
+%</(!dt-beg&!dt-end&dt-jnl)&!pub-date>
+%<pp-last> format.pages "pages" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end&!pub-date>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end&!pub-date>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`inproceedings'}
+% \begin{macrocode}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg&!pub-date> format.date "year" output.check
+%<dt-beg&!pub-date> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+%<*!jtit-x>
+ format.title "title" output.check
+%<blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%</!jtit-x>
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+%<bt-qq> end.quote.btitle
+%<*!pre-pub>
+%<!ser-ed> format.bvolume output
+%<!numser> format.number.series output
+%<(dt-beg|dt-end|!dt-jnl)&!pp-last> format.pages output
+%</!pre-pub>
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<numser> format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+%<!dt-beg&!dt-end&!dt-jnl&!pub-date> format.date "year" output.check
+%<*pre-pub>
+ format.bvolume output
+%<!numser> format.number.series output
+%<(dt-beg|dt-end|!dt-jnl)&!pp-last> format.pages output
+%</pre-pub>
+%<isbn> format.isbn output
+%<issn> format.issn output
+ }
+ { format.incoll.inproc.crossref output.nonnull
+%<(dt-beg|dt-end|!dt-jnl)&!pp-last> format.pages output
+ }
+ if$
+%<*!dt-beg&!dt-end&dt-jnl&!pp-last>
+%<!pub-date> format.date "year" output.check
+%<!pub-date> date.block
+%<jdt-v|jdt-vs|jdt-p|!jdt-pc> add.blank
+ format.pages "pages" output.check
+%</!dt-beg&!dt-end&dt-jnl&!pp-last>
+%<pp-last> format.pages "pages" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end&!pub-date>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end&!pub-date>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`conference'}
+% \begin{macrocode}
+FUNCTION {conference} { inproceedings }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`manual'}
+% \begin{macrocode}
+%<*ay>
+FUNCTION {manual}
+{ output.bibitem
+ format.authors output
+ author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg> format.date "year" output.check
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.btitle "title" output.check
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%<!blk-com&!blk-tit&!blk-tita> organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ format.edition output
+%<!dt-beg&!dt-end> format.date "year" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+%</ay>
+%<*!ay>
+FUNCTION {manual}
+{ output.bibitem
+ author empty$
+ { organization "organization" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { output
+ address "address" bibinfo.check output
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<ay&dt-beg> format.date "year" output.check
+%<!ay&dt-beg> format.date output
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.btitle "title" output.check
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+ author empty$
+ { organization empty$
+ {
+%<!blk-com&!blk-tit&!blk-tita> address new.block.checka
+ address "address" bibinfo.check output
+ }
+ 'skip$
+ if$
+ }
+ {
+%<!blk-com&!blk-tit&!blk-tita> organization address new.block.checkb
+ organization "organization" bibinfo.check output
+ address "address" bibinfo.check output
+ }
+ if$
+ format.edition output
+%<ay&!dt-beg&!dt-end> format.date "year" output.check
+%<!ay&!dt-beg&!dt-end> format.date output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</ay&!dt-beg&dt-end>
+%<*!ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date output
+%</!ay&!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`mastersthesis'}
+% To format a master's thesis.
+% \begin{macrocode}
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg> format.date "year" output.check
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+%<*!thtit-x>
+%<!thtit-a> format.btitle
+%<thtit-a> format.title
+ "title" output.check
+%<thtit-a&blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%</!thtit-x>
+ bbl.mthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+%<!dt-beg&!dt-end> format.date "year" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`misc'}
+% \begin{macrocode}
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<ay&dt-beg> format.date "year" output.check
+%<!ay&dt-beg> format.date output
+%<*ay>
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.title output
+%<blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%</ay>
+%<*!ay>
+%<!blk-com&!blk-tit&!blk-tita> title howpublished new.block.checkb
+ format.title output
+%<blk-com&tit-qq> end.quote.title
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%<!blk-com&!blk-tit&!blk-tita> howpublished new.block.checka
+%</!ay>
+ howpublished "howpublished" bibinfo.check output
+%<ay&!dt-beg&!dt-end> format.date "year" output.check
+%<!ay&!dt-beg&!dt-end> format.date output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</ay&!dt-beg&dt-end>
+%<*!ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date output
+%</!ay&!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+%<!ay> empty.misc.check
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`phdthesis'}
+% To format a doctoral thesis.
+% \begin{macrocode}
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg> format.date "year" output.check
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+%<*!thtit-x>
+%<!thtit-a> format.btitle
+%<thtit-a> format.title
+ "title" output.check
+%<thtit-a&blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%</!thtit-x>
+ bbl.phdthesis format.thesis.type output.nonnull
+ school "school" bibinfo.warn output
+ address "address" bibinfo.check output
+%<!dt-beg&!dt-end> format.date "year" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`presentation'}
+% \begin{macrocode}
+%<*pres>
+FUNCTION {presentation}
+{ output.bibitem
+ format.authors output
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.title output
+%<blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+ format.organization.address "organization and address" output.check
+ month "month" output.check
+ year "year" output.check
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+ new.sentence
+ type missing$ 'skip$
+ {"(" type capitalize * ")" * output}
+ if$
+%<*url-blk&!harnm>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm>
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+%</pres>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`proceedings'}
+% \begin{macrocode}
+%<*ay>
+FUNCTION {proceedings}
+{ output.bibitem
+ format.editors output
+ editor format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg> format.date "year" output.check
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.btitle "title" output.check
+ format.bvolume output
+%<!numser> format.number.series output
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<numser> format.number.series output
+ publisher empty$
+ { format.organization.address output }
+ { organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+%<!dt-beg&!dt-end&!pub-date> format.date "year" output.check
+%<isbn> format.isbn output
+%<issn> format.issn output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end&!pub-date>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end&!pub-date>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+%</ay>
+% \end{macrocode}
+% \begin{macrocode}
+%<*!ay>
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { organization "organization" bibinfo.check output
+ }
+ { format.editors output.nonnull }
+ if$
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg> format.date "year" output.check
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.btitle "title" output.check
+ format.bvolume output
+%<!numser> format.number.series output
+ editor empty$
+ { publisher empty$
+%<!numser> 'skip$
+%<numser> { format.number.series output }
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<numser> format.number.series output
+ format.publisher.address output
+ }
+ if$
+ }
+ { publisher empty$
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<numser> format.number.series output
+ format.organization.address output }
+ {
+%<!blk-com&!blk-tit&!blk-tita> new.sentence
+%<numser> format.number.series output
+ organization "organization" bibinfo.check output
+ format.publisher.address output
+ }
+ if$
+ }
+ if$
+%<!dt-beg&!dt-end&!pub-date> format.date "year" output.check
+%<isbn> format.isbn output
+%<issn> format.issn output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+%</!ay>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`techreport'}
+% \begin{macrocode}
+FUNCTION {techreport}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<dt-beg> format.date "year" output.check
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+%<trtit-b> format.btitle
+%<!trtit-b> format.title
+ "title" output.check
+%<!trtit-b&blk-com&tit-qq> end.quote.title
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<blk-tit&!tit-col> new.sentence
+%<blk-tit&tit-col> add.colon
+%<!trnum-it> format.tr.number output.nonnull
+%<trnum-it> format.tr.number emphasize output.nonnull
+ institution "institution" bibinfo.warn output
+ address "address" bibinfo.check output
+%<!dt-beg&!dt-end> format.date "year" output.check
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note output
+%<*!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date "year" output.check
+%</!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`unpublished'}
+% \begin{macrocode}
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+%<ay> author format.key output
+%<au-col> add.colon
+%<nmdash> name.or.dash
+%<ay&dt-beg> format.date "year" output.check
+%<!ay&dt-beg> format.date output
+%<dt-beg> date.block
+%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block
+ format.title "title" output.check
+%<blk-com&tit-qq> end.quote.title
+%<ay&!dt-beg&!dt-end> format.date "year" output.check
+%<!ay&!dt-beg&!dt-end> format.date output
+%<doi|(url-doi&!url)> format.doi output
+%<*url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.url output
+%</url-blk&!harnm&!revdata>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence
+ format.note "note" output.check
+%<*ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date output
+%</ay&!dt-beg&dt-end>
+%<*!ay&!dt-beg&dt-end>
+%<!blk-com&!blk-tit&!blk-tita> new.block
+ format.date output
+%</!ay&!dt-beg&dt-end>
+%<eprint> format.eprint output
+%<revdata> format.url output
+ fin.entry
+%<(harnm|url-nl)&!revdata> write.url
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`default.type'}
+% \begin{macrocode}
+FUNCTION {default.type} { misc }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+READ
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*ay|alph|!seq-no>
+% \end{macrocode}
+%
+% \begin{macro}{`sortify'}
+% In \texttt{btxbst.doc}/\texttt{.mbs}, the \texttt{sortify} function is
+% left out for unsorted alpha-style citations. This leads to an error,
+% because it is still used. So leave it in here too. \emph{In fact, do away
+% with unsorted alpha style, since it is as useless as unsorted author--year
+% listings.}
+% \begin{macrocode}
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+INTEGERS { len }
+% \end{macrocode}
+%
+% \begin{macro}{`chop.word'}
+% \begin{macrocode}
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<*!ay&alph>
+% \end{macrocode}
+%
+% \begin{macro}{`format.lab.names'}
+% The function \texttt{format.lab.names} formats by author--year or the
+% \texttt{alpha} style as in the original \texttt{alpha.bst}.
+% Only major difference is that there should be no unsorted (\texttt{seq-no})
+% versions of this. Patashnik was clearly very unhappy about accommodating
+% such an animal, and in fact, his unsorted alpha style crashes \btx.
+% I also provide the \texttt{vonx} option here to ignore the \textsl{von}
+% part of the name.
+%
+% \begin{macrocode}
+INTEGERS { et.al.char.used }
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {initialize.et.al.char.used}
+{ #0 'et.al.char.used :=
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {initialize.et.al.char.used}
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {format.lab.names}
+{ 's :=
+%<*alf-1>
+%<!vonx> s #1 "{v{}}{l{}}" format.name$
+%<vonx> s #1 "{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+%</alf-1>
+%<*!alf-1&alf-f>
+%<!vonx> s #1 "{vv{}}{ll}" format.name$
+%<vonx> s #1 "{ll}" format.name$
+%</!alf-1&alf-f>
+%<*!alf-1&!alf-f>
+ s num.names$ 'numnames :=
+ numnames #1 >
+ { numnames #4 >
+ { #3 'namesleft := }
+ { numnames 'namesleft := }
+ if$
+ #1 'nameptr :=
+ ""
+ { namesleft #0 > }
+ { nameptr numnames =
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+%<!vonx> { s nameptr "{v{}}{l{}}" format.name$ * }
+%<vonx> { s nameptr "{l{}}" format.name$ * }
+ if$
+ }
+%<!vonx> { s nameptr "{v{}}{l{}}" format.name$ * }
+%<vonx> { s nameptr "{l{}}" format.name$ * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ numnames #4 >
+ { "{\etalchar{+}}" *
+ #1 'et.al.char.used :=
+ }
+ 'skip$
+ if$
+ }
+%<!vonx> { s #1 "{v{}}{l{}}" format.name$
+%<vonx> { s #1 "{l{}}" format.name$
+ duplicate$ text.length$ #2 <
+ { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
+ 'skip$
+ if$
+ }
+ if$
+%</!alf-1&!alf-f>
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</!ay&alph>
+% \end{macrocode}
+% The function for the standard citation: one or two authors cited full, but for
+% more than two, only the first with \emph{et~al.} given.
+% \begin{macrocode}
+%<*ay&!mcite>
+FUNCTION {format.lab.names}
+{ 's :=
+ "" 't :=
+%<!jnrlab> s #1 "{vv~}{ll}" format.name$
+%<*jnrlab>
+%<!nm-rv&!nm-rvv&!nm-rvx&!nm-rvcx> s #1 "{vv~}{ll}{, jj}" format.name$
+%<nm-rv|nm-rvv|nm-rvx|nm-rvcx> s #1 "{vv~}{ll}{ jj}" format.name$
+%</jnrlab>
+%<lab&and-rm> cite.name.font
+ s num.names$ duplicate$
+ #2 >
+ { pop$
+%<lab&!and-rm&(etal-it|etal-rm)> cite.name.font
+%<*!etal-it>
+%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font *
+%<!lab|!and-rm|etal-rm> " " * bbl.etal *
+%</!etal-it>
+%<etal-it> " " * bbl.etal emphasize *
+%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font
+%<lab&!and-rm> "others" 't :=
+ }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ {
+% %<lab&!and-rm&(etal-it|etal-rm)> cite.name.font
+%<*!etal-it>
+%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font *
+%<!lab|!and-rm|etal-rm> " " * bbl.etal *
+%</!etal-it>
+%<etal-it> " " * bbl.etal emphasize *
+%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font
+%<lab&!and-rm> "others" 't :=
+ }
+%<*!harnm>
+%<*!amper>
+ { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+%<lab&and-rm> cite.name.font
+ * }
+%</!amper>
+%<*amper>
+ { " \& " * s #2 "{vv~}{ll}" format.name$
+%<lab&and-rm> cite.name.font
+ * }
+%</amper>
+%</!harnm>
+%<*harnm>
+ { " \harvardand{} " * s #2 "{vv~}{ll}" format.name$
+%<lab&and-rm> cite.name.font
+ * }
+%</harnm>
+ if$
+ }
+ if$
+ }
+ if$
+%<*lab&!and-rm>
+ t "others" =
+ 'skip$
+ { cite.name.font }
+ if$
+%</lab&!and-rm>
+}
+
+%</ay&!mcite>
+% \end{macrocode}
+%
+% The code for formating author--year citations with more than one author
+% before \emph{et al.} or selecting a number other than two for truncating,
+% is much the same as the \texttt{format.full.names} function.
+% \begin{macrocode}
+%<*ay&mcite>
+FUNCTION {format.lab.names}
+{'s :=
+ "" 't :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+%<!jnrlab> "{vv~}{ll}" format.name$
+%<*jnrlab>
+%<!nm-rv&!nm-rvv&!nm-rvx&!nm-rvcx> "{vv~}{ll}{, jj}" format.name$
+%<nm-rv|nm-rvv|nm-rvx|nm-rvcx> "{vv~}{ll}{ jj}" format.name$
+%</jnrlab>
+%<lab&and-rm> cite.name.font
+ 't :=
+ nameptr #1 >
+ {
+%<mct-1> nameptr #2 =
+%<mct-2> nameptr #3 =
+%<mct-3> nameptr #4 =
+%<mct-4> nameptr #5 =
+%<mct-5> nameptr #6 =
+%<mct-6> nameptr #7 =
+%<mct-x2> numnames #2 > and
+%<mct-x3> numnames #3 > and
+%<mct-x4> numnames #4 > and
+%<mct-x5> numnames #5 > and
+%<mct-x6> numnames #6 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ namesleft #1 >
+ { ", " * t * }
+ {
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ {
+%<lab&!and-rm&(etal-it|etal-rm)> cite.name.font
+%<*!etal-it>
+%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font *
+%<!lab|!and-rm|etal-rm> " " * bbl.etal *
+%</!etal-it>
+%<etal-it> " " * bbl.etal emphasize *
+%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font
+ }
+ {
+%<*!harnm>
+%<*!and-xcom>
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+%</!and-xcom>
+%<!amper> bbl.and
+%<amper> "\&"
+%</!harnm>
+%<harnm> "\harvardand{}"
+ space.word * t *
+ }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+%<*lab&!and-rm>
+ t "others" =
+ 'skip$
+ { cite.name.font }
+ if$
+%</lab&!and-rm>
+}
+
+%</ay&mcite>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`author.key.label'}
+% \begin{macro}{`author.editor.key.label'}
+% \begin{macro}{`author.key.organization.label'}
+% \begin{macro}{`editor.key.organization.label'}
+% \begin{macro}{`editor.key.label'}
+% Have to be very careful with the options \texttt{ay}, \texttt{alph}, and
+% \texttt{seq-no} here. The first two are actually mutually exclusive, and
+% \texttt{ay} should dominate. The \texttt{seq-no} option only applies for
+% numerical (\texttt{!ay}) but not alphabetic (\texttt{alph}) selections.
+% This whole block of coding dealing with labels is only included for
+% author--year or alphabetic or ordered numerical.
+% That is, \texttt{ay} or \texttt{alph} or \texttt{!seq-no} is true.
+% \begin{macrocode}
+%<*ay|alph>
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+%<ay> 'key
+%<!ay> { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+%<ay> 'key
+%<!ay> { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+%</ay|alph>
+%<*!ay&alph>
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3 text.prefix$ }
+ if$
+ }
+ { key #3 text.prefix$ }
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+%</!ay&alph>
+%<*ay>
+FUNCTION {editor.key.label}
+{ editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{`calc.short.authors'}
+% \begin{macrocode}
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.label
+ 'author.key.label
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`calc.label'}
+% \begin{macrocode}
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+%<!(har|ast|cay|nmd|alk|cn)> "("
+%<har|ast|cay|nmd|alk|cn> ", "
+ *
+ year duplicate$ empty$
+%<keyxyr> short.list key field.or.null = or
+%<(blkyear|keyxyr)> { pop$ "" }
+%<!(blkyear|keyxyr)> { pop$ "????" }
+%<!note-yr> { purify$ #-1 #4 substring$ }
+%<note-yr> 'skip$
+ if$
+ *
+ 'label :=
+}
+
+%</ay>
+%<*!ay&alph>
+FUNCTION {calc.label}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ duplicate$
+ year field.or.null purify$ #-1 #2 substring$
+ *
+ 'label :=
+ year field.or.null purify$ #-1 #4 substring$
+ *
+ sortify 'sort.label :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</!ay&alph>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*har|cay|nmd|ast|cn>
+% \end{macrocode}
+%
+% \begin{macro}{`calc.short.label'}
+% \begin{macrocode}
+FUNCTION {calc.short.label}
+{ calc.short.authors short.list
+ 'label :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</har|cay|nmd|ast|cn>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</ay>
+% \end{macrocode}
+%
+% \begin{macro}{`sort.format.names'}
+% \begin{macrocode}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+%<*xintls>
+%<!vonx> "{vv{ } }{ll{ }}"
+%<vonx> "{ll{ }}"
+%</xintls>
+%<*!xintls>
+%<*!nm-init&!nm-rev&!nm-rev1&!nm-rv&!nm-rvx&!nm-rvcx&!nm-rvv&!nm-rvvc>
+%<!vonx> "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
+%<vonx> "{ll{ }}{ ff{ }}{ jj{ }}"
+%</!nm-init&!nm-rev&!nm-rev1&!nm-rv&!nm-rvx&!nm-rvcx&!nm-rvv&!nm-rvvc>
+%<*nm-init|nm-rev|nm-rev1|nm-rv|nm-rvx|nm-rvcx|nm-rvv|nm-rvvc>
+%<!vonx> "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
+%<vonx> "{ll{ }}{ f{ }}{ jj{ }}"
+%</nm-init|nm-rev|nm-rev1|nm-rv|nm-rvx|nm-rvcx|nm-rvv|nm-rvvc>
+%</!xintls>
+ format.name$ 't :=
+ nameptr #1 >
+ {
+%<*nmlm>
+%<m1> nameptr #1
+%<m2> nameptr #2
+%<m3> nameptr #3
+%<m4> nameptr #4
+%<m5> nameptr #5
+%<m6> nameptr #6
+%<m7> nameptr #7
+%<m8> nameptr #8
+%<m9> nameptr #9
+%<m0> nameptr #0
+%<m10> #10 +
+%<m20> #20 +
+%<m30> #30 +
+%<m40> #40 +
+%<m50> #50 +
+%<m60> #60 +
+%<m70> #70 +
+%<m80> #80 +
+%<m90> #90 +
+ #1 + =
+%<x1> numnames #1
+%<x2> numnames #2
+%<x3> numnames #3
+%<x4> numnames #4
+%<x5> numnames #5
+%<x6> numnames #6
+%<x7> numnames #7
+%<x8> numnames #8
+%<x9> numnames #9
+%<x0> numnames #0
+%<x10> #10 +
+%<x20> #20 +
+%<x30> #30 +
+%<x40> #40 +
+%<x50> #50 +
+%<x60> #60 +
+%<x70> #70 +
+%<x80> #80 +
+%<x90> #90 +
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+%</nmlm>
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" 't := }
+ 'skip$
+ if$
+%<*seq-lab|seq-key|seq-labc>
+ numnames #2 > nameptr #2 = and
+ { "zz" * year field.or.null * " " *
+%<seq-labc> #1 'namesleft :=
+ }
+%<seq-labc> { t sortify * }
+%<!seq-labc> 'skip$
+ if$
+%</seq-lab|seq-key|seq-labc>
+%<!seq-labc> t sortify *
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`sort.format.title'}
+% \begin{macrocode}
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`author.sort'}
+% \begin{macrocode}
+FUNCTION {author.sort}
+{ author empty$
+ { key empty$
+ { "to sort, need author or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`author.editor.sort'}
+% \begin{macrocode}
+FUNCTION {author.editor.sort}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { "to sort, need author, editor, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`negate.year'}
+% This function negates the year by substituting each digit by its
+% complement. That is, 0 $\rightarrow$ 9, 1 $\rightarrow$ 8, etc. This is used
+% to provide ordering by descending year (latest year first).
+% \begin{macrocode}
+%<*seq-yrr&!seq-yr>
+FUNCTION {negate.year}
+{ year empty$
+ { "99999" }
+ { year #1 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$
+ year #2 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ *
+ year #3 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ *
+ year #4 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ *
+ }
+ if$
+}
+%</seq-yrr&!seq-yr>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<*ay>
+% \end{macrocode}
+%
+% \begin{macro}{`editor.sort'}
+% \begin{macrocode}
+FUNCTION {editor.sort}
+{ editor empty$
+ { key empty$
+ { "to sort, need editor or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<*seq-no>
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { seq.num }
+% \end{macrocode}
+%
+% \begin{macro}{`init.seq'}
+% \begin{macrocode}
+FUNCTION {init.seq}
+{ #0 'seq.num :=}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+EXECUTE {init.seq}
+% \end{macrocode}
+%
+% \begin{macro}{`int.to.fix'}
+% \begin{macrocode}
+FUNCTION {int.to.fix}
+{ "000000000" swap$ int.to.str$ *
+ #-1 #10 substring$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</seq-no>
+% \end{macrocode}
+%
+% \begin{macro}{`presort'}
+% For unsorted author--year, make up the final sorting order in
+% \texttt{sort.label} with the original sequence number, for unsorting later.
+% \begin{macrocode}
+FUNCTION {presort}
+{ calc.label
+ label sortify
+ " "
+ *
+%<*!seq-no>
+ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.sort
+ 'author.sort
+ if$
+ }
+ if$
+ #1 entry.max$ substring$
+%</!seq-no>
+%<*seq-no>
+ seq.num #1 + 'seq.num :=
+ seq.num int.to.fix
+%</seq-no>
+ 'sort.label :=
+ sort.label
+ *
+%<seq-yr> " " * year field.or.null *
+%<seq-yrr&!seq-yr> " " * negate.year field.or.null *
+%<*!seq-key&!seq-labc&!seq-yr&!seq-yrr>
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+%</!seq-key&!seq-labc&!seq-yr&!seq-yrr>
+%<seq-key|seq-yr|seq-yrr> " " * cite$ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+% "For " cite$ * ", sort.key=" * sort.key$ * warning$
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!ay>
+% \end{macrocode}
+%
+% \begin{macro}{`author.organization.sort'}
+% \begin{macrocode}
+FUNCTION {author.organization.sort}
+{ author empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need author, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { author sort.format.names }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`editor.organization.sort'}
+% \begin{macrocode}
+FUNCTION {editor.organization.sort}
+{ editor empty$
+ { organization empty$
+ { key empty$
+ { "to sort, need editor, organization, or key in " cite$ * warning$
+ ""
+ }
+ { key sortify }
+ if$
+ }
+ { "The " #4 organization chop.word sortify }
+ if$
+ }
+ { editor sort.format.names }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`presort'}
+% \begin{macrocode}
+FUNCTION {presort}
+%<*alph>
+{ calc.label
+ sort.label
+ " "
+ *
+ type$ "book" =
+%</alph>
+%<!alph>{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.sort
+ { type$ "proceedings" =
+ 'editor.organization.sort
+ { type$ "manual" =
+ 'author.organization.sort
+ 'author.sort
+ if$
+ }
+ if$
+ }
+ if$
+%<alph> *
+ " "
+ *
+%<seq-yrr> negate.year field.or.null sortify
+%<!seq-yrr> year field.or.null sortify
+%<!(seq-yr|seq-yrr)|alph> *
+ " "
+ *
+%<(seq-yr|seq-yrr)&!alph> swap$ *
+ title field.or.null
+ sort.format.title
+ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</!ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+ITERATE {presort}
+% \end{macrocode}
+%
+% \begin{macrocode}
+SORT
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</ay|alph|!seq-no>
+% \end{macrocode}
+%
+% With version~6.0 of \texttt{natbib}, the author-year styles can also be
+% used for numerical citations; then the \texttt{thebibliography} environment
+% must have an argument indicating the length of the longest label.
+% Simply count the references and add this number as the argument.
+% \begin{macrocode}
+%<*ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+STRINGS { last.label next.extra }
+% \end{macrocode}
+%
+% With computer-generated articles, it is possible to have more than 26 articles
+% in one year. It has finally occurred that the extra labels go beyond `z'.
+% The current code now allows for `aa', \dots `az', 'ba', \dots `zz'. This
+% code was provided by Joseph Wright (2007 Oct 10).
+% \begin{macrocode}
+INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
+% \end{macrocode}
+%
+% \begin{macro}{`initialize.extra.label.stuff'}
+% \begin{macrocode}
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
+ #0 'last.extra.num :=
+ "a" chr.to.int$ #1 - 'last.extra.num.blank :=
+ last.extra.num.blank 'last.extra.num.extended :=
+ #0 'number.label :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`forward.pass'}
+% \begin{macrocode}
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num "z" chr.to.int$ >
+ { "a" chr.to.int$ 'last.extra.num :=
+ last.extra.num.extended #1 + 'last.extra.num.extended :=
+ }
+ 'skip$
+ if$
+ last.extra.num.extended last.extra.num.blank >
+ { last.extra.num.extended int.to.chr$
+ last.extra.num int.to.chr$
+ * 'extra.label := }
+ { last.extra.num int.to.chr$ 'extra.label := }
+ if$
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+ number.label #1 + 'number.label :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!ay&alph>
+% \end{macrocode}
+%
+% \begin{macrocode}
+STRINGS { longest.label last.sort.label next.extra }
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { longest.label.width last.extra.num }
+% \end{macrocode}
+%
+% \begin{macro}{`initialize.longest.label'}
+% \begin{macrocode}
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #0 int.to.chr$ 'last.sort.label :=
+ "" 'next.extra :=
+ #0 'longest.label.width :=
+ #0 'last.extra.num :=
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{`forward.pass'}
+% \begin{macrocode}
+FUNCTION {forward.pass}
+{ last.sort.label sort.label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ sort.label 'last.sort.label :=
+ }
+ if$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</!ay&alph>
+% \end{macrocode}
+%
+% \begin{macro}{`reverse.pass'}
+% The extra label is added in braces so that natbib can treat it as one unit.
+% This allows extra labels to be more than one letter long. For non-NFSS
+% emphasizing, this is no problem, since labels go in |{\em a}|, but for
+% non-emphasizing and for NFSS, it caused troubles without the braces.
+% The trouble arises with multiple citations in one |\cite| in which
+% authors and years are the same, and only the extra label is given for
+% the next one. Note: |\emph{a}| is more than one letter long in this sense,
+% so it is not just a problem for more than 26 papers with same authors and
+% year.
+%
+% The command |\natexlab| now encloses the extra label for \texttt{natbib}
+% styles. This command normally just prints its argument, but for numerical
+% citation mode, it swallows its argument. This allows the extra labels to
+% be suppressed for numerical citations where they are superfluous.
+% The enclosing braces mentioned above must be included here to make the
+% entire extra label text a single token for \texttt{natbib}.
+% \begin{macrocode}
+%<*ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+ extra.label
+%<xlab-it> emphasize
+%<*!html>
+ duplicate$ empty$
+ 'skip$
+ { "{\natexlab{" swap$ * "}}" * }
+ if$
+%</!html>
+ 'extra.label :=
+%<!(har|ast|cay|nmd|cn)> label extra.label * 'label :=
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!ay&alph>
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+ extra.label 'next.extra :=
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</!ay&alph>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<ay>EXECUTE {initialize.extra.label.stuff}
+%<!ay&alph>EXECUTE {initialize.longest.label}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*ay|alph>
+ITERATE {forward.pass}
+% \end{macrocode}
+%
+% \begin{macrocode}
+REVERSE {reverse.pass}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</ay|alph>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*ay>
+FUNCTION {bib.sort.order}
+{ sort.label
+ " "
+ *
+%<seq-yrr> negate.year field.or.null sortify
+%<!seq-yrr> year field.or.null sortify
+%<(seq-yr|seq-yrr)&!(seq-lab|seq-key|seq-labc)> swap$
+ *
+%<*!seq-key&!seq-labc&!seq-yr&!seq-yrr>
+ " "
+ *
+ title field.or.null
+ sort.format.title
+ *
+%</!seq-key&!seq-labc&!seq-yr&!seq-yrr>
+%<seq-key|seq-yr|seq-yrr> " " * cite$ *
+ #1 entry.max$ substring$
+ 'sort.key$ :=
+% "For " cite$ * ", bib.sort.key=" * sort.key$ * warning$
+%<har|cay|nmd|cn|ast> calc.short.label
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ITERATE {bib.sort.order}
+% \end{macrocode}
+%
+% \begin{macrocode}
+SORT
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</ay>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*!ay&!alph>
+% \end{macrocode}
+%
+% \begin{macrocode}
+STRINGS { longest.label }
+% \end{macrocode}
+%
+% \begin{macrocode}
+INTEGERS { number.label longest.label.width }
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {initialize.longest.label}
+{ "" 'longest.label :=
+ #1 'number.label :=
+ #0 'longest.label.width :=
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+FUNCTION {longest.label.pass}
+%<*!cite>
+{ number.label int.to.str$ 'label :=
+ number.label #1 + 'number.label :=
+%</!cite>
+%<cite>{ cite$ 'label :=
+ label width$ longest.label.width >
+ { label 'longest.label :=
+ label width$ 'longest.label.width :=
+ }
+ 'skip$
+ if$
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {initialize.longest.label}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ITERATE {longest.label.pass}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</!ay&!alph>
+% \end{macrocode}
+%
+% \begin{macro}{`begin.bib'}
+% The function \texttt{begin.bib} writes the initial text to the \texttt{.bbl}
+% file. The most important matter here is that the \texttt{thebibliography}
+% environment is invoked.
+%
+% Note: the French quotation marks are called `guillimets'; Adobe erroneously
+% named the symbols `guillimot', which is an arctic bird. The error has so
+% propagated, that it can no longer be corrected. \LaTeX\ took it over.
+% \begin{macrocode}
+FUNCTION {begin.bib}
+%<*!html>
+%<*!ay&alph>
+{ et.al.char.used
+ { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
+ 'skip$
+ if$
+ preamble$ empty$
+%</!ay&alph>
+%<ay|!alph>{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+%<ay> "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+%<!ay> "\begin{thebibliography}{" longest.label * "}" *
+ write$ newline$
+%<*(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))>
+ "\typeout{**********************************}" write$ newline$
+ "\typeout{WARNING WARNING WARNING WARNING WARNING}" write$ newline$
+ "\typeout{The bst file has been generated with inconsistent options}"
+ write$ newline$
+ "\typeout{Read the warning message at the start of the bst file}"
+ write$ newline$
+ "\typeout{**********************************}" write$ newline$
+%</(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))>
+%<*!plntx>
+%<!tit-it&tit-qq&qt-s> "\newcommand{\enquote}[1]{`#1'}"
+%<!tit-it&tit-qq&!qt-s&!qt-g> "\newcommand{\enquote}[1]{``#1''}"
+%</!plntx>
+%<*plntx>
+%<!tit-it&tit-qq&qt-s> "\def\enquote#1{`#1'}"
+%<!tit-it&tit-qq&!qt-s&!qt-g> "\def\enquote#1{``#1''}"
+%</plntx>
+%<*!tit-it&tit-qq&!qt-s&qt-g>
+%<!plntx> "\let\enquote\frquote"
+%<*plntx>
+ "\def\guillemotleft{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}"
+ write$ newline$
+ "\def\guillemotright{%"
+ write$ newline$
+ " \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}"
+ write$ newline$
+ "\def\enquote#1{\guillemotleft#1\guillemotright}"
+%</plntx>
+%</!tit-it&tit-qq&!qt-s&qt-g>
+%<!tit-it&tit-qq> write$ newline$
+%<umlaut> "\let\qq=\" quote$ * write$ newline$
+%<em-ul> "\expandafter\ifx\csname uline\endcsname\relax\let\uline\underline\fi"
+%<em-ul> write$ newline$
+%<*ay>
+%<!plntx> "\providecommand{\natexlab}[1]{#1}"
+%<plntx> "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
+ write$ newline$
+%<*har>
+ "{\catcode`\|=0\catcode`\#=12\catcode`\@=11\catcode`\\=12" write$ newline$
+ "|immediate|write|@auxout{\expandafter\ifx\csname natexlab\endcsname\relax\gdef\natexlab#1{#1}\fi}}"
+ write$ newline$
+%</har>
+%</ay>
+%<*nmft&nmft-def>
+%<!plntx> "\providecommand{\bibnamefont}[1]{#1}"
+%<plntx> "\expandafter\ifx\csname bibnamefont\endcsname\relax"
+%<plntx> write$ newline$
+%<plntx> " \def\bibnamefont#1{#1}\fi"
+ write$ newline$
+%</nmft&nmft-def>
+%<*nmft&fnm-def>
+%<!plntx> "\providecommand{\bibfnamefont}[1]{#1}"
+%<plntx> "\expandafter\ifx\csname bibfnamefont\endcsname\relax"
+%<plntx> write$ newline$
+%<plntx> " \def\bibfnamefont#1{#1}\fi"
+ write$ newline$
+%</nmft&fnm-def>
+%<*lab&lab-def>
+%<!plntx> "\providecommand{\citenamefont}[1]{#1}"
+%<plntx> "\expandafter\ifx\csname citenamefont\endcsname\relax"
+%<plntx> write$ newline$
+%<plntx> " \def\citenamefont#1{#1}\fi"
+ write$ newline$
+%</lab&lab-def>
+%<*(url&!harnm)|eprint>
+%<*!plntx>
+%<nfss> "\providecommand{\url}[1]{\texttt{#1}}"
+%<!nfss> "\providecommand{\url}[1]{{\tt #1}}"
+ write$ newline$
+ "\providecommand{\urlprefix}{}"
+ write$ newline$
+%</!plntx>
+%<*plntx>
+ "\expandafter\ifx\csname url\endcsname\relax"
+ write$ newline$
+%<nfss> " \def\url#1{\texttt{#1}}\fi"
+%<!nfss> " \def\url#1{{\tt #1}}\fi"
+ write$ newline$
+ "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{}\fi"
+ write$ newline$
+%</plntx>
+%</(url&!harnm)|eprint>
+%<*doi>
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
+ write$ newline$
+%<*!plntx>
+ " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+ write$ newline$
+ " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+ write$ newline$
+%</!plntx>
+%<*plntx>
+ " \expandafter\ifx\csname doi\endcsname\relax"
+ write$ newline$
+ " \def\doi#1{doi:\discretionary{}{}{}#1}\fi \else"
+ write$ newline$
+ " \expandafter\ifx\csname doi\endcsname\relax"
+ write$ newline$
+ " \def\doi{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi \fi"
+ write$ newline$
+%</plntx>
+%</doi>
+%<*url-doi&url>
+ "\providecommand{\doiprefix}{doi: }"
+ write$ newline$
+ "\expandafter\ifx\csname href\endcsname\relax"
+ write$ newline$
+ " \providecommand{\urldoi}[1]{#1}\else"
+ write$ newline$
+ " \providecommand{\urldoi}[1]{\href{https://doi.org/#1}{#1}}\fi"
+ write$ newline$
+%</url-doi&url>
+%<*lang>
+%<!plntx> "\providecommand{\selectlanguage}[1]{\relax}"
+%<*plntx>
+ "\expandafter\ifx\csname selectlanguage\endcsname\relax"
+ write$ newline$
+ " \def\selectlanguage#1{}\fi"
+%</plntx>
+ write$ newline$
+%</lang>
+%<*!plntx>
+%<*babel>
+ "\input{babelbst.tex}" write$ newline$
+ "\newcommand{\Capitalize}[1]{\uppercase{#1}}" write$ newline$
+ "\newcommand{\capitalize}[1]{\expandafter\Capitalize#1}" write$ newline$
+%</babel>
+%<*annote>
+ "\providecommand{\bibAnnoteFile}[1]{%"
+ write$ newline$
+ " \IfFileExists{#1}{\begin{quotation}\noindent\textsc{Key:} #1\\"
+ write$ newline$
+ " \textsc{Annotation:}\ \input{#1}\end{quotation}}{}}"
+ write$ newline$
+ "\providecommand{\bibAnnote}[2]{%"
+ write$ newline$
+ " \begin{quotation}\noindent\textsc{Key:} #1\\"
+ write$ newline$
+ " \textsc{Annotation:}\ #2\end{quotation}}"
+ write$ newline$
+%</annote>
+%</!plntx>
+%<*bibinfo>
+%<!plntx> "\providecommand{\bibinfo}[2]{#2}"
+%<plntx> "\expandafter\ifx\csname bibinfo\endcsname\relax\def\bibinfo#1#2{#2}\fi"
+ write$ newline$
+%</bibinfo>
+%<*eprint>
+%<!plntx> "\providecommand{\eprint}[2][]{\url{#2}}"
+%<plntx> "\expandafter\ifx\csname eprint\endcsname\relax\def\eprint#1{\url{#1}}\fi"
+ write$ newline$
+%</eprint>
+}
+%</!html>
+%<*html>
+{
+"<html><head><title>Bibliography Listing</title></head>" write$ newline$
+"<body>" write$ newline$
+"<h2>Bibliography</h2>" write$ newline$
+%<htdes>"<dl>" write$ newline$
+%<!htdes&htlist>"<ol>" write$ newline$
+}
+%</html>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+EXECUTE {begin.bib}
+% \end{macrocode}
+%
+% \begin{macrocode}
+EXECUTE {init.state.consts}
+% \end{macrocode}
+%
+% \begin{macrocode}
+ITERATE {call.type$}
+% \end{macrocode}
+%
+% \begin{macro}{`end.bib'}
+% \begin{macrocode}
+FUNCTION {end.bib}
+{ newline$
+%<!html> "\end{thebibliography}" write$ newline$
+%<html> "</dl></body></html>" write$ newline$
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+EXECUTE {end.bib}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</!head>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</!options&!driver&!bblbst>
+% \end{macrocode}
+%
+% \section{The File \texttt{babelbst.tex} for English}
+% The following contains the definitions for the \texttt{babel} language
+% selection as they apply to English. This file may be extracted with
+% \dtx{} and the option \texttt{bblbst}.
+% \begin{macrocode}
+%<*bblbst>
+ % This is babelbst.tex for English.
+ % It should serve as a model for other languages.
+ % Alternatively, store it under a different name (e.g. englbst.tex)
+ % and then \input it with a command in babelbst.tex.
+\def\bbland{and} \def\bbletal{et~al.}
+\def\bbleditors{editors} \def\bbleds{eds.}
+\def\bbleditor{editor} \def\bbled{ed.}
+\def\bbledby{edited by}
+\def\bbledition{edition} \def\bbledn{edn.}
+\def\bblvolume{volume} \def\bblvol{vol.}
+\def\bblof{of}
+\def\bblnumber{number} \def\bblno{no.}
+\def\bblin{in}
+\def\bblpages{pages} \def\bblpp{pp.}
+\def\bblpage{page} \def\bblp{p.}
+\def\bbleidpp{pages}
+\def\bblchapter{chapter} \def\bblchap{chap.}
+\def\bbltechreport{Technical Report}
+\def\bbltechrep{Tech. Rep.}
+\def\bblmthesis{Master's thesis}
+\def\bblphdthesis{Ph.D. thesis}
+\def\bblfirst{First} \def\bblfirsto{1st}
+\def\bblsecond{Second} \def\bblsecondo{2nd}
+\def\bblthird{Third} \def\bblthirdo{3rd}
+\def\bblfourth{Fourth} \def\bblfourtho{4th}
+\def\bblfifth{Fifth} \def\bblfiftho{5th}
+\def\bblst{st} \def\bblnd{nd} \def\bblrd{rd}
+\def\bblth{th}
+\def\bbljan{January} \def\bblfeb{February} \def\bblmar{March}
+\def\bblapr{April} \def\bblmay{May} \def\bbljun{June}
+\def\bbljul{July} \def\bblaug{August} \def\bblsep{September}
+\def\bbloct{October} \def\bblnov{November} \def\bbldec{December}
+%</bblbst>
+% \end{macrocode}
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/colortbl/colortbl.dtx b/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
index 076c69643a1..8e5f1e8be18 100644
--- a/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
+++ b/Master/texmf-dist/source/latex/colortbl/colortbl.dtx
@@ -15,7 +15,7 @@
%<driver>\ProvidesFile{colortbl.drv}
% \fi
% \ProvidesFile{colortbl.dtx}
- [2024/05/26 v1.0h Color table columns (DPC)]
+ [2024/07/06 v1.0i Color table columns (DPC)]
%
% \iffalse
%<*driver>
@@ -1505,9 +1505,21 @@
%
%
% longtable support.
+% \changes{v1.0i}{2024/07/06}{tagging code adjusments for longtable hline}
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% Stub tag support if tagging has not been enabled.
+% \begin{macrocode}
+\cs_if_exist:NF\tag_mc_begin:n{
+ \cs_new:Npn\tag_mc_begin:n#1{}
+ \cs_new:Npn\tag_mc_end:{}
+}
+% \end{macrocode}
+%
% \begin{macrocode}
\AtBeginDocument{
- \ifx\longtable\@undefined\else
\def\LT@@hline{%
\ifx\LT@next\hline
\global\let\LT@next\@gobble
@@ -1517,7 +1529,10 @@
\else
\gdef\CT@LT@sep{%
\multispan\LT@cols{%
- \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}%
+ \tag_mc_begin:n{artifact}
+ \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill
+ \tag_mc_end: \int_gdecr:N \g__tbl_row_int
+ }\cr}%
\fi
\else
\global\let\LT@next\empty
@@ -1526,13 +1541,20 @@
\fi
\ifnum0=`{\fi}%
\multispan\LT@cols
- {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr
+ {\tag_mc_begin:n{artifact}
+ \CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill
+ \tag_mc_end: \int_gdecr:N \g__tbl_row_int
+ }\cr
\CT@LT@sep
\multispan\LT@cols
- {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr
+ {\tag_mc_begin:n{artifact}
+ \CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill
+ \tag_mc_end: \int_gdecr:N \g__tbl_row_int
+ }\cr
\noalign{\penalty\@M}%
\LT@next}
- \fi}
+ }
+\ExplSyntaxOff
% \end{macrocode}
%
%
diff --git a/Master/texmf-dist/source/latex/delimset/delimset.dtx b/Master/texmf-dist/source/latex/delimset/delimset.dtx
index 9bd070b5ea1..337f1a4271e 100644
--- a/Master/texmf-dist/source/latex/delimset/delimset.dtx
+++ b/Master/texmf-dist/source/latex/delimset/delimset.dtx
@@ -1,6 +1,6 @@
% \iffalse
%
-% delimset.dtx Copyright (C) 2016-2018 Niklas Beisert
+% delimset.dtx Copyright (C) 2016-2024 Niklas Beisert
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -18,15 +18,15 @@
% and the derived files delimset.sty and dlmssamp.tex
%
%<package|sample>\NeedsTeXFormat{LaTeX2e}[1996/12/01]
-%<package>\ProvidesPackage{delimset}[2018/12/30 v1.1 convenient size control for delimiter sets]
-%<sample>\ProvidesFile{dlmssamp.tex}[2018/12/30 v1.1 sample for delimset]
+%<package>\ProvidesPackage{delimset}[2024/07/17 v2.0 convenient size control for delimiter sets]
+%<sample>\ProvidesFile{dlmssamp.tex}[2024/07/17 v2.0 sample for delimset]
%<*driver>
-%\ProvidesFile{delimset.drv}[2018/12/30 v1.1 delimset Reference Manual file]
+%\ProvidesFile{delimset.drv}[2024/07/17 v2.0 delimset Reference Manual file]
\PassOptionsToClass{10pt,a4paper}{article}
\documentclass{ltxdoc}
\usepackage[margin=35mm]{geometry}
-\usepackage{hyperref}
+\usepackage[hyperindex=false]{hyperref}
\usepackage{hyperxmp}
\usepackage[usenames]{color}
\usepackage{amsmath,amsfonts}
@@ -36,7 +36,7 @@
\hypersetup{pdfpagemode=UseNone}
\hypersetup{pdfsource={}}
\hypersetup{pdflang={en-UK}}
-\hypersetup{pdfcopyright={Copyright 2016-2018 Niklas Beisert.
+\hypersetup{pdfcopyright={Copyright 2016-2024 Niklas Beisert.
This work 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 version.}}
@@ -50,6 +50,8 @@
\newcommand{\secref}[1]{\hyperref[#1]{section \ref*{#1}}}
+\def\textvert{\texttt{\char"7C}}
+
\parskip1ex
\parindent0pt
\let\olditemize\itemize
@@ -67,7 +69,7 @@
{\texttt{nbeisert@itp.phys.ethz.ch}}}
\hypersetup{pdfauthor={Niklas Beisert}}
\hypersetup{pdfsubject={Manual for the LaTeX2e Package delimset}}
-\date{30 December 2018, \textsf{v1.1}}
+\date{17 July 2024, \textsf{v2.0}}
\maketitle
\begin{abstract}\noindent
@@ -99,9 +101,10 @@ For example:
\\
|(v,w)| &\to (v,w)
\\
-|\langle\psi\vert M\vert\psi\rangle| &\to \langle\psi\vert M\vert\psi\rangle
+|\langle\psi|\textvert|M|\textvert|\psi\rangle|
+&\to \langle\psi\vert M\vert\psi\rangle
\\
-|(x^2+px+q)\vert_{-p/2}| &\to (x^2+px+q)\vert_{-p/2}
+|(x^2+px+q)|\textvert|_{-p/2}| &\to (x^2+px+q)\vert_{-p/2}
\\&\ldots
\end{aligned}
\]
@@ -109,8 +112,9 @@ For example:
In order to adjust the size of delimiters, the modifiers
|\big|, |\Big|, |\bigg|, |\Bigg| are used.
More importantly the construct
-{|\left*| \ldots [|\middle*|] \ldots |\right*|}
+{|\left*| \ldots [|\middle*|] \ldots |\right*|}
adjusts the size of delimiters to the contents:
+%
\[
\Bigg[\bigg[\Big[\big[[*]\big]\Big]\bigg]\Bigg],
\qquad
@@ -150,16 +154,17 @@ the size |\big(...\big)|:
\]
The package \textsf{delimset} provides mechanisms to declare sets of delimiters
-whose size can be adjusted conveniently by simple optional parameters.
+whose size can be adjusted conveniently by adding simple flag parameters.
For example, it provides a general purpose bracket |\brk|
which can be used as follows:
+%
\[
\begin{aligned}
|\brk{A\hat{X}+B}|&\to(A\hat{X}+B)
\\
|\brk*{A\hat{X}+B}|&\to\mathopen{}\mathclose{\left(A\hat{X}+B\right)}
\\
-|\brk2{A\hat{X}+B}|&\to\Bigl(A\hat{X}+B\Bigr)
+|\brk^2{A\hat{X}+B}|&\to\Bigl(A\hat{X}+B\Bigr)
\\
|\brk!{A\hat{X}+B}|&\to\bigl(A\hat{X}+B\bigr)
\end{aligned}
@@ -198,16 +203,18 @@ the more difficult it will be to adjust them
to obtain a visually acceptable result.
The main functionality of the package is based on a
-versatile mechanism to specify sets of delimiters, e.g.:
+versatile mechanism to specify sets of delimiters,
+e.g.:
+%
\[
\begin{aligned}
|\delim<>{ax+b}|
&\to\langle ax+b\rangle
\\
-|\delimpair{[}{[.],}{[}!{a}{b}|
+|\delimpair[{*,}[!{a}{b}|
&\to \bigl[a, b\bigr[
\\
-|\delimtriple<\vert\vert>*{\psi}{A^\dagger}{\psi}|
+|\delimtriple<|\textvert\textvert|>*{\psi}{A^\dagger}{\psi}|
&\to\left\langle\psi\middle\vert A^\dagger\middle\vert \psi\right\rangle
\end{aligned}
\]
@@ -216,14 +223,14 @@ The command |\delim| can be used on the fly, but also
in definitions of custom delimiter sets such as:
%
\[
-|\newcommand{\comm}{\delimpair{[}{[.],}{]}}|
+|\newcommand{\comm}{\delimpair{[}{*,}{]}}|
\]
%
Note that the definition of |\comm| does not specify any arguments.
They are nevertheless read by the incomplete definition of |\delimpair|
-from the what follows |\comm|.
+from what follows |\comm|.
In particular, this incomplete definition
-enables the correct parsing of the optional size specifier,
+enables the correct parsing of the optional size specifier flag,
e.g.:
%
\[
@@ -238,7 +245,7 @@ The above definition could be written as follows:
\begin{aligned}
&|\DeclareMathDelimiterSet{\comm}[2]|
\\
-&\qquad |{\selectdelim[l]{[}{#1},{#2}\selectdelim[r]{]}}|
+&\qquad |{\selectdeliml{[}{#1},{#2}\selectdelimr{]}}|
\end{aligned}
\]
@@ -260,9 +267,9 @@ of the currently selected math font
Unfortunately, it does not account for
the currently selected math style.
Therefore, the size of delimiters in sub/superscripts
-cannot be adjusted appropriately,
-\unskip\footnote{Arguably, it is bad typesetting practice
-to have too complicated expressions in sub/superscripts.}
+cannot be adjusted appropriately
+(an arguably better typesetting practice is
+to avoid complicated expressions in sub/superscripts in the first place),
they come out way too big:
%
\[
@@ -272,7 +279,7 @@ they come out way too big:
This package modifies the definitions of
the size modifiers (of \textsf{amsmath})
to automatically adjust to sub/superscripts
-(subject to availability):
+(subject to availability in the font):
%
\[
\makeatletter
@@ -282,6 +289,7 @@ to automatically adjust to sub/superscripts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Spacing and Math Classes}
+\label{sec:spacing}
Another shortcoming of the variable-size delimiters is that
the spacing is noticeably different from their fixed-size counterparts:
@@ -291,12 +299,12 @@ the spacing is noticeably different from their fixed-size counterparts:
|\square(ax+b)\square|
&\to \square(ax+b)\square
\\
-|\square\left(ax+b\right)\square|
-&\to \square\left(ax+b\right)\square
-\\
|\square\bigl(ax+b\bigr)\square|
&\to \square\bigl(ax+b\bigr)\square
\\
+|\square\left(ax+b\right)\square|
+&\to \square\left(ax+b\right)\square
+\\
|\square\left(ax+\big.b\right)\square|
&\to \square\left(ax+\big.b\right)\square
\end{aligned}
@@ -328,8 +336,9 @@ For practical purposes, consistent spacing can only be achieved
by a more convenient mechanism.
On a related note, it is important to correctly specify
-the math class (|\mathopen|\hspace{0pt}/\hspace{0pt}|\mathclose|)
+the math class (such as |\mathopen| or |\mathclose|)
for the delimiters, for example:
+%
\[
\begin{aligned}
|\big(-1\big)| &\to \big(-1\big)
@@ -340,19 +349,23 @@ for the delimiters, for example:
%
The math class can also make a major difference for intermediate delimiters,
e.g.:
+%
\[
\begin{aligned}
-|\bigl\langle\psi\big\vert\psi\bigr\rangle|
-&\to \bigl\langle\psi\big\vert\psi\bigr\rangle
+|\bigl<\psi\big|\textvert|\psi\bigr>|
+&\to \bigl<\psi\big\vert\psi\bigr>
\\
-|\bigl\langle\psi\bigm\vert\psi\bigr\rangle|
-&\to \bigl\langle\psi\bigm\vert\psi\bigr\rangle
+|\bigl<\psi\mathpunct\big|\textvert|\psi\bigr>|
+&\to \bigl\langle\psi\mathpunct\big\vert\psi\bigr>
\\
-|\bigl\langle\psi\mathbin\big\vert\psi\bigr\rangle|
-&\to \bigl\langle\psi\mathbin\big\vert\psi\bigr\rangle
+|\bigl<\psi\mathinner\big|\textvert|\psi\bigr>|
+&\to \bigl\langle\psi\mathinner\big\vert\psi\bigr>
\\
-|\bigl\langle\psi\mathpunct\big\vert\psi\bigr\rangle|
-&\to \bigl\langle\psi\mathpunct\big\vert\psi\bigr\rangle
+|\bigl<\psi\mathbin\big|\textvert|\psi\bigr>|
+&\to \bigl\langle\psi\mathbin\big\vert\psi\bigr>
+\\
+|\bigl<\psi\bigm|\textvert|\psi\bigr>|
+&\to \bigl\langle\psi\bigm\vert\psi\bigr>
\end{aligned}
\]
%
@@ -364,6 +377,67 @@ of the left and right delimiters. It also offers several choices for
intermediate delimiters to take the context into account.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Compounds and Broken Lines}
+
+The mechanism provided by the package requires the delimited expression
+to appear as an uninterrupted compound. In particular, the expression cannot
+span several lines in a multi-line equation or several columns in a matrix.
+The same restriction applies to the elementary |\left| and |\right| construct.
+In cases where delimited expressions are torn apart across several blocks,
+the delimiters have to be typeset individually.
+The package offers a mechanism to display individual delimiters
+of a given delimiter set. It also assists in maintaining
+the same type and size across blocks.
+Being able to display individual delimiters of defined delimiter sets
+offers a broad range of (ab)use.
+
+Individual delimiters of a set can be selected and displayed
+by specifying appropriate flags,
+for example:
+%
+\[
+|\brk(|\to{(},\qquad
+|\brk)|\to{)}
+\]
+%
+These flags can be combined with the size specifier
+or other bracket modifiers,
+e.g.:
+%
+\[
+|\brk^3(|\to{\biggl(},\qquad
+|\brk[s]^2)|\to{\Bigr]}
+\]
+%
+This enables to conveniently split delimited expressions over blocks of code,
+e.g.:
+%
+\[
+|\brk[s]^3(\frac{A}{B}|\ldots\Big/\mkern-9mu\Big/\ldots|\frac{C}{D}\brk[s]^3)|
+\to
+\biggl[\frac{A}{B}\cdots\bigg/\mkern-12mu\bigg/\cdots\frac{C}{D}\biggr]
+\]
+%
+Here, the type and modifiers specifying the delimiter set
+are repeated for all individual delimiters.
+To simplify such expressions and their maintenance,
+the package provides global registers which store
+the type and size of delimiters.
+With those, the above expression can be abbreviated as:
+%
+\[
+|\brk[s]^3[|\ldots\big/\mkern-6mu\big/\ldots|\usedelim]|
+\quad\text{or}\quad
+|\brk[s]^3[|\ldots\big/\mkern-6mu\big/\ldots|\brk]|
+\]
+%
+Here, |\usedelim]|, alternatively |\brk]|,
+closes the delimiter set with
+the type and options previously specified by |\brk...[|.
+For nesting purposes, there also exists a more elaborate
+solution using registers, see below.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Philosophy}
Semantic typesetting is one of the philosophies behind \LaTeX{}:
@@ -435,17 +509,17 @@ Modifier letters can be prepended and appended to adjust their size.
%
A functionality of the present package
not offered by any of the above packages is
-to typeset delimiters on the fly, e.g.:
+to typeset delimiters on the fly,
+e.g.:
%
\[
-|\delim<\vert>!{\psi}{\psi}|
-\to\bigl\langle\psi\big\vert\psi\bigr\rangle
+|\delim<|\textvert|>!{\psi}{\psi}|
+\to\bigl<\psi\big\vert\psi\bigr>
\]
%
The mechanism to specify the size is leaner in the sense that it uses
only a single character and a single command.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Usage}
@@ -457,139 +531,377 @@ If not yet present,
the package \textsf{amsmath} will be loaded automatically.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Inline Usage}
-\label{sec:delimcommands}
+\subsection{Delimiter Sets and Presentation Flags}
+\label{sec:flags}
+
+The package provides commands to represent various delimiter sets,
+see \secref{sec:inline} and \secref{sec:declare} below.
+Their display can be modified systematically by specifying flags.
+A delimiter set |\|\emph{name}, e.g.\ |\brk|, is typically invoked by
+a sequence like:
+%
+\[
+|\|\emph{name}\ \emph{flags}\ |{|\emph{expr1}|}||{|\emph{expr2}|}|\ldots
+\]
+%
+where \emph{expr(n)} are the terms to be enclosed by the delimiters
+and the optional \emph{flags} adjust the presentation of delimiters.
+The \emph{flags} are described as follows:
+
+First, a size modifier flag controls the size of the delimiters
+to be displayed. It can take one of the following values:
+%
+\[
+\begin{aligned}
+|0|&\qquad \text{default size}
+\text{ (0.96 times default line height)}
+\\
+|!|, |+|, |^1|&\qquad \text{size }|\big|
+\text{ (1.2 times default line height)}
+\\
+|^2|&\qquad \text{size }|\Big|
+\text{ (1.8 times default line height)}
+\\
+|^3|&\qquad \text{size }|\bigg|
+\text{ (2.4 times default line height)}
+\\
+|^4|&\qquad \text{size }|\Bigg|
+\text{ (3.0 times default line height)}
+\\
+|^|\emph{n}, |^{|\emph{x}|}|&\qquad \text{flexible size adjustment
+(\emph{n}=|0|\ldots|9|; \emph{x}: decimal number)}
+\\
+|_{|\emph{h}|}|&\qquad \text{adjustment to absolute height \emph{h} (centred)}
+\\
+|*|&\qquad \text{variable size }|\left...\right|
+\end{aligned}
+\]
+%
+The intended delimiter size is stored as the dimension register:
+%
+\[
+|\delimsize|
+\]
+%
+It may be used to adjust spacing within the delimiter set
+proportional to the size of the delimiters.
+Note that the actual size of delimiters may deviate
+depending on availability within the given font.
+Note further that the size cannot be determined for variable-size delimiters
+(`|*|') and thus size |\Big| is assumed for this case.
+Note finally that the sub/superscript styles are not taken into
+account and |\delimsize| applies to the default case |\textstyle|.
+The package also supplies a macro to add horizontal glue
+proportional to the intended delimiter size:
+%
+\[
+|\kerndelim{|\emph{width}|}|
+\]
+%
+Here, \emph{width} is the amount of horizontal glue
+in units of mu scaled by the ratio of |\delimsize|
+and the current math font height.
+The macro does adjust for the selected script style.
+
+Second, a delimiter selection flag is used to pick out
+and display just one individual delimiter within the set.
+It can take one of the following values:
+%
+\[
+\begin{aligned}
+|(|&\qquad \text{left delimiter}
+\\
+\textvert, |,|&\qquad \text{first intermediate delimiter}
+\\
+|)|&\qquad \text{right delimiter}
+\\
+|?|\emph{n}&\qquad \text{\emph{n}-th delimiter (starting with |0|: left)}
+\end{aligned}
+\]
+
+Third, register flags store are retrieve delimiter
+for splitting the across blocks or lines:
+%
+\[
+\begin{aligned}
+|[|&\qquad \text{store delimiter type to register `|.|',
+display left delimiter (same as `|>.(|')}
+\\
+|]|&\qquad \text{display right delimiter stored in default register `|.|'
+(same as `|<.)|')}
+\\
+|>|\emph{r}, |>{|\emph{reg}|}|&\qquad \text{store delimiter type
+in register \emph{r} or \emph{reg}}
+\\
+|<|\emph{r}, |<{|\emph{reg}|}|&\qquad \text{retrieve delimiter type
+from register \emph{r} or \emph{reg}}
+\end{aligned}
+\]
+%
+A register stores the type of delimiter set (|\|\emph{name}),
+the desired size (except for variable size `|*|')
+as well as the math class of the compound (`|'|' vs. `|"|', see below).
+A stored register can be retrieved and displayed by the macro:
+%
+\[
+|\usedelim|\,\emph{r}\ \emph{sel}
+\quad\text{or}\quad
+|\usedelim|\{\emph{reg}\}\emph{sel}
+\]
+%
+Here, \emph{sel} is a flag to select an individual delimiter, see above.
+
+In addition, there are some general purpose flags:
+%
+\[
+\begin{aligned}
+|.|&\qquad \text{terminates flag processing}
+\\
+|:|&\qquad \text{enclose delimiter set in block
+(for using total box dimensions)}
+\\
+|'|&\qquad \text{render delimiter set as }|\mathopen|\text{ and }|\mathclose|
+\\
+|"|&\qquad \text{render delimiter set as }|\mathinner|
+\\
+|-|&\qquad \text{display phantom delimiters (for individual delimiters)}
+\end{aligned}
+\]
+
+Please note the following:
+%
+\begin{itemize}
+\item
+A delimiter selector (including the combined flags `|[|' and `|]|')
+terminates flag processing,
+therefore all relevant flags must be specified before it.
+\item
+Parsing also stops with the opening of the first term argument
+by means of the opening brace `|{|'.
+\item
+Parsing can also be terminated manually by specifying the flag `|.|'
+(in case the opening brace `|{|' for arguments is missing for whatever reason).
+\item
+Any other letter or token at the location of \emph{flags}
+is interpreted as an unrecognised flag and triggers a compiler error.
+For instance, |\brk{x}| must not be abbreviated as |\brk x|
+because `|x|' would be interpreted as a flag
+(it might be abbreviated as |\brk.x|).
+\item
+The legacy size modifier flags `|1|' \ldots `|4|'
+provided for backward compatibility have the same effect as `|^1|'\ldots`|^4|'.
+\item
+The phantom delimiter flag `|-|' does not work for variable size.
+It is intended for reserving space for individual delimiters
+when they are composed manually into sets (e.g.\ across lines).
+\item
+Technically, individual delimiters can be produced in the variable size version
+(even though it may defeat the purpose of the delimiter selection mechanism).
+One has to pay attention when using
+only the opening or only the closing delimiters from the package
+and counterbalancing it by direct code for the opposite side.
+This is because `|*(|' and `|*)|' do not directly translate to
+|\left|\emph{delim} and |\right|\emph{delim}
+due to proper spacing, see \secref{sec:spacing}.
+Instead, they translate to:
+%
+\[
+\begin{aligned}
+|*(|&\to|\mathopen{}\mathclose\bgroup\left|\emph{delim}
+\\
+|*)|&\to|\right|\emph{delim}|\egroup|
+\end{aligned}
+\]
+%
+One should use analogous code to complete the manual variable size block.
+
+Note that similar restrictions apply to using the flag `|:|'
+for block enclosure which uses |\bgroup| and |\egroup| as well.
+
+As it does not make much sense to use variable-size (`|*|')
+and block (`|:|') compounds for individual delimiter selection,
+the state of these flags is not stored in the global registers.
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Inline Declarations}
+\label{sec:inline}
The package provides three general purpose commands
to compose delimiter sets with one, two or three encapsulated expressions:
%
\[
\begin{aligned}
-&|\delim{|\emph{l}|}{|\emph{r}|}|\emph{size}|{|\emph{expr}|}|
+&|\delim{|\emph{l}|}{|\emph{r}|}|\emph{flags}|{|\emph{expr}|}|
\\
&|\delimpair{|\emph{l}|}{|\emph{m}|}{|\emph{r}|}|
-\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}|
+\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}|
\\
-&|\delimtriple{|\emph{l}|}{|\emph{m1}|}{|\emph{m2}|}{|\emph{r}|}|
-\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}{|\emph{expr3}|}|
+&|\delimtriple{|\emph{l}|}{|\emph{m}|}{|\emph{n}|}{|\emph{r}|}|
+\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}{|\emph{expr3}|}|
\end{aligned}
\]
%
The expression(s) \emph{expr(n)} will be surrounded by the
delimiters \emph{l} and \emph{r}
and, in the case of more than one expression,
-they will be separated by the delimiters \emph{m(n)}:
+they will be separated by the delimiters \emph{m}, \emph{n}:
+%
\[
\emph{l}\ \emph{expr}\ \emph{r},
\qquad
\emph{l}\ \emph{expr1}\ \emph{m}\ \emph{expr2}\ \emph{r},
\qquad
-\emph{l}\ \emph{expr1}\ \emph{m1}\ \emph{expr2}\
-\emph{m2}\ \emph{expr3}\ \emph{r}
+\emph{l}\ \emph{expr1}\ \emph{m}\ \emph{expr2}\
+\emph{n}\ \emph{expr3}\ \emph{r}
\]
-Here, \emph{l} and \emph{r} have to be
-math delimiters (symbols which can be used for |\left| and |\right|) or
-the dot `.' for the null delimiter.
-The separators \emph{m(n)} can be plain math delimiters as well, but they can
-also be compound expression of the form |[|\emph{class}|]|\emph{delim}
-where \emph{class} specifies
-the intended math class of the delimiter \emph{delim}:
+Here, \emph{l}, \emph{r}, \emph{m}, \emph{n}
+should be math delimiters \emph{delim}
+(elementary symbols which can be used for |\left| and |\right|)
+or the dot `|.|' for the null delimiter.
+The delimiter set expression can be adjusted in two ways:
+
+First, size adjustment
+for the delimiters \emph{l}, \emph{r}, \emph{m}, \emph{n}
+can be suppressed by a starred variant:
+%
+\[
+|{*|\emph{token}|}|
+\qquad\text{or}\qquad
+|{*{|\emph{expr}|}}|
+\]
+%
+This allows to use an arbitrary \emph{token}
+or a compound expression \emph{expr} in place of a delimiter \emph{delim}.
+This is useful when a delimiter character should not adjust in size
+(e.g.\ commas), or if a flexible-size version of the character
+is not available. One might also use a compound expression
+to create a null delimiter with non-zero width
+(the width may be specified by |\kerndelim|
+to make it proportional to the delimiter size).
+
+Second, the intended math class
+of the intermediate delimiters \emph{m}, \emph{n}
+may be adjusted in order to achieve a more appropriate automatic spacing
+by using |{[|\emph{class}|]|\emph{delim}|}|.
+Here, \emph{class} specifies
+the intended math class of the delimiter \emph{delim}
+according to:
%
\[
-\begin{aligned}{}
+\begin{aligned}
\left.\begin{array}{r}
-\emph{delim}\\|{|\emph{delim}|}|\\|{[]|\emph{delim}|}|
+\emph{delim}\\|{|\emph{delim}|}|
\end{array}\right\}
-&\qquad\text{class }|\mathord|\text{ (similar to }|\big|)
-\\
-|{[l]|\emph{delim}|}|&\qquad
-\text{class }|\mathopen|\text{ (similar to }|\bigl|
-\text{, not for use in }|\delim...|)
-\\
-|{[r]|\emph{delim}|}|&\qquad
-\text{class }|\mathclose|\text{ (similar to }|\bigr|
-\text{, not for use in }|\delim...|)
+&\qquad
+\left\{\begin{array}{l}
+\text{no glue for size-adjusted delimiters (same as }|[o]|\text{)}
\\
-|{[o]|\emph{delim}|}|&\qquad
-\text{class }|\mathopen|\text{ (similar to }|\bigl|)
+\text{determined by expression for unadjusted size (}|*|\text{ variant)}
+\end{array}\right.
\\
-|{[c]|\emph{delim}|}|&\qquad
-\text{class }|\mathclose|\text{ (similar to }|\bigr|)
-\\
-|{[m]|\emph{delim}|}|&\qquad
-\text{class }|\mathrel|\text{ (similar to }|\bigm|)
+|{[o]|\emph{delim}|}|
+&\qquad
+\text{no glue, similar to }|\big|, |\mathord|, |\mathopen|, |\mathclose|
\\
|{[p]|\emph{delim}|}|&\qquad
-\text{class }|\mathpunct|\text{ (similar to }|\bigp|)
+\text{followed by }|\thinmuskip|\text{, similar to }|\bigp|, |\mathpunct|
+\\
+|{[i]|\emph{delim}|}|&\qquad
+\text{surrounded by }|\thinmuskip|\text{, similar to }|\bigi|, |\mathinner|
\\
|{[b]|\emph{delim}|}|&\qquad
-\text{class }|\mathbin|\text{ (similar to }|\bigb|)
+\text{surrounded by }|\medmuskip|\text{, similar to }|\bigb|, |\mathbin|
\\
-|{[.]|\emph{expr}|}|&\qquad
-\text{no size adjustment, \emph{expr} can be any expression}
+|{[m]|\emph{delim}|}|&\qquad
+\text{surrounded by }|\thickmuskip|\text{, similar to }|\bigm|, |\mathrel|
\end{aligned}
\]
-%
-Note that the left and right delimiters \emph{l} and \emph{r} effectively
-have |[l]| and |[r]| prepended, respectively,
-and therefore they must be a plain math delimiter.
-Conversely, the immediate delimiters \emph{m(n)} must not
-have the |[l]| and |[r]| classes
-because the latter must appear precisely once
-and they are already taken by \emph{l} and \emph{r};
-use classes |[o]| and |[c]| instead.
-The optional size modifier \emph{size} should take one of the following values:
+Please note the following:
+%
+\begin{itemize}
+\item
+The left and right delimiters \emph{l} and \emph{r}
+are assigned to special classes:
+They leave no initial and final glue on the enclosed expressions
+(same as |\mathopen| and |\mathclose|).
+From the outside, the delimiter set appears
+either as a combination of |\mathopen|+|\mathclose| (flag `|'|')
+or as |\mathinner| (flag `|"|').
+\item
+The legacy class |[.]| provided for backward compatibility
+specifies delimiters with unadjusted size:
+the compound |{[.]|\emph{expr}|}| has the same effect as |{*{|\emph{expr}|}}|.
+\item
+The legacy class |[c]| provided for backward compatibility
+has the same effect as |[o]|.
+\item
+Unadjusted-size delimiters can be combined with math classes as:
+%
\[
-\begin{aligned}{}
-\emph{empty}, \emph{anything else}, |0|&\qquad \text{default size}
-\\
-|!|, |+|, |1|&\qquad \text{size }|\big|\text{ (|!| is preferred)}
-\\
-|2|&\qquad \text{size }|\Big|
-\\
-|3|&\qquad \text{size }|\bigg|
-\\
-|4|&\qquad \text{size }|\Bigg|
-\\
-|*|&\qquad \text{variable size }|\left...\right|
-\end{aligned}
+|{[|\emph{class}|]*|\emph{token}|}|
+\qquad\text{or}\qquad
+|{[|\emph{class}|]*{|\emph{expr}|}}|
\]
+%
+\item
+The opening square bracket `|[|'
+takes the dual role of indicating the optional |[|\emph{class}|]| argument.
+To avoid conflicts on intermediate delimiters,
+opening square bracket delimiters should be encoded as
+`|{{[}}|' (for |\delim...|) or `|{[}|' (for |\selectdelim|)
+rather than `|[|'.
+\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Declarations}
+\label{sec:declare}
The above constructs can be used to define new delimiter commands via:
%
\[
-|\newcommand{\|\emph{name}|}{\delim...{|\emph{l}|}...{|\emph{r}|}}|
+\begin{aligned}
+&|\newcommand{\|\emph{name}|}{\delim{|\emph{l}|}{|\emph{r}|}|
+\emph{flags}|}|
+\\
+&|\newcommand{\|\emph{name}|}{\delimpair{|\emph{l}|}{|\emph{m}|}{|\emph{r}|}|
+\emph{flags}|}|
+\\
+&|\newcommand{\|\emph{name}|}{\delimtriple{|\emph{l}|}{|\emph{m}|}|
+|{|\emph{n}|}{|\emph{r}|}|\emph{flags}|}|
+\end{aligned}
\]
%
-Here it makes sense to drop all arguments starting
-with the size modifier \emph{size} from the definition.
+Here it makes sense to drop all arguments
+starting at the optional \emph{flags} argument from the definition.
The \TeX{} parsing mechanism will then automatically
use the tokens following |\|\emph{name} including the optional size modifier.
-If the encapsulated expression(s) are to be passed as explicit arguments
-to |\|\emph{name}, one will have to find an alternative way to pass the
-optional size argument.
+If any of the encapsulated expression(s) are to be passed as
+explicit arguments to |\|\emph{name},
+one will have to find an alternative way to pass \emph{flags}.
+However, it is possible to predefine \emph{flags}
+which can be overridden by further \emph{flags} specified by the user.
The above declarations via |\delim...|
-should be sufficient for almost all situations.
+should be sufficient for most situations.
However, there is an even more flexible way to declare delimiter sets:
+%
\[
-|\DeclareMathDelimiterSet{\|\emph{name}|}[|\emph{narg}|]{|\emph{expr}|}|
+|\DeclareMathDelimiterSet{\|\emph{name}|}[|\emph{narg}|]{|\emph{compositor}|}|
\]
%
The syntax of this command is equivalent to the one of |\newcommand|.
The difference is that the command |\|\emph{name} first looks
-for the optional size modifier \emph{size} as
-described above in \secref{sec:delimcommands}.
-It remembers the desired size for evaluating the macro \emph{expr}.
+for the \emph{flags} argument as
+described above in \secref{sec:inline}.
+It remembers the desired size for evaluating
+the macro expression \emph{compositor}.
Then it parses the arguments as if the command
was declared by |\newcommand|.
-As usual, the macro \emph{expr} contains the command arguments
+As usual, the macro expression \emph{compositor} contains the command arguments
specified by |#1|, |#2|, \ldots. Note that these should
be encapsulated in groups |{#1}|, |{#2}|, \ldots,
in order to prevent them from overwriting definitions
@@ -598,16 +910,108 @@ It should also contain the desired math delimiters
specified by:
%
\[
-|\selectdelim[|\emph{class}|]{|\emph{delim}|}|
+\begin{aligned}
+&|\selectdeliml|[|*|]|{|\emph{delim}|}|
+\\
+&|\selectdelim[|\emph{class}|]|[|*|]|{|\emph{delim}|}|
+\\
+&|\selectdelimr|[|*|]|{|\emph{delim}|}|
+\end{aligned}
\]
%
+The three commands must be in proper sequence
+starting with |\selectdeliml| followed by arbitrarily many
+|\selectdelim| and terminated by |\selectdelimr|.
+The math classes \emph{class} and starred variants
+are defined analogously to \secref{sec:inline}.
Here, the sizes are adjusted automatically
-according to the previously specified modifier \emph{size}.
-The math classes must be in proper sequence,
-i.e.\ the first and last ones must be |l| and |r|, respectively,
-while the intermediate ones can be anything by |l| and |r|,
-see \secref{sec:delimcommands}.
+according to the previously specified modifier.
+
+Picking out individual delimiters from a set
+declared by |\DeclareMathDelimiterSet|
+cannot be achieved automatically.
+Instead, a selector method may be specified manually (where needed) by:
+%
+\[
+\begin{aligned}
+&|\DeclareMathDelimiterSel{\|\emph{name}|}|
+\\
+&| {\selectdeliml{|\emph{l}|}|[|\||or\selectdelim{|\emph{m}|}|\ldots]|}|
+\\
+&| {\selectdelimr{|\emph{r}|}}|
+\end{aligned}
+\]
+%
+As many intermediate delimiters as needed can be specified
+at the end of the first argument; each one must start with `|\||or|'.
+
+\makeatletter
+For example, one might declare a set of double square brackets
+$[\kern-0.06\big@size[*]\kern-0.06\big@size]$ using:
+\makeatother
+%
+\[
+\begin{aligned}
+&|\DeclareMathDelimiterSet{\dsb}[1]|
+\\
+&| {\selectdeliml{[}\kerndelim{-1.75}\selectdelim[o]{[}{#1}|
+\\
+&| \selectdelim[o]{]}\kerndelim{-1.75}\selectdelimr{]}}|
+\end{aligned}
+\]
+%
+Here, the command |\kerndelim{-1.75}| reduces the spacing
+between the two square brackets by approximately 1.75\,mu in default size.
+This could be used for:
+%
+\[
+\makeatletter
+|\dsb^4{\dsb^3{\dsb^2{\dsb^1{\dsb{*}}}}}|
+\to
+\Biggl[\kern-0.20\big@size\Biggl[
+\biggl[\kern-0.16\big@size\biggl[
+\Bigl[\kern-0.12\big@size\Bigl[
+\bigl[\kern-0.08\big@size\bigl[
+[\kern-0.06\big@size[*
+]\kern-0.06\big@size]
+\bigr]\kern-0.08\big@size\bigr]
+\Bigr]\kern-0.12\big@size\Bigr]
+\biggr]\kern-0.16\big@size\biggr]
+\Biggr]\kern-0.20\big@size\Biggr],
+\quad
+|\dsb*|\ldots\to
+\left[\kern-0.12\big@size\middle[\frac{x}{y}
+\middle]\kern-0.12\big@size\right]
+\makeatother
+\]
+%
+An appropriate selector method for displaying individual
+delimiters reads:
+%
+\[
+\begin{aligned}
+&|\DeclareMathDelimiterSel{\dsb}|
+\\
+&| {\selectdeliml{[}\kerndelim{-1.75}\selectdelim[o]{[}}|
+\\
+&| {\selectdelim[o]]\kerndelim{-1.75}\selectdelimr{]}}|
+\end{aligned}
+\]
+Finally, towards a very flexible manual composition
+of delimiter sets, there is the macro:
+%
+\[
+|\parsedelimflags{|\emph{compositor}|}{|\emph{selector}|}|\emph{flags}
+\]
+%
+It parses the modifier flags as described in \secref{sec:flags}.
+The argument \emph{compositor} is code that displays the
+composited delimiter set whereas \emph{selector} is a macro
+that displays the delimiter number |\selecteddelim| of the set.
+The \emph{flags} follow immediately and should be terminated by
+an opening brace `|{|', the terminating flag `|.|'
+or a delimiter selection flag.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Default Declarations}
@@ -617,30 +1021,34 @@ The package predefines four commonly used sets of delimiters:
%
\begin{itemize}
\item
-|\brk[|\emph{type}|]|\emph{size}|{|\emph{expr}|}| represents
+|\brk[|\emph{type}|]|\emph{flags}|{|\emph{expr}|}| represents
a standard bracket around a single expression \emph{expr}.
The type of bracket can be specified by the optional
argument \emph{type}:
+%
\[
\text{\emph{empty} or |[r]|: round }(x),\quad
\text{|[s]|: square }[x],\quad
\text{|[c]|: curly }\{x\},\quad
\text{|[a]|: angle }\langle x\rangle
\]
+%
\item
-|\eval[|\emph{type}|]|\emph{size}|{|\emph{expr}|}| represents
+|\eval[|\emph{type}|]|\emph{flags}|{|\emph{expr}|}| represents
evaluation of a functional expression \emph{expr}.
The type of bracket can be specified by the optional
argument \emph{type}:
+%
\[
\text{\emph{empty} or |[v]|: }f(x)\vert_{a},\qquad
\text{|[s]|: }[f(x)]_{a}^{b}
\]
+%
\item
-|\abs|\emph{size}|{|\emph{expr}|}| represents
+|\abs|\emph{flags}|{|\emph{expr}|}| represents
the absolute value $\lvert\emph{expr}\rvert$.
\item
-|\norm|\emph{size}|{|\emph{expr}|}| represents
+|\norm|\emph{flags}|{|\emph{expr}|}| represents
the norm $\lVert\emph{expr}\rVert$.
\end{itemize}
%
@@ -651,19 +1059,20 @@ The package also defines some extended sets of delimiters as follows:
%
\begin{itemize}
\item
-|\pair|\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
+|\pair|\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
a pair(ing) $(\emph{expr1},\emph{expr2})$.
\item
-|\set|\emph{size}|{|\emph{expr}|}| represents
+|\set|\emph{flags}|{|\emph{expr}|}| represents
the set $\{\emph{expr}\}$.
\item
-|\setcond|\emph{size}|{|\emph{expr}|}{|\emph{cond}|}| represents
+|\setcond|\emph{flags}|{|\emph{expr}|}{|\emph{cond}|}| represents
a set with condition $\{\emph{expr}\vert\emph{cond}\}$.
\item
-|\intv[|\emph{type}|]|\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
+|\intv[|\emph{type}|]|\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
an interval from \emph{expr1} to \emph{expr2}.
The in/\hspace{0pt}exclusion of the bounds can be specified by the optional
argument \emph{type}:
+%
\[
\text{\emph{empty} or |[c]|: closed }[a,b],\qquad
\text{|[o]|: open }]a,b[,\qquad
@@ -673,28 +1082,35 @@ argument \emph{type}:
\text{|[r]|: right-open }[a,b[
\end{array}
\]
+%
\item
-|\avg|\emph{size}|{|\emph{expr}|}| represents
+|\avg|\emph{flags}|{|\emph{expr}|}| represents
some average $\langle\emph{expr}\rangle$.
\item
-|\corr|\emph{size}|{|\emph{expr}|}| represents
+|\corr|\emph{flags}|{|\emph{expr}|}| represents
some correlator $\langle\emph{expr}\rangle$.
\item
-|\comm|\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
+|\comm|\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
the commutator $[\emph{expr1},\emph{expr2}]$.
\item
-|\acomm|\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
+|\acomm|\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
the anti-commutator $\{\emph{expr1},\emph{expr2}\}$.
\item
-|\bra|\emph{size}|{|\emph{expr}|}| represents
+|\bra|\emph{flags}|{|\emph{expr}|}| represents
a bra-vector $\langle\emph{expr}\rvert$ in quantum mechanics.
\item
-|\ket|\emph{size}|{|\emph{expr}|}| represents
+|\ket|\emph{flags}|{|\emph{expr}|}| represents
a ket-vector $\lvert\emph{expr}\rangle$ in quantum mechanics.
\item
-|\setcond|\emph{size}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
+|\braket|\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}| represents
a bra-ket contraction $\langle\emph{expr1}\vert\emph{expr2}\rangle$.
+\item
+|\lfrac[|\emph{type}|]|\emph{flags}|{|\emph{expr1}|}{|\emph{expr2}|}| describes
+the linear representation $\emph{expr1}/\emph{expr2}$ of a fraction.
+An optional argument \emph{type} taking values |[r]|, |[s]|, |[c]|, |[a]| encloses the
+fraction in round, square, curly or angle brackets as for |\brk|.
\end{itemize}
+%
The extended definitions need to be activated by
the package option |extdef|, see \secref{sec:packageoptions}.
@@ -707,10 +1123,10 @@ or taste of the user, they can be redefined with |\renewcommand|.
In addition to the |\bigl|, |\bigr| and |\bigm| commands
(as well as their |\Big.|, |\bigg.| and |\Bigg.| counterparts),
-the package defines two additional sets |\bigp| and |\bigb|
+the package defines three additional sets |\bigp|, |\bigb| and |\bigi|
(and counterparts).
-Here |\bigp| implies the math class |\mathpunct|
-and |\bigb| the class |\mathbin|.
+Here |\bigp| implies the math class |\mathpunct|,
+|\bigb| the class |\mathbin| and |\bigi| the class |\mathinner|.
Furthermore, the package overloads the size calculation in the |\big...|
commands to properly account for the math styles in sub/superscripts
@@ -722,7 +1138,8 @@ the package option |scriptstyle|, see \secref{sec:packageoptions}.
\subsection{Package Options}
\label{sec:packageoptions}
-Options can be passed to the package by
+Options can be passed to the package by:
+%
\[
|\usepackage[|\emph{opts}|]{delimset}|
\qquad
@@ -735,17 +1152,17 @@ Here \emph{opts} is a comma-separated list of the available options:
%
\begin{itemize}
\item
-|stddef|[|=true|$\vert$|false|]
+|stddef|[|=true|\textbar|false|]
controls the activation of standard delimiter definitions specified in
\secref{sec:defaultcommands}.
If no value is given |true| is assumed; initially set to |true|.
\item
-|extdef|[|=true|$\vert$|false|]
+|extdef|[|=true|\textbar|false|]
controls the activation of extended delimiter definitions specified in
\secref{sec:defaultcommands}.
If no value is given |true| is assumed; initially set to |false|.
\item
-|scriptstyle|[|=true|$\vert$|false|]
+|scriptstyle|[|=true|\textbar|false|]
controls the overwriting of size modifiers explained
in \secref{sec:auxcommands}.
If no value is given |true| is assumed; initially set to |true|.
@@ -758,7 +1175,7 @@ If no value is given |true| is assumed; initially set to |true|.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Copyright}
-Copyright \copyright{} 2016--2018 Niklas Beisert
+Copyright \copyright{} 2016--2024 Niklas Beisert
This work may be distributed and/or modified under the
conditions of the \LaTeX{} Project Public License, either version 1.3
@@ -808,7 +1225,7 @@ distribution, e.g.\ \textit{texmf-root}|/tex/latex/delimset|.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Interaction with CTAN Packages}
-The package relies on other packages:
+The package is related to other packages available at CTAN:
\begin{itemize}
\item
This package relies on some functionality of the package \textsf{amsmath}
@@ -820,24 +1237,63 @@ This package uses the package \textsf{keyval} from the \textsf{graphics} bundle
to process optional arguments to the package options.
Compatibility with the \textsf{keyval} package
has been tested with v1.15 (2014/10/28).
+\item
+The package \textsf{icomma} modifies the spacing behaviour
+of the comma character in math mode
+which leads to inadequate spacing when it is used as a middle delimiter.
+To achieve proper spacing in sample code,
+use |{[p]*,}| rather than |{*,}|.
+The extended commands |\intv|, |\comm|, |\acomm| and |\pair|
+are compatible with the \textsf{icomma} package
+has been tested with v2.0 (2002/03/10).
\end{itemize}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\subsection{Feature Suggestions}
-% specify width of null delimiter?
-% automatic nesting of bracket types?
% make optional arguments work for DeclareMathDelimiterSet?
-% add pfrac for fraction a/b in text mode
+% (must go before parsing, but how to process and react?)
+% make unadjusted size have right height
+% automatic nesting of bracket types? -> depth stack?
% handle cramped style properly (perhaps impossible)
-% outer decorations for delimiters e.g. _y<a,b>_x
-% freestyle delimiter with size adjustment replacement \size{\rangle}_x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Revision History}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\paragraph{v2.0:} 2024/07/17
+
+\begin{itemize}
+\item
+option to display individual delimiters
+and to store them in global registers across blocks
+(columns, lines, etc.)
+\item
+more general handling of unadjusted-size delimiters
+\item
+more general size adjustments
+\item
+added inner math class for intermediate delimiters
+\item
+added flag to enclose by open/close and inner math class
+\item
+added flag to display phantom delimiters
+\item
+selected size accessible by |\delimsize|
+and add proportional kerning by |\kerndelim|.
+\item
+added extended definition |\lfrac| for plain inline fractions
+\item
+null delimiter now properly has zero width for variable size
+\item
+internal mechanisms revised
+\item
+compatibility with \textsf{icomma} package
+(thanks to Olivier Godin for pointing out the issue)
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\paragraph{v1.1:} 2018/12/30
\begin{itemize}
@@ -914,11 +1370,11 @@ standard definitions
sizes for default brackets:
% \begin{macrocode}
\[
-\brk0{x},\quad
-\brk1{x},\quad
-\brk2{x},\quad
-\brk3{x},\quad
-\brk4{x}
+\brk^0{x},\quad
+\brk^1{x},\quad
+\brk^2{x},\quad
+\brk^3{x},\quad
+\brk^4{x}
\]
% \end{macrocode}
@@ -935,7 +1391,7 @@ styles for default brackets:
nested brackets:
% \begin{macrocode}
\[
-\brk[c]2{\brk[s]!{\brk{ax+b}x+c}x+d}
+\brk[c]^2{\brk[s]!{\brk{ax+b}x+c}x+d}
\]
% \end{macrocode}
@@ -952,7 +1408,7 @@ default absolute value, norm and default evaluations:
outer delimiter spacing:
% \begin{macrocode}
\begin{align*}
-&\square\brk0{x}\square,&&\square\brk1{A^k}\square,
+&\square\brk^0{x}\square,&&\square\brk^1{A^k}\square,
\\
&\square\brk*{x}\square,&&\square\brk*{A^k}\square
\end{align*}
@@ -969,7 +1425,7 @@ e^{\brk!{ax+b}}
delimiter declaration:
% \begin{macrocode}
\DeclareMathDelimiterSet{\braket}[2]
- {\selectdelim[l]<#1\selectdelim|#2\selectdelim[r]>}
+ {\selectdeliml<#1\selectdelim|#2\selectdelimr>}
\[
\braket!{\psi}{\psi},
\quad
@@ -988,32 +1444,36 @@ conditional set, alternative layouts:
% \begin{macrocode}
\[
\delimpair\{{[m]|}\}!{2n}{n\in\mathbb{Z}},
-\qquad
+\quad
\delimpair\{{[b]|}\}!{2n}{n\in\mathbb{Z}},
-\qquad
+\quad
+\delimpair\{{[i]|}\}!{2n}{n\in\mathbb{Z}},
+\quad
\delimpair\{{[p]|}\}!{2n}{n\in\mathbb{Z}},
-\qquad
+\quad
\delimpair\{|\}!{2n}{n\in\mathbb{Z}},
-\qquad
-\delimpair\{{[.];}\}!{2n}{n\in\mathbb{Z}}
+\quad
+\delimpair\{{*;}\}!{2n}{n\in\mathbb{Z}}
\]
conditional set, alternative layouts with variable size:
\[
\delimpair\{{[m]|}\}*{2n}{n\in\mathbb{Z}\big.},
-\qquad
+\quad
\delimpair\{{[b]|}\}*{2n}{n\in\mathbb{Z}\big.},
-\qquad
+\quad
+\delimpair\{{[i]|}\}*{2n}{n\in\mathbb{Z}\big.},
+\quad
\delimpair\{{[p]|}\}*{2n}{n\in\mathbb{Z}\big.},
-\qquad
+\quad
\delimpair\{|\}*{2n}{n\in\mathbb{Z}\big.},
-\qquad
-\delimpair\{{[.];}\}*{2n}{n\in\mathbb{Z}\big.}
+\quad
+\delimpair\{{*;}\}*{2n}{n\in\mathbb{Z}\big.}
\]
% \end{macrocode}
delimiter definition:
% \begin{macrocode}
-\newcommand{\comm}{\delimpair[{[.],}]}
+\newcommand{\comm}{\delimpair[{*,}]}
\[
\comm!{\comm{A}{B}}{C}
+\comm!{\comm{B}{C}}{A}
@@ -1024,7 +1484,7 @@ delimiter definition:
alternative representation:
% \begin{macrocode}
-\renewcommand{\comm}{\delimpair[{[.];}]}
+\renewcommand{\comm}{\delimpair[{*;}]}
\[
\comm!{\comm{A}{B}}{C}
+\comm!{\comm{B}{C}}{A}
@@ -1033,6 +1493,31 @@ alternative representation:
\]
% \end{macrocode}
+display individual delimiters of a set:
+% \begin{macrocode}
+\renewcommand{\braket}{\delimpair<|>}
+\[
+\braket{A}{B}
+\to \braket( A \braket| B \braket),
+\quad
+\braket*( A\big. \braket*| B_{} \braket*),
+\quad
+\braket^1( A \braket^3| B \braket^2)
+\]
+% \end{macrocode}
+
+placing indices before a bracket
+(does not work in variable-size mode because
+the final size is not available for the enclosed expressions):
+% \begin{macrocode}
+\DeclareMathDelimiterSet{\quadindex}[5]
+ {\selectdeliml.^{#2}_{#3}\mathord{}\selectdelim[o][
+ {#1}\selectdelim[o]]^{#4}_{#5}\selectdelimr.}
+\[
+\quadindex^2{\frac{x}{y}}{1}{2}{3}{4}
+\]
+% \end{macrocode}
+
% end of document body:
% \begin{macrocode}
\end{document}
@@ -1057,6 +1542,7 @@ alternative representation:
% if not yet present.
% \textsf{amsmath} is used for basic delimiter size functionality.
% \textsf{keyval} is used for extended options processing.
+%
% \begin{macrocode}
\RequirePackage{amsmath}
\RequirePackage{keyval}
@@ -1067,6 +1553,7 @@ alternative representation:
%
% The package has some boolean \textsf{keyval} options
% which can be set to |true| or |false|.
+%
% \begin{macrocode}
\newif\ifdlm@std\dlm@stdtrue
\newif\ifdlm@ext\dlm@extfalse
@@ -1083,7 +1570,7 @@ alternative representation:
% \end{macrocode}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \paragraph{Internal Definitions.}
+% \paragraph{Improved Size Adjustments.}
%
% Overwrite the \textsf{amsmath} command |\bBigg@|
% to select the size according to the present math style
@@ -1105,102 +1592,269 @@ alternative representation:
\fi
% \end{macrocode}
-% Define punctuation marks (|\bigp|, etc.)
-% and binary operators (|\bigb|, etc.).
+% Define punctuation marks (|\bigp|, etc.),
+% binary operators (|\bigb|, etc.)
+% and inner class (|\bigi|, etc.).
%
% \begin{macrocode}
-\newcommand{\bigp}{\mathpunct\big}
-\newcommand{\Bigp}{\mathpunct\Big}
-\newcommand{\biggp}{\mathpunct\bigg}
-\newcommand{\Biggp}{\mathpunct\Bigg}
-\newcommand{\bigb}{\mathbin\big}
-\newcommand{\Bigb}{\mathbin\Big}
-\newcommand{\biggb}{\mathbin\bigg}
-\newcommand{\Biggb}{\mathbin\Bigg}
+\providecommand{\bigp}{\mathpunct\big}
+\providecommand{\Bigp}{\mathpunct\Big}
+\providecommand{\biggp}{\mathpunct\bigg}
+\providecommand{\Biggp}{\mathpunct\Bigg}
+\providecommand{\bigb}{\mathbin\big}
+\providecommand{\Bigb}{\mathbin\Big}
+\providecommand{\biggb}{\mathbin\bigg}
+\providecommand{\Biggb}{\mathbin\Bigg}
+\providecommand{\bigi}{\mathinner\big}
+\providecommand{\Bigi}{\mathinner\Big}
+\providecommand{\biggi}{\mathinner\bigg}
+\providecommand{\Biggi}{\mathinner\Bigg}
% \end{macrocode}
-% Define size selectors for standard size (|dlm@norm|),
-% variable size (|dlm@var|).
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Size Adjustment Definitions.}
+%
+% The macro |\dlm@setvar| enables variable size,
+% the macro |\dlm@setsize| sets a fixed size.
+% Delimiter sizes are implented by |\dlm@big@|.
+% The macro |\kerndelim| adds some kerning proportional
+% to the chosen fixed size of the delimiters
+% (the spacing is merely an approximation,
+% and it does not actually scale for flexible size).
+%
+% \begin{macrocode}
+\newlength\delimsize
+\newcommand{\dlm@setvar}{\let\dlm@ifvar\@firstoftwo\delimsize1.5\big@size}
+\newcommand{\dlm@setsize}[1]{\let\dlm@ifvar\@secondoftwo%
+ \delimsize#1\big@size\advance\delimsize by\big@size\delimsize0.5\delimsize}
+\newcommand{\dlm@setabssize}[1]{\let\dlm@ifvar\@secondoftwo\delimsize#1\relax}
+\newcommand{\dlm@big@}[1]{{\mathchoice%
+ {\dlm@big@choice{\displaystyle}{1}{#1}}%
+ {\dlm@big@choice{\textstyle}{1}{#1}}%
+ {\dlm@big@choice{\scriptstyle}{0.7}{#1}}%
+ {\dlm@big@choice{\scriptscriptstyle}{0.5}{#1}}}}
+\newcommand{\dlm@big@choice}[3]{\@mathmeasure\z@{\nulldelimiterspace\z@}%
+ {#1\left#3\vcenter to#2\delimsize{}\right.}\box\z@}
+\newcommand{\kerndelim}[1]{{\delimsize#1\delimsize%
+ \mkern\muexpr1.2mu*\delimsize/\big@size\relax}}
+% \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Math Classes Processing.}
+%
+% Define class selectors for fixed and unadjusted sizes.
%
% \begin{macrocode}
+\newcommand{\dlm@big}[2]{\dlm@plain{#1}{\dlm@big@#2}}
+\newcommand{\dlm@plain}[2]{\dlm@class{#1}{\dlm@phantom{#2}}}
\newcommand{\dlm@class}[1]{\csname dlm@class@#1\endcsname}
-\newcommand{\dlm@class@}{}
-\newcommand{\dlm@class@l}{\mathopen}
-\newcommand{\dlm@class@r}{\mathclose}
-\newcommand{\dlm@class@o}{\mathopen}
-\newcommand{\dlm@class@c}{\mathclose}
-\newcommand{\dlm@class@m}{\mathrel}
-\newcommand{\dlm@class@p}{\mathpunct}
-\newcommand{\dlm@class@b}{\mathbin}
-\newcommand{\dlm@norm}[1]{\dlm@class{#1}\bBigg@{0.0}}
-\newcommand{\dlm@big}[1]{\dlm@class{#1}\big}
-\newcommand{\dlm@Big}[1]{\dlm@class{#1}\Big}
-\newcommand{\dlm@bigg}[1]{\dlm@class{#1}\bigg}
-\newcommand{\dlm@Bigg}[1]{\dlm@class{#1}\Bigg}
+\let\dlm@class@\@firstofone
+\let\dlm@class@o\mathord
+\let\dlm@class@c\mathord
+\let\dlm@class@p\mathpunct
+\let\dlm@class@i\mathinner
+\let\dlm@class@b\mathbin
+\let\dlm@class@m\mathrel
+% \end{macrocode}
+
+% Define class selector for variable size.
+% The macro |\dlm@var@null| removes the extra space from
+% variable-size null delimiters
+% (|\left.|, |\middle.| and |\right.| apply the value
+% of |\nulldelimiterspace| only at the end of math processing,
+% even across blocks).
+% The macro |\dlm@var@kern| applies kerning unless in the script styles.
+%
+% \begin{macrocode}
+\newcommand{\dlm@var@null}[1]{\if.#1\kern-\nulldelimiterspace\fi}
+\newcommand{\dlm@var@kern}[1]{\nonscript\mkern#1}
\newcommand{\dlm@var}[1]{\csname dlm@var@#1\endcsname}
-\newcommand{\dlm@var@}[1]{\middle#1}
-\newcommand{\dlm@var@l}[1]{\mathopen{}\mathclose\bgroup\left#1}
-\newcommand{\dlm@var@r}[1]{\right#1\egroup}
-\newcommand{\dlm@var@o}[1]{\mathopen{}\middle#1\mathopen{}}
-\newcommand{\dlm@var@c}[1]{\mathclose{}\middle#1\mathclose{}}
-\newcommand{\dlm@var@m}[1]{\mathrel{}\middle#1\mathrel{}}
-\newcommand{\dlm@var@p}[1]{\middle#1\mathpunct{}}
-\newcommand{\dlm@var@b}[1]{\mathbin{}{}\mkern-\medmuskip%
- \middle#1\mkern-\medmuskip{}\mathbin{}}
+\newcommand{\dlm@var@}[1]{\dlm@var@null#1\middle#1}
+\let\dlm@var@o\dlm@var@
+\let\dlm@var@c\dlm@var@
+\newcommand{\dlm@var@p}[1]{\dlm@var@#1\dlm@var@kern\thinmuskip}
+\newcommand{\dlm@var@i}[1]{\dlm@var@kern\thinmuskip%
+ \dlm@var@#1\dlm@var@kern\thinmuskip}
+\newcommand{\dlm@var@b}[1]{\dlm@var@kern\medmuskip%
+ \dlm@var@#1\dlm@var@kern\medmuskip}
+\newcommand{\dlm@var@m}[1]{\dlm@var@kern\thickmuskip%
+ \dlm@var@#1\dlm@var@kern\thickmuskip}
+% \end{macrocode}
+
+% Definitions for selecting outer math class
+% |\mathopen|+|\mathclose| vs. |\mathinner|.
+%
+% \begin{macrocode}
+\newcommand{\dlm@open@i}{\mathinner{}\mathclose{}\mathopen}
+\newcommand{\dlm@close@i}{\mathclose{}\mathopen{}\mathinner}
+\newcommand{\dlm@inner@oc}{\mathopen{}\mathclose}
+\newcommand{\dlm@enclose@openclose}{%
+ \let\dlm@open\mathopen\let\dlm@close\mathclose\let\dlm@inner\dlm@inner@oc}
+\newcommand{\dlm@enclose@inner}{%
+ \let\dlm@open\dlm@open@i\let\dlm@close\dlm@close@i\let\dlm@inner\mathinner}
+% \end{macrocode}
+
+% Definitions for selecting inline vs. block insertion.
+%
+% \begin{macrocode}
+\newcommand{\dlm@inline@l}[1]{\dlm@open{#1}}
+\newcommand{\dlm@inline@r}[1]{\dlm@close{#1}}
+\newcommand{\dlm@block@l}[1]{\dlm@inner\bgroup\mathopen{#1}}
+\newcommand{\dlm@block@r}[1]{\mathclose{#1}\egroup}
+\newcommand{\dlm@enclose@inline}{%
+ \let\dlm@class@l\dlm@inline@l\let\dlm@class@r\dlm@inline@r}
+\newcommand{\dlm@enclose@block}{%
+ \let\dlm@class@l\dlm@block@l\let\dlm@class@r\dlm@block@r}
+% \end{macrocode}
+
+% Opening and closing definitions.
+%
+% \begin{macrocode}
+\newcommand{\dlm@plain@l}[1]{\dlm@class@l{\dlm@phantom{#1}}}
+\newcommand{\dlm@plain@r}[1]{\dlm@class@r{\dlm@phantom{#1}}}
+\newcommand{\dlm@big@l}[1]{\dlm@plain@l{\dlm@big@#1}}
+\newcommand{\dlm@big@r}[1]{\dlm@plain@r{\dlm@big@#1}}
+\newcommand{\dlm@var@l}[1]{\dlm@inner\bgroup\dlm@var@null#1\left#1}
+\newcommand{\dlm@var@r}[1]{\right#1\dlm@var@null#1\egroup}
+\newcommand{\dlm@var@pl}[1]{\dlm@var@l.\mathopen{#1}}
+\newcommand{\dlm@var@pr}[1]{\mathclose{#1}\dlm@var@r.}
+% \end{macrocode}
+
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \paragraph{Delimiter Storage.}
+%
+% Macros for storing and retrieving delimiter types using global registers.
+%
+% \begin{macrocode}
+\newcommand{\dlm@reg@save@init}[1]{%
+ \xdef#1{\delimsize\the\delimsize}\ifx\dlm@inner\mathinner%
+ \expandafter\gdef\expandafter#1\expandafter{#1\dlm@enclose@inner}\fi}
+\newcommand{\dlm@reg@save}[2]{%
+ \expandafter\dlm@reg@save@init\csname dlm@reg@init@#1\endcsname%
+ \expandafter\gdef\csname dlm@reg@sel@#1\endcsname{#2}}
+\newcommand{\dlm@reg@init}[1]{\csname dlm@reg@init@#1\endcsname}
+\newcommand{\dlm@reg@sel}[1]{\csname dlm@reg@sel@#1\endcsname}
% \end{macrocode}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \paragraph{Optional Size Argument Processing.}
+% \paragraph{Flags Processing.}
%
-% Parse the optional argument following |\delim|\ldots\
-% commands to specify the size of delimiters.
-% If the next character in line begins a group (`|{|') it is assumed that
-% there is no optional argument.
-% Otherwise the selected size is written to |\dlm@arg|.
-% Unspecified or unknown sizes default to normal size.
-% Finally, execute the code passed as an explicit argument to |\dlm@parsesize|.
+% The macro |\parsedelimflags| parses the optional argument(s)
+% following |\delim|\ldots\ commands to adjust the presentation.
+% Parsing is terminated if the next character in line begins a group (`|{|')
+% and the delimiter set is composed by executing argument |#1|.
+% A size flag is stored and parsing continues.
+% A delimiter selector flag immediately displays the desired delimiter
+% by executing argument |#2|.
+% Unknown flags produce an error message.
%
% \begin{macrocode}
-\newcommand{\dlm@parsesize}[1]{\@ifnextchar\bgroup%
- {\dlm@parsesize@{#1}{0}}{\dlm@parsesize@{#1}}}
-\newcommand{\dlm@parsesize@}[2]{\let\dlm@arg\dlm@norm%
- \if0#2\let\dlm@arg\dlm@norm\fi%
- \if1#2\let\dlm@arg\dlm@big\fi%
- \if+#2\let\dlm@arg\dlm@big\fi%
- \if!#2\let\dlm@arg\dlm@big\fi%
- \if2#2\let\dlm@arg\dlm@Big\fi%
- \if3#2\let\dlm@arg\dlm@bigg\fi%
- \if4#2\let\dlm@arg\dlm@Bigg\fi%
- \if*#2\let\dlm@arg\dlm@var\fi%
- #1}
+\newcommand{\parsedelimflags}{\dlm@setsize{0.6}\let\dlm@phantom\@firstofone%
+ \dlm@enclose@openclose\dlm@enclose@inline\dlm@parseflags}
+\newcommand{\dlm@parseflags}[2]{%
+ \@ifnextchar\bgroup{#1}{\dlm@parseflag{#1}{#2}}}
+\newcommand{\dlm@parseflag}[3]{\begingroup%
+ \ifcsname dlm@parseflag@\string#3\endcsname%
+ \def\dlm@do{\csname dlm@parseflag@\string#3\endcsname{#1}{#2}}\else%
+ \def\dlm@do{\PackageError{delimset}%
+ {unknown delimiter set flag `\string#3'}{}#1}%
+ \fi\expandafter\endgroup\dlm@do}
+\newcommand{\dlm@parsedef}[3]{%
+ \expandafter\def\csname dlm@parseflag@\string#1\endcsname ##1##2#2{#3}}
% \end{macrocode}
+%
% Note that the delimited expression should be contained within a group
% such that nested delimiters will not overwrite the outer size definition.
+% Flags to adjust size.
+% Note that sizes 0 and 1 amount to 0.96 and 1.2 times
+% the current empty math box height.
+%
+% \begin{macrocode}
+\dlm@parsedef{!}{}{\dlm@setsize{1}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{+}{}{\dlm@setsize{1}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{0}{}{\dlm@setsize{0.6}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{1}{}{\dlm@setsize{1}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{2}{}{\dlm@setsize{2}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{3}{}{\dlm@setsize{3}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{4}{}{\dlm@setsize{4}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{^}{#3}{\dlm@setsize{#3}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{_}{#3}{\dlm@setabssize{#3}\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{*}{}{\dlm@setvar\dlm@parseflags{#1}{#2}}
+% \end{macrocode}
+
+% Flags to select individual delimiters.
+%
+% \begin{macrocode}
+\dlm@parsedef{(}{}{\def\selecteddelim{0}#2}
+\dlm@parsedef{|}{}{\def\selecteddelim{1}#2}
+\dlm@parsedef{,}{}{\def\selecteddelim{1}#2}
+\dlm@parsedef{)}{}{\def\selecteddelim{9}#2}
+\dlm@parsedef{?}{#3}{\def\selecteddelim{#3}#2}
+% \end{macrocode}
+
+% Flags to access registers.
+%
+% \begin{macrocode}
+\dlm@parsedef{[}{}{\dlm@reg@save{.}{#2}\def\selecteddelim{0}#2}
+\dlm@parsedef{]}{}{\dlm@reg@init{.}\def\selecteddelim{9}\dlm@reg@sel{.}}
+\dlm@parsedef{>}{#3}{\dlm@reg@save{#3}{#2}}
+\dlm@parsedef{<}{#3}{\dlm@reg@init{#3}\dlm@parseflags%
+ {\PackageError{delimset}{must select delimiter}{}}{\dlm@reg@sel{#3}}}
+% \end{macrocode}
+
+% Further flags.
+%
+% \begin{macrocode}
+\dlm@parsedef{.}{}{#1}
+\dlm@parsedef{:}{}{\dlm@enclose@block\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{'}{}{\dlm@enclose@openclose\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{"}{}{\dlm@enclose@inner\dlm@parseflags{#1}{#2}}
+\dlm@parsedef{-}{}{\let\dlm@phantom\phantom\dlm@parseflags{#1}{#2}}
+% \end{macrocode}
+
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \paragraph{Size Selection.}
+% \paragraph{Delimiter Display.}
%
-% The command |\selectdelim| reproduces the delimiter in the second argument
-% using the math class given in the first argument
-% using the previously selected size stored in |\dlm@arg|.
-% It appends the class identifier to the command stored in |\dlm@arg|
-% and calls the latter with the delimiter as the argument.
+% The command |\selectdelim| reproduces the delimiter in argument |#2|
+% using the math class given in argument |#1| and the previously stored size.
% If the class identifier is `|.|', just return the delimiter argument as is.
+% The commands |\selectdeliml| and |\selectdelimr|
+% implement the left and right delimiter classes, respectively.
+%
% \begin{macrocode}
-\newcommand{\selectdelim}[2][]{\if.#1#2\else\dlm@arg{#1}#2\fi}
+\newcommand{\selectdelim}[1][]{\begingroup\def\dlm@do{\@ifstar{\dlm@plain{#1}}%
+ {\dlm@ifvar{\dlm@var{#1}}{\dlm@big{#1}}}}%
+ \if.#1\let\dlm@do\@empty\fi\expandafter\endgroup\dlm@do}
+\newcommand{\selectdeliml}{\@ifstar%
+ {\dlm@ifvar\dlm@var@pl\dlm@plain@l}{\dlm@ifvar\dlm@var@l\dlm@big@l}}
+\newcommand{\selectdelimr}{\@ifstar%
+ {\dlm@ifvar\dlm@var@pr\dlm@plain@r}{\dlm@ifvar\dlm@var@r\dlm@big@r}}
% \end{macrocode}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \paragraph{Declaration of New Delimiter Commands.}
%
-% Declares a new set of delimiters as the macro `|\|\emph{name}'.
-% This macro checks for an optional size argument and stores it in |\dlm@arg|.
+% The macro |\DeclareMathDelimiterSet| declares a new set of delimiters
+% as the macro `|\|\emph{name}'.
+% This macro checks for optional flags and stores the desired size.
% It then passes on to a second macro `|\dlm@dcl@|\emph{name}',
% which takes the actual code.
+% If the flags select an individual delimiter,
+% the macro `|\dlm@sel@|\emph{name}' is called instead.
+% The latter macro should be defined via |\DeclareMathDelimiterSel|
+% such that it produces the desired delimiter number |\selecteddelim|.
+%
% \begin{macrocode}
\newcommand{\DeclareMathDelimiterSet}[1]{\expandafter\dlm@declare%
\csname dlm@dcl@\expandafter\@gobble\string#1\endcsname{#1}}
-\def\dlm@declare#1#2{\newcommand{#2}{\dlm@parsesize{#1}}\newcommand{#1}}
+\def\dlm@declare#1#2{\expandafter\dlm@declare@%
+ \csname dlm@sel@\expandafter\@gobble\string#2\endcsname{#1}{#2}}
+\def\dlm@declare@#1#2#3{\newcommand{#3}{\parsedelimflags{#2}{#1}}%
+ \providecommand{#1}{}\newcommand{#2}}
+\newcommand{\DeclareMathDelimiterSel}[3]{\expandafter\def%
+ \csname dlm@sel@\expandafter\@gobble\string#1\endcsname%
+ {\ifcase\selecteddelim#2\else#3\fi}}
% \end{macrocode}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1212,29 +1866,51 @@ alternative representation:
% are processed \emph{before} the optional size modifier.
%
% |\delim| is used for a single delimited expression.
+%
% \begin{macrocode}
-\newcommand{\delim}[2]
- {\dlm@parsesize{\dlm@dcl@delim{#1}{#2}}}
-\newcommand{\dlm@dcl@delim}[3]
- {\selectdelim[l]#1{#3}\selectdelim[r]#2}
+\newcommand{\delim}[2]{%
+ \parsedelimflags{\dlm@dcl@delim{#1}{#2}}{\dlm@sel@delim{#1}{#2}}}
+\newcommand{\dlm@dcl@delim}[3]{%
+ \selectdeliml#1{#3}\selectdelimr#2}
+\newcommand{\dlm@sel@delim}[2]{\ifcase\selecteddelim\selectdeliml#1%
+ \else\selectdelimr#2\fi}
% \end{macrocode}
% |\delimpair| is used for two delimited expressions separated
% by an intermediate delimiter.
+%
% \begin{macrocode}
-\newcommand{\delimpair}[3]
- {\dlm@parsesize{\dlm@dcl@delimpair{#1}{#2}{#3}}}
-\newcommand{\dlm@dcl@delimpair}[5]
- {\selectdelim[l]#1{#4}\selectdelim#2{#5}\selectdelim[r]#3}
+\newcommand{\delimpair}[3]{%
+ \parsedelimflags{\dlm@dcl@delimpair{#1}{#2}{#3}}%
+ {\dlm@sel@delimpair{#1}{#2}{#3}}}
+\newcommand{\dlm@dcl@delimpair}[5]{%
+ \selectdeliml#1{#4}\selectdelim#2{#5}\selectdelimr#3}
+\newcommand{\dlm@sel@delimpair}[3]{\ifcase\selecteddelim\selectdeliml#1%
+ \or\selectdelim#2\else\selectdelimr#3\fi}
% \end{macrocode}
% |\delimtriple| is used for three delimited expressions separated
% by two intermediate delimiters.
+%
% \begin{macrocode}
-\newcommand{\delimtriple}[4]
- {\dlm@parsesize{\dlm@dcl@delimtriple{#1}{#2}{#3}{#4}}}
-\newcommand{\dlm@dcl@delimtriple}[7]
- {\selectdelim[l]#1{#5}\selectdelim#2{#6}\selectdelim#3{#7}\selectdelim[r]#4}
+\newcommand{\delimtriple}[4]{%
+ \parsedelimflags{\dlm@dcl@delimtriple{#1}{#2}{#3}{#4}}%
+ {\dlm@sel@delimtriple{#1}{#2}{#3}{#4}}}
+\newcommand{\dlm@dcl@delimtriple}[7]{%
+ \selectdeliml#1{#5}\selectdelim#2{#6}\selectdelim#3{#7}\selectdelimr#4}
+\newcommand{\dlm@sel@delimtriple}[4]{\ifcase\selecteddelim\selectdeliml#1%
+ \or\selectdelim#2\or\selectdelim#3\else\selectdelimr#4\fi}
+% \end{macrocode}
+
+% |\usedelim| retrieves a stored delimiter type.
+% The argument `|]|' immediately closes the delimiter set
+% using the default register.
+% Otherwise the desired register must be followed
+% by the delimiter selection flag.
+%
+% \begin{macrocode}
+\newcommand{\usedelim}{\@ifnextchar]{\parsedelimflags{}{}}{\parsedelimflags%
+ {\PackageError{delimset}{must select delimiter}{}}{}<}}
% \end{macrocode}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1243,17 +1919,18 @@ alternative representation:
% Define some common delimiters (by |providecommand| so as not to
% overwrite previously existing commands).
% This code is activated only if the package option |stddef| is set to |true|.
+%
% \begin{macrocode}
\ifdlm@std
\providecommand{\brk}[1][r]{\begingroup\def\dlm@use{\delim()}%
- \if r#1 \def\dlm@use{\delim()}\fi%
- \if s#1 \def\dlm@use{\delim[]}\fi%
- \if c#1 \def\dlm@use{\delim\{\}}\fi%
- \if a#1 \def\dlm@use{\delim<>}\fi%
+ \if r#1\def\dlm@use{\delim()}\fi%
+ \if s#1\def\dlm@use{\delim[]}\fi%
+ \if c#1\def\dlm@use{\delim\{\}}\fi%
+ \if a#1\def\dlm@use{\delim<>}\fi%
\expandafter\endgroup\dlm@use}
\providecommand{\eval}[1][v]{\begingroup\def\dlm@use{\delim.\rvert}%
- \if v#1 \def\dlm@use{\delim.\rvert}\fi%
- \if s#1 \def\dlm@use{\delim[]}\fi%
+ \if v#1\def\dlm@use{\delim.\rvert}\fi%
+ \if s#1\def\dlm@use{\delim[]}\fi%
\expandafter\endgroup\dlm@use}
\providecommand{\abs}{\delim\lvert\rvert}
\providecommand{\norm}{\delim\lVert\rVert}
@@ -1265,24 +1942,33 @@ alternative representation:
%
% Define some extended delimiters.
% This code is activated only if the package option |extdef| is set to |true|.
+%
% \begin{macrocode}
\ifdlm@ext
-\providecommand{\pair}{\delimpair({[.],})}
+\providecommand{\pair}{\delimpair({[p]*,})}
\providecommand{\set}{\delim\{\}}
\providecommand{\setcond}{\delimpair\{|\}}
-\providecommand{\intv}[1][c]{\begingroup\def\dlm@use{\delimpair[{[.],}]}%
- \if c#1 \def\dlm@use{\delimpair[{[.],}]}\fi%
- \if l#1 \def\dlm@use{\delimpair]{[.],}]}\fi%
- \if r#1 \def\dlm@use{\delimpair[{[.],}[}\fi%
- \if o#1 \def\dlm@use{\delimpair]{[.],}[}\fi%
+\providecommand{\intv}[1][c]{\begingroup%
+ \def\dlm@use{\delimpair[{[p]*,}]}%
+ \if c#1\def\dlm@use{\delimpair[{[p]*,}]}\fi%
+ \if l#1\def\dlm@use{\delimpair]{[p]*,}]}\fi%
+ \if r#1\def\dlm@use{\delimpair[{[p]*,}[}\fi%
+ \if o#1\def\dlm@use{\delimpair]{[p]*,}[}\fi%
\expandafter\endgroup\dlm@use}
\providecommand{\avg}{\delim<>}
\providecommand{\corr}{\delim<>}
-\providecommand{\comm}{\delimpair[{[.],}]}
-\providecommand{\acomm}{\delimpair\{{[.],}\}}
+\providecommand{\comm}{\delimpair[{[p]*,}]}
+\providecommand{\acomm}{\delimpair\{{[p]*,}\}}
\providecommand{\bra}{\delim<|}
\providecommand{\ket}{\delim|>}
\providecommand{\braket}{\delimpair<|>}
+\providecommand{\lfrac}[1][]{\begingroup%
+ \def\dlm@use{\delimpair./.}%
+ \if r#1\def\dlm@use{\delimpair(/)}\fi%
+ \if s#1\def\dlm@use{\delimpair[/]}\fi%
+ \if c#1\def\dlm@use{\delimpair\{/\}}\fi%
+ \if a#1\def\dlm@use{\delimpair</>}\fi%
+ \expandafter\endgroup\dlm@use}
\fi
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/delimset/delimset.ins b/Master/texmf-dist/source/latex/delimset/delimset.ins
index daf870b5ff8..68e41a72428 100644
--- a/Master/texmf-dist/source/latex/delimset/delimset.ins
+++ b/Master/texmf-dist/source/latex/delimset/delimset.ins
@@ -2,7 +2,7 @@
\input docstrip.tex
\keepsilent
-% delimset.ins Copyright (C) 2016-2018 Niklas Beisert
+% delimset.ins Copyright (C) 2016-2024 Niklas Beisert
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -14,7 +14,7 @@
\preamble
-Copyright (C) 2016-2018 Niklas Beisert
+Copyright (C) 2016-2024 Niklas Beisert
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/source/latex/doibanner/doibanner.dtx b/Master/texmf-dist/source/latex/doibanner/doibanner.dtx
new file mode 100644
index 00000000000..e004b53e313
--- /dev/null
+++ b/Master/texmf-dist/source/latex/doibanner/doibanner.dtx
@@ -0,0 +1,412 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2024 Christian Schreinemachers
+%
+% This work may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008-05-04 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The current maintainer of this work is Christian Schreinemachers.
+%
+% This work consists of the files
+% doibanner.dtx
+% doibanner.ins
+% README.md
+% and the derived files
+% doibanner.sty
+% doibanner.pdf
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% \fi
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{doibanner}
+%<package> [2024-07-28 v0.3 Generate DOI banners and links]
+%
+%<*driver>
+\documentclass[a4paper]{ltxdoc}
+\usepackage[%
+ pdfusetitle,%
+ hyperindex=false,%
+ pdfsubject={LaTeX package documentation},%
+ pdfkeywords={doibanner, latex, documentation}%
+]{hyperref}
+\usepackage{doibanner}
+\usepackage[toc]{multitoc}
+\usepackage{geometry}
+\usepackage{fancyvrb}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\DoNotIndex{\adjustbox,\begin,\bfseries,\DeclareKeys,\definecolor,\end,\fill,
+ \fontfamily,\href,\IfBooleanTF,\Large,\NewDocumentCommand,\node,
+ \ProcessKeyOptions,\RequirePackage,\relax,\selectfont,\SetKeys,
+ \sfdefault,\tikzstyle}
+\setcounter{IndexColumns}{2}
+\setlength{\IndexMin}{40ex}
+\setlength{\columnseprule}{.4pt}
+\addtolength{\oddsidemargin}{2cm}
+\addtolength{\textwidth}{-2cm}
+\begin{document}
+ \DocInput{doibanner.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \pagestyle{headings}
+%
+% \newcommand*{\package}[1]{\textsf{#1}}
+% \newcommand*{\opt}[1]{\texttt{#1}}
+% \newcommand*{\default}[1]{(default: \opt{#1})}
+%
+%
+% ^^A -----------------------------
+%
+% \changes{v0.3}{2024-07-28}{%
+% Add package options \opt{width} and \opt{label},
+% fix mistakes,
+% improve documentation,
+% remove unnecessary dependencies}
+% \changes{v0.2}{2024-07-23}{%
+% Initial release,
+% convert into dtx,
+% add documentation,
+% add \opt{urlbase} package option}
+% \changes{v0.1}{2021/05/09}{Initial version}
+%
+% \GetFileInfo{doibanner.sty}
+%
+%
+% ^^A -----------------------------
+%
+% \title{The \package{doibanner} package}
+% \author{Christian Schreinemachers}
+% \date{%
+% Released \filedate\thanks{%
+% \package{doibanner}~\fileversion
+% ~(\href{https://codeberg.org/Cs137/doibanner/releases/tag/\fileversion}{source code})}%
+% }
+% \maketitle
+%
+%
+% ^^A -----------------------------
+%
+% \begin{abstract}
+% The \package{doibanner} package allows to generate a banner for a declared
+% \href{https://www.doi.org/the-identifier/what-is-a-doi/}{digital object identifier}
+% (DOI). It provides the \cs{doibanner} macro, which draws the banner using
+% \package{TikZ} and adds a link via \package{hyperref}, if desired. Its
+% output can be scaled by \package{adjustbox} and it might look as follows:
+% \par\medskip\centering{\doibanner*[width=5cm]{xx.xxxx/yyyyyy.zzzzzzzz}}
+% \end{abstract}
+%
+%
+% ^^A -----------------------------
+%
+% \tableofcontents
+%
+%
+% ^^A -----------------------------
+%
+% \section{Introduction}
+% ^^A
+% I published several documents on \href{https://zenodo.org/}{\emph{Zenodo}},
+% a general-purpose open repository. They offer to register a
+% \href{https://www.doi.org/the-identifier/what-is-a-doi/}{digital object identifier}
+% (DOI) for an entry and download a banner of it. The latter can be added to
+% contents foreseen for the entry, or e.g. when referring to the entry in a
+% slide deck.
+%
+% Since I frequently use such banners in \LaTeX{} documents, I decided to
+% create a package that generates a similar banner and includes a link to the
+% corresponding URL. Additionally, this package eliminates the need to
+% manually download the banner and manage a file that might be used across
+% multiple documents.
+%
+% Due to the motivation, the resulting banner is heavily inspired by the
+% design applied in the banner offered by \emph{Zenodo}. It is drawn using
+% the \package{tikz} package, a link to its URL can be included with
+% \package{hyperref}, and it can be scaled using \package{adjustbox}.
+%
+% The application of this package is not limited to \emph{Zenodo}
+% depositions, it can be used to create a banner for a DOI that can
+% be included in any \LaTeX{} document.
+%
+%
+% ^^A -----------------------------
+%
+% \section{Usage}
+% ^^A
+% Load the package in your document's preamble and specify any of the
+% options described in the next subsection as follows:
+%
+% \begin{quote}
+% \cs{usepackage}\oarg{option(s)}\{doibanner\}
+% \end{quote}
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Options}
+% ^^A
+% In order to change the default behaviour of this package, declare one
+% or more of the options described in this subsection with your desired
+% value.
+%
+% \DescribeMacro{label=\meta{string}}
+% \default{DOI} specifies the label (left part) of the DOI banner generated
+% by \cs{doibanner}. The widths of the left and right part of the banner
+% are fixed and do currently not take the length of the text displayed on
+% top into account. Consequently, only a short expression should be declared
+% as value for the option \opt{label}.
+%
+% \DescribeMacro{urlbase=\meta{string}}
+% \default{https://doi.org/} specifies the base URL to convert a DOI string
+% into its URL, for normal use cases this does not require any adjustment.
+%
+% \DescribeMacro{width=\meta{dimen}}
+% \default{3.6cm} specifies the total width of the DOI banner generated by
+% \cs{doibanner}. The widths of the individual parts of the banner are
+% fixed and can currently not be changed.
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Macros}
+% ^^A
+% \subsubsection*{\cs{doibanner}\oarg{dimen}\marg{string}}
+%
+% A DOI banner can be created using the command \cs{doibanner}, which requires
+% a DOI string as argument. Moreover, a \oarg{dimen} option can be defined.
+% The latter specifies the banner's width. If it is not declared, the value
+% of the \opt{width} package option is taken into account \default{3.6cm}.
+%
+% \DescribeMacro{\doibanner}
+% An execution of \cs{doibanner\{xx.xxxx/yyyyyy.zzzzzzzz\}} results in this
+% banner: \doibanner{xx.xxxx/yyyyyy.zzzzzzzz} If a banner with a width of
+% let's say 3\,cm is desired, it can be achieved by specifying the macro option
+% \opt{width} accordingly (\cs{doibanner}\opt{[width=3cm]\{xx.xxxx/yyyyyy.zzzzzzzz\}}):
+% \doibanner[width=3cm]{xx.xxxx/yyyyyy.zzzzzzzz}
+%
+% \DescribeMacro{\doibanner*}
+% The starred version of the command leads to the same banner, but it does
+% not contain a link to the DOI's URL:
+% \doibanner*{xx.xxxx/yyyyyy.zzzzzzzz}
+%
+% \subsubsection*{\cs{doiurl}\marg{string}}
+% ^^A
+% \DescribeMacro{\doiurl}
+% An URL is generated by appending the provided \emph{string} to the string
+% defined as the package option \opt{urlbase}. The resulting link is labelled
+% with the DOI string.
+% A call of \cs{doiurl\{xx.xxxx/yyyyyy.zzzzzzzz\}} results in
+% \doiurl{xx.xxxx/yyyyyy.zzzzzzzz}.
+%
+% \DescribeMacro{\doiurl*}
+% The command is also available as starred version, which prints the full
+% URL instead of the DOI string and does not include a link. Its output for
+% the aforementioned example is as follows:
+% \doiurl*{xx.xxxx/yyyyyy.zzzzzzzz}.
+%
+%
+% ^^A -----------------------------
+%
+% ^^A \section{Known limitations}
+% ^^A ^^A
+% ^^A \begin{itemize}
+% ^^A \item
+% ^^A \end{itemize}
+%
+%
+% ^^A -----------------------------
+%
+% \MaybeStop{
+%
+% \IndexPrologue{%
+% \section{Index}
+% Numbers written in italic refer to the page where the corresponding entry
+% is described; numbers underlined refer to the code line of the definition;
+% numbers in roman refer to the code lines where the entry is used.
+% }
+% \PrintIndex
+%
+% \GlossaryPrologue{%
+% \section{Change History}
+% The changes listed in this section aim to provide a brief overview of the
+% changes introduced into the package \package{doibanner}. The
+% \href{https://codeberg.org/Cs137/doibanner/}{package repository on Codeberg}
+% contains a
+% \href{https://codeberg.org/Cs137/doibanner/src/branch/main/CHANGELOG.md}{changelog file},
+% consult it to read a detailed description of the changes introduced into
+% this package.
+% }
+% \PrintChanges
+%
+% }
+%
+%
+% ^^A -----------------------------
+%
+% \section{Implementation}
+%
+% \subsection{Dependencies}
+% ^^A
+% In order to use \package{doibanner}, the packages
+% \href{https://www.ctan.org/pkg/adjustbox}{\package{adjustbox}},
+% \href{https://www.ctan.org/pkg/hyperref}{\package{hyperref}}, and
+% \href{https://www.ctan.org/pkg/tikz}{\package{tkiz}}
+% are required as package dependencies.
+%
+% \iffalse
+%<*package>
+% \fi
+% \begin{macrocode}
+\RequirePackage{adjustbox}
+\RequirePackage{hyperref}
+\RequirePackage{tikz}
+% \end{macrocode}
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Constants}
+% ^^A
+% Definition of colours for the banner areas and labels, custom colour
+% definitions are currently not supported.
+% \begin{macrocode}
+\definecolor{leftcolor}{RGB}{82,82,82}
+\definecolor{rightcolor}{RGB}{6,119,183}
+%
+\definecolor{toptextcolor}{RGB}{235,235,235}
+\definecolor{bottomtextcolor}{RGB}{59,59,59}
+% \end{macrocode}
+% ^^A
+% Definition of font and colour for the banner's top and bottom text layers.
+% \begin{macrocode}
+\tikzstyle{toptextstyle} = [
+ font=\fontfamily{\sfdefault}\selectfont\bfseries\Large,toptextcolor]
+\tikzstyle{bottomtextstyle} = [
+ font=\fontfamily{\sfdefault}\selectfont\bfseries\Large,bottomtextcolor]
+% \end{macrocode}
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Options}
+% ^^A
+% The package options are internally available as \cs{@doibanner@}\meta{option}.
+% \begin{macrocode}
+\DeclareKeys[@doibanner]{
+ label.store = \@doibanner@label,
+ label.usage = load,
+ urlbase.store = \@doibanner@urlbase,
+ urlbase.usage = load,
+ width.store = \@doibanner@width,
+ width.usage = load,
+}
+% \end{macrocode}
+%
+% \subsubsection*{Assignement of default values}
+% \begin{macrocode}
+\SetKeys[@doibanner]{
+ label=DOI,
+ urlbase=https://doi.org/,
+ width=3.6cm,
+}
+% \end{macrocode}
+%
+% \subsubsection*{Processing of package options}
+% \begin{macrocode}
+\ProcessKeyOptions[@doibanner]\relax
+% \end{macrocode}
+%
+%
+% ^^A -----------------------------
+%
+% \subsection{Macros}
+%
+% \changes{v0.2}{2024-07-23}{Remove \cs{doi} macro}
+%
+% \begin{macro}{\doiurl}
+% \changes{v0.2}{2024-07-23}{Remove trailing space}
+% \oarg{dimen}\\
+% The \meta{string} is appended to the package option \opt{urlbase} to
+% generate the URL.
+% \begin{macrocode}
+\NewDocumentCommand\doiurl{s m}{%
+ \IfBooleanTF#1
+ {\@doibanner@urlbase#2}%
+ {\href{\@doibanner@urlbase#2}{#2}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@doibanner@draw}
+% \changes{v0.3}{2024-07-28}{Rename macro, remove top part}
+% \oarg{dimen}\marg{string}\\
+% Draw the DOI banner including its \opt{label} and \meta{string}, provide
+% \opt{width=\meta{dimen}} to define the banners width as well.
+% \begin{macrocode}
+\NewDocumentCommand\@doibanner@draw{o m}{%
+ \adjustbox{#1}{%
+ \begin{tikzpicture}
+% left part
+ \fill [leftcolor,draw]
+ (1.5,0) --
+ ++(0,.8) {[rounded corners=5] --
+ ++(-1.5,0) --
+ ++(0,-.8)} --
+ cycle
+ {};
+ \node[bottomtextstyle] at (.75,.35) {\@doibanner@label};
+ \node[toptextstyle] at (.75,.4) {\@doibanner@label};
+% right part
+ \fill [rightcolor,draw]
+ (1.5,0) {[rounded corners=5] --
+ ++(6.5,0) --
+ ++(0,.8)} --
+ ++(-6.5,0) --
+ cycle
+ {};
+ \node[bottomtextstyle] at (4.75,.35) {#2};
+ \node[toptextstyle] at (4.75,.4) {#2};
+ \end{tikzpicture}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\doibanner}
+% \changes{v0.3}{2024-07-28}{Add \opt{width} option}
+% \changes{v0.2}{2024-07-23}{Remove trailing space}
+% \oarg{dimen}\marg{string}\\
+% Display the DOI banner with or without (*) a link to its URL. Specify a
+% \oarg{dimen}, if you want a banner width deviating from the one defined
+% as \opt{width} package option.
+% \begin{macrocode}
+\NewDocumentCommand\doibanner{s O{width=\@doibanner@width} m}{%
+ \IfBooleanTF#1
+ {\@doibanner@draw[#2]{#3}}%
+ {\href{\@doibanner@urlbase#3}{\@doibanner@draw[#2]{#3}}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+\endinput
+%%
+%% End of file `doibanner.dtx'.
+
diff --git a/Master/texmf-dist/source/latex/doibanner/doibanner.ins b/Master/texmf-dist/source/latex/doibanner/doibanner.ins
new file mode 100644
index 00000000000..97cfbb3fbb1
--- /dev/null
+++ b/Master/texmf-dist/source/latex/doibanner/doibanner.ins
@@ -0,0 +1,85 @@
+%%
+%% Copyright (C) 2024 Christian Schreinemachers
+%%
+%% This work may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX version 2008-05-04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The current maintainer of this work is Christian Schreinemachers.
+%%
+%% This work consists of the files
+%% doibanner.dtx
+%% doibanner.ins
+%% README.md
+%% and the derived files
+%% doibanner.sty
+%% doibanner.pdf
+%%
+This work has the LPPL maintenance status `maintained'.
+
+The current maintainer of this work is Christian Schreinemachers.
+
+This work consists of the files
+ doibanner.dtx
+ doibanner.ins
+ README.md
+and the derived files
+ doibanner.sty
+ doibanner.pdf
+\input docstrip.tex
+\keepsilent
+
+\preamble
+
+Copyright (C) 2024 Christian Schreinemachers
+
+This work may be distributed and/or modified under the conditions
+of the LaTeX Project Public License, either version 1.3c of this
+license or (at your option) any later version. The latest version
+of this license is in
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008-05-04 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The current maintainer of this work is
+ Christian Schreinemachers.
+
+This work consists of the files
+ doibanner.dtx
+ doibanner.ins
+and the derived files
+ doibanner.sty
+ doibanner.pdf
+
+\endpreamble
+\askforoverwritefalse
+\generate{\file{doibanner.sty}{\from{doibanner.dtx}{package}}}
+
+\obeyspaces
+\Msg{****************************************************}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* doibanner.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* bib2qr.dtx through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{****************************************************}
+\endbatchfile
+%%
+%% End of file `doibanner.ins'.
+
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index 86d3c17b322..ad8b2fe8431 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -14,13 +14,13 @@
% This work has the LPPL maintenance status `maintained'.
%<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15]
%<*class>
-\ProvidesExplClass{easybook}{2024/06/18}{2024cf}
+\ProvidesExplClass{easybook}{2024/07/29}{2024da}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
\bool_new:N \l__eb_title_newline_bool
-\bool_set_true:N \l__eb_class_mode_book_bool
-\clist_new:N \g__eb_doc_options_clist
+\bool_set_true:N \l__eb_class_mode_book_bool
+\clist_new:N \g__eb_doc_options_clist
\cs_new_protected:Npn \eb_put_ctexbook:n #1
{ \PassOptionsToClass{#1}{ctexbook} }
\cs_generate_variant:Nn \eb_put_ctexbook:n { V }
@@ -66,10 +66,11 @@
\sys_if_engine_xetex:TF
{
- \cs_new_eq:NN \eb_set_family:nnn \xeCJK_set_family:nnn
+ \cs_new_eq:NN \eb_set_family:nnn \xeCJK_set_family:nnn
\cs_new_eq:NN \eb_switch_family:n \xeCJK_switch_family:n
- }{
- \cs_new_eq:NN \eb_set_family:nnn \ctex_ltj_set_family:nnn
+ }
+ {
+ \cs_new_eq:NN \eb_set_family:nnn \ctex_ltj_set_family:nnn
\cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n
}
\cs_generate_variant:Nn \eb_set_family:nnn { x }
@@ -300,7 +301,7 @@
%</class>
%<*package>
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/06/18}{2024cf}
+\ProvidesExplPackage{easybase}{2024/07/29}{2024da}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -312,7 +313,7 @@
\cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
\cs_generate_variant:Nn \ctex_define:nn { nx }
\cs_generate_variant:Nn \eb_set_hyperref:n { x }
-\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
+\cs_generate_variant:Nn \eb_at_begin_environment:nn { o }
\cs_generate_variant:Nn \tl_if_novalue:nF { V }
\cs_set_protected:Npn \ctex_define:nn #1
@@ -371,7 +372,11 @@
\IfNoValueTF{#1}
{\IfFileExists{#2.sty}{\RequirePackage{#2}[#3]}{}}
{\IfFileExists{#2.sty}{\RequirePackage[#1]{#2}[#3]}{}}
+ \IfFileExists{#2.sty}{}
+ {\msg_warning:nnn { easybase } { package-not-found } {#2}}
}
+\msg_new:nnn { easybase } { package-not-found }
+ { The~macro~package~'#1'~can't~be~found. }
\cs_new_protected:Npn \ebloadpackage #1
{
\int_compare:nTF { \clist_count:n {#1} <= 1 }
@@ -382,7 +387,7 @@
}
}
\providecommand{\NewHookWithArguments}[2]{}
-\ProvideDocumentCommand{\AddToHookWithArguments}{mom}{}
+\ProvideDocumentCommand{\AddToHookWithArguments}{mo+m}{}
\bool_set_true:N \l__eb_class_mode_book_bool
\bool_set_false:N \l__eb_compile_draft_bool
@@ -456,7 +461,7 @@
\ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} }
\cs_new_protected:cpn { eb#1set } ##1 { \ctex_set:nn {#1} {##1} }
}
-\RenewDocumentCommand{\ctexset}{om}
+\RenewDocumentCommand{\ctexset}{o+m}
{
\IfValueTF{#1}
{\ctex_set:nn {#1} {#2}}
@@ -801,7 +806,7 @@
\UseFntSymbsList{empty}
\cs_set_eq:NN \DefineFntSymbols \SetFntSymbsList
\cs_set_eq:NN \setfntsymbol \UseFntSymbsList
-\cs_new:Npn \eb_int_format_trans:NN #1
+\cs_new:Npn \eb_int_type_trans:NN #1
{
\str_case:nn {#1}
{
@@ -836,29 +841,44 @@
}
\cs_set_eq:NN \thedownfootnote \thefootnote
}
+\cs_generate_variant:Nn \msg_warning:nnnn { nnnV }
\cs_new_protected:Npn \eb_fnmarktext_short_label_set:Nn #1#2
{
\tl_set:Nn \l__eb_fnmarktext_short_tokens_tl {#2}
\clist_map_inline:nn
{ A,a,1,I,i,c,s }
{
- \regex_match:nnT {##1} {#2}
+ \regex_match:nnTF {##1} {#2}
{
\regex_replace_once:nnN {##1}
- { \c{eb_int_format_trans:NN} ##1 \c{c@footnote} }
+ { \c{eb_int_type_trans:NN} ##1 \c{c@footnote} }
\l__eb_fnmarktext_short_tokens_tl
- \seq_map_break:
+ \cs_set_eq:NN #1 \l__eb_fnmarktext_short_tokens_tl
+ \clist_map_break:
+ }
+ {
+ \str_if_eq:nnT {##1} { s }
+ {
+ \str_if_eq:nnTF {#1} { \thefootnote }
+ { \str_set:Nn \l_tmpa_str { \thedownfootnote } }
+ { \str_set:Nn \l_tmpa_str { \theupfootnote } }
+ \msg_warning:nnnV { easybase } { unknown-fnt-type } {#2} \l_tmpa_str
+ }
}
}
- \cs_set_eq:NN #1 \l__eb_fnmarktext_short_tokens_tl
\cs_set_eq:NN \thedownfootnote \thefootnote
}
+\msg_new:nnn { easybase } { unknown-fnt-type }
+ {
+ The~'#1'~includes~unknown~footnote~numbering~type \\
+ in~#2.
+ }
\cs_new_protected:Npn \eb_footnote_value_handle:n #1
{
\str_case:nnF {#1}
{
{ bottom }
- { \bool_set_true:N \l__eb_fnpara_bottom_bool }
+ { \PushFntBottom }
{ flush }
{
\tl_set:Nn \l__eb_footnote_value_tl { plain }
@@ -891,7 +911,6 @@
}
}
-\bool_new:N \l__eb_fnpara_bottom_bool
\tl_new:N \l__eb_fnmarktext_format_tl
\tl_new:N \l__eb_fncustom_format_tl
\clist_new:N \l__eb_footnote_value_clist
@@ -949,58 +968,91 @@
{ page } { \counterwithin*{footnote}{page} }
}
{ \counterwithout*{footnote}{chapter} }
- \eb_fnpara_if_pos_bottom:
}
-\cs_new_protected:Npn \setspread #1 { \linespread{#1}\selectfont }
-\cs_new:Npn \eb@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi }
-\cs_new_protected:Npn \eb_fnpara_if_pos_bottom:
+
+\def\@if@footnotes@TF #1#2 {\ifvoid\footins #2\else #1\fi}
+\def\@outputbox@removebskip
{
- \bool_if:NT \l__eb_fnpara_bottom_bool
+ \ifx\@textbottom\relax\else
+ \@outputbox@append
+ {
+ \@tempskipa\lastskip
+ \ifnum\gluestretchorder\@tempskipa>\z@
+ \vskip -\@tempskipa
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}
+ \else
+ \global\let\@outputbox@reinsertbskip\relax
+ \fi
+ }
+ \fi
+ }
+\let\@outputbox@reinsertbskip\relax
+\def\@outputbox@append #1
+ {
+ \setbox\@outputbox\vbox
{
- \IfPackageLoadedTF{footmisc}
- {\msg_warning:nn { easybase } { bottom-not-compatible }}
+ \boxmaxdepth\@maxdepth
+ \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ #1
+ }
+ }
+\def\@outputbox@attachfloats{\@combinefloats}
+\NewHook{makecol/footins/before}
+\NewHook{makecol/footins/begin}
+\def\@outputbox@appendfootnotes
+ {
+ \@if@footnotes@TF
+ {
+ \UseHook{makecol/footins/before}
+ \@outputbox@append
{
- \cs_set:Npn \@makecol
- {
- \setbox\@outputbox\box\@cclv
- \let\@elt\relax
- \xdef\@freelist{\@freelist\@midlist}
- \global\let\@midlist\@empty
- \@combinefloats
- \eb@ifvoid\footins{}
- {
- \setbox\@outputbox\vbox
- {
- \boxmaxdepth\@maxdepth
- \unvbox\@outputbox
- \vfill\relax
- \vskip\skip\footins
- \color@begingroup
- \normalcolor\footnoterule
- \unvbox\footins
- \color@endgroup
- }
- }
- \eb@ifvoid\@kludgeins
- {\@makespecialcolbox}
- {
- \setbox\@outputbox\vbox to\@colht
- {
- \@texttop\dimen@\dp\@outputbox
- \unvbox\@outputbox
- \vskip -\dimen@\@textbottom
- }
- }
- \global\maxdepth\@maxdepth
- }
+ \vskip\skip\footins
+ \UseHook{makecol/footins/begin}
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \@nameuse{pdfcolfoot@current}
+ \unvbox\footins
+ \color@endgroup
}
+ }{}
+ }
+\def\@makenormalcolbox
+ {
+ \setbox\@outputbox\vbox to\@colht
+ {
+ \@texttop
+ \dimen@\dp\@outputbox
+ \unvbox\@outputbox
+ \vskip -\dimen@
+ \@textbottom
}
}
-\msg_new:nnn { easybase } { bottom-not-compatible }
+\cs_new_protected:Npn \PushFntBottom
{
- Not~compatible~with~the~'footmisc'~package. \\
- Please~use~the~'bottom'~option~of~'footmisc'~package.
+ \cs_set:Npn \@makecol
+ {
+ \setbox\@outputbox\box\@cclv
+ \@outputbox@removebskip
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}
+ \global\let\@midlist\@empty
+ \@outputbox@attachfloats
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}
+ {\@outputbox@reinsertbskip}
+ \@outputbox@appendfootnotes
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \@makenormalcolbox
+ \fi
+ \global\maxdepth\@maxdepth
+ }
}
+\@onlypreamble\PushFntBottom
\cs_new_protected:Npn \eb_footnote_direct_hang:
{
@@ -1023,7 +1075,7 @@
{
\noindent
\clist_if_in:NnT \l__eb_footnote_value_clist { flush }
- { \dim_zero:N \fnfirstindent }
+ { \tl_set:Nn \fnfirstindent { 0pt } }
\int_case:nn { \dim_sign:V \fnfirstindent }
{
{ 1 } { \use_i:nnn }
@@ -1056,6 +1108,7 @@
\l__eb_fnpara_format_tl{#1}
\tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par }
}
+\cs_new_protected:Npn \setspread #1 { \linespread{#1}\selectfont }
\clist_map_inline:nn { \@footnotetext,\@mpfootnotetext }
{
\eb_patch_cmd:Nnn #1
@@ -1315,7 +1368,7 @@
{
\IfBooleanTF{##1}
{
- \use:c {#1}*{\phantomsection ##3}
+ \use:c {#1}*{##3}
\CTEX@addtocline{#1}{##2}
\tl_if_empty:oF {##4} { \CTEX@addbitocline{#1}{##4} }
\use:c { #1mark }{##2}
@@ -1337,22 +1390,22 @@
\skip_if_eq:nnF { \eb@toc@lol@skip } { \c_zero_skip }
{ \addtocontents{lol}{\protect\addvspace{\skip_use:N \eb@toc@lol@skip}} }
}
-\cs_new_protected:Npn \eb_title_base_set_eq:nn #1#2
- {
- \tl_set_eq:cc { CTEX@#2@beforeskip } { CTEX@#1@beforeskip }
- \tl_set_eq:cc { CTEX@#2@afterskip } { CTEX@#1@afterskip }
- \bool_set_eq:cc { CTEX@#2@numbering } { CTEX@#1@numbering }
- \bool_set_eq:cc { CTEX@#2@fixskip } { CTEX@#1@fixskip }
- \bool_set_eq:cc { CTEX@#2@hang } { CTEX@#1@hang }
- \bool_set_eq:cc { CTEX@#2@runin } { CTEX@#1@runin }
- \cs_set_eq:cc { CTEX@#2@tocline } { CTEX@#1@tocline }
- \tl_set_eq:cc { CTEX@#2@break } { CTEX@#1@break }
- \tl_set_eq:cc { CTEX@#2@format } { CTEX@#1@format }
- \tl_set_eq:cc { CTEX@#2@nameformat } { CTEX@#1@nameformat }
- \tl_set_eq:cc { CTEX@#2@numberformat } { CTEX@#1@numberformat }
- \tl_set_eq:cc { CTEX@#2@titleformat } { CTEX@#1@titleformat }
- \tl_set_eq:cc { CTEX@#2@aftername } { CTEX@#1@aftername }
- \tl_set_eq:cc { CTEX@#2@aftertitle } { CTEX@#1@aftertitle }
+\cs_new_protected:Npn \CopyTitleFormat #1#2
+ {
+ \tl_set_eq:cc { CTEX@#1@beforeskip } { CTEX@#2@beforeskip }
+ \tl_set_eq:cc { CTEX@#1@afterskip } { CTEX@#2@afterskip }
+ \bool_set_eq:cc { CTEX@#1@numbering } { CTEX@#2@numbering }
+ \bool_set_eq:cc { CTEX@#1@fixskip } { CTEX@#2@fixskip }
+ \bool_set_eq:cc { CTEX@#1@hang } { CTEX@#2@hang }
+ \bool_set_eq:cc { CTEX@#1@runin } { CTEX@#2@runin }
+ \cs_set_eq:cc { CTEX@#1@tocline } { CTEX@#2@tocline }
+ \tl_set_eq:cc { CTEX@#1@break } { CTEX@#2@break }
+ \tl_set_eq:cc { CTEX@#1@format } { CTEX@#2@format }
+ \tl_set_eq:cc { CTEX@#1@nameformat } { CTEX@#2@nameformat }
+ \tl_set_eq:cc { CTEX@#1@numberformat } { CTEX@#2@numberformat }
+ \tl_set_eq:cc { CTEX@#1@titleformat } { CTEX@#2@titleformat }
+ \tl_set_eq:cc { CTEX@#1@aftername } { CTEX@#2@aftername }
+ \tl_set_eq:cc { CTEX@#1@aftertitle } { CTEX@#2@aftertitle }
}
\NewDocumentCommand{\NewTitleCommand}{omm}
{
@@ -1374,7 +1427,7 @@
{ \CTEXnumberline{##1}##2 }
\exp_args:Nc \providecommand { ttll@#2 }{#3}
\exp_args:Nc \providecommand { toclevel@#2 }{#3}
- \IfValueT{#1}{\eb_title_base_set_eq:nn {#1} {#2}}
+ \IfValueT{#1}{\CopyTitleFormat{#2}{#1}}
}
\NewDocumentCommand{\NewTitleEntryCommand}{O{toc}m}
{
@@ -1383,35 +1436,39 @@
\bool_if:cTF { CTEX@#2@numbering }
{ \CTEX@ifnametrue }
{ \CTEX@ifnamefalse }
+ \CTEX@makeanchor{#2*}
\addcontentsline{#1}{#2}{\use:c { CTEX@#2@tocline }{#2}{##1}}
}
}
\ctex_define:nn { tools }
{
- hyphen-figure .tl_set:N = \l__eb_hyphen_figure_tl,
- hyphen-table .tl_set:N = \l__eb_hyphen_table_tl,
- hyphen-listing .tl_set:N = \l__eb_hyphen_listing_tl,
- hyphen-equation .tl_set:N = \l__eb_hyphen_equation_tl,
- hyphen-every .meta:n =
+ hyphen-figure .tl_set:N = \l__eb_hyphen_figure_tl,
+ hyphen-table .tl_set:N = \l__eb_hyphen_table_tl,
+ hyphen-lstlisting .tl_set:N = \l__eb_hyphen_lstlisting_tl,
+ hyphen-equation .tl_set:N = \l__eb_hyphen_equation_tl,
+ hyphen-every .meta:n =
{
- hyphen-figure = {#1},hyphen-table = {#1},
- hyphen-listing = {#1},hyphen-equation = {#1}
+ hyphen-figure = {#1},hyphen-table = {#1},
+ hyphen-lstlisting = {#1},hyphen-equation = {#1}
},
- hyphen-every .initial:n = .,
- unknown .code:n = \eb_msg_deprecated_option:n { tools }
+ hyphen-every .initial:n = .,
+ unknown .code:n = \eb_msg_deprecated_option:n { tools }
}
-\clist_map_inline:nn
- { figure,table,listing,equation }
+\AtBeginDocument
{
- \cs_set:cpn { the#1 }
+ \clist_map_inline:nn
+ { figure,table,lstlisting,equation }
{
- \int_compare:nNnT { \c@chapter } > { 0 }
+ \cs_set:cpn { the#1 }
{
- \thechapter
- \tl_use:c { l__eb_hyphen_#1_tl }
+ \int_compare:nNnT { \c@chapter } > { 0 }
+ {
+ \thechapter
+ \tl_use:c { l__eb_hyphen_#1_tl }
+ }
+ \int_to_arabic:v { c@#1 }
}
- \int_to_arabic:v { c@#1 }
}
}
@@ -1421,47 +1478,73 @@
\bool_new:N \l__eb_toc_notitle_bool
\newbool{bitoc}
\cs_new:Npn \ebifbitoc { \ifbool{bitoc} }
+\seq_new:N \l__eb_level_tmpa_seq
+\tl_new:N \l__eb_level_tmpa_tl
+\cs_generate_variant:Nn \regex_extract_all:nnN { no }
+\cs_generate_variant:Nn \keys_define:nn { nx }
+\cs_generate_variant:Nn \ctex_set:nn { ox }
+\cs_new_protected:Npn \eb_toc_extract_level:
+ {
+ \regex_extract_all:noN { \cC. } { \eb@toc@title@level }
+ \l__eb_level_tmpa_seq
+ \seq_get_right:NN \l__eb_level_tmpa_seq \l__eb_level_tmpa_tl
+ \tl_set:Nx \l__eb_level_tmpa_tl
+ {
+ \exp_last_unbraced:No
+ \cs_to_str:N { \l__eb_level_tmpa_tl }
+ }
+ \regex_replace_case_once:nN
+ {
+ { ^bi(.*) } { \1 }
+ { .* } { \0 }
+ }
+ \l__eb_level_tmpa_tl
+ }
\keys_define:nn { eb/tocouter }
{
- level .tl_set:N = \eb@toc@title@level,
- level .initial:n =
+ level .code:n =
+ {
+ \tl_set:Nn \eb@toc@title@level {#1}
+ \eb_toc_extract_level:
+ },
+ level .initial:x =
{
\bool_if:NTF \l__eb_class_mode_book_bool
- { \bichapter* }
- { \bisection* }
+ { \exp_not:N \bichapter* }
+ { \exp_not:N \bisection* }
},
- section .meta:n = { level = \bisection* },
- chapter .meta:n = { level = \bichapter* },
- none .code:n =
+ section .meta:n = { level = \bisection* },
+ chapter .meta:n = { level = \bichapter* },
+ none .code:n =
{
\tl_set:Nn \eb@toc@title@level
{ \par\use_none:nn }
\bool_set_true:N \l__eb_toc_notitle_bool
},
- multoc .int_set:N = \l__eb_toc_columns_int,
- multoc .default:n = 2,
- multoc .initial:n = 1,
+ multoc .int_set:N = \l__eb_toc_columns_int,
+ multoc .default:n = 2,
+ multoc .initial:n = 1,
plan .choice:,
plan .value_required:n = true,
- plan/cn .code:n =
+ plan/cn .code:n =
{
\bool_set_true:N \l__eb_toc_plan_cn_bool
\bool_set_false:N \l__eb_toc_plan_bi_bool
},
- plan/bi .code:n =
+ plan/bi .code:n =
{
\bool_set_false:N \l__eb_toc_plan_cn_bool
\bool_set_true:N \l__eb_toc_plan_bi_bool
},
- plan/both .code:n =
+ plan/both .code:n =
{
\bool_set_true:N \l__eb_toc_plan_cn_bool
\bool_set_true:N \l__eb_toc_plan_bi_bool
},
- plan .initial:n = cn,
- columns .meta:n = { multoc = {#1} },
- title .code:n = \eb_assign_toc_title:n {#1},
- bilist .code:n =
+ plan .initial:n = cn,
+ columns .meta:n = { multoc = {#1} },
+ title .code:n = \eb_assign_toc_title:n {#1},
+ bilist .code:n =
{
\tl_gset:Nn \g__eb_bilist_permute_value_tl {#1}
\str_if_eq:nnTF {#1} { mix }
@@ -1479,12 +1562,16 @@
}
}
},
- name .tl_set:N = \l__eb_print_index_name_tl,
- name .initial:n = \imki@jobname
+ name .tl_set:N = \l__eb_print_index_name_tl,
+ name .initial:n = \imki@jobname,
+ unknown .code:n =
+ {
+ \ctex_set:ox { \l__eb_level_tmpa_tl }
+ { \eb_unknown_kv_handle: }
+ },
+ unknown .default:V = \c_novalue_tl
}
-\bool_if:NTF \l__eb_class_mode_book_bool
- { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/chapter } }
- { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/section } }
+
\NewDocumentCommand{\eb_assign_toc_title:n}
{>{\SplitArgument{1}{,}}m}
{\eb_toc_assign_title_judge:nn #1}
@@ -1540,7 +1627,7 @@
}
\cs_new_protected:Npn \DeclareFloatList #1#2
{
- \exp_args:Nc \DeclareDocumentCommand { listof#1s }{st+o}
+ \exp_args:Nc \DeclareDocumentCommand { listof#1s }{st++o}
{\eb_toc_list_struct_parse:nnnnn {##1} {##2} {##3} {#1} {#2}}
\ctex_define:n
{
@@ -1563,14 +1650,15 @@
{ \protect\numberline{#3}{#4} }
}
}
-\cs_new_protected:Npn \AllotCaptionExt #1#2
+\cs_new_protected:Npn \AssignCaptionExt #1#2
{ \tl_set:cn { ext@#1 } {#2} }
+\cs_set_eq:NN \AllotCaptionExt \AssignCaptionExt
\ctex_define:n
{
bicontentsname .tl_set:N = \bicontentsname,
bicontentsname .initial:n = Contents
}
-\RenewDocumentCommand{\tableofcontents}{st+oD(){}}
+\RenewDocumentCommand{\tableofcontents}{st++o+D(){}}
{
\group_begin:
\tl_set_eq:NN \eb@toc@title \contentsname
@@ -1657,7 +1745,7 @@
{
tocformat = \IfBooleanT{#1}{\contentsmargin{0pt}},
tocindent = 0pt,
- tocrule = \IfBooleanTF{#1}{,~\thecontentspage}{\tocrule{$\cdot$}},
+ tocrule = \IfBooleanTF{#1}{,~\thecontentspage}{\cdottocrule},
toclabel =
{
\bool_if:NTF \l__eb_toc_entry_hang_bool
@@ -1728,7 +1816,7 @@
\eb@register@every@toc@option
}
\RegisterEveryTocOption{tocafter,tocindent,tocrule}
-\NewDocumentCommand{\tocrule}{st-O{0.7pc}d()mO{}}
+\NewDocumentCommand{\tocrule}{st-O{0.6pc}d()mO{}}
{
\normalsize\normalfont
\ttl@row@i[#3]{\IfValueTF{#4}{\scalebox{#4}{#5}}{#5}}#6
@@ -1745,6 +1833,7 @@
}
}
}
+\cs_set:Npn \cdottocrule { \tocrule{\textperiodcentered} }
\ctex_define:nn { toc }
{
lolskip .skip_set:N = \eb@toc@lol@skip,
@@ -1761,6 +1850,8 @@
hang .initial:n = true,
pagenumwd .code:n = \contentsmargin{#1},
pagenumwd .initial:n = 1.55em,
+ fileopen .tl_set:N = \l__eb_fileopen_type_tl,
+ fileopen .initial:n = once,
unknown .code:n = \eb_msg_deprecated_option:n { toc }
}
@@ -1771,8 +1862,7 @@
{
\tl_if_exist:cF { tf@#1 }
{ \iow_new:c { tf@#1 }\iow_open:cn { tf@#1 } { \jobname.#1 } }
- }
- {}
+ }{}
}
\cs_set_eq:NN \eb@starttoc \@starttoc
\cs_set:Npn \@starttoc #1
@@ -1790,16 +1880,30 @@
}
\AddToHook{enddocument/afterlastpage}
{
- \IfHookEmptyTF{starttoc/after}{}
- {\iow_now:Nn \@mainaux { \RemoveFromHook{starttoc/after}[aux] }}
+ \tl_if_eq:NnTF \l__eb_fileopen_type_tl { once }
+ { \iow_now:Nn \@mainaux { \RemoveFromHook{starttoc/after}[*] } }
+ {
+ \IfHookEmptyTF{starttoc/after}{}
+ {\iow_now:Nn \@mainaux { \RemoveFromHook{starttoc/after}[aux] }}
+ }
+ }
+\cs_set_protected:Npn \AssignPartialExt #1#2
+ {
+ \tl_if_exist:cTF { ttl@partial#1 }
+ { \msg_warning:nnnn { easybase } { repeated-ptoc } {#1} {#2} }
+ {
+ \tl_set:cn { ttl@partial#1 } {#2}
+ \AddToHookWithArguments{cmd/ttl@writepartial/before}[ttl/#1]
+ {\ttl@topartial{#1}{##1}{##2}}
+ }
}
-\cs_set_protected:Npn \AllotPartialExt #1#2
+\cs_set_eq:NN \AllotPartialExt \AssignPartialExt
+\msg_new:nnn { easybase } { repeated-ptoc }
{
- \tl_set:cn { ttl@partial#1 } {#2}
- \AddToHookWithArguments{cmd/ttl@writepartial/before}
- {\ttl@topartial{#1}{##1}{##2}}
+ Local~directory~file~'#2'~of~directory~type~'#1'~is \\
+ repeatedly~allocated.
}
-\AllotPartialExt{lol}{pll}
+\AssignPartialExt{lol}{pll}
\cs_new_protected:Npn \RegisterTitleIfname #1
{
@@ -1823,16 +1927,15 @@
}
\RegisterTitleIfname{toc}
-\cs_set_eq:NN \eb@ctexsetii \ctex_set:nn
\cs_new_protected:Npn \SetTocStyle #1#2#3
{
\cs_set_protected:cpn { eb@toc@style@set@#1@#2 }
- { \eb@ctexsetii{#1}{#3} }
+ { \ctex_set:nn {#1} {#3} }
}
\cs_new_protected:Npn \UseTocStyle #1#2#3
{
\cs_if_exist:cTF { eb@toc@style@set@#1@#2 }
- { \addtocontents{#3}{\@nameuse{eb@toc@style@set@#1@#2}} }
+ { \addtocontents{#3}{\string\csuse{eb@toc@style@set@#1@#2}} }
{ \msg_warning:nnnn { easybase } { undefined-toc-style } {#2} {#1} }
}
\msg_new:nnn { easybase } { undefined-toc-style }
@@ -1851,7 +1954,7 @@
{
tocformat = \addvspace{1pc}\sffamily,
tocindent = 0pt,
- tocrule = \tocrule{$\cdot$}[\bfseries],
+ tocrule = \cdottocrule[\bfseries],
tocline = \CTEXnumberline{#1}#2
},
section =
@@ -1861,12 +1964,12 @@
tocrule =
{
\bool_if:NTF \l__eb_class_mode_book_bool
- { \tocrule{$\cdot$} }
- { \tocrule{$\cdot$}[\bfseries] }
+ { \cdottocrule }
+ { \cdottocrule[\bfseries] }
}
},
subsection =
- { tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.4em } }
+ { tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 3.8em } { 1.5em } }
}
\ctex_at_end_package:nn { imakeidx }
@@ -1929,19 +2032,19 @@
\ctex_define:nn { font }
{
- caption-table .tl_set:N = \l__eb_font_caption_table_tl,
- caption-figure .tl_set:N = \l__eb_font_caption_figure_tl,
- caption-listing .tl_set:N = \l__eb_font_caption_listing_tl,
- caption-every .meta:n =
+ caption-table .tl_set:N = \l__eb_font_caption_table_tl,
+ caption-figure .tl_set:N = \l__eb_font_caption_figure_tl,
+ caption-lstlisting .tl_set:N = \l__eb_font_caption_lstlisting_tl,
+ caption-every .meta:n =
{
- caption-table = {#1},caption-figure = {#1},
- caption-listing = {#1}
+ caption-table = {#1},caption-figure = {#1},
+ caption-lstlisting = {#1}
},
- caption-every .initial:n = \sffamily\small,
- footnote .tl_set:N = \eb@font@footnote,
- marginpar .tl_set:N = \marginfont,
- marginpar .initial:n = \footnotesize,
- unknown .code:n = \eb_msg_deprecated_option:n { font }
+ caption-every .initial:n = \sffamily\small,
+ footnote .tl_set:N = \eb@font@footnote,
+ marginpar .tl_set:N = \marginfont,
+ marginpar .initial:n = \footnotesize,
+ unknown .code:n = \eb_msg_deprecated_option:n { font }
}
\cs_new_protected:Npn \ebaddtofont #1#2
{
@@ -1951,13 +2054,13 @@
{ \tl_put_right:Nn \l__eb_font_caption_table_tl {#2} }
{ figure }
{ \tl_put_right:Nn \l__eb_font_caption_figure_tl {#2} }
- { listing }
- { \tl_put_right:Nn \l__eb_font_caption_listing_tl {#2} }
+ { lstlisting }
+ { \tl_put_right:Nn \l__eb_font_caption_lstlisting_tl {#2} }
{ every }
{
\tl_put_right:Nn \l__eb_font_caption_table_tl {#2}
\tl_put_right:Nn \l__eb_font_caption_figure_tl {#2}
- \tl_put_right:Nn \l__eb_font_caption_listing_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_lstlisting_tl {#2}
}
{ footnote }
{ \tl_put_right:Nn \eb@font@footnote {#2} }
@@ -1986,7 +2089,7 @@
fntspread .initial:n = 1.2,
captab-spread .fp_set:N = \l__eb_spread_caption_table_fp,
capfig-spread .fp_set:N = \l__eb_spread_caption_figure_fp,
- caplst-spread .fp_set:N = \l__eb_spread_caption_listing_fp,
+ caplst-spread .fp_set:N = \l__eb_spread_caption_lstlisting_fp,
caption-spread .meta:n =
{
captab-spread = {#1},capfig-spread = {#1},
@@ -2027,7 +2130,7 @@
\AfterPreamble{\skip_set:Nn \abovedisplayshortskip { 0ex plus .1ex }}
\clist_map_inline:nn
- { table,figure,listing }
+ { table,figure,lstlisting }
{
\DeclareCaptionFont{eb@#1@font}
{
@@ -2045,7 +2148,7 @@
}
\captionsetup[table]{font = eb@table@font}
\captionsetup[figure]{font = eb@figure@font}
-\captionsetup[lstlisting]{font = eb@listing@font}
+\captionsetup[lstlisting]{font = eb@lstlisting@font}
\ctex_at_end_package:nn { bicaption }
{
\captionsetup[figure][bi-second]{name = Figure}
@@ -2209,9 +2312,9 @@
\RequirePackage{amsthm,thmtools}
\cs_set_eq:NN \eb@declaretheoremstyle@save \declaretheoremstyle
\cs_set_eq:NN \eb@declaretheorem@save \declaretheorem
- \RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
+ \RenewDocumentCommand{\declaretheoremstyle}{+O{}m+O{}}
{\eb@declaretheoremstyle@save[#1,#3]{#2}}
- \RenewDocumentCommand{\declaretheorem}{O{}mO{}}
+ \RenewDocumentCommand{\declaretheorem}{+O{}m+O{}}
{
\eb@declaretheorem@save[style = default,#1,#3]{#2}
\settheoremtocline{#2}
@@ -2219,6 +2322,9 @@
\listnumberline{#2}
\thmtname\thmtifnote{~(\thmtnote)}{}
}
+ \cs_gset:cpn { thmt@contentsline@#2 }
+ { \thmt@contentslineIfNamed }
+ \exp_args:Nc \providecommand { p@#2 }[1]{##1}
}
\ctex_define:nn { thmt }
{
@@ -2239,7 +2345,7 @@
\theoremstyle{default}
\cs_undefine:N \proof
\DeclareFloatList{theorem}{loe}
- \AllotPartialExt{loe}{ple}
+ \AssignPartialExt{loe}{ple}
\eb_preto_cmd:nn { listoftheorems }
{
\group_begin:
@@ -2625,7 +2731,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/06/18}{2024cf}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/07/29}{2024da}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx b/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx
index 43c6631bba5..c20c966b8b1 100644
--- a/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx
+++ b/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx
@@ -26,7 +26,7 @@
%<fancyhdr>\ProvidesPackage{fancyhdr}%
%<fancyheadings>\ProvidesPackage{fancyheadings}
%<extramarks>\ProvidesPackage{extramarks}
-%<fancyhdr|extramarks> [2024/04/23 v4.2
+%<fancyhdr|extramarks> [2024/07/23 v4.3.1
%<fancyhdr> Extensive control of page headers and footers]%
%<fancyheadings> [2022/11/09 v4.1
%<fancyheadings> Legacy package to call fancyhdr]
@@ -59,8 +59,6 @@
\def\pAmS{{\the\textfont2
A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
\def\amslatex/{\ams/-\latex/}
-\newcommand{\PSNFSS}{{\sf
- PSNFSS}}
\newcommand{\bs}{\symbol{'134}}
\newcommand{\env}[1]{\texttt{#1}}
\newcommand{\Package}[1]{\textsf{#1}}
@@ -206,7 +204,7 @@
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
% \DoNotIndex{\@ne}
% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
-% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
+% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\@empty,\endgroup}
%
% \title{The \Package{fancyhdr} and \Package{extramarks}
% packages\\{\normalsize version \fileversion.}}
@@ -228,7 +226,7 @@
%
% This documentation describes version 4.0 or later of the
% \Package{fancyhdr} and \Package{extramarks} packages. The user
-% documentation is valid for the versions 3.8 or later of the
+% documentation is valid for the versions 4.0 or later of the
% \Package{fancyhdr} package (except for the changes mentioned in
% section~\ref{sec:version-4}), and version 2.1 or later of the
% \Package{extramarks} package.
@@ -253,11 +251,11 @@
%
% Part IV contains the annotated implementation.
%
-% This document describes version 4 of \Package{fancyhdr}. This version
-% is also described in the forthcoming edition 3 of \textit{The \latex/ Companion},
-% whereas the previous editions describe version 3 of \Package{fancyhdr}.
-% There are some significant differences between these versions. These
-% are summarized in section~\ref{sec:version-4} on page~\pageref{sec:version-4}.
+% This document describes version 4 of \Package{fancyhdr}, which is described in
+% the \emph{The \LaTeX{} Companion, Third Edition}.
+% The differences between this version and previous versions
+% are summarized in section~\ref{sec:version-4} on
+% page~\pageref{sec:version-4}.
% Throughout this documentation it is mentioned when a specific feature
% is only available in version 4, or when there are differences between
% version 3 and 4.
@@ -304,16 +302,14 @@
% \OPTindex{twoside}
% \OPTindex{headings}
% \OPTindex{myheadings}
-% \DescribeMacro{\fancyhead}
-% \DescribeMacro{\fancyfoot}
-% \DescribeMacro{\fancyhf}
-% \begin{verbatim}
-% \fancyhead[places]{field}
-% \fancyfoot[places]{field}
-% \fancyhf[places]{field}
-% \end{verbatim}
-% Here \texttt{places} is a comma-separated list of places where
-% \texttt{field} will be placed. There are 12 places defined: Left,
+%
+% \begin{flushleft}
+% \DescribeMacro{\fancyhead}\cmd{\fancyhead}\oarg{places}\marg{field} \\
+% \DescribeMacro{\fancyfoot}\cmd{\fancyfoot}\oarg{places}\marg{field} \\
+% \DescribeMacro{\fancyhf}\cmd{\fancyhf}\oarg{places}\marg{field}
+% \end{flushleft}
+% Here \meta{places} is a comma-separated list of places where
+% \meta{field} will be placed. There are 12 places defined: Left,
% Center and Right Headers and Footers, and both can be on Even or Odd
% pages. Each place therefore has 3 coordinates which are the inital
% letters of the above description: (1) \texttt{E} or \texttt{O}, (2) \texttt{L}, \texttt{C} or
@@ -321,14 +317,12 @@
% letters, like \texttt{EOH}. A missing coordinate means: all
% possibilities, except for \cs{fancyhead} where \texttt{H} is implied
% and \cs{fancyfoot} where \texttt{F} is implied.
-% \DescribeMacro{\fancyheadoffset}
-% \DescribeMacro{\fancyfootoffset}
-% \DescribeMacro{\fancyhfoffset}
-% \begin{verbatim}
-% \fancyheadoffset[places]{field}
-% \fancyfootoffset[places]{field}
-% \fancyhfoffset[places]{field}
-% \end{verbatim}
+%
+% \begin{flushleft}
+% \DescribeMacro{\fancyheadoffset}\cmd{\fancyheadoffset}\oarg{places}\marg{length} \\
+% \DescribeMacro{\fancyfootoffset}\cmd{\fancyfootoffset}\oarg{places}\marg{length} \\
+% \DescribeMacro{\fancyhfoffset}\cmd{\fancyhfoffset}\oarg{places}\marg{length}
+% \end{flushleft}
% These define offsets to let the headers stick into the margin (or to
% the inside if negative). Places cannot contain the \texttt{C}
% specifier. See section~\ref{sec:book-examples} for more details.
@@ -340,7 +334,6 @@
% \DescribeMacro{\headrule}
% \DescribeMacro{\footrule}
% \DescribeMacro{\headwidth}
-%
% \cs{headrulewidth} and \cs{footrulewidth} are macros to define the
% thickness of a line under the header and above the footer.
% \cs{headruleskip} and \cs{footruleskip} are macros that define the
@@ -353,7 +346,6 @@
% \DescribeMacro{\fancyheadinit}
% \DescribeMacro{\fancyfootinit}
% \DescribeMacro{\fancyhfinit}
-%
% \cs{fancyheadinit} and \cs{fancyfootinit} can be used to define
% initialisation code for the header and footer, respectively, and
% \cs{fancyhfinit} defines both of these. These commands are only
@@ -367,7 +359,6 @@
% \DescribeMacro{\ifbotfloat}
% \DescribeMacro{\iffloatpage}
% \DescribeMacro{\iffootnote}
-%
% The macros \cs{iftopfloat}, \cs{ifbotfloat}, \cs{iffloatpage} and
% \cs{iffootnote} are used to detect if there is a float on the top or
% the bottom of the page, or the page is a float page, or if there is
@@ -375,10 +366,10 @@
% different headers and/or footers if these conditions are met. See
% section~\ref{sec:float} for more details.
%
-% \begin{quote}
-% \DescribeMacro{\fancypagestyle}
-% \verb|\fancypagestyle|\marg{style-name}\oarg{base-style}\marg{definitions}
-% \end{quote}
+% \begin{flushleft}
+% \DescribeMacro{\fancypagestyle}
+% \cmd{\fancypagestyle}\marg{style-name}\oarg{base-style}\marg{definitions}
+% \end{flushleft}
% This command lets you (re)define page styles for use in special
% situations. See section~\ref{sec:fancypagestyle} for more details.
%
@@ -393,13 +384,6 @@
% \DescribeMacro{\lastrightmark}
% \DescribeMacro{\firstrightmark}
% \DescribeMacro{\lastleftmark}
-% \begin{verbatim}
-% \firstleftmark
-% \lastrightmark
-% \firstrightmark
-% \lastleftmark
-% \end{verbatim}
-%
% Standard \latex/ has two marks: a left and a right one. The standard
% command \cs{leftmark} gives you the last left mark on a page, and
% \cs{rightmark} gives you the first right one. These macros give you
@@ -486,7 +470,7 @@
%
% The page headers and footers in \LaTeX{} are defined by the
% \cs{pagestyle} and \cs{pagenumbering} commands. \cs{pagestyle}
-% defines the general contents of the headers and footers (e.g. where the
+% defines the general contents of the headers and footers (e.g.\ where the
% page number will be printed), while
% \cs{pagenumbering} defines the format of the page number.
% \LaTeX{} has four standard page styles:
@@ -527,7 +511,7 @@
%
% These are not user commands, but rather ``variables'' that are used by
% \latex/'s output routine.
-% As the command names contain the character '\texttt{@}', they should
+% As the command names contain the character `\texttt{@}', they should
% be defined in a package file, or otherwise be sandwiched between the commands
% \cs{makeatletter} and \cs{makeatother}.
%
@@ -605,6 +589,12 @@
% We define each of the six ``fields'' and the two decorative lines
% separately.
%
+% \begin{fblock}
+% \textbf{NOTE:} In \Package{fancyhdr} version 4.3 and later, paragraph
+% hooks will not work inside \Package{fancyhdr} headers and footers to
+% avoid unwanted interactions with the main text.
+% \end{fblock}
+%
% \section{A simple example}
% \label{sec:simple}
%
@@ -784,7 +774,7 @@
% for which pages and/or parts of the header/footer they apply. The first
% \cs{fancyhead} command above omits this parameter, and thus applies to all
% header fields. In general this is only useful to get rid of the defaults or
-% a previous definition, as is done here. Similar the \cs{fancyfoot} command
+% a previous definition, as is done here. Similarly the \cs{fancyfoot} command
% without square brackets clears all footer fields. In this particular
% example it could be omitted as all footer fields have a value specified.
% The selectors that can be used
@@ -846,7 +836,7 @@
% \cs{ps@plain} command, but \Package{fancyhdr} gives you an easier way
% with the \cs{fancypagestyle} command. This command can be used to
% redefine existing page styles (like \texttt{plain}) or to define new ones,
-% e.g. if part of your document needs a different page style. This command
+% e.g.\ if part of your document needs a different page style. This command
% has two mandatory parameters: the first one is the name of the page style to be defined, the
% second consists of commands that change the headers and/or footers, i.e.,
% \verb|\fancyhead| etc. Also allowed are changes to \cs{headrulewidth} and
@@ -1105,8 +1095,8 @@
% section and subsection information (section only for one-sided
% printing). \latex/ uses a marker mechanism to remember the chapter and
% section (section and subsection) information for a page; this is
-% discussed in detail in \textit{The \latex/ Companion}, Section 4.3.1, or
-% \textit{The \latex/ Companion, Second Edition}, Section 4.3.4.
+% discussed in detail in \emph{The \LaTeX{} Companion, Third Edition},
+% section 5.3.4 (Part I).
%
% There are two ways you can use and change the higher- and lower-level
% sectioning information available to you. The macros:
@@ -1263,7 +1253,7 @@
%
% As an example let's take a page layout where the leftmarks are generated by
% the sections and the rightmarks by the subsections (as is default in the
-% \texttt{article} class). Take a page with some short sections, e.g.
+% \texttt{article} class). Take a page with some short sections, e.g.,
%
% \begin{samepage}
% \noindent Section 1.\\
@@ -1294,7 +1284,7 @@
% \end{verbatim}
%
% Another problem with the marks in the standard \latex/ classes is that the
-% higher level sectioning commands (e.g. \cs{chapter}) call
+% higher level sectioning commands (e.g.\ \cs{chapter}) call
% \cs{markboth} with an empty right argument. This means that on the first
% page of a chapter (or a section in article style) the \cs{rightmark}
% will be empty. The underlying problem is that the \tex/ machinery has
@@ -1310,7 +1300,7 @@
% \cs{chapter} etc.\ commands do \emph{not} call the mark commands. So if
% you want your preface to set the header info but not be numbered nor be put in
% the table of contents, you must issue the \cs{markboth} command
-% yourself, e.g.
+% yourself, e.g.,
%
% \begin{verbatim}
% \chapter*{Preface}
@@ -1378,7 +1368,8 @@
% \footnote{If you use \texttt{11pt} or \texttt{12pt} you will probably also
% have to do this, because \LaTeX's defaults are quite small}. See the
% warning below.
-% See also Section 4.1 of the \latex/ \emph{Companion} for detail.
+% See also section 5.1 and 5.2 of the \LaTeX{} \emph{Companion, Third Edition}, (Part I)
+% for detail.
%
% For instance, the following code will place the section title and the
% subsection title of an article in two lines in the upper right hand
@@ -1626,7 +1617,7 @@
% in the neighborhood of your header/footer definitions, unless you
% already use such an \texttt{\ldots offset} command, of course.
% \vspace{\baselineskip}
-%
+%
% For the second example, we take the \amslatex/ book\footnote{George Gratzer,
% \textit{Math into LaTeX, An Introduction to \LaTeX{} and \amslatex/}, Birkhauser, Boston.}.
%
@@ -1661,18 +1652,19 @@
% \renewcommand{\footrulewidth}{0pt}
% \end{verbatim}
%
-% The font used in the headers is 9 pt bold Helvetica. The \PSNFSS\ system
-% by Sebastian Rahtz uses the short (Karl Berry) name \verb|phv| for
-% Helvetica, so this font is selected with the commands:
+% The font used in the headers is 9 pt bold Helvetica. The \textsf{PSNFSS} system
+% (originally by the late Sebastian Rahtz) uses the short (Karl Berry) name \texttt{phv} for
+% Helvetica. The more modern \LaTeX{} solution is to use the \TeX{} Gyre font
+% Heros, which uses the short name \texttt{qhv} so this font is selected with the commands^^A
+% \footnote{See \emph{The \LaTeX{} Companion, Third Edition}, Part I, section
+% 9.5.2, and Part II, section 10.8.16.}:
% \begin{verbatim}
-% \fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont
+% \fontfamily{qhv}\fontseries{b}\fontsize{9}{11}\selectfont
% \end{verbatim}
-% (See Sections 7.6.1 and 11.9.1 of the \latex/ \emph{Companion} or
-% Sections 7.6 and 7.9.1 of \emph{The \latex/ Companion, Second Edition}.)
% Let us define a shorthand for this:
% \begin{verbatim}
% \newcommand{\helv}{%
-% \fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
+% \fontfamily{qhv}\fontseries{b}\fontsize{9}{11}\selectfont}
% \end{verbatim}
%
% Now we are ready for the page layout:
@@ -1688,7 +1680,7 @@
% \renewcommand{\headrulewidth}{0.5pt}
% \renewcommand{\footrulewidth}{0pt}
% \newcommand{\helv}{%
-% \fontfamily{phv}\fontseries{b}\fontsize{9}{11}\selectfont}
+% \fontfamily{qhv}\fontseries{b}\fontsize{9}{11}\selectfont}
% \fancyhf{}
% \fancyhead[LE,RO]{\helv \thepage}
% \fancyhead[LO]{\helv \rightmark}
@@ -1719,6 +1711,21 @@
% \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
% \end{verbatim}
%
+% \textbf{NOTE:} There is also a package \TTindex{floatpag}%
+% \Package{floatpag}\footnote{\url{https://www.ctan.org/pkg/floatpag}} by Vytas
+% Statulevičius and Sigitas Tolušis that has a command
+% \cs{floatpagestyle}\marg{pagestyle}, that applies \meta{pagestyle} to
+% all float pages, where \meta{pagestyle} can be defined with
+% \cs{fancypagestyle} (or by any other means).
+%
+% \textbf{NOTE:} There is also a package \TTindex{floatpag}%
+% \Package{floatpag}\footnote{\url{https://www.ctan.org/pkg/floatpag}} by Vytas
+% Statulevičius and Sigitas Tolušis that has a command
+% \cs{floatpagestyle}\marg{pagestyle}, that applies \meta{pagestyle} to
+% all float pages, where \meta{pagestyle} can be defined with
+% \cs{fancypagestyle} (or by any other means). In some cases this might
+% be simpler than putting \cs{iffloatpage} in various headers or footers.
+%
% Sometimes you may want to change the layout also for pages that contain a
% float on the top of the page, a float on the bottom of the page or a footnote on the bottom of the page.
%
@@ -1848,12 +1855,16 @@
% \CmdIndex{pagenumbering}
%
% \begin{verbatim}
+% \clearpage
% \pagenumbering[\thesection]{bychapter}
% \end{verbatim}
%
% What the package also does is reset the page number to 1 at the beginning
% of each chapter.
%
+% In general it is advisable to give a \cs{clearpage} or
+% \cs{cleardoublepage} before changing the page numbering.
+%
% In the frontmatter of your document (for example the Table of
% Contents) there will be no chapter numbers. Therefore a simple page
% number will be used there. This may be confusing, so you might prefer to use roman pagenumbers
@@ -2601,7 +2612,7 @@
% \end{enumerate}
%
% In the first two cases you must first check if you have given the correct
-% ``placement'' parameter to you float, e.g. \Cmd{begin\{figure\}[htp]}
+% ``placement'' parameter to you float, e.g.\ \Cmd{begin\{figure\}[htp]}
% specifies that your figure may be placed either: Here (i.e., in the text
% position where the command is given), on the Top of a page (which may be
% the page where you put the command), or on a separate Page of floats. You
@@ -2660,7 +2671,7 @@
% than 50\% of the page height it will have to wait until some more floats
% are given before a float page can be filled to satisfy the
% \cs{floatpagefraction} parameter. If you have this kind of behaviour you
-% can easily adapt the parameters, e.g. with:
+% can easily adapt the parameters, e.g.\ with:
% \begin{verbatim}
% \renewcommand{\textfraction}{0.05}
% \renewcommand{\topfraction}{0.95}
@@ -2673,7 +2684,7 @@
%
% You can force \latex/ to ignore most of the parameters for one specific float
% occurrence by
-% including an exclamation mark (!) in the placement parameters, e.g.
+% including an exclamation mark (!) in the placement parameters, e.g.,
% \begin{verbatim}
% \begin{figure}[!htb]
% \end{verbatim}
@@ -2811,7 +2822,7 @@
% normal text rather than a \cs{caption}, so that it will not be entered in
% the list of figures. It may also be desirable to issue a \cs{clearpage}
% first, just like we did for the \texttt{longtable}, and to encapsulate this
-% in the \cs{afterpage} command. E.g.
+% in the \cs{afterpage} command. E.g.,
% \begin{verbatim}
% \afterpage{\clearpage\input{myfigure}}
% \end{verbatim}
@@ -2832,7 +2843,7 @@
%
% You have to make sure that the last part is big enough, otherwise \LaTeX{}
% could decide to postpone it until it has collected some more floats. This
-% can be done either by making the figure big enough (e.g. by adding some
+% can be done either by making the figure big enough (e.g.\ by adding some
% \cs{vspace}), or by tweaking the \cs{floatpagefraction}
% \CmdIndex{floatpagefraction} parameter.
%
@@ -3054,9 +3065,27 @@
% \cs{input} in headers/footers when \texttt{verbatim} is active.
% (Issue \# 8 \url{https://github.com/pietvo/fancyhdr/issues/8}.)
% \end{itemize}
+% \item Version 4.3, July 17, 2024
+% \begin{itemize}
+% \item Changed \cs{f@nch@everypar}. If the LaTeX kernel has
+% \texttt{expl3}, use \cs{tex\_everypar:D}, and reset \cs{par},
+% \cs{@@par} and \cs{endgraf} to their original \TeX{} definitions, so that
+% no paragraph hooks will intrude in \Package{fancyhdr} code\footnote
+% {See \url{https://tex.stackexchange.com/q/691262/113546}}.
+% Therefore paragraph hooks will not work inside \Package{fancyhdr} headers and
+% footers to avoid unwanted interactions with the main text.
+% \end{itemize}
+% \item % Version 4.3.1, July 23, 2024
+% \begin{itemize}
+% \item Also reset \cs{everypar} to its original \TeX{} value
+% \cs{tex\_everypar:D} in \cs{f@nch@resetpar}, otherwise environments
+% based on \cs{trivlist} will not work properly in \Package{fancyhdr}
+% headers and footers.
+% \end{itemize}
% \end{itemize}
%
%
+%
% \StopEventually{%
% \PrintChanges
% \PrintIndex}
@@ -3648,26 +3677,8 @@
\ProcessOptions*
% \end{macrocode}
%
-% \begin{macro}{\f@nch@errmsg}
-% This macro generates an error message.
-% \changes{fancyhdr v3.10}{2019/01/25}{Use \cs{f@nch@ifundefined} instead of \cs{ifx}.}
-% \changes{fancyhdr v3.10}{2019/01/25}{Use \cs{newcommand} instead of \cs{def}.}
-% \begin{macrocode}
-\newcommand\f@nch@errmsg[1]{%
- \f@nch@ifundefined{PackageError}{\errmessage{#1}}{\PackageError{fancyhdr}{#1}{}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\f@nch@warning}
-% This macro generates a warning.
-% \changes{fancyhdr v3.10}{2019/01/25}{Use \cs{f@nch@ifundefined} instead of \cs{ifx}.}
-% \changes{fancyhdr v3.10}{2019/01/25}{Use \cs{newcommand} instead of \cs{def}.}
-% \begin{macrocode}
-\newcommand\f@nch@warning[1]{%
- \f@nch@ifundefined{PackageWarning}{\errmessage{#1}}{\PackageWarning{fancyhdr}{#1}{}}}
-% \end{macrocode}
-% \end{macro}
-%
+% \changes{fancyhdr v4.3}{2024/05/08}{Removed \cs{f@nch@errmsg} and
+% \cs{f@nch@warning} and used \cs{PackageError} and \cs{PackageWarning} directly.}
% \begin{macro}{\f@nch@forc}
% Usage: \cs{f@nch@forc} \cs{var} \texttt{\{charstring\}\{body\}}.\\
% Execute the body for each character in \texttt{charstring} bound
@@ -3766,7 +3777,7 @@
\if@twoside\else
\iff@nch@twoside\else
\if\f@nch@@eo e%
- \f@nch@warning {\string#1's `E' option without twoside option is useless.\MessageBreak
+ \PackageWarning{fancyhdr} {\string#1's `E' option without twoside option is useless.\MessageBreak
Please consider using the `twoside' option}%
\fi\fi\fi
}
@@ -3791,8 +3802,8 @@
\f@nch@forc\tmpf@ra{#3}%
{\expandafter\f@nch@ifin\tmpf@ra{eolcrhf,EOLCRHF}%
{}{\edef\temp@c{\temp@c\tmpf@ra}}}%
- \ifx\@empty\temp@c\else \f@nch@errmsg{Illegal char `\temp@c' in
- \string#1 argument: [#3]}%
+ \ifx\@empty\temp@c\else \PackageError{fancyhdr}{Illegal char `\temp@c' in
+ \string#1 argument: [#3]}{}%
\fi \f@nch@for\temp@c{#3}%
{\f@nch@default\f@nch@@eo{eo}\temp@c
\f@nch@fancyhf@Echeck{#1}%
@@ -3827,8 +3838,8 @@
\f@nch@forc\tmpf@ra{#3}%
{\expandafter\f@nch@ifin\tmpf@ra{eolrhf,EOLRHF}%
{}{\edef\temp@c{\temp@c\tmpf@ra}}}%
- \ifx\@empty\temp@c\else \f@nch@errmsg{Illegal char `\temp@c' in
- \string#1 argument: [#3]}%
+ \ifx\@empty\temp@c\else \PackageError{fancyhdr}{Illegal char `\temp@c' in
+ \string#1 argument: [#3]}{}%
\fi \f@nch@for\temp@c{#3}%
{\f@nch@default\f@nch@@eo{eo}\temp@c
\f@nch@fancyhf@Echeck{#1}%
@@ -4000,6 +4011,14 @@
% \begin{macro}{\f@nch@raggedright}
% \begin{macro}{\f@nch@centering}
% \begin{macro}{\f@nch@everypar}
+% \changes{fancyhdr v4.3}{2024/07/17}{Changed \cs{f@nch@everypar}. If the
+% LaTeX kernel has expl3, use \cs{tex\_everypar:D}, and reset \cs{par},
+% \cs{@@par} and \cs{endgraf} to their original \TeX{} definitions, so that
+% no paragraph hooks will intrude in \Package{fancyhdr} code.}
+% \changes{fancyhdr v4.3.1}{2024/07/23}{Also reset \cs{everypar} to its
+% original \TeX{} value \cs{tex\_everypar:D} in \cs{f@nch@resetpar},
+% otherwise environments based on \cs{trivlist}
+% will not work properly in \Package{fancyhdr} headers and footers.}
% Save the standard definitions of \cs{raggedleft}, \cs{raggedright},
% \cs{centering} and \cs{everypar} so that we can reset them when we are
% typesetting the headers and footers. Some packages change these to
@@ -4008,7 +4027,23 @@
\let\f@nch@raggedleft\raggedleft
\let\f@nch@raggedright\raggedright
\let\f@nch@centering\centering
-\let\f@nch@everypar\everypar
+\ifdefined\ExplSyntaxOn
+ \ExplSyntaxOn
+ \let\f@nch@everypar\tex_everypar:D
+ \newcommand\f@nch@resetpar{%
+ \f@nch@everypar{}%
+ \cs_set_eq:NN \everypar\tex_everypar:D
+ \cs_set_eq:NN \par \tex_par:D
+ \cs_set_eq:NN \@@par \tex_par:D
+ \cs_set_eq:NN \endgraf \tex_par:D
+ }
+ \ExplSyntaxOff
+\else
+ \let\f@nch@everypar\everypar
+ \newcommand\f@nch@resetpar{%
+ \f@nch@everypar{}%
+ }
+\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -4044,8 +4079,10 @@
% \changes{fancyhdr v4.2}{2024/04/19}{Reset catcodes to their default
% values in order to facilitate \cs{input} in headers/footers when \texttt{verbatim}
% is active. (Issue \# 8 \url{https://github.com/pietvo/fancyhdr/issues/8}.)}
+% \changes{fancyhdr v4.3}{2024/05/08}{Remove pre-NFSS stuff}
+% \changes{fancyhdr v4.3}{2024/07/17}{Replace \cs{f@nch@everypar} by \cs{f@nch@resetpar}.}
% \begin{macrocode}
-\def\f@nch@reset{\f@nch@everypar{}\restorecr\endlinechar=13
+\def\f@nch@reset{\f@nch@resetpar\restorecr\endlinechar=13
\catcode`\\=0\catcode`\{=1\catcode`\}=2\catcode`\$=3\catcode`\&=4
\catcode`\#=6\catcode`\^=7\catcode`\_=8\catcode`\ =10\catcode`\@=11
\catcode`\:=11\catcode`\~=13\catcode`\%=14
@@ -4061,10 +4098,8 @@
\expandafter\def\csname MakeUppercase\space\space\space\endcsname
[####1]####2{####2}%
##1}}%
- \f@nch@ifundefined{@newbaseline} % NFSS not present; 2.09 or 2e
- {\f@nch@ifundefined{@normalsize} {\normalsize} % for ucthesis.cls
- {\@normalsize}}%
- {\@newbaseline}% NFSS (2.09) present
+ \f@nch@ifundefined{@normalsize} {\normalsize} % for ucthesis.cls
+ {\@normalsize}%
}
% \end{macrocode}
% \end{macro}
@@ -4213,7 +4248,7 @@
% \begin{macrocode}
\iff@nch@check
\dimen0=#1\advance\dimen0-\ht0
- \f@nch@warning{%
+ \PackageWarning{fancyhdr}{%
\string#1 is too small (\the#1): \MessageBreak
Make it at least \the\ht0, for example:\MessageBreak
\string\setlength{\string#1}{\the\ht0}%
@@ -4309,7 +4344,7 @@
% \cs{color} command. The \cs{ignorespaces} skips initial spaces in
% the parameter, as is usual in a \cs{parbox}, for backwards compatibility.}
% We put the \cs{footrule} in a \cs{vbox} to accommodate for flexible
-% footrules (e.g. using \cs{hrulefill}), so that the \cs{headwidth} will
+% footrules (e.g.\ using \cs{hrulefill}), so that the \cs{headwidth} will
% be used as the line width. But to preserve the vertical spacing we
% then \cs{unvbox} this box.
%
@@ -4348,7 +4383,7 @@
% \end{macro}
%
% \begin{macro}{\@chapapp}
-% Define \cs{@chapapp} for classes that don't have it, e.g. amsbook
+% Define \cs{@chapapp} for classes that don't have it, e.g.\ amsbook
% \begin{macrocode}
\f@nch@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%
% \end{macrocode}
@@ -4660,9 +4695,10 @@
% \begin{macro}{\iffootnote}
% These can be used in a header/footer field to make them conditional on
% the presence of floats and/or footnotes.
+% \changes{fancyhdr v4.3}{2024/05/08}{Replace \cs{empty} with \cs{@empty}}
% \begin{macrocode}
-\newcommand\iftopfloat[2]{\ifx\topfloat\empty #2\else #1\fi}%
-\newcommand\ifbotfloat[2]{\ifx\botfloat\empty #2\else #1\fi}%
+\newcommand\iftopfloat[2]{\ifx\topfloat\@empty #2\else #1\fi}%
+\newcommand\ifbotfloat[2]{\ifx\botfloat\@empty #2\else #1\fi}%
\newcommand\iffloatpage[2]{\if@fcolmade #1\else #2\fi}%
\newcommand\iffootnote[2]{\iff@nch@footnote #1\else #2\fi}%
% \end{macrocode}
@@ -4688,10 +4724,10 @@
% \begin{macrocode}
\long\def\f@nch@pagestyle#1[#2]#3{%
\f@nch@ifundefined{ps@#2}{%
- \f@nch@errmsg{\string\fancypagestyle: Unknown base page style `#2'}%
+ \PackageError{fancyhdr}{\string\fancypagestyle: Unknown base page style `#2'}{}%
}{%
\f@nch@ifundefined{f@nch@ps@#2-is-fancyhdr}{%
- \f@nch@errmsg{\string\fancypagestyle: Base page style `#2' is not fancyhdr-based}%
+ \PackageError{fancyhdr}{\string\fancypagestyle: Base page style `#2' is not fancyhdr-based}{}%
}%
{%
\@namedef{ps@#1}{\let\f@nch@gbl\relax\@nameuse{ps@#2}#3\relax}%
diff --git a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
index 152737eaf77..5615d3f6976 100644
--- a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/03/20}
-\def\LaTeXFirstAidVersion{v1.1e}
+\def\LaTeXFirstAidDate{2024/06/25}
+\def\LaTeXFirstAidVersion{v1.1f}
% \end{macrocode}
%
% \begin{macrocode}
@@ -721,6 +721,29 @@
}
% \end{macrocode}
%
+% \subsection{The \pkg{arydshln} package first aid}
+%
+% Making two internal commands robust to avoid expansion while constructing the array preamble.
+% \begin{macrocode}
+\AddToHook{package/arydshln/after}[firstaid]{%
+ \FirstAidNeededT{arydshln}{sty}{2019/02/21 v1.76 }
+ {%
+% add \protected
+\protected\def\adl@@vlineL#1#2#3#4{\adl@ivline#4\@nil{#1}{#2}%
+ \xdef\adl@colsL{\adl@colsL
+ \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+ {\adl@dashcolor}{\adl@gapcolor}}}%
+\protected\def\adl@@vlineR#1#2#3#4{\adl@ivline#4\@nil{#1}{#2}%
+ \xdef\adl@colsR{%
+ \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+ {\adl@dashcolor}{\adl@gapcolor}%
+ \adl@colsR}}%
+\let\adl@act@@vlineL\adl@@vlineL
+\let\adl@act@@vlineR\adl@@vlineR
+ }%
+}
+% \end{macrocode}
+%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/heria/heria.dtx b/Master/texmf-dist/source/latex/heria/heria.dtx
index 5c6b5e96916..60cc0162f13 100644
--- a/Master/texmf-dist/source/latex/heria/heria.dtx
+++ b/Master/texmf-dist/source/latex/heria/heria.dtx
@@ -1,10 +1,10 @@
% \iffalse meta-comment
%
-% Copyright 2023 Tristan Miller
-% -----------------------------
+% Copyright 2023, 2024 Tristan Miller
+% -----------------------------------
%
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% https://www.latex-project.org/lppl.txt
@@ -18,11 +18,11 @@
\ProvidesFile{heria.dtx}
%</driver>
%<*class>
-%% Copyright 2023 Tristan Miller
+%% Copyright 2023, 2024 Tristan Miller
%% Copyright 2016 John Kormylo
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
@@ -33,7 +33,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{heria}
%<*class>
-[2023-12-04 v3.2.1.0 Class for Horizon Europe (R)IA proposals]
+[2024-07-14 v3.4.1.0 Class for Horizon Europe (R)IA proposals]
%</class>
%
%<*driver>
@@ -50,7 +50,7 @@
%</driver>
% \fi
%
-% \CheckSum{1506}
+% \CheckSum{1520}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -80,8 +80,9 @@
% for an explanation of the versioning scheme.}}
%
% \author{Tristan Miller\\
-% Austrian Research Institute for Artificial Intelligence\\
-% \texttt{tristan.miller@ofai.at}}
+% Department of Computer Science\\
+% University of Manitoba\\
+% \texttt{Tristan.Miller@umanitoba.ca}}
%
% \maketitle
% \tableofcontents
@@ -104,14 +105,9 @@
% the user. The advantage of this becomes clear when one considers
% that much of the data is reused across multiple tables.
%
-% At the time of writing (2023-12-04), open calls to the RIA and IA
-% calls require proposals to be submitted according to either
-% Version~3.2 (2022-11-15) or Version~3.3 (2023-09-27) of the Part~B
-% template. The \textsf{heria} package was developed with reference
-% to the Version~3.2 template; however, according to the changelog for
-% the Version~3.3 template, the only difference from the previous
-% version is the addition of some instructions concerning the use of
-% generative AI tools for the preparation of the proposal.
+% The \textsf{heria} package can be used to write proposals using
+% either Version~3.2 (2022-11-15), 3.3 (2023-09-27), or 3.4
+% (2024-04-04) of the official Part~B template.
%
% \section{Usage}
%
@@ -140,8 +136,20 @@
%
% \medskip
%
-% \noindent Following \cs{documentclass} you should provide the
-% proposal metadata using the following macros:
+% \noindent Following \cs{documentclass} you should tell
+% \textsf{heria} which version of the official Part~B template you
+% want to use:
+%
+% \DescribeMacro{\templateversion} This macro sets the version of the
+% official Part~B template the proposal should use. It takes a single
+% argument; valid values are \verb|3.2|, \verb|3.3|, and \verb|3.4|.
+% If you omit this macro, \textsf{heria} will default to using the
+% latest version of the template.
+%
+% \medskip
+%
+% \noindent You should then provide the proposal metadata using the
+% following macros:
%
% \DescribeMacro{\title} This macro takes the title of the proposal as
% its sole argument. This title will be printed by the \cs{maketitle}
@@ -446,18 +454,6 @@
%
% \section{Limitations and caveats}
%
-% \paragraph{No backward compatibility.} This version of the
-% \textsf{heria} class implements a specific version of the official
-% Horizon Europe template as described in §\ref{sec:introduction}. It
-% is intended that \textsf{heria}, over the course of its development,
-% will track changes made to the official template. Since these
-% changes may be incompatible with previous versions, you are advised
-% to retain a copy of the version of \textsf{heria} you used to
-% produce a proposal; this way you will still be able to build the
-% proposal even if you later install a new version of \textsf{heria}.
-% See §\ref{sec:version} for further information on \textsf{heria}'s
-% versioning scheme and when to expect breaking changes.
-%
% \paragraph{Table 3.1h.} The instructions in the official template
% are ambiguous about the construction of the tables for purchase
% costs. In particular, it's not clear whether each individual cost
@@ -497,21 +493,26 @@
%
% Each release of the \textsf{heria} class carries a version number in
% the format \textit{omaj.\allowbreak omin.\allowbreak maj.\allowbreak
-% min}. Here \textit{omaj.omin} is the version number of the official
-% Horizon Europe RIA template that the class implements, and
+% min}. Here \textit{omaj.omin} is the highest version number of the
+% official Horizon Europe RIA template that the class implements, and
% \textit{maj} and \textit{min} represent, respectively, major and
% minor revisions to the class (including any ancillary files, such as
% the skeleton proposal and documentation). A major revision is one
-% that includes breaking changes or significant new features; minor
-% revisions are for all other changes. You should generally assume
-% that any change to \textit{omaj.omin} introduces breaking changes to
-% the class interface and\slash or significant changes to the official
-% proposal preparation instructions.
+% that includes potentially breaking changes or significant new
+% features; minor revisions are for all other changes. While efforts
+% will be made to preserve compatibility with earlier versions of the
+% official template (via the \cs{templateversion} macro), any change
+% to \textit{omaj.omin} could unavoidably introduce breaking changes
+% to the class interface. Any such changes will be noted in the
+% package documentation.
%
% \subsection{Version history}
%
% \begin{description}
-% \item[v3.2.1.0 (2023-12-04)] Initial release.
+% \item[v3.4.1.0 (2024-07-14)] Add support for version 3.4 of the
+% official Part~B template and the \cs{templateversion} macro for
+% backward compatibility with earlier versions.
+% \item[v3.2.1.0 (2023-12-04)] Initial release.
% \end{description}
%
% \section{Disclaimer}
@@ -599,6 +600,22 @@
\definecolor{summaryblue}{HTML}{00B0F0}
% \end{macrocode}
%
+% \subsection*{Set official Horizon Europe template version}
+%
+% \begin{macrocode}
+\gdef\@templateversion{3.4} % Default version
+\def\@supportedtemplateversions{3.2,3.3,3.4} % Supported versions
+\ExplSyntaxOn
+\NewDocumentCommand{\templateversion}{m}{%
+ \clist_if_in:NnTF {\@supportedtemplateversions} {#1}
+ {\gdef\@templateversion{#1}}
+ {\PackageError{heria}%
+ {unsupported~template~version}%
+ {Use~one~of~\@supportedtemplateversions}
+ }%
+}
+\ExplSyntaxOff
+% \end{macrocode}
% \subsection*{Basic proposal variables}
%
% \begin{macrocode}
@@ -1459,7 +1476,6 @@
% communication with Tristan Miller on 2023-12-02.
%
% \begin{macrocode}
-\RequirePackage{everypage}
\RequirePackage{environ}
\newcounter{abspage}% \thepage not reliab
\newcommand{\newSFPage}[1]% #1 = \theabspage
@@ -1474,15 +1490,17 @@
\rotatebox{90}{\parbox[c][\textwidth][c]{\textheight}{\BODY}}%
\fi
\end{figure}}
-\AddEverypageHook{% check if sideways figure on this page
- \ifdim\textwidth=\textheight
- \stepcounter{abspage}% already in landscape
- \else
- \@ifundefined{SFPage@\theabspage}{}{\global\pdfpageattr{/Rotate 0}}%
- \stepcounter{abspage}%
- \@ifundefined{SFPage@\theabspage}{}%
- {\global\pdfpageattr{/Rotate 90}}%
- \fi}
+\AddToHook{shipout/background}{% check if sideways figure on this page
+ \put(1in,-1in){%
+ \ifdim\textwidth=\textheight
+ \stepcounter{abspage}% already in landscape
+ \else
+ \@ifundefined{SFPage@\theabspage}{}{\global\pdfpageattr{/Rotate 0}}%
+ \stepcounter{abspage}%
+ \@ifundefined{SFPage@\theabspage}{}%
+ {\global\pdfpageattr{/Rotate 90}}%
+ \fi}%
+ }
% \end{macrocode}
%
% \subsection*{Font setup}
@@ -1987,7 +2005,7 @@ purchase costs for equipment).
environmental objectives of the EU Taxonomy Regulation.}
\item
\emph{If you plan to use, develop and/or deploy artificial
- intellingence (AI) based systems and/or techniques you must
+ intelligence (AI) based systems and/or techniques you must
demonstrate their technical robustness. AI-based systems or techniques
should be, or be developed to become:~}
@@ -2371,12 +2389,33 @@ Please provide the following:
\item
\emph{Give full details. Base your account on the logical structure of
the project and the stages in which it is to be carried out.}
+\makeatletter
+\ifdim\@templateversion pt<3.4pt
\emph{The number of work packages should be proportionate to the scale
and complexity of the project.}
\item
\emph{You should give enough detail in each work package to justify
the proposed resources to be allocated and also quantified information
so that progress can be monitored, including by the Commission}
+\else
+ \emph{Each work package should be a substantial part of the work
+ plan, and the number of work packages should be proportionate to
+ the scale and complexity of the project.}
+\item \emph{Structure each work package by breaking it down into
+ tasks. If tasks are not appropriate, work packages can be
+ organised according to other criteria (e.g., according to the type
+ of work or thematically). For each task or element of the work
+ package, describe all activities to be carried out and quantify
+ them (e.g., number of protocols, tests, measurements,
+ combinations, study subjects, conferences, publications,
+ etc.). Provide enough detail to clarify who will do this work and
+ why it is needed for the project, (e.g., the level of
+ qualification and number of person-months for personnel, as well
+ as the requested equipment, consumables, meetings, etc.), to
+ justify the proposed resources and so that progress can be
+ monitored, including by the Commission.}
+\fi
+\makeatother
\item
\emph{Resources assigned to work packages should be in line with their
objectives and deliverables. You are advised to include a distinct
@@ -2431,9 +2470,15 @@ Please provide the following:
\end{itemize}
%</hi-workplan>
%<*hi-wp-description>
+\makeatletter
+\ifdim\@templateversion pt<3.4pt
(where appropriate, broken down into tasks), lead partner and role of
participants. Deliverables linked to each WP are listed in table 3.1c
(no need to repeat the information here).
+\else
+(where appropriate, broken down into tasks), lead partner and role of participants. For each task, quantify the amount of work. Provide enough detail to justify the resources requested and clarify why the work is needed and who will do it. Deliverables linked to each WP are listed in table 3.1c (no need to repeat the information here).
+\fi
+\makeatother
%</hi-wp-description>
%<*hi-wp-objectives>
\twarn \emph{Participants involved in each WP and their efforts are
@@ -2441,10 +2486,10 @@ participants. Deliverables linked to each WP are listed in table 3.1c
each WP are shown in table 3.1a.)}
%</hi-wp-objectives>
%<*heria-proposal>
-%% Copyright 2023 Tristan Miller
+%% Copyright 2023, 2024 Tristan Miller
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
@@ -2453,6 +2498,8 @@ participants. Deliverables linked to each WP are listed in table 3.1c
%%
\documentclass[showinstructions]{heria}
+\templateversion{3.4}
+
\title{Skeleton Horizon Europe Proposal}
\callname{insert call name}
\callidentifier{HORIZON-XX0-0000-XXXXX-00-XXXXX}
diff --git a/Master/texmf-dist/source/latex/heria/heria.ins b/Master/texmf-dist/source/latex/heria/heria.ins
index 89b8b7f72c7..406573836d0 100644
--- a/Master/texmf-dist/source/latex/heria/heria.ins
+++ b/Master/texmf-dist/source/latex/heria/heria.ins
@@ -1,8 +1,8 @@
%%
-%% Copyright 2023 Tristan Miller
+%% Copyright 2023, 2024 Tristan Miller
%%
%% This work may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% https://www.latex-project.org/lppl.txt
diff --git a/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx b/Master/texmf-dist/source/latex/hypcap/hypcap.dtx
index a9bb106fe3d..ef7538e91e2 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hypcap.dtx
+++ b/Master/texmf-dist/source/latex/hypcap/hypcap.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
% File: hypcap.dtx
-% Version: 2016/05/16 v1.12
+% Version: 2024-07-26 v1.13
% Info: Adjusting the anchors of captions
%
% Copyright (C)
% 1999-2001, 2006-2008, 2011 Heiko Oberdiek
-% 2016-2019 Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% 2016-2024 Oberdiek Package Support Group
+% https://github.com/ho-tex/hypcap/issues
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -23,15 +23,15 @@
%
% The Current Maintainers of this work are
% Heiko Oberdiek and the Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% https://github.com/ho-tex/hypcap/issues
%
% This work consists of the main source file hypcap.dtx
% and the derived files
% hypcap.sty, hypcap.pdf, hypcap.ins, hypcap.drv.
%
% Distribution:
-% CTAN:macros/latex/contrib/oberdiek/hypcap.dtx
-% CTAN:macros/latex/contrib/oberdiek/hypcap.pdf
+% CTAN:macros/latex/contrib/hypcap/hypcap.dtx
+% CTAN:macros/latex/contrib/hypcap/hypcap.pdf
%
% Unpacking:
% (a) If hypcap.ins is present:
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex hypcap.dtx
% makeindex -s gind.ist hypcap.idx
% pdflatex hypcap.dtx
@@ -60,9 +60,9 @@
% pdflatex hypcap.dtx
%
% Installation:
-% TDS:tex/latex/oberdiek/hypcap.sty
-% TDS:doc/latex/oberdiek/hypcap.pdf
-% TDS:source/latex/oberdiek/hypcap.dtx
+% TDS:tex/latex/hypcap/hypcap.sty
+% TDS:doc/latex/hypcap/hypcap.pdf
+% TDS:source/latex/hypcap/hypcap.dtx
%
%<*ignore>
\begingroup
@@ -79,7 +79,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: hypcap 2016/05/16 v1.12 Adjusting the anchors of captions (HO)}
+\Msg{* Package: hypcap 2024-07-26 v1.13 Adjusting the anchors of captions (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -91,11 +91,11 @@
This is a generated file.
Project: hypcap
-Version: 2016/05/16 v1.12
+Version: 2024-07-26 v1.13
Copyright (C)
1999-2001, 2006-2008, 2011 Heiko Oberdiek
- 2016-2019 Oberdiek Package Support Group
+ 2016-2024 Oberdiek Package Support Group
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -111,7 +111,7 @@ This work has the LPPL maintenance status "maintained".
The Current Maintainers of this work are
Heiko Oberdiek and the Oberdiek Package Support Group
-https://github.com/ho-tex/oberdiek/issues
+https://github.com/ho-tex/hypcap/issues
This work consists of the main source file hypcap.dtx
@@ -124,7 +124,7 @@ and the derived files
\generate{%
\file{hypcap.ins}{\from{hypcap.dtx}{install}}%
\file{hypcap.drv}{\from{hypcap.dtx}{driver}}%
- \usedir{tex/latex/oberdiek}%
+ \usedir{tex/latex/hypcap}%
\file{hypcap.sty}{\from{hypcap.dtx}{package}}%
}
@@ -152,7 +152,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{hypcap.drv}%
- [2016/05/16 v1.12 Adjusting the anchors of captions (HO)]%
+ [2024-07-26 v1.13 Adjusting the anchors of captions (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\begin{document}
@@ -166,9 +166,9 @@ and the derived files
% \GetFileInfo{hypcap.drv}
%
% \title{The \xpackage{hypcap} package}
-% \date{2016/05/16 v1.12}
+% \date{2024-07-26 v1.13}
% \author{Heiko Oberdiek\thanks
-% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}}
+% {Please report any issues at \url{https://github.com/ho-tex/hypcap/issues}}}
%
% \maketitle
%
@@ -301,7 +301,7 @@ and the derived files
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hypcap}%
- [2016/05/16 v1.12 Adjusting the anchors of captions (HO)]
+ [2024-07-26 v1.13 Adjusting the anchors of captions (HO)]
% \end{macrocode}
%
% For unique command names this package uses |hc@| as prefix
@@ -461,7 +461,7 @@ and the derived files
\capstart
}{%
\if@capstart
- \PackageError{hypcap}{You have forgotten to use \string\caption}%
+ \PackageWarning{hypcap}{You have forgotten to use \string\caption}%
\global\@capstartfalse
\else
\fi
@@ -497,31 +497,11 @@ and the derived files
% \paragraph{Package.} This package is available on
% CTAN\footnote{\CTANpkg{hypcap}}:
% \begin{description}
-% \item[\CTAN{macros/latex/contrib/oberdiek/hypcap.dtx}] The source file.
-% \item[\CTAN{macros/latex/contrib/oberdiek/hypcap.pdf}] Documentation.
+% \item[\CTAN{macros/latex/contrib/hypcap/hypcap.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/hypcap/hypcap.pdf}] Documentation.
% \end{description}
%
%
-% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}]
-% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
-%
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-% |unzip oberdiek.tds.zip -d ~/texmf|
-% \end{quote}
-%
% \subsection{Package installation}
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
@@ -537,9 +517,9 @@ and the derived files
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% hypcap.sty & tex/latex/oberdiek/hypcap.sty\\
-% hypcap.pdf & doc/latex/oberdiek/hypcap.pdf\\
-% hypcap.dtx & source/latex/oberdiek/hypcap.dtx\\
+% hypcap.sty & tex/latex/hypcap/hypcap.sty\\
+% hypcap.pdf & doc/latex/hypcap/hypcap.pdf\\
+% hypcap.dtx & source/latex/hypcap/hypcap.dtx\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
@@ -718,6 +698,9 @@ and the derived files
% \item
% Documentation updates.
% \end{Version}
+% \begin{Version}{2024-07-26 v1.13}
+% \item Change error into warning, issue \#1
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/hyperref/hluatex.dtx b/Master/texmf-dist/source/latex/hyperref/hluatex.dtx
index 8a90953abbc..20a2f3a4a32 100644
--- a/Master/texmf-dist/source/latex/hyperref/hluatex.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hluatex.dtx
@@ -1,6 +1,6 @@
% \iffalse
% Source File: hluatex.dtx
-% 2024-05-23 v7.01i
+% 2024-07-10 v7.01j
%
% Copyright
% 2016-2019 Oberdiek Package Support Group
@@ -31,7 +31,7 @@
%
% \begin{macrocode}
%<*luatex>
-%% 2024-05-23 v7.01i
+%% 2024-07-10 v7.01j
%% force unicode encoding, see issue #101
%% code mostly copied from hxetex.def
\HyPsd@LoadUnicode
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx
index c35b68d1163..874a4927360 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref-linktarget.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 2024-05-23 v7.01i}
+% \date{Version 2024-07-10 v7.01j}
%
% \maketitle
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx
index c9ffbf15bc5..ac4bac4f8cf 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref-patches.dtx
@@ -55,7 +55,7 @@
% }^^A
% }
%
-% \date{Version 2024-05-23 v7.01i}
+% \date{Version 2024-07-10 v7.01j}
%
% \maketitle
% \begin{documentation}
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index 8f6096d77d5..80cef9b890d 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -51,7 +51,7 @@
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
%<psdextra>\ProvidesFile{psdextra.def}
-%<!none&!packageEnd> [2024-05-23 v7.01i %
+%<!none&!packageEnd> [2024-07-10 v7.01j %
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -9177,6 +9177,8 @@
\Hy@temp{calculate}
\Hy@temp{onfocus}
\Hy@temp{onblur}
+\Hy@temp{onmousedown}
+\Hy@temp{onmouseup}
\Hy@temp{onenter}
\Hy@temp{onexit}
% \end{macrocode}
@@ -9201,8 +9203,6 @@
}%
\fi
\Hy@temp{ondblclick}
-\Hy@temp{onmousedown}
-\Hy@temp{onmouseup}
\Hy@temp{onmouseover}
\Hy@temp{onmousemove}
\Hy@temp{onmouseout}
@@ -12103,7 +12103,10 @@
% the hyperref version of the counter print command
% \cs{theHcounter} is redefined in order to add the
% parent counter.
+% change 2024-07-10: define |\HyOrg@addtoreset| always for cleveref
+% compability with tagging code, see https://github.com/latex3/tagging-project/issues/2
% \begin{macrocode}
+\def\HyOrg@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
\@ifundefined{hyper@nopatch@counter}
{
\let\HyOrg@addtoreset\@addtoreset
diff --git a/Master/texmf-dist/source/latex/hyperref/xr-hyper.dtx b/Master/texmf-dist/source/latex/hyperref/xr-hyper.dtx
index aced2ac70b2..f7b39072f55 100644
--- a/Master/texmf-dist/source/latex/hyperref/xr-hyper.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/xr-hyper.dtx
@@ -26,7 +26,7 @@
%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{xr-hyper}
-%<package> [2024-05-23 v7.01i eXternal References (DPC)]
+%<package> [2024-07-10 v7.01j eXternal References (DPC)]
%
%<*driver>
\documentclass{l3doc}
diff --git a/Master/texmf-dist/source/latex/iwonamath/Makefile b/Master/texmf-dist/source/latex/iwonamath/Makefile
index 5b8322bf33a..fcac414a151 100644
--- a/Master/texmf-dist/source/latex/iwonamath/Makefile
+++ b/Master/texmf-dist/source/latex/iwonamath/Makefile
@@ -48,6 +48,7 @@ all: ${PDF} $(PACKAGE).sty $(FD)
pdflatex $<
- bibtex $*
pdflatex $<
+ pdflatex $<
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
do pdflatex $<; done
@@ -64,7 +65,8 @@ clean:
*.ilg *.ind *.out *.lof \
*.lot *.bbl *.blg *.gls \
*.dvi *.ps *.thm *.tgz *.zip *.rpi \
- *.hd sample-blx.bib
+ *.hd sample-blx.bib \
+ omsiwonamathcmsy.fd *.sty
distclean: clean
@@ -75,7 +77,7 @@ distclean: clean
#
archive: all clean
COPYFILE_DISABLE=1 \
- tar -C .. -czvf ../$(PACKAGE).tgz --exclude '*~' \
+ tar -C .. -czvf ../$(PACKAGE).tgz --exclude '*~' --exclude LICENSE \
--exclude '*.tgz' --exclude '*.zip' --exclude .git $(PACKAGE)
mv ../$(PACKAGE).tgz .
diff --git a/Master/texmf-dist/source/latex/iwonamath/iwonamath.dtx b/Master/texmf-dist/source/latex/iwonamath/iwonamath.dtx
index 020c8d6ad08..38aebd666a7 100644
--- a/Master/texmf-dist/source/latex/iwonamath/iwonamath.dtx
+++ b/Master/texmf-dist/source/latex/iwonamath/iwonamath.dtx
@@ -141,7 +141,7 @@
%<oms>{oms_FAMILY_.fd}
%<omx>{omx_FAMILY_.fd}
%<cmsy>{omsiwonamathcmsy.fd}
-%<package|fd>{2023-08-31} {1.0}
+%<package|fd>{2024-07-19} {1.1}
%<package|fd>{Scaled Iwona math fonts}
%<*package>
% \end{macrocode}
@@ -233,7 +233,8 @@
%
% We add delimiters from |cmsy|, as discussed in
% \citep[\S~12.5.5]{TLC3}). We predefine the symbols for the standard
-% versions just in case.
+% versions just in case. The last line is suggested by Enrico
+% Gregorio.
% \begin{macrocode}
\bool_if:NTF \l_@@_delimitershack_bool
{
@@ -241,6 +242,7 @@
\SetSymbolFont{symbols2} {bold}{OMS}{cmsy}{b}{n}
\DeclareMathDelimiter{\lVert}{\mathopen} {symbols2}{"6B}{largesymbols}{"0D}
\DeclareMathDelimiter{\rVert}{\mathclose}{symbols2}{"6B}{largesymbols}{"0D}
+ \DeclareMathDelimiter{\|}{\mathclose}{symbols2}{"6B}{largesymbols}{"0D}
}
{}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/lastpage/lastpage.drv b/Master/texmf-dist/source/latex/lastpage/lastpage.drv
index 5125a755167..b58b4defae8 100644
--- a/Master/texmf-dist/source/latex/lastpage/lastpage.drv
+++ b/Master/texmf-dist/source/latex/lastpage/lastpage.drv
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-04-27 v2.1a
+%% Version: 2024-07-07 v2.1c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -32,10 +32,9 @@
%%
%% This package was invented by Jeffrey P. Goldberg.
%% I thought that a replacement was needed and therefore created the pageslts package,
-%% https://ctan.org/pkg/pageslts
-%% . Nevertheless, for compatibility with existing documents/packages as well as for
-%% the low amount of resources needed by the lastpage package (no new counter!),
-%% I updated this package.
+%% https://ctan.org/pkg/pageslts. Nevertheless, for compatibility with existing
+%% documents/packages as well as for the low amount of resources needed by the
+%% lastpage package (no new counter!), I updated this package.
%% Thanks go to Jeffrey P. Goldberg for allowing me to do this.
%%
%% While this package allows for things like "Page slash thepage{} of slash pageref{LastPage}"
@@ -59,8 +58,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
\ProvidesFile{lastpage.drv}%
- [2024-04-27 v2.1a Refers to last page's name (HMM)]
-\documentclass{ltxdoc}[2023/03/28]% v2.1j Standard LaTeX documentation class
+ [2024-07-07 v2.1c Refers to last page's name (HMM)]
+\documentclass{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
\usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO)
\hypersetup{%
pdfsubject={Refers to last page's name (HMM; JPG)},%
diff --git a/Master/texmf-dist/source/latex/lastpage/lastpage.dtx b/Master/texmf-dist/source/latex/lastpage/lastpage.dtx
index 104d6b84187..c447d39cc60 100644
--- a/Master/texmf-dist/source/latex/lastpage/lastpage.dtx
+++ b/Master/texmf-dist/source/latex/lastpage/lastpage.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: lastpage.dtx
-% Version: 2024-04-27 v2.1a
+% Version: 2024-07-07 v2.1c
% Info: Refers to last page's name
%
% Copyright © 2010 - 2024 by
@@ -65,7 +65,7 @@
\input docstrip.tex
\Msg{**********************************************************************}
\Msg{* Installation *}
-\Msg{* Package: lastpage 2024-04-27 v2.1a Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*}
\Msg{**********************************************************************}
\keepsilent
@@ -77,7 +77,7 @@
This is a generated file.
Project: lastpage
-Version: 2024-04-27 v2.1a
+Version: 2024-07-07 v2.1c
Info: Refers to last page's name
Copyright (C) 2010 - 2024 by
@@ -100,10 +100,9 @@ The Current Maintainer of this work is H.-Martin Muench.
This package was invented by Jeffrey P. Goldberg.
I thought that a replacement was needed and therefore created the pageslts package,
-https://ctan.org/pkg/pageslts
-. Nevertheless, for compatibility with existing documents/packages as well as for
-the low amount of resources needed by the lastpage package (no new counter!),
-I updated this package.
+https://ctan.org/pkg/pageslts. Nevertheless, for compatibility with existing
+documents/packages as well as for the low amount of resources needed by the
+lastpage package (no new counter!), I updated this package.
Thanks go to Jeffrey P. Goldberg for allowing me to do this.
While this package allows for things like "Page slash thepage{} of slash pageref{LastPage}"
@@ -185,8 +184,8 @@ In memoriam
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2023-11-01]
\ProvidesFile{lastpage.drv}%
- [2024-04-27 v2.1a Refers to last page's name (HMM)]
-\documentclass{ltxdoc}[2023/03/28]% v2.1j Standard LaTeX documentation class
+ [2024-07-07 v2.1c Refers to last page's name (HMM)]
+\documentclass{ltxdoc}[2024/02/08]% v2.1j Standard LaTeX documentation class
\usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO)
\hypersetup{%
pdfsubject={Refers to last page's name (HMM; JPG)},%
@@ -234,23 +233,23 @@ In memoriam
% \DoNotIndex{\@auxout,\@evenfoot,\@firstofone,\@firstoftwo,\@ifl@t@r,\@ifpackagelater,\@ifpackageloaded}
% \DoNotIndex{\@ifundefined,\@kernel@reserved@label@data,\@mainaux,\@number,\@oddfoot}
% \DoNotIndex{\addtocounter,\AddToHook,\arabic,\begin}
-% \DoNotIndex{\bigskip,\clearpage,\csname,\documentclass,\EdefUnescapeString,\empty,\end,\endcsname}
-% \DoNotIndex{\enddocument,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion}
+% \DoNotIndex{\bigskip,\clearpage,\csname,\detokenize,\documentclass,\EdefUnescapeString,\empty,\end}
+% \DoNotIndex{\endcsname,\enddocument,\expanded,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion}
% \DoNotIndex{\g,\gdef,\here,\hfil,\Hy@temp,\Hy@unicodefalse}
-% \DoNotIndex{\hypersetup,\if@filesw,\if@nobreak,\ifHy@hypertexnames,\ifHy@pageanchor,\ifHy@plainpages}
+% \DoNotIndex{\hypersetup,\if,\if@filesw,\if@nobreak,\ifHy@hypertexnames,\ifHy@pageanchor,\ifHy@plainpages}
% \DoNotIndex{\ifdim,\ifnum,\IfPackageAtLeastTF,\IfPackageLoadedTF,\ifvmode,\ifx,\immediate,\input}
% \DoNotIndex{\label,\lastpage,\lastpage-example.tex,\lastpage.dtx,\lastpage.sty,\lastpagee.sty}
% \DoNotIndex{\lastpageclassic.sty,\lastpagemodern.sty,\LaTeX,\LaTeX-kernel,\listfiles}
-% \DoNotIndex{\makeatletter,\makeatother,\markboth,\mbox,\message,\MessageBreak}
+% \DoNotIndex{\makeatletter,\makeatother,\markboth,\meaning,\mbox,\message,\MessageBreak}
% \DoNotIndex{\NeedsTeXFormat,\newcommand,\newcounter,\newline,\newpage,\nobreak}
% \DoNotIndex{\noindent,\normalsize,\numexpr,\origenddocument,\PackageError,\PackageWarning}
% \DoNotIndex{\PackageWarningNoLine,\pagenumbering,\pageref,\pdfstringdef,\protect,\ProvidesPackage}
% \DoNotIndex{\qquad,\RequirePackage,\section,\ShowHook,\slshape,\smallskip,\space,\test,\textbf}
% \DoNotIndex{\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,\the,\thepage}
-% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write}
+% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\wd,\write,\xlastpage@rmpage,\xxlastpage@rmpage}
%
% \title{The \xpackage{lastpage} package}
-% \date{2024-04-27 v2.1a}
+% \date{2024-07-07 v2.1c}
% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
% invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
%
@@ -559,6 +558,18 @@ In memoriam
% but |\lastpage@putlabel| was replaced by |\lastpage@putl@bel|.
% Because \linebreak |\lastpage@putlabel| is no longer called, now there should not be any
% double definitions of the \texttt{lastpage} label.
+%
+% \subsection{\texttt{\textbackslash pagenumbering\{fnsymbol\}}}
+% When using the foot-note-symbols as page numbers,
+% it can be necessary to declare in the document's preamble:
+% \begin{verbatim}
+% \DeclareTextCommand{\textasteriskcentered}{PD1}{*}
+% \DeclareTextCommand{\textdagger}{PD1}{†}
+% %\DeclareTextCommand{\textdaggerdbl}{PD1}{‡)% seems to neither work nor be necessary
+% \DeclareTextCommand{\textsection}{PD1}{§}
+% \DeclareTextCommand{\textparagraph}{PD1}{¶}
+% \DeclareTextCommand{\textbardbl}{PD1}{‖}
+% \end{verbatim}
% \newpage
%
% \section{Alternatives\label{sec:Alternatives}}
@@ -574,7 +585,7 @@ In memoriam
% \textbf{Note: The current version 2015/12/21 v1.2f of the \pkg{pageslts} package
% has not yet been updated to the new hook mechanism. In special cases (for example }%
% |\pagenumbering{fnsymbol}|\textbf{) the current version of that package combined
-% with a current \LaTeX-format fails. Together with about 80~other packages
+% with a current \LaTeX-format fails. Together with several other packages
% (small to large, public as well as private, some probably obsolete) it is
% in the update queue.}\newline
% The \xpackage{pageslts} package first started as a revision of this
@@ -723,17 +734,17 @@ In memoriam
%
% \begin{macrocode}
%<*example>
-\documentclass[british]{article}[2023/05/17]% v1.4n Standard LaTeX document class
+\documentclass[british]{article}[2024/02/08]% v1.4n Standard LaTeX document class
\makeatletter
\@ifl@t@r\fmtversion{2022/11/01}{%
\AddToHook{enddocument/afterlastpage}[lastpage]{%
\message{^^JLaTeX Info: Executing hook `enddocument/afterlastpage'.}}%
}{\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}%
}
-\usepackage[draft]{showkeys}[2023/07/08]% v3.19 Show cite and label keys (DPC, MH)
+\usepackage[draft]{showkeys}[2024/05/23]% v3.21 Show cite and label keys (DPC, MH)
%% Use final instead of draft to hide the keys. %%
\usepackage[pdfpagelabels=true,hyperindex=false]{hyperref}[2024-01-20]% v7.01h
-%% Hypertext links for LaTeX
+\@ifpackageloaded{hyperref}{% Hypertext links for LaTeX
\hypersetup{extension=pdf,%
plainpages=false,%
pdflang={en},%
@@ -744,9 +755,8 @@ In memoriam
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage%
-}
-\@ifpackageloaded{hyperref}{}{\usepackage{url}[2013/09/16]}% v3.4
-\usepackage{lastpage}[2024/04/27]% v2.1a
+}}{\usepackage{url}[2013/09/16]}% v3.4
+\usepackage{lastpage}[2024/07/07]% v2.1c
\renewcommand{\@evenfoot}{%
\normalsize\slshape \today\hfil \upshape %
page \thepage{} of \pageref{LastPage}}
@@ -758,7 +768,7 @@ In memoriam
\section*{Example for lastpage}
\markboth{Example for lastpage}{Example for lastpage}
This example demonstrates the use of package\newline
-\textsf{lastpage}, v2.1a as of 2024-04-27 (HMM; JPG).\newline
+\textsf{lastpage}, v2.1c as of 2024-07-07 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -783,7 +793,7 @@ trademark owner. There is no intention of infringement; the
usage is to the benefit of the trademark owner.\newline
\textbf{Tip}: Use \textit{logical page numbers}
-for the display of the pdf (in Adobe Acrobat Reader 2024.002.20687:
+for the display of the pdf (in Adobe Acrobat Reader 2024.002.20895:
Edit $>$ Preferences $>$ Page Display $>$
Page Content and Information: Use logical page numbers)!\newline
@@ -837,8 +847,8 @@ The code does not generally work even without hyperref.
\end{verbatim}
\end{quote}
-\noindent does work, because \verb|\lastpage@lastpage| contains the name
-of the page, \mbox{example:}
+\noindent does work (two compilations needed), because \verb|\lastpage@lastpage|
+contains the name of the page, \mbox{example:}
\begin{verbatim}
Page \thepage{} is (not) page \makeatletter\lastpage@lastpage\makeatother.
\end{verbatim}
@@ -894,7 +904,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \DescribeMacro{lastpage.sty}
% We first need to determine whether we are on \TeX~2.09 or \LaTeX2e.\newline
% (That line, which is too long for the documentation, reads:\newline
-% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a lastpage:|\linebreak
+% |\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage:|\linebreak
% | 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}|.)
%
% \begin{macrocode}
@@ -902,7 +912,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
%% Part of the "lastpage" package
%% loads either lastpage2.09.sty for TeX 2.09 or lastpage2e.sty for LaTeX 2e
%% with code from https://groups.google.com/g/comp.text.tex/c/-Qmhj1ZI4xM
-\def\loadlastpage{\ProvidesPackage{lastpage}[2024/04/27 v2.1a lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
+\def\loadlastpage{\ProvidesPackage{lastpage}[2024/07/07 v2.1c lastpage: 2.09 or 2e? (HMM)]\relax\RequirePackage{lastpage2e}}
\begingroup \expandafter \ifx \csname documentclass\endcsname\relax
\endgroup \expandafter \input{lastpage209.sty}
\else \endgroup \expandafter \loadlastpage
@@ -942,7 +952,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
%<*lastpage2e>
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpage2e}[2024/04/27 v2.1a %
+\ProvidesPackage{lastpage2e}[2024/07/07 v2.1c %
Decide which 2e lastpage version to use (HMM)]
\@ifl@t@r\fmtversion{2023/06/01}{\RequirePackage{lastpagemodern}}{%
\RequirePackage{lastpageclassic}}
@@ -957,7 +967,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
%<*lastpageclassic>
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{lastpageclassic}[2024/04/27 v2.1a %
+\ProvidesPackage{lastpageclassic}[2024/07/07 v2.1c %
Refers to last page's name (HMM; JPG)]
%% allows for things like "Page \thepage{} of \pageref{LastPage}"
%% to get "Page 7 of 9"
@@ -1375,7 +1385,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
%<*lastpagemodern>
%% Part of the "lastpage" package
\NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\ProvidesPackage{lastpagemodern}[2024-04-27 v2.1a %
+\ProvidesPackage{lastpagemodern}[2024-07-07 v2.1c %
Refers to last page's name (HMM; JPG)]
%% allows for things like "Page \thepage{} of \pageref{LastPage}"
%% to get "Page 7 of 9" or "Page VII of IX";
@@ -1463,14 +1473,69 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\lastpage@makeHy}
+% Just once we need the page from |\@currentHpage| without any \mbox{\textquotedblleft |page.|\textquotedblright :}
+% \begin{macrocode}
+\newcommand{\lastpage@makeHy}{%
+ \gdef\lastpage@Hy{}%
+ \IfPackageLoadedTF{hyperref}{%
+ \ifHy@pageanchor%
+ \@ifundefined{@currentHpage}{%
+ \PackageError{lastpage}{%
+ Kernel command \string\@currentHpage\space is undefined}{%
+ Please contact the lastpage maintainer.}%
+% \end{macrocode}
+% |\gdef\lastpage@Hy{}|, but that was already done at the beginning of this command.
+% \begin{macrocode}
+ }{\xdef\lastpage@Hptest{Doc-Start}%
+ \ifx\lastpage@Hptest\@currentHpage\relax%
+ \gdef\lastpage@Hy{\@currentHpage}%
+ \else%
+ \edef\lastpage@Hptest{\@currentHpage}%
+ \ifx\lastpage@Hptest\empty\relax%
+% \end{macrocode}
+% |\gdef\lastpage@Hy{}|, but that was already done at the beginning of this command.
+% \begin{macrocode}
+ \else%
+% \end{macrocode}
+% |\@currentHpage| should be |page.<some number>|, |\lastpage@rmpage| removes the
+% \mbox{\textquotedblleft |page.|\textquotedblright .} Next compilation run,
+% |\lastpage@lastpageHy| gets defined via the \xfile{aux} file.
+% If we arrived at this place, but the definition is still empty,
+% then |\@currentHpage| has some unexpected content.
+% \begin{macrocode}
+ \gdef\lastpage@Hy{\lastpage@rmpage{\@currentHpage}}%
+ \ifx\lastpage@lastpageHy\empty\relax%
+ \PackageWarningNoLine{lastpage}{%
+ \string\@currentHpage\space is\MessageBreak%
+ \meaning\@currentHpage\MessageBreak%
+ not beginning with "page.",\MessageBreak%
+ \string\lastpage@lastpageHy\space is now let empty.}%
+ \fi%
+ \fi%
+ \fi%
+ }%
+ \fi%
+ }{}%
+ }%
+
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\lastpage@rmpage}
-% Just once we need |\@currentHpage| without the \mbox{\textquotedblleft |page.|\textquotedblright :}
+% |\lastpage@rmpage| removes the \mbox{\textquotedblleft |page.|\textquotedblright.}
+%
% \begin{macrocode}
-%% similar to https://tex.stackexchange.com/a/12811/6865
-\def\lastpage@rmpage#1{\expandafter\lastpage@currentH#1\relax}
-\def\lastpage@currentH#1.#2\relax{#2}
+%% Code provided by David Carlisle at https://tex.stackexchange.com/a/721877
+\def\lastpage@rmpage#1{%
+ \expandafter\xlastpage@rmpage\expanded{#1}\xlastpage@rmpage page.%
+ \xlastpage@rmpage\xxlastpage@rmpage{#1}}
+\def\xlastpage@rmpage #1page.#2\xlastpage@rmpage#3\xxlastpage@rmpage#4{%
+ \if$\detokenize{#1}$#2%\else#4
+ \fi}
% \end{macrocode}
+% |\else#4| means, that it did not start with |page.|, and whatever it is,
+% we cannot use this |#4| for |\lastpage@Hy|.
% \end{macro}
% \begin{macro}{\lastpage@putl@bel}
% \indent This command does the writing of the label.
@@ -1529,15 +1594,13 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
{\@kernel@reserved@label@data}}%
}%
% \end{macrocode}
-% \pagebreak
% \noindent We also save the values, so that we can later (next rerun) check,
% whether they have been saved in the \xfile{aux} file.
%
% \begin{macrocode}
\protected@iwrite\@auxout{}{%
\string\gdef\string\lastpage@lastpage{\thepage}}%
- \gdef\lastpage@Hy{\IfPackageLoadedTF{hyperref}{%
- \ifHy@pageanchor\lastpage@rmpage{\@currentHpage}\fi}{}}%
+ \lastpage@makeHy%
\protected@iwrite\@auxout{}{%
\string\gdef\string\lastpage@lastpageHy{\lastpage@Hy}}%
% \end{macrocode}
@@ -1553,7 +1616,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \end{macrocode}
% \end{macro}
-%
+%\pagebreak
% \begin{macro}{\lastpage@fileswtest}
% \indent \hspace*{2em}Later it will be determined whether it is allowed to write
% to the \xfile{aux} file. If it was \emph{not} allowed, it is checked
@@ -1679,7 +1742,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \begin{description}
% \item[-] \TeX Format \LaTeXe{}: \url{https://www.CTAN.org}
%
-% \item[-] document class \xclass{ltxdoc}, 2023/03/28, v2.1j,
+% \item[-] document class \xclass{ltxdoc}, 2024/02/08, v2.1j,
% \url{https://ctan.org/pkg/ltxdoc}
%
% \item[-] package \xpackage{holtxdoc}, 2019/12/09, v0.30,
@@ -1692,7 +1755,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \begin{description}
% \item[-] \TeX, \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
@@ -1702,7 +1765,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \begin{description}
% \item[-] \TeX-format \LaTeX{}, v2.09
%
-% \item[-] package \xpackage{lastpage209}, 2024-04-27, v2.1a,
+% \item[-] package \xpackage{lastpage209}, 2024-07-07, v2.1c,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\smallskip
@@ -1714,7 +1777,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer,
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
@@ -1725,7 +1788,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2023-05-31,\newline
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and can use
@@ -1742,13 +1805,13 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item[-] \TeX-format \LaTeXe{} 2023-06-01 or newer,\newline
% \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and can use
% \begin{description}
% \item[-] package \xpackage{hyperref}, 2023-11-07 and newer
-% (tested with: 2024-01-20, v7.01h),
+% (tested with: 2024-05-23, v7.01i),
% \url{https://ctan.org/pkg/hyperref}
% \end{description}
% \pagebreak
@@ -1757,7 +1820,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% The |lastpage-example.tex| requires the same file as all
% documents using the \xpackage{lastpage} package, i.\,e.
% \begin{description}
-% \item[-] package \xpackage{lastpage}, 2024-04-27, v2.1a,
+% \item[-] package \xpackage{lastpage}, 2024-07-07, v2.1c,
% \url{https://ctan.org/pkg/lastpage}\newline
% (Well, it is the example file for this package, and because you are reading the
% documentation for the \xpackage{lastpage} package, it can be assumed that you already
@@ -1765,13 +1828,13 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \end{description}
% and additionally:
% \begin{description}
-% \item[-] class \xpackage{article}, 2023-05-17, v1.4n, from \xpackage{classes}:
+% \item[-] class \xpackage{article}, 2024-02-08, v1.4n, from \xpackage{classes}:
% \url{https://ctan.org/pkg/classes}
%
-% \item[-] package \xpackage{showkeys}, 2023-07-08, v3.19,
+% \item[-] package \xpackage{showkeys}, 2024-05-23, v3.21,
% \url{https://ctan.org/pkg/showkeys}
%
-% \item[-] package \xpackage{hyperref}, 2024-01-20, v7.01h,
+% \item[-] package \xpackage{hyperref}, 2024-05-23, v7.01i,
% \url{https://ctan.org/pkg/hyperref}
% \end{description}
%
@@ -2038,7 +2101,8 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% to update it. Further I would like to thank \textsc{Heiko Oberdiek}
% for providing a~lot~(!) of useful packages (from which I also learned everything
% I know about creating a file in \xfile{dtx} format, OK, say it: copying).
-% Thanks for bug reports go to \textsc{Ulrike Fischer} (twice),
+% Thanks to \textsc{David Carlisle} for the new code for |\lastpage@rmpage|.
+% Thanks for bug reports go to \textsc{Ulrike Fischer} (several times),
% \textsc{Sebastian Bank}, \textsc{James Hedges}, \textsc{Mikhail Titov},
% \textsc{Micha\l{} Herman}, \textsc{Matteo Gamboz}, and \textsc{James Small}.
% Thanks to \textsc{Sven Siegmund} for pointing out a necessary further
@@ -2219,8 +2283,7 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item Replaced |\immediate\write| by a form of (pseudo-code!) |\immediate\protected@write|.
% (Thanks to \textsc{Ulrike Fischer} for the error report and solution!)
% \item Update of the |\lastpage@putl@bel| code to \pkg{hyperref} 2023-07-08, v7.01b,
-% which now allows fnsymbol as page numbering scheme (while links to, for example,
-% a page named $\|$ still do not work).
+% which now allows fnsymbol as page numbering scheme.
% \end{Version}
% \begin{Version}{2023-10-06 v2.0d}
% \item For plain arabic page numbers only, \pkg{lastpage} again writes the page number
@@ -2237,6 +2300,16 @@ To see the content of the \texttt{enddocument/afterlastpage}-hook
% \item |\lastpage@IfNumericTF| is no longer needed, but has not been removed
% so as not to break older documents that use it in a different context.
% \end{Version}
+% \begin{Version}{2024-07-03 v2.1b}
+% \item The \xclass{beamer} class loads \xpackage{hyperref} partially,
+% so that \xpackage{hyperref} is incorrectly detected as having been loaded.
+% The defining operation for |\lastpage@Hy| has been changed to catch this
+% and other different cases.
+% \end{Version}
+% \begin{Version}{2024-07-07 v2.1c}
+% \item With help from \textsc{David Carlisle} |\lastpage@rmpage| no longer assumes
+% |\@currentHpage| to begin with |page.|.
+% \end{Version}
% \end{History}
% \bigskip
%
diff --git a/Master/texmf-dist/source/latex/lastpage/lastpage.ins b/Master/texmf-dist/source/latex/lastpage/lastpage.ins
index e39cb80cbef..120709843e4 100644
--- a/Master/texmf-dist/source/latex/lastpage/lastpage.ins
+++ b/Master/texmf-dist/source/latex/lastpage/lastpage.ins
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: lastpage
-%% Version: 2024-04-27 v2.1a
+%% Version: 2024-07-07 v2.1c
%% Info: Refers to last page's name
%%
%% Copyright (C) 2010 - 2024 by
@@ -32,10 +32,9 @@
%%
%% This package was invented by Jeffrey P. Goldberg.
%% I thought that a replacement was needed and therefore created the pageslts package,
-%% https://ctan.org/pkg/pageslts
-%% . Nevertheless, for compatibility with existing documents/packages as well as for
-%% the low amount of resources needed by the lastpage package (no new counter!),
-%% I updated this package.
+%% https://ctan.org/pkg/pageslts. Nevertheless, for compatibility with existing
+%% documents/packages as well as for the low amount of resources needed by the
+%% lastpage package (no new counter!), I updated this package.
%% Thanks go to Jeffrey P. Goldberg for allowing me to do this.
%%
%% While this package allows for things like "Page slash thepage{} of slash pageref{LastPage}"
@@ -60,7 +59,7 @@
\input docstrip.tex
\Msg{**********************************************************************}
\Msg{* Installation *}
-\Msg{* Package: lastpage 2024-04-27 v2.1a Refers to last page's name (HMM)*}
+\Msg{* Package: lastpage 2024-07-07 v2.1c Refers to last page's name (HMM)*}
\Msg{**********************************************************************}
\keepsilent
@@ -72,7 +71,7 @@
This is a generated file.
Project: lastpage
-Version: 2024-04-27 v2.1a
+Version: 2024-07-07 v2.1c
Info: Refers to last page's name
Copyright (C) 2010 - 2024 by
@@ -95,10 +94,9 @@ The Current Maintainer of this work is H.-Martin Muench.
This package was invented by Jeffrey P. Goldberg.
I thought that a replacement was needed and therefore created the pageslts package,
-https://ctan.org/pkg/pageslts
-. Nevertheless, for compatibility with existing documents/packages as well as for
-the low amount of resources needed by the lastpage package (no new counter!),
-I updated this package.
+https://ctan.org/pkg/pageslts. Nevertheless, for compatibility with existing
+documents/packages as well as for the low amount of resources needed by the
+lastpage package (no new counter!), I updated this package.
Thanks go to Jeffrey P. Goldberg for allowing me to do this.
While this package allows for things like "Page slash thepage{} of slash pageref{LastPage}"
diff --git a/Master/texmf-dist/source/latex/lettrine/lettrine.dtx b/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
index c4bf9472c53..e6df6e3b70c 100644
--- a/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
+++ b/Master/texmf-dist/source/latex/lettrine/lettrine.dtx
@@ -107,7 +107,7 @@
\ProvidesFile{lettrine.dtx}
%</dtx>
%<*sty|dtx>
- [2024-01-20 v2.60 (Daniel Flipo)]
+ [2024-06-26 v2.61 (Daniel Flipo)]
%</sty|dtx>
% \fi
%
@@ -314,9 +314,6 @@
% \item |\LettrineImagefalse|,
% \item |\LettrineOnGridfalse|,
% \item |\LettrineRealHeightfalse|,
-% \item |\renewcommand*{\LettrineTextFont}{\scshape}|,
-% \item |\renewcommand*{\LettrineTestString}{EFTZ}|,
-% \item |\renewcommand*{\LettrineSecondString}{x}|,
% \item |\renewcommand{\DefaultOptionsFile}{optfile.cfl}|.
% \end{itemize}
%
@@ -336,6 +333,14 @@
% file will be overridden by the optional arguments eventually given
% to the |\lettrine| command.
%
+% More customisation possibilities are offered by the next four
+% commands:
+% \begin{itemize}
+% \item |\renewcommand*{\LettrineFontHook}{}|,
+% \item |\renewcommand*{\LettrineTextFont}{\scshape}|,
+% \item |\renewcommand*{\LettrineTestString}{EFTZ}|,
+% \item |\renewcommand*{\LettrineSecondString}{x}|,
+% \end{itemize}
% |\LettrineTextFont| sets the font used for the second argument
% of |\lettrine|, its default definition is
% |\newcommand{\LettrineTextFont}{\scshape}| (second argument in
@@ -376,6 +381,8 @@
% all initials in a (part of) document:
% |\renewcommand{\LettrineFontHook}{\color[gray]{0.5}}| \\
% will colour the initials following this command in grey.
+% A |\color| command can be added in |\LettrineTextHook| if the text
+% following the dropped cap requires the same or another colour.
%
% \changes{v1.3}{2002/08/23}{Correct the documentation to
% mention the cm-super fonts and the type1ec package by
@@ -452,6 +459,10 @@
% environments but does not work within `center’ environments
% except with option \texttt{[lines=1]}.
% \item |\lettrine| does not work within lists.
+% \item If |\lettrine| is used inside any environment, it is
+% \emph{mandatory} to end the paragraph starting with the dropped
+% capital \emph{inside} the environment; adding a |\par| command
+% before the end of environment usually fixes placement issues.
% \item The LaTeX |\raggedright| command doesn’t work well with the
% TeX |\parshape| command used internally by |\lettrine|.
% Please use the |\RaggedRight| command from the \pkg{ragged2e}
@@ -668,10 +679,10 @@
{
lines.code = \setcounter{L@lines}{#1} ,
depth.code = \setcounter{L@depth}{#1} ,
- lhang.code = \renewcommand*{\L@hang}{#1} ,
- loversize.code = \renewcommand*{\L@oversize}{#1} ,
- lraise.code = \renewcommand*{\L@raise}{#1} ,
- ante.code = \renewcommand*{\L@ante}{#1} ,
+ lhang.store = \L@hang ,
+ loversize.store = \L@oversize ,
+ lraise.store = \L@raise ,
+ ante.store = \L@ante ,
findent.code = \setlength{\L@Findent}{#1} ,
nindent.code = \setlength{\L@Nindent}{#1} ,
slope.code = \setlength{\L@slope}{#1} ,
@@ -1166,10 +1177,13 @@
% dropped cap, add a \cs{rule} to mimic its height above the baseline
% instead.}
%
+% \changes{v2.61}{2024/06/26}{Include the `ante’ box into the \cs{smash}
+% command in case it is shifted down.}
+%
% Write the dropped capital into the left margin, and wrap
% the rest of paragraph around it.
% \begin{macrocode}
- \llap{\mbox{\L@ante}\smash{\raisebox{\L@lraise}{\usebox{\L@lbox}}}%
+ \llap{\smash{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}}%
\ifL@grid\else\rule{0pt}{\L@ruleht}\fi
\hskip \the\L@Findent}%
\unhcopy\L@tbox\relax
diff --git a/Master/texmf-dist/source/latex/lni/lni.dtx b/Master/texmf-dist/source/latex/lni/lni.dtx
index 20261238d4e..b5699cbac66 100644
--- a/Master/texmf-dist/source/latex/lni/lni.dtx
+++ b/Master/texmf-dist/source/latex/lni/lni.dtx
@@ -134,7 +134,7 @@ This work consists of the file lni.dtx
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{lni}
%<*class>
- [2024/01/08 v1.8.1 Official class for submissions to the ``Lecture Notes
+ [2024/07/23 v1.10 Official class for submissions to the ``Lecture Notes
in Informatics'']
%</class>
%<*driver>
@@ -286,6 +286,9 @@ This work consists of the file lni.dtx
% \changes{v1.8}{2022/06/10}{Fix output error in bst files (#97)}
% \changes{v1.8}{2022/11/25}{Make class compatable with latest publisher requirements (#121)}
% \changes{v1.8}{2022/11/25}{Make usage of `hyperref` mandatory (#131)}
+% \changes{v1.9}{2024/07/01}{Support multiple affiliations (#158)}
+% \changes{v1.10}{2024/07/01}{Change font for URLs to text font and change footnote numbers to superscript}
+% \changes{v1.10}{2024/07/23}{Fix support multiple affiliations (#173)}
%
% \GetFileInfo{\jobname.dtx}
% \DoNotIndex{\newcommand,\newenvironment}
@@ -489,12 +492,13 @@ This work consists of the file lni.dtx
% \cs{affil\oarg{number}\marg{information}} where you can use
% \texttt{\textbackslash\textbackslash} to split the address.
% \begin{examplecode}[label={lst:author}]
-% \author[1]{Firstname1 Lastname1}{firstname1.lastname1@affiliation1.org}{0000-0000-0000-0000}
+% \author[1,2]{Firstname1 Lastname1}{firstname1.lastname1@affiliation1.org}{0000-0000-0000-0000}
% \author[2]{Firstname2 Lastname2}{firstname2.lastname2@affiliation2.org}{0000-0000-0000-0000}
-% \author[1]{Firstname3 Lastname3}{firstname3.lastname3@affiliation1.org}{0000-0000-0000-0000}
+% \author[3]{Firstname3 Lastname3}{firstname3.lastname3@affiliation1.org}{0000-0000-0000-0000}
% \author[1]{Firstname4 Lastname4}{firstname4.lastname4@affiliation1.org}{0000-0000-0000-0000}%
-% \affil[1]{Universität\\Abteilung\\Straße\\Postleitzahl Ort\\Land}
-% \affil[2]{University\\Department\\Address\\Country}
+% \affil[1]{Universität 1\\Abteilung\\Straße\\Postleitzahl Ort\\Land}
+% \affil[2]{University 2 \\Department\\Address\\Country}
+% \affil[3]{University 3\\Department\\Address\\Country}
% \end{examplecode}
%
% Leave the third and/or fourth argument empty if there is no email address and/or ORCID iD.
@@ -1044,7 +1048,7 @@ This work consists of the file lni.dtx
\RequirePackage[hang]{footmisc}
\setlength{\footnotemargin}{1em}
\long\def\@makefntext#1{%
- \def\@makefnmark{\rlap{\normalfont\@thefnmark}}%
+ \def\@makefnmark{\rlap{\normalfont\textsuperscript{\@thefnmark}}}%
\ifFN@hangfoot
\bgroup
\setbox\@tempboxa\hbox{%
@@ -1149,53 +1153,71 @@ This work consists of the file lni.dtx
\renewcommand\Authsep{, }
\renewcommand\Authands{\iflanguage{ngerman}{ und }{, and }}
\renewcommand\Authand{\iflanguage{ngerman}{ und }{ and }}
-\renewcommand{\AB@authnote}[1]{$^{\text{\mbox{\normalfont\footnotesize #1}}}$}
+\NewDocumentCommand{\multiaffil}{ >{\SplitList{,}} m m m}{%
+ \gdef\@currEmail{#2}
+ \gdef\@currOrcid{#3}
+ \ProcessList{#1}{\@multiaffil}
+}
+
+\newcommand{\@multiaffil}[1]{%
+ \ifcsundef{@emailsandorcids#1}{\csgdef{@emailsandorcids#1}{}}{}%
+ \ifcsempty{@emailsandorcids#1}%
+ {\protected@csxappto{@emailsandorcids#1}{%
+ \if\relax\@currEmail\relax\else\email{\@currEmail}\fi\if\relax\@currOrcid\relax\else,\ \orcid{\@currOrcid}\fi}}%
+ {\protected@csxappto{@emailsandorcids#1}{%
+ \if\relax\@currEmail\relax\else;\ \email{\@currEmail}\fi\if\relax\@currOrcid\relax\else,\ \orcid{\@currOrcid}\fi}}%
+}
+
\renewcommand\author[4][]{%
\ifnewaffil\addtocounter{affil}{1}%
\edef\AB@thenote{\arabic{affil}}%
\fi%
\if\relax#1\relax\def\AB@note{\AB@thenote}\else\def\AB@note{#1}%
- \ifcsundef{@emailsandorcids\AB@note}{\csgdef{@emailsandorcids\AB@note}{}}{}%
\setcounter{Maxaffil}{0}\fi
\ifnum\value{authors}=0\def\@firstauthor{#2}\fi
\ifnum\value{authors}>1\relax
- \@namedef{@sep\number\c@authors}{\Authsep}\fi
+ \@namedef{@sep\number\c@authors}{\Authsep}\fi
\addtocounter{authors}{1}%
\begingroup
- \let\protect\@unexpandable@protect \let\and\AB@pand
- \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}%
- \@temptokena=\expandafter{\AB@authors}%
- \@temptokenb=\expandafter{\AB@authors}%
- {\def\\{\protect\\[\@affilsep]\protect\Affilfont
- \protect\AB@resetsep}%
- \xdef\AB@author{\AB@blk@and#2}%
- \ifnewaffil\gdef\AB@las{}\gdef\AB@lasx{\protect\Authand}\gdef\AB@as{}%
- \xdef\AB@authors{\the\@temptokena\AB@blk@and}%
- \else
- \xdef\AB@authors{\the\@temptokena\AB@as\AB@au@str}%
- \global\let\AB@las\AB@lasx\gdef\AB@lasx{\protect\Authands}%
- \gdef\AB@as{\Authsep}%
- \fi
- \gdef\AB@au@str{#2}}%
- \@temptokena=\expandafter{\AB@authlist}%
- \@temptokenb=\expandafter{\@authlisthead}%
- \let\\=\authorcr
- \xdef\AB@authlist{\the\@temptokena
- \protect\@nameuse{@sep\number\c@authors}%
- \protect\Authfont#2\if\relax#4\relax\else\,\orcidlink{#4}\fi\AB@authnote{\AB@note}}%
- \xdef\@authlisthead{\the\@temptokenb
- \protect\@nameuse{@sep\number\c@authors}%
- \protect\Authfont#2}%
+ \let\protect\@unexpandable@protect \let\and\AB@pand
+ \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}%
+ \@temptokena=\expandafter{\AB@authors}%
+ \@temptokenb=\expandafter{\AB@authors}%
+ {\def\\{\protect\\[\@affilsep]\protect\Affilfont
+ \protect\AB@resetsep}%
+ \xdef\AB@author{\AB@blk@and#2}%
+ \ifnewaffil\gdef\AB@las{}\gdef\AB@lasx{\protect\Authand}\gdef\AB@as{}%
+ \xdef\AB@authors{\the\@temptokena\AB@blk@and}%
+ \else
+ \xdef\AB@authors{\the\@temptokena\AB@as\AB@au@str}%
+ \global\let\AB@las\AB@lasx\gdef\AB@lasx{\protect\Authands}%
+ \gdef\AB@as{\Authsep}%
+ \fi
+ \gdef\AB@au@str{#2}}%
+ \@temptokena=\expandafter{\AB@authlist}%
+ \@temptokenb=\expandafter{\@authlisthead}%
+ \let\\=\authorcr
+ \xdef\AB@authlist{\the\@temptokena
+ \protect\@nameuse{@sep\number\c@authors}%
+ \protect\Authfont#2\if\relax#4\relax\else\,\orcidlink{#4}\fi\AB@authnote{\AB@note}}%
+ \xdef\@authlisthead{\the\@temptokenb
+ \protect\@nameuse{@sep\number\c@authors}%
+ \protect\Authfont#2}%
\endgroup
\ifnum\value{authors}>2\relax
\@namedef{@sep\number\c@authors}{\Authands}\fi
+ \ifcsundef{@emailsandorcids\AB@note}{\csgdef{@emailsandorcids\AB@note}{}}{}%
+ \sbox\z@{\@tempcnta=0#1\relax}%
+ \expandafter\ifdim\wd\z@>\z@\relax
+ \multiaffil{#1}{#3}{#4}
+ \else
+ \ifcsundef{@emailsandorcids\AB@note}{\csgdef{@emailsandorcids\AB@note}{}}{}%
\ifcsempty{@emailsandorcids\AB@note}%
{\csgappto{@emailsandorcids\AB@note}{%
- \if\relax#3\relax\else\email{#3}\fi\if\relax#4\relax\else,\ \orcid{#4}\fi}%
- }%
+ \if\relax#3\relax\else\email{#3}\fi\if\relax#4\relax\else,\ \orcid{#4}\fi}}%
{\csgappto{@emailsandorcids\AB@note}{%
\if\relax#3\relax\else;\ \email{#3}\fi\if\relax#4\relax\else,\ \orcid{#4}\fi}}%
-
+ \fi%
\newaffilfalse
}
\renewcommand\@author{%
@@ -1529,6 +1551,7 @@ This work consists of the file lni.dtx
% \end{macrocode}
% \begin{macrocode}
\RequirePackage{url}
+\urlstyle{same}
% \end{macrocode}
% improve wrapping of URLs - hint by http://tex.stackexchange.com/a/10419/9075
% \begin{macrocode}
@@ -3071,12 +3094,13 @@ EXECUTE {end.bib}
\title[Ein Kurztitel]{Ein sehr langer Titel über mehrere Zeilen mit sehr vielen
Worten und noch mehr Buchstaben}
%% \subtitle{Untertitel / Subtitle} % if needed
-\author[1]{Firstname1 Lastname1}{firstname1.lastname1@affiliation1.org}{0000-0000-0000-0000}
-\author[2]{Firstname2 Lastname2}{firstname2.lastname2@affiliation2.org}{0000-0000-0000-0000}
-\author[1]{Firstname3 Lastname3}{firstname3.lastname3@affiliation1.org}{0000-0000-0000-0000}
-\author[1]{Firstname4 Lastname4}{firstname4.lastname4@affiliation1.org}{0000-0000-0000-0000}%
-\affil[1]{Universität\\Abteilung\\Straße\\Postleitzahl Ort\\Land}
-\affil[2]{University\\Department\\Address\\Country}
+ \author[1,2]{Firstname1 Lastname1}{firstname1.lastname1@affiliation1.org}{0000-0000-0000-0000}
+ \author[2]{Firstname2 Lastname2}{firstname2.lastname2@affiliation2.org}{0000-0000-0000-0000}
+ \author[3]{Firstname3 Lastname3}{firstname3.lastname3@affiliation1.org}{0000-0000-0000-0000}
+ \author[1]{Firstname4 Lastname4}{firstname4.lastname4@affiliation1.org}{0000-0000-0000-0000}%
+ \affil[1]{Universität 1\\Abteilung\\Straße\\Postleitzahl Ort\\Land}
+ \affil[2]{University 2 \\Department\\Address\\Country}
+ \affil[3]{University 3\\Department\\Address\\Country}
\maketitle
\begin{abstract}
diff --git a/Master/texmf-dist/source/latex/mailing/mailing.dtx b/Master/texmf-dist/source/latex/mailing/mailing.dtx
index 01aabfcfd43..2a1747d4404 100644
--- a/Master/texmf-dist/source/latex/mailing/mailing.dtx
+++ b/Master/texmf-dist/source/latex/mailing/mailing.dtx
@@ -1,33 +1,34 @@
% \iffalse meta-comment
%
-% Copyright 1994-2004 Johannes Braams. All rights reserved.
-%
+% Copyright 1999-2024 Johannes L. Braams. All rights reserved.
+%
% This file is part of the mailing package.
% -----------------------------------------
-%
+%
% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
% This work has the LPPL maintenance status "maintained".
-%
+%
% The Current Maintainer of this work is Johannes Braams.
-%
-% The list of all files belonging to the mailing package is
-% given in the file `manifest.txt'.
-%
+%
+% The list of all files belonging to the supertabular package is
+% given in the file `MANIFEST.
+%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
+%
% \CheckSum{157}
%
%\iffalse
-%% Copyright (C) 1999-2004 Johannes L. Braams texniek at braams.cistron.nl
+%% Copyright (C) 1999-2024 Johannes L. Braams texniek at texniek.nl
%%
%%
%<*dtx>
@@ -38,7 +39,7 @@
%<driver>\ProvidesFile{mailing.drv}
%\fi
%\ProvidesFile{mailing}
- [2004/02/20 v1.0b Send letters to multiple addresses]
+ [2024/07/20 v1.0c Send letters to multiple addresses]
%\iffalse
%<*driver>
\documentclass{ltxdoc}
@@ -48,11 +49,14 @@
\end{document}
%</driver>
%\fi
+% \changes{v1.0c}{2024/07/20}{Updated contact info}
%
% \GetFileInfo{mailing}
-% \title{Creating a mailing}
+% \title{Creating a mailing\thanks{This file
+% has version number \fileversion, last
+% revised \filedate.}}
% \author{Johannes Braams}
-% \date{september 7, 1994}
+% \date{\filedate}^^AA original date{september 7, 1994}
% \maketitle
%
% \markboth
@@ -304,4 +308,4 @@
% \end{macro}
%
% \Finale
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/source/latex/mailing/mailing.ins b/Master/texmf-dist/source/latex/mailing/mailing.ins
index b9143a89b68..a9c133d718b 100644
--- a/Master/texmf-dist/source/latex/mailing/mailing.ins
+++ b/Master/texmf-dist/source/latex/mailing/mailing.ins
@@ -3,54 +3,43 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1989-2004 Johannes L. Braams. All rights reserved.
%%
-%% This file is part of the mailing package.
-%% ------------------------------------------
+%% This file is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
-%% It 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 version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
+%% IMPORTANT NOTICE:
%%
-%% This work has the LPPL maintenance status "maintained".
+%% Copyright (C) 1994-2024 Johannes Braams, All rights reserved.
%%
-%% The Current Maintainer of this work is Johannes Braams.
-%%
-%% The list of all files belonging to the mailing package is
-%% given in the file `manifest.txt.
-%%
-%% The list of derived (unpacked) files belonging to the distribution
-%% and covered by LPPL is defined by the unpacking scripts (with
-%% extension .ins) which are part of the distribution.
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1.3c of the License, or any later version.
%%
%% --------------- start of docstrip commands ------------------
%%
% ignored commands
-\def\filedate{2004/02/20}
+\def\filedate{2024/07/20}
\def\batchfile{mailing.ins}
\input docstrip.tex
-
% package file
\preamble
-Copyright (C) 1999-2004 Johannes Braams. All rights reserved.
+Copyright (C) 1999-2024 Johannes Braams. All rights reserved.
This file was generated from file(s) of the mailing package.
------------------------------------------------------------
It may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2003/12/01 or later.
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008 or later.
This work has the LPPL maintenance status "maintained".
@@ -61,12 +50,13 @@ mailing package. You may however distribute the mailing package
without such generated files.
The list of all files belonging to the mailing package is
-given in the file `manifest.txt.
+given in the file `MANIFEST'.
The list of derived (unpacked) files belonging to the distribution
and covered by LPPL is defined by the unpacking scripts (with
extension .ins) which are part of the distribution.
\endpreamble
+\keepsilent
\generateFile{mailing.sty}{t}{\from{mailing.dtx}{package}}
diff --git a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
index d8c464a117b..7857f9b70a6 100644
--- a/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
+++ b/Master/texmf-dist/source/latex/mathastext/mathastext.dtx
@@ -2,8 +2,8 @@
% N.B.: this dtx file does NOT use \DocInput, it only uses docstrip.
% The LaTeX source of the documentation is NOT prefixed with %'s.
%<*dtx>
-\def\dtxtimestamp {Time-stamp: <29-12-2023 at 10:54:52 CET>}
-\def\docdate{2023/12/29}
+\def\dtxtimestamp {Time-stamp: <26-07-2024 at 11:21:35 CEST>}
+\def\docdate{2024/07/27}
% To extract run etex on this file, then to build documentation run
% latexmk on mathastext.tex then dvipdfmx on the dvi.
% For more information see http://jf.burnol.free.fr/v13/INSTALL.txt
@@ -11,8 +11,8 @@
% due to usage of (<A7>) as an active character.
%</dtx>
%<*drv>
-\def\MSTpkgdate {2023/12/29}
-\def\MSTpkgversion {1.3zb}
+\def\MSTpkgdate {2024/07/27}
+\def\MSTpkgversion {1.4b}
%</drv>
%<*dtx>
\iffalse % meta-comment
@@ -28,13 +28,13 @@
+-------------------------------------------+
This Work may be distributed and/or modified under the conditions
-of the [LPPL1.3c](http://www.latex-project.org/lppl/lppl-1-3c.txt)
+of the [LPPL 1.3c](https://www.latex-project.org/lppl/lppl-1-3c.txt)
The Author of this Work is Jean-Francois Burnol (`jfbu at free dot fr`)
-Copyright (C) 2011-2019, 2022, 2023 Jean-Francois Burnol
+Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
- Source: mathastext.dtx 1.3zb 2023/12/29
+ Source: mathastext.dtx 1.4b 2024/07/27
%</readme>
%<*dtx>
@@ -44,10 +44,10 @@ Copyright (C) 2011-2019, 2022, 2023 Jean-Francois Burnol
%%----------------------------------------------------------------
%% Package: mathastext
%% Info: Use the text font in math mode (JFB)
-%% Version: 1.3zb 2023/12/29
+%% Version: 1.4b 2024/07/27
%% License: LPPL 1.3c (http://www.latex-project.org/lppl/lppl-1-3c.txt)
-%% Copyright (C) 2011-2019, 2022, 2023 Jean-Francois Burnol
-%% <jfbu at free dot fr>
+%% Copyright (C) 2011-2019, 2022-2024 Jean-Francois Burnol
+%% <jfbu at free dot fr>
%% Examples of use of mathastext:
%% http://jf.burnol.free.fr/mathastext.html
%% http://jf.burnol.free.fr/showcase.html
@@ -95,19 +95,11 @@ Copyright (C) 2011-2019, 2022, 2023 Jean-Francois Burnol
\begingroup
\input docstrip.tex
\askforoverwritefalse
-\def\testfilepreamble{\string\def\string\testfileincipit{Test file
- to accompany \string\texttt{mathastext}^^J%
- version \string\texttt{\MSTpkgversion} of \string\texttt{\MSTpkgdate}}}
\generate{\nopreamble\nopostamble
\file{README.md}{\from{mathastext.dtx}{readme}}
\file{ChangeLog.md}{\from{mathastext.dtx}{changelog}}
\usepostamble\defaultpostamble
\file{mathastext.tex}{\from{mathastext.dtx}{drv}}
- \usepreamble\testfilepreamble
- \file{mathastexttestmathversions.tex}{\from{mathastext.dtx}{mathversions}}
- \file{mathastexttestunicodemacos.tex}{\from{mathastext.dtx}{macos}}
- \file{mathastexttestunicodelinux.tex}{\from{mathastext.dtx}{linux}}
- \file{mathastexttestalphabets.tex}{\from{mathastext.dtx}{alphabets}}
\usepreamble\defaultpreamble
\file{mathastext.sty}{\from{mathastext.dtx}{package}}%
}
@@ -120,7 +112,8 @@ Copyright (C) 2011-2019, 2022, 2023 Jean-Francois Burnol
% no file extractions if latex compilation was on mathastext.tex
\ifdefined\MessageDeFin\AtEndDocument{\MessageDeFin}\fi
\begingroup\catcode1 0 \catcode`\\ 12
-% this is to fool TeX's recognition of \if/\else/\fi like tokens in test files
+% This is to fool TeX's recognition of \if/\else/\fi like tokens in test files,
+% but on 2024/07/14 I removed from the dtx four previously included such filss.
^^Aiffalse
%</dtx>
%<*readme>
@@ -200,6 +193,98 @@ MATHASTEXT CHANGE LOG
%</changelog>
%<*readme|changelog>
+1.4b \[2024/07/27\]
+----
+
+* Fix a regression at `1.4` regarding option `nodigits`.
+
+* New option: `noletters`. I am in old age now so I can provide an option
+ completely antithetical to my life work.
+
+* Option `everymath` which is destined to be removed at next major
+ release warns user about it. As major releases tend to happen once
+ per decade I think the constant nagging will become insufferable
+ and you will adapt to the `1.4` changes rather than persisting into
+ using this option.
+
+1.4a \[2024/07/20\]
+----
+
+* There was a documentation glitch in 1.4 and also a problem with the
+ `\MTprimeskip` feature being lost under the emergency fall-back
+ `everymath` option.
+
+1.4 \[2024/07/20\]
+---
+
+* Since 1.2 of 2012/12/20, mathastext has used mathematically active
+ characters to propose certain advanced functionalities. For reasons half
+ lost in the mists of time but whose main one was surely to keep the
+ meaning of the active shape of characters unchanged outside of math mode,
+ this mathematical activation, and (in most cases) the definitions of what
+ active characters do, were done again at *each* entrance into math mode.
+ At this 1.4 release, mathastext does not inject *any* code whatsoever into
+ the `\everymath` and `\everydisplay` toks registers anymore (except for
+ one font-related hack needed under LuaLaTeX, see below). Your documents
+ will compile a tiny bit faster.
+
+* In (unsual) documents where users play with catcodes and mathcodes it is
+ impossible to keep exact backward compatibility, because documented user
+ commands which acted formerly a toggles with delayed action now will enact
+ changes immediately if in the document body. In practice consequences are
+ expected to be few, because catcode active characters are (as was already
+ the case with earlier releases) hacked only when they are Babel shorthands
+ and they are then modified in a way altering only their action in math
+ mode. The precise description of what mathastext does when mathematically
+ activating (or not) a character, depending on circumstances, is to be
+ found among small-print comments in the section "Extended scope of the
+ math alphabets commands". See also the documentation of the
+ `\MTmathactiveletters` command for some specifics regarding ascii letters.
+
+* New option: `everymath`. It instructs mathastext to revert (partially)
+ to its legacy code which uses `\everymath/\everydisplay`. This reversal
+ is partial, the handling of ascii letters not being included into it. The
+ `everymath` option is there only to try as a quick fix in case transition
+ to this release causes a major problem in a user document and time is
+ lacking to investigate. Please report to the author such issues. Option
+ `everymath` is destined to be removed at next major release.
+
+* New option: `activedigits`. Enjoy.
+
+* It is now easier to hook into the mathastext architecture for
+ mathematically activated ascii letters. See the new section "Hacking
+ letters (and even digits) for special tasks".
+
+* Bugfix: do not override special behavior of the math mode dot in
+ babel-spanish.
+
+* Bugfix: A desperate hack related to LuaLaTeX font matters and dating
+ back to 1.3o 2016/05/03 had been for some years in dire need of an update
+ regarding fonts using `Renderer=HarfBuzz`. This is done now. Thanks to
+ tex.sx `user691586` for report. This is currently the sole remaining
+ usage of `\everymath/\everydisplay`.
+
+* Bugfix: an optional feature related to `\{` and `\}` was broken since an
+ upstream LaTeX change at its 2020-02-02 release.
+
+* With option symbolmisc, those math symbol macros formerly defined via
+ `\DeclareRobustCommand` are now declared via `\protected\def`.
+
+* Removal of legacy branches previously kept to support LaTeX earlier than
+ 2020-02-02.
+
+* Removal of support for EU1 and EU2 font encodings.
+
+* Option `noasterisk` deprecated at 1.2d 2013/01/02 has (finally) been removed.
+
+* Four test files previously included and auto-extracted from the
+ distributed dtx have been dropped. One of them is still available
+ on the package homepage.
+
+* Some parts of the documentation have been massively re-ordered and even to some
+ extent improved. But there may be some occasions where obsolete statements will
+ be found having the legacy `\everymath/\everydisplay` situation as background.
+
1.3zb \[2023/12/29\]
-----
@@ -251,6 +336,8 @@ MATHASTEXT CHANGE LOG
* Fix long-standing hyperlink problems in the documentation:
blue color words should now all be functioning hyperlinks.
+%</readme|changelog>
+%<*changelog>
1.3z \[2023/09/01\]
----
@@ -311,8 +398,6 @@ been pushed to CTAN, hence the version increase to 1.3y)
letters and emitted during math version creation in the
preamble.
-%</readme|changelog>
-%<*changelog>
1.3w \[2019/11/16\]
----
@@ -358,7 +443,7 @@ been pushed to CTAN, hence the version increase to 1.3y)
to some other (robust) math alphabet macros, but were not
robust in the strict sense. This does cause some issues for
moving arguments in the context of multiple math versions,
- hence it was a bug. The special behaviour of the math
+ hence it was a bug. The special behavior of the math
alphabet commands (they redefine themselves and other macros
on first use) makes is somewhat problematic for mathastext
to keep them updated across math versions and at the same
@@ -620,16 +705,14 @@ been pushed to CTAN, hence the version increase to 1.3y)
redefined as math symbols and could not be used as delimiters.
-1.3d \[2015/02/26\]
+1.3d \[2014/05/23\]
----
-* the documentation mentions the improved compatibility of mathastext
+* A 2015/02/26 edit to the documentation mentions the
+ improved compatibility of mathastext
with the latest (3.34) beamer release: no more need for
`\usefonttheme{professionalfonts}`.
-1.3d \[2014/05/23\]
-----
-
* new commands `\MTstandardgreek` and `\MTcustomgreek`.
* The Greek letters, in case of use of one of the package related
@@ -760,6 +843,8 @@ use of mathematically active characters in versions 1.2 and 1.2b.
mechanism of letting non-letter symbols obey the math alphabet
commands.
+* the `noasterisk` option is deprecated and made a no-op.
+
* documentation extended and improved.
1.2c \[2012/12/31\]
@@ -904,6 +989,11 @@ use of mathematically active characters in versions 1.2 and 1.2b.
complete manner to adapt the math configuration to fonts
provided with no math support.
+1.13d
+----
+
+* new macros `\MTstandardgreek` and `\MTcustomgreek`
+
1.13b
----
@@ -972,502 +1062,6 @@ use of mathematically active characters in versions 1.2 and 1.2b.
%%% mode: latex
%%% End:
%</drv>
-%<*mathversions>
-%% This file `mathastexttestversions.tex' is for testing the enhanced
-%% concept of math versions provided by the package `mathastext'.
-%%
-%% See `mathastext.dtx' for the copyright and conditions of distribution or
-%% modification.
-%%
-\documentclass{article}
-\usepackage[T1]{fontenc}
-\usepackage{newcent}
-\usepackage[subdued]{mathastext}
-\Mathastext[newcent]
-\renewcommand\familydefault\ttdefault
-\Mathastext[courier]
-\renewcommand\familydefault\sfdefault
-\Mathastext[avantgarde]
-\renewcommand\familydefault\rmdefault
-\begin{document}
-\testfileincipit
-
-text in NewCentury and $math\ as\ in\ default$,%
-\MTversion{courier} text in Courier and $math\ in\ Courier$,%
-\MTversion{avantgarde} text in AvantGarde and $math\ in\ AvantGarde$,%
-\MTversion[newcent]{courier} text in NewCentury and $math\ in\
-Courier$,\MTversion{bold} text in bold NewCentury and $math\ as\ in\
-bold\ default$,\MTversion[courier]{avantgarde} text in Courier and
-$math\ in\ AvantGarde$.
-\end{document}
-%</mathversions>
-%<*macos>
-%% This file `mathastexttestunicodemacos.tex' is for testing the use
-%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX.
-%%
-%% Mac OS X specific fonts are used (initially tested on 10.8.2).
-%%
-%% See `mathastext.dtx' for the copyright and conditions of distribution or
-%% modification.
-%%
-\documentclass{article}
-\usepackage[hscale=0.85]{geometry}
-\usepackage{multicol}
-\usepackage[no-math]{fontspec}
-\usepackage{lmodern}
-\usepackage{metalogo}
-\usepackage{iftex}
-\ifXeTeX
-\expandafter\def\expandafter\testfileincipit\expandafter
- {\testfileincipit\ (compiled with \XeLaTeX)}
-\else
-\ifLuaTeX
-\expandafter\def\expandafter\testfileincipit\expandafter
- {\testfileincipit\ (compiled with \LuaLaTeX)}
-\fi\fi
-\usepackage[subdued,italic,asterisk]{mathastext}
-\setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler]
-\setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter]
-\setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum]
-\setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot]
-\setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic]
-\MTDeclareVersion{Times}{T1}{ptm}{m}{n}
-\begin{document}
-\MTversion{normal}
-\testfileincipit
-
-This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and
-\emph{subdued} options. The base document fonts are the Latin Modern ones (in
-OpenType format). The other OpenType fonts were chosen from those available on
-a Mac OS machine. We also used the Times font in traditional \TeX\ font T1
-encoding, to demonstrate the removal since release \texttt{1.3u} of a former
-limitation that all math versions had to share the same font encoding, else
-some characters such as the dotless \texttt{i} ($\imath$), or the minus sign
-could well vanish from the output in the non-normal math versions.
-
-Furthermore we test (last line of each block, on the left) if the non-letter
-characters obey the math alphabet \verb|\mathbf|. In the normal and bold math
-versions, this feature is de-activated, as option \emph{subdued} was used; and
-if activated we should then use in these math versions the package
-\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original
-one, which will use encoding \verb|OT1| in the normal and bold versions, as we
-loaded \verb|fontspec| with its option \emph{no-math}.
-
-Some among the fonts tested have no bold variant or no italic variant.
-
-Note (tested 2013/09/03): for some reason the \verb|Color| specifications in the
-\verb|\setmainfont| commands work only
-with \XeLaTeX{}, not with \LuaLaTeX{}; a few months back I had not noticed
-such a difference between the two engines.
-
-Update (tested 2016/01/15 with reasonably up-to-date TL2015): \verb|Color|
-spec in use of \verb|\setmainfont| command now functional again with
-\LuaLaTeX.
-
-Note (tested 2019/08/11, reasonably up-to-date TL2019): spacing with the Didot
-font differs widely between \XeLaTeX\ and \LuaLaTeX{} (perhaps related to
-italic corrections, see the package documentation), and also it seems
-\LuaLaTeX{} will not find (from our generic usage of the \verb|fontspec|
-interface, at least) bold variants of the Hoefler Text and American Typewriter
-fonts, contrarily to \XeLaTeX. Also, the \emph{italic} option remains
-seemingly without effect with \LuaLaTeX{} in the case of the Hoefler Text font
-(see the package source code comments on some problems with the two ``modes''
-for text fonts under \LuaLaTeX, which may be related with this specific issue
-here).
-
-Update (tested 2022/10/29, with 1.3x and up-to-date TL2022): it appears that
-most, perhaps even all, of the remarks in the preceding note are now obsolete
-as I do not see obvious differences between outputs from \XeLaTeX{} versus
-\LuaLaTeX{} but I did not seriously compare, only quickly done.
-
-\newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}%
- \def\tmpb{normal}\def\tmpc{bold}%
- \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx
- \MTexplicitbracesobeymathxx\fi\fi
-\begin{multicols}{2}
-\hbox to\columnwidth{\hbox to\columnwidth{\hfil
- $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}}
- \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ }
- \centerline{ $0123456789$ }
- \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ }
- \centerline{ $\mathbf{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash}$ }
-\columnbreak
- \centerline{ abcdefghijklmnopqrstuvwxyz }
- \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ }
- \centerline{ 0123456789 }
- \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
- \centerline{\bfseries !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
-\end{multicols}}
-\begin{multicols}{2}
- \centerline{\textbf{math mode}}
-\columnbreak
- \centerline{ \textbf{text} }
-\end{multicols}
-\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum}
-\TEST{Hoefler}\TEST{Typewriter}\TEST{bold}\TEST{Times}
-\end{document}
-%</macos>
-%<*linux>
-%% This file `mathastexttestunicodelinux.tex' is for testing the use
-%% of the package `mathastext' with the unicode engines XeTeX or LuaLaTeX.
-%%
-%% Fonts which were available on a Linux machine are used. Beware that
-%% compilation with LuaLaTeX will abort with errors if specified fonts do not
-%% exist on your system.
-%%
-%% See `mathastext.dtx' for the copyright and conditions of distribution or
-%% modification.
-%%
-\documentclass{article}
-\usepackage[hscale=0.8]{geometry}
-\usepackage{multicol}
-\usepackage[no-math]{fontspec}
-\usepackage{lmodern}
-\usepackage{metalogo}
-\usepackage{iftex}
-\ifXeTeX
-\expandafter\def\expandafter\testfileincipit\expandafter
- {\testfileincipit\ (compiled with \XeLaTeX)}
-\else
-\ifLuaTeX
-\expandafter\def\expandafter\testfileincipit\expandafter
- {\testfileincipit\ (compiled with \LuaLaTeX)}
-\fi\fi
-\usepackage[subdued,italic,asterisk]{mathastext}
-\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana]
-\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial]
-\setmainfont[Color=00C000]{DejaVu Serif} \Mathastext[DejaVu]
-\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale]
-%% commented out as these fonts do not exist anymore on the Linux box
-%% I have access to (test last done 2016/01/15)
-%%\setmainfont[Color=C000C0]{URW Chancery L} \Mathastext[Chancery]
-%%\setmainfont[Color=800080]{URW Palladio L} \Mathastext[Palladio]
-\setmainfont[Color=808000]{Liberation Serif} \Mathastext[Liberation]
-\MTDeclareVersion{Times}{T1}{ptm}{m}{n}
-\begin{document}
-\MTversion{normal}
-\testfileincipit
-
-This test uses \verb|mathastext| with its \emph{italic}, \emph{asterisk}, and
-\emph{subdued} options. The base document fonts are the Latin Modern ones (in
-OpenType format). The other OpenType fonts were chosen from those available on
-a Linux machine. We also used the Times font in traditional \TeX\ font T1
-encoding, to demonstrate the removal since release \texttt{1.3u} of a former
-limitation that all math versions had to share the same font encoding, else
-some characters such as the dotless \texttt{i} ($\imath$), or the minus sign
-could well vanish from the output in the non-normal math versions.
-
-Furthermore we test (last line of each block, on the left) if the non-letter
-characters obey the math alphabet \verb|\mathbf|. In the normal and bold math
-versions, this feature is de-activated, as option \emph{subdued} was used; and
-if activated we should then use in these math versions the package
-\verb|\Mathbf| rather than \verb|\mathbf| which is there still the original
-one, which will use encoding \verb|OT1| in the normal and bold versions, as we
-loaded \verb|fontspec| with its option \emph{no-math}.
-
-Some among the fonts tested have no bold variant or no italic variant.
-
-Note: the two unicode engines \XeLaTeX\ and \LuaLaTeX\ give likely not fully
-identical results particularly for the math mode. At least this is what I
-observed regularly over the years with the variant of this file prepared for
-fonts available on Mac OS, which is my main system where I develop
-|\mathastext|. Lastly for example (TL2019, august 2019), \LuaLaTeX\ could not
-find the bold variant of some system font, but \XeLaTeX\ did. And the spacing
-for the letters of the Didot font was vastly different between the two
-engines.
-
-\newcommand\TEST[1]{\MTversion{#1}\def\tmpa{#1}%
- \def\tmpb{normal}\def\tmpc{bold}%
- \ifx\tmpa\tmpb\else\ifx\tmpa\tmpc\else \MTnonlettersobeymathxx
- \MTexplicitbracesobeymathxx\fi\fi
-\begin{multicols}{2}
-\hbox to\columnwidth{\hbox to\columnwidth{\hfil
- $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}}
- \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ }
- \centerline{ $0123456789$ }
- \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ }
- \centerline{ $\mathbf{!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash}$ }
-\columnbreak
- \centerline{ abcdefghijklmnopqrstuvwxyz }
- \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ }
- \centerline{ 0123456789}
- \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
- \centerline{\bfseries !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
-\end{multicols}}
-\begin{multicols}{2}
- \centerline{\textbf{math mode}}
-\columnbreak
- \centerline{ \textbf{text} }
-\end{multicols}
-\TEST{DejaVu}
-\TEST{Verdana}
-\TEST{Andale}
-%%\TEST{Palladio}
-\TEST{Arial}
-%%\TEST{Chancery}
-\TEST{Liberation}
-\TEST{bold}\TEST{normal}\TEST{Times}
-\end{document}
-%</linux>
-%<*alphabets>
-%% This file `mathastexttestalphabets.tex' is for testing the extended
-%% scope of the math alphabet commands with package `mathastext', via
-%% the package command \MTnonlettersobeymathxx.
-%%
-%% Compile either with latex, pdflatex, lualatex (pdf output) or xelatex.
-%%
-%% See `mathastext.dtx' for the copyright and conditions of distribution or
-%% modification.
-%%
-\documentclass{article}
-\usepackage[hscale=0.66, vscale=0.72]{geometry}
-\usepackage{amsmath}
-\usepackage{mathtools}\mathtoolsset{centercolon}
-%% WARNING THIS IS INCOMPATIBLE WITH BABEL+FRENCHB
-%% BUT WITH MATHASTEXT LOADED THIS IS CORRECTED
-%% *IF* \MTnonlettersobeymathxx IS MADE USE OF.
-\usepackage{iftex}
-\ifXeTeX
-\expandafter\def\expandafter\testfileincipit\expandafter
- {\testfileincipit\ (compiled with \XeLaTeX)}
-\usepackage[no-math]{fontspec}
-\setmainfont[ExternalLocation,
- Mapping=tex-text,
- BoldFont=texgyretermes-bold,
- ItalicFont=texgyretermes-italic,
- BoldItalicFont=texgyretermes-bolditalic]{texgyretermes-regular}
-\setmonofont[ExternalLocation,
- Mapping=tex-text]{texgyrecursor-regular}
-\setsansfont[ExternalLocation,
- Mapping=tex-text]{texgyreheros-regular}
-\else
-\ifLuaTeX % for pdf output
-\expandafter\def\expandafter\testfileincipit\expandafter
- {\testfileincipit\ (compiled with \LuaLaTeX)}
-\usepackage[no-math]{fontspec}
-\setmainfont[Ligatures=TeX]{TeX Gyre Termes}
-\setmonofont[Ligatures=TeX]{TeX Gyre Cursor}
-\setsansfont[Ligatures=TeX]{TeX Gyre Heros}
-\else
-\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
-\usepackage{tgtermes}
-\usepackage{tgcursor}
-\usepackage{tgheros}
-\fi\fi
-\usepackage{metalogo} % must be loaded /after/ [no-math]fontspec
-\usepackage[french]{babel}
-\usepackage[italic,asterisk]{mathastext}
-\MTlettershape{n}\Mathastext[upright]
-\MTnonlettersobeymathxx
-\MTexplicitbracesobeymathxx
-\delimitershortfall-1pt
-\usepackage{color}
-\begin{document}
-\testfileincipit
-
-\begin{center}
- \bfseries Two features of \texttt{mathastext}:\\
-extended scope of the math alphabets and added italic corrections\par
-\end{center}
-
-The package makes
-${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}\,{\{}\,{\}}$,
-the asterisk $*$, and $.\,/\,\vert\,\backslash\,{\#}\,{\$}\,{\%}\,{\&}$ obey the
-math alphabet commands (this is the maximal list, some characters may have been
-excluded by the corresponding package options). For the characters listed first
-the mechanism involves a `mathematical activation'.
-
-As this process may create incompatibilities, it will be put into action
-for
-${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}$
-only if the user makes use of the package command
-\verb|\MTnonlettersobeymathxx| (and the braces necessitate
-\verb|\MTexplicitbracesobeymathxx|).
-
-It could be that one such character has been made `active' in the entire
-document by some other package, typically a language definition file for the
-\verb|babel| system. Here for example we have used \verb|babel| with the
-\verb|french| option, which makes the high punctuation characters !?:; active
-throughout the document (extra spacing is put in front of the character when
-used in text; no change in math but perhaps for other languages and characters
-this could happen, it is up to the language definition file to decide).
-
-When \verb|mathastext| detects that a character it wants to `mathematically
-activate' is already `active', it does not go further except if it seems that
-the activation was done by Babel. If the activation was done by Babel, then
-\verb|mathastext| replaces the expansion of the active character in math mode by
-what is necessary to achieve its goal. It does not additionally mathematically
-activate the character; rather it makes sure that the character is \emph{not}
-mathematically active. In the present document the colon was made mathematically
-active by \verb|mathtools| but this was already canceled in the preamble by
-\verb|mathastext| as it was loaded later. And it is better so, because the
-combination \verb|babel| (with option \verb|frenchb|) +\verb|mathtools| (with
-\verb|centercolon|) makes \verb|$:$| create an infinite loop!
-
-But even if someone had mathematically activated the colon after the preamble,
-or after the loading of \verb|mathastext|, this would be canceled again
-automatically for each inline or displayed mathematical formula (if the user
-does \verb|\MTnonlettersobeymathxx|).
-
-The conclusion with \verb|\MTnonlettersobeymathxx| is: if some package has tried
-to make the character mathematically active, this will be overruled by
-\verb|mathastext|; if some package has made the character globally active, then
-the package wins except if it is Babel, as \verb|mathastext| may in the latter
-case safely modify the action in math mode (paying attention to the fact that
-the character should be usable in \verb|\label| and \verb|\ref| in and outside
-of math mode).
-
-The displayed equations next illustrate the extended scope of the math alphabets
-which now apply to $=$, $-$, $($, $)$, $[$, $]$ (but not to the large delimiters
-of course). Furthermore, for testing purposes the equations were labeled using
-such characters, for example the last one has label \verb|eq=7|, to check that
-the mathematical activation of $=$ does not cause problems with
-\verb|\label/\ref|.
-
-\def\testformula{\quad\Biggl\lbrace\biggl(\left(\left[[\sin(a) + \cos(b) - \log(c) =
-\sec(d)]\right]\right)\biggr)\Biggr\rbrace}
-\begin{equation}\testformula\label{eq:1}\end{equation}
-\begin{equation}\mathnormalbold{mathnormalbold:\testformula}\label{eq;2}\end{equation}
-\begin{equation}\mathrm{mathrm:\testformula}\label{eq?3}\end{equation}
-\begin{equation}\mathbf{mathbf:\testformula}\label{eq!4}\end{equation}
-\begin{equation}\mathit{mathit:\testformula}\label{eq(5}\end{equation}
-\begin{equation}\mathtt{mathtt:\testformula}\label{eq)6}\end{equation}
-\begin{equation}\mathsf{mathsf:\testformula}\label{eq=7}\end{equation}
-
-Equations above are numbered \ref{eq:1}, \ref{eq;2}, \ref{eq?3}, \ref{eq!4}, and
-$\ref{eq(5}$, $\ref{eq)6}$, and $\ref{eq=7}$.
-
-\def\testline#1{$#1$&$\mathnormalbold{#1}$&$\mathrm{#1}$&$\mathbf{#1}$&$\mathit{#1}$&$\mathtt{#1}$&$\mathsf{#1}$}
-
-\centerline{\begin{tabular}{ccccccc}
-\testline{a!b}\\
-\testline{a?b}\\
-\testline{a,b}\\
-\testline{a;b}\\
-\testline{a:b}\\
-\testline{a:=b}\\
-\testline{a\vcentcolon= b}\\
-\testline{a\colon b}\\
-\testline{a.b}\\
-\testline{a-b}\\
-\testline{a+b}\\
-\testline{a=b}\\
-\testline{a<b}\\
-\testline{a>b}\\
-\testline{<x,y>}\\
-\testline{\mathopen{<} x,y\mathclose{>}}\\
-\testline{\left< x,y\right>}\\
-\testline{a/b}\\
-\testline{a\backslash b}\\
-\testline{a\setminus b}\\
-\testline{a|b}\\
-\testline{a\mid b}\\
-\testline{(a,b)}\\
-\testline{[a,b]}\\
-\testline{\{a,b\}}
-\end{tabular}}
-
-The question mark has been made active by \verb|babel+frenchb|.
-\verb|mathastext| has imposed in math mode its ways (now \verb|$\mathbf{???}$|
-gives $\mathbf{???}$). As the extra spacing is added by \verb|frenchb| only in
-text, we had to use the math alphabet to check that indeed \verb|mathastext|
-overruled Babel.
-
-To double-check we will now make \string? mathematically active:
-\verb|\mathcode`?="8000|\mathcode`?="8000. This is a sure cause for disaster
-normally with Babel (don't do this at home without \verb|mathastext|!). But here
-with \verb|$?$| no bad surprise (infinite loop!) awaits us: just $?$.
-
-Let's take some other character, for example the opening parenthesis, and make
-it catcode active:
-\verb|\catcode`(=\active \def ({X}|.
-Let's try the input
-\verb|( and $($|.
-\begingroup
-\catcode`(=\active \gdef ({X}
-This gives ( and $($. We see that \verb|mathastext| does not attempt to modify
-the definition of the active character, as this activation was not done via the
-\verb|babel| services. \catcode`\(=12 \mathcode`(="8000 We now revert the
-parenthesis to catcode other (but maintain \verb|\def ({X}| as definition of its
-active version), and then make it mathematically active using the command
-\verb|\mathcode`(="8000|. If we try \verb|$((($| we see that the parenthesis is
-not converted into an $X$: $((($. The mathematically active character was
-overruled by \verb|mathastext|.
-
-Issuing \verb|\MTnonlettersdonotobeymathxx|\MTnonlettersdonotobeymathxx\ we do
-get the $X$'s from the input \verb|$((($|: $((($
-\endgroup
-This shows that \verb|mathastext| now does not modify in math mode the
-non-letter \verb|(|.
-
-\MTversion{upright}\MTnonlettersobeymathxx
-We defined in the preamble of the document a \verb|mathastext|-enhanced
-math version (named \verb|upright|) having the Latin letters upright in
-math mode. Let's switch to
-it: \newline
-\hbox to\linewidth{\hss\verb|\MTversion{upright}|\hss}
-
-With a font which is neither italic nor slanted, \verb|mathastext| automatically
-inserts italic corrections for better positioning of the subscript:
-\verb|$f_i^i$| gives
-$f_i^i$.
-After \verb|\MTnoicinmath| which turns off this feature\MTnoicinmath{}, the same
-input gives $f_i^i$, which is different.
-\footnote{last time I tried, this only worked with PDF\LaTeX{}, not with
- \LuaLaTeX{} or \XeTeX{}.}
-
-Again with italic corrections on (\verb|\MTicinmath|)\MTicinmath{}
-\verb|$f_{abc}^{def}$| gives $f_{abc}^{def}$, and here is another one:
-$f^{f_{abc}^{def}}_u$. Without italic corrections\MTnoicinmath: $f_{abc}^{def}$,
-and respectively $f^{f_{abc}^{def}}_u$.
-
-\MTicinmath
-
-\verb|mathastext| does not add these italic corrections inside arguments of
-math alphabets, as this would prevent the formation of ligatures:
-$\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$
-(no ligature in teletype) and $\mathsf{ff}$.\footnote{\llap{\textcolor{magenta}{\bfseries Changed!\kern3em}}Prior to 1.3i,
- italic corrections were added to the \string\mathnormal\ arguments.}
-
-\centerline{\begin{tabular}{ccccccc}
-\testline{a!b}\\
-\testline{a?b}\\
-\testline{a,b}\\
-\testline{a;b}\\
-\testline{a:b}\\
-\testline{a:=b}\\
-\testline{a\vcentcolon= b}\\
-\testline{a\colon b}\\
-\testline{a.b}\\
-\testline{a-b}\\
-\testline{a+b}\\
-\testline{a=b}\\
-\testline{a<b}\\
-\testline{a>b}\\
-\testline{<x,y>}\\
-\testline{\mathopen{<} x,y\mathclose{>}}\\
-\testline{\left< x,y\right>}\\
-\testline{a/b}\\
-\testline{a\backslash b}\\
-\testline{a\setminus b}\\
-\testline{a|b}\\
-\testline{a\mid b}\\
-\testline{(a,b)}\\
-\testline{[a,b]}\\
-\testline{\{a,b\}}
-\end{tabular}}
-
-\end{document}
-%</alphabets>
%<*dtx>
^^Afi^^Aendgroup % end of big \iffalse block including generated files
% Removal of the *sfixed found in tex/latex/mlmodern/omxmlmex.fd
@@ -1523,7 +1117,7 @@ $\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$
\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
\def\cmd@to@cs#1#2{\char\number`#2\relax}
% Here I am loading doc=v2 but formerly I was using ltxdoc via scrdoc
-% which I dropped at release 1.4l (2022-05-29) and without much
+% which I dropped at (etoc) release 1.4l (2022-05-29) and without much
% thinking I had kept this.
\DeclareRobustCommand\cs[1]{\texttt{\bslash#1}}
% As I may have the * active, or macro names with _ or ^, I should
@@ -1552,12 +1146,19 @@ $\mathnormal{ff}$, $\mathrm{ff}$, $\mathit{ff}$, $\mathbf{ff}$, $\mathtt{ff}$
% is set by geometry package and a4paper option from xint.tex file. So it
% seems I only need the hologo loading:
\usepackage{hologo}
-\DeclareRobustCommand*{\eTeX}{\hologo{eTeX}}%
-\DeclareRobustCommand*{\pdfLaTeX}{\hologo{pdfLaTeX}}%
-\DeclareRobustCommand*{\LuaTeX}{\hologo{LuaTeX}}%
-\DeclareRobustCommand*{\LuaLaTeX}{\hologo{LuaLaTeX}}%
-\DeclareRobustCommand*{\XeTeX}{\hologo{XeTeX}}%
-\DeclareRobustCommand*{\XeLaTeX}{\hologo{XeLaTeX}}%
+% 1.4 fix to some extra line spacing obviously caused by usage of the
+% \hologo macro.
+% I opened https://github.com/ho-tex/hologo/issues/9
+% after testing, actually only XeTeX and XeLaTeX are problematic
+% update: as per @u-fischer the problem goes away if graphicx package
+% is loaded, but we don't use it in this document...
+\def\msthologo#1{\smash{\hologo{#1}}}
+\DeclareRobustCommand*{\eTeX}{\msthologo{eTeX}}%
+\DeclareRobustCommand*{\pdfLaTeX}{\msthologo{pdfLaTeX}}%
+\DeclareRobustCommand*{\LuaTeX}{\msthologo{LuaTeX}}%
+\DeclareRobustCommand*{\LuaLaTeX}{\msthologo{LuaLaTeX}}%
+\DeclareRobustCommand*{\XeTeX}{\msthologo{XeTeX}}%
+\DeclareRobustCommand*{\XeLaTeX}{\msthologo{XeLaTeX}}%
%
\makeatother
%%% end of ltxdoc+srcdoc emulation from June 2022 xint.dtx,
@@ -1669,7 +1270,8 @@ pdfpagemode=UseOutlines,%
asterisk,%
defaultmathsizes,%
symbolmisc,symbolre,%
- LGRgreek+]{mathastext}
+ LGRgreek+,
+ activedigits]{mathastext}
\let\symbolbullet\bullet
\let\bullet\originalbullet
% This version will use the mlmodern font which is current
@@ -1790,15 +1392,15 @@ pdfpagemode=UseOutlines,%
\def\tt {\normalfont\ttfamily}
% mais bon, en fait je ne les utilise pas.
-% 2023/12/27 pas encore
-% \newcommand\mstrelease[1]{\hyperlink{v#1}{\texttt{#1}}}
-
% 2023/12/27
\DeclareRobustCommand\ctanpkg[1]
{\texorpdfstring{\href{https://ctan.org/pkg/#1}{#1}}{#1}}
-% bataille avec le rendu de l'entre 1.3zb du change log
-% \hyphenation{ncc-comma}
+% 2024/07/10
+% Attention que si la cible n'existe pas il n'y a AUCUN warning
+% dans le log...
+\newcommand\mstrelease[1]{\hyperlink{#1}{\texttt{#1}}}
+
\begin{document}
% \makeatletter\show\mv@normal\makeatother
% contient
@@ -1924,10 +1526,6 @@ the preamble:
\end{verbatim}
The package records which font is set up for text, at the time it is
loaded,
-%\footnote{alternatively it is possible to configure the text font after
- % loading \mst, and then the command \cs{Mathastext} will accomplish the
- % necessary changes to the font for letters, digits and a few extra ascii
- % symbols in math mode.}
and
then arranges things in order for this text font to be used in math mode as
well. So, with the preamble as above
@@ -1955,293 +1553,6 @@ The exact list of characters concerned by
As one can see, this is a very limited list! Some possibilities exist
regarding Greek letters and will be described later.
-\subsection{Miscellanea}
-
-Please note that most of this section was written many years ago (except for
-the item about math alphabets which was enriched with important background
-information and moved upfront at |1.3zb|). But it should still be valid!
-%
-\begin{description}
-
-\item[math alphabets:] Let us first recall fundamental facts of life, in the
- world of traditional PDF\TeX\ engine and \TeX\ fonts, as background for
- understanding what \mst does in this context, which will be explained next.
- People familiar with using Unicode engines and \ctanpkg{unicode-math}, please be
- aware that the semantics there of the \LaTeX\ math alphabet commands are
- \textbf{significantly} modified!
-\begin{snugshade}
-\begin{itemize}
-\item In the default \LaTeX\ set-up all five of \mathrm, \mathbf,
- \mathit, \mathsf and \mathtt tell \TeX\ to use for their arguments
- specific \texttt{OT1}-encoded fonts,
-\item if the document body uses, as will be the case probably with any
- language other than English or its variants, some other encoding such as
- \texttt{T1} for its fonts, there is no change whatsoever to the math
- configuration, indeed most font packages ignore it completely,
-\item it is thus a priori wrong to think of these commands as switching to
- some body text font, although letters within their scopes will act as in a
- text font, and in particular obey ligatures (this also applies to operator
- names defined by |amsmath|'s \cs{DeclareMathOperator} which are, with some
- extras not mentioned here, as using \mathrm),
-\item these commands are completely different in spirit from the \LaTeX\
- \cs{textrm}, \cs{textbf}, and others, which change only some font axis;
- indeed the math alphabet commands inherit from legacy Knuth's \cs{rm},
- \cs{bf}, and others which are complete font specifiers,
-\item in particular when nesting, it is the inner-most which wins,
-\item only mathematical characters (such as letters) which are declared to
- \TeX\ as being of ``variable family type'' react to being in the argument of
- a math alphabet command,
-\item lowercase Greek letters are by default in \LaTeX\ immune to math
- alphabets (so \verb|\mathrm{\pi}| induces no change in output), but the
- eleven uppercase Greek letters are of ``variable family type'' because they
- are picked in the \texttt{OT1}-encoded font also used for operator names
- (the one to which \mathrm maps), \emph{and they occupy the exact same
- slots in the \emph{\texttt{OML}}-encoding to which} \mathnormal maps! So
- in default \TeX, \verb|\mathnormal{\Gamma}| gives a slanted one. The slots
- occupied in \texttt{OML}-encoding by the lowercase Greek letters (to which
- encoding they are a priori assigned) give
- completely unrelated glyphs in the \texttt{OT1}-encoding, so it makes sense
- that the default \LaTeX\ declares them to not react to math alphabets.
- Notice though, that if \LaTeX\ had declared a \cs{mathnormalbold}, mapping
- to a bold \texttt{OML}-encoded font, it would have made sense to also have
- \cs{alpha}, \cs{beta}, etc... be of ``variable family type'',
-\item but of course then one should a priori never use |\mathbf{\pi}| for
- example, because the default \mathbf selects an \texttt{OT1}-encoded
- font, where there is no pi glyph whatsoever and in particular not at the slot of
- pi in the \texttt{OML} encoding (slot number 25)!
-\end{itemize}
-\end{snugshade}
-Please keep all the above in mind when trying to understand what \mst does
-with math alphabets. The most significant point described next naturally is that
-\mst will sync \mathnormal, \mathrm, \mathbf, \mathit, \mathsf and
-\mathtt to map to the \mst-ified body text fonts.
- \begin{itemize}
- \item \mathnormal, \mathrm, \mathbf, \mathit,
- \mathsf and \mathtt are modified to use the \mst-ified
- text fonts; this can be disabled via defaultalphabets and
- related individual options, but the package always provides
- \Mathnormal, \Mathrm, etc..., to match the \mst font
- configuration (\RLNote{changed:}{1.3za}prior to |1.3za|
- defaultalphabets and related options also caused the \mst
- alphabet commands not to be defined). Recall that there may
- arise a ``too many math alphabets'' error if too many of these
- commands are \emph{used} in the document:
- \emph{declaring} them is not by itself the cause of the error. See the
- \LaTeX\ news entry of its \texttt{2021-11-15} release for
- the counter \texttt{localmathalphabets} (with default value 2)
- which can be now be used if one hits such a difficulty.
- \item We define a new math alphabet command
- \mathnormalbold which gives direct access to
- the bold version of the \mathnormal alphabet
- (rather than using either the \cs{bm} command from
- the \ctanpkg{bm} package or the \cs{boldsymbol} command
- from the \ctanpkg{amsbsy} package). As it does not
- exist in the default \LaTeX{} math font set-up, this
- alphabet is \emph{not} subjected to the {subdued option} action.
-
-\item version \RightNote{1.2}|1.2| of \mst has extended the scope of the math
- alphabets to apply to non-alphabetical characters and to
- operator names. This respects the automatic white spaces
- added by \TeX{} around math symbols.
-\item The\RightNote{1.3i}
- extra skips around letters (see \autoref{sec:mathskips} and
- \autoref{sec:ic}) are removed in the scope of the math alphabets.
-
- \item Depending on options, further math alphabet commands
- are defined by the package: \MathEulerBold,
- \MathEuler, \MathPSymbol, and since |1.3x| under
- the LGRgreek family of options\RightNote{1.3x} also
- \mathgreekup and \mathgreekit. See
- \autoref{sec:newgreek}.
- \item \RightNote{1.3za}Addition of \mathgreekupbold and
- \mathgreekitbold under the LGRgreek family of options.
- \item With\RightNote{1.3za} the LGRgreek+ option
- which enhances Greek letters with a specific behavior when in the
- arguments of the \mathrm, \mathbf, etc..., math alphabet
- commands, this special behavior is not triggered by the \Mathrm,
- \Mathbf, et al., which are genuine unmodifed math alphabet commands. See
- \autoref{sec:newgreekplus}.
- \end{itemize}
-
-\item[the en-dash as minus sign:] very often the -
- character from the text font does not give a good
- minus sign. So by default, the package uses the
- en-dash sign \textendash{}. Use noendash to
- deactivate it. Starting with version |1.12| of the
- package this `en-dash as minus' should work in all
- encodings, including Unicode (if \ctanpkg{fontspec} has been
- loaded); see also |unicodeminus| for OpenType fonts.
-
-\item[amsmath:] \strut the behaviour of the
- \cs{DeclareMathOperator}\RightNote{1.3n} command
- of |amsmath| is modified by \mst for it to use the correct font.
- Additionally, release |1.3n| of \mst at long last also handles an extra
- operation done by |amsmath| for |'.:/-*| to be used in operator names
- without the extra math spacing.%
-%
-\footnote{To the experts: there is a long story here that \cs{newmcodes@}
- hardcodes the font, that it was not compatible with Unicode engines, that
- during some time (2013-2016) \texttt{lualatex-math} fixed that and very
- recently |amsopn.sty 2016/03/08 v2.02| also, so now \texttt{lualatex-math
- 1.6} does nothing as it is already fixed ``upstream'' in |amsopn.sty|, but
- anyhow in both cases, this still hardcoded the font, so finally \mst does
- the right thing from its point of view. See the code comments for more,
- there is an issue here with \LuaLaTeX\ not applying the curly right quote
- contrarily to \XeLaTeX.}
-%
-This customization is suppressed in subdued mode for the |normal| and |bold|
-math versions.
-
-\item[hbar:] the default \LaTeX\ definition of \hbar would in our context
- make use of the |h| of the current math font (so for us, it is also the text
- font, perhaps in italic shape), but with a bar accross the |h| from the
- original default math font for letters (usually |cmmi|). We redefine
- \cs{hbar} to use the text font macron accent (|\=|) as a mock math accent
- (this takes into account the italic option and is compatible with
- subscripts and superscripts).
-
- Since |1.12| \mst when dealing with a Unicode font sets the \cs{hbar}
- to be the character from the font having hexadecimal codepoint |U+0127|.
-
- Since |1.3u| the general 8bits font encoding is
- supported\RightNote{1.3u} (see discussion of the |mathaccents| option
- at end of this list for the shared limitations). Brief testing with
- various usual \TeX\ fonts shows that the vertical positioning of
- the bar isn't satisfying. It is planned to either add a parameter to
- adjust it or to modify altogether the mode of construction of the |\hbar|.
-
- Use nohbar to tell \mst not do provide its own |\hbar|.
-
-
-\item[dotless i and j:] by default the package redefines \cs{imath} and
- \cs{jmath} to give (in math mode) the dotless i and j (if it exists at
- all) from the text font.%
-%
-\footnote{\RightNote{1.3t}Since \texttt{1.12} it also redefined \cs{i} and
- \cs{j} for usability both in text and math modes, but this has been
- dropped at \texttt{1.3t}. Breaking change!}
-
-\item[asterisk:] versions of \mst earlier than |1.2d [2013/01/02]|
- did not do anything
- with the \cs{ast} control sequence but did pick the asterisk
- $*$ in the document text font, and this often was a rather
- silly thing as the text asterisk is generally in a raised
- position. Furthermore, the $*$ lost its status of a binary
- operator and was treated as an `ordinary' symbol. An option
- |noasterisk| turned this feature off. Starting with |1.2d|,
- the |noasterisk| option is deprecated and the new default is
- to do nothing. But when option asterisk is received by the
- package, then both \cs{ast} and $*$ are simultaneously
- modified to use (as binary operators) the text asterisk,
- slightly lowered. The amount of lowering\footnote{with the
- option \texttt{symbolmisc}, the asterisk is picked from
- the Symbol font, and the amount of lowering is
- non-customizable; however if a math alphabet command is
- used, the asterisk is then again from a text font and the
- lowering will be as specified by \cs{MTlowerast}.} is
- decided by the mandatory argument to the command
- \csb{MTlowerast}\marg{dimen}. The package initially does
- \cs{MTlowerast}|{.3\height}|. Doing \cs{MTlowerast}|{.5ex}| is
- not a good idea as it does not scale properly in the script
- and scriptscript styles. With an argument given as a
- multiple of |\height|, the asterisk will behave as expected
- in subscripts and subscripts of subscripts. But $*$ is now
- `mathematically active'\thinspace\footnote{in a hopefully
- safe way, for example {\ttfamily\$\string\label\{eq*1\}\$}
- is ok.} and |$R^*$| or |$R^\ast$| \emph{must} be input as
- |$R^{*}$| and |$R^{\ast}$|. Furthermore, they will obey the
- math alphabet commands.
-
-\item[\XeTeX{} and \LuaLaTeX{}:] regarding the en-dash and the
- dotless i and j, the package is now under the Unicode engines
- compatible not only with the ``Unicode'' \LaTeX\ font encodings
- EU1 (\XeTeX, old fontspec), EU2 (\LuaLaTeX, old fontspec), TU
- (\XeTeX\ and \LuaLaTeX, modern fontspec), but also with
- traditional 8bits-encodings declared as a |fontenc|
- option.\RightNote{1.3u}
-
-% obsolete
- % Formerly, with a Unicode engine,
- % only OT1, T1 and LY1 were supported by \mst as the 8bit encoding
- % of the document text font, regarding the minus as en-dash and
- % the dotless i and j.
-
- \item[fontspec:] one more note to users of
-\XeTeX{}/\LuaLaTeX{} with \ctanpkg{fontspec}:\newline
-\fbox{it has to be
-loaded {with the option} |no-math|},
-and \emph{before} \mst.
-
-\item[vec accent:] The default \cs{vec} accent is not
- appropriate for upright letters, so \mst
- provides a \cs{fouriervec} which takes its glyph in a
- Fourier font, and an Ersatz \cs{pmvec}
- which is reasonably good looking on upright letters
- and works with the \cs{rightarrow} glyph. Contrarily
- to version |1.0|, the default \cs{vec} is not
- overwritten with \cs{fouriervec}. And contrarily to
- version |1.1|, one now needs to pass the option
- fouriervec to have the math accent \cs{fouriervec}
- defined by the package.%
-%
-\footnote{this costs a math family, as I never came back to this to try to
- do otherwise.}
-
-\item[math accents:] if option mathaccents is used then \mst attempts to let
- the math accents |\acute|, |\grave|, etc... use the suitable glyphs from the
- text font. Prior to |1.3u| only |OT1|, |T1|, and |LY1| were supported (via
- hardcoded slots). It should now work with any 8bits font
- encoding\RightNote{1.3u} having been declared as an option to the
- \ctanpkg{fontenc} package (and of course providing the ten needed text accents which
- will mock math accents).%
- %
- \footnote{The code will raise low-level \TeX\ errors if the user attempts to
- use an 8bits font encoding whose \LaTeX\ definition file is lacking the
- suitable uses of \cs{DeclareTextAccent} or if the low level \LaTeX\ macro
- implementation of text accents changes significantly; in such cases please
- report the problem to the author, so that it can be documented in future
- releases!}
-
- The |\vec| math accent is not handled here, as it is not available in the
- usual 8bits font encodings. See the fouriervec option or the \pmvec
- command.
-
- The math accents obey the subdued option\RightNote{1.3u}
- and will change in sync with the \mst-ified text font used in
- each non subdued math version.
-
- (Very) brief testing during |1.3u| development with \XeTeX\ and \LuaTeX\ let
- the author conclude that usage with the \cs{Umathaccent} primitive of an
- OpenType accent glyph slot (which in the text font is for usage as a
- postpended combining character) gives definitely bad horizontal placements
- for both engines (each in its own way). Thus, the redefinitions of accents
- for a \mst declared math version with an OpenType font is by default
- canceled.%
-%
-\footnote{I.e., the \cs{grave} etc... control sequences will, in math versions
- with an OpenType \mst-ified font, expand to macros holding their initial
- meanings, unmodified by \mst, which was in force at the
- |\string\begin\string{document\string}|.}
-%
- Use unimathaccents to force usage of the OpenType font text
- accents glyph slots with the \cs{Umathaccent} primitive. Expert users are
- invited to check out the code and to contribute suggestions if some extras
- can improve it.
-
-\item[varying font encodings:] the very first release of \mst dealt with only
- one font; very soon thereafter it acquired the capacity to define multiple
- math versions, each one using its own text font. But, as was documented at
- this location formerly, various encoding dependent decisions were done once
- and for all during package loading.
-
- This meant in particular that the minus sign (using the text endash), the
- dotless |i| and |j|, the |\hbar|, the math accents were all set up for only
- one unique font encoding. It was thus recommended that all math versions
- share the same font encoding.
-
- The |1.3u| release has lifted this restriction.\RightNote{1.3u}
-\end{description}
-
\subsection{Examples}
\label{sec:examples}
@@ -2473,7 +1784,7 @@ versions.%
% \href{http://mirrors.ctan.org/help/Catalogue/entries/cbgreek-complete.html}{cbfonts},
% \href{http://mirrors.ctan.org/help/Catalogue/entries/txfontsb.html}{txfontsb}.
-\emph{Since |1.3x| this documentation uses globally the |mlmodern|%
+\emph{Since \mstrelease{1.3y} this documentation uses globally the |mlmodern|%
%
\footnote{Daniel Benjamin \textsc{Miller}, \emph{A blacker Type 1 version of Computer Modern, with multilingual
support}, \url{https://ctan.org/pkg/mlmodern}. I have added to the preamble
@@ -2500,7 +1811,7 @@ reasons of PDF file size.}%
\subsubsection{The \blueit{italic} option}
-In the initial version |1.0|, the Latin letters in
+In the initial version \mstrelease{1.0}, the Latin letters in
mathematical mode assumed the exact same shape as in
text mode, and this meant, generally speaking, that
they would turn up upright. Doing this gives a very
@@ -2510,15 +1821,15 @@ one of the design goals of \mst.
Nevertheless, soon after I posted the initial version
of the package to CTAN, I was overwhelmed by
-numerous\footnote{this means ``more then one.''}
+numerous\footnote{this means ``more than one.''}
questions\footnote{I thank in particular
Tariq~\textsc{Perwez} and Kevin~\textsc{Klement} for
their kind remarks (chronological order).} on how to
have the letters be in italic shape.
-The default is still, as in version |1.0|, for everything to be in
+The default is still, as in version \mstrelease{1.0}, for everything to be in
upright shape, but it suffices to pass to the package the option
-italic\RightNote{1.1} to let the Latin letters in math mode be
+italic\RightNote{\mstrelease{1.1}} to let the Latin letters in math mode be
in italic shape.%
%
\footnote{more precisely stated, the value of \cs{itdefault}
@@ -2547,7 +1858,7 @@ the \ctanpkg{moresize} package. To cancel all of this use option
\subsubsection[The subdued option]{The \blueit{subdued} option}\label{sec:subdued}
-This option was introduced in |v1.15|.\RightNote{1.15} It provides a manner to
+This option was introduced in |v1.15|.\RightNote{\mstrelease{1.15}} It provides a manner to
switch on the \mst-\emph{ification} only for limited portions of
the document, with the help of the mechanism of math versions. Without the
subdued option, the \emph{mathastextification} applies by default
@@ -2560,7 +1871,7 @@ Despite some limitations I will now partially describe, the subdued option
has its utility, as I think is illustrated enough by the examples given at the
start of this document and it works reasonably well.
-\begin{framed}
+\begin{shaded*}
\mst was not written initially in order to allow its action to
be completely canceled. It does not store (all) mathcodes nor
does it set them (all) when changing math versions; only that would
@@ -2569,7 +1880,7 @@ start of this document and it works reasonably well.
official interface to math mode, as it is almost entirely
preamble only).
- Releases |1.3t| and |1.3u| do this kind of things to maintain
+ Releases \mstrelease{1.3t} and \mstrelease{1.3u} do this kind of things to maintain
usability across multiple \mst-ified math versions of characters
which are obviously font encoding dependent such as the minus
sign as en-dash (or unicode minus), the dotless i, the |\hbar|,
@@ -2581,7 +1892,7 @@ start of this document and it works reasonably well.
mode and to multiple math versions amounts to some kind of a
kludge, added to an initial design which handled a single unique
text font.
-\end{framed}
+\end{shaded*}
To get the displayed math
(almost) as if \mst had not been loaded, one must also
@@ -2590,7 +1901,7 @@ as, for example, the colon, the dot, and the minus sign belong
in the default \LaTeX{} math mode set-up to three distinct fonts
whereas \mst will pick (even subdued) the three of them in the same
font,%
-\footnote{\RightNote{1.3t}The minus sign is now perfectly subdued,
+\footnote{\RightNote{\mstrelease{1.3t}}The minus sign is now perfectly subdued,
because its original mathcode is stored and restored; this was only
way to handle the case with Unicode engines
where the math operator font is in a classic
@@ -2604,13 +1915,13 @@ mathcodes, so to
be on the safe side one needs the basic option which limits the
mathastextification to letters and digits.%
%
-\footnote{\RightNote{1.3d}The subdued mode does extinguish
+\footnote{\RightNote{\mstrelease{1.3d}}The subdued mode does extinguish
in the normal and bold math versions the action of options selfGreek,
eulergreek, and symbolgreek (previously only LGRgreek was
subdue-able).}
-\footnote{\RightNote{1.3t}The \texttt{\string\imath} and
+\footnote{\RightNote{\mstrelease{1.3t}}The \texttt{\string\imath} and
\texttt{\string\jmath} now obey the subdued regime.}
-\footnote{\RightNote{1.3u}Also \texttt{\string\hbar}
+\footnote{\RightNote{\mstrelease{1.3u}}Also \texttt{\string\hbar}
and the math accents (see mathaccents option) obey the subdued regime.}
%
Even then, in some circumstances, this may not suffice: for example the
@@ -2644,80 +1955,192 @@ customization of Greek letters. The command \MTcustomgreek reenables the
customization done by \mst, if it was loaded with the LGRgreek or one of the
other Greek related options.
-\begin{framed}
- Release |1.3x| has added important new aspects to the handling of Greek
+\begin{shaded*}
+ Release \mstrelease{1.3y} has added important new aspects to the handling of Greek
letters via the LGRgreek option. Make sure to read the \autoref{sec:newgreek}.
-\end{framed}
+\end{shaded*}
+
+\subsection{Miscellanea}
+
+Please note that most material to be found in this section was written many
+years ago (except the two subsections on frenchmath on one hand and
+intervals on the other hand). But it should still be valid!
-\subsection{More miscellanea}
+Ultimately most information here should be moved into the
+reference sections \autoref{sec:cmd} and \autoref{sec:opt}, and only some
+generalities should be kept here.
-This may repeat information already given.
+\subsubsection{Load \mst always last}
+
+The ``large'' math symbols are not modified in any way by \mst. Only loading
+some math font packages such as \ctanpkg{fourier}, \ctanpkg{kpfonts}, \ctanpkg{mathabx}, \ctanpkg{mathdesign},
+\ctanpkg{txfonts}, \ctanpkg{newtxmath}, \ctanpkg{libertinust1math}, others\dots{} will change them. Think of loading these
+packages before \mst, else they might undo what \mst did.
+
+More generally any package (such as \ctanpkg{amsmath}) dealing with math mode should be
+loaded \emph{before} \mst.
\subsubsection{Avoid \texorpdfstring{\texttt{OT1}}{OT1} encoding}
- We specified in our minimal working example a |T1| encoding (|LY1| would
- have been ok, too) because the default |OT1| does not have the
+ The default |OT1| does not have the
{\color{joli}\DeleteShortVerb{\|}
$\mathord{<}\,\mathord{>}\,\mathord{|}$\,\{\,\}} and
{\color{joli}$\backslash$\MakeShortVerb{\|}} glyphs. If
\mst detects |OT1| as the default encoding it will leave these characters to
- their defaults from the math fonts.\footnote{the subdued option, described next,
+ their defaults from the math fonts.%
+%
+\footnote{The subdued option, described next,
acts a bit otherwise, it forces, contrarily to its usual low-key character,
the replacement of |OT1| by |T1| for the fonts ultimately used with letters
and digits in math mode.}
-\begin{framed}
+%
+\begin{shaded*}
If \mst detects the obsolete |OT1| encoding it does not do anything with
\DeleteShortVerb{\|}<, >, |, \{, and \} which (except for monospace fonts)
are not available in that encoding.\MakeShortVerb{\|}
To fully benefit from \mst it is
recommended to use some other encoding having these glyphs such as |T1| or
|LY1|.
-\end{framed}
+\end{shaded*}
\subsubsection{Derivative, minus, asterisk}
The text characters {}'{} and {}-{} are not used, and the asterisk is
-done optionally:
+done only optionally:
\begin{itemize}
\item the derivative sign ${}'$ is left to its default as the text font
- glyph {}'{} is not, as a rule, a satisfying alternative.\footnote{|v1.2| adds
+ glyph {}'{} is not, as a rule, a satisfying alternative.%
+%
+\footnote{|v1.2| adds
a customizable tiny space before ${}'$ to separate it from the previous
letter, this is really needed when using upright letters in math mode with
the CM derivative glyph.{\MTversion{upright}\sffamily\MTprimeskip{.5mu}%
Compare $f'$ with \MTprimeskip{0mu}$f'$.} }
+
\item for the minus sign \mst uses the endash character
- \textendash, if available, and not the hyphen character -.%
-%
-\footnote{see the unicodeminus option if using an OpenType font.}
-%
-\item the asterisk option is mandatory for \mst to replace the binary math
- operator $*$ (and the equivalent control sequence \cs{ast}) with a version
- which uses the text asterisk * suitably lowered\footnote{the amount of
- lowering can be customized.} (and with the correct spaces around it as
- binary operator). The reason is that after this inputs such as |$R^*$|
- or |$R^\ast$| raise errors and \emph{must} be written |$R^{*}$| or |$R^{\ast}$|.
+ \textendash, if available, and not the hyphen character -. With
+an OpenType font, \mst uses per default the EN DASH U+2013 (see unicodeminus).
+
+\item the asterisk option is required for \mst to use the text font for the
+ binary infix math operator $*$ and
+ the control sequence \cs{ast}. They will use then the text asterisk
+ * suitably lowered, and with the correct spaces around it as binary
+ operator.
+ \begin{snugshade}
+ Attention that with this option, inputs such as |$R^*$| or |$R^\ast$|
+ raise errors and \emph{must} be replaced by |$R^{*}$|, respectively
+ |$R^{\ast}$|.
+ \end{snugshade}
\end{itemize}
+\subsubsection{Large symbols and delimiters}
+
Nothing is changed to the ``large'' math symbols, except for
$\MToriginalprod$ and $\MToriginalsum$ in inline math which, like here:
$\prod\sum$, will be taken from the Symbol Font if option symbolmisc
was used.
The left and right delimiters are taken from
-the text font only for the base size: any |\big|, |\bigl|, |\bigr|,
-etc\dots reverts to the original math symbols.
+the text font only for the base size: any one of |\big|, |\bigl|, |\bigr|,
+etc\dots will trigger the use of the original math symbols.
+\subsubsection{amsmath}
+The behavior of the
+ \cs{DeclareMathOperator}\RightNote{\mstrelease{1.3n}} command
+ of |amsmath| is modified by \mst for it to use the correct font.
+ Additionally, release \mstrelease{1.3n} of \mst at long last also handles an extra
+ operation done by |amsmath| for |'.:/-*| to be used in operator names
+ without the extra math spacing.%
+%
+\footnote{To the experts: there is a long story here that \cs{newmcodes@}
+ hardcodes the font, that it was not compatible with Unicode engines, that
+ during some time (2013-2016) \texttt{lualatex-math} fixed that and very
+ recently |amsopn.sty 2016/03/08 v2.02| also, so now \texttt{lualatex-math
+ 1.6} does nothing as it is already fixed ``upstream'' in |amsopn.sty|, but
+ anyhow in both cases, this still hardcoded the font, so finally \mst does
+ the right thing from its point of view. See the code comments for more,
+ there is an issue here with \LuaLaTeX\ not applying the curly right quote
+ contrarily to \XeLaTeX.}
+%
+This customization is suppressed in subdued mode for the |normal| and |bold|
+math versions.
-\subsubsection{Load \mst always last}
+\subsubsection{hbar}
+The default \LaTeX\ definition of \hbar would in our context
+ make use of the |h| of the current math font (so for us, it is also the text
+ font, perhaps in italic shape), but with a bar accross the |h| from the
+ original default math font for letters (usually |cmmi|). We redefine
+ \cs{hbar} to use the text font macron accent (|\=|) as a mock math accent
+ (this takes into account the italic option and is compatible with
+ subscripts and superscripts).
-The ``large'' math symbols are not modified in any way by \mst. Only loading
-some math font packages such as \ctanpkg{fourier}, \ctanpkg{kpfonts}, \ctanpkg{mathabx}, \ctanpkg{mathdesign},
-\ctanpkg{txfonts}, \ctanpkg{newtxmath}, etc\dots{} will change them. Think of loading these
-packages before \mst, else they might undo what \mst did.
+ Since \mstrelease{1.12} \mst when dealing with a Unicode font sets the \cs{hbar}
+ to be the character from the font having hexadecimal codepoint |U+0127|.
-More generally any package (such as \ctanpkg{amsmath}) dealing with math mode should be
-loaded \emph{before} \mst.
+ Since \mstrelease{1.3u} the general 8bits font encoding is
+ supported\RightNote{\mstrelease{1.3u}} (see discussion of the |mathaccents| option
+ at end of this list for the shared limitations). Brief testing with
+ various usual \TeX\ fonts shows that the vertical positioning of
+ the bar isn't satisfying. It is planned to either add a parameter to
+ adjust it or to modify altogether the mode of construction of the |\hbar|.
+
+ Use nohbar to tell \mst not do provide its own |\hbar|.
+
+
+\subsubsection{Dotless i and j}
+By default the package redefines \cs{imath} and
+ \cs{jmath} to give (in math mode) the dotless i and j (if it exists at
+ all) from the text font.%
+
+ \subsubsection{fontspec}
+
+\fbox{\ctanpkg{fontspec}
+has to be
+loaded {with the option} |no-math|},
+\emph{and before} \mst.
+
+\subsubsection{vec accent}
+
+The default \cs{vec} accent is not appropriate for upright letters, so \mst
+provides under option fouriervec a math accent control sequence
+\cs{fouriervec} which takes its glyph in a Fourier font. A poorman Ersatz
+\cs{pmvec} is always available ; it is reasonably good looking on upright
+letters and works with the \cs{rightarrow} glyph.
+
+\subsubsection{math accents}
+If option mathaccents is used then \mst attempts to let
+ the math accents |\acute|, |\grave|, etc... use the suitable glyphs from the
+ text font.
+
+ The |\vec| math accent is not handled here, as it is not available in the
+ usual 8bits font encodings. See the fouriervec option or the \pmvec
+ command.
+
+ The math accents obey the subdued option\RightNote{\mstrelease{1.3u}}
+ and will change in sync with the \mst-ified text font used in
+ each non subdued math version.
+
+\begin{footnotesize}
+ (Very) brief testing during \mstrelease{1.3u} development with \XeTeX\ and \LuaTeX\ let
+ the author conclude that usage with the \cs{Umathaccent} primitive of an
+ OpenType accent glyph slot (which in the text font is for usage as a
+ postpended combining character) gives definitely bad horizontal placements
+ for both engines (each in its own way). Thus, the redefinitions of accents
+ for a \mst declared math version with an OpenType font is by default
+ canceled.%
+%
+\footnote{I.e., the \cs{grave} etc... control sequences will, in math versions
+ with an OpenType \mst-ified font, expand to macros holding their initial
+ meanings, unmodified by \mst, which was in force at the
+ |\string\begin\string{document\string}|.}
+%
+ Use unimathaccents to force usage of the OpenType font text
+ accents glyph slots with the \cs{Umathaccent} primitive. Expert users are
+ invited to check out the code and to contribute suggestions if some extras
+ can improve it.\par
+\end{footnotesize}
+
\subsubsection{Sans serif in math}
@@ -2733,8 +2156,6 @@ text.
\subsubsection{\mst with \ctanpkg{beamer}}\label{ssec:beamer}
-%\noindent\llap{\textcolor{green}{\bfseries 2015/02/26}\hspace{1em}}
-
Starting
with release |3.34| of \ctanpkg{beamer}%
%
@@ -2791,24 +2212,9 @@ Antoine~\textsc{Missier}:
\item and load \mst afterwards (with possibly some font packages loaded in-between), passing it
the option frenchmath*.
\end{itemize}
-% \begin{footnotesize}
-% The\RightNote{1.3zb} release |2.7| dated |2023/12/23| of
-% \ctanpkg{frenchmath} required \mst to add a compatiblity patch and modify
-% the frenchmath* option. The above instructions cause a build crash with
-% |2.7| \ctanpkg{frenchmath} and \mst |1.3za| and earlier. One must use \mst
-% |1.3zb| or later.\par
-% \end{footnotesize}
-% Also, \ctanpkg{frenchmath} must be at least at
-% version |2.7| of |2023/12/23|.%
Limited testing indicated that the combination of the two packages (using the
options as indicated above) works satisfactorily.
-% as expected but that some adjustments may be needed for some of
-% the macros defined by \ctanpkg{frenchmath}: we
-% observed in particular that the |\paral| command (which produces
-% $\mathrel{/\!\!/}$) may not work well if the $/$ is picked up from the text
-% font due to \mst (alternative could be for most text fonts
-% |\def\paral{\mathrel{//}}|),
There may be some minor adjustments to do, as the \mst-ified math font may
cause issues to some of
the \ctanpkg{frenchmath} macros: for exemple \cs{Oijk} may not work
@@ -2886,9 +2292,9 @@ respectively, which make
the comma (to some extent) `intelligent', i.e. decide on the spacing type
(ordinary or punctuation) depending on next token. Do not load directly the packages
but simply use the corresponding option and \mst will do the loading and take
-appropriate needed measures for compatibility. The\RightNote{1.3zb} decimalcomma option is
+appropriate needed measures for compatibility. The\RightNote{\mstrelease{1.3zb}} decimalcomma option is
included in the frenchmath* option, and the ncccomma
-option is included in the frenchmath+ option.\RightNote{1.3zb}
+option is included in the frenchmath+ option.\RightNote{\mstrelease{1.3zb}}
Let's give another example of usage of \ctanpkg{mathtools} here to define a
macro for integer ranges:
@@ -2924,6 +2330,417 @@ multiple math versions. Read the fine print below for some limitations though.
\mst actions on square brackets (and parentheses).\par
\end{footnotesize}
+\subsubsection{Unicode engines}
+
+\mst is minimally Unicode aware since \mstrelease{1.12} and can be used with \XeTeX{} or
+\LuaTeX{}. Starting with release \mstrelease{1.3}, it needs |luatex| to be at least
+as recent as the one which was provided with the TL2013 distribution.
+
+However \mst applies only to (a subset of) the |32-127| ascii range, and
+optionally to Greek letters, but for the latter only if provided via ``\TeX\
+fonts'' such as Euler, Symbol or LGR-encoded fonts.
+It does not know how to use a given Unicode font simultaneously for Latin and
+Greek letters.
+
+Thus, first consider much better alternatives:
+\begin{itemize}
+\item Since 2018, the package \ctanpkg{mathfont}%
+%
+\footnote{Conrad \textsc{Kosowsky}, \emph{Use TrueType and OpenType fonts in math mode}
+\url{https://ctan.org/pkg/mathfont}.}
+%
+adapts Unicode text fonts to usage in math mode. It works with both \XeTeX\
+and \LuaTeX.
+\item For \XeTeX\ only, \ctanpkg{mathspec}%
+%
+\footnote{Andrew Gilbert \textsc{Moschou}, \emph{Specify arbitrary fonts for mathematics in \XeTeX}
+\url{https://ctan.org/pkg/mathspec}.}
+%
+also allows usage of arbitrary text fonts in mathematics.
+\item and of course
+\ctanpkg{unicode-math}%
+%
+\footnote{Will \textsc{Robertson}, et al., \emph{Unicode mathematics with
+ support for XeTeX and LuaTeX} \url{https://ctan.org/pkg/unicode-math}.}
+%
+is the standard package for using OpenType fonts which are equipped with the needed extra
+support being used in \TeX\ math mode.
+\end{itemize}
+
+If using any one of the above you probably don't need, don't want, and should
+not use \mst.
+
+Let me insist that \mst has not been tested in any systematic
+manner under the Unicode engines; and that it is expected to be most definitely
+incompatible with \ctanpkg{unicode-math}, although your mileage may vary and some
+features may appear to work.
+
+When using \mst with either \XeTeX{} or \LuaTeX{} it is recommended to use the
+\ctanpkg{fontspec} package (see remark below on \cs{encodingdefault}). Furthermore,
+if using \ctanpkg{fontspec} it is \emph{necessary} to load it with its
+|no-math| option, and this \emph{must} happen before loading \mst.
+\begin{shaded*}
+\begin{itemize}[label=$\bullet$, leftmargin=1em]
+\item
+ Use \ctanpkg{fontspec} with its
+ \emph{no-math} option, and load it \emph{prior} to \mst. As some packages
+ load \ctanpkg{fontspec} themselves (for example |polyglossia|), a
+ \centeredline{|\PassOptionsToPackage{no-math}{fontspec}|} early in the
+ preamble might be needed.
+
+\item
+ The \ctanpkg{amsmath} package, if used, \emph{must} be loaded \emph{prior} to \mst.
+
+\item
+ Under |lualatex| engine, it is recommended to also load the package
+ \ctanpkg{lualatex-math}.% Please check its documentation as possibly it has now
+ % been incorporated upstream (I am not following up on the situation).
+\end{itemize}
+\end{shaded*}
+
+I already mentioned in the \autoref{sec:ic} the fact that
+the italic corrections were not available for OpenType fonts
+under the \XeTeX{} engine and only partially available for the
+\LuaTeX{} engine, with the result that the spacings in math
+mode when using for the letters an upright text font will be
+less satisfying than with the standard PDF\TeX{} engine (the
+OpenType fonts not being usable with the latter engine, this is
+not a criterion of choice anyhow).
+
+To define math versions when using unicode fonts, use \ctanpkg{fontspec}'s
+\cs{setmainfont} before the \cs{Mathastext}\oarg{version} command, or simply
+before loading \mst for the default math versions.
+
+It is possible to mix usage of Unicode fonts and classical \TeX{}
+fonts. All used 8bits font encoding must have been passed as
+options to the \ctanpkg{fontenc} package.
+
+\subsubsection{The unicodeminus option}
+
+For legacy reason, \mst uses by default the |EN DASH U+2013| for the minus
+sign in math mode, if the font is determined to be a ``Unicode'' font.
+
+There is now the unicodeminus\RightNote{\mstrelease{1.3q}} to use rather
+% BORDEL DE BORDEL DE FAIT CHIER \verb ET Text for \verb command ended by end
+% of line. je l'ai patch dans etoc et xint mais pas ici encore.
+|MINUS SIGN U+2212|.%
+\footnote{Thanks to Tobias~\textsc{Brink} who asked for this feature.}
+%
+Check \hyperref[nicodeminus]{\ttfamily\hyphenchar\font=189 its documentation}
+on page \pageref{nicodeminus}.
+
+\subsubsection{Two examples with OpenType fonts}
+
+\begingroup\def\MacroFont{\normalfont\footnotesize\ttfamily}
+I include
+here two examples which compiled successfully (a long time ago!) with \XeTeX{} and
+\LuaLaTeX{}, the first one on a Linux machine, the second one on a Mac
+OS X machine.
+\begin{verbatim}
+\documentclass{article}
+\usepackage[hscale=0.8]{geometry}
+\usepackage{multicol}
+\usepackage[no-math]{fontspec}
+\usepackage{lmodern}
+\usepackage[subdued,italic]{mathastext}
+\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana]
+\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial]
+\setmainfont[Color=00FF00]{DejaVu Serif} \Mathastext[DejaVu]
+\MTDeclareVersion{times}{T1}{ptm}{m}{n}
+\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale]
+\begin{document}
+\newcommand\TEST[1]{\MTversion{#1}%
+\begin{multicols}{2}
+\hbox to\columnwidth{\hbox to\columnwidth{\hfil
+ $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}}
+ \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ }
+ \centerline{ $0123456789$ }
+ \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ }
+\columnbreak
+ \centerline{ abcdefghijklmnopqrstuvwxyz }
+ \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ }
+ \centerline{ 0123456789}
+ \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
+ \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
+\end{multicols}}
+\begin{multicols}{2}
+ \centerline{\textbf{math mode}}
+\columnbreak
+ \centerline{ \textbf{text} }
+\end{multicols}
+\TEST{DejaVu}\TEST{Verdana}\TEST{times}\TEST{Andale}
+\TEST{Arial}\TEST{bold}\TEST{normal}
+\end{document}
+\end{verbatim}
+And now the same thing with fonts available on Mac OS X:
+\begin{verbatim}
+\documentclass{article}
+\usepackage[hscale=0.8]{geometry}
+\usepackage{multicol}
+\usepackage[no-math]{fontspec}
+\usepackage{lmodern}
+\usepackage[subdued,italic]{mathastext}
+\setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler]
+\setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter]
+\setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum]
+\setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot]
+\setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic]
+\begin{document}
+ --- copy here the code from the previous example ---
+\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum}
+\TEST{Hoefler}\TEST{Typewriter}\TEST{bold}
+\end{document}
+\end{verbatim}
+\endgroup
+
+
+\subsubsection{Compatibility with other packages}\label{sec:compat}
+
+Regarding the namespace of the package: all internal macros use
+\cs{mst@} (or \cs{ifmst@} for \TeX{} conditionals) as prefix. Almost all user
+commands have \cs{MT} prefix, the oldest ones
+may use \cs{Mathastext} or variants.%
+%
+\footnote{It is only years after initial release that I became aware that
+package \ctanpkg{mathtools} used \cs{MT\string_} prefix (with an underscore as
+shown) for most internal constructs, and sometimes \cs{MT@}, and those can not
+clash with our \cs{MT[a-z\string|A-Z]} for public commands and \cs{mst@} for
+internal macros. They do have however user commands \cs{MTFlushSpaceAbove} and
+\cs{MTFlushSpaceBelow}, but nothing else hence some retroactive relief.}
+
+Compatibility issues are often questions of who decides last. They are
+naturally to be expected with packages dealing with the math setting. The fix
+is simply to load \mst last. In particular one should \emph{always} load \mst
+\emph{after} \ctanpkg{amsmath} (this is especially needed with Unicode engines
+but applies in general as well).
+
+Any definition made in a package loaded before \mst of the font to be
+used for letters or for the common characters in the |ascii| basic range
+will be overruled by the loading of \mst.
+Conversely most of the set-up done by \mst may well be overruled by
+packages loaded later which do math related things.
+
+Starting with version \mstrelease{1.2}, \mst makes some characters
+`mathematically active' to achieve certain effects: automatic insertion of the
+italic corrections when using an upright text font in math (\autoref{sec:ic}),
+extended scope of the math alphabet commands which now apply to non-letter
+symbols (\autoref{sec:mathxx}; and also to math operator names, but this is
+much easier to achieve). And the (already mathematically active) right quote
+is modified to have some extra space added before the derivative glyph ${}'$
+(see \MTprimeskip).
+
+This mathematical activation is compatible with the \cs{label} and \cs{ref}
+commands in and outside of math mode.
+
+But a difficulty arises when some other package has
+made the character `catcode active' everywhere in the document. If it is
+detected for such a character that \mst wishes to make `mathematically active'
+that it is already `catcode active', \mst then checks if it is handling a Babel
+shorthand. If yes, it then hacks into \ctanpkg{babel} support macros for that
+character to let it do what it desires it to do in math mode. And it does not
+make the character mathematically active, to the contrary it makes sure
+that the character is \emph{not} mathematically active.
+
+\begin{footnotesize}
+ This last paragraph applies to the characters
+ {{;}\,{,}\,{:}\,{!}\,{?}\,{+}\,{\textendash}\,{=}\,{<}\,{>}\,{(}\,{)}\,{[}\,{]}*}
+ mentioned in \autoref{sec:mathxx} as `hard non-letters'. The right tick
+ (which is already mathematically active per default) is also handled via a
+ similar process, and in particular is tested for being a Babel shorthand
+ (which happens in particular with the Spanish language |activeacute| option).
+
+ The reason for avoiding in general for a catcode active character to be at
+ same time mathematically active is illustrated in next shaded box.
+
+ In the case of the Spanish active |'|, the advantage of \mst intervention to
+ reset its mathcode is that in case of a faulty input as a curly right tick
+ |U+8217| ', which \LaTeX{} will map to \cs{textquoteright} which itself
+ gives the catcode 12 |'|, it will show as curly quote in output not as prime
+ glyph, as \mst removes its mathematical activation. This complements the
+ \LaTeX{} warnings about \cs{textquoteright} being invalid in math mode.
+
+ The ascii letters can not have been made active by Babel interface (see code
+ comments of \cs{mst@do@activecase}) so if an ascii letter is catcode active
+ when \mst examines it, nothing will change to its meaning.
+
+ \CHANGED{\mstrelease{1.4}}At \mstrelease{1.4} these actions are done for
+ ascii letters at loading of the package or via \csb{MTmathactiveletters},
+ which is itself done by \csb{MTversion} when entering non-subdued math
+ version. Check documentation of \csb{MTmathactiveletters} for some relevant
+ details.\par
+\end{footnotesize}
+
+\begin{shaded*}
+\footnotesize
+On matters of \emph{mathematical} versus \emph{catcode} active character
+tokens, here is some code, not involving \mst, that you should \textbf{not}
+try at home:
+\begin{verbatim}
+ \documentclass{article}
+ \usepackage[french]{babel}
+ \usepackage{mathtools}\mathtoolsset{centercolon}
+ \begin{document}
+ $:$
+ \end{document}
+\end{verbatim}
+\fbox{DO NOT DO THIS AT HOME}\thinspace: it creates (with |pdflatex|) an infinite
+loop.
+% %
+% \footnote{This seems to still be the case with Babel |3.9f| and
+% frenchb.ldf |2.6e|, as tested on Sep. 2, 2013. Again tested with up-to-date
+% TL2015 Jan. 15, 2016 with same result. Again tested July 11, 2024 with
+% up-to-date TL2024 with the
+% same result.}
+% %
+This is due
+to the fact that the colon is simultaneously active (this is made by
+\ctanpkg{babel-french} at begin document) and mathematically active (done by
+\ctanpkg{mathtools} in the preamble). The interaction gives an infinite loop.
+%
+% Such a
+% situation will be cured by \mst, even loaded before \ctanpkg{mathtools},
+% \emph{if} use is made of \MTnonlettersobeymathxx.
+%
+% At each math formula
+% \mst will detect that Babel has activated the colon, and will cancel the
+% mathematical activation (the precise definition done by \ctanpkg{mathtools} was
+% already lost at begin document due to overwriting by \ctanpkg{babel} but the fact that
+% the character was mathematically active remained true).
+\par
+\end{shaded*}
+
+
+ Regarding mathematical activation, an incompatibility of
+ another type arose with \ctanpkg{amsmath}. To fix it, \mst now replaces
+ an inner macro of \ctanpkg{amsmath}
+ (\cs{resetMathstrut@}) with its own version.\\
+ \null\hspace{1cm}\fbox{Always load \ctanpkg{amsmath} before \mst.}
+
+\begin{footnotesize}
+ Actually this last commandment was already made necessary by the use of the
+ text endash to represent the minus sign in math mode, and, especially for
+ Unicode engines, some aspects of the \cs{DeclareMathOperator} macro from
+ \ctanpkg{amsmath}.\par
+\end{footnotesize}
+
+
+
+ \begin{shaded*}
+ \textcolor{magenta}{\bfseries New with 1.3i:} \mst patches |\url| of
+ packages \ctanpkg{url} and \ctanpkg{hyperref}, and also |\nolinkurl|, to force them
+ to do automatically \MTeverymathoff. Indeed they use math mode, and it
+ is better to turn \mst off for their dealings.
+
+ See the \MTeverymathoff documentation.
+ \end{shaded*}
+
+
+
+\subsection{Math alphabets}
+
+Let us first recall fundamental facts of life, in the
+ world of traditional PDF\TeX\ engine and \TeX\ fonts, as background for
+ understanding what \mst does in this context.
+ People familiar with using Unicode engines and \ctanpkg{unicode-math}, please be
+ aware that the semantics there of the \LaTeX\ math alphabet commands are
+ \textbf{significantly} modified!
+\begin{shaded*}
+\begin{itemize}
+\item In the default \LaTeX\ set-up all five of \mathrm, \mathbf,
+ \mathit, \mathsf and \mathtt tell \TeX\ to use for their arguments
+ specific \texttt{OT1}-encoded fonts.
+\item If the document body uses, as will be the case probably with any
+ language other than English or its variants, some other encoding such as
+ \texttt{T1} for its fonts, there is no change whatsoever to the math
+ configuration, indeed most font packages ignore it completely.
+\item It is thus a priori wrong to think of these commands as switching to
+ some body text font, although letters within their scopes will act as in a
+ text font, and in particular obey ligatures (this also applies to operator
+ names defined by |amsmath|'s \cs{DeclareMathOperator} which are, with some
+ extras not mentioned here, as using \mathrm).
+\item These commands are completely different in spirit from the \LaTeX\
+ \cs{textrm}, \cs{textbf}, and others, which change only some font axis;
+ indeed the math alphabet commands inherit from legacy Knuth's \cs{rm},
+ \cs{bf}, and others which are complete font specifiers.
+\item In particular when nesting, it is the inner-most which wins.
+\item Only mathematical characters (such as letters) which are declared to
+ \TeX\ as being of ``variable family type'' react to being in the argument of
+ a math alphabet command.
+\item Lowercase Greek letters are by default in \LaTeX\ immune to math
+ alphabets (so \verb|\mathrm{\pi}| induces no change in output), but the
+ eleven uppercase Greek letters are of ``variable family type'' because they
+ are picked in the \texttt{OT1}-encoded font also used for operator names
+ (the one to which \mathrm maps), \emph{and they occupy the exact same
+ slots in the \emph{\texttt{OML}}-encoding to which} \mathnormal maps! So
+ in default \TeX, \verb|\mathnormal{\Gamma}| gives a slanted glyph. The slots
+ occupied in \texttt{OML}-encoding by the lowercase Greek letters (to which
+ encoding they are a priori assigned) give
+ completely unrelated glyphs in the \texttt{OT1}-encoding, so it makes sense
+ that the default \LaTeX\ declares lowercase Greek to not react to math alphabets.
+ Notice though, that if \LaTeX\ had declared a \cs{mathnormalbold}, mapping
+ to a bold \texttt{OML}-encoded font, it would have made sense to also have
+ \cs{alpha}, \cs{beta}, etc... be of ``variable family type''.
+\item But of course even if |\pi| is of such ``variable family type'' then
+ |\mathbf{\pi}| will give garbage because the default \mathbf selects an
+ \texttt{OT1}-encoded font, where there is no pi glyph whatsoever and in
+ particular not at the slot (which is 25) of $\pi$ in the \texttt{OML} encoding!
+\end{itemize}
+\end{shaded*}
+
+Please keep all the above in mind when trying to understand what \mst does
+with math alphabets. The most significant point described next naturally is that
+\mst will sync \mathnormal, \mathrm, \mathbf, \mathit, \mathsf and
+\mathtt to map to the \mst-ified body text fonts.
+ \begin{itemize}
+ \item \mathnormal, \mathrm, \mathbf, \mathit,
+ \mathsf and \mathtt are modified to use the \mst-ified
+ text fonts; this can be disabled via defaultalphabets and
+ related individual options, but the package always provides
+ \Mathnormal, \Mathrm, etc..., to match the \mst font
+ configuration (\RLNote{changed:}{\mstrelease{1.3za}}prior to \mstrelease{1.3za}
+ defaultalphabets and related options also caused the \mst
+ alphabet commands not to be defined). Recall that there may
+ arise a ``too many math alphabets'' error if too many of these
+ commands are \emph{used} in the document:
+ \emph{declaring} them is not by itself the cause of the error. See the
+ \LaTeX\ news entry of its \texttt{2021-11-15} release for
+ the counter \texttt{localmathalphabets} (with default value 2)
+ which can be now be used if one hits such a difficulty.
+ \item We define a new math alphabet command
+ \mathnormalbold which gives direct access to
+ the bold version of the \mathnormal alphabet
+ (rather than using either the \cs{bm} command from
+ the \ctanpkg{bm} package or the \cs{boldsymbol} command
+ from the \ctanpkg{amsbsy} package). As it does not
+ exist in the default \LaTeX{} math font set-up, this
+ alphabet is \emph{not} subjected to the {subdued option} action.
+
+\item Version \RightNote{\mstrelease{1.2}}\mstrelease{1.2} of \mst has extended the scope of the math
+ alphabets to apply to non-alphabetical characters and to
+ operator names. This respects the automatic white spaces
+ added by \TeX{} around math symbols. See the devoted \autoref{sec:mathxx}.
+\item The optional\RightNote{\mstrelease{1.3i}}
+ extra skips around letters (see \autoref{sec:mathskips} and
+ \autoref{sec:ic}) are removed in the scope of the math alphabets.
+
+ \item Depending on options, further math alphabet commands
+ are defined by the package: \MathEulerBold,
+ \MathEuler, \MathPSymbol, and since \mstrelease{1.3y} under
+ the LGRgreek family of options\RightNote{\mstrelease{1.3y}} also
+ \mathgreekup and \mathgreekit. See
+ \autoref{sec:newgreek}. And also \mathgreekupbold and
+ \mathgreekitbold under the LGRgreek family of
+ options.\RightNote{\mstrelease{1.3za}}
+
+ \item With\RightNote{\mstrelease{1.3za}} the LGRgreek+ option
+ which enhances Greek letters with a specific behavior when in the
+ arguments of the \mathrm, \mathbf, etc..., math alphabet
+ commands, this special behavior is not triggered by the \Mathrm,
+ \Mathbf, et al., which are genuine unmodifed math alphabet commands. See
+ \autoref{sec:newgreekplus}.
+ \end{itemize}
+
\subsection{Math versions}\label{sec:mathversions}
@@ -2972,13 +2789,13 @@ It is still possible to switch on via \MTversion in the document body
\footnote{When not using math versions at all (so not using \texttt{subdued}
mode either) another way to achieve distinct fonts in text and math is
naturally to modify the document text font \emph{after} having loaded \mst (or
-after last usage of \cs{Mathastext} without optional argument).
-Another way is to use \cs{MTfamily}, \cs{MTencoding}, \cs{MTseries},
-\cs{MTshape}, \cs{MTlettershape} in the preamble before a call to
-\cs{Mathastext} which will configure math fonts without having modified the
+after last usage of \csb{Mathastext} without optional argument).
+Another way is to use \csb{MTfamily}, \csb{MTencoding}, \csb{MTseries},
+\csb{MTshape}, \csb{MTlettershape} in the preamble before a call to
+\csb{Mathastext} which will configure math fonts without having modified the
document text fonts. However if one does \texttt{\string\MTversion\{normal\}}
in the document then the text font will be reset to what was recorded as math
-font by the \cs{Mathastext} call in the preamble (as said above, when not
+font by the \csb{Mathastext} call in the preamble (as said above, when not
using \texttt{subdued} option).}
The native \LaTeX{} command \cs{mathversion}\marg{version\_name} would change
@@ -3000,19 +2817,19 @@ For all math versions if not using the subdued option, or only
for the non-\emph{normal} and non-\emph{bold} math versions if
using the subdued option, \cs{MTversion} does further additional tasks:
\begin{itemize}
-\item it resets\RightNote{1.3u} the \hbar, \cs{imath}
+\item it resets\RightNote{\mstrelease{1.3u}} the \hbar, \cs{imath}
(see \inodot), \cs{jmath}, math accents (see option
mathaccents) and minus sign as en dash according to the used
font encoding for the \mst-ified text font,
-\item (see sections \ref{sec:mathskips} and \ref{sec:ic}) it re-issues the
+\item (see \autoref{sec:mathskips} and \autoref{sec:ic}) it re-issues the
command \MTmathactiveletters to let a to z, A to Z, be mathematically
active in order to automatically insert the skips as defined by the user
with \MTsetmathskips, and the italic corrections (if the font is not
italic or slanted),
-\item (see section \ref{sec:extraskips}) it resets the extra spaces after the
+\item (see \autoref{sec:extraskips}) it resets the extra spaces after the
symbols $\exists$, $\forall$ and before the derivative ${}'$ to the values as
decided by the user in the preamble on a \emph{per version} basis,
-\item (see section \ref{sec:mathxx}) it re-issues the commands
+\item (see \autoref{sec:mathxx}) it re-issues the commands
\MTmathoperatorsobeymathxx and \MTeasynonlettersobeymathxx to let
the math operator names and (`easy') non letter characters obey the math
alphabets,
@@ -3058,8 +2875,9 @@ provided by \mst:
package, Greek letters are the default Computer
Modern ones or have been set-up by other packages;
for example by the \ctanpkg{fourier} package with option
- `upright', which gives upright Greek letters.
-\item[LGRgreek:] (this was substantially updated at |1.3x|, make sure to
+ `upright', which gives upright Greek letters
+ or by the author \ctanpkg{lgrmath} package.
+\item[LGRgreek:] (this was substantially updated at \mstrelease{1.3y}, make sure to
read the new documentation at \autoref{sec:newgreek})
this option is for fonts which additionally to Latin
letters also provide Greek letters in |LGR| encoding. Here is
@@ -3088,7 +2906,7 @@ provided by \mst:
If you use the italic option note that the italic Greek
letters from the |cbfonts| are not the same glyphs as
the default Greek letters from the |OML| encoded font |cmmi|.
-\item[LGRgreek+:] \RightNote{1.3za}extends LGRgreek to allow abusive
+\item[LGRgreek+:] \RightNote{\mstrelease{1.3za}}extends LGRgreek to allow abusive
usage of \cs{mathrm} and alike commands with Greek letters.
This is very much not in the spirit (especially with traditional
``8bit'' \TeX\ fonts) of the \LaTeX\ kernel concept of math alphabet
@@ -3146,17 +2964,17 @@ from the lowest to the highest priority:
the digits and operator names (most of the time this means ``upright
shape'', but it can be otherwise),
\item[itgreek]: says that Greek letters (both lowercase and uppercase) will
- be in `|it|' shape. \RLNote{changed:}{1.3x}More precisely the expansion of
+ be in `|it|' shape. \RLNote{changed:}{\mstrelease{1.3y}}More precisely the expansion of
\MTgreekitdefault is used.
- This was changed at |1.3x|, formerly the value of \cs{itdefault} which was in
+ This was changed at \mstrelease{1.3y}, formerly the value of \cs{itdefault} which was in
force at the time of using \Mathastext (or at time of loading the package
if no use is made of \Mathastext) was used.
\item[upgreek]: says that Greek letters (both lowercase and uppercase) will
- be in `|n|' shape. \RLNote{changed:}{1.3x}More precisely the expansion of
+ be in `|n|' shape. \RLNote{changed:}{\mstrelease{1.3y}}More precisely the expansion of
\MTgreekupdefault is used.
- This was changed at |1.3x|, formerly the value of \cs{updefault} which was in
+ This was changed at \mstrelease{1.3y}, formerly the value of \cs{updefault} which was in
force at the time of using \Mathastext (or at time of loading the package
if no use is made of \Mathastext) was used. But since \LaTeX{}
|2020-02-02| this caused many Font Warnings in the log because
@@ -3187,7 +3005,7 @@ font family available in |LGR| encoding: for example |lmr|,
|DejaVuSerif-TLF| (needs \ctanpkg{dejavu} package on your system),
etc\dots
-\begin{framed}
+\begin{shaded*}
\MTitgreek, \MTupgreek, \MTitGreek, \MTupGreek
have some effect only if one of the LGRgreek, LGRgreeks,
selfGreek or selfGreeks options was passed to the package.
@@ -3198,14 +3016,14 @@ etc\dots
\MTgreekfont has an effect only for LGRgreek and selfGreek. It is
without any effect with LGRgreeks and selfGreeks.
-\end{framed}
+\end{shaded*}
\subsubsection{Control sequences to access directly upright or italic
shape for Greek under \texttt{LGRgreek} option}
\label{sec:newgreek}
-Some changes were made at |1.3x| to enhance the LGRgreek (and LGRgreeks)
+Some changes were made at \mstrelease{1.3y} to enhance the LGRgreek (and LGRgreeks)
options with new features. Everything which will be explained here applies
only to these two options.
@@ -3224,7 +3042,7 @@ command in the preamble (possibly with \oarg{version\_name} optional
argument). Their default definitions are to expand to `|n|' and `|it|'
respectively. They can also be defined prior to loading \mst.
-See\RightNote{1.3x} the \autoref{table:greekup} and \autoref{table:greekit}
+See\RightNote{\mstrelease{1.3y}} the \autoref{table:greekup} and \autoref{table:greekit}
for illustrations (using here the Libertinus Serif font).
\begin{table}[htbp]
\MTversion{libertinus}
@@ -3364,7 +3182,7 @@ etc\dots\ options or \MTitgreek et al.\@ commands. This is on a per \mst-enri
math version basis, depending only on how the options or commands were used
in the preamble.
-Furthermore\RightNote{1.3x} two math alphabets are provided
+Furthermore\RightNote{\mstrelease{1.3y}} two math alphabets are provided
\centeredline{\mathgreekup}
\centeredline{\mathgreekit}
which can be used to map a letter to the corresponding Greek fonts:
@@ -3379,14 +3197,14 @@ which can be used to map a letter to the corresponding Greek fonts:
\centeredline{$\mathgreekit{W}=\mathgreekit{\Omega}=\mathgreekit{\Omegaup}=\Omegait$}
}
-Some\RightNote{1.3x} refactoring%
+Some\RightNote{\mstrelease{1.3y}} refactoring%
%
\footnote{Technically, formerly two symbol fonts were declared, one for the
lowercase Greek letters and one for the uppercase Greek letters; now those
are dropped and replaced by two symbol fonts, one for `italic' Greek letters,
the other for `upright' Greek letters.}
%
-was required to achieve this at |1.3x|
+was required to achieve this at \mstrelease{1.3y}
and it is not 100\% backwards compatible: if none of the itgreek etc\dots\
things was used, the Greek letters formerly would follow the shape of Latin
letters (for lowercase Greek) and of operator names (for uppercase Greek).
@@ -3414,10 +3232,10 @@ compatibility.
\subsubsection{\cs{mathgreekupbold} and \cs{mathgreekitbold}}
\label{sec:newgreekbold}
-Again this applies only to LGRgreek and LGRgreeks options (and the |1.3za|
+Again this applies only to LGRgreek and LGRgreeks options (and the \mstrelease{1.3za}
added LGRgreek+ and LGRgreeks+).
-See\RightNote{1.3za} the \autoref{table:greekupbold} and \autoref{table:greekitbold}
+See\RightNote{\mstrelease{1.3za}} the \autoref{table:greekupbold} and \autoref{table:greekitbold}
for illustration of usage (in math mode only) of code such as
\begin{verbatim}
\mathgreekupbold{\alpha}
@@ -3594,7 +3412,7 @@ commands on Latin letters also:
the \texttt{LGRgreek+} option}
\label{sec:newgreekplus}
-With option\RightNote{1.3za} LGRgreek+ or LGRgreeks+, \mst makes Greek
+With option\RightNote{\mstrelease{1.3za}} LGRgreek+ or LGRgreeks+, \mst makes Greek
letters control sequences \cs{alpha}, \cs{beta}, ... (but not \cs{alphaup} or
\cs{betait} and the others) react in a special manner within the scope of
\mathnormal, \mathrm, \mathit, \mathbf, and \mathnormalbold, but not
@@ -3671,15 +3489,24 @@ fonts having only 128 or 256 glyphs, and from the fact that \mathrm and
\mathbf originate in Plain \TeX\ \cs{rm} and \cs{bf} and are still quite
akin to it, they are font switching commands nothing more or less.
+\subsection{Advanced capacities}
+
+Some such capacities are on per default (but if with subdued option will be
+turned off in the \emph{normal} and \emph{bold} math versions), others require
+an action from the user for activation.
-\subsection{Extra spaces around letters}
+\subsubsection{Extra spaces around letters}
\label{sec:mathskips}
-This is a new feature added with release |1.3|: the command \MTsetmathskips
-allows the user to set up some spaces (more precisely, `mu glue'; but stretch
-and shrink are discarded) to be
-automatically inserted around the letters in math mode. Some (very) unrealistic
-uses:
+This is a new feature%
+%
+\footnote{It was new in 2013 indeed. Not so much new now, but it is never too
+late to try it out.}
+%
+added with release \mstrelease{1.3}: the command \MTsetmathskips allows the
+user to set up some spaces (more precisely, `mu glue'; but stretch and shrink
+are discarded) to be automatically inserted around the letters in math
+mode. Some (very) unrealistic uses:
\begin{verbatim}
% this may be anywhere in the document (also within a math group):
\MTsetmathskips{x}{20.33mu}{15.66mu}% 20.33mu before all x's and 15.66mu after.
@@ -3699,28 +3526,25 @@ limits as usual the scope of this command. Furthermore the command
\MTunsetmathskips cancels previous use of \cs{MTsetmathskips} for a given
letter.
-The implementation relies on the `mathematical activation' of letters, which is
-done by default by the package since release |1.2b|. Should this cause
-compatibility problems, the command \MTmathstandardletters cancels it
+The implementation relies on the `mathematical activation' of letters, which
+is done by default by the package since release \mstrelease{1.2b}. Should this
+cause compatibility problems, the command \MTmathstandardletters cancels it
entirely. To reactivate it, there is \MTmathactiveletters. Note that
-\cs{MTmathactiveletters} is done automatically by \mst when loaded, and also
-each time the package enhanced math-version-switch command \MTversion is used,
-except for the normal and bold math versions under the subdued option.
-
-% Earlier this `mathematical activation' of letters had been used by the package
-% only to add automatically italic corrections, as described in the next
-% section.
+\MTmathactiveletters is done automatically (as part of \MTicinmath) by
+\mst when loaded (if not with subdued option), and also each time the
+package enhanced math-version-switch command \MTversion is used, except for
+the normal and bold math versions under the subdued option.
-\begin{framed}
+\begin{shaded*}
The extra skips are set at natural width; they do not contribute to the
overall stretchability or shrinkability of the math formula and do not
create break points.
- \textcolor{magenta}{\bfseries Changed with |1.3i|}: they are \emph{not}
+ \textcolor{magenta}{\bfseries Changed with \mstrelease{1.3i}}: they are \emph{not}
applied within the scope of math alphabet commands.
-\end{framed}
+\end{shaded*}
-\subsection{Italic corrections}
+\subsubsection{Background on italic corrections in math mode}
\label{sec:ic}
{\small Note: this is somewhat technical discussion which may well be skipped in
@@ -3824,9 +3648,14 @@ $\xdef\mstrestorefontdimen{\fontdimen2\textfont\symmtletterfont=
We learn in Appendix G of the \TeX book that the italic correction is used for
the horizontal shift of the superscript with respect to the position of
-the subscript: $\mathit{f_i^j}$, or,
+% CETTE LIGNE PROVOQUE L'AJOUT D'UN LINESKIP
+% the subscript: $\mathit{f_i^j}$, or,
+% En fait dj en Plain TeX, configuration de base la hauteur totale de
+% $f_i^j$ est > 12pt = baselineskip !
+% Work-around ad hoc
+the subscript: \smash{$\mathit{f_i^j}$}, or,
going back now to the standard math italics $f_i^j$. In the next paragraphs
-we use $f_i^i$ for more accurate comparison of the positioning of the sub- and superscript.
+we use \smash{$f_i^i$} for more accurate comparison of the positioning of the sub- and superscript.
If we try something like this: |${f\/}_i^i$| we obtain ${f\/}_i^i$. Our
overlapping game with |\rlap{$f_i^i$}${f\/}_i^i$| gives
@@ -3889,15 +3718,10 @@ to preserve this behavior).
italic corrections are canceled inside the arguments to the math alphabet
commands, to allow the formation of ligatures as
is expected in the standard default \TeX{} font set-up in math.%
-% \footnotemark
-% \global\let\saved@Href@B\Hy@footnote@currentHref
\end{framed}\vskip-.75\baselineskip
\end{framed}
-%\addtocounter{footnote}{-1}%
-%\let\Hy@footnote@currentHref\saved@Href@A
-%
\footnotetext{the situation is rather ironical! by the way, the warnings in
- section \ref{sec:mathxx} with \texttt{\$x\^{}?\$} or similar are less of an
+ \autoref{sec:mathxx} with \texttt{\$x\^{}?\$} or similar are less of an
issue here, because the letter is only \emph{followed} by \texttt{\char92/}
and anyhow the whole is put by \mst within group braces, so no surprises
with \texttt{\$x\^{}y\$} or \texttt{\$\char92mathbin x\$}. Nevertheless it
@@ -3905,16 +3729,10 @@ to preserve this behavior).
composite objects, something which could surprise other packages. The
command \csb{MTmathstandardletters} cancels this mechanism.}
-%\addtocounter{footnote}{1}%
-% \let\Hy@footnote@currentHref\saved@Href@B
-%
-% \footnotetext{\RightNote{1.3i}Formerly, italic corrections were added to the
-% \cs{mathnormal} arguments.}
-
\makeatother
The feature-implementing commands \MTicinmath, \MTnoicinmath,
-\MTicalsoinmathxx are described in section \ref{sec:cmds}.
+\MTicalsoinmathxx are described in \autoref{sec:cmds}.
\endgroup
\textbf{\hbox{Note:}} \emph{from brief testing on 2012/12/28, \XeTeX{} seems not
@@ -3944,11 +3762,7 @@ at least on current TL2016.
\noindent\kern-0.5em\relax2022/10/29: no change with current TL2022.}
-% For more see
-% \url{http://tex.stackexchange.com/a/337076} which explores also the differences
-% between the two Unicode engines regarding italic corrections in pure text mode.
-
-\subsection{Extra glue after \texorpdfstring{\cs{exists}}{\textbackslash
+\subsubsection{Extra glue after \texorpdfstring{\cs{exists}}{\textbackslash
exists}, \texorpdfstring{\cs{forall}}{\textbackslash forall}, and before the prime glyph}
\label{sec:extraskips}
@@ -3998,21 +3812,16 @@ Under the subdued option, the \emph{normal} math version (at the start of
the document body, or after |\MTversion{normal}|) and the \emph{bold} math
version (either at the start of the document body after \cs{boldmath}, or after
|\MTversion{bold}|) do not have any extra skip inserted (even one of zero
-width) after $\oldforall$, $ \oldexists$, or before the ${}'$.%
-%
-%\footnote{\RightNote{1.3j}Formerly, skips of zero widths were inserted.}
+width) after $\oldforall$, $ \oldexists$, or before the ${}'$.
\endgroup
-
-\subsection{Extended scope of the math alphabets commands}
+\subsubsection{Extended scope of the math alphabets commands}
\label{sec:mathxx}
\begingroup
\MTversion{italic}\renewcommand\familydefault\sfdefault
-% il faudra peut-tre que j'annule cette faon qu' mathastext de tripatouiller
-% \familydefault...
-\makeatletter\let\mst@doasterisk\relax\makeatother
+\MTnormalasterisk
Ever since the initial version of the package, some characters usually
unaffected by the math alphabet commands \cs{mathbf}, \cs{mathtt},
@@ -4027,21 +3836,31 @@ $<$, or $]$ could not be declared of `variable family' (in addition to being
picked up in the text font) as this would, for reasons of the inner workings of
\TeX{}, not be compatible with the automatically inserted spaces around them.
-A revolutionary\RightNote{1.2} ;-) novelty is introduced with version |1.2| of the package:
+A revolutionary\RightNote{\mstrelease{1.2}} ;-) novelty is introduced with
+version \mstrelease{1.2} of the package:
\begin{enumerate}
\item the pre-declared or user-declared (using the |amsmath|
\cs{DeclareMathOperator} or equivalent) operator names obey the math
alphabet commands,\footnote{contrarily to the next feature, this one is not
likely to create incompatibilities with other packages, so it is
activated by default.}
-\item and, \emph{optionally}, all non alphabetical
- characters\footnote{of course some of them are input preceded by a
- backslash, and the backslash itself is input as \cs{backslash}.} treated by
- \mst, \emph{i.e.}, if not disabled by options,
- ${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}\,{\{}\,{\}}$,
- the asterisk $*$, and
- $.\,/\,\vert\,\backslash\,{\#}\,{\$}\,{\%}\,{\&}$%
-%
+\item as well as all non alphabetical characters treated by \mst.
+\end{enumerate}
+
+The non-letters handled by \mst (if not disabled by options) fall into two
+groups:
+\begin{itemize}[nosep]
+\item Those to which \TeX{} associates some specific spacings:
+ \centeredline{${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,%
+ {(}\,{)}\,{[}\,{]}\,{<}\,{>}\,{\{}\,{\}}\,*$}
+ We call them the ``hard'' ones.
+\item Those for which \TeX{} uses so-called ordinary spacings:
+ \centeredline{$.\,/\,\vert\,\backslash\,{\#}\,{\$}\,{\%}\,{\&}$}
+ We call them the ``easy'' ones.
+\end{itemize}
+The ``easy'' non-letters are handled \emph{easily} by \mst, simply
+by declaring them to be of ``variable family type''. This will
+be done automatically.%
\footnote{%
${\#}\,{\$}\,{\%}\,{\&}$ obey the math alphabets since the initial version
of \mst; the dot $.$, the slash $/$, the vertical bar $\vert$ and the
@@ -4049,431 +3868,326 @@ A revolutionary\RightNote{1.2} ;-) novelty is introduced with version |1.2| of t
around them, and the procedure is then activated by default since
\texttt{1.2} for these characters as they are `easy non-letters'. But for
\cs{mid} and \cs{setminus} which are $\vert$ and $\backslash$ with special
- spacing (of type \cs{mathrel} and \cs{mathbin} resp.) the procedure has
- some constraints explained in the framed box on next page and the
- activation requires \cs{MTnonlettersobeymathxx}.}
+ spacing (of type \cs{mathrel} and \cs{mathbin} resp.) the
+ activation requires \csb{MTnonlettersobeymathxx}.}
%
-will also obey
- the math alphabet commands (when not used as delimiters). The
- important thing is that the spaces added by \TeX{} before and after
- are not modified.
-\end{enumerate}
+The ``hard'' non-letters require a more complex approach using a concept
+called ``mathematical activation''. For reasons explained next, this is not
+done automatically and requires the user to employ the command
+\MTnonlettersobeymathxx (or, for the specific case of the asterisk the option
+asterisk).
+
+\begin{shaded*}
+ It is a fundamental feature that the spacing added by \TeX{} before and
+ after each such \mst-ified non-letter is in no way modified.
+\end{shaded*}
+
+
Let us compare, for example, the new behavior of \cs{mathtt} and \cs{mathbf}
-\MTmathoperatorsobeymathxx\MTnonlettersobeymathxx\MTeasynonlettersobeymathxx
-\[ \mathtt{(\sin(n!)<\cos(m-p)?)}\qquad \mathbf{[\sin(x+y)=\cos(z-t)]}\]
-with the traditional default behavior:
-\MTmathoperatorsdonotobeymathxx\MTnonlettersdonotobeymathxx
+when \MTnonlettersobeymathxx has been used
+\MTmathoperatorsobeymathxx
+\MTnonlettersobeymathxx
+\MTeasynonlettersobeymathxx
+\[ new:\quad \mathtt{(\sin(n!)<\cos(m-p)?)}\qquad \mathbf{[\sin(x+y)=\cos(z-t)]}\]
+with the traditional default behavior one observes without \mst or in
+subdued normal or bold math version:
+\MTmathoperatorsdonotobeymathxx
+\MTnonlettersdonotobeymathxx
\MTeasynonlettersdonotobeymathxx
-\[ \mathtt{(\sin(n!)<\cos(m-p)?)}\qquad \mathbf{[\sin(x+y)=\cos(z-t)]}\]
-
-The first feature is activated by default, except of course for the normal and
-bold math versions when the package was given the \emph{subdued} option. The
-second feature is \emph{off} by default for the characters listed first. It is
-\emph{on} for the `easy' cases
-${\#}\,{\$}\,{\%}\,{\&}\,.\,/\,\vert\,\backslash$ (activating the feature for
-them puts no constraint on the user input and should not be too upsetting to
-other packages), and also for $*$ but only if this was required explicitly by
-the option asterisk, as the user then is supposed to know that |$R^*$| is no
-valid input anymore and should be replaced by |$R^{*}$|. The remaining `difficult'
-cases create similar
-constraints, which will be commented more upon next. The commands%
-\footnote{these commands are to be used outside of math mode.
- Their scope is limited to the current \LaTeX{} environment or group. They use
- the \cs{everymath} and \cs{everydisplay} mechanism so if the document needs to
- modify these token lists it has to do so in a responsible manner, extending
- not annihilating their previous contents.}
-%
-for deactivation are:\\
+\[ standard:\quad \mathtt{(\sin(n!)<\cos(m-p)?)}\qquad \mathbf{[\sin(x+y)=\cos(z-t)]}\]
+
+The commands for
+\emph{deactivation} are:\\
\mbox{}\hspace{1cm}\csb{MTmathoperatorsdonotobeymathxx},\\
\mbox{}\hspace{1cm}\csb{MTeasynonlettersdonotobeymathxx},\\
\mbox{}\hspace{1cm}\csb{MTnonlettersdonotobeymathxx},\\
-and those for activation:\\
-\mbox{}\hspace{1cm}\csb{MTmathoperatorsobeymathxx} regards operator names and is executed by default,\\
-\mbox{}\hspace{1cm}\csb{MTeasynonlettersobeymathxx} is done by default and applies to \centeredline{${\#}\,{\$}\,{\%}\,{\&}\,.\,/\,\vert\,\backslash$} and also to $*$ under package option asterisk,\\
-\mbox{}\hspace{1cm}\csb{MTnonlettersobeymathxx} is \emph{not} done by default (see explanations why in the framed box next) and regards \centeredline{${!}\,{?}\,{,}\,{:}\,{;}\,{+}\,{-}\,{=}\,{(}\,{)}\,{[}\,{]}\,{<}\,{>}$} and also \cs{mid} and \cs{setminus} but applies to
-the braces ${\{}\,{\}}$ only if \csb{MTexplicitbracesobeymathxx} is also used.\par
-%
-%% suppression de cette note de bas de page 1.3u car elle est obsolte
-%% (pas sr si 100%, mais en tout cas l'exemple avec \mathbf{-} n'a plus
-%% de problme.
-% \footnote{when in subdued mode, the
-% math alphabets are the default ones, not the ones modified by \mst to use the
-% document text fonts. As a result, matters of font encodings may then give
-% unexpected results, for example for $-$. On the present document page we
-% switched to a math version to escape from the |subdued| mode and avoid the
-% problem with \cs{mathbf\{-\}} giving in the normal (subdued) math version
-% {\MTversion{normal}\MTnonlettersobeymathxx$\mathbf-$\sffamily, when
-% `non-letters' are declared to obey math alphabets.}}
+and those for \emph{activation}:\\
+\mbox{}\hspace{1cm}\csb{MTmathoperatorsobeymathxx} (done by default),\\
+\mbox{}\hspace{1cm}\csb{MTeasynonlettersobeymathxx} (done by default),\\
+\mbox{}\hspace{1cm}\csb{MTnonlettersobeymathxx} is \emph{not} done by default
+(see explanations why in the shaded box next) and applies to the ``hard''
+non-letters mentioned above and also to \cs{mid} and \cs{setminus}.
+Furthermore, it applies to
+the braces ${\{}\,{\}}$ only if \csb{MTexplicitbracesobeymathxx} is also used.
+
+
+\begin{shaded*}
+ \textbf{Important:} the package does not execute on its own
+ \csb{MTnonlettersobeymathxx}. The reason is that the
+ mechanism in effet replaces the original ``hard'' characters such as
+ |?|, |[|, |<| by (in math mode only) a more complex structure, which
+ ceases looking to \TeX{} as only one token, and as a consequence |$x^?$|, |$R^+$|
+ or |$\mathopen<A\mathclose>$| raise an error, the workaround being to
+ employ additional braces: |$x^{?}$|, |$R^{+}$| and |$\mathopen{<}A\mathclose{>}$|.
+
+ Similarly |$R^*$| does not work anymore under option asterisk, the user is
+ supposed to know that with this option |$R^{*}$| is the mark-up to use.
+
+ Thus, if one adds
+ \centeredline{|\usepackage{mathastext}|\MTnonlettersobeymathxx} to a
+ pre-existing document, it is needed to check if the mark-up satisfies
+ to the above guidelines. For this reason the mechanism is by default
+ not activated and the user has to execute:
+ \centeredline{\MTnonlettersobeymathxx}
+ This can be done in the preamble and will trigger actual modifications
+ only at time of |\begin{document}|.
+\end{shaded*}
-\begin{framed}
- \textbf{Important:} the package does \csb{MTnonlettersdonotobeymathxx} by
- default. The reason is that activating the mechanism adds some constraints to
- the way things must be input, adding
-\centeredline{|\usepackage{mathastext}|\csb{MTnonlettersobeymathxx}}
- to a pre-existing
- document might well create errors:
- all these characters treated by \mst, such
- as |?|, |[|, |<| now represent (in math mode only!) \emph{two} `tokens' and
- this will utterly confuse \TeX{} if some precautions are not taken: |$x^?$|,
- |$R^+$| or |$\mathopen<A\mathclose>$| \emph{must} now be coded as |$x^{?}$|,
- |$R^{+}$| and |$\mathopen{<}A\mathclose{>}$| (the rule is to do as if |?|,
- |+|, |<| or |>| were each really \emph{two} characters).
-
- Even if this rule is respected in the document source, it is still a
- possibility that incompatibilities with other packages will arise because
- \mst does a \emph{mathematical activation} of the characters which could be
- unexpected and unchecked for by other packages. This is precisely the case
- with the \ctanpkg{amsmath} package, and the problem goes away by just making sure
- that |amsmath| is loaded before \mst{} (generally speaking, \mst should be
- loaded last after all packages dealing with math things).
-\end{framed}
+
+\begin{footnotesize}
+Some \TeX nical notes:%
+%
+\footnote{The complete truth is only to be found in source code. Here are
+ some extra details:
+
+ The
+ dollar sign and the curly braces are not tested for mathematical or catcode
+ activation.
+
+ The $*$\RLNote{changed:}{\mstrelease{1.4}} is tested as
+ are the ``hard'' non-letters, except under option everymath. On the
+ other hand \cs{ast} will be modified independently of what is decided for
+ $*$. Comprenne qui pourra.}
+
+\begin{itemize}[nosep]
+\item
+The asterisk $*$ is associated with its own option asterisk, because
+independently of the matter of its behavior in the scope of math alphabets
+commands, its handling by \mst (via the \MTlowerast associated
+configuration) always requires it to be made mathematically active and to
+expand to a more complex structure. So once this option is received by the
+package, it goes full steam and also adds by default the responsiveness to
+math alphabet commands (in non-subdued math versions).
+
+\item The legacy situation which is a bit late to change is that the
+ responsiveness of the asterisk to math alphabets being on by default under
+ option asterisk, it was decided that this responsiveness would be turned
+ off by \MTeasynonlettersdonotobeymathxx and back on by
+ \MTeasynonlettersobeymathxx, although the $*$ is part of the ``hard''
+ non-letters. One can use \MTnormalasterisk to stop the $*$ to obey math
+ alphabet commands, but it also cancels the \MTlowerast mechanism.
+
+\item At\RLNote{changed:}{\mstrelease{1.4}} \mstrelease{1.4} ``easy''
+ non-letters found out to be (at |\begin{document}| or with \MTversion
+ except for subdued \emph{normal} or \emph{bold}) mathematically active
+ characters will not get overridden by \mst.
+ This applies for example with
+ the dot ``.'' under \ctanpkg{babel} with Spanish language. Its special
+ behavior to transform into a comma ``,'' if before a digit is now
+ kept. As an amusing side note, if \MTnonlettersobeymathxx is used, this
+ comma does obey math alphabet commands.
+
+\item An ``easy'' non-letter which (at |\begin{document}| or with \MTversion
+ except for subdued \emph{normal} or \emph{bold}) is catcode active will
+ still be set by \mst to be of ``variable family type'', if it is not
+ mathematically active. The catcode status is not checked nor modified, only
+ the mathcode as per previous item. Now whether the \mst-ification has any
+ effect depends on how the user has configured the catcode active character
+ to behave if in math mode.
+
+\item When \mst wants to employ mathematical activation for a non-letter
+ character among the ``hard'' cases (inclusive of the asterisk), which is done
+ at |\begin{document}| if not subdued or with every \MTversion except for
+ subdued \emph{normal} or \emph{bold}, it first checks if this character
+ is currently catcode active. If this is the case, it then checks if the
+ character is a \ctanpkg{babel} shorthand. If yes, it then hooks into
+ \ctanpkg{babel} internals to modify the way this shorthand acts in math
+ mode, so that now the character will respond to math alphabet commands.
+ If however the catcode active character does not appear to be a
+ \ctanpkg{babel} shorthand, then \mst does not do anything at all (beyond
+ its general business at package loading time to set-up the
+ font used for the non-active token).
+%
+ In relation to this context \mst should always be loaded \emph{after} \ctanpkg{babel}.
+ And also \emph{after} the \ctanpkg{amsmath} package.
+
+\item
The braces |\{| and |\}| remain unresponsive to the alphabet changing commands
-even after \csb{MTnonlettersobeymathxx}. One must issue also
-\csb{MTexplicitbracesobeymathxx}, but it has the disadvantage that |\{| and
+even after \csb{MTnonlettersobeymathxx}. The user must employ for this
+\centeredline{\csb{MTexplicitbracesobeymathxx}}
+This has the disadvantage that |\{| and
|\}| become then unusable as variable-size delimiters: |\big\{| or |\big\}|
create errors and one must make use of |\big\lbrace| and |\big\rbrace|. But
-\MTmathoperatorsobeymathxx\MTnonlettersobeymathxx\MTexplicitbracesobeymathxx
+%
+\MTmathoperatorsobeymathxx
+\MTnonlettersobeymathxx
+\MTexplicitbracesobeymathxx
+%
one can now enjoy $\mathtt{\{a, a>b\}}$, $\mathbf{\{a, a>b\}}$,
-$\mathsf{\{a, a>b\}}$, or even $\mathnormalbold{\{a, a>b\}}$.\footnote{this
- last example uses the \cs{mathnormalbold} additional alphabet defined by
- \mst.}\footnote{Let me recall that braces will anyhow not be handled at all
+$\mathsf{\{a, a>b\}}$, or even $\mathnormalbold{\{a, a>b\}}$.%
+%
+\footnote{This
+ last example uses the \csb{mathnormalbold} additional alphabet defined by
+ \mst.}%
+%
+\footnote{Let me recall that braces will anyhow not be handled at all
by \mst if the document
font encoding is |OT1|, except under option |alldelims|.}
-Even with \csb{MTnonlettersobeymathxx}, the parenthese-like symbols $($, $)$,
+\item
+Even with \csb{MTnonlettersobeymathxx}, the parentheses-like symbols $($, $)$,
$[$, $]$, $<$ and $>$ and the slashes $/$, $\backslash$, \emph{if used as
- left/right delimiters} (i.e.\@ with |\left/\right|) do not react to math
+ left/right delimiters} (i.e.\@ with |\left/\right|) will not respond to math
alphabet commands. This is mainly explained by the fact that the text font
-will not contain suitable glyphs, hence no attempt was made to make the
+will not contain suitable glyphs, hence no attempt was made by \mst to make the
delimiters pick up their glyphs there.
But \mst does try to pick up most of the `small variants' of the delimiters
-from the text font: |$\left<x\right>$| gives $\left<x\right>$ (but
-|$\left<b\right>$| gives $\left<b\right>$.) Notice that this differs from
+from the text font: |$\left<x\right>$| gives $\left<x\right>$ but
+|$\left<b\right>$| gives $\left<b\right>$. Notice that this differs from
standard \LaTeX{} for which |$\left< x\right>$| gives $\langle x\rangle$. As
-it is perhaps a bit strange to have $\left< x\right>$ next to
-$\left< X\right>$ there is option nosmalldelims: with this option the
-small-sized variants of the delimiters are not modified by \mst (option
-nosmalldelims has the side effect that, for the non-delimiter uses of
-|\{, \}|
-to be \mst-ified it is necessary to issue \csb{MTnonlettersobeymathxx} and
-\csb{MTexplicitbracesobeymathxx}.)
-
-At any rate, as said above, whether `small' or not, delimiters are
-unresponsive to math alphabet commands, due to technical aspects of \TeX, and
-the way \mst handles these things. Examples: |\mathbf{<a,b>}| gives
-$\mathbf{<a,b>}$
-%{\setbox0\hbox{$\mathbf{<a,b>}$}\typeout{ICI}\showboxdepth\maxdimen
-% \showboxbreadth\maxdimen \showbox0}
-(no use of |\left/\right|, hence brackets do obey the math alphabets --- as we
-issued \MTnonlettersobeymathxx a bit earlier), |\mathbf{\left<a,b\right>}|
-gives $\mathbf{\left<a,b\right>}$ (brackets used with |\left/\right| do not
-obey the math alphabets), |\mathbf{\mathopen{<}a,b \mathclose{>}}| gives
-$\mathbf{\mathopen{<} a,b \mathclose{>}}$ (no |\left/\right|, brackets
-do obey the math alphabets).
-
-\endgroup
-For comparison, the \LaTeX{} standard behavior for
-\centeredline{|\mathbf{\mathopen{<}a,b\mathclose{>}}|}
-is $\mathbf{\mathopen{<} a,b
- \mathclose{>}}$ (neither brackets nor the comma do respond).
-
-
-\subsection{Unicode engines}
-
-\mst is minimally Unicode aware since |1.12| and can be used with \XeTeX{} or
-\LuaTeX{}. Starting with release |1.3|, it needs |luatex| to be at least
-as recent as the one which was provided with the TL2013 distribution.
-
-However \mst applies only to (a subset of) the |32-127| ascii range, and
-optionally to Greek letters, but for the latter only if provided via ``\TeX\
-fonts'' such as Euler, Symbol or LGR-encoded fonts.
-It does not know how to use a given Unicode font simultaneously for Latin and
-Greek letters.
-
-Thus, first consider much better alternatives:
-\begin{itemize}
-\item Since 2018, the package \ctanpkg{mathfont}%
-%
-\footnote{Conrad \textsc{Kosowsky}, \emph{Use TrueType and OpenType fonts in math mode}
-\url{https://ctan.org/pkg/mathfont}.}
-%
-adapts Unicode text fonts to usage in math mode. It works with both \XeTeX\
-and \LuaTeX.
-\item For \XeTeX\ only, \ctanpkg{mathspec}%
-%
-\footnote{Andrew Gilbert \textsc{Moschou}, \emph{Specify arbitrary fonts for mathematics in \XeTeX}
-\url{https://ctan.org/pkg/mathspec}.}
-%
-also allows usage of arbitrary text fonts in mathematics.
-\item and of course
-\ctanpkg{unicode-math}%
-%
-\footnote{Will \textsc{Robertson}, et al., \emph{Unicode mathematics with
- support for XeTeX and LuaTeX} \url{https://ctan.org/pkg/unicode-math}.}
-%
-is the standard package for using OpenType fonts which are equipped with the needed extra
-support being used in \TeX\ math mode.
-\end{itemize}
-
-If using any one of the above you probably don't need, don't want, and should
-not use \mst.
-
-Let me insist that \mst has not been tested in any systematic
-manner under the Unicode engines; and that it is expected to be most definitely
-incompatible with \ctanpkg{unicode-math}, although your mileage may vary and some
-features may appear to work.
+it is perhaps a bit strange to have $\left< x\right>$ and $\left< y\right>$
+not use the same bracketing glyphs, there is an option nosmalldelims: with
+this option the small-sized variants of the delimiters are not modified by
+\mst (option nosmalldelims has the side effect that, for the non-delimiter
+uses of |\{, \}| to be \mst-ified it is necessary to issue
+\csb{MTnonlettersobeymathxx} and \csb{MTexplicitbracesobeymathxx}.)\par
-When using \mst with either \XeTeX{} or \LuaTeX{} it is recommended to use the
-\ctanpkg{fontspec} package (see remark below on \cs{encodingdefault}). Furthermore,
-if using \ctanpkg{fontspec} it is \emph{necessary} to load it with its
-|no-math| option, and this \emph{must} happen before loading \mst.
-\begin{framed}
-\begin{itemize}[label=$\bullet$, leftmargin=1em]
\item
- Use \ctanpkg{fontspec} with its
- \emph{no-math} option, and load it \emph{prior} to \mst. As some packages
- load \ctanpkg{fontspec} themselves (for example |polyglossia|), a
- \centeredline{|\PassOptionsToPackage{no-math}{fontspec}|} early in the
- preamble might be needed.
-
-\item
- The \ctanpkg{amsmath} package, if used, \emph{must} be loaded \emph{prior} to \mst.
-
-\item
- Under |lualatex| engine, it is recommended to also load the package
- \ctanpkg{lualatex-math}.% Please check its documentation as possibly it has now
- % been incorporated upstream (I am not following up on the situation).
+At any rate, as said above, whether `small' or not, delimiters will remain
+unresponsive to math alphabet commands, due to technical aspects of \TeX, and
+the way \mst handles these things. Examples:
+\begin{itemize}[nosep]
+\item |\mathbf{<a,b>}| gives $\mathbf{<a,b>}$: no use of |\left/\right|, hence
+ brackets do obey the math alphabets --- as we issued
+ \MTnonlettersobeymathxx a bit earlier,
+\item |\mathbf{\left<a,b\right>}| gives
+ $\mathbf{\left<a,b\right>}$: delimiters used with |\left/\right| will not obey
+ the math alphabets,
+\item |\mathbf{\mathopen{<}a,b \mathclose{>}}| gives
+ $\mathbf{\mathopen{<} a,b \mathclose{>}}$: no |\left/\right|, so the
+ brackets do obey the math alphabets due to \MTnonlettersobeymathxx.
+\item
+\MTnonlettersdonotobeymathxx
+to compare, the \LaTeX{} standard for
+|\mathbf{\mathopen{<}a,b\mathclose{>}}| is to produce
+$\mathbf{\mathopen{<} a,b \mathclose{>}}$: neither brackets nor the comma are
+responding to \cs{mathbf}.
\end{itemize}
-\end{framed}
-
-% obsolete with release 1.3:
-% A little piece of the functionality of \mst is less fully
-% realized under the \LuaLaTeX{} engine than it is with
-% \XeTeX{}. This is a temporary situation as the needed feature
-% of \LuaLaTeX{} has been implemented in its latest development
-% release. I will update \mst when these binaries will have
-% reached the distribution stage.
-
-I already mentioned in the section \ref{sec:ic} the fact that
-the italic corrections were not available for OpenType fonts
-under the \XeTeX{} engine and only partially available for the
-\LuaTeX{} engine, with the result that the spacings in math
-mode when using for the letters an upright text font will be
-less satisfying than with the standard PDF\TeX{} engine (the
-OpenType fonts not being usable with the latter engine, this is
-not a criterion of choice anyhow).
-
-To define math versions when using unicode fonts, use \ctanpkg{fontspec}'s
-\cs{setmainfont} before the \cs{Mathastext}\oarg{version} command, or simply
-before loading \mst for the default math versions.
-
-It is possible to mix usage of Unicode fonts and classical \TeX{}
-fonts. All used 8bits font encoding must have been passed as
-options to the \ctanpkg{fontenc} package.
-
-\subsubsection{The unicodeminus option}
-
-For legacy reason, \mst uses by default the |EN DASH U+2013| for the minus
-sign in math mode, if the font is determined to be a ``Unicode'' font.
-
-There is now the unicodeminus\RightNote{1.3q} to use rather
-% BORDEL DE BORDEL DE FAIT CHIER \verb ET Text for \verb command ended by end
-% of line. je l'ai patch dans etoc et xint mais pas ici encore.
-|MINUS SIGN U+2212|.%
-\footnote{Thanks to Tobias~\textsc{Brink} who asked for this feature.}
-%
-Check \hyperref[nicodeminus]{\ttfamily\hyphenchar\font=189 its documentation}
-on page \pageref{nicodeminus}.
+\end{itemize}
+\end{footnotesize}
-\subsubsection{Two examples}
+\endgroup
-I include
-here two examples which compiled successfully with \XeTeX{} and
-\LuaLaTeX{}, the first one on a Linux machine, the second one on a Mac
-OS X machine.\footnote{A |tex mathastext.dtx| (in a temporary repertory) on a
- copy of |kpsewhich mathastext.dtx| will extract extended versions of
- these examples as test files.}
+\subsubsection{Hacking letters (and even digits) for special tasks}
+\label{ssec:hackingletters}
+
+For some ascii characters, i.e.\@ the ``hard'' non-letters considered in the
+previous section, and even more spectacularly for all ascii letters, \mst
+achieves the capabilities describes in earlier sections via a \TeX nique known
+as ``mathematically active characters''. For letters this is turned on by
+default, but for the non-letter characters it is the command
+\cs{MTnonlettersobeymathxx} which triggers this mathematical activation.
+
+It is possible for daring \LaTeX{} users to hook into this architecture.
+Release \mstrelease{1.4} has made this especially easy regarding ascii letters
+(and even for digits if using the package option activedigits).
+
+Except if told otherwise, \mst will make all Latin ascii letters mathematically
+active, and when \TeX{} encounters e.g.\@ `e' in math mode it replaces it with
+the macro having name \cs{MTcommandlettere} (mind the ending |e|). Its
+default definition inserts \hyperref[sec:mathskips]{optional extra skips}
+and/or an \hyperref[sec:ic]{italic correction}.
+
+You can redefine this \cs{MTcommandlettere}, or any
+\cs{MTcommandletter}\meta{ascii-letter}, to achieve (globally or locally)
+custom goals.%
+%
+\footnote{\CHANGED{\mstrelease{1.4}}%
+Prior to \mstrelease{1.4}, there was no equivalent to
+\cs{MTcommandletter}\meta{letter}. An internal macro \cs{mst@}\meta{letter}
+stood for what is denoted now \cs{MTmathcharletter}\meta{letter}, but required
+a \cs{protected} if redefined as it was submitted to an \cs{edef} during
+processing.}
+%
+Attention, this redefinition should not use `e' itself as a ``naked''
+character to typeset in math mode, else an infinite loop will arise at time of
+use. To access a symbol equivalent to the ``naked'' `e', use
+\cs{MTmathcharlettere} (again mind the ending |e|). For example:
\begin{verbatim}
-\documentclass{article}
-\usepackage[hscale=0.8]{geometry}
-\usepackage{multicol}
-\usepackage[no-math]{fontspec}
-\usepackage{lmodern}
-\usepackage[subdued,italic]{mathastext}
-\setmainfont[Color=999999]{Verdana} \Mathastext[Verdana]
-\setmainfont[Color=0000FF]{Arial} \Mathastext[Arial]
-\setmainfont[Color=00FF00]{DejaVu Serif} \Mathastext[DejaVu]
-\MTDeclareVersion{times}{T1}{ptm}{m}{n}
-\setmainfont[Color=FF0000]{Andale Mono} \Mathastext[Andale]
-\begin{document}
-\newcommand\TEST[1]{\MTversion{#1}%
-\begin{multicols}{2}
-\hbox to\columnwidth{\hbox to\columnwidth{\hfil
- $abcdefghijklmnopqrstuvwxyz$\hfil}\kern-2.5em{#1}}
- \centerline{ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$ }
- \centerline{ $0123456789$ }
- \centerline{ $!\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\backslash$ }
-\columnbreak
- \centerline{ abcdefghijklmnopqrstuvwxyz }
- \centerline{ ABCDEFGHIJKLMNOPQRSTUVWXYZ }
- \centerline{ 0123456789}
- \centerline{ !\,?\,*\,,\,.\,:\,;\,+\,-\,=\,(\,)\,[\,]\,/\,\#\,%
- \$\,\%\,\&\,<\,>\,|\,\{\,\}\,\char92 }
-\end{multicols}}
-\begin{multicols}{2}
- \centerline{\textbf{math mode}}
-\columnbreak
- \centerline{ \textbf{text} }
-\end{multicols}
-\TEST{DejaVu}\TEST{Verdana}\TEST{times}\TEST{Andale}
-\TEST{Arial}\TEST{bold}\TEST{normal}
-\end{document}
+\renewcommand\MTcommandlettere{\mathsf{\MTmathcharlettere}}% not \mathsf{e}!
\end{verbatim}
-And now the same thing with fonts available on Mac OS X:
+In this case we could do the simpler approach with \cs{textsf}, which works
+as it will then typeset the |e| in text mode, not math mode.
\begin{verbatim}
-\documentclass{article}
-\usepackage[hscale=0.8]{geometry}
-\usepackage{multicol}
-\usepackage[no-math]{fontspec}
-\usepackage{lmodern}
-\usepackage[subdued,italic]{mathastext}
-\setmainfont[Color=FF0000]{Hoefler Text} \Mathastext[Hoefler]
-\setmainfont[Color=336633]{American Typewriter}\Mathastext[Typewriter]
-\setmainfont[Color=0000FF]{Herculanum} \Mathastext[Herculanum]
-\setmainfont[Color=FF00FF]{Didot} \Mathastext[Didot]
-\setmainfont[Color=999999]{Comic Sans MS} \Mathastext[Comic]
-\begin{document}
- --- copy here the code from the previous example ---
-\TEST{Didot}\TEST{Comic}\TEST{normal}\TEST{Herculanum}
-\TEST{Hoefler}\TEST{Typewriter}\TEST{bold}
-\end{document}
+\renewcommand\MTcommandlettere{\textsf{e}}% not \mathsf{e}!
\end{verbatim}
-% The test files which will be produced by running |latex| on
-% |mathastext.dtx| are more extent.
+This gives a priori the same result in our \mst context, which
+picks the font for \cs{mathsf} from the one used by \cs{textsf}, assuming here
+default configuration in the preamble following the loading of \mst.%
+%
+\footnote{This example simply reassigns \texttt{e} to another font, and one
+could use also the \LaTeX{} command \cs{DeclareMathSymbol} for this. But few
+\LaTeX{} users are familiar with its interface, and such an approach could
+cost adding an extra math symbol font, depending on what one wants to do.
+Besides \cs{DeclareMathSymbol} is a preamble-only command, which limits
+considerably its usability, forcing basically the change to apply to the whole
+document. Using the \mst interface via mathematically active characters opens
+up the possibility of arbitrary replacements, of local scope in the document
+body.}
-\subsection{Compatibility issues}\label{sec:compat}
-
-Compatibility issues (or just questions of who decides last) are naturally to
-be expected with packages dealing with the math setting; the fix is simply to
-load \mst last. And one should always load |amsmath| before \mst (this is
-especially true when using Unicode engines but applies in general as well).
-
-Any definition made in a package loaded before \mst of the font to be
-used for letters or for the common characters in the |ascii| basic range
-will be overruled by the loading of \mst (this includes the case
-when the earlier package had made the character `mathematically active').
-Conversely most of the set-up done by \mst may well be overruled by
-packages loaded later which do math related things.
-
-Starting with version |1.2|, \mst makes some characters `mathematically
-active' to achieve certain effects: automatic insertion of the italic
-corrections when using an upright text font in math, extended scope of
-the math alphabet commands which now apply to non-letter symbols (and
-also to math operator names, but this is much easier to achieve). And
-the (already mathematically active) right quote is modified to have some
-extra space added before the derivative glyph ${}'$.
-
-This is compatible with using \cs{label} and \cs{ref} in and outside of
-math mode. But a difficulty arises when some other package has made the
-character `globally active' everywhere in the document. The action of
-\mst is made anew at each mathematical inline or displayed formula. If
-it is detected that a character has been activated then nothing further
-will be done (so the \mst feature\footnote{italic correction insertion
- for the latin letters, receptivity to the math alphabet action for the
- other characters.} for that character is lost) \emph{except} if it
-appears that this activation was done by the Babel system. In that case
-\mst does not make the character mathematically active but it modifies
-in the appropriate manner the action of Babel for that character in math
-mode. Furthermore \mst makes the character mathematically
-\emph{inactive}.\footnote{only the characters
- {{;}\,{,}\,{:}\,{!}\,{?}\,{+}\,{\textendash}\,{=}\,{<}\,{>}\,{(}\,{)}\,{[}\,{]}\,*}
- mentioned in section \ref{sec:mathxx} as `difficult non letters' (and
- the right quote {'}) and
- the latin letters are concerned here; it seems highly unprobable that
- a latin letter ${\in}\{a\mbox{--}z,A\mbox{--}Z\}$ will have been made
- globally active (only letters never being used in command names are
- possible candidates), but \mst has been
- designed to cope with it, should it happen ...}
-
-Here is indeed some code that you should \textbf{not} try at
-home:
+
+It is recommended in general to add an extra pair of braces
+to avoid problems when used with |_| and |^|. Let's give an other example and
+demonstrate its output:
\begin{verbatim}
- \documentclass{article}
- \usepackage[french]{babel}
- \usepackage{mathtools}\mathtoolsset{centercolon}
- \begin{document}
- $:$
- \end{document}
+\[
+\renewcommand\MTcommandlettere{{\mathcolor{blue}{\mathsf{\MTmathcharlettere}}}}%
+abcde^efgh
+\]
\end{verbatim}
-\fbox{DO NOT DO THIS AT HOME}\thinspace: it creates an infinite
-loop.\footnote{This seems to still be the case with Babel |3.9f| and
- frenchb.ldf |2.6e|, as tested on Sep. 2, 2013. Again tested with up-to-date
- TL2015 Jan. 15, 2016 with same result.} This is due
-to the fact that the colon is simultaneously active (this is made by
-\ctanpkg{babel-french} at begin document) and mathematically active (done by
-\ctanpkg{mathtools} in the preamble). The interaction gives an infinite loop. Such a
-situation will be cured by \mst, even loaded before \ctanpkg{mathtools},
-\emph{if} use is made of \cs{MTnonlettersobeymathxx}. At each math formula
-\mst will detect that Babel has activated the colon, and will cancel the
-mathematical activation (the precise definition done by \ctanpkg{mathtools} was
-already lost at begin document due to overwriting by \ctanpkg{babel} but the fact that
-the character was mathematically active remained true).
+\MTversion{times}
+\[
+\renewcommand\MTcommandlettere{{\mathcolor{blue}{\mathsf{\MTmathcharlettere}}}}%
+abcde^efgh
+\]%
+\MTversion{normal}%
+As this document is in subdued mode, we had, to show the effect, to
+switch temporarily to some math version activating \mst, and we used here a
+|times| math version with Times and Helvetica clones.
+
+If you redefine \cs{MTcommandlettere} as described in this section the optional extra
+math skips added before or after via \MTsetmathskips will be lost, as well
+as the automatic italic correction |\/| added by \mst for an upright font, and it
+is up to the redefinition of \cs{MTcommandlettere} to do the job.
+
+The explanations above apply to any (ascii) Latin letters \meta{ascii-letter}
+with associed macros \cs{MTcommandletter}\meta{ascii-letter} and ``naked''
+symbol command \cs{MTmathcharletter}\meta{ascii-letter}.
+
+With option activedigits you can even extend the game to digits. The
+``raw'' digit symbol is kept as a math symbol control sequence
+\cs{MTmathchardigit}\meta{y} where \meta{y} stands for the Roman version of
+the digit: empty
+for $0$, then |i|, |ii|, etc... until |ix|. The macro to redefine for special
+effect is \cs{MTcommanddigit}\meta{y}. Example:
+\begin{verbatim}
+\[
+\renewcommand\MTcommanddigit{{\MTmathchardigit^{\mathcolor{blue}{1}}
+ _{\mathcolor{red}{2}}}}%
+\renewcommand\MTcommanddigiti{{\boxed{\mathbf{\MTmathchardigiti}}}}
+0^0_0
+\]
+\end{verbatim}
+\MTversion{times}
+\[
+\renewcommand\MTcommanddigit{{\MTmathchardigit^{\mathcolor{blue}{1}}
+ _{\mathcolor{red}{2}}}}%
+\renewcommand\MTcommanddigiti{{\boxed{\mathbf{\MTmathchardigiti}}}}
+0^0_0
+\]%
+\MTversion{normal}%
+(\cs{boxed} is from \ctanpkg{amsmath}) Let's hope you find better
+usage... recall that you can't use digit $0$ in its redefinition but must use
+\cs{MTcommanddigit}. But you can of course use other digits... except if
+their definitions use the digit $0$ rather than the non-active symbol control
+sequence \cs{MTmathchardigit}.
+See also \MTmathactiveletters and \MTmathactivedigits.
- So far I have briefly described the problem of document active
- characters (see the test file |mathastexttestalphabets.tex| for more
- explanations and illustrations, and the commented source code of the
- package). Pure mathematical activation revealed an incompatibility of
- another type with \ctanpkg{amsmath}. To fix it, \mst now replaces
- an inner macro of \ctanpkg{amsmath}
- (\cs{resetMathstrut@}) with its own version.\\
- \null\hspace{1cm}\fbox{Always load \ctanpkg{amsmath} before \mst.}\\
- Actually this last commandment was already made necessary by the use of the
- text endash to represent the minus sign in math mode, and, especially for
- Unicode engines, some aspects of the \cs{DeclareMathOperator} macro from
- \ctanpkg{amsmath}.
-
- \begin{framed}\kern-.75\baselineskip
- \begin{framed}
- \textbf{Important!} As is mentioned in the section \ref{sec:mathxx},
- after command \MTnonlettersobeymathxx, characters such as
- |?|, or |[|, now represent \emph{two} `tokens' and this will utterly
- confuse \TeX{} if some precautions are not taken. Examples: |$0^+$| or
- |$x\mathrel?y$| or |$R^*$| \emph{must} be input now as |$0^{+}$|
- and, respectively,
- |$x\mathrel{?}y$| or |$R^{*}$|. This is why the package does
- \MTnonlettersdonotobeymathxx by default.
- \end{framed}\vskip-.75\baselineskip
- \end{framed}
- One thing to take note of is that this mechanism uses the \cs{everymath}
- and \cs{everydisplay}, so if it is needed to add to these \TeX{} `token
- lists' some additional things this should be done in a way preserving the
- former contents.
-
- If one issues (after |\begin{document}|) |\everymath={}| and
- |\everydisplay={}| this annihilates not only all the \mst (evil ?) doings
- with math active characters but also everything else some other package
- might have put in these token registers, so it is better, if the need
- arises to cancel the math activation of characters done by \mst to use the
- command \MTeverymathoff, which does all of
- \MTmathoperatorsdonotobeymathxx, \MTnonlettersdonotobeymathxx (already
- default), \MTmathstandardletters, \MTnormalprime, and
- \MTnormalasterisk. This is supposed to be used in a group or
- environment (as there is no |\MTactivemathon|). It must be used prior to
- entering math mode.
-
- \begin{framed}
- \textcolor{magenta}{\bfseries New with 1.3i:} \mst patches |\url| of
- packages \ctanpkg{url} and \ctanpkg{hyperref}, and also |\nolinkurl|, to force them
- to do automatically \MTeverymathoff. Indeed they use math mode, and it
- is better to turn \mst off for their dealings.
- \end{framed}
-
% 2 septembre 2013; finalis 22:58
% Mardi 19 dcembre 2023: l'utilisation de bleu alors que ce n'est
@@ -4503,7 +4217,7 @@ option).
\item \mstcmd{Mathastext} (or \mstcmd{mathastext}) reinitializes \mst: it sets the
fonts used in math mode (in versions |normal| and |bold|) for letters,
digits and a few ascii symbols to the \emph{current} defaults of encoding,
- family, series and shape.\footnote{\texttt{\char92Mathastext} updates also
+ family, series and shape.\footnote{\csb{Mathastext} updates also
the font and shapes for the Greek letters (|LGRgreek| option), and the
skips to be inserted after the symbols $\oldforall$ and $\oldexists$,
see \emph{infra.}} Both the normal and bold math version are modified by
@@ -4517,7 +4231,7 @@ option).
the \LaTeX{} \cs{DeclareMathVersion} macro. \emph{Do not use}
|\string\Mathastext[foo]| \emph{with
|foo| equal to ``normal'' or ``bold'';} this is already taken care of by the
- initial loading of the package or a later command \cs{Mathastext}
+ initial loading of the package or a later command \csb{Mathastext}
without any optional argument. And it will be rejected.}
\item %\textbf{inheritance:}
\csb{Mathastext}\oarg{version\_name}\oarg{parent\_name}
@@ -4553,7 +4267,7 @@ option).
\mstcmd{MTlettershape}\marg{sh}.%
%
\footnote{These commands exist also with
- long names: \texttt{\char92Mathastextencoding},
+ long names: \csb{Mathastextencoding},
etc\dots{} The same applies to the other commands
mentioned in this section.}
%
@@ -4597,7 +4311,7 @@ optional argument) will these commands have any real effect.
of the time of loading the package.} else letters will
have the same shape as used for digits and operator-names.
- Another optional argument may be used as last argument.\RightNote{1.3c}
+ Another optional argument may be used as last argument.\RightNote{\mstrelease{1.3c}}
Similarly as its
use with \Mathastext this makes the declared math version inherit, for
things not modified by \mst like large symbols, the font set up of the math
@@ -4645,7 +4359,7 @@ optional argument) will these commands have any real effect.
redefined). In the absence of the optional argument, the mandatory one is
used. The versions \emph{must} be either |normal|, or |bold|, or previously
declared ones via \Mathastext or \MTDeclareVersion.
- \item the starred variant\RightNote{1.3c} does the math set-up, but changes \emph{nothing} to
+ \item the starred variant\RightNote{\mstrelease{1.3c}} does the math set-up, but changes \emph{nothing} to
the text fonts (see \autoref{sec:mathversions} for a description of the math
set-up, which summarizes
what is done additionally to only using \LaTeX{}'s |\mathversion|).
@@ -4659,7 +4373,7 @@ optional argument) will these commands have any real effect.
option the package checks separately the letter shape for lowercase and
uppercase.
- \RightNote{1.3j}\MTversion also does \MTexistsdoesskip,
+ \RightNote{\mstrelease{1.3j}}\MTversion also does \MTexistsdoesskip,
\MTforalldoesskip, and also \MTprimedoesskip,
\csb{MTmathoperatorsobeymathxx}, except under the |subdued| option for
\emph{normal} and \emph{bold}, in which case it does the opposite actions.
@@ -4668,17 +4382,13 @@ optional argument) will these commands have any real effect.
the |italic| option) combining the |h| letter and the \={ } accent from the
\mst font. Note that \cs{mathrm}|{\hbar}| and \cs{mathbf}|{\hbar}| will
work and that \cs{hbar} does scale in subscripts and exponents. Since
- |1.3u|, this is a priori compatible with all 8bits text font
- encodings\RightNote{1.3u} supporting the |\=| text accent in
+ \mstrelease{1.3u}, this is a priori compatible with all 8bits text font
+ encodings\RightNote{\mstrelease{1.3u}} supporting the |\=| text accent in
the LaTeX way.%
%
-\footnote{\RightNote{1.3u}The horizontal skips for letter |h| from
- \cs{MTsetmathskips} are ignored for \cs{hbar}.% Formerly, a positive
- % ``before'' skip was not properly taken into account for the horizontal
- % positioning of the accent and thus gave a bad result. The user can extend
- % the package \cs{hbar} definition to add skips.
-}
-\footnote{\RightNote{1.3u}The \cs{hbar} redefinition is canceled in normal and
+\footnote{\RightNote{\mstrelease{1.3u}}The horizontal skips for letter |h| from
+ \csb{MTsetmathskips} are ignored for \cs{hbar}.}
+\footnote{\RightNote{\mstrelease{1.3u}}The \cs{hbar} redefinition is canceled in normal and
bold math versions under the |subdued| option.}
\item \mstcmd{fouriervec}: this is a |\vec| accent taken from the Fourier font;
@@ -4687,7 +4397,7 @@ if option fouriervec.
\item \mstcmd{pmvec}: this provides a poor man \cs{vec} accent command, for
upright letters. It uses the right arrow. Does not change
size in subscripts and exponents.
-\item \RLNote{new description:}{1.3za}\mstcmd{Mathnormal}, \mstcmd{Mathrm},
+\item \RLNote{new description:}{\mstrelease{1.3za}}\mstcmd{Mathnormal}, \mstcmd{Mathrm},
\mstcmd{Mathbf}, \mstcmd{Mathit}, \mstcmd{Mathsf}, \mstcmd{Mathtt}: they use the
\mst-ified fonts. By default, \mstcmd{mathnormal}, \mstcmd{mathrm},
\mstcmd{mathbf}, \mstcmd{mathit}, \mstcmd{mathsf}, \mstcmd{mathtt} are redefined
@@ -4707,7 +4417,7 @@ size in subscripts and exponents.
This command is also made available under subdued option in
the ``normal'' and ``bold'' math versions, as \LaTeX\ does not define it a
priori, contrarily to \mathbf and other math alphabet commands.
- \item \RightNote{1.3x}\mstcmd{mathgreekup}: math alphabet, only available
+ \item \RightNote{\mstrelease{1.3y}}\mstcmd{mathgreekup}: math alphabet, only available
under LGRgreek (or LGRgreeks) option, which gives access to `upright'
Greek letters (picked up from a font available in |LGR|-encoding). Note
that the package also defines \cs{alphaup}, \dots, \cs{piup}, \dots\
@@ -4725,7 +4435,7 @@ size in subscripts and exponents.
support as long as suitable usage of \MTgreekfont later on configures a
suitable font).
- \RightNote{1.3za}Also \mstcmd{mathgreekupbold}.
+ \RightNote{\mstrelease{1.3za}}Also \mstcmd{mathgreekupbold}.
\begin{footnotesize}
These math alphabets are also available under subdued option in the
@@ -4764,14 +4474,14 @@ size in subscripts and exponents.
the subdued option anyhow.\par
\end{footnotesize}
-\item \RightNote{1.3x}\mstcmd{mathgreekit}: math alphabet, only available
+\item \RightNote{\mstrelease{1.3y}}\mstcmd{mathgreekit}: math alphabet, only available
under LGRgreek (or LGRgreeks) option, which gives access to `italic'
Greek letters (picked up from a font available in |LGR|-encoding). The
actual shape is configurable via re-defining \MTgreekitdefault and then
redeclaring the math version via \Mathastext (with optional argument if
for a math version other than the ``normal'' one), or \MTDeclareVersion.
- \RightNote{1.3za}Also \mstcmd{mathgreekitbold}.
+ \RightNote{\mstrelease{1.3za}}Also \mstcmd{mathgreekitbold}.
\begin{footnotesize}
See the discussion of \mathgreekup for some \TeX\ hacker level
@@ -4782,13 +4492,6 @@ size in subscripts and exponents.
font for use in math mode. By default, |\imath| and |\jmath| are redefined to use
them. Since \texttt{1.3t}, these macros obey the \texttt{subdued}
regime.
-%
-% \footnote{\RightNote{1.3t}Formerly (i.e.\@ since \texttt{1.12}) \mst
-% redefined the \texttt{\string\i} and \texttt{\string\j} as robust
-% commands usable both in text and math mode and using the above macros
-% in the latter. I have decided it wasn't such a good idea and there is
-% from now on \texttt{1.3t} no such redefinition of \texttt{\string\i}
-% and \texttt{\string\j}!}
\item \mstcmd{MathEuler}, \mstcmd{MathEulerBold}: math alphabets to access
all the glyphs of the Euler font, if option |eulergreek| (or
|eulerdigits| was passed to the package.
@@ -4811,14 +4514,14 @@ all the glyphs of the Euler font, if option |eulergreek| (or
\cs{let}\cs{varepsilon}$=$\cs{epsilon}, etc\dots,
in case only the `variant' form of the letter was used
in the documents.
-\item \hypertarget{symbolmisc}{Miscelleneous mathematical symbols} from the
+\item \hypertarget{symbolmisc}{Miscellaneous mathematical symbols} from the
postscript Symbol font are made available (or replaced) by option
symbolmisc.\footnote{option \blueit{asterisk} is also required to treat the
$*$.
Recall from \autoref{sec:mathxx} that the asterisk in math mode (also
when using the control sequence \cs{ast}) appears then to \TeX{} to be
a composite object.}
- \makeatletter\let\mst@doasterisk\mst@@doasterisk\makeatother They are
+ \MTactiveasterisk They are
\cs{prod}~$\prod$ \cs{sum}~$\sum$ \cs{implies}~$\implies$
\cs{impliedby}~$\impliedby$ \cs{iff}~$\iff$ \cs{shortiff}~$\shortiff$
\cs{to}~$\to$ \cs{longto}~$\longto$ \cs{mapsto}~$\mapsto$
@@ -4864,64 +4567,106 @@ comments).
The timing for actions of \mst falls into three cases:
\begin{enumerate}
-\item things done during the loading of the package, or delayed to
- |\AtBeginDocument|,
+\item things done by \mst itself during its loading (some are delayed to
+ |\begin{document}|),
\item things done as the result of user commands, either in the preamble or in
- the body of the document,
+ the body of the document, (but note that some commands if used in preamble
+ have a real effect only at the time of |\begin{document}|),
\item things done everytime math mode is entered.
\end{enumerate}
-The second category overlaps with the others, as the (preamble) use of some
-commands can have either immediate effect or only trigger some actions in
-|\AtBeginDocument| or perhaps only influence the things done later by \mst
-each time math mode is entered.
-
-The third category deserves some brief additional comments: it mainly (but not
-exclusively) regards the ``math activation'' of characters, and conversely all
-``math activations'' fall into this category. The package re-checks each time
-math mode is entered if some characters have been made in-between catcode
-active, or math active, and takes appropriate decisions: one important aspect
-of this issue is that |babel|'s mechanism for activating character was not, last
-time I checked, very robust against math active characters. I now checked
-again (on January 15, 2016) that
-\begin{verbatim}
- \documentclass{article}
- \usepackage[french]{babel}
- \usepackage{mathtools}\mathtoolsset{centercolon}
- \begin{document}
- $:$
- \end{document}
-\end{verbatim}
-creates an infinite loop (see section \ref{sec:compat} where this was
-mentioned already, some years ago). Thus \mst has (since |1.2e 2013/01/10|) a
-somewhat elaborate mechanism related to these issues (see the code comments),
-installed into the list of things done by \TeX\ systematically each time
-it enters math mode. For some legacy reason the package also puts into
-this list a few other things which could arguably be done elsewhere once and
-for all. The command \csb{MTeverymathoff} cancels all actions done by
-\mst.
+At \mstrelease{1.4}\RLNote{changed:}{\mstrelease{1.4}} a very significant
+change took place: the last category, the one of things done everytime math mode
+is entered, has become \emph{empty}.%
+%
+\footnote{There ia always an exception to a good
+rule, and here it is: only with \LuaLaTeX{} engine, a certain
+command is executed as part of \cs{everymath}. For details see
+\csb{MTfixfonts}.}
+
+The everymath option added at \mstrelease{1.4} re-establishes the legacy
+behavior. Except for ascii letters: they will not even then be made
+mathematically active at each entrance in to math mode, but only once at time
+of package loading (if not subdued) and also when using \MTversion (for
+non-subdued math versions).
+
+\begin{shaded*}
+Under everymath option some commands described here as being usable
+everywhere have in fact an effect only if used externally of math mode.
+The documentation is only accurate for the default \mstrelease{1.4}
+configuration, not for the legacy one as re-enacted by everymath.
+\end{shaded*}
+
+\subsubsection{Expert commands which are preamble-only}
+
+\begin{enumerate}[label=$\bullet$, leftmargin=1em]
+\item \mstcmd{MTgreekupdefault}:\RightNote{\mstrelease{1.3y}} a command with
+ no argument whose expansion specifies, under LGRgreek regime, the
+ shape for the `|up|' Greek control sequences (and for the no-postfix
+ Greek control sequences under upgreek option) in all \mst math
+ versions declared \emph{afterwards} via \cs{Mathastext} or
+ \cs{MTDeclareVersion}. The a priori default for this shape is `|n|'
+ (without the quotes). See
+ \autoref{sec:newgreek}.
+
+ This command can also be defined \emph{prior} to loading the package,
+ as the package itself only does:
+ \centeredline{|\providecommand*\MTgreekupdefault{n}|}
+
+\item \mstcmd{MTgreekitdefault}:\RightNote{\mstrelease{1.3y}} a command with
+ no argument whose expansion specifies, under LGRgreek regime, the
+ shape for the `|it|' Greek control sequences (and for the no-postfix
+ Greek control sequences under itgreek option) in all \mst math
+ versions declared \emph{afterwards} via \cs{Mathastext} or
+ \cs{MTDeclareVersion}. The a priori default for this shape is `|it|'
+ (without the quotes).
+ See \autoref{sec:newgreek}.
+
+ This command can also be defined \emph{prior} to loading the package,
+ as the package itself only does:
+ \centeredline{|\providecommand*\MTgreekitdefault{it}|}
+\end{enumerate}
+
\subsubsection{Expert commands usable everywhere}\label{sec:cmds}
\begin{enumerate}[label=$\bullet$, leftmargin=1em]
+ \item \mstcmd{MTcustomgreek}:\RightNote{\mstrelease{1.3d}} in case \mst has been loaded with one of its
+ Greek related options, this activates the corresponding
+ customization of Greek letters in math mode. It is issued
+ automatically by the package in the preamble (except if loaded with
+ |subdued| option) and at each switch of math version via
+ |\MTversion| or |\MTversion*| (except for the normal and bold math
+ versions in subdued mode). Also available as
+ |\Mathastextcustomgreek|. May be used even inside of math mode.
+
+ \item \mstcmd{MTstandardgreek}:\RightNote{\mstrelease{1.3d}} in case \mst was loaded with one of the Greek
+ related options this command reverts the customization, it resets the Greek
+ letters to their definitions in force at package loading time. Can be used
+ in the preamble, but is mainly for the document body (may even be used
+ inside math mode ...). Done automatically
+ under the |subdued| option when switching to the normal or bold math
+ version. Also available as |\Mathastextstandardgreek|.
+
+
\DeleteShortVerb{\|}%
\item \mstcmd{MTsetmathskips}\marg{a-z|A-Z}\marg{muglue\_before}\marg{muglue\_after}:
%
\MakeShortVerb{\|}%
%
- is\RightNote{1.3a} used to specify extra skips (or rather mu glue) to be
+ is\RightNote{\mstrelease{1.3a}} used to specify extra skips (or rather mu glue) to be
inserted in math mode, before and after a letter. The rationale is that
standard text fonts used in math mode may sometimes cause glyph (near-)
collisions with math symbols, as \TeX{} has some implicit expectations on the
design of fonts for math letters.
- \begin{framed}
+ \begin{snugshade}
These extra skips around letters are set at their natural width and do not
add any stretchability or shrinkability to the math formula as a whole,
nor do they result in extra potential break points.
- \end{framed}
+ \end{snugshade}
Random (silly) examples:
\centeredline{|\MTsetmathskips{x}{\medmuskip}{\thickmuskip}|} \centeredline
@@ -4941,19 +4686,19 @@ for all. The command \csb{MTeverymathoff} cancels all actions done by
\makeatother
\end{verbatim}
- \begin{framed}
+ \begin{snugshade}
\emph{\color{magenta}\bfseries Starting with |v1.3i|:} the extra skips are
\emph{not} applied to the letters within the scope of math alphabet
commands, or the letters from operator names (pre-defined or user
declared).
- \end{framed}
+ \end{snugshade}
{\footnotesize
Note that contrarily to the \csb{MTexistsskip}, \csb{MTforallskip}, and
\csb{MTprimeskip} commands described next, these extra skips (which may be
specified in the preamble) are not recorded in the definition of the math
- version (as defined via \Mathastext with its optional argument or via
- \MTDeclareVersion). The declared skips hold thoughout the document
+ version (as defined via \csb{Mathastext} with its optional argument or via
+ \csb{MTDeclareVersion}). The declared skips hold thoughout the document
until modified or canceled, independently of math versions (of
course, \mst cancels the skips in the normal and bold math versions if
package option \blueit{subdued} was used).\par}
@@ -4967,18 +4712,15 @@ for all. The command \csb{MTeverymathoff} cancels all actions done by
cancels the skips
for that letter (they are not set to |0mu| but completely removed).
-
- % setting the skips to |0mu| which prevents formation of ligatures
- % when the letter is used inside a \cs{mathbf} for example). Example (using a
- % version with upright Latin Modern): \centeredline
- % {|\MTsetmathskips{f}{8mu}{0mu}$gffg\MTunsetmathskips{f}ff\mathbf{ff}$|}
- % gives: \begingroup\MTversion{upright}%
- % \MTsetmathskips{f}{8mu}{0mu}$gffg\MTunsetmathskips{f}ff\mathbf{ff}$\endgroup.
- % The ligature was correctly formed.
-
The argument may be a macro (or any expandable code) expanding to a letter.
+\item \RightNote{\mstrelease{1.3j}}\mstcmd{MTnormalexists}, \mstcmd{MTexistsdoesskip}: the
+ latter (done by default if not |subdued|, and also on each use of
+ |\MTversion| in the body of the document) makes it so that $\oldexists$
+ takes into account the math glue as specified by \MTexistsskip. The
+ former is its opposite.
+
\item \mstcmd{MTexistsskip}\marg{math glue}: specifies the amount of skip or more
generally glue to put after each $\oldexists$ math symbol. Indeed, upright
letters (or digits for that matter) often appear to be positioned a bit too
@@ -4991,17 +4733,13 @@ for all. The command \csb{MTeverymathoff} cancels all actions done by
version (and subsequent ones). One may also use the command at any time in
the document. In the case of the option |subdued|, the skip is canceled in
the \emph{normal} and \emph{bold} math versions.
-%
-% \footnote{\RightNote{1.3j}%
-% Formerly, it was set to |0mu|.}
-%
In the case of the option |italic|, the
default skip is set to zero.
-\item \RightNote{1.3j}\mstcmd{MTnormalexists}, \mstcmd{MTexistsdoesskip}: the
+\item \RightNote{\mstrelease{1.3j}}\mstcmd{MTnormalforall}, \mstcmd{MTforalldoesskip}: the
latter (done by default if not |subdued|, and also on each use of
- |\MTversion| in the body of the document) makes it so that $\oldexists$
- takes into account the math glue as specified by \csb{MTexistsskip}. The
+ |\MTversion| in the body of the document) makes it so that $\oldforall$
+ takes into account the math glue as specified by \MTforallskip. The
former is its opposite.
\item \mstcmd{MTforallskip}\marg{math glue}: the default is to add a |.6667mu| math
@@ -5012,138 +4750,191 @@ for all. The command \csb{MTeverymathoff} cancels all actions done by
be declared} math versions. In the case of the option |subdued|, the skip
is canceled in the \emph{normal} and \emph{bold} math
versions.
-%
-%\footnote{\RightNote{1.3j}Formerly, it was set to |0mu|.}
In the
case of the option |italic|, the default skip is zero for all math versions.
One may use the command at any location in the document.
-\item \RightNote{1.3j}\mstcmd{MTnormalforall}, \mstcmd{MTforalldoesskip}: the
- latter (done by default if not |subdued|, and also on each use of
- |\MTversion| in the body of the document) makes it so that $\oldforall$
- takes into account the math glue as specified by \csb{MTforallskip}. The
- former is its opposite.
+\item \RightNote{\mstrelease{1.3j}}\mstcmd{MTnormalprime},
+ \mstcmd{MTprimedoesskip}: the latter (done by default if not |subdued|,
+ and also on each use of \csb{MTversion} in the body of the document except
+ for the subdued \emph{normal} and \emph{bold} math version) makes it so
+ that $'$ takes into account the math glue as specified by
+ \MTprimeskip. The former is its opposite. In all cases the right quote
+ |'| is a mathematically active character throughout the document producing
+ ${}'$ as is the default in \TeX, it is only its meaning which changes to
+ include or not an extra skip.
+
+ \begin{footnotesize}
+ Even though \MTprimedoesskip is not done in the subdued case, it is
+ \emph{not} a no-op even then in the preamble or in the \emph{normal} and
+ \emph{bold} math versions.\par
+ \end{footnotesize}
-\item \mstcmd{MTprimeskip}\marg{math glue}: the default is to add a |0.5mu| skip
- before the derivative glyph, except for the |italic| option. In the case of
- the option |subdued|, the skip is canceled in the \emph{normal} and
+\item \mstcmd{MTprimeskip}\marg{math glue}: specifies the amount of math
+ skip to add before the derivative glyph. The default iniitial value is
+ |0.5mu|, except with the |italic| option where it is |0mu|. In the case
+ of the option |subdued|, the skip is canceled in the \emph{normal} and
\emph{bold} math versions.
-%
-%\footnote{\RightNote{1.3j}Formerly, it was set to
-% |0mu|.}
-% obsolete et mme faux avec 1.3j
-% \footnote{if \cs{begin\{document\}} is not followed
-% with \cs{MTversion\{normal\}}, the latest values set in the preamble by
-% these commands are used at the beginning of the document,
-% even under option \texttt{subdued}.}
+\item \mstcmd{MTnormalasterisk}, \mstcmd{MTactiveasterisk}: the latter will
+ use for |*| and |\ast| the text font asterisk, suitably lowered; the former
+ if used in the preamble tells \mst to not modify the non-\mst situation, or
+ if used in the body to revert to it. Both are no-op's in absence of option
+ asterisk.
+
+\begin{footnotesize}
+ A legacy feature is that \MTactiveasterisk is \emph{not} a no-op in
+ subdued \emph{normal} or \emph{bold} math versions, and does let the
+ asterisk obey the \MTlowerast configuration, if used explicitly by user
+ (even in the preamble).
+
+ At \mstrelease{1.4}\RLNote{changed:}{\mstrelease{1.4}} \mst checks at
+ |\begin{document}| (or each time \MTaciveasterisk is made use of) if
+ * is a Babel shorthand (which I far as I know is the case of no
+ language) or is already mathematically active. In the latter case the
+ * is not modified in math mode; and it is not modified either if
+ found to be catcode active but not a \ctanpkg{babel} shorthand. In
+ contrast, the \cs{ast} will always be set to obey \MTlowerast
+ configuration after \MTactiveasterisk.
+
+\end{footnotesize}
-\item \mstcmd{MTlowerast}\marg{dimen}: a \cs{raisebox} command is
+\item \mstcmd{MTlowerast}\marg{dimen}: under option asterisk
+ a \cs{raisebox} command is
used to lower the text asterisk to produce a reasonable math
asterisk. The package uses this command initially with
argument |0.3\height|, this will have to be fine-tuned for
each given text font but worked out ok with the fonts we
- tried. Note that the dimension argument will be used also in
+ tried. The dimension argument will be used also in
sub-scripts and sub-sub-scripts, so it is best not to use an
- absolute dimension.
+ absolute dimension. The dimension specification is for text
+ it can not be with |mu| unit.
\item \mstcmd{MTmathoperatorsobeymathxx}, \mstcmd{MTmathoperatorsdonotobeymathxx}: the
former is done by default, it makes operator names obey math alphabets. See
- also section \ref{sec:mathxx}. This functionality \emph{does
+ also \autoref{sec:mathxx}. This functionality \emph{does
{\normalfont\bfseries not} rely}
on ``math active characters''. Automatically issued by each \cs{MTversion},
except under option |subdued| when switching to \emph{normal} or \emph{bold}.
- \item \mstcmd{MTcustomgreek}:\RightNote{1.3d} in case \mst has been loaded with one of its
- Greek related options, this activates the corresponding
- customization of Greek letters in math mode. It is issued
- automatically by the package in the preamble (except if loaded with
- |subdued| option) and at each switch of math version via
- |\MTversion| or |\MTversion*| (except for the normal and bold math
- versions in subdued mode). Also available as
- |\Mathastextcustomgreek|. May be used even inside of math mode.
+\item \mstcmd{MTmathactiveletters}:\RightNote{\mstrelease{1.3}}
+ `math activation' of all ascii Latin
+ letters. This is done by the package automatically except under the
+ subdued option.
- \item \mstcmd{MTstandardgreek}:\RightNote{1.3d} in case \mst was loaded with one of the Greek
- related options this command reverts the customization, it resets the Greek
- letters to their definitions in force at package loading time. Can be used
- in the preamble, but is mainly for the document body (may even be used
- inside math mode ...). Done automatically
- under the |subdued| option when switching to the normal or bold math
- version. Also available as |\Mathastextstandardgreek|.
-\end{enumerate}
-
-\subsubsection{Expert commands which are preamble-only}
-
-\begin{enumerate}[label=$\bullet$, leftmargin=1em]
-\item \mstcmd{MTgreekupdefault}:\RightNote{1.3x} a command with
- no argument whose expansion specifies, under LGRgreek regime, the
- shape for the `|up|' Greek control sequences (and for the no-postfix
- Greek control sequences under upgreek option) in all \mst math
- versions declared \emph{afterwards} via \cs{Mathastext} or
- \cs{MTDeclareVersion}. The a priori default for this shape is `|n|'
- (without the quotes). See
- \autoref{sec:newgreek}.
-
- This command can also be defined \emph{prior} to loading the package,
- as the package itself only does:
- \centeredline{|\providecommand*\MTgreekupdefault{n}|}
-
-\item \mstcmd{MTgreekitdefault}:\RightNote{1.3x} a command with
- no argument whose expansion specifies, under LGRgreek regime, the
- shape for the `|it|' Greek control sequences (and for the no-postfix
- Greek control sequences under itgreek option) in all \mst math
- versions declared \emph{afterwards} via \cs{Mathastext} or
- \cs{MTDeclareVersion}. The a priori default for this shape is `|it|'
- (without the quotes).
- See \autoref{sec:newgreek}.
-
- This command can also be defined \emph{prior} to loading the package,
- as the package itself only does:
- \centeredline{|\providecommand*\MTgreekitdefault{it}|}
-\end{enumerate}
-
-\subsubsection{Expert commands usable only outside of math mode}\label{sec:cmdsoutmath}
+ At \mstrelease{1.4}\RLNote{changed:}{\mstrelease{1.4}} its behavior was
+ modified significantly: instead of setting some toggle obeyed only at
+ entrance of math mode, it acts on the spot immediately.
+\begin{snugshade}
+ Formerly, this command was only a configuration toggle with no immediate
+ impact (and was not usable from inside math mode). Indeed, the \mst work of
+ mathematical activation was done (or not done) \emph{each time} math mode
+ was entered (if not in subdued), and the ascii letters kept standard
+ mathcodes outside of math mode.
+
+ The command now does the mathematical activation on the spot and the meaning
+ of the active shape of the ascii letters --- a priori undefined because
+ typesetting a document with an active ascii letter is near impossible, as no
+ \LaTeX{} command name used in the document can contain it --- is modified
+ here and then; but of course the catcodes are not modified only the
+ mathcodes are. Except if \mst is loaded with the subdued option, this
+ mathematical activation is executed already at package loading time.
+
+ If with the subdued option, the command is inactive in the preamble, as
+ well as in the \emph{normal} and \emph{bold} math versions. In all cases it
+ gets (re-)executed automatically when \MTversion is used for activating a
+ non-subdued math version.
-They are usable only from outside math mode because they act via turning on
-or off the execution, each time math mode is entered, of certain macros added
-by \mst to the \cs{everymath} and \cs{everydisplay} token list variables.
+ \begin{footnotesize}
+ The new situation may be dangerous if the document author makes a letter,
+ say |A|, catcode active at some point, with a definition of the active
+ state using |\string A|. As \mst has (earlier, in the preamble) set |A|
+ to be mathematically active as well, and as the \cs{string} changes
+ nothing to that, an infinite loop will be triggered by such an |A| in math
+ mode.
+
+ But, having an active ascii letter can only be in very localized portions
+ of a document, and only be authored by experts. The experts should
+ carefully make sure the mathcode of the letter is not active if they set
+ the catcode to active and let the active meaning use \cs{string} on the
+ letter itself, thus we can trust that the mathematical activation done
+ earlier by \mst is undone and there will be no problems.\par
+ \end{footnotesize}
-\begin{enumerate}[label=$\bullet$, leftmargin=1em]
+ This \mstrelease{1.4} change may thus need to be followed by some
+ adjustments in some quite special circumstances caused by some expert
+ interventions.
-\item \mstcmd{MTmathactiveletters}: activates the `math activation' of Latin
- letters. This is done by the package during loading, except under the
- |subdued| option.
-%
-% \footnote{\RightNote{1.3j}Formerly, it was also executed
-% from each \cs{Mathastext} in the preamble.}
- It is again executed in the
- body at each \cs{MTversion}, except under the |subdued| option when
- switching to the \emph{normal} or \emph{bold} math versions.
+ See \autoref{sec:mathskips} and \autoref{sec:ic} for the rationale of this
+ mathematical activation, and \autoref{ssec:hackingletters} for ways to
+ use it for other goals.
+\end{snugshade}
+ \begin{footnotesize}
+ If you do want mathematically active letters also in subdued \emph{normal}
+ or \emph{bold} math versions (to apply tricks such as those of
+ \autoref{ssec:hackingletters}) there is \cs{mst@mathactivateletters} which
+ does not check the subdued status.\par
+ \end{footnotesize}
+
+\item \mstcmd{MTmathstandardletters}:\RightNote{\mstrelease{1.3}}
+ turns off the mathematical active
+ ascii letters, i.e.\@ reverts their mathcodes to package font configuration.
+ Here ``standard'' only means
+ that the letters will not be mathematically active, but they are still under the
+ influence of \mst regarding the typeface they use, so they are only
+ ``standard'' from \mst point of view.
+
+ At \mstrelease{1.4}\RLNote{changed:}{\mstrelease{1.4}} its behavior was
+ modified: instead of setting some toggle obeyed only at entrance of math
+ mode, it acts on the spot immediately.
+ \begin{snugshade}
+ \MTmathstandardletters will not try to restore the meaning associated to
+ the catcode active variant of the letter token which may have been in place
+ at the time of \MTmathactiveletters. This meaning is not saved for
+ later reset.
+
+ \emph{Except} if the \emph{letter} was an active Babel-shorthand at the time
+ of \MTmathactiveletters, which is in fact almost impossible to achieve
+ via the \ctanpkg{babel} interface.
+
+ And if the letter was catcode-active due to user action,
+ \MTmathactiveletters will not have made it mathematically active, nor
+ will it have modified its active meaning. So the active meaning may get
+ overwritten only for a letter having a normal catcode at time of
+ \MTmathactiveletters but which for some reason has some meaning
+ associated to its catcode active variant.
+ \end{snugshade}
+
+\item \mstcmd{MTmathactivedigits}:\RLNote{new:}{\mstrelease{1.4}}
+ is a no-op except under option
+ activedigits. It then makes all digits mathematically active and is
+ executed during package loading, except if subdued. It is again executed
+ when entering any non-subdued math version in the document body. See
+ \autoref{ssec:hackingletters} for an example of use.
- The letters are made mathematically active\footnote{the |mathcode|'s are
- only modified at the time of execution of \cs{everymath},
- \cs{everydisplay}.} to insert the extra skips as specified by
- \csb{MTsetmathskips} (see section \ref{sec:mathskips}), and also possibly
- the italic corrections when using upright fonts (see section \ref{sec:ic}).
+ \begin{footnotesize}
+ If you do want mathematically active digits also in subdued \emph{normal}
+ or \emph{bold} math versions (to apply tricks such as those of
+ \autoref{ssec:hackingletters}) there is \cs{mst@mathactivatedigits} which
+ does not check the subdued status.\par
+ \end{footnotesize}
-\item \mstcmd{MTmathstandardletters}: cancels the `math activation' of the letters.
- Must be re-issued after each \csb{MTversion}, but see
- \csb{MTeverymathdefault}.
+\item \mstcmd{MTmathstandarddigits}:\RLNote{new:}{\mstrelease{1.4}}
+ a no-op except under option
+ activedigits. Under this option it resets the digits to their normal
+ mathcodes as configured by the package.
\item \mstcmd{MTicinmath}: this command is executed by default by \mst except in
case of option |subdued| or if the user chosen letter shape is oblique (|it|
or |sl|). It tells \mst to add italic corrections after all letters in math
mode, except within the scope of math alphabets.
-%
-% \footnote{\RightNote{1.3i}%
-% Formerly, italic corrections were added to the (non-oblique) letters of
-% \cs{mathnormal} arguments.}
- This command and the next ones in this item can be used in the preamble as
- well as in the body of the document (in case of |subdued| option, using the
- commands from within the preamble will remain without effect, as the
- document body will start in the subdued normal math version anyhow.) But
- each \cs{MTversion} in the body will re-emit \cs{MTicinmath} (in case of
+ This\RLNote{changed:}{\mstrelease{1.4}}
+ command and the next ones in this item can be used anywhere in the
+ document and even from inside math mode. In case of subdued option, using the
+ command from within the preamble remains without effect, as the
+ document body will start in the subdued normal math version anyhow.
+ Each \cs{MTversion} in the body reemits \cs{MTicinmath} (in case of
non-oblique letter shape), except if the
|subdued| option was used and the chosen math version is \emph{normal} or
\emph{bold}.
@@ -5153,54 +4944,38 @@ by \mst to the \cs{everymath} and \cs{everydisplay} token list variables.
{\footnotesize
- It may theoretically be used from inside math mode, but the included
- \MTmathactiveletters will have an effect only if issued prior to
- entering math mode.
+ The description above about the command not being executed if the letter
+ shape is italic or slanted is not quite right, as it refers only to the
+ act of inserting or not italic correction. The
+ \MTmathactiveletters component is always executed, however it will be a
+ no-op in |subdued| \emph{normal} and \emph{bold}.
\mstcmd{MTnoicinmath}: this command deactivates the package added
italic corrections. It can be used inside as well as outside
- of math mode (or in the preamble of the document).
-
- \mstcmd{MTICinmath}, \mstcmd{MTnoICinmath}: these commands activate the italic
- corrections only for the uppercase letters (but recall that \cs{MTicinmath}
- is done by default, thus this will typically have to follow
- \cs{MTnoicinmath}.)
-
-% obsolte 1.3i
- % Following some decision of the package author whose rationale has been
- % forgotten, afer \cs{MTICinmath} italic corrections for uppercase letters in
- % arguments to all math alphabets (\emph{i.e.} also \cs{mathnormal}) are
- % suppressed (with \cs{MTicinmath} the italic corrections are suppressed
- % inside the scope of math alphabets \emph{except} \cs{mathnormal}.)
- % No italic corrections are explicitly added inside arguments of math
- % alphabets.
+ of math mode (or in the preamble of the document). Note that it does not
+ deactivate the mathematical activation of the ascii letters. Use
+ \MTmathstandardletters for that.
+
+ \mstcmd{MTICinmath}, \mstcmd{MTnoICinmath}: only acts on the uppercase
+ letters. But recall that \cs{MTicinmath} is done by default, thus
+ using italic corrections only for uppercase needs to go via
+ \cs{MTnoicinmath} then \cs{MTICinmath}.
\mstcmd{MTicalsoinmathxx}: this command de-activates the de-activation of
the italic corrections inside the arguments to the math alphabet
- commands.
-% apart from \cs{mathnormal}.
+ commands.
It can be issued inside as well as outside of math mode. Will be effective
only if \MTicinmath or \MTICinmath is in force.
-% obsolte 1.3i
- % \footnote{it is provided
- % for the \mst defined math alphabet \cs{mathnormalbold} which
- % contrarily to \cs{mathnormal} is not treated apart from the other
- % math alphabets.}
To cancel its effect either enclose it in a group or
environment or re-issue \MTicinmath after it.
}
-\item \mstcmd{MTnormalasterisk}, \mstcmd{MTactiveasterisk}: the latter will use for |*|
- and |\ast| the text font asterisk, suitably lowered; the former tells \mst
- to not modify the \LaTeX\ default. Both are no-op without option
- asterisk.
-
\item \mstcmd{MTeasynonlettersobeymathxx}, \mstcmd{MTeasynonlettersdonotobeymathxx}: the
former is done by default, it makes characters \verb+.+, \verb+/+, \verb+|+,
\verb+\+, \verb+#+, \verb+$+, \verb+%+, and \verb+&+
(if not excluded by package options) obey math alphabet commands. See also
- section \ref{sec:mathxx}. This functionality does \emph{not} make the
+ \autoref{sec:mathxx}. This functionality does \emph{not} make the
characters ``math active'' (but it does modify |\mathcode|'s, naturally).
\item \mstcmd{MTnonlettersobeymathxx}, \mstcmd{MTnonlettersdonotobeymathxx}: the former
@@ -5213,105 +4988,110 @@ by \mst to the \cs{everymath} and \cs{everydisplay} token list variables.
it will have to be coded |$a^{!}$|. Hence, by default, the package does
\MTnonlettersdonotobeymathxx.
- \begin{framed}
- Under |subdued| option, \cs{MTnonlettersobeymathxx} effect is of course
- canceled in the \emph{normal} and \emph{bold} math versions; but please
- note that when switching back to a non-subdued math version it will be
- mandatory to issue again \cs{MTnonlettersobeymathxx} explicitly if its
- effect is to be re-activated.
-
- In particular, executing \cs{MTnonlettersobeymathxx} in the preamble or at
- the start of the document body serves nothing, because the document is in
- the subdued \emph{normal} math version regime then. It must thus be
- executed after the first usage of \cs{MTversion} switching to a
- non-subdued math version, and again on each successive exit from the
- \emph{normal} or \emph{bold} math versions.
- \end{framed}
-
\item \mstcmd{MTexplicitbracesobeymathxx}: extends an earlier \MTnonlettersobeymathxx
to also treat \verb|\{| and \verb|\}|. But then |\left\{|, |\right\}| must
be coded |\left\lbrace|, |\right\rbrace| rather. There is also
\mstcmd{MTexplicitbracesdonotobeymathxx}.
-\item \RightNote{1.3j}\mstcmd{MTnormalprime}, \mstcmd{MTprimedoesskip}: the latter (done by default if not
- |subdued|, and also on each use of \csb{MTversion} in the body of the document
- except for the |subdued| \emph{normal} and \emph{bold} math version)
- makes it so that $'$ takes into account the math glue as specified by
- \csb{MTprimeskip}. The former is its opposite. In all cases the right quote
- |'| is a mathematically active character producing ${}'$ as is the default
- in \TeX, it is only its meaning which changes to include or not an extra
- skip. For some (legacy) reason, this change of meaning is done anew
- by \mst each time math mode is entered. The commands of this item are thus
- no-op from inside math mode.
-
-
-\item \RightNote{1.3j}\mstcmd{MTeverymathdefault}: this hook is executed by
- \csb{MTversion}\marg{version\_name}, except under option |subdued|
- when switching to the \emph{normal} or \emph{bold} math versions. Its
+\item \RightNote{\mstrelease{1.3j}}\mstcmd{MTeverymathdefault}: this hook is executed by
+ \csb{MTversion}\marg{version\_name} (but if under option |subdued|
+ and switching to the \emph{normal} or \emph{bold} math version its default
+ effect is overruled by an \MTeverymathoff executed after it). Its
default meaning is:
\begin{verbatim}
\MTactiveasterisk % this has no effect without option asterisk
\MTprimedoesskip % this makes prime glyph obey extra space
\MTeasynonlettersobeymathxx
- \MTicinmath % this does \MTmathactiveletters, hence also skips from
- % \MTsetmathskips are obeyed.
+ \MTicinmath % this does \MTmathactiveletters, hence the extra
+ % skips from \MTsetmathskips are obeyed.
+ \MTmathactivedigits % this is a no-op in absence of option activedigits
\MTfixfonts % only operant under LuaLaTeX.
\end{verbatim}
- {\footnotesize Notice that under |subdued| option, switching to the
+ {\footnotesize Under |subdued| option, switching to the
\emph{normal} or \emph{bold} version does \csb{MTeverymathoff} which
- includes \cs{MTnonlettersdonotobeymathxx}.
+ includes \MTnonlettersdonotobeymathxx.
The default
\MTeverymathdefault which is issued when going back to a
non-\emph{normal} or \emph{bold} math version doesn't do
- \cs{MTnonlettersobeymathxx}: thus it is up to the user to correct this if
- needed (no issue without |subdued| option).
+ \MTnonlettersobeymathxx: thus it is up to the user to correct this if
+ desired.
Notice also that \csb{MTversion}\marg{version\_name}, except for \emph{normal}
or \emph{bold} if |subdued| does \csb{MTforalldoesskip} and
\csb{MTexistsdoesskip}, which are not included in \cs{MTeverymathdefault}
-actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
+actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par
-\item \RightNote{1.3j}\mstcmd{MTeverymathoff}: does \MTnormalasterisk,
+At \mstrelease{1.4}, the name of this command diverges somewhat from its
+action as mathematical activation of ascii letters (or, optionally, of digits)
+will happen on the spot and not during \cs{everymath} or \cs{everydisplay}
+execution.\par
+}
+
+\item \RightNote{\mstrelease{1.3j}}\mstcmd{MTeverymathoff}: does \MTnormalasterisk,
\MTnormalprime, \MTnonlettersdonotobeymathxx,
- \MTeasynonlettersdonotobeymathxx, \MTmathstandardletters and
+ \MTeasynonlettersdonotobeymathxx, \MTmathstandardletters,
+ \MTmathstandarddigits\RightNote{\mstrelease{1.4}} and
\MTdonotfixfonts.
- {\footnotesize \RightNote{1.3i}The commands
- |\url/\nolinkurl| of package |hyperref| and |url| from |url.sty| (which
+ Automatically done by \csb{MTversion}|{normal}| (or |{bold}|) under option |subdued|
+ (and
+ also \csb{MTnormalexists} and
+ \csb{MTnormalforall} are executed then).
+
+
+ {\footnotesize \RightNote{\mstrelease{1.3i}}The commands
+ |\url/\nolinkurl| of package |hyperref| and |\url| from |url.sty| (which
use math mode under the hood) are patched by \mst to do \MTeverymathoff
automatically: this is needed because \mst modifies anew some mathcodes
\emph{each time math mode is entered,} hence may overwrite to some extent
- the specific preparation done by |{url,hyperref}.sty|.
- % {\parfillskip0pt\hfill
- % \rlap{\kern10pt\textcolor{magenta}{\bfseries New! (1.3i)}}\par}
+ the specific preparations done by |{url,hyperref}.sty|.
+
+ \RightNote{\mstrelease{1.4}}However, in some cases it may be interesting to
+ be able to apply hacks as described in \autoref{ssec:hackingletters}.
+ You can use now \MTeverymathoff as a hook inside
+ |\url| and |\nolinkurl| commands. Perhaps redefine it (locally) to do
+ all of the above except \MTmathstandardletters and/or
+ \MTmathstandarddigits, and use the \autoref{ssec:hackingletters}
+ instructions to achieve special effects for some letters or digits in
+ the URLs rendered via |\url| and |\nolinkurl|.
+ \par
+ }
+
+\end{enumerate}
- Automatically done by \csb{MTversion} under option |subdued|
- if switching to the \emph{normal} or \emph{bold} math versions; and
- \csb{MTversion} then does also \csb{MTnormalexists} and
- \csb{MTnormalforall}.
-\par}
+\subsubsection{Expert commands usable only outside of math mode}\label{sec:cmdsoutmath}
+
+There is only one pair of commands here: \MTfixfonts and \MTdonotfixfonts.
+They are operant only under \LuaLaTeX{}. As \MTeverymathdefault and
+\MTeverymathoff use them, they arguably could have been listed here, but
+only for engine \LuaLaTeX{}.
\small
-\item \RightNote{1.3o}\mstcmd{MTfixfonts}: this is operant only under
+\begin{enumerate}[label=$\bullet$, leftmargin=1em]
+
+\item \RightNote{\mstrelease{1.3o}}\mstcmd{MTfixfonts}: this is operant only under
\LuaLaTeX{}. It has the effect that each time math mode is entered macro
\csb{MTfixmathfonts} will be executed. The latter forces so-called |base|
mode for the used text font in math mode, in an effort to (only partially,
see code comments) fix the fact that OpenType features such as Lining
Figures were in some cases not being applied in math mode when one uses text
fonts there (text fonts are declared by \LuaTeX+|luaotfload| to use |node|
- mode, which is non-functional in math.) It is invoked automatically by the
+ or |harf| mode, which are non-functional in math.) It is invoked automatically by the
package (except for |normal| and |bold| math versions under |subdued|
option), and in normal situations, there is no reason to use it directly.
+ \RLNote{changed:}{\mstrelease{1.4}}The hack was updated at \mstrelease{1.4}
+ in order to also handle fonts using |Renderer=HarfBuzz|.
+
% pas envie de perdre mon temps l-dessus. D'ailleurs peut-tre dj pour
% commencer bm ne fonctionne pas avec fontes OpenType.
% Notice (not tested) that package |bm| is presumably not compatible.
-\item \RightNote{1.3o}\mstcmd{MTdonotfixfonts}: cancels the job of
+\item \RightNote{\mstrelease{1.3o}}\mstcmd{MTdonotfixfonts}: cancels the job of
|\MTfixfonts|. Done automatically in subdued mode when in the |normal| or
|bold| math version; in normal contexts, there is no reason to use this
command. Only operant under \LuaLaTeX.
@@ -5321,17 +5101,19 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
\subsubsection{Expert commands usable only in math mode}
\begin{enumerate}[label=$\bullet$, leftmargin=1em]
-{\small
-\item\RightNote{1.3p}%
+
+\item\RightNote{\mstrelease{1.3p}}%
\mstcmd{MTfixmathfonts}: this used to be an internal package macro
- but it is given a public name at |1.3p| because I discovered that
+ but it is given a public name at \mstrelease{1.3p} because I discovered that
|$..\hbox{\mathversion{foo}$..$}..$| causes an
issue and one needs to invoke again \cs{MTfixmathfonts} \emph{after} the
\verb|\hbox|, for some reason. To be used \emph{only} under \LuaLaTeX{} and only for
such rare cases where it may be needed.\par
-}
+
\end{enumerate}
+\normalsize
+
\section{Package options}
\subsection{Summary of main options}
@@ -5388,7 +5170,8 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
roughly by themes. So, objectively, the best for the diligent reader is to
read thoroughly all descriptions.
\begin{enumerate}[label=$\bullet$, leftmargin=1em]
- \item \mstopt{basic}: only mathastextify letters and digits.
+ \item \mstopt{basic}: only mathastextify (ascii) letters and digits. Can
+ be combined with either nodigits or noletters.
\item \mstopt{subdued}: acts in a subdued way, which means that the \LaTeX\
``normal'' (default) and ``bold'' (triggered by \cs{boldmath} or
\cs{mathversion}|{bold}|, undone by \cs{unboldmath} or on exit from a
@@ -5410,10 +5193,10 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
handles Greek letters, also lowercase (but not uppercase) Greek
letters will use this a priori italic shape except if some other
option such as \blueit{upgreek} was used.%
- \footnote{Since \texttt{1.3x}, in presence of the \blueit{LGRgreek}
- option in addition to \blueit{italic}, the \cs{MTgreekitdefault}
+ \footnote{Since \texttt{1.3y}, in presence of the \blueit{LGRgreek}
+ option in addition to \blueit{italic}, the \csb{MTgreekitdefault}
shape is then used for lowercase Greek letters and
- \cs{MTgreekupdefault} for uppercase.}
+ \csb{MTgreekupdefault} for uppercase.}
\item \mstopt{frenchmath}: configures the lowercase Latin letters to use
italic shape (\cs{itdefault}), and uppercase Latin letters to be in
same shape as for digits and operator names (i.e.\@ a priori
@@ -5424,8 +5207,8 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
and uppercase Greek letters will use the same shape as
operator names, except if some other option such as \blueit{itgreek}
was used.%
- \footnote{Under \blueit{LGRgreek} and since |1.3x|, the
- \cs{MTgreekupdefault} is used for Greek letters if no other option
+ \footnote{Under \blueit{LGRgreek} and since \mstrelease{1.3y}, the
+ \csb{MTgreekupdefault} is used for Greek letters if no other option
such as \blueit{itgreek} was employed.}
\begin{snugshade}
@@ -5434,9 +5217,7 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
be in the same shape as the one for digits and operator
names) is \textbf{not} undone in the subdued ``normal''
and ``bold'' math versions. It holds throughout the
- document, but math versions declared by \mst may use
- \MTshape and \MTlettershape to, in effect, obtain
- whatever configuration is desired.
+ document.
As a bonus, note that doing
\centeredline{|\usepackage[basic,subdued,frenchmath]{mathastext}|}
@@ -5490,7 +5271,7 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
%\end{footnotesize}
-\item \mstopt{defaultalphabets}: \RLNote{new behavior}{1.3za}\mst
+\item \mstopt{defaultalphabets}: \RLNote{new behavior}{\mstrelease{1.3za}}\mst
always defines \cs{Mathnormal}, \cs{Mathrm}, \cs{Mathbf} etc... to
refer to the \mst-ified text fonts, and redefines the math
alphabets \cs{mathrm}, \cs{mathit}, \cs{mathtt} etc\dots{} (but
@@ -5501,22 +5282,22 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
be available whether or not this option is made use of.
\begin{footnotesize}
- Prior to |1.3za| (and since |1.15f|), this option also prevented the
+ Prior to \mstrelease{1.3za} (and since \mstrelease{1.15f}), this option also prevented the
package to declare the \cs{Mathnormal} et al.\@ and \cs{mathnormalbold}
commands. In this context, recall that the dreaded ``too many math
alphabets'' error can only occur on \emph{use} in the document of too many
of such commands, and not at the time of their declarations. The author's
- notes from time of |1.15f| release (|2012/10/25|) only say that it may not
+ notes from time of \mstrelease{1.15f} release (|2012/10/25|) only say that it may not
be ``useful'' to package user to have both (for example) |\mathrm| and
|\Mathrm|, which sounds weird if they are to acquire distinct meanings.
- So since |1.3za| both will exist. In the default package configuration
+ So since \mstrelease{1.3za} both will exist. In the default package configuration
|\mathrm| is configured to expand to |\Mathrm| (with some extra behavior
under LGRgreek+), and with this option or the defaultrm option
|\mathrm| is kept with its original meaning (and the LGRgreek+ extras do
not work).\par
\end{footnotesize}
-\item \RLNote{changed:}{1.3za}\mstopt{defaultnormal}, \mstopt{defaultrm},
+\item \RLNote{changed:}{\mstrelease{1.3za}}\mstopt{defaultnormal}, \mstopt{defaultrm},
\mstopt{defaultbf}, \mstopt{defaultit}, \mstopt{defaultsf},
\mstopt{defaulttt}: tell \mst to not set up, respectively, the
\cs{mathnormal}, \cs{mathrm}, \cs{mathbf}, \cs{mathit}, \cs{mathsf}, and
@@ -5524,11 +5305,11 @@ actions as they are not related to \cs{everymath} and \cs{everydisplay}.\par}
always via \cs{Mathnormal}, \cs{Mathrm}, \cs{Mathbf}, \cs{Mathit}, etc...
\begin{footnotesize}
- Prior to |1.3za| these options also prevented the creation of the
+ Prior to \mstrelease{1.3za} these options also prevented the creation of the
corresponding \mst command with an uppercased initial.\par
\end{footnotesize}
-\item \mstopt{ncccomma}:\RightNote{1.3x} it triggers the loading of the
+\item \mstopt{ncccomma}:\RightNote{\mstrelease{1.3y}} it triggers the loading of the
\ctanpkg{ncccomma} package%
%
\footnote{Alexander I. \textsc{Rozhenko}, \emph{Use comma as decimal
@@ -5553,8 +5334,8 @@ those parts of the document using another language than French.%
reenact it. For background on this issue see
\url{https://github.com/latex3/babel/issues/190}.
- This does not apply to \ctanpkg{decimalcomma} |1.3| or later.}
-\item \mstopt{decimalcomma}:\RightNote{1.3zb} it triggers the loading of the
+ This does not apply to \ctanpkg{decimalcomma} \mstrelease{1.3} or later.}
+\item \mstopt{decimalcomma}:\RightNote{\mstrelease{1.3zb}} it triggers the loading of the
\ctanpkg{decimalcomma} package%
%
\footnote{Antoine \textsc{Missier}, \emph{Comma for decimal numbers},
@@ -5565,7 +5346,7 @@ The same remarks apply as for the ncccomma option. In particular \emph{note
\emph{\texttt{decimalcomma}}, the correct way is to use the eponymous
option.}
-\item \mstopt{binarysemicolon}:\RightNote{1.3x} sets (except if
+\item \mstopt{binarysemicolon}:\RightNote{\mstrelease{1.3y}} sets (except if
\blueit{nopunctuation} is used) the semi-colon to let \TeX\ use
spacing of binary type, not punctuation type, around the semi-colon
(it is often used in French mathematical typesetting as separator in
@@ -5575,12 +5356,12 @@ The same remarks apply as for the ncccomma option. In particular \emph{note
The effect applies to all math versions, even the \emph{normal} and
\emph{bold} math versions with \mst having been loaded with the
\blueit{subdued} option.
-\item \mstopt{frenchmath*}:\RLNote{CHANGED!}{1.3zb} does all three of \blueit{frenchmath},
+\item \mstopt{frenchmath*}:\RLNote{CHANGED!}{\mstrelease{1.3zb}} does all three of \blueit{frenchmath},
\blueit{decimalcomma} and \blueit{binarysemicolon}.
\begin{footnotesize}
- Prior to |1.3zb|, this option did what is now available via frenchmath+.
- The |1.3zb|
+ Prior to \mstrelease{1.3zb}, this option did what is now available via frenchmath+.
+ The \mstrelease{1.3zb}
change was made as a follow-up consecutive to the |2.7| release \ctanpkg{frenchmath}.
Indeed this option as explained in \autoref{ssec:frenchmath} is provided as
a compatiblity layer with \ctanpkg{frenchmath}, and it was mandatory to
@@ -5588,20 +5369,75 @@ The same remarks apply as for the ncccomma option. In particular \emph{note
consecutive to the internal change of \ctanpkg{frenchmath} at its |2.7|
release to use \ctanpkg{decimalcomma}.\par
\end{footnotesize}
-\item \mstopt{frenchmath+}:\RightNote{1.3zb} does all three of \blueit{frenchmath},
+\item \mstopt{frenchmath+}:\RightNote{\mstrelease{1.3zb}} does all three of \blueit{frenchmath},
\blueit{ncccomma} and \blueit{binarysemicolon}. This is what used to be
- called frenchmath* prior to |1.3zb|.
+ called frenchmath* prior to \mstrelease{1.3zb}.
\item \mstopt{endash}, \mstopt{emdash}: use the text font en-dash (\textendash) or even
the em-dash (\textemdash, but this seems crazy) for the minus sign
rather than {}-{}. endash option is default for the package.
-\item \mstopt{unicodeminus}:\RightNote{1.3q} use the |MINUS SIGN U+2212| (requires
+\item \mstopt{unicodeminus}:\RightNote{\mstrelease{1.3q}} use the |MINUS SIGN U+2212| (requires
\ctanpkg{fontspec}.) Or, in the form |unicodeminus=HHHH| with four \emph{uppercased}
hexadecimal digits: use the |U+HHHH| code point. As noendash really means
``use the hyphen from the text font'', unicodeminus remains without effect
under it, or, naturally, under nominus. Without this option,
\mst uses the |EN DASH U+2013| by default for OpenType fonts.
-\item \mstopt{asterisk}: use the text font (or the Symbol font) asterisk in math mode.
-\item \mstopt{nohbar}: prevents \mst from defining its own
+\item \mstopt{asterisk}: this tells \mst to replace the binary math operator $*$
+ and the control sequence \cs{ast} with versions which uses the text asterisk
+ * suitably lowered, and with the correct spaces around it as binary
+ operator. The amount of lowering%
+%
+\footnote{With the option
+ \texttt{symbolmisc}, the asterisk is picked from the Symbol font, and the
+ amount of lowering is non-customizable; however if a math alphabet command
+ is used, the asterisk is then again from a text font and the lowering will
+ be as specified by \cs{MTlowerast}.}
+%
+ is decided by the mandatory argument to the command
+ \csb{MTlowerast}\marg{dimen}. The package does
+ \cs{MTlowerast}|{.3\height}|. Using the |ex| unit as in
+ \cs{MTlowerast}|{.5ex}| is not a good idea as it does not scale properly in
+ the script and scriptscript styles.
+
+ Attention that if using this option, inputs such as |$R^*$| or |$R^\ast$|
+ raise errors and \emph{must} be replaced by |$R^{*}$|, respectively
+ |$R^{\ast}$|. The $*$ is now `mathematically active'\thinspace%
+%
+\footnote{In
+ a hopefully safe way, for example {\ttfamily\$\string\label\{eq*1\}\$} is
+ ok.}
+%
+ and |*| and |\ast| will obey the math alphabet
+ commands (see \autoref{sec:mathxx}).
+
+\item \mstopt{activedigits}:\RLNote{new:}{\mstrelease{1.4}}
+ it makes all digits mathematically active! This is
+ reserved to expert \LaTeX{} users. See \autoref{ssec:hackingletters} for an
+ example. Do not use this option if you don't intend to make use of such
+ techniques to achieve special effects at some location of your document at
+ least. (I know this goes without saying, but passing this option and not
+ using it is only adding overhead to all your equations with digits).
+
+\item \mstopt{nodigits}: no \mst-ification of digits.
+\item \mstopt{noletters}:\RLNote{new:}{\mstrelease{1.4b}}
+ This is quite antithetical to the package core aim, but here you go.
+
+ \begin{footnotesize}
+ This option implies nohbar and defaultimath.
+
+ Note though that \mst will still declare to \LaTeX{} two extra symbol
+ fonts and define alphabet commands such as \Mathrm, \Mathnormal and
+ \mathnormalbold which map to them. But ascii letters will if not in
+ arguments of these commands not use the \mst-font and all business of
+ active letters (see \autoref{ssec:hackingletters}) is now irrevocably
+ inaccessible.
+
+ If you simply want to avoid the overhead of math active
+ letters, use rather \MTmathstandardletters in the preamble after having
+ loaded the package (although this does not undo the fact that \mst will
+ have redefined what a letter does if it is catcode active but that remark
+ should have been made in an even smaller typeface).\par
+ \end{footnotesize}
+ \item \mstopt{nohbar}: prevents \mst from defining its own
\cs{hbar}.
\item \mstopt{noendash}: the minus sign will be the - from the
text font, not the en-dash \textendash.
@@ -5616,7 +5452,7 @@ The same remarks apply as for the ncccomma option. In particular \emph{note
\ \mstopt{nopunctuation} ,\,.\,:\,;\ \mstopt{noplus},
\mstopt{nominus}, \mstopt{noplusnominus}\ +\,\textendash{} \mstopt{noequal} =\
\mstopt{noparenthesis} (\,)\,[\,]\,/\ \mstopt{nospecials}
-\#\,\$\,\%\,\&\ and \mstopt{nodigits}.
+\#\,\$\,\%\,\&\ (and nodigits and noletters mentioned earlier).
\item \mstopt{alldelims}: true by default, means that the
characters excluded by nolessnomore are
treated. Use this option in case of a mono-width
@@ -5690,7 +5526,7 @@ Euler font.
declared |\alphaup|, |\alphait|, ...., and the
associated \mathgreekup
and \mathgreekit commands to access the underlying fonts, and also since
- |1.3za| \mathgreekupbold and \mathgreekitbold.
+ \mstrelease{1.3za} \mathgreekupbold and \mathgreekitbold.
The font used by these math
alphabet commands in the subdued ``normal'' and ``bold'' is either
@@ -5699,7 +5535,7 @@ Euler font.
\MTgreekfont when the command \Mathastext (without
optional argument) was used in the preamble.
- |1.3za| fixes here a bug which froze the target font to be
+ \mstrelease{1.3za} fixes here a bug which froze the target font to be
the one at time of loading the package: this bug applied
(only) to the subdued ``normal'' and ``bold'' math versions
and was not readily visible as there is a priori no reason to
@@ -5716,7 +5552,7 @@ Euler font.
LGRgreek and then \MTgreekfont manually appropriately.
\item \mstopt{LGRgreek+} and
- \mstopt{LGRgreeks+}:\RightNote{1.3za} they extend
+ \mstopt{LGRgreeks+}:\RightNote{\mstrelease{1.3za}} they extend
respectively LGRgreek or LGRgreeks to let Greek letters
control sequences when in the scope of \mathrm, \mathit,
and \mathbf behave as would be expected by LaTeX users who
@@ -5747,7 +5583,7 @@ Euler font.
accents. As in vanilla \LaTeX{}, they are taken from the font
for the digits and \cs{log}-like names. Obey the alphabet
changing commands.
- \item \mstopt{unimathaccents}:\RightNote{1.3u} extends |mathaccents| to
+ \item \mstopt{unimathaccents}:\RightNote{\mstrelease{1.3u}} extends |mathaccents| to
OpenType fonts. Gave bad results in my brief testing.
\item \mstopt{defaultimath}: do not overwrite \cs{imath} and
\cs{jmath} to use \cs{inodot} and \cs{jnodot}.
@@ -5756,7 +5592,29 @@ OpenType fonts. Gave bad results in my brief testing.
\item \mstopt{fouriervec}: provides a \cs{fouriervec} command. The user can then
add in the preamble \cs{let}\cs{vec}$=$\cs{fouriervec}. There is also
always available a ``poor man'' vec accent \cs{pmvec} for upright letters.
- \end{enumerate}
+\item \mstopt{everymath}:\RLNote{new:}{\mstrelease{1.4}} this option tells
+ \mst to employ as in the \mstrelease{1.3} releases the
+ \cs{everymath}/\cs{everydisplay} registers to store certain actions to be
+ executed at each entrance into math mode. The main change with
+ \mstrelease{1.4} is that mathcode changes done by user (or possibly via
+ language changes in a multilingual \ctanpkg{babel} context) in the document
+ body, and which apply to those characters which \mst used to handle as part of
+ \cs{everymath}/\cs{everydisplay}, will now have an effect, whereas with
+ earlier releases or this one
+ with the everymath option, they may get overruled by \mst. Use
+ everymath for backward compatibility if needed (and \emph{only} if needed).
+ Notice though that regarding ascii letters, there is no return to the
+ pre-\mstrelease{1.4}: they will not acquire their mathcode active status only
+ at each entrance into math mode, even with this option,
+ but once and for all at package loading time, if not subdued, or when using
+ \MTversion to enter a non-subdued math version.
+
+ Please report breakages due to the \mstrelease{1.4} release, which made it
+ necessary for you to use this option everymath as workaround.
+
+ The option is destined to be removed at next major release and it will warn
+ the user about this.
+\end{enumerate}
Thanks to Kevin~\textsc{Klement}, Tariq~\textsc{Perwez}
and Ricard~\textsc{Torres} for sending bug reports and feature requests when
@@ -5780,6 +5638,7 @@ Numerous examples will be found there:\\
\label{sec:changelog}
\begingroup
+\hyphenation{Lua-La-TeX}
\def\MacroFont{\footnotesize\normalfont}
% utilis par verbatim en classe scrdoc (ou plutt shortvrb)
@@ -5817,16 +5676,27 @@ Numerous examples will be found there:\\
\lccode`\~`1
\lowercase{\endgroup\def~}{\ifvmode\medskip\expandafter\@DTXLOGhelper\fi 1}
+% 2024/07/10 hypertargets pour \mstrelease (import de etoc, et j'ai dj ici
+% toute une infrastructure rendant le truc trivial avec un fol 1 actif). Par
+% contre j'ai fait une modification s/#1\[/#1 \[/ car le #1 avant se terminait
+% par un espace.\]\]
+% Et attention au detokenize...
+% Il y a juste un problme avec le cas "1.15f and 1.15g".
\begingroup
\catcode`\| 0
\catcode`\\ 12
-|long|gdef|@DTXLOGhelper #1 ----#2|par{|@@DTXLOGhelper #1\[\]|par}
-|long|gdef|@@DTXLOGhelper #1\[#2\]#3|par%
- {|textbf{#1}% le #1 ici contient un espace
+% Je rduis --- ici.
+|long|gdef|@DTXLOGhelper #1 ---#2|par{|@@DTXLOGhelper #1 \[\]|par}
+|long|gdef|@@DTXLOGhelper #1 \[#2\]#3|par%
+ {|hypertarget{|detokenize|expandafter{|fixonexv#1 and|relax}}{|textbf{#1}} %
|ifx|relax #2|relax|else [#2]|fi
|par|nopagebreak}
|endgroup
+% uniquement pour s'occuper de "1.15f and 1.15g" et en profitant du fait qu'il
+% n'y a de rfrence 1.15g nulle part.
+\def\fixonexv#1 and#2\relax{#1}
+
\catcode`-=\active
\def-{%
\catcode`M\active
@@ -5869,7 +5739,7 @@ Numerous examples will be found there:\\
\StopEventually{\end{document}\endinput}
\cleardoublepage
-\newgeometry{hmarginratio=3:2}
+\newgeometry{hmarginratio=2:1}
\small
\section{Implementation}
@@ -5884,27 +5754,44 @@ Numerous examples will be found there:\\
%
%</dtx>
%<*package>
-% The usual catcode regime for letters and digits is assumed and some characters
-% such as |*|, |`|, |"|, |=| are supposed to be of catcode other at the time of loading
-% of \mst. The source of \mst takes precautions for some other characters such
-% as the right quote |'|, which may thus be active with no harm at the time of
-% loading. By the way, I think \LaTeX2e should have provided to authors a
+% The comments are a kind of palimpsest. Indeed they are not destined to the
+% reader but to the author: when coming back to the source code perhaps years
+% after having last looked at it, all bits of past information even if
+% obsolete are useful. Not only comments but perhaps also some ancient parts
+% of the code itself are a bit strange (the author hardly new any \LaTeX{} at
+% that time).
+%
+% For about the same reason, there may be some long macro names which do not
+% fit in the margins and that one sees only partially. The author sometimes
+% has used a workaround to hyphenate, but not systematically. Life is
+% time-limited. At \mstrelease{1.4} large chunks of code have been re-ordered
+% but the global architecture is still somewhat of a mess and doing some such
+% large diffs makes it sometimes difficult to follow small bits of code across
+% commit history, so this is done reluctantly.
+%
+% The usual catcode regime for letters and digits is assumed and some
+% characters such as |*|, |`|, |"|, |=| are supposed to be of catcode other at
+% the time of loading of \mst. The source of \mst takes precautions for some
+% other characters such as the right quote |'|, which may thus be active with
+% no harm at the time of loading (note added |2024/07/16|: very hard to
+% understand why I was so paranoid, but I have kept this annoying constraint).
+%
+% By the way, I think \LaTeX2e should have provided to authors a
% standard macro to be used at the beginning of a style file to make sure the
% catcodes are standard. Shorthands created by Babel should be mostly no problem
% as Babel does the activation only at the |\begin{document}|.
%
-% The comments have been accumulating through successive versions with only
-% partial efforts to achieve some sort of coherence; as a result some are a
-% bit strange or obsolete to various degrees. And the similar remark
-% applies to some ancient parts of the code itself!
-%
-% Should I require |2005/12/01| \LaTeX? (not sure about the month).
+% \mstrelease{1.4} removes a few code branches still there for support to
+% old \LaTeX{} and requires \LaTeX{} |2020-02-02| (which made |\{| and |\}|
+% \cs{protected}; earlier release |2019-10-01| had math macros such as the
+% math accents and \cs{hbar} robust and so far we kept supporting both new and
+% old contexts).
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}[2020/02/02]
\ProvidesPackage {mathastext}
- [2023/12/29 v1.3zb Use the text font in math mode (JFB)]
+ [2024/07/27 v1.4b Use the text font in math mode (JFB)]
% \end{macrocode}
-% |1.3zb| avoids writing \mst info messages also to console output, only log file.
+% \mstrelease{1.3zb} avoids writing \mst info messages also to console output, only log file.
% Make prefix occupy 20 not 25 characters for alignment with \texttt{LaTeX Font Info},
% as the latter often issues info messages. For similar reason the usages of
% \cs{PackageInfo} will be done with empty lines above and below for better visual
@@ -5915,16 +5802,9 @@ Numerous examples will be found there:\\
\immediate\write\m@ne{}
\PackageInfo{mathastext}{Starting the math mode configuration\@gobble}
% \end{macrocode}
-% \LaTeX{} |2019-10-01| release has made robust math macros such as the math
-% accents and \cs{hbar}.
-% \begin{macrocode}
-\newif\ifmst@robust@obsessed@LaTeX@era
-\@ifl@t@r\fmtversion{2019/10/01}{\mst@robust@obsessed@LaTeX@eratrue}{}
-\edef\mst@robustifyingspace{\ifmst@robust@obsessed@LaTeX@era\space\fi}
-% \end{macrocode}
% Testing for \XeTeX\ and \LuaLaTeX.
%
-% |1.3g 2015/10/15|: update for the naming of primitives, the situation has
+% \mstrelease{1.3g} |2015/10/15|: update for the naming of primitives, the situation has
% evolved both on \XeTeX\ side and on the \LuaLaTeX\ side (LaTeX base
% |2015/10/01|): I was told "U" named math primitives were always available
% for \LuaLaTeX. For \XeTeX, the XeTeX prefix got replaced by U prefix with
@@ -5967,10 +5847,37 @@ Numerous examples will be found there:\\
\ifmst@LuaTeX\mst@XeOrLuatrue\fi
\ifmst@XeTeX \mst@XeOrLuatrue\fi
% \end{macrocode}
-% |1.2|: all inner macros of \mst now starts with |\mst@| for a cleaner
+% \mstrelease{1.4}. I only checked this is correct with TL2024.
+% The macro will be used with |#1| a catcode 11 or 12 token or a one character
+% control sequence such as |\#|.
+% \begin{macrocode}
+\ifmst@XeTeX
+ \def\mst@OnlyIfNotMathActive#1{%
+ \ifnum\mst@Umathcodenum`#1="1FFFFF
+ \expandafter\@gobble
+ \else\expandafter\@firstofone
+ \fi
+ }
+\else\ifmst@LuaTeX
+ \def\mst@OnlyIfNotMathActive#1{%
+ \ifnum\mst@Umathcodenum`#1="1000000
+ \expandafter\@gobble
+ \else\expandafter\@firstofone
+ \fi
+ }
+\else
+ \def\mst@OnlyIfNotMathActive#1{%
+ \ifnum\mathcode`#1="8000
+ \expandafter\@gobble
+ \else\expandafter\@firstofone
+ \fi
+ }
+\fi\fi
+% \end{macrocode}
+% \mstrelease{1.2}: all inner macros of \mst now starts with |\mst@| for a cleaner
% name-space.
%
-% |1.3l 2016/01/29|: hmmm... at this late stage where nobody would expect me
+% \mstrelease{1.3l} |2016/01/29|: hmmm... at this late stage where nobody would expect me
% to still look at the code, I have found at least two macros which still
% didn't: \cs{do@the@endashstuff} and \cs{do@the@emdashstuff}.
%
@@ -5980,16 +5887,16 @@ Numerous examples will be found there:\\
% engines for a while, hence it is not hard to adapt to the replacement of
% |EU1/EU2| by |TU|, maintaining compatibility with legacy installations.
%
+% At \mstrelease{1.4} the support for obsolete |EU1| and |EU2| font encodings
+% has been removed.
+%
% \begin{macro}{\mst@OneifUniEnc}
% The \cs{mst@OneifUniEnc} is expandable but must be used after
% having set \cs{mst@tmp@enc}...
% \begin{macrocode}
\def\mst@oti{OT1}
-\def\mst@eui{EU1}\def\mst@euii{EU2}\def\mst@tu{TU}
-\def\mst@OneifUniEnc {%
- \ifx \mst@tmp@enc\mst@tu 1\else
- \ifx \mst@tmp@enc\mst@eui 1\else
- \ifx \mst@tmp@enc\mst@euii 1\else 0\fi\fi\fi }
+\def\mst@tu{TU}
+\def\mst@OneifUniEnc{\ifx\mst@tmp@enc\mst@tu1\else0\fi}
\newif\ifmst@goahead
\newif\ifmst@abort
% \end{macrocode}
@@ -6006,9 +5913,13 @@ Numerous examples will be found there:\\
\def\mst@enc{\encodingdefault}
\def\mst@fam{\familydefault}
\def\mst@ser{\seriesdefault}
- \def\mst@opsh{\shapedefault} %% will be default shape for operator names
+% \end{macrocode}
+% \noindent\cs{mst@opsh} will hold default shape for operator names.\newline
+% \cs{mst@ltsh} will hold default shape for letters.
+% \begin{macrocode}
+ \def\mst@opsh{\shapedefault}
\def\mst@bold{\bfdefault}
- \def\mst@ltsh{\shapedefault} %% will be default shape for letters
+ \def\mst@ltsh{\shapedefault}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -6017,7 +5928,7 @@ Numerous examples will be found there:\\
% \end{macro}
% \end{macro}
% \begin{macro}{\mst@greekfont}
-% |1.15c|: for use by the LGRgreek and selfGreek options. Defined as
+% \mstrelease{1.15c}: for use by the LGRgreek and selfGreek options. Defined as
% an \cs{edef} in order to be able to set-up once and for all the
% Greek at the time of \cs{usepackage}. Modifiable in the preamble
% via \cs{MTgreekfont}\marg{font\_name}\cs{Mathastext}.
@@ -6026,20 +5937,24 @@ Numerous examples will be found there:\\
% \end{macrocode}
% \end{macro}
% \begin{macro}{Package options}
-% |2011/03/09|: |1.13| introduces the option LGRgreek and systematic use
+% |2011/03/09|: \mstrelease{1.13} introduces the option LGRgreek and systematic use
% of \cs{if...} conditionals, for better readability (by myself) of
% the code.
%
-% |1.3x| of |2022/11/03| adds |ncccomma|, |binarysemicolon| and
+% \mstrelease{1.3y} of |2022/11/03| adds |ncccomma|, |binarysemicolon| and
% |frenchmath*| options.
%
-% |1.3za| adds |LGRgreek+| and |LGRgreeks+|.
+% \mstrelease{1.3za} adds |LGRgreek+| and |LGRgreeks+|.
%
-% |1.3zb| adds |decimalcomma| and modifies |frenchmath*| to use it. And
-% provides |frenchmath+| as an alias to former |frenchmath*|. Consecutive
-% to the change at |2.7| of \ctanpkg{frenchmath} which replaced
+% \mstrelease{1.3zb} adds |decimalcomma| and modifies |frenchmath*| to use
+% it. And provides |frenchmath+| as an alias to former |frenchmath*|.
+% Consecutive to the change at |v2.7| of \ctanpkg{frenchmath} which replaced
% \ctanpkg{ncccomma} by \ctanpkg{decimalcomma} and broke the compatibility
% recipe explained in \autoref{ssec:frenchmath}.
+%
+% \mstrelease{1.4} adds options |everymath| and |activedigits|.
+%
+% \mstrelease{1.4b} adds |noletters|.
% \begin{macrocode}
\newif\ifmst@italic
\newif\ifmst@frenchmath
@@ -6082,25 +5997,32 @@ Numerous examples will be found there:\\
\newif\ifmst@noexclam
\DeclareOption{noexclam}{\mst@noexclamtrue}
\newif\ifmst@asterisk
- \DeclareOption{noasterisk}{\PackageWarningNoLine{mathastext}
- {option `noasterisk\string' is deprecated.^^J\space\space\space
- Check the documentation}}
\DeclareOption{asterisk}{\mst@asterisktrue}
\newif\ifmst@nospecials
\DeclareOption{nospecials}{\mst@nospecialstrue}
-\newif\ifmst@basic % 1.3 to avoid unnecessary patch of amsmath \newmcodes@
+\newif\ifmst@basic
\DeclareOption{basic}{\mst@basictrue
\ExecuteOptions{noparenthesis,nopunctuation,%
noplusnominus,noequal,noexclam,nospecials,nolessnomore}}
\newif\ifmst@nohbar
\DeclareOption{nohbar}{\mst@nohbartrue}
+% \end{macrocode}
+% \mstrelease{1.4} adds option |activedigits|.
+% \begin{macrocode}
+\newif\ifmst@activedigits
+ \DeclareOption{activedigits}{\mst@activedigitstrue}
\newif\ifmst@nodigits
\DeclareOption{nodigits}{\mst@nodigitstrue}
\newif\ifmst@defaultimath
\DeclareOption{defaultimath}{\mst@defaultimathtrue}
+% \end{macrocode}
+% \mstrelease{1.4b} adds option |noletters|.
+% \begin{macrocode}
+\newif\ifmst@noletters
+ \DeclareOption{noletters}{\mst@noletterstrue\ExecuteOptions{nohbar,defaultimath}}
\newif\ifmst@mathaccents
\DeclareOption{mathaccents}{\mst@mathaccentstrue}
-\newif\ifmst@unimathaccents % 1.3u
+\newif\ifmst@unimathaccents
\DeclareOption{unimathaccents}{\mst@mathaccentstrue\mst@unimathaccentstrue}
\newif\ifmst@needsymbol
\newif\ifmst@symboldelimiters
@@ -6108,7 +6030,7 @@ Numerous examples will be found there:\\
\newif\ifmst@symboldigits
\DeclareOption{symboldigits}{\mst@needsymboltrue\mst@symboldigitstrue}
\newif\ifmst@symbolgreek
-\newif\ifmst@customgreek %% new with 1.3d
+\newif\ifmst@customgreek
\DeclareOption{symbolgreek}{\mst@needsymboltrue\mst@symbolgreektrue
\mst@customgreektrue }
\newif\ifmst@symbolre
@@ -6144,13 +6066,13 @@ Numerous examples will be found there:\\
\DeclareOption{itGreek}{\def\mst@greek@select{1}}
\DeclareOption{upGreek}{\def\mst@greek@select{2}}
% \end{macrocode}
-% Starting with |1.15f| the meaning of the `defaultxx' options has changed. They
+% Starting with \mstrelease{1.15f} the meaning of the `defaultxx' options has changed. They
% now prevent |mathastext| from defining additional alphabets rather than
% prevent it from identifying the `mathxx' with the new `Mathxx'. The
% `Mathnormal' and `Mathrm' alphabet commands are always created as they are
% SymbolFontAlphabets.
%
-% This was again changed at |1.3za|. The additional alphabets are
+% This was again changed at \mstrelease{1.3za}. The additional alphabets are
% always declared, the options only prevent mapping the existing
% `mathxx' to the new `Mathxx'. This may be breaking change if
% people used these options because they had a need for the
@@ -6169,7 +6091,7 @@ Numerous examples will be found there:\\
\newif\ifmst@defaulttt
\DeclareOption{defaulttt}{\mst@defaulttttrue}
% \end{macrocode}
-% Here and elsewhere |1.3za| has removed an
+% Here and elsewhere \mstrelease{1.3za} has removed an
% \cs{ifmst@nonormalbold} conditional.
% \begin{macrocode}
\DeclareOption{defaultalphabets}{\ExecuteOptions{defaultnormal,defaultrm,%
@@ -6185,14 +6107,25 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\newif\ifmst@fouriervec
\DeclareOption{fouriervec}{\mst@fouriervectrue}
% \end{macrocode}
-% |1.15|: the subdued option.
+% \mstrelease{1.15}: the |subdued| option.
% \begin{macrocode}
\newif\ifmst@subdued
\DeclareOption{subdued}{\mst@subduedtrue}
% \end{macrocode}
-% |1.3q|: the unicode option. Thanks to Tobias~\textsc{Brink} for suggesting its
-% incorporation. The parsing of |\CurrentOption| does not seek any robustness,
-% it just does its job if the option is used correctly.
+% \mstrelease{1.4}: the |everymath| option.
+% \begin{macrocode}
+\newif\ifmst@everymath
+ \DeclareOption{everymath}{\mst@everymathtrue
+\PackageWarningNoLine{mathastext}{%
+ `everymath\string' will be removed at next major release.\MessageBreak
+ Please report to the author the circumstances\MessageBreak
+ which mandated its use in the present document}%
+}
+% \end{macrocode}
+% \mstrelease{1.3q}: the |unicode| option. Thanks to Tobias~\textsc{Brink}
+% for suggesting its incorporation. The parsing of \cs{CurrentOption} does
+% not seek any robustness, it just does its job if the option is used
+% correctly.
% \begin{macrocode}
\def\mst@unicodeminus {2013}
\def\mst@checkoption #1unicodeminus#2\mst@#3\mst@@
@@ -6216,7 +6149,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% This broke usage of \cs{Mathastext} macro in preamble.
%
-% |1.3w| works around this via \cs{mst@DeclareMathAccent}. And other
+% \mstrelease{1.3w} works around this via \cs{mst@DeclareMathAccent}. And other
% changes were made in \mst code to cope with these complications around
% robustness.
% \begin{macrocode}
@@ -6226,13 +6159,36 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\DeclareMathAccent{#1}}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\mst@normalversionname}
+% \begin{macro}{\mst@boldversionname}
% Helper macros to test math version names. User is not allowed to redefine
% via \cs{Mathastext} with optional argument or via \cs{MTDeclareVersion} the
-% |normal| and |bold| math versions! Added at |1.3w|, about 7 years late.
+% |normal| and |bold| math versions. Added at \mstrelease{1.3w}, about 7 years late.
% \begin{macrocode}
\def\mst@normalversionname{normal}%
\def\mst@boldversionname{bold}%
% \end{macrocode}
+% \end{macro}\end{macro}
+% \begin{macro}{\mst@OnlyIfNotSubdued}
+% \mstrelease{1.3u} adds this check that we are not in a subdued normal or
+% bold math version. We do not push the |#1| out of the TeX conditionals,
+% and anyhow there was no real need for expandable coding.
+% \begin{macrocode}
+\def\mst@OnlyIfNotSubdued#1{%
+ \ifmst@subdued
+ \ifx\math@version\mst@normalversionname
+ \else
+ \ifx\math@version\mst@boldversionname
+ \else
+ #1%
+ \fi
+ \fi
+ \else
+ #1%
+ \fi
+}%
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\exists} \begin{macro}{\mst@exists@skip}
% \begin{macro}{\forall} \begin{macro}{\mst@forall@skip}
% \begin{macro}{\MTnormalexists}
@@ -6240,7 +6196,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\MTnormalforall}
% \begin{macro}{\MTforalldoesskip }
%
-% |1.15e| |2012/10/21|: math skip/glue \emph{after} \cs{exists} and
+% \mstrelease{1.15e} |2012/10/21|: math skip/glue \emph{after} \cs{exists} and
% \cs{forall}, this is useful with upright letters in math mode.
% Each math version has its own user defined values for the skips,
% stored as macros. The redefinitions of $\exists$ and $\forall$ are
@@ -6249,32 +6205,32 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% The subdued option (later and only for the normal and bold math
% version) and the italic option (here) set to zero the package
-% default skips. With |1.2| the skips can be modified on the fly in
+% default skips. With \mstrelease{1.2} the skips can be modified on the fly in
% the document, they are not necessarily set in the preamble once
% and for all for each math version.
%
-% |1.3j| adds \cs{MTnormalexists}, \cs{MTexistsdoesskip},
+% \mstrelease{1.3j} adds \cs{MTnormalexists}, \cs{MTexistsdoesskip},
% \cs{MTnormalforall}, \cs{MTforalldoesskip}.
%
-% Earlier to |1.3j|, |\let\mst@exists@original\exists| was done at End of
+% Earlier to \mstrelease{1.3j}, |\let\mst@exists@original\exists| was done at End of
% Package, now it is done at Begin Document, and same for |\forall|. We
% pay attention that use of \cs{MTnormalexists} etc... inside the
% preamble does not create self-let's.
%
% Also |subdued| mode will do \cs{MTnormalexists}, \cs{MTnormalforall}
-% (earlier than |1.3j|, it only set the muskips to |0mu|.) Same when
+% (earlier than \mstrelease{1.3j}, it only set the muskips to |0mu|.) Same when
% using |\MTversion{normal}|, if |subdued|.
%
% For some (random, legacy) reason, the handling of $\exists$ and
% $\forall$ is part of the things
% not included inside |\everymath/\everydisplay|.
%
-% |1.3v| The \mst-defined \cs{exists} and \cs{forall} are created
+% \mstrelease{1.3v} The \mst-defined \cs{exists} and \cs{forall} are created
% \cs{protected}. We feel this matches better with their default
% definition as \cs{mathchardef} tokens than dealing with \LaTeX2e robust
% macros. Besides, the coding is simpler.
% \begin{macrocode}
-\newmuskip\mst@exists@muskip %% v 1.15e
+\newmuskip\mst@exists@muskip
\newmuskip\mst@forall@muskip
\def\mst@exists@skip{1mu}
\def\mst@forall@skip{.6667mu}
@@ -6318,13 +6274,13 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\MTnormalprime}
% \begin{macro}{\MTprimedoesskip}
%
-% |1.2| |2012/12/17|: math skip/glue \emph{before} the \cs{prime}
+% \mstrelease{1.2} |2012/12/17|: math skip/glue \emph{before} the \cs{prime}
% glyph. This is useful with the default CM glyph and upright letters
% (in contrast the prime from |txfonts| works fine with upright
% letters). For this we replace the \LaTeX{} kernel \cs{active@math@prime}
% with our own skip-enhanced version \cs{mst@active@math@prime}.
%
-% |1.2b| |2012/12/31|: doing\\
+% \mstrelease{1.2b} |2012/12/31|: doing\\
% \null\hspace{1cm}|{\catcode`\'=\active \global\let'\mst@active@math@prime}|\\
% is awfully wrong when the right quote is made active at begin document by
% some other package (as happens with |babel| for some languages). So \mst
@@ -6340,47 +6296,102 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% does its job only as part of the \cs{everymath} and
% \cs{everydisplay} token lists.
%
-% |1.2e| being paranoid, we take precautions against a possibly
+% \mstrelease{1.2e} being paranoid, we take precautions against a possibly
% catcode active right quote at
% the time of loading mathastext.
%
-% |1.3i| adds \cs{MTactiveprime}.
+% \mstrelease{1.3i} adds \cs{MTactiveprime}.
%
-% |1.3j| renames it to \cs{MTprimedoesskip}. Besides, it makes use in the
-% preamble of \cs{MTnormalprime} or \cs{MTprimedoesskip}.
+% \mstrelease{1.3j} renames it to \cs{MTprimedoesskip}. Besides, it makes use in the
+% preamble of \cs{MTnormalprime} or \cs{MTprimedoesskip}.
+%
+% \mstrelease{1.4} adds the support for the new ``non-everymath''
+% implementation, which has to satisfy to very different constraints.
+%
+% The \cs{MTprimedoesskip} is not a |no-op| in |subdued| math version.
+% This is legacy situation, not changed at \mstrelease{1.4}.
+%
% \begin{macrocode}
-\newmuskip\mst@prime@muskip %% v 1.2
+\newmuskip\mst@prime@muskip
\def\mst@prime@skip{.5mu}
\ifmst@italic\ifmst@frenchmath\else\def\mst@prime@skip{0mu}\fi\fi
+% \end{macrocode}
+% Shouldn't I have rather hacked \cs{prim@s}? (answer: perhaps related to
+% Babel see a comment above).\par
+% \noindent
+% TODO: clarify why I used \cs{sp} not |^| in
+% \cs{mst@active@math@prime} in 2012/2013.\newline
+% TODO: clarify why I am paranoid regarding the |'| catcode here.
+%
+% The |everymath| branch was initially superficially refactored at
+% \mstrelease{1.4}, but unfortunately as \cs{mst@mathactivate} had been
+% modified to not handle mathematically active characters, this meant that the
+% \mst feature of extra math skip was lost under the |everymath| option, due to
+% an oversight by the author. For this among other reasons having mainly to
+% do with code comments we did \mstrelease{1.4a}.
+%
+% At \mstrelease{1.4} we can not go via \cs{mst@mathactivate} (defined further
+% down in the code) which filters out the already mathematically active
+% characters.
+%
+% Why am I paranoid here about |'| catcode at package loading time? (this
+% looks ridiculous...).
+% \begin{macrocode}
+\def\mst@tmp#1{%
+\def\mst@mathactivateprime{%
+ \ifnum\catcode`#1=\active
+ \@ifundefined{active@char#1}
+ {}
+ {\mst@do@activecase #1{}{\mst@active@math@prime}}%
+ \else
+ \mst@@mathactivate #1{}{\mst@active@math@prime}%
+ \fi
+}%
+% \end{macrocode}
+% The ``undo'' is needed at \mstrelease{1.4} (but not if |everymath|).
+% \begin{macrocode}
+\def\mst@undo@mathactivateprime{\mst@mathdeactivate#1{"8000}}%
+}\expandafter\mst@tmp\string'
\def\mst@active@math@prime{\sp\bgroup\mskip\mst@prime@muskip\prim@s}
-{\catcode`\'=12
-\gdef\mst@@modifyprime{\mst@mathactivate'{}\mst@active@math@prime}}
-\newcommand*\MTnormalprime {\let\mst@modifyprime\@empty }
-\newcommand*\MTprimedoesskip {\let\mst@modifyprime\mst@@modifyprime}
-\ifmst@subdued
- \MTnormalprime
+\ifmst@everymath
+ \newcommand*\MTnormalprime {\let\mst@modifyprime\@empty}
+ \newcommand*\MTprimedoesskip{\let\mst@modifyprime\mst@mathactivateprime}%
+ \AtBeginDocument{%
+ \everymath\expandafter
+ {\the\everymath \mst@modifyprime \MTnormalprime}%
+ \everydisplay\expandafter
+ {\the\everydisplay \mst@modifyprime \MTnormalprime}%
+% \end{macrocode}
+% MEMO: |subdued| case will do its own \cs{MTnormalprime} at
+% |\begin{document}| later as part of \cs{MTeverymathoff}.
+% \begin{macrocode}
+ \MTprimedoesskip
+ }
\else
- \MTprimedoesskip
+% \end{macrocode}
+% \mstrelease{1.4} must do things a bit differently.
+% \begin{macrocode}
+ \newcommand*\MTnormalprime {\mst@undo@mathactivateprime}
+ \newcommand*\MTprimedoesskip{\mst@mathactivateprime}
+% \end{macrocode}
+% MEMO: |subdued| case will do its own \cs{MTnormalprime} at
+% |\begin{document}| later as part of \cs{MTeverymathoff}.
+% \begin{macrocode}
+ \AtBeginDocument{\MTprimedoesskip}
\fi
-\AtBeginDocument{%
- \everymath\expandafter
- {\the\everymath \mst@modifyprime \MTnormalprime}%
- \everydisplay\expandafter
- {\the\everydisplay \mst@modifyprime \MTnormalprime}%
-}
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
% \begin{macro}{\MTexistsskip}
% \begin{macro}{\MTforallskip}
% \begin{macro}{\MTprimeskip}
-% |1.15e|: These user macros set up the amount of muglue after
+% \mstrelease{1.15e}: These user macros set up the amount of muglue after
% \cs{exists} or \cs{forall}. The normal and
% bold math versions inherit the same skips; these skips are set to
% zero in case of the subdued, or the italic option. Each command
% \cs{Mathastext}\oarg{version\_name} stores the current values in
% the definition of the math version.
%
-% |1.2|: \cs{MTprimeskip} added, the silly \cs{@onlypreamble} are removed
+% \mstrelease{1.2}: \cs{MTprimeskip} added, the silly \cs{@onlypreamble} are removed
% and the macros are modified to have immediate effect in the document,
% independently of their possible use in the preamble for the math
% versions to store values.
@@ -6433,35 +6444,49 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% mathastext font (both in the current math version). If option
% |noparenthesis| was used, we leave everything untouched.
%
-% In |1.3a|, |2013/09/04|, the modification is done only at the time of
+% In \mstrelease{1.3a}, |2013/09/04|, the modification is done only at the time of
% \cs{MTnonlettersobeymathxx}. It is canceled by
% \cs{MTnonlettersdonotobeymathxx}. So the code has been moved to these
% macros and here we just store at the begin document the then meaning of
% \cs{resetMathstrut@}, and check also if \cs{MTnonlettersobeymathxx} has
% been invoked in the preamble.
%
-% |1.3f| |2015/09/12| issues only an Info message not a Warning, as I am
+% \mstrelease{1.3f} |2015/09/12| issues only an Info message not a Warning, as I am
% becoming aware from another context (etoc) that Warnings are stressful to
% users, in some integrated environments for editing and compiling \LaTeX{}
% source files.
+%
+% \mstrelease{1.4} adds here an \cs{AtEndOfPackage}. As this must be
+% executed (if not in the legacy |everymath| context) after the
+% redefinition of \cs{MTnonlettersobeymathxx} which happens at begin
+% document.
% \begin{macrocode}
\ifmst@noparen\else
-\AtBeginDocument{%
- \@ifundefined{resetMathstrut@}{% nothing to do, no amsmath
- }{% amsmath loaded, and possibly patched by things such as lualatex-math
- \let\mst@savedresetMathstrut@\resetMathstrut@
-% \PackageInfo{mathastext}{current `at begin document\string' meaning of
-% amsmath\MessageBreak
-% \string\resetMathstrut@\space preserved for
-% future use\@gobble}%
- \ifx\mst@the\the % means that \MTnonlettersobeymathxx was used in preamble
- \let\mst@the\@gobble\MTnonlettersobeymathxx
- \fi}}
+\AtEndOfPackage{%
+ \AtBeginDocument{%
+ \@ifundefined{resetMathstrut@}
+ {}%
+ {%
+ \let\mst@savedresetMathstrut@\resetMathstrut@
+% \end{macrocode}
+% The |\ifx\mst@the\the| is true iff \cs{MTnonlettersobeymathxx} was used in preamble
+% (last compared to \cs{MTnonlettersdonotobeymathxx}).
+% Setting \cs{mst@the} to \cs{@gobble} here wiil cause \cs{MTnonlettersobeymathxx}
+% to indeed modify \cs{resetMathstrut@} (and it resets \cs{mst@the} to \cs{the} for
+% its behavior in \cs{everymath}).
+% \begin{macrocode}
+ \ifx\mst@the\the
+ \let\mst@the\@gobble
+ \MTnonlettersobeymathxx
+ \fi
+ }%
+ }%
+}%
\fi
% \end{macrocode}
% \end{macro}
%
-% |1.2| |2012/12/20| does some rather daring \emph{math} activation of
+% \mstrelease{1.2} |2012/12/20| does some rather daring \emph{math} activation of
% \verb$; , : ! ? + - = < > ( ) [ ]$ in
% math mode to achieve something I wanted to do since a long time: overcome
% the mutually excluding relation between the variable-family concept and
@@ -6476,7 +6501,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% the entrance of the math mode are discussed later),\\
% \null\hspace{1cm}\fbox{but the concerned characters will now expand in math
% mode to \emph{two} tokens.}\\
-% |1.2c| |2012/12/31|: hence, this current
+% \mstrelease{1.2c} |2012/12/31|: hence, this current
% implementation puts constraints on the input: |$x^?$| or |$x\mathrel?y$|
% now create errors. They must be input
% |$x^{?}$|, respectively |$x\mathrel{?}y$|.\\
@@ -6488,8 +6513,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% should be used instead) but it can be activated for them too.
%
%
-% \begin{macro}{\mst@mathactivate}
-% |1.2b| |2012/12/30|: there were bad oversights in the |1.2| code
+% \mstrelease{1.2b} |2012/12/30|: there were bad oversights in the \mstrelease{1.2} code
% for \cs{mst@mathactivate} related to the possibility for some
% characters to have been made active (in the sense of the catcode)
% elsewhere (something which often is done by language definition
@@ -6503,7 +6527,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% |:| (assuming for the latter that things would have worked ok before
% the twiddling by \mst).
%
-% |1.2e| |2013/01/09|: alas |$\ref{eq:1}$| still was a problem.
+% \mstrelease{1.2e} |2013/01/09|: alas |$\ref{eq:1}$| still was a problem.
% Indeed in that case the \mst prefix had no means to know it was
% inside a \cs{ref} so it made the character expand to its \mst
% redefinition, which is not acceptable inside a
@@ -6566,13 +6590,13 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% the mathcode to 32768!!}, rather it makes \emph{sure} the character
% is not mathematically active.
%
-% As |1.2e| is a bit paranoid it takes precautions against
+% As \mstrelease{1.2e} is a bit paranoid it takes precautions against
% the possibility of characters it treats being active at
% the time of its loading. Excepted from the scope of the
% paranoia are the latin letters (that would be crazy!) and
% also |*|, |"| and the left quote |`|.
%
-% |1.2f| |2013/01/21| with earlier versions (*) it was important not
+% \mstrelease{1.2f} |2013/01/21| with earlier versions (*) it was important not
% to do twice the business of \cs{mst@mathactivate} (think
% |$\hbox{$?$}$|), so I used (this was a bit wasteful) some sort of
% boolean macro for each character. But now that there are the
@@ -6590,57 +6614,274 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% |\label| or |\ref|. So testing for active characters should be done
% always... many things should be done always... I leave as is.
%
-% |1.3i| |2016/01/06| removes a spurious end of line space in
+% \mstrelease{1.3i} |2016/01/06| removes a spurious end of line space in
% \cs{mst@mathactivate} (did not show as anyhow done in math mode).
%
-% \begin{macro}{\mst@do@az}
-% \begin{macro}{\mst@do@AZ}
-% \begin{macro}{\mst@addtodo@az}
-% \begin{macro}{\mst@addtodo@AZ}
-% \begin{macro}{\mst@the}
-% |1.2b| |2012/12/28| now that we understand the great advantages of |"8000|
-% we do it also for all letters a-z and A-Z to insert automatically the
-% italic corrections. See the \hyperref[sec:ic]{discussion} in the user
-% manual. Ironically I wrote the code initially for the |italic| option only
-% to realize later it was more suitable to using an \emph{upright} text font
-% in math mode! So this mathematical activation of the letters is not done if
-% the font shape is detected to be |it| or |sl|; to bypass this the command
-% \cs{MTicinmath} is provided.
-%
-% |1.2e| |2013/01/10| corrects a bad oversight of |1.2b| in
-% \cs{mst@mathactivate} which made the reproduction of the user manual
-% illustrations with |$f_i^i$| impossible. As \cs{mst@mathactivate} was
-% originally used also to get the non-letters obey math alphabet while
-% maintaining the \TeX{} spacings, it added no extra braces. The braces
-% should however be added for expansion of math active letters, in order of
-% things like |x^y| to work as expected. (the group braces do not prevent
-% ligatures when the letters are arguments to the math alphabet commands,
-% the added macros \cs{mst@itcorr} and \cs{mst@before<letter>} expanding to
-% nothing).
+% \mstrelease{1.4} has significantly refactored the coding, there were
+% simplication from a changed way to use \cs{mst@mathactivate} for letters
+% and added branches to accomodate the renouncement to \cs{everymath}.
+% \begin{macro}{\mst@do@activecase}
+% Called by \cs{mst@mathactivate} if |#1| is catcode active.
+%
+% Check if token activation originates apparently into \ctanpkg{babel}:
+% \begin{itemize}[nosep]
+% \item if NO, nothing is done. The active meaning of |#1| is not modified.
+% \item if YES, we hook into \ctanpkg{babel} associated macros so
+% that in math mode the catcode active token does what \mst expects it to
+% do. Its \cs{mathcode} is set to the
+% one of the associated \cs{mathalpha} symbol as declared by \mst, except
+% for asterisk and right tick which simply use their ascii number as mathcode.
+% \end{itemize}
+%
+% In the case of \ctanpkg{babel}-spanish which has a catcode active right
+% tick, resetting its mathcode has the advantage to reveal in output the case
+% of a faulty input using the curly right tick U+8217 which one can get easily
+% from copy paste, for example from the |babel-spanish.pdf| file.
+%
+% And in general it is dangerous to have a character both catcode active and
+% mathcode active.
+%
+% Some auxiliaries.
+% \begin{macrocode}
+\def\mst@magic@v #1#2#3#4#5{#1#3#4}
+\def\mst@magic@vi #1#2#3#4#5#6{#1#2#4#5}
+\def\mst@fork{\ifmmode\mst@magic@v\fi\@thirdofthree}
+\def\mst@safefork{\ifmmode\if@safe@actives\else\mst@magic@vi\fi\fi\@thirdofthree}
+% \end{macrocode}
+% Some refactoring (and streamlining) at \mstrelease{1.4} here.
+% \begin{footnotesize}
+% There was at some point in the case of a Babel-active token a special
+% hanlding for |#1| to use \cs{MTmathcharletter}|#1| (and event for
+% digits!). But this is almost impossible to arise in practice:
+% \begin{itemize}[nosep]
+% \item Babel commands to set up a shorthand are preamble only (they use
+% \cs{AtBeginDocument}),
+% \item A shorthand is made active at begin document, and we don't want that
+% for a letter!
+% \item Activation is recorded as an instruction in the |.aux| file which
+% breaks it almost surely (except perhaps for letter |Z| or such not
+% likely to appear in macro names in the |.aux| file).
+% \item Even if we somehow hack against that (which I did to test) a more
+% subtle problem arises that Babel updates \cs{nfss@catcodes}, so that the
+% latter will want to make (e.g.) |a| of catcode 12! This causes breakage
+% very easily at the time of \cs{process@table} almost as easily as with
+% the |a| set to be an active character...
+% \end{itemize}
+%
+%^^A In revisiting and
+%^^A improving the coding here (following up on a simplification of
+%^^A \cs{mst@mathactivate} itself, I discovered a bug of earlier releases: in
+%^^A this fictitious "letter made active by Babel" branch the insertion of mu
+%^^A glue around the letter was lost, only the italic correction was kept in the
+%^^A modified meaning of Babel active letter in math mode. This bug was
+%^^A dissolved by the new way \cs{mst@mathactivate} is used by
+%^^A \cs{mst@DeclareMathLetter} and the ensuing simplifcation here. But in fact
+%^^A as summarized above this is purely fictitious code, which will never get
+%^^A executed in real life!
+%^^A As I am not of the repenting type, I also add at \mstrelease{1.4} a similar
+%^^A fictituous layer for catcode active digits...\par
+% \end{footnotesize}
+% |#1| here is a character token of catcode 11 or 12.
+% We do something only if the catcode activation appears to have been triggered
+% by \ctanpkg{babel}. The test has been moved earlier at \mstrelease{1.4}.
+% \begin{macrocode}
+\def\mst@do@activecase#1#2#3{%
+% \end{macrocode}
+% As letters and digits are impossible here, |#2| is either empty (which
+% happens only now for asterisk and right tick) or a single token (\cs{mathclose},
+% \cs{mathopen},... ). When |#2| is not empty, |#3| is always a mathchar
+% token. For safety we make sure then the mathcode is not active.
+%
+% The rationale is
+% to avoid context where people have both catcode and math active and use
+% |\string|. In the case of \ctanpkg{babel}-spanish with
+% |activeacute| option it allows to reveal more easily input errors using
+% curly right tick U+8217.
+%
+% Arguably I probably mainly wanted to do this if the character was found
+% catcode active but not a Babel shorthand. But it ended into the Babel
+% branch and the non-Babel branch for active catcode is to do nothing.
+%
+% |#2| is empty exactly for the case of the right tick and the asterisk.
+% In all other cases, then |#3| is a mathchar token.
+% \begin{macrocode}
+ \ifx\relax #2\relax\mathcode`#1=`#1\relax\else\mathcode`#1=#3\relax\fi
+% \end{macrocode}
+% Less \cs{expandafter}'s at \mstrelease{1.4}. Also, it is now required
+% to make sure:
+% \begin{itemize}[nosep]
+% \item not do it twice in succession (else infinite loop),
+% \item and undo it when deactivating.
+% \end{itemize}
+% This was easily done under legacy code (now only used under |everymath|
+% option, and only for non-letters) as it activated only when entering into
+% math mode.
+%
+% This is more annoying when activation happens in an uncontrolled
+% scope, and we handle this via a \cs{mst@hackedshorthand@<char>} flag.
+%
+% MEMO: the undoing is done in \cs{mst@mathdeactivate} which is invoked
+% only for those non-letters submitted to \cs{mst@mathactivate}.
+% \begin{macrocode}
+ \ifmst@everymath\else\@ifundefined{mst@hackedshorthand@#1}{\fi
+ \expandafter\let\csname mst@orig@user@active#1\expandafter\endcsname
+ \csname user@active#1\endcsname
+ \expandafter\let\csname mst@orig@normal@char#1\expandafter\endcsname
+ \csname normal@char#1\endcsname
+ \ifmst@everymath\else}{}\fi
+% \end{macrocode}
+% No more \cs{edef}'s at \mstrelease{1.4}. At this release, in letter case
+% |#3| is empty and |#2| is a single token which needs no extra brace
+% pair as this brace pair will come from its expansion.
+% We can use |{#2}{#3}| in all cases rather than either |{{#2#3}}{}| versus
+% |{#2}#3| depending on whether |#1| is letter or not as was done in the past.
+% Attention that |#2| and |#3| may each be empty.
+% \begin{macrocode}
+ \def\mst@tmp##1##2{\def##1{\mst@fork{#2}{#3}##2}}%
+ \expandafter\mst@tmp\csname user@active#1\expandafter\endcsname
+ \csname mst@orig@user@active#1\endcsname
+ \def\mst@tmp##1##2{\def##1{\mst@safefork{#2}{#3}##2}}%
+ \expandafter\mst@tmp\csname normal@char#1\expandafter\endcsname
+ \csname mst@orig@normal@char#1\endcsname
+ \ifmst@everymath
+ \else
+ \expandafter\let\csname mst@hackedshorthand@#1\endcsname\@empty
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mst@@mathactivate}
+% \begin{macrocode}
+\begingroup
+ \catcode`\~=\active
+ \def\x{%
+\endgroup
+% \end{macrocode}
+% |##1| is always a token of catcode 11 or 12.
+% \begin{macrocode}
+\ifmst@everymath
+ \def\mst@@mathactivate##1##2##3{%
+ \begingroup
+ \lccode`~=`##1
+ \lccode`##1=`##1
+% \end{macrocode}
+% Careful here as |##2| is empty in the asterisk and prime case. And |##3|
+% also is at \mstrelease{1.4} empty for letters.
+% \begin{macrocode}
+ \lowercase{\endgroup
+% \end{macrocode}
+% Refactoring at \mstrelease{1.4} merged the catcode 11 and catcode 12
+% branches here and in particular avoided in former case an \cs{edef}. This
+% helped into providing the \cs{MTcommandletter}\meta{letter} as a
+% customizable macro. There was no equivalent to this macro, which here is
+% |##2|, prior to \mstrelease{1.4}.
+% \begin{macrocode}
+ \mathcode`##1="8000
+ \def~{##2##3}%
+ }%
+ }%
+\else
+ \def\mst@@mathactivate##1##2##3{%
+ \begingroup
+ \lccode`~=`##1
+ \lccode`##1=`##1
+ \lowercase{\endgroup
+ \mathcode`##1="8000
+% \end{macrocode}
+% Also, \mstrelease{1.4} possibly execute \cs{mst@mathactivate} everywhere
+% in document body (at version changes for example) or at begin document.
+% Hence this modifies globally the active meaning. So we add some safeguard
+% here using an \cs{ifmmode}. And we store the original meaning of the
+% active variant of the token to reset it when ``undoing''.
+%
+% Careful not to do it twice in a row... (but this means \cs{mst@deactivate}
+% might not revert to a user custom redefinition done in-between but to a
+% prior one; although if the character is made active the second
+% \cs{mst@mathactivate} would not have been done).
+% \begin{macrocode}
+ \@ifundefined{mst@prioractivemeaning@##1}
+ {\expandafter\let
+ \csname mst@prioractivemeaning@##1\endcsname ~}
+ {}%
+ \def~{\ifmmode##2##3\else##1\fi}%
+ }%
+ }%
+\fi
+}\x
+% \end{macrocode}
+% At \mstrelease{1.4} the macro was split into two, to test first whether the
+% character which is encountered is currently with active catcode.
%
-% Added note |2016/01/06|: it should be explicitly said that the extra
-% |{..}| in |\mst@mathactivate| for letters end up creating |\hbox|'es
-% around each letter with its extra skips and explicit italic correction,
-% when present. These skips are thus set at natural width and do not add
-% any break point.
+% At \mstrelease{1.4} the non-catcode active branch is entered only if the
+% character isn't mathematically active at time of use..
%
-% \begin{macro}{\MTmath-}\begin{macro}{activeletters}
-% \begin{macro}{\MTmath-}\begin{macro}{standardletters}
-% |1.3| |2013/09/02| extends the use of mathematically active letters to
-% allow the user to specify muglue before and after the letter itself (see
-% \cs{MTsetmathskips}, below).
-% Mathematically active letters were previously used only to add the italic
-% correction; the math activation has now been separated and put in
-% \cs{MTmathactiveletters}. There is also \cs{MTmathactiveLetters} to allow
-% math activation only for the uppercase letters. To cancel the (now default,
-% even with option |italic|) math
-% activation of letters, there is \cs{MTmathstandardletters}. Version |1.3a|
-% removes some silly |\string|'s from the code, which prevented to pass
-% macros as first argument to the command.
-% \begin{macro}{\MTnonletters-}\begin{macro}{obeymathxx}
-% \begin{macro}{\MTnonletters-}\begin{macro}{donotobeymathxx}
-% \begin{macro}{\resetMathstrut@}
-% These macros are modified in version |1.3a| |2013/09/04| in order to
+% Careful that |#2| and |#3| may each be empty. The test for being a Babel
+% shorthand is done here and not as prior to \mst@release{1.4} inside
+% \cs{mst@do@activecase}.
+% \begin{macrocode}
+\def\mst@mathactivate#1#2#3{%
+ \ifnum\catcode`#1=\active
+ \@ifundefined{active@char#1}{}{\mst@do@activecase #1{#2}{#3}}%
+ \else
+ \mst@OnlyIfNotMathActive{#1}{\mst@@mathactivate #1{#2}{#3}}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mst@mathdeactivate}
+% This is needed at \mstrelease{1.4} for non-letters which are mathematically
+% activated. See comments above in \cs{mst@do@activecase}. Works in
+% sync with \cs{mst@addtodo@nonletters}.
+%
+% The \cs{mst@mathdeactivate} is active (sic) only in the non |everymath|
+% situation. It will restore a previously existing active meaning if it has
+% been changed.
+% \begin{macrocode}
+\ifmst@everymath
+\else
+\def\mst@mathdeactivate#1#2{%
+ \mathcode`#1=#2\relax
+ \@ifundefined{active@char#1}
+ {\@ifundefined{mst@prioractivemeaning@#1}
+ {}%
+ {\mst@restoreactivemeaning#1%
+ \expandafter\let\csname mst@prioractivemeaning@#1\endcsname\relax}%
+ }
+ {\@ifundefined{mst@hackedshorthand@#1}
+ {}
+ {\expandafter\let\csname user@active#1\expandafter\endcsname
+ \csname mst@orig@user@active#1\endcsname
+ \expandafter\let\csname normal@char#1\expandafter\endcsname
+ \csname mst@orig@normal@char#1\endcsname
+ \expandafter\let\csname mst@hackedshorthand@#1\endcsname\relax
+ }%
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mst@restoreactivemeaning}
+% At \mstrelease{1.4} when we undo the mathematical activation we now also
+% restore the prior existing active meaning, if any. Only in the ``no
+% |everymath|'' branch (because in the |everymath| \TeX{} itself takes care
+% of that on exiting the scope of the math mode).
+% \begin{macrocode}
+\def\mst@restoreactivemeaning#1{%
+ \begingroup
+ \lccode`~=`#1
+ \lccode`#1=`#1
+ \lowercase{\endgroup
+ \expandafter\let\expandafter~\csname mst@prioractivemeaning@#1\endcsname
+ }%
+}
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\mst@do@nonletters}
+% \begin{macro}{\mst@addtodo@nonletters}
+% \begin{macro}{\mst@the}
+% \begin{macro}{\MTnonlettersobeymathxx}
+% \begin{macro}{\MTnonlettersdonotobeymathxx}
+% These macros are modified in version \mstrelease{1.3a} |2013/09/04| in order to
% cleverly adjust, or not, the |amsmath| \cs{resetMathstrut@}. When used in
% the preamble, they just modify \cs{mst@the}. And there is code at begin
% document to check the status there of \cs{mst@the} and if its meaning is
@@ -6658,7 +6899,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% |2016/03/03 v2.15a| of |amsmath.sty| is still not compatible with a math
% active opening parenthesis. Hence my patch here is still needed.
%
-% At |1.3u| \cs{MTnonlettersobeymathxx} and \cs{MTeasynonlettersobeymathxx}
+% At \mstrelease{1.3u} \cs{MTnonlettersobeymathxx} and \cs{MTeasynonlettersobeymathxx}
% are made no-ops under subdued mode. This fixes some bug if for example
% the former was used in preamble or immediately after |\begin{document}|
% making the minus sign math active although the \mst action was
@@ -6667,42 +6908,42 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% versions.
% \begin{macrocode}
\newtoks\mst@do@nonletters
-\newtoks\mst@do@easynonletters
-\newtoks\mst@do@az
-\newtoks\mst@do@AZ
+\ifmst@everymath
+\else
+ \newtoks\mst@undo@nonletters
+\fi
+% \end{macrocode}
+% |#1| is a category 12 character, |#2| is a \cs{mathopen}, or \cs{mathclose},
+% etc..., |#3| is a \cs{mathchar} (of variable family type).
+%
+% At \mstrelease{1.4}, \cs{mst@mathactivate} will not do anything if |#1|
+% is mathcode active (but not catcode active) at time of use.
+% \begin{macrocode}
+\ifmst@everymath
+ \def\mst@addtodo@nonletters#1#2#3{\mst@do@nonletters\expandafter
+ {\the\mst@do@nonletters\mst@mathactivate#1#2#3}%
+ }%
+\else
+% \end{macrocode}
+% We need to automatize some safeguards related to \cs{mst@do@activecase} when
+% deactivating.
+% \begin{macrocode}
+ \def\mst@addtodo@nonletters#1#2#3{\mst@do@nonletters\expandafter
+ {\the\mst@do@nonletters\mst@mathactivate#1#2#3}%
+ \edef\mst@tmp{\noexpand\mst@mathdeactivate#1{\the\mathcode`#1}}%
+ \mst@undo@nonletters\expandafter\expandafter\expandafter
+ {\expandafter\mst@tmp\the\mst@undo@nonletters}%
+ }%
+\fi
\let\mst@the\@gobble
-\newcommand*\MTnonlettersdonotobeymathxx{%
- \ifx\mst@the\@gobble
- \else
- \@ifundefined{mst@savedresetMathstrut@}{}{%
- \PackageInfo{mathastext}{restoring for this group or environment
- the original\MessageBreak
- amsmath \protect\resetMathstrut@}%
- \let\resetMathstrut@\mst@savedresetMathstrut@}%
- \fi
- \let\mst@the\@gobble
-}%
% \end{macrocode}
-% |1.3u| adds this check that we are not in a subdued normal or bold math
-% version. No need for expandable coding.
+% As \cs{mst@savedresetMathstrut@} will only be defined at begin document,
+% the next two macros are no-op in the preamble.
% \begin{macrocode}
-\def\mst@OnlyIfNotSubdued#1{%
- \ifmst@subdued
- \ifx\math@version\mst@normalversionname
- \else
- \ifx\math@version\mst@boldversionname
- \else
- #1%
- \fi
- \fi
- \else
- #1%
- \fi
-}%
-\def\mst@nonlettersobeymathxx{%
- \ifx\mst@the\the
- \else
- \@ifundefined{mst@savedresetMathstrut@}{}{%
+\def\mst@redefine@resetMathstrut@{%
+ \@ifundefined{mst@savedresetMathstrut@}
+ {}
+ {%
\ifmst@symboldelimiters
\def\resetMathstrut@{%
\setbox\z@\hbox{\the\textfont\symmtpsymbol\char40
@@ -6715,234 +6956,186 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\the\textfont\symoperators\char40}%
\ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@}%
\fi
- \PackageInfo{mathastext}{\string\resetMathstrut@\space
- from amsmath replaced for this\MessageBreak group or environment}}%
- \fi
- \let\mst@the\the
+ \PackageInfo{mathastext}{\string\resetMathstrut@\space
+ from amsmath replaced for this\MessageBreak group or environment}%
+ }%
}%
-\newcommand*\MTnonlettersobeymathxx
- {\mst@OnlyIfNotSubdued\mst@nonlettersobeymathxx}%
-\newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst@theeasy\@gobble}%
-\def\mst@easynonlettersobeymathxx{\let\mst@theeasy\the}%
-\newcommand*\MTeasynonlettersobeymathxx
- {\mst@OnlyIfNotSubdued\mst@easynonlettersobeymathxx}%
-\MTeasynonlettersobeymathxx % no-op here if subdued mode
-\def\mst@mathactiveletters{\let\mst@thef\the \let\mst@theF\the}%
-\newcommand*\MTmathactiveletters
- {\mst@OnlyIfNotSubdued\mst@mathactiveletters}%
-\MTmathactiveletters % no-op here if subdued mode
-\def\mst@mathactiveLetters{\let\mst@theF\the}%
-\newcommand*\MTmathactiveLetters
- {\mst@OnlyIfNotSubdued\mst@mathactiveLetters}%
-\newcommand*\MTmathstandardletters{\let\mst@thef\@gobble \let\mst@theF\@gobble}%
+\def\mst@restore@resetMathstrut@{%
+ \@ifundefined{mst@savedresetMathstrut@}{}{%
+ \PackageInfo{mathastext}{restoring for this group or environment
+ the original\MessageBreak
+ amsmath \protect\resetMathstrut@}%
+ \let\resetMathstrut@\mst@savedresetMathstrut@}%
+}%
+\ifmst@everymath
+ \newcommand*\MTnonlettersobeymathxx{%
+ \mst@OnlyIfNotSubdued{%
+ \ifx\mst@the\the
+ \else
+ \mst@redefine@resetMathstrut@
+ \fi
+ \let\mst@the\the
+ }%
+ }%
+ \newcommand*\MTnonlettersdonotobeymathxx{%
+ \ifx\mst@the\@gobble
+ \else
+ \mst@restore@resetMathstrut@
+ \fi
+ \let\mst@the\@gobble
+ }%
+\else
+ \newcommand*\MTnonlettersobeymathxx{%
+ \mst@OnlyIfNotSubdued{%
+ \AtBeginDocument{\MTnonlettersobeymathxx}%
+ }%
+ }%
+ \newcommand*\MTnonlettersdonotobeymathxx{%
+ \AtBeginDocument{\MTnonlettersdonotobeymathxx}%
+ }%
+ \AtBeginDocument{%
+ \renewcommand*\MTnonlettersobeymathxx{%
+ \mst@OnlyIfNotSubdued{%
+ \the\mst@do@nonletters
+ \ifx\mst@the\the
+ \else
+ \mst@redefine@resetMathstrut@
+ \fi
+ \let\mst@the\the
+ }%
+ }%
+ \renewcommand*\MTnonlettersdonotobeymathxx{%
+ \the\mst@undo@nonletters
+ \ifx\mst@the\@gobble
+ \else
+ \mst@restore@resetMathstrut@
+ \fi
+ \let\mst@the\@gobble
+ }%
+ }%
+\fi
% \end{macrocode}
-% \begin{macro}{\MTicinmath}
-% \begin{macro}{\MTICinmath}
-% \begin{macro}{\MTnoicinmath}
-% \begin{macro}{\MTicalsoinmathxx}
-% \cs{MTnoicinmath} can also be used from inside math mode.
-%
-% \cs{MTicalsoinmathxx} is destined to be used inside
-% \cs{mathnormalbold} as I didn't want to add the complication of
-% extracting the family number used inside \cs{mathnormalbold} (will
-% perhaps come back if I have time to spend on
-% |source2e|). Added note |2016/01/06|: this number is a priori simply
-% |symmtletterfont+1|.
-%
-% \cs{MTicinmath} can also be used inside math mode, to revert an
-% earlier \cs{MTnoicinmath} from inside the same math group: the math mode
-% had to be entered with the math activation of letters allowed.
-%
-% |1.3i| |2016/01/06|: For some reason which I have now forgotten I did
-% until now:
-% \begin{verbatim}
-% \def\mst@itcorr{\ifnum\fam=\m@ne\/\else\ifnum\fam=\symmtletterfont\/\fi\fi}%
-% \end{verbatim}
-% hence italic corrections were also applied inside \cs{mathnormal} (for
-% upright fonts; \cs{mathnormalbold} math alphabet was not treated like
-% \cs{mathnormal}). I now drop this to be more in sync with the handling
-% of the extra skips around letters. Everything gets suppressed inside
-% all math alphabets, allowing ligatures, even for \cs{mathnormal}.
-%
+% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+% \begin{macro}{\MTeasynonlettersobeymathxx}
+% \begin{macro}{\MTeasynonlettersdonotobeymathxx}
% \begin{macrocode}
-\newcommand*\MTicinmath{%
- \MTmathactiveletters
- \def\mst@itcorr{\ifnum\fam=\m@ne\/\fi}%
- \let\mst@ITcorr\mst@itcorr}
-\newcommand*\MTICinmath{%
- \MTmathactiveLetters
- \def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}}
-\newcommand*\MTnoicinmath{\let\mst@itcorr\@empty\let\mst@ITcorr\@empty}
-\newcommand*\MTnoICinmath{\let\mst@ITcorr\@empty}
-\newcommand*\MTicalsoinmathxx{%
- \ifx\mst@itcorr\@empty\else\def\mst@itcorr{\/}\fi
- \ifx\mst@ITcorr\@empty\else\def\mst@ITcorr{\/}\fi}
+\newtoks\mst@do@easynonletters
+\ifmst@everymath
+ \newcommand*\MTeasynonlettersdonotobeymathxx{\let\mst@theeasy\@gobble}%
+ \newcommand*\MTeasynonlettersobeymathxx{%
+ \mst@OnlyIfNotSubdued{\let\mst@theeasy\the}%
+ }%
+ \MTeasynonlettersobeymathxx
+\else
+ \newtoks\mst@undo@easynonletters
+ \newcommand*\MTeasynonlettersdonotobeymathxx{\the\mst@undo@easynonletters}
+ \newcommand*\MTeasynonlettersobeymathxx{%
+ \mst@OnlyIfNotSubdued{\the\mst@do@easynonletters}%
+ }%
+ \AtEndOfPackage{\MTeasynonlettersobeymathxx}%
+\fi
% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
-% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
-% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
-% \begin{macro}{\MTsetmathskips}
-% \begin{macro}{\MTunsetmathskips}
-% |1.3| |2013/09/02|: user level command to specify extra spaces in math mode
-% around the letters (only the 7bit a,b,..,z and A,B,..,Z). First parameter is
-% the letter, second is the math skip to be inserted before, and third the
-% skip to be inserted after; for example \cs{thickmuskip} or explicitly
-% |0.1mu|.
-%
-% For this, letters are made mathematically active. This is now the package
-% default (version |1.2| did this only in the absence of option |italic|, or
-% more precisely when the font used was not of shape |it| or |sl|). But if
-% \cs{MTsetmathskips} has not been used for that letter, the only effect of
-% the math activation is, as in |1.2|, to add the italic correction
-% automatically, except when the font shape is detected to be |it| or |sl|; in
-% these latter cases, although mathematically active, the letter acts in the
-% standard way.
-%
-% The command \cs{MTmathstandardletters} turns off math activation and its
-% effects for all letters.
-%
-% Ligatures within the argument of a math alphabet command are impeached by
-% skips; so \cs{MTunsetmathskips} is provided to cancel the skips for one
-% specific letter (|f| for example).
+% \end{macro}\end{macro}
+% \begin{macro}{\mst@addtodo@easynonletters}
+% |#1| is a one character control sequence (|\.|, |\/|, |\#|, |\%| or |\&|)
+% and |#2| is a mathchar.
%
-% |1.3a| |2013/09/04|: I strangely had |\string#1| inside \cs{MTsetmathskips}.
-% Phobic of catcode active letters... but with |\string| one needs some
-% |\expandafter| to use \cs{MTsetmathskips} in an |\@for| loop for example. It
-% is better to allow the first argument to be a macro or anything expanding to
-% a letter, and to not be paranoid about improbable catcode active letters
-% (the user just has to tame them at the time of the \cs{MTsetmathskip}) so I
-% take out these |\string|'s.
+% Perhaps I should use the Unicode engine \cs{Umathcode} et alia. I do this
+% at other places. However
+% I realized in 2013 and it is still true in 2024 that \LaTeX{} interface
+% \cs{DeclareSymbolFont} does not allow to declare more than 16 font
+% families even with \LuaLaTeX{} despite the latter allowing 256 such.
%
-% |1.3i| |2016/01/06|: the extra skips are suppressed for the arguments of
-% math alphabet commands. This applies in particular for amsmath's
-% \cs{DeclareMathOperator}.
+% So why bother?
%
+% \mstrelease{1.4} adds to this legacy branch a test to not override
+% a mathematically active ``easy'' non-letter. Main case is the dot
+% with Babel Spanish.
% \begin{macrocode}
-\newcommand*\MTsetmathskips[3]{%
- \@namedef{mst@before#1}{\ifnum\fam=\m@ne\mskip#2\relax\fi }%
- \@namedef{mst@after#1}{\ifnum\fam=\m@ne\mskip#3\relax\fi }%
-}
-\newcommand*\MTunsetmathskips[1]{%
- \@namedef{mst@before#1}{}%
- \@namedef{mst@after#1}{}%
-}
+\ifmst@everymath
+ \def\mst@addtodo@easynonletters#1#2{%
+ \mst@do@easynonletters\expandafter{%
+ \the\mst@do@easynonletters
+ \mst@OnlyIfNotMathActive{#1}{\mathcode`#1=#2}%
+ }%
+ }%
+ \def\mst@addtodo@easynonletters@U#1#2{%
+ \mst@do@easynonletters\expandafter{%
+ \the\mst@do@easynonletters
+ \mst@OnlyIfNotMathActive{#1}{\mst@Umathcodenum`#1=#2}%
+ }%
+ }%
+\else
% \end{macrocode}
-% \end{macro}\end{macro}
-% \begin{macro}{\mst@mathactivate}
-% \begin{macro}{\mst@addtodo@nonletters}
-% \begin{macro}{\mst@addtodo@easynonletters}
-% \begin{macro}{\mst@addtodo@az}
-% \begin{macro}{\mst@addtodo@AZ}
-% Added note |2016/01/06|:
-% Notice that the initially |\relax| tokens \verb+\mst@[before|after]@<letter>+
-% formed with |\csname...\endcsname| do not modify TeX's math layout:
-% |{\relax f\relax}| is like |f| (also for ligatures inside |\mathrm| for
-% example).
+% The character may have been made mathcode active
+% exterior to \mst. We can not test this for sure at begin document as it
+% may happen later. If such an ``easy'' character is mathcode active,
+% this can not originate in \mst. So we should not overwrite when
+% we issue \cs{MTeasynonlettersdonotobeymathxx}. Example I know is
+% with \ctanpkg{babel} Spanish which makes the dot math active. With PDF\LaTeX{}
+% it is also catcode active
+%
+% This macro may be used with Unicoe engines, and \LuaTeX{} and \XeTeX{}
+% differ regarding math active characters. I have only tested this (anew)
+% for \mstrelease{1.4} for which this branch is needed, so in 2024.
% \begin{macrocode}
-\def\mst@magic@v #1#2#3#4#5{#1#3#4}
-\def\mst@magic@vi #1#2#3#4#5#6{#1#2#4#5}
-\def\mst@fork{\ifmmode\mst@magic@v\fi\@thirdofthree}
-\def\mst@safefork{\ifmmode\if@safe@actives\else\mst@magic@vi\fi\fi\@thirdofthree}
-\def\mst@do@activecase#1#2#3{% #1 is a category 11 or 12 character token
- \@ifundefined{active@char#1}{}{%
- \ifcat #1a\mathcode`#1=#2\else
- \ifx\relax #2\relax\mathcode`#1=`#1 \else\mathcode`#1=#3\fi\fi
- \expandafter\expandafter\expandafter\let\expandafter\expandafter
- \csname mst@orig@user@active#1\endcsname
- \csname user@active#1\endcsname
- \expandafter\expandafter\expandafter\let\expandafter\expandafter
- \csname mst@orig@normal@char#1\endcsname
- \csname normal@char#1\endcsname
- \ifcat #1a%
- \expandafter\edef\csname user@active#1\endcsname
- {\noexpand\mst@fork {{#2\noexpand#3}}{}\expandafter
- \noexpand\csname mst@orig@user@active#1\endcsname
- }%
- \expandafter\edef\csname normal@char#1\endcsname
- {\noexpand\mst@safefork {{#2\noexpand#3}}{}\expandafter
- \noexpand\csname mst@orig@normal@char#1\endcsname
- }%
- \else
- \expandafter\edef\csname user@active#1\endcsname
- {\noexpand\mst@fork {#2}\noexpand#3\expandafter
- \noexpand\csname mst@orig@user@active#1\endcsname
- }%
- \expandafter\edef\csname normal@char#1\endcsname
- {\noexpand\mst@safefork {#2}\noexpand#3\expandafter
- \noexpand\csname mst@orig@normal@char#1\endcsname
- }%
- \fi}}
-\begingroup
- \catcode`\~=\active
- \def\x{\endgroup
- \def\mst@mathactivate##1##2##3{% ##1 guaranteed of cat 11 or 12
- \begingroup
- \lccode`~=`##1
- \lccode`##1=`##1
- \lowercase{\endgroup
- \ifnum\catcode`##1=\active
- \mst@do@activecase ##1{##2}##3%
- % careful as ##2 is empty in the asterisk and
- % prime case!
- \else
- \mathcode`##1="8000
- % version 1.3 adds the possibility of extra skips around letters,
- % (only if non catcode active at the time of use).
- \ifcat##1a\edef~{% extra braces for a^b for example
- {\expandafter\noexpand\csname mst@before##1\endcsname
- ##2\noexpand##3%
- \expandafter\noexpand\csname mst@after##1\endcsname}}%
- \else\def~{##2##3}\fi
- \fi}}}
-\x
-\def\mst@addtodo@nonletters#1#2#3{%
- % #1 will be of cat 11 or 12.
- % #2 is empty for asterisk and right quote
- \mst@do@nonletters\expandafter
- {\the\mst@do@nonletters \mst@mathactivate#1{#2}#3}%
-}
-\def\mst@addtodo@easynonletters#1#2{% #1 is a one char control sequence
- \mst@do@easynonletters\expandafter{\the\mst@do@easynonletters\mathcode`#1=#2}%
-}
-\def\mst@addtodo@az#1#2{%
- \mst@do@az\expandafter{\the\mst@do@az\mst@mathactivate#1#2\mst@itcorr}
-}
-\def\mst@addtodo@AZ#1#2{%
- \mst@do@AZ\expandafter{\the\mst@do@AZ\mst@mathactivate#1#2\mst@ITcorr}%
-}
+ \def\mst@addtodo@easynonletters#1#2{%
+ \mst@do@easynonletters\expandafter
+ {\the\mst@do@easynonletters
+ \mst@OnlyIfNotMathActive{#1}{\mathcode`#1=#2}}%
+ \def\mst@tmp##1\relax{%
+ \def\mst@tmp{\mst@OnlyIfNotMathActive{#1}{\mathcode`#1=##1\relax}}%
+ }%
+ \expandafter\mst@tmp\the\mathcode`#1\relax
+ \mst@undo@easynonletters\expandafter\expandafter\expandafter
+ {\expandafter\mst@tmp\the\mst@undo@easynonletters}%
+ }%
+ \def\mst@addtodo@easynonletters@U#1#2{%
+ \mst@do@easynonletters\expandafter{%
+ \the\mst@do@easynonletters
+ \mst@OnlyIfNotMathActive{#1}{\mst@Umathcodenum`#1=#2}%
+ }%
+ \def\mst@tmp##1\relax{%
+ \def\mst@tmp{\mst@OnlyIfNotMathActive{#1}{\mst@Umathcodenum`#1=##1\relax}}%
+ }%
+ \expandafter\mst@tmp\the\mst@Umathcodenum`#1\relax
+ \mst@undo@easynonletters\expandafter\expandafter\expandafter
+ {\expandafter\mst@tmp\the\mst@undo@easynonletters}%
+ }%
+\fi
% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
+% \end{macro}
% \begin{macro}{\newmcodes@}
% \begin{macro}{\mst@newmcodes@}
% \begin{macro}{\MTresetnewmcodes}
% \begin{macro}{\MTcustomizenewmcodes}
-% |1.15d|: the \cs{newmcodes@} amsmath macro causes an error in Unicode engines as soon
-% someone assigns a Unicode mathcode to the minus sign, and then makes a
-% \cs{DeclareMathOperator} declaration. Furthermore it hard-codes the font
-% family 0 as being the one to be used. Moreover just putting the concerned
-% signs |-|, |:|, |.|, |\| ,|'|, |*| inside braces emulates enough the
-% behavior (although the tick will give a prime).
+% \mstrelease{1.15d}: the \cs{newmcodes@} amsmath macro causes an error in
+% Unicode engines as soon someone assigns a Unicode mathcode to the minus
+% sign, and then makes a \cs{DeclareMathOperator} declaration. Furthermore
+% it hard-codes the font family 0 as being the one to be used. Moreover just
+% putting the concerned signs |-|, |:|, |.|, |\| ,|'|, |*| inside braces
+% emulates enough the behavior (although the tick will give a prime).
%
-% |1.3|: now tests if `basic' option was used.
+% \mstrelease{1.3}: now tests if `basic' option was used.
%
-% |1.3d|: I should re-examine the situation with |\newmcodes@|. In the
+% \mstrelease{1.3d}: I should re-examine the situation with |\newmcodes@|. In the
% meantime its relaxification will not be done if lualatex-math is
% loaded. And the whole thing is put at begin document.
%
-% |1.3m|: |lualatex-math 1.5| n'a pas modifi son traitement de |\newmcodes@|
+% \mstrelease{1.3m}: |lualatex-math 1.5| n'a pas modifi son traitement de |\newmcodes@|
% mais par contre a supprim le patch de \cs{resetMathstrut@}. Mais la date
-% de release est reste |2015/09/22| (date de |1.4a|) au lieu de quelque
+% de release est reste |2015/09/22| (date de \mstrelease{1.4a}) au lieu de quelque
% chose comme |2016/03/13| (date pour l'annonce sur CTAN). Il faudra suivre
% l'volution future de |amsmath.sty| maintenant assure par D.C.
%
-% |1.3n 2016/04/22|: there is no more a patch of |\newmcodes@| by
+% \mstrelease{1.3n} |2016/04/22|: there is no more a patch of |\newmcodes@| by
% |lualatex-math 1.6| |(2016/04/16)|, as |amsmath 2016/03/10 v2.15b| has now
% a version compatible with \LuaLaTeX.
%
% My very radical |\let\newmcodes@\relax| was only a temporary measure I
% adopted for lack of time on October 13, 2012, and apart from avoiding to
% do that in case |lualatex-math| was detected, I never came back... finally
-% I handle it myself for |1.3n|. The remaining problem of this macro (now
+% I handle it myself for \mstrelease{1.3n}. The remaining problem of this macro (now
% that it does not anymore crash |lualatex| or vice versa) is that (also
% with |amsmath| version |2016/03/10 v2.15b|) it hardcodes the font used.
% The aim of the macro is to modify the type of spacing affected to symbols
@@ -6954,7 +7147,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \item \mst makes (or not, depending on commands issued by the user) these
% characters math active (the right tick already is), which complicates
% recovery of former mathcode. We have mathchar type \emph{macros}, but
-% then the complication is in diverging behaviours of the engines:
+% then the complication is in diverging behaviors of the engines:
% |\numexpr\mst@varfam@minus\relax| works with \LuaTeX, not with \XeTeX.
% \item the |*| must presumably really be the non-lowered text glyph.
% \item for the |-| I hesitated but do use the hyphen in the end.
@@ -6979,7 +7172,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \item I noticed that \LuaLaTeX\ does not apply the ``TeX Ligature'' (bad
% name) regarding the right tick APOSTROPHE being transformed into RIGHT
% SINGLE QUOTATION MARK in math mode, but \XeLaTeX\ does. From the point
-% of view of \mst, the behaviour of \XeLaTeX\ is the coherent one. It
+% of view of \mst, the behavior of \XeLaTeX\ is the coherent one. It
% appears that \LuaLaTeX\ use in math mode of a text font does not obey
% the set features.^^A like this
%^^A \url{http://tex.stackexchange.com/questions/208688/oldstylefigure-issue-with-lualatex-and-mathastext}
@@ -6997,7 +7190,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% in 2012! I spent some hours on this small thing, with consequent testing and
% for example this TeX Ligature issue with Unicode engines.
%
-% Since |1.3v| we require e-\TeX{} extensions, so a test for
+% Since \mstrelease{1.3v} we require e-\TeX{} extensions, so a test for
% \cs{numexpr} has been dropped here.
% \begin{macrocode}
\ifmst@basic
@@ -7027,7 +7220,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
}%
\let\mst@originalnewmcodes@\newmcodes@
\fi
- }% end of AtBeginDocument
+ }%
\else
\AtBeginDocument {%
\ifx\newmcodes@\@undefined\else
@@ -7047,9 +7240,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
}%
\let\mst@originalnewmcodes@\newmcodes@
\fi
- }% end of second AtBeginDocument
- \fi % mst@XeOrLua
-\fi % mst@basic
+ }%
+ \fi
+\fi
\newcommand*\MTresetnewmcodes{\ifx\mst@originalnewmcodes@\undefined\else
\let\newmcodes@\mst@originalnewmcodes@\fi}
\newcommand*\MTcustomizenewmcodes{\ifx\mst@originalnewmcodes@\undefined\else
@@ -7080,7 +7273,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% we'll see.
% \begin{macro}{\MTmathoperators-}\begin{macro}{obeymathxx}
% \begin{macro}{\MTmathoperators-}\begin{macro}{donot-}\begin{macro}{obeymathxx}
-% |1.2|: rather than just replacing \cs{symoperators} by
+% \mstrelease{1.2}: rather than just replacing \cs{symoperators} by
% \cs{symmtoperatorfont} I add a modification which makes the
% declared operator names sensitive to the math alphabets... ouh le
% vilain!
@@ -7093,7 +7286,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
% \begin{macro}{mtletterfont}
-% At version |1.1|, we add the possibility to mimick the standard
+% At version \mstrelease{1.1}, we add the possibility to mimick the standard
% behavior, that is to have italic letters and upright
% digits. Thanks to Tariq~\textsc{Perwez} and
% Kevin~\textsc{Klement} who asked for such a feature.
@@ -7134,39 +7327,59 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% simultaneously when specified with |mode=base|. It does work with
% |mode=node| but this mode ``does not work in math mode.''
%
-% Done for |1.3o| of |2016/05/03|.
+% Done for \mstrelease{1.3o} of |2016/05/03|.
+%
+% \mstrelease{1.3p} renames the macro to \cs{MTfixmathfonts} for public access.
+%
+% \mstrelease{1.4} intercepts also |mode=harf|. Cf
+% \url{https://tex.stackexchange.com/questions/722084/change-number-style-with-mathastext}
+% (thanks to |user691586| for bug report). The new code unconditionally
+% replaces |mode=foo| by |mode=base|. The complications due to the output of
+% |\fontname| using only category 12 characters are handled in a different way
+% than the |2016| code.
%
-% |1.3p| renames the macro to \cs{MTfixmathfonts} for public access.
+% The \url{https://github.com/latex3/fontspec/issues/525} problem causes
+% additional complications.
+%
+% Perhaps I should simply zap spaces always rather than check for quotes?
+% Anyway this appears to work.
% \begin{macrocode}
-\begingroup
-\catcode`N 12
-\catcode`O 12
-\catcode`D 12
-\catcode`E 12
-\lowercase{\gdef\mst@fixmathfonts@ #1=NODE;#2#3\relax #4\@empty #5}%
- {\ifx#2\empty\else\font\mst@mathfont=#1=base;#2#3\relax#5=\mst@mathfont\fi}
-\lowercase{\gdef\MTfixmathfonts
-{\expandafter\mst@fixmathfonts@
- \fontname\textfont\symmtoperatorfont\relax\relax=NODE;\empty\relax\@empty
- {\textfont\symmtoperatorfont}%
- \expandafter\mst@fixmathfonts@
- \fontname\scriptfont\symmtoperatorfont\relax\relax=NODE;\empty\relax\@empty
- {\scriptfont\symmtoperatorfont}%
- \expandafter\mst@fixmathfonts@
- \fontname\scriptscriptfont\symmtoperatorfont\relax\relax=NODE;\empty\relax\@empty
- {\scriptscriptfont\symmtoperatorfont}%
- \expandafter\mst@fixmathfonts@
- \fontname\textfont\symmtletterfont\relax\relax=NODE;\empty\relax\@empty
- {\textfont\symmtletterfont}%
- \expandafter\mst@fixmathfonts@
- \fontname\scriptfont\symmtletterfont\relax\relax=NODE;\empty\relax\@empty
- {\scriptfont\symmtletterfont}%
- \expandafter\mst@fixmathfonts@
- \fontname\scriptscriptfont\symmtletterfont\relax\relax=NODE;\empty\relax\@empty
- {\scriptscriptfont\symmtletterfont}%
- }%
+\def\mst@fixmathfonts@#1.#2.#3.{%
+\def\mst@fixmathfonts@##1##2#1=##3;##4##5\relax##6\@empty##7{%
+ \ifx##3\empty\else
+ \if"##1%
+ \font\mst@mathfont=##1##2#1=base;##4##5\relax
+ \else
+ \mst@arrrrgh@fixmathfonts##1##2#1=base;##4##5#2\empty#3\relax
+ \fi
+ ##7=\mst@mathfont
+ \fi
}%
-\endgroup
+\def\mst@arrrrgh@fixmathfonts##1#2##2##3#3##4\relax{%
+ \ifx##2\empty
+ \font\mst@mathfont="##1"\relax
+ \else
+ \font\mst@mathfont="##1"#2##2##3#3\relax
+ \fi
+}%
+}%
+\expandafter\mst@fixmathfonts@\detokenize{mode. at.pt.}%
+\def\MTfixmathfonts#1{%
+\def\MTfixmathfonts{%
+ \expandafter\mst@fixmathfonts@\fontname\textfont\symmtoperatorfont
+ \relax\relax #1=;\empty\relax\@empty{\textfont\symmtoperatorfont}%
+ \expandafter\mst@fixmathfonts@\fontname\scriptfont\symmtoperatorfont
+ \relax\relax #1=;\empty\relax\@empty{\scriptfont\symmtoperatorfont}%
+ \expandafter\mst@fixmathfonts@\fontname\scriptscriptfont\symmtoperatorfont
+ \relax\relax #1=;\empty\relax\@empty{\scriptscriptfont\symmtoperatorfont}%
+ \expandafter\mst@fixmathfonts@\fontname\textfont\symmtletterfont
+ \relax\relax #1=;\empty\relax\@empty{\textfont\symmtletterfont}%
+ \expandafter\mst@fixmathfonts@\fontname\scriptfont\symmtletterfont
+ \relax\relax #1=;\empty\relax\@empty{\scriptfont\symmtletterfont}%
+ \expandafter\mst@fixmathfonts@\fontname\scriptscriptfont\symmtletterfont
+ \relax\relax #1=;\empty\relax\@empty{\scriptscriptfont\symmtletterfont}%
+}}%
+\expandafter\MTfixmathfonts\expandafter{\detokenize{mode}}%
\ifmst@LuaTeX
\everymath\expandafter{\the\everymath\mst@fixmathfonts}%
\everydisplay\expandafter{\the\everydisplay\mst@fixmathfonts}%
@@ -7198,7 +7411,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \cs{mathrm} and not \cs{mathnormal}.
%
% Actually math alphabet macros are created robust since \LaTeX{} from 2005,
-% so at |1.3v 2019/09/19| I decided to modify the old \mst approach a bit.
+% so at \mstrelease{1.3v} |2019/09/19| I decided to modify the old \mst approach a bit.
% Indeed with the old approach a \cs{mathtt} in a moving argument translates
% ultimately into \cs{Mathtt} but if for example the new context where it
% gets expanded is a subdued normal math version, this does not give the same
@@ -7220,10 +7433,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% robustness (except of course in the subdued math versions as there the math
% alphabets acquire back their original robust meanings.)
%
-% Potential breaking change at |1.3za|, the |defaultbf| etc... options do
+% Potential breaking change at \mstrelease{1.3za}, the |defaultbf| etc... options do
% not prevent the package declaring |\Mathbf| etc... commands.
%
-% |1.3za| defines a \cs{Mathnormalbold} and then defines \cs{mathnormalbold}
+% \mstrelease{1.3za} defines a \cs{Mathnormalbold} and then defines \cs{mathnormalbold}
% in terms of it in place of defining directly \cs{mathnormalbold} as a math
% alphabet. This is in relation to implementation of the |LGRgreek+|
% option. There was some hesitation though to restrict this change to that
@@ -7249,7 +7462,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\mst@original@it\mathit
\let\mst@original@sf\mathsf
\let\mst@original@tt\mathtt
-\def\mst@restorealphabets{% for subdued
+\def\mst@restorealphabets{%
\let\mathnormal\mst@original@normal
\let\mathrm\mst@original@rm
\let\mathbf\mst@original@bf
@@ -7264,7 +7477,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% there to be a robust and easy way to know when one is in the argument of
% \cs{mathrm} or \cs{mathbf}, and the code is spread on various chapters of
% \texttt{source2e.pdf}, and the comments are often not up-to-date. So I did
-% not try a too complex hack and decided for |1.3za| to add a numeric
+% not try a too complex hack and decided for \mstrelease{1.3za} to add a numeric
% indicator to let Greek letters react to it. It incorporates a space to be
% self-delimiting in an \cs{ifcase} to maintain expandability in numeric
% context of the to-be-defined Greek control sequences.
@@ -7316,7 +7529,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\MTgreekupdefault}
% \begin{macro}{\MTgreekitdefault}
% \begin{macro}{selfGreek}
-% |1.14b|: We can not move the \cs{DeclareSymbolFont} to the
+% \mstrelease{1.14b}: We can not move the \cs{DeclareSymbolFont} to the
% \cs{Mathastext} macro because it resets the font family in *all*
% math versions, and some could have been defined by the user with
% previous calls to \cs{Mathastext}. So we have to have them here.
@@ -7336,7 +7549,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% First we establish the cumulative effect of the greek related options.
%
-% |1.15c| introduces some possibilities to change the shapes of Greek letters
+% \mstrelease{1.15c} introduces some possibilities to change the shapes of Greek letters
% in each math versions, and even the Greek font (in LGR encoding). The
% commands \cs{MTitgreek} etc... will be used in-between calls to
% \cs{Mathastext} and re-adjust the shapes. And the command \cs{MTgreekfont}
@@ -7355,7 +7568,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \LaTeX\ (since 2020-02-02 now that I check this out). As a result this
% triggered Font Warnings in the log about the replacement of |up| by |n|.
%
-% |1.3x| refactors completely the handling of Greek letter shapes under the
+% \mstrelease{1.3y} refactors completely the handling of Greek letter shapes under the
% |LGRgreek(s)| options (and only under them). Under these options we don't
% use one font for lowercase Greek and anotherone for uppercase Greek (some
% above code comments have not been updated) but one math font |mtgreekit| for italic Greek
@@ -7372,7 +7585,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% In order to maintain perfect identical code for non-|LGRgreek|, the
% |LGRgreek| related code is simply added to previously shared
-% constructions. The |LGRgreek| behaviour will remain identical in most
+% constructions. The |LGRgreek| behavior will remain identical in most
% documents, but for example those who used some adventurous `|sc|' for the
% main shape (the one used per default for operator names) need to adjust
% \cs{MTgreekupdefault} to be `|sc|', for the math version being defined, or
@@ -7386,9 +7599,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% package; to be examined next time --- which may be a long time in
% future!).
%
-% Unfortunately the |1.3x/1.3y| did some internal renamings here (using
+% Unfortunately the \mstrelease{1.3y} did some internal renamings here (using
% |@lgr@| in macro names in place of |@greek@|) which were not everywhere
-% followed up, and this broke the |selfGreek| option. Fixed at |1.3z|.
+% followed up, and this broke the |selfGreek| option. Fixed at \mstrelease{1.3z}.
%
% \begin{macrocode}
\providecommand*\MTgreekupdefault{n}
@@ -7442,14 +7655,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\mathgreekit}
% \begin{macro}{\mathgreekupbold}
% \begin{macro}{\mathgreekitbold}
-% The |1.3x| refactoring was done in order to be able to define \cs{alphaup},
+% The \mstrelease{1.3y} refactoring was done in order to be able to define \cs{alphaup},
% etc \dots\ control sequences (\cs{mathchar}'s), as well as the italic ones.
% Formerly two math fonts were created but to be used respectively with
% lowercase or uppercase Greek. Now we have two fonts indexed by their shape,
% and we take advantage to create two math alphabets mapping to the two
% defined symbol fonts |mtgreekup| and |mtgreekit|.
%
-% |1.3za| adds \cs{mathgreekupbold} and \cs{mathgreekitbold}.
+% \mstrelease{1.3za} adds \cs{mathgreekupbold} and \cs{mathgreekitbold}.
% \begin{macrocode}
\ifmst@LGRgreek
\DeclareFontEncoding{LGR}{}{}
@@ -7484,10 +7697,11 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% In case we need the Euler font, we declare it here. It will use
% |uzeur.fd| from the \ctanpkg{eulervm} package of Walter~\textsc{Schmidt}
% \begin{macrocode}
-\ifmst@needeuler\mst@infoline{will use Euler font; command \string\MTEulerScale}
-\DeclareSymbolFont{mteulervm}{U}{zeur}{m}{n}
-\DeclareSymbolFontAlphabet{\MathEuler}{mteulervm}
-\DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\mst@bold}{n}
+\ifmst@needeuler
+\mst@infoline{will use Euler font; command \string\MTEulerScale}
+ \DeclareSymbolFont{mteulervm}{U}{zeur}{m}{n}
+ \DeclareSymbolFontAlphabet{\MathEuler}{mteulervm}
+ \DeclareMathAlphabet{\MathEulerBold}{U}{zeur}{\mst@bold}{n}
\fi
\newcommand*\MTEulerScale[1]{\edef\zeu@Scale{#1}}
\let\MathastextEulerScale\MTEulerScale
@@ -7534,14 +7748,15 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \cs{psy@scale} will be used to scale the font (see at the
% very end of this file).
% \begin{macrocode}
-\ifmst@needsymbol\mst@infoline{will use Symbol font; command \string\MTSymbolScale}
- \def\psy@scale{1}
- \DeclareSymbolFont{mtpsymbol}{U}{psy}{m}{n}
- \DeclareSymbolFontAlphabet{\MathPSymbol}{mtpsymbol}
-\AtBeginDocument{%
- \DeclareFontFamily{U}{psy}{}%
- \DeclareFontShape{U}{psy}{m}{n}{<->s*[\psy@scale] psyr}{}%
-}
+\ifmst@needsymbol
+ \mst@infoline{will use Symbol font; command \string\MTSymbolScale}
+ \def\psy@scale{1}
+ \DeclareSymbolFont{mtpsymbol}{U}{psy}{m}{n}
+ \DeclareSymbolFontAlphabet{\MathPSymbol}{mtpsymbol}
+ \AtBeginDocument{%
+ \DeclareFontFamily{U}{psy}{}%
+ \DeclareFontShape{U}{psy}{m}{n}{<->s*[\psy@scale] psyr}{}%
+ }
\fi
\newcommand*\MTSymbolScale[1]{\edef\psy@scale{#1}}
\let\MathastextSymbolScale\MTSymbolScale
@@ -7553,10 +7768,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macro}
% \end{macro}
% \begin{macro}{\pmvec}
-% Definition of a poor man version of the \cs{vec} accent
+% Definition of a poor man version of the \cs{vec} accent.
+% Done using \cs{protected}\cs{def} at \mstrelease{1.4}.
% \begin{macrocode}
-\DeclareRobustCommand*\pmvec[1]{\mathord{\stackrel{\raisebox{-.5ex}%
-{\tiny\boldmath$\mathord{\rightarrow}$}}{{}#1}}}
+\protected\def\pmvec#1{%
+ \mathord{\stackrel{\raisebox{-.5ex}{\tiny\boldmath$\mathord{\rightarrow}$}}%
+ {{}#1}%
+ }%
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\fouriervec}
@@ -7584,7 +7803,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% Some public macros to modify our private internals, and
% we will use them also ourself.
%
-% In version |1.1| we add the possibility to have two
+% In version \mstrelease{1.1} we add the possibility to have two
% distinct font shapes for letters and digits. So in fact
% we could as well have two really unrelated fonts but
% this is really not the spirit of the package.
@@ -7594,7 +7813,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% same time not modifying the \cs{familydefault} or \cs{romandefault}
% etc\dots
%
-% At time of |1.3za| I considered letting |LGRgreeks| and |selfGreeks|
+% At time of \mstrelease{1.3za} I considered letting |LGRgreeks| and |selfGreeks|
% support \cs{MTgreekfont} and this needed a chaneg to \cs{MTfamily}
% here but I dropped the idea. Too wary of documentation changes.
% \begin{macrocode}
@@ -7622,14 +7841,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\MTitGreek}
% \begin{macro}{\MTupGreek}
% \begin{macro}{\MTgreekfont}
-% |1.15c|: These new macros can be used in-between calls to \cs{Mathastext}.
+% \mstrelease{1.15c}: These new macros can be used in-between calls to \cs{Mathastext}.
% They reset the shapes for Greek letters (applies to LGRgreek(s) and
% selfGreek(s) options). The \cs{MTgreekfont} presupposes either LGRgreek or
% selfGreek (it is inoperant under |LGRgreeks| or |selfGreeks|).
% |\MTgreekfont{\familydefault}| is somewhat like using LGRgreeks or
% selfGreeks.
%
-% At time of |1.3za| I let \cs{MTgreekfont} also have an effect under option
+% At time of \mstrelease{1.3za} I let \cs{MTgreekfont} also have an effect under option
% |LGRgreeks| or |selfGreeks|, via a refactoring which also modified \cs{MTfamily}.
% \begin{macrocode}
\newcommand*\MTitgreek{\mst@itgreektrue\mst@upgreekfalse\def\mst@greek@select{0}}
@@ -7648,55 +7867,359 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macro}
% \end{macro}
% \end{macro}
+%
% At (long...) last we now change the font for the letters of the
-% latin alphabet. In version |1.1|, Latin letters have their own font
+% latin alphabet. In version \mstrelease{1.1}, Latin letters have their own font
% (shape).
%
-% |1.2b| initiated the use of mathematically active letters to insert the italic
-% corrections. With version |1.3| the use of math active letters is also for
-% extra muglue added before and after the letters. Use of |\@for| to shorten the
-% code initiated with release |1.3|.
+% \mstrelease{1.2b} |2012/12/28| now that we understand the great advantages of |"8000|
+% we do it also for all letters a-z and A-Z to insert automatically the
+% italic corrections. See the \hyperref[sec:ic]{discussion} in the user
+% manual. Ironically I wrote the code initially for the |italic| option only
+% to realize later it was more suitable to using an \emph{upright} text font
+% in math mode! So this mathematical activation of the letters is not done if
+% the font shape is detected to be |it| or |sl|; to bypass this the command
+% \cs{MTicinmath} is provided.
+%
+% \mstrelease{1.2e} |2013/01/10| corrects a bad oversight of \mstrelease{1.2b} in
+% \cs{mst@mathactivate} which made the reproduction of the user manual
+% illustrations with |$f_i^i$| impossible. As \cs{mst@mathactivate} was
+% originally used also to get the non-letters obey math alphabet while
+% maintaining the \TeX{} spacings, it added no extra braces. The braces
+% should however be added for expansion of math active letters, in order of
+% things like |x^y| to work as expected. (the group braces do not prevent
+% ligatures when the letters are arguments to the math alphabet commands,
+% the added macros \cs{mst@itcorr} and \cs{mst@before@<letter>} expanding to
+% nothing).
+%
+% Added note |2016/01/06|: it should be explicitly said that the extra
+% |{..}| in |\mst@mathactivate| for letters end up creating |\hbox|'es
+% around each letter with its extra skips and explicit italic correction,
+% when present. These skips are thus set at natural width and do not add
+% any break point.
+%
+% Added note at \mstrelease{1.4}: the extra pair of braces is inserted here
+% at \cs{mst@DeclareMathLetter}, not at \cs{mst@mathactivate}.
+%
+% \mstrelease{1.3} |2013/09/02| extends the use of mathematically active letters to
+% allow the user to specify muglue before and after the letter itself (see
+% \cs{MTsetmathskips}, below).
+% Mathematically active letters were previously used only to add the italic
+% correction; the math activation has now been separated and put in
+% \cs{MTmathactiveletters}. There is also \cs{MTmathactiveLetters} to allow
+% math activation only for the uppercase letters. To cancel the (now default,
+% even with option |italic|) math
+% activation of letters, there is \cs{MTmathstandardletters}. Version \mstrelease{1.3a}
+% removes some silly |\string|'s from the code, which prevented to pass
+% macros as first argument to the command.
+%
+% Added note |2016/01/06|:
+% Notice that the initially |\relax| tokens \verb+\mst@[before|after]@<letter>+
+% formed with |\csname...\endcsname| do not modify TeX's math layout:
+% |{\relax f\relax}| is like |f| (also for ligatures inside |\mathrm| for
+% example).
+%
+% The code here was refactored at \mstrelease{1.4} and this simplified
+% \cs{mst@mathactivate} definition.
+%
+% The \cs{mst@before}\meta{letter} were renamed at \mstrelease{1.4} into
+% \cs{mst@before@}\meta{letter} and are incorporated at the
+% \cs{mst@DeclareMathLetter} location. Formerly \cs{mst@}\meta{letter} was
+% only the math symbol, now \cs{MTmathcharletter}\meta{letter} is used for that and
+% \cs{MTcommandletter}\meta{letter} is the whole thing to which the active letter
+% expands (the definition of the active letter done by \cs{mst@mathactivate}
+% is done with a \cs{def}, not a \cs{let}).
+% \begin{macro}{\mst@DeclareMathLetter}
+%
+% \mstrelease{1.4b} adds |noletters| option.
% \begin{macrocode}
-\def\mst@DeclareMathLetter #1{%
+\ifmst@noletters
+ \let\MTmathactiveletters\@empty
+ \let\MTmathactiveLetters\@empty
+ \let\MTmathstandardletters\@empty
+\else
+\def\mst@DeclareMathLetter#1#2#3#4#5{%
\DeclareMathSymbol {#1}{\mathalpha}{mtletterfont}{`#1}%
- \expandafter
- \DeclareMathSymbol \csname mst@#1\endcsname{\mathalpha}{mtletterfont}{`#1}%
- \expandafter\mst@addtodo@az\expandafter #1\csname mst@#1\endcsname
+ \DeclareMathSymbol {#4}{\mathalpha}{mtletterfont}{`#1}%
+ \def#2{{#3#4#5\mst@itcorr}}%
+}%
+\@tfor\mst@tmp:=abcdefghijklmnopqrstuvwxyz\do{%
+ \expandafter\expandafter\expandafter\mst@DeclareMathLetter
+ \expandafter\mst@tmp
+ \csname MTcommandletter\mst@tmp\expandafter\endcsname
+ \csname mst@before@\mst@tmp\expandafter\endcsname
+ \csname MTmathcharletter\mst@tmp\expandafter\endcsname
+ \csname mst@after@\mst@tmp\endcsname
}%
-\@tfor\mst@tmp:=abcdefghijklmnopqrstuvwxyz\do
- {\expandafter\mst@DeclareMathLetter\mst@tmp}%
\ifmst@frenchmath \def\mst@font@tbu{mtoperatorfont}%
\else \def\mst@font@tbu{mtletterfont}%
\fi
-\def\mst@DeclareMathLetter #1{%
+\def\mst@DeclareMathLetter #1#2#3#4#5{%
\DeclareMathSymbol {#1}{\mathalpha}{\mst@font@tbu}{`#1}%
- \expandafter
- \DeclareMathSymbol \csname mst@#1\endcsname{\mathalpha}{\mst@font@tbu}{`#1}%
- \expandafter\mst@addtodo@AZ\expandafter #1\csname mst@#1\endcsname
+ \DeclareMathSymbol {#4}{\mathalpha}{\mst@font@tbu}{`#1}%
+ \def#2{{#3#4#5\mst@ITcorr}}%
}%
-\@tfor\mst@tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do
- {\expandafter\mst@DeclareMathLetter\mst@tmp}%
-\let\mst@DeclareMathLetter\relax
+\@tfor\mst@tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{%
+ \expandafter\expandafter\expandafter\mst@DeclareMathLetter
+ \expandafter\mst@tmp
+ \csname MTcommandletter\mst@tmp\expandafter\endcsname
+ \csname mst@before@\mst@tmp\expandafter\endcsname
+ \csname MTmathcharletter\mst@tmp\expandafter\endcsname
+ \csname mst@after@\mst@tmp\endcsname
+}%
+\def\mst@mathactivate@lowercase{%
+ \@tfor\mst@tmp:=abcdefghijklmnopqrstuvwxyz\do{%
+ \expandafter\expandafter\expandafter
+ \mst@mathactivate\expandafter\mst@tmp\csname MTcommandletter\mst@tmp\endcsname{}%
+ }%
+}%
+\def\mst@mathactivate@uppercase{%
+ \@tfor\mst@tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{%
+ \expandafter\expandafter\expandafter
+ \mst@mathactivate\expandafter\mst@tmp\csname MTcommandletter\mst@tmp\endcsname{}%
+ }%
+}%
+\def\mst@mathdeactivate@lowercase{%
+ \@tfor\mst@tmp:=abcdefghijklmnopqrstuvwxyz\do{%
+ \expandafter\mathcode\expandafter`\mst@tmp=\csname MTmathcharletter\mst@tmp\endcsname
+ }%
+}%
+\def\mst@mathdeactivate@uppercase{%
+ \@tfor\mst@tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{%
+ \expandafter\mathcode\expandafter`\mst@tmp=\csname MTmathcharletter\mst@tmp\endcsname
+ }%
+}%
+% \end{macrocode}
+% We redo the definitions with some added layer (silly because will never
+% happen in pratice that a letter is Babel-active) related to
+% \cs{mst@do@activecase} in \ctanpkg{babel} context.
+% \begin{macrocode}
+\ifmst@everymath
+\else
+ \def\mst@mathdeactivate@lowercase{%
+ \@tfor\mst@tmp:=abcdefghijklmnopqrstuvwxyz\do{%
+ \expandafter\mathcode\expandafter`\mst@tmp=
+ \csname MTmathcharletter\mst@tmp\endcsname
+ }%
+ }%
+ \def\mst@mathdeactivate@uppercase{%
+ \@tfor\mst@tmp:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{%
+ \expandafter\mathcode\expandafter`\mst@tmp=
+ \csname MTmathcharletter\mst@tmp\endcsname
+ }%
+ }%
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\MTmathactiveletters}
+% \begin{macro}{\MTmathstandardletters}
+%
+% Important changes at \mstrelease{1.4}.
+%
+% Ascii letters are math-activated at package loading time, rather than again and
+% again each time math mode is entered. But not under |subdued| mode, then
+% the activation is done as part of switching to some math version.
+%
+% The ordering in this code source is a bit of a mess, and it may be too early
+% here to execute \cs{MTmathactiveletters} (I think it is fine now after some
+% major moving around of code chunks but will not waste time checking
+% it) so this will be postponed to end of package loading. Prior to
+% \mstrelease{1.4} \cs{MTmathactiveletters} could be executed here as it only
+% set some toggle to be obeyed at every math mode entrance.
+% \begin{macrocode}
+\def\mst@mathactivateletters{%
+ \mst@mathactivate@lowercase
+ \mst@mathactivate@uppercase
+}%
+\newcommand*\MTmathactiveletters{%
+ \mst@OnlyIfNotSubdued
+ \mst@mathactivateletters
+}%
+\AtEndOfPackage{\MTmathactiveletters}%
+% \end{macrocode}
+% Duplication due to some legacy reasons, do not rely on these internal
+% macro names, beware they change at future release.
+% \begin{macrocode}
+\def\mst@mathactivateLetters{\mst@activate@uppercase}%
+\newcommand*\MTmathactiveLetters{%
+ \mst@OnlyIfNotSubdued
+ \mst@mathactivateLetters
+}%
+\newcommand*\MTmathstandardletters{%
+ \mst@mathdeactivate@lowercase
+ \mst@mathdeactivate@uppercase
+}%
+\fi
+% \end{macrocode}
+% \end{macro}\end{macro}
+% \begin{macro}{\MTicinmath}
+% \begin{macro}{\MTICinmath}
+% \begin{macro}{\MTnoicinmath}
+% \begin{macro}{\MTicalsoinmathxx}
+% \cs{MTnoicinmath} can also be used from inside math mode.
+%
+% \cs{MTicalsoinmathxx} is destined to be used inside
+% \cs{mathnormalbold} as I didn't want to add the complication of
+% extracting the family number used inside \cs{mathnormalbold} (will
+% perhaps come back if I have time to spend on
+% |source2e|). Added note |2016/01/06|: this number is a priori simply
+% |symmtletterfont+1|.
+%
+% \cs{MTicinmath} can also be used inside math mode, to revert an
+% earlier \cs{MTnoicinmath} from inside the same math group.
+%
+% \mstrelease{1.3i} |2016/01/06|: For some reason which I have now forgotten I did
+% until then:
+% \begin{verbatim}
+% \def\mst@itcorr{\ifnum\fam=\m@ne\/\else\ifnum\fam=\symmtletterfont\/\fi\fi}%
+% \end{verbatim}
+% hence italic corrections were also applied inside \cs{mathnormal} (for
+% upright fonts; \cs{mathnormalbold} math alphabet was not treated like
+% \cs{mathnormal}). I now drop this to be more in sync with the handling
+% of the extra skips around letters. Everything gets suppressed inside
+% all math alphabets, allowing ligatures, even for \cs{mathnormal}.
+%
+% \begin{macrocode}
+\newcommand*\MTicinmath{%
+ \MTmathactiveletters
+ \def\mst@itcorr{\ifnum\fam=\m@ne\/\fi}%
+ \let\mst@ITcorr\mst@itcorr
+}
+\newcommand*\MTICinmath{%
+ \MTmathactiveLetters
+ \def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}%
+}
+\newcommand*\MTnoicinmath{\let\mst@itcorr\@empty\let\mst@ITcorr\@empty}
+\newcommand*\MTnoICinmath{\let\mst@ITcorr\@empty}
+\newcommand*\MTicalsoinmathxx{%
+ \ifx\mst@itcorr\@empty\else\def\mst@itcorr{\/}\fi
+ \ifx\mst@ITcorr\@empty\else\def\mst@ITcorr{\/}\fi
+}
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}
+% \begin{macro}{\MTsetmathskips}
+% \begin{macro}{\MTunsetmathskips}
+% \mstrelease{1.3} |2013/09/02|: user level command to specify extra spaces in math mode
+% around the letters (only the 7bit a,b,..,z and A,B,..,Z). First parameter is
+% the letter, second is the math skip to be inserted before, and third the
+% skip to be inserted after; for example \cs{thickmuskip} or explicitly
+% |0.1mu|.
+%
+% For this, letters are made mathematically active. This is now the package
+% default (version \mstrelease{1.2} did this only in the absence of option |italic|, or
+% more precisely when the font used was not of shape |it| or |sl|). But if
+% \cs{MTsetmathskips} has not been used for that letter, the only effect of
+% the math activation is, as in \mstrelease{1.2}, to add the italic correction
+% automatically, except when the font shape is detected to be |it| or |sl|; in
+% these latter cases, although mathematically active, the letter acts in the
+% standard way.
+%
+% The command \cs{MTmathstandardletters} turns off math activation and its
+% effects for all letters.
+%
+% Ligatures within the argument of a math alphabet command are impeached by
+% skips; so \cs{MTunsetmathskips} is provided to cancel the skips for one
+% specific letter (|f| for example).
+%
+% \mstrelease{1.3a} |2013/09/04|: I strangely had |\string#1| inside \cs{MTsetmathskips}.
+% Phobic of catcode active letters... but with |\string| one needs some
+% |\expandafter| to use \cs{MTsetmathskips} in an |\@for| loop for example. It
+% is better to allow the first argument to be a macro or anything expanding to
+% a letter, and to not be paranoid about improbable catcode active letters
+% (the user just has to tame them at the time of the \cs{MTsetmathskip}) so I
+% take out these |\string|'s.
+%
+% \mstrelease{1.3i} |2016/01/06|: the extra skips are suppressed for the arguments of
+% math alphabet commands. This applies in particular for amsmath's
+% \cs{DeclareMathOperator}.
+%
+% \begin{macrocode}
+\newcommand*\MTsetmathskips[3]{%
+ \@namedef{mst@before@#1}{\ifnum\fam=\m@ne\mskip#2\relax\fi}%
+ \@namedef{mst@after@#1}{\ifnum\fam=\m@ne\mskip#3\relax\fi}%
+}
+\newcommand*\MTunsetmathskips[1]{%
+ \@namedef{mst@before@#1}{}%
+ \@namedef{mst@after@#1}{}%
+}
+% \end{macrocode}
+% \end{macro}\end{macro}
+% \begin{macro}{\mst@DeclareMathDigit}
+% \begin{macro}{\MTmathactivedigits}
+% \begin{macro}{\MTmathstandarddigits}
+% In version \mstrelease{1.1}, we have now separated digits from letters, so paradoxically
+% it is less problematic to give them the |mathalpha| type.
+%
+% \mstrelease{1.4} had defined some no-op \cs{MTmathstandarddigits} and
+% \cs{MTmathactivedigits} but if not under option |nodigits|. As they are
+% used in \cs{MTeverymathoff} and \cs{MTeverymathdefault} though this broke
+% the option |nodigits| (either with |subdued| or when using \cs{MTversion}).
+%
+% Defining them as \cs{empty} so that \LaTeX{} defensive mechanism with
+% \cs{newcommand} works but this is sooooooo hypothetical context!
+% \begin{macrocode}
+\let\MTmathactivedigits\empty
+\let\MTmathstandarddigits\empty
\ifmst@nodigits\else
-\def\mst@font@tbu{mtoperatorfont}%
+ \def\mst@font@tbu{mtoperatorfont}%
+ \ifmst@symboldigits \def\mst@font@tbu{mtpsymbol}\fi
+ \ifmst@eulerdigits \def\mst@font@tbu{mteulervm}\fi
+ \DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0}%
+ \DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1}%
+ \DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2}%
+ \DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3}%
+ \DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4}%
+ \DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5}%
+ \DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6}%
+ \DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7}%
+ \DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8}%
+ \DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9}%
% \end{macrocode}
-% In version |1.1|, we have now separated digits from letters, so paradoxically
-% it is less problematic to give them the |mathalpha| type.
-% \begin{macrocode}
-\ifmst@symboldigits \def\mst@font@tbu{mtpsymbol} \fi
-\ifmst@eulerdigits \def\mst@font@tbu{mteulervm} \fi
-\DeclareMathSymbol{0}{\mathalpha}{\mst@font@tbu}{`0}%
-\DeclareMathSymbol{1}{\mathalpha}{\mst@font@tbu}{`1}%
-\DeclareMathSymbol{2}{\mathalpha}{\mst@font@tbu}{`2}%
-\DeclareMathSymbol{3}{\mathalpha}{\mst@font@tbu}{`3}%
-\DeclareMathSymbol{4}{\mathalpha}{\mst@font@tbu}{`4}%
-\DeclareMathSymbol{5}{\mathalpha}{\mst@font@tbu}{`5}%
-\DeclareMathSymbol{6}{\mathalpha}{\mst@font@tbu}{`6}%
-\DeclareMathSymbol{7}{\mathalpha}{\mst@font@tbu}{`7}%
-\DeclareMathSymbol{8}{\mathalpha}{\mst@font@tbu}{`8}%
-\DeclareMathSymbol{9}{\mathalpha}{\mst@font@tbu}{`9}%
+% \mstrelease{1.4} adds possibility of mathematically active digits.
+% \begin{macrocode}
+ \ifmst@activedigits
+ \def\mst@DeclareMathDigit #1#2#3{%
+ \DeclareMathSymbol{#3}{\mathalpha}{\mst@font@tbu}{`#1}%
+ \def#2{#3}%
+ }%
+ \@tfor\mst@tmp:=0123456789\do{%
+ \expandafter\expandafter\expandafter\mst@DeclareMathDigit
+ \expandafter\mst@tmp
+ \csname MTcommanddigit\romannumeral\mst@tmp\expandafter\endcsname
+ \csname MTmathchardigit\romannumeral\mst@tmp\endcsname
+ }%
+ \def\mst@mathactivatedigits{%
+ \@tfor\mst@tmp:=0123456789\do{%
+ \expandafter\expandafter\expandafter\mst@mathactivate
+ \expandafter\mst@tmp\csname MTcommanddigit\romannumeral\mst@tmp\endcsname{}%
+ }%
+ }%
+ \def\MTmathactivedigits{\mst@OnlyIfNotSubdued\mst@mathactivatedigits}%
+ \MTmathactivedigits
+ \ifmst@everymath
+ \def\MTmathstandarddigits{%
+ \@tfor\mst@tmp:=0123456789\do{%
+ \expandafter\mathcode\expandafter`\mst@tmp
+ =\csname MTmathchardigit\romannumeral\mst@tmp\endcsname
+ }%
+ }%
+ \else
+% \end{macrocode}
+% We inject some extra layer (silly because will never happen in pratice
+% that a digit token is Babel-active) related to \cs{mst@do@activecase} in
+% \ctanpkg{babel} context.
+% \begin{macrocode}
+ \def\MTmathstandarddigits{%
+ \@tfor\mst@tmp:=0123456789\do{%
+ \expandafter\mathcode\expandafter`\mst@tmp
+ =\csname MTmathchardigit\romannumeral\mst@tmp\endcsname
+ }%
+ }%
+ \fi
+ \fi
\fi
% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}
% When |symboldelimiters| is passed as an option, we use the
% Symbol font for the printable characters other than
% letters and digits.
@@ -7709,7 +8232,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\def\mst@font@tbu{mtoperatorfont}%
\fi
% \end{macrocode}
-% |1.2| adds the tricks to let non letters/digits obey math alphabets. We have
+% \mstrelease{1.2} adds the tricks to let non letters/digits obey math alphabets. We have
% to double the definitions for easy switch on-off of the mechanism, via a token
% list which is put into \cs{everymath} and \cs{everydisplay}.
% \begin{macrocode}
@@ -7727,7 +8250,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\mst@@doasterisk}
% \begin{macro}{\MTnormalasterisk}
% \begin{macro}{\MTactiveasterisk}
-% |1.12d| The \cs{ast} or |*| is defined in |fontmath.ltx| as a binary
+% \mstrelease{1.12d} The \cs{ast} or |*| is defined in |fontmath.ltx| as a binary
% operator from the |symbols| font. Usually the asterisk from the text
% font is in a raised position. Previous versions of \mst did nothing
% with \cs{ast} but strangely defined |*| to be the one from the text
@@ -7740,61 +8263,100 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% The user macro \cs{MTlowerast} sets the amount
% of lowering to be applied to the text asterisk.
%
-% |1.12e| Somehow there was a big omission in |1.12d|, the
+% \mstrelease{1.12e} Somehow there was a big omission in \mstrelease{1.12d}, the
% command \cs{MTlowerast} as described in the manual was missing!
%
-% nota bene: it is assumed that |*| is of type |other| when \mst
-% is loaded... it should neither be active, nor of type |letter|!
+% \mstrelease{1.3i} adds \cs{MTnormalasterisk} and \cs{MTactiveasterisk}.
+% They do nothing if package is loaded without option |asterisk|.
+%
+% \mstrelease{1.4} uses \cs{protected} rather than robust commands.
+% And implements the support for the new default of not using \cs{everymath}.
%
-% |1.3i| adds \cs{MTnormalasterisk} and \cs{MTactiveasterisk}. They do nothing
-% without option |asterisk|.
+% The first two \cs{newcommand*} are because the commands were previously
+% defined unconditionally anyhow, in a way making them no-op's without
+% option |asterisk|. Finally using \cs{let} here with \cs{empty} with
+% the idea of less impact on \TeX{} internals, but losing \LaTeX{} check.
% \begin{macrocode}
-\def\mst@@doasterisk{\let\ast\mst@ast\mst@mathactivate*{}\mst@ast}%
-\newcommand*\MTnormalasterisk {\let\mst@doasterisk\relax}
-\newcommand*\MTactiveasterisk {\let\mst@doasterisk\mst@@doasterisk}
+\let\MTnormalasterisk\empty
+\let\MTactiveasterisk\empty
\ifmst@asterisk\mst@infoline{asterisk: \string\ast\space and *}
- \AtBeginDocument{%
- \everymath\expandafter
- {\the\everymath \mst@doasterisk \MTnormalasterisk }%
- \everydisplay\expandafter
- {\the\everydisplay\mst@doasterisk \MTnormalasterisk }}
\ifmst@symbolmisc
- \def\mst@bin@ast{%
- \mathbin{\mathchoice{\raisebox{-.1\height}%
- {\the\textfont\symmtpsymbol\char42}}%
- {\raisebox{-.1\height}%
- {\the\textfont\symmtpsymbol\char42}}%
- {\raisebox{-.1\height}%
- {\the\scriptfont\symmtpsymbol\char42}}%
- {\raisebox{-.1\height}%
- {\the\scriptscriptfont\symmtpsymbol\char42}}}}%
+ \protected\def\mst@bin@ast{\mathbin{\mathchoice
+ {\raisebox{-.1\height}{\the\textfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}{\the\textfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}{\the\scriptfont\symmtpsymbol\char42}}%
+ {\raisebox{-.1\height}{\the\scriptscriptfont\symmtpsymbol\char42}}}%
+ }%
\else
- \def\mst@bin@ast{%
- \mathbin{\mathchoice{\raisebox{-\mst@lowerast}%
- {\the\textfont\symmtoperatorfont\char42}}%
- {\raisebox{-\mst@lowerast}%
- {\the\textfont\symmtoperatorfont\char42}}%
- {\raisebox{-\mst@lowerast}%
- {\the\scriptfont\symmtoperatorfont\char42}}%
- {\raisebox{-\mst@lowerast}%
- {\the\scriptscriptfont\symmtoperatorfont\char42}}}}%
+ \protected\def\mst@bin@ast{\mathbin{\mathchoice
+ {\raisebox{-\mst@lowerast}{\the\textfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}{\the\textfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}{\the\scriptfont\symmtoperatorfont\char42}}%
+ {\raisebox{-\mst@lowerast}{\the\scriptscriptfont\symmtoperatorfont\char42}}}%
+ }%
\fi
- \def\mst@varfam@ast{\ifnum\fam=\m@ne\mst@bin@ast\else
- \mathbin{\mathchoice{\raisebox{-\mst@lowerast}%
- {\the\textfont\fam\char42}}%
- {\raisebox{-\mst@lowerast}%
- {\the\textfont\fam\char42}}%
- {\raisebox{-\mst@lowerast}%
- {\the\scriptfont\fam\char42}}%
- {\raisebox{-\mst@lowerast}%
- {\the\scriptscriptfont\fam\char42}}}\fi}%
- \MTactiveasterisk
- \DeclareRobustCommand*{\mst@ast}{\mst@bin@ast}
+ \protected\def\mst@varfam@ast{\ifnum\fam=\m@ne
+ \mst@bin@ast
+ \else
+ \mathbin{\mathchoice
+ {\raisebox{-\mst@lowerast}{\the\textfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}{\the\textfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}{\the\scriptfont\fam\char42}}%
+ {\raisebox{-\mst@lowerast}{\the\scriptscriptfont\fam\char42}}}%
+ \fi}%
+ \let\mst@ast\mst@bin@ast
\newcommand*\MTlowerast[1]{\def\mst@lowerast{#1}}
\MTlowerast{.3\height}
- \mst@do@easynonletters\expandafter\expandafter\expandafter
- {\expandafter\the\expandafter\mst@do@easynonletters
- \expandafter\def\csname mst@ast \endcsname{\mst@varfam@ast}}
+% \end{macrocode}
+% Arguably \mst should have used the ``hard'' non-letters affiliation here.
+% Probably too late to change this in 2024... and costly in documentation
+% time.
+% \begin{macrocode}
+ \mst@do@easynonletters\expandafter{%
+ \the\mst@do@easynonletters\let\mst@ast\mst@varfam@ast
+ }%
+ \ifmst@everymath
+ \def\mst@@doasterisk {\let\ast\mst@ast\mst@mathactivate*{}\mst@ast}%
+ \def\MTnormalasterisk {\let\mst@doasterisk\relax}
+ \def\MTactiveasterisk {\let\mst@doasterisk\mst@@doasterisk}
+ \MTactiveasterisk
+ \AtBeginDocument{%
+ \everymath\expandafter
+ {\the\everymath \mst@doasterisk \MTnormalasterisk }%
+ \everydisplay\expandafter
+ {\the\everydisplay\mst@doasterisk \MTnormalasterisk }%
+ }%
+ \else
+ \def\MTnormalasterisk{\AtBeginDocument{\MTnormalasterisk}}
+ \def\MTactiveasterisk{\AtBeginDocument{\MTactiveasterisk}}
+% \end{macrocode}
+% For legacy reasons the responsiveness to math alphabets is made part of the
+% handling of ``easy'' non letters (probably because it is on per default),
+% and this causes me problems of internal logic and even more annoyingly of
+% documentation. I am leaving this standing because it would be too much of a
+% pain at this stage to document a change and it was already quite annoying to
+% better document actual situation.
+% \begin{macrocode}
+ \mst@undo@easynonletters\expandafter{%
+ \the\mst@do@easynonletters\let\mst@ast\mst@bin@ast
+ }%
+% \end{macrocode}
+% For legacy reasons the action of \cs{MTactiveasterisk} is not testing if
+% in |subdued| mode.
+%
+% MEMO: if |subdued| there is \cs{MTeverymathoff} added to |\begin{document}|
+% near end of package and it will do \cs{MTnormalasterisk}.
+% \begin{macrocode}
+ \AtBeginDocument{%
+ \let\mst@orig@abd@ast\ast
+ \edef\MTnormalasterisk{\noexpand\mst@mathdeactivate*{\the\mathcode`\*}%
+ \let\noexpand\ast\noexpand\mst@orig@abd@ast}%
+ \def\MTactiveasterisk{\def\ast{\mst@ast}%
+ \mst@mathactivate*{}\mst@ast
+ }%
+ \MTactiveasterisk
+ }
+ \fi
\fi
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
@@ -7807,17 +8369,19 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% [(Dec. 2012) should I reexamine these definitive sounding remarks?]
%
-% |1.3x| of |2022/11/03| adds support for |ncccomma| option.
+% \begin{macro}{ncccomma}
+% \begin{macro}{decimalcomma}
+% \mstrelease{1.3y} of |2022/11/03| adds support for |ncccomma| option.
%
% Some non-obvious hack is needed for compatibility with our home-made
% mechanism of non-letters obeying math alphabet commands. Alternative would
-% have been to not load at all \ctanpkg{ncccomma} (or since |1.3zb|
+% have been to not load at all \ctanpkg{ncccomma} (or since \mstrelease{1.3zb}
% \ctanpkg{decimalcomma}) and provide the functionality purely by our own
% means; because here in order to support \cs{MTnonlettersobeymathxx} we are
% almost contrived to override quasi entirely the contents of these tiny
% packages.
%
-% |1.3zb| adds support for the |decimalcomma| option. This was mandatory to
+% \mstrelease{1.3zb} adds support for the |decimalcomma| option. This was mandatory to
% keep a compatibility layer with \ctanpkg{frenchmath} after its |2.7| release
% of |2023/12/23|.
%
@@ -7838,7 +8402,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\RequirePackage{decimalcomma}[2023/12/28]% 1.3 or later
% \end{macrocode}
% Attention
-% that the breaking behavior of \cs{AtBeginDocument} at October 2020
+% that the \textbf{BREAKING CHANGE} to \cs{AtBeginDocument} at October 2020
% \LaTeX{} release means that, \emph{taking into account that \emph{\mst} already has
% employed some \emph{\cs{AtBeginDocument}} prior to loading} \ctanpkg{decimalcomma}, any
% code here will be executed \textbf{BEFORE} the \cs{AtBeginDocument} material
@@ -7855,7 +8419,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% latter for which \ctanpkg{babel-french} has a dectection mechanism, which as
% a result avoids the bad interactions with \ctanpkg{numprint} plus its
% |autolanguage| option, which are mentioned below in the \ctanpkg{ncccomma}
-% branch. So we don't need here the workaround done below is in the
+% branch. So we don't need here the workaround done below in the
% |ncccomma| branch. Notice though that in both cases, the `intelligent'
% comma feature will be applied to the whole document, even inside those
% portions where the user has switched to another language such as English.
@@ -7884,19 +8448,26 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\mathcomma\mst@varfam@comma
\let\sm@rtcomma\mst@sm@rtcomma
}
- \else % end of decimalcomma branch
- \ifmst@ncccomma
- \mst@infoline{loading package ncccomma for `smart comma\string'}
- \RequirePackage{ncccomma}%
+ \ifmst@everymath
+ \else
+ \edef\mst@tmp{\mathchardef\mathcomma=\the\mathcode`\,\relax}%
+ \mst@undo@nonletters\expandafter\expandafter\expandafter
+ {\expandafter\mst@tmp\the\mst@undo@nonletters}%
+ \fi
+ \else
% \end{macrocode}
% Work around some bad interaction of \ctanpkg{ncccomma}, \ctanpkg{numprint}
% with |autolanguage| and \ctanpkg{babel-french}. See
% \centeredline{\url{https://github.com/latex3/babel/issues/190}} for
-% background. Some hesitation whether I should use the \cs{noextrasfrench}
-% to work around \ctanpkg{babel-french} code influencing non-French sections
-% in the document. Update: I think the last sentence means I was hesitating
-% at time of |1.3x| whether to insert some extra code inside the \cs{noextrasfrench}.
+% background. Some hesitation whether I should use the \cs{noextrasfrench} to
+% work around \ctanpkg{babel-french} code influencing non-French sections in
+% the document. Update: I think the last sentence means I was hesitating at
+% time of \mstrelease{1.3y} whether to insert some extra code inside the
+% \cs{noextrasfrench}.
% \begin{macrocode}
+ \ifmst@ncccomma
+ \mst@infoline{loading package ncccomma for `smart comma\string'}
+ \RequirePackage{ncccomma}%
\AtBeginDocument{%
\mathcode`\,="8000\relax
\@ifpackageloaded{babel}{%
@@ -7918,34 +8489,77 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\mathcomma\mst@varfam@comma
\let\NCC@comma\mst@NCC@comma
}
- \else % neither ncccomma nor decimalcomma
+ \ifmst@everymath
+ \else
+% \end{macrocode}
+% Attention that \ctanpkg{ncccomma} (contrarily to \ctanpkg{icomma} loaded by
+% \ctanpkg{decimalcomma} has made the comma math active already when we loaded it.
+% So we don't use |\the\mathcode`\,\relax| here.
+% \begin{macrocode}
+ \edef\mst@tmp{\mathchardef\mathcomma=\the\mathcomma\relax}%
+ \mst@undo@nonletters\expandafter\expandafter\expandafter
+ {\expandafter\mst@tmp\the\mst@undo@nonletters}%
+ \fi
+ \else
+% \end{macrocode}
+% Neither option |ncccomma| nor |decimalcomma|. The \mstrelease{1.4} non-use
+% of \cs{everymath} and consequences is accounted for automatically by
+% \cs{mst@addtodo@nonletters}.
+% \begin{macrocode}
\expandafter\mst@addtodo@nonletters\string,\mathpunct\mst@varfam@comma
\fi\fi
+% \end{macrocode}
+% math dot.
+% \begin{macrocode}
\DeclareMathSymbol{.}{\mathord}{\mst@font@tbu}{"2E}
\DeclareMathSymbol{\mst@varfam@dot}{\mathalpha}{\mst@font@tbu}{"2E}
\mst@addtodo@easynonletters\.\mst@varfam@dot
- \DeclareMathSymbol{:}{\mathrel}{\mst@font@tbu}{"3A} % relation spacing
+% \end{macrocode}
+% math colon.
+% \begin{macrocode}
+ \DeclareMathSymbol{:}{\mathrel}{\mst@font@tbu}{"3A}
\DeclareMathSymbol{\mst@varfam@colon}{\mathalpha}{\mst@font@tbu}{"3A}
\expandafter\mst@addtodo@nonletters\string:\mathrel\mst@varfam@colon
\@ifpackageloaded{amsmath}
- {} % \colon defined in amsmath.sty in terms of : with some enlarged explicit
- % spacing. No need to intervene.
- {% no amsmath, use standard punctuation spacing
+% \end{macrocode}
+% \cs{colon} gets defined in \ctanpkg{amsmath} in terms of |:| with some enlarged explicit
+% spacing. No need to intervene.
+% \begin{macrocode}
+ {}
+% \end{macrocode}
+% No \ctanpkg{amsmath}, use standard punctuation spacing.
+%
+% The reason for |\et\colon\undefined| is if some package has redefined
+% \cs{colon} which then can not be used in \cs{DeclareMathSymbol} anymore (we
+% shamelessly overwrite...)
+% \begin{macrocode}
+ {%
\let\colon\undefined
- % the reason is if some package has redefined \colon which then
- % can not be used in \cs{DeclareMathSymbol} anymore (we
- % shamelessly overwrite...)
\DeclareMathSymbol{\colon}{\mathpunct}{\mst@font@tbu}{"3A}
- \mst@do@nonletters\expandafter{\the\mst@do@nonletters
+ \let\mst@colon\colon
+% \end{macrocode}
+% \mstrelease{1.3v} uses \cs{protected} for the (optional) \cs{colon} redefinition.
+% \begin{macrocode}
+ \mst@do@nonletters\expandafter{%
+ \the\mst@do@nonletters
+ \protected\def\colon{\mathpunct{\mst@varfam@colon}}%
+ }%
% \end{macrocode}
-% |1.3v| uses \cs{protected} for the (optional) \cs{colon} redefinition.
+% \mstrelease{1.4} needs extras.
% \begin{macrocode}
- \protected\def\colon{\mathpunct{\mst@varfam@colon}}}%
+ \ifmst@everymath
+ \else
+ \mst@undo@nonletters\expandafter{%
+ \the\mst@undo@nonletters
+ \let\colon\mst@colon
+ }%
+ \fi
}
- \DeclareMathSymbol{\mst@varfam@pointvirgule}{\mathalpha}{\mst@font@tbu}{"3B}
% \end{macrocode}
-% |1.3x| adds |binarysemicolon| option.
+% Semi-colon.
+% \mstrelease{1.3y} adds |binarysemicolon| option.
% \begin{macrocode}
+ \DeclareMathSymbol{\mst@varfam@pointvirgule}{\mathalpha}{\mst@font@tbu}{"3B}
\ifmst@binarysemicolon
\mst@infoline{semi-colon set to be of type \string\mathbin}
\DeclareMathSymbol{;}{\mathbin}{\mst@font@tbu}{"3B}
@@ -7953,21 +8567,22 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\else
\DeclareMathSymbol{;}{\mathpunct}{\mst@font@tbu}{"3B}
\expandafter\mst@addtodo@nonletters\string;\mathpunct\mst@varfam@pointvirgule
- \fi % binarysemicolno
-\fi % end \ifmst@nopunct else branch
+ \fi
+\fi
% \end{macrocode}
+% \end{macro}\end{macro}
% \begin{macro}{\relbar}
% Due to the way = and - are used by \LaTeX{} in arrows, we will
% have to redefine \cs{Relbar} and \cs{relbar} in order for
% them to preserve their original meanings.
%
-% |1.15d|: Oct 13, 2012. Belated amendment of the code to be compatible
+% \mstrelease{1.15d}: Oct 13, 2012. Belated amendment of the code to be compatible
% with Unicode engines in case someone changed the mathcode of -.
% However, for the time being I can do it in an easy way only for
% \XeTeX, not for \LuaLaTeX. Also I do my modifications to \cs{relbar}
% in a manner testing for the presence of amsmath.
%
-% |1.3v 2019/09/19|: \LaTeX{} of |2019-10-01| defines \cs{leftarrowfill}
+% \mstrelease{1.3v} |2019/09/19|: \LaTeX{} of |2019-10-01| defines \cs{leftarrowfill}
% and \cs{rightarrowfill} as robust macros, so we do the same.
%
% I need to put amsmath under surveillance to check if it decides to
@@ -7981,49 +8596,48 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\else
\ifmst@XeOrLua
\mst@Umathcharnumdef\mst@minus@sign=\mst@Umathcodenum`\-\relax
-%^^A I used this prior to the new \luatexUmathcodenum, as available since TL2013:
-%^^A \mathchardef\mst@minus@sign=8704\relax % "2200
+% \end{macrocode}
+% I used this prior to the new \cs{luatexUmathcodenum}, as available since TL2013:
+% \centeredline{|\mathchardef\mst@minus@sign=8704\relax % "2200|}
+%^^A L'alignement est bizarre dans l'output.
+% \begin{macrocode}
\else
\mathchardef\mst@minus@sign=\mathcode`\-\relax
\fi
\@ifpackageloaded{amsmath}
{\def\relbar{\mathrel{\mathpalette\mathsm@sh\mst@minus@sign}}}
{\DeclareRobustCommand\relbar{\mathrel{\smash\mst@minus@sign}}}
- \ifmst@robust@obsessed@LaTeX@era\expandafter\DeclareRobustCommand
- \else\expandafter\def\fi
- \rightarrowfill{$\m@th\mathord{\relbar}\mkern-7mu%
+ \DeclareRobustCommand\rightarrowfill{$\m@th\mathord{\relbar}\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\relbar\mkern-2mu$}\hfill
\mkern-7mu\mathord\rightarrow$}
- \ifmst@robust@obsessed@LaTeX@era\expandafter\DeclareRobustCommand
- \else\expandafter\def\fi
- \leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
+ \DeclareRobustCommand\leftarrowfill{$\m@th\mathord\leftarrow\mkern-7mu%
\cleaders\hbox{$\mkern-2mu\relbar\mkern-2mu$}\hfill
\mkern-7mu\mathord{\relbar}$}
\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{endash}
-% |1.1| |2011/01/29|: Producing this next piece of code was not a piece
+% \mstrelease{1.1} |2011/01/29|: Producing this next piece of code was not a piece
% of cake for a novice like myself!\newline
-% |1.11| |2011/02/05|: Compatibility with Unicode (via use of fontspec
+% \mstrelease{1.11} |2011/02/05|: Compatibility with Unicode (via use of fontspec
% encodings EU1 and EU2)\newline
-% |1.12| |2011/02/07|: Improved dealing of Unicode possibility.\newline
-% |1.14b| |2011/04/02|: Corrected some very irresponsible bug in the
+% \mstrelease{1.12} |2011/02/07|: Improved dealing of Unicode possibility.\newline
+% \mstrelease{1.14b} |2011/04/02|: Corrected some very irresponsible bug in the
% Unicode part which caused a problem when 10 or more math families have
% been allocated.\newline
-% |1.15| |2012/09/24|: Added AtBeginDocument to circumvent some amsmath
+% \mstrelease{1.15} |2012/09/24|: Added AtBeginDocument to circumvent some amsmath
% problem with unicode engines.
%
-% |1.3l| |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+% \mstrelease{1.3l} |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
%
-% |1.3t| |2018/08/22|: fix to very ancient (|2012/12/20|) bug with
+% \mstrelease{1.3t} |2018/08/22|: fix to very ancient (|2012/12/20|) bug with
% |\DeclareMathSymbol| lacking last argument if encoding not T1, OT1 or
% LY1 when setting up math mode to use the en-dash character as minus
% sign (PDF\TeX\ engine).
%
% \begin{macro}{\mst@subduedminus}
% \begin{macro}{\mst@nonsubduedminus}
-% |1.3t| Further, new macros |\mst@subduedminus| and |\mst@nonsubduedminus|,
+% \mstrelease{1.3t} Further, new macros |\mst@subduedminus| and |\mst@nonsubduedminus|,
% for the good functioning of the subdued option also in case of
% presence of fontspec. This is the only character for which subdued
% option works (now) by setting the mathcode on each math version
@@ -8034,7 +8648,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% change. This means also that |\MTversion| and not |\mathversion|
% must be used for good functioning.
%
-% |1.3u| improves the handling of the minus sign by letting it be compatible
+% \mstrelease{1.3u} improves the handling of the minus sign by letting it be compatible
% with math versions (and not only with the with subdued mechanism but all
% math versions) having varying font encodings, even possibly classic 8bit
% font encoding mixed with TU encoding for Unicode engines. For this it is
@@ -8047,9 +8661,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% This is counter-intuitive and breaks expectations.
% \end{quotation}
%
-% But the |1.3u| mechanism with \cs{mst@UmathchardefWorkAround@i} introduced a
+% But the \mstrelease{1.3u} mechanism with \cs{mst@UmathchardefWorkAround@i} introduced a
% bug which showed under option |noendash| (hence also |symboldelimiters|) with
-% Unicode engines. Fixed at |1.3w|.
+% Unicode engines. Fixed at \mstrelease{1.3w}.
% \begin{macrocode}
\let\mst@subduedminus\empty
\let\mst@nonsubduedminus\empty
@@ -8063,7 +8677,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
{\csname\mst@tmp@enc\string\textendash\endcsname}
\DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
{\csname\mst@tmp@enc\string\textendash\endcsname}
- \fi}% mst@dothe@endashstuff
+ \fi
+}%
\def\mst@dothe@emdashstuff#1#2#3{%
\edef\mst@tmp@enc{#3}%
\if1\mst@OneifUniEnc
@@ -8074,7 +8689,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
{\csname\mst@tmp@enc\string\textemdash\endcsname}
\DeclareMathSymbol{#2}{\mathalpha}{mtoperatorfont}
{\csname\mst@tmp@enc\string\textemdash\endcsname}
- \fi}% mst@dothe@emdashstuff
+ \fi
+}%
\def\mst@dothe@hyphenstuff#1#2{%
\DeclareMathSymbol{#1}{\mathbin}{\mst@font@tbu}{"2D}%
\DeclareMathSymbol{#2}{\mathalpha}{\mst@font@tbu}{"2D}%
@@ -8090,9 +8706,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\csname mst@minus@mv\math@version\endcsname
\relax
\else
- \mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
+ \mathcode`\-=\@nameuse{mst@minus@mv\math@version}%
\fi
- }% \mst@nonsubduedminus
+ }%
% \end{macrocode}
% The above works only if the \cs{mst@minus@mv<name>} was really
% defined via \cs{Umathchardef}. If it was defined via \cs{DeclareMathSymbol}
@@ -8101,8 +8717,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macrocode}
\ifmst@endash\else\ifmst@emdash\else
\def\mst@nonsubduedminus{%
- \mathcode`\-=\@nameuse{mst@minus@mv\math@version}% self-delimiting
- }% non Umathchardef \mst@minus@mv<mathversion> macros
+ \mathcode`\-=\@nameuse{mst@minus@mv\math@version}%
+ }%
\fi\fi
\fi
\def\mst@UmathchardefWorkAround@i
@@ -8112,7 +8728,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macro}\end{macro}\end{macro}
% \begin{macro}{\mst@hbar@mvnormal}
% \begin{macro}{\mst@ltbar@mvnormal}
-% |2011/01/31|, |1.1| I decide to settle the question of the |\hbar|. The
+% |2011/01/31|, \mstrelease{1.1} I decide to settle the question of the |\hbar|. The
% \LaTeX{} definition is |\def\hbar{{\mathchar'26\mkern-9muh}}|
% and its advantage is that |h| is in the correct font. But of course not
% the macron character (|\=|, |\bar|). And anyway |amsfonts| uses a
@@ -8125,26 +8741,26 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% (as an aside, I am only now (April 2, 2011) aware that the package
% |mathtools| provides the |mathrlap| etc... )
%
-% |1.3l 2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+% \mstrelease{1.3l} |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
%
-% |1.3u 2019/08/20|: encoding (8bits) agnostic construct for hbar, using same
+% \mstrelease{1.3u} |2019/08/20|: encoding (8bits) agnostic construct for hbar, using same
% method as for |mathaccents| option. I should add some way to adjust the
% vertical positioning.
%
% On this occasion I replace |h| by |\mst@h| because the mechanism for
% before and after skips does not interact well with the rlap construct.
%
-% |1.3v 2019/09/19| adapts to maintain the robustness of \cs{hbar} which now
+% \mstrelease{1.3v} |2019/09/19| adapts to maintain the robustness of \cs{hbar} which now
% applies with \LaTeX{} |2019-10-01|.
%
-% |1.3w| works around \url{https://github.com/latex3/latex2e/issues/216} via
+% \mstrelease{1.3w} works around \url{https://github.com/latex3/latex2e/issues/216} via
% \cs{mst@DeclareMathAccent}. The upstream bug affected the definition of
% \cs{mst@ltbar@mvnormal} and broke usage of \cs{Mathastext} in preamble.
%
-% |1.3w| also fixes oversight that \cs{hbar} may have been redefined via
+% \mstrelease{1.3w} also fixes oversight that \cs{hbar} may have been redefined via
% \cs{DeclareMathSymbol} by some package (e.g. |amsfonts|) and with \LaTeX{}
% |2019-10-01| this means \cs{hbar<space>} is now undefined. Modifying it
-% changed nothing to \cs{hbar} behaviour in such circumstances. Finally we
+% changed nothing to \cs{hbar} behavior in such circumstances. Finally we
% opt for a \cs{protected} \cs{hbar} and choose to ignore completely if
% there is a \cs{hbar<space>} or not. To avoid extra steps we do not
% undefine it if it exists, because we would need to restore it in
@@ -8161,7 +8777,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\def\mst@mathrlapinternal#1#2{\rlap{$\mathsurround=0pt#1{#2}$}}
\def\mst@dothe@hbarstuff#1#2#3{%
\edef\mst@tmp@enc{#3}%
- \if1\mst@OneifUniEnc % Unicode engine and font
+ \if1\mst@OneifUniEnc
\mst@Umathchardef#1="7 \symmtletterfont "0127 \relax %% or 210F?
\else
\begingroup
@@ -8170,13 +8786,13 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\mst@DeclareMathAccent{#2}{\mathalpha}{mtletterfont}%
{\csname\mst@tmp@enc\string\=\endcsname{}}%
\endgroup
- \protected\def#1{\mst@mathrlap{#2{\ }}\mst@h}%
+ \protected\def#1{\mst@mathrlap{#2{\ }}\MTmathcharletterh}%
\fi
-}% end of \mst@dothe@hbarstuff
+}%
% \end{macrocode}
% \end{macro}
% \end{macro}
-% |1.15d|: Oct 13, 2012. The \cs{mathcode} thing with = is (belatedly,
+% \mstrelease{1.15d}: Oct 13, 2012. The \cs{mathcode} thing with = is (belatedly,
% sorry!) made Unicode compatible.
% \begin{macro}{+,=,\Relbar}
% \begin{macrocode}
@@ -8246,7 +8862,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% sequences can not be simultaneously math symbols and math delimiters,
% thus, this complicates things for the mathastextification.
% \begin{macrocode}
-\ifmst@noparen\else\mst@infoline{parentheses \string( \string) \string[ \string] and slash \string/}
+\ifmst@noparen\else
+\mst@infoline{parentheses \string( \string) \string[ \string] and slash \string/}
\ifmst@nosmalldelims
\DeclareMathSymbol{(}{\mathopen}{\mst@font@tbu}{"28}
\DeclareMathSymbol{)}{\mathclose}{\mst@font@tbu}{"29}
@@ -8287,17 +8904,22 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% other math symbol fonts they do respect the encoding of the CM symbols and
% largesymbols, so this is 90\% safe. But in truth I should extract from the
% meaning of \cs{backslash} the |delcode|.
+%
+% At \mstrelease{1.4} I am a bit perplexed at the \cs{mathalpha} here.
+% Adding a a \cs{mst@mathord@backslash} for matters of option |noeverymath|.
% \begin{macrocode}
\DeclareMathDelimiter{\mst@varfam@backslash}
{\mathalpha}{symbols}{"6E}{largesymbols}{"0F}
+ \let\mst@mathord@backslash\backslash
\else
\DeclareMathDelimiter{<}{\mathopen}{\mst@font@tbu}{"3C}{largesymbols}{"0A}
\DeclareMathDelimiter{>}{\mathclose}{\mst@font@tbu}{"3E}{largesymbols}{"0B}
% \end{macrocode}
% There is no backslash in the Symbol font hence |mtoperatorfont| here.
% \begin{macrocode}
- \DeclareMathDelimiter{\backslash}
+ \DeclareMathDelimiter{\mst@mathord@backslash}
{\mathord}{mtoperatorfont}{"5C}{largesymbols}{"0F}
+ \let\backslash\mst@mathord@backslash
\DeclareMathDelimiter{\mst@varfam@backslash}
{\mathalpha}{mtoperatorfont}{"5C}{largesymbols}{"0F}
\fi
@@ -8309,17 +8931,38 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\expandafter\mst@addtodo@nonletters\string>\mathrel\mst@varfam@more
\mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
\let\backslash\mst@varfam@backslash}
+% \end{macrocode}
+% Extras for \mstrelease{1.4} are needed:
+% \begin{macrocode}
+\ifmst@everymath
+\else
+ \mst@undo@easynonletters\expandafter{\the\mst@undo@easynonletters
+ \let\backslash\mst@mathord@backslash}
+\fi
\DeclareMathSymbol{\setminus}{\mathbin}{mtoperatorfont}{"5C}
+\let\mst@setminus\setminus
\DeclareMathSymbol{\mst@varfam@setminus}{\mathalpha}{mtoperatorfont}{"5C}
% \end{macrocode}
-% |1.3v| adds a \cs{protected} here for \cs{setminus}.
+% \mstrelease{1.3v} adds a \cs{protected} here for \cs{setminus}.
% \begin{macrocode}
-\mst@do@nonletters\expandafter{\the\mst@do@nonletters
- \protected\def\setminus{\mathbin{\mst@varfam@setminus}}}
+\mst@do@nonletters\expandafter{%
+ \the\mst@do@nonletters
+ \protected\def\setminus{\mathbin{\mst@varfam@setminus}}%
+}
+% \end{macrocode}
+% Extras for \mstrelease{1.4} are needed:
+% \begin{macrocode}
+\ifmst@everymath
+\else
+ \mst@undo@nonletters\expandafter{%
+ \the\mst@undo@nonletters
+ \let\setminus\mst@setminus
+ }
+\fi
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}
% \begin{macro}{\models}
-% |1.15d|: 13 oct 2012. Before modifying \string| we must preserve \cs{models}.
+% \mstrelease{1.15d}: 13 oct 2012. Before modifying \string| we must preserve \cs{models}.
% \begin{macrocode}
\ifmst@XeOrLua
\mst@Umathcharnumdef\mst@vert@bar=\mst@Umathcodenum`\|\relax
@@ -8335,7 +8978,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% it used to be anyhow, so it is too late. Or not (2019)? maybe I
% \emph{should} do something here...
%
-% |1.3v 2019/09/19|: I discover this rather radical legacy
+% \mstrelease{1.3v} |2019/09/19|: I discover this rather radical legacy
% \verb+\def\vert{|}+, which is done here once in the preamble, but I leave
% it unmodified apart from prefixing it with \cs{protected}. I also add a
% \cs{protected} for the definition of \cs{mid} (which applies only under
@@ -8349,34 +8992,53 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\protected\def\vert{|}
\DeclareMathSymbol{\mst@varfam@vbar}{\mathalpha}{\mst@font@tbu}{124}
\mst@addtodo@easynonletters\|\mst@varfam@vbar
-\let\mid\undefined % 1.3: to avoid problems with some packages
+\let\mid\undefined
\DeclareMathSymbol{\mid}{\mathrel}{\mst@font@tbu}{124}
-\mst@do@nonletters\expandafter{\the\mst@do@nonletters
- \protected\def\mid{\mathrel\mst@varfam@vbar}}
+\let\mst@mid\mid
+\mst@do@nonletters\expandafter{%
+ \the\mst@do@nonletters
+ \protected\def\mid{\mathrel\mst@varfam@vbar}%
+}
+% \end{macrocode}
+% Extras for \mstrelease{1.4} are needed:
+% \begin{macrocode}
+\ifmst@everymath
+\else
+ \mst@undo@nonletters\expandafter{%
+ \the\mst@undo@nonletters
+ \let\mid\mst@mid
+ }
+\fi
% \end{macrocode}
% \begin{macro}{\MTexplicitbraces-}\begin{macro}{obeymathxx}
% \begin{macro}{\MTexplicitbraces-}\begin{macro}{donotobeymathxx}
-% Braces. With version |1.2|, |\{| and |\}| will not be acceptable as
+% Braces. With version \mstrelease{1.2}, |\{| and |\}| will not be acceptable as
% delimiters anymore if the redefinitions below in \cs{mst@dobraces} are
-% enacted. But they will obey math alphabets. Improvements in |1.2a|, to
+% enacted. But they will obey math alphabets. Improvements in \mstrelease{1.2a}, to
% preserve robustness.
%
-% For |1.3| I make |\lbrace| and |\rbrace| undefined first, else problems
+% For \mstrelease{1.3} I make |\lbrace| and |\rbrace| undefined first, else problems
% may arise with some packages.
%
-% |1.3e| suppresses under option
+% \mstrelease{1.3e} suppresses under option
% |nosmalldelims| the definitions of |\lbrace| and |\rbrace| as math
% symbols as this made |\left\lbrace| cause an error, it was a bug.
%
-% LaTeX2e defines |\{| and |\}| as robust commands for a long time
+% (obsolete) LaTeX2e defines |\{| and |\}| as robust commands since a long time
% (I don't know since when). The \mst redefinition is done only if user
% has executed \cs{MTexplicitbracesobeymathxx}, and it is done only when
% entering math mode, but there could be some |\hbox| inside math, hence
% it has to be careful to be valid in text too.
%
-% |1.3v| maintains strict \LaTeX2e robustness for |\{| and |\}|.
+% \mstrelease{1.3v} maintains strict \LaTeX2e robustness for |\{| and |\}|.
% This assumes no one fiddled with |\{| and |\}| proper (without space
% in the name).
+%
+% \LaTeX{} made |\{| and |\}| \cs{protected}, not robust, at its
+% |2020-02-02| release, so the code used by \mst under
+% \cs{MTexplicitbracesobeymathxx} toggle remained without effect since
+% as it configured a change to |\{<space>| and |\}<space>|. Fixed at
+% \mstrelease{1.4}.
% \begin{macrocode}
\ifmst@nosmalldelims
\else
@@ -8388,28 +9050,46 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\fi
\DeclareMathSymbol{\mst@varfam@lbrace}{\mathalpha}{\mst@font@tbu}{123}
\DeclareMathSymbol{\mst@varfam@rbrace}{\mathalpha}{\mst@font@tbu}{125}
-\DeclareRobustCommand*{\mst@lbrace}
- {\ifmmode\mathopen\mst@varfam@lbrace\else\textbraceleft\fi}
-\DeclareRobustCommand*{\mst@rbrace}
- {\ifmmode\mathclose\mst@varfam@rbrace\else\textbraceright\fi}
-\mst@do@nonletters\expandafter{\the\mst@do@nonletters
- \mst@dobraces{\expandafter\let\csname\string{ \expandafter\endcsname
- \csname mst@lbrace \endcsname
- \expandafter\let\csname\string} \expandafter\endcsname
- \csname mst@rbrace \endcsname}}
-\fi % end of \ifmst@alldelims
+% \end{macrocode}
+% \begin{macrocode}
+\protected\def\mst@lbrace{\ifmmode\mathopen\mst@varfam@lbrace\else\textbraceleft\fi}
+\protected\def\mst@rbrace{\ifmmode\mathclose\mst@varfam@rbrace\else\textbraceright\fi}
+\mst@do@nonletters\expandafter{%
+ \the\mst@do@nonletters
+ \mst@dobraces{\let\{\mst@lbrace\let\}\mst@rbrace}%
+}
+\fi
\newcommand*{\MTexplicitbracesobeymathxx}{\let\mst@dobraces\@firstofone}
\newcommand*{\MTexplicitbracesdonotobeymathxx}{\let\mst@dobraces\@gobble}
+% \end{macrocode}
+% Extras for \mstrelease{1.4} are needed:
+% \begin{macrocode}
+\ifmst@everymath
+\else
+ \renewcommand*\MTexplicitbracesobeymathxx{%
+ \let\mst@dobraces\@firstofone
+ \MTnonlettersobeymathxx
+ }%
+ \renewcommand*\MTexplicitbracesdonotobeymathxx{%
+ \let\mst@dobraces\@gobble
+ \protected\def\{{\ifmmode \lbrace \else \textbraceleft \fi}%
+ \protected\def\}{\ifmmode \rbrace \else \textbraceright \fi}%
+ }%
+ \mst@undo@nonletters\expandafter{\the\mst@undo@nonletters
+ \protected\def\{{\ifmmode \lbrace \else \textbraceleft \fi}%
+ \protected\def\}{\ifmmode \rbrace \else \textbraceright \fi}%
+ }%
+\fi
\MTexplicitbracesdonotobeymathxx
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}
% \end{macro}\end{macro}
% \begin{macro}{specials}
-% \leavevmode\kern\parindent |1.14b| |2011/04/02|: the redefinitions of
+% \leavevmode\kern\parindent \mstrelease{1.14b} |2011/04/02|: the redefinitions of
% \#, \$, \% and \& were buggy (this showed up when 10 or more math
% families had been created).
%
-% |1.15f| |2012/10/23|: the code, although working, was perhaps a bit insane
+% \mstrelease{1.15f} |2012/10/23|: the code, although working, was perhaps a bit insane
% and
% had definitions which could surprise other packages. For example, it did:\\
% \null\hspace{1cm}|\renewcommand{\%}{\ifmmode\mt@mmode@percent\else\char37\relax\fi}|\\
@@ -8426,60 +9106,80 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% mathcode. So here it is \emph{not} a redefinition of the control sequences,
% purely an adjustment of mathcodes.
%
-% |1.2d| |2013/01/01|: previous versions imposed the variable family type. I
+% \mstrelease{1.2d} |2013/01/01|: previous versions imposed the variable family type. I
% hereby make it possible to de-activate this feature with the macro
% \cs{MTeasynonlettersdonotobeymathxx}. Besides, I have absolutely no idea
% why I had different looking code depending on the engine \XeTeX, \LuaTeX\ or
% default. Removed.
%
-% |1.3c| |2013/12/14|: I have absolutely no idea why I removed the \XeTeX\
-% and \LuaTeX\ code at the time of |1.2d|! the code for tex/pdftex engine
+% \mstrelease{1.3c} |2013/12/14|: I have absolutely no idea why I removed the \XeTeX\
+% and \LuaTeX\ code at the time of \mstrelease{1.2d}! the code for tex/pdftex engine
% could not accomodate more than 16 math families. Code for \XeTeX\ and
% \LuaTeX\ again added. (and since TL2013 no more problems with
% |\luatexUmathcode|.)
+%
+% \mstrelease{1.4} has done slight refactoring here to share more code related
+% to math activation across the two branches.
% \begin{macrocode}
\ifmst@nospecials
\else
- \mst@infoline{\string\#\space\string\mathdollar\space
- \string\%\space\string\&\space}
+ \mst@infoline{\string\#\space\string\mathdollar\space
+ \string\%\space\string\&\space}
\ifmst@XeOrLua
- \mst@Umathcode`\#=0 \symmtoperatorfont "23 \relax
- \mst@Umathchardef\mathdollar=0 \symmtoperatorfont "24 \relax
- \mst@Umathcode`\%=0 \symmtoperatorfont "25 \relax
- \mst@Umathcode`\&=0 \symmtoperatorfont "26 \relax
- \mst@do@easynonletters\expandafter{%
- \the\mst@do@easynonletters
- \mst@Umathcode`\#=7 \symmtoperatorfont "23 \relax
- \mst@Umathchardef\mathdollar=7 \symmtoperatorfont "24 \relax
- \mst@Umathcode`\%=7 \symmtoperatorfont "25 \relax
- \mst@Umathcode`\&=7 \symmtoperatorfont "26 \relax
- }
+ \mst@Umathcode`\#=0 \symmtoperatorfont "23 \relax
+ \mst@Umathchardef\mathdollar=0 \symmtoperatorfont "24 \relax
+ \mst@Umathcode`\%=0 \symmtoperatorfont "25 \relax
+ \mst@Umathcode`\&=0 \symmtoperatorfont "26 \relax
+ \mst@Umathchardef\mst@varfam@mathhash = 7 \symmtoperatorfont "23 \relax
+ \mst@Umathchardef\mst@varfam@mathdollar = 7 \symmtoperatorfont "24 \relax
+ \mst@Umathchardef\mst@varfam@mathpercent = 7 \symmtoperatorfont "25 \relax
+ \mst@Umathchardef\mst@varfam@mathampersand = 7 \symmtoperatorfont "26 \relax
+ \mst@addtodo@easynonletters@U\#\mst@varfam@mathhash
+ \mst@addtodo@easynonletters@U\%\mst@varfam@mathpercent
+ \mst@addtodo@easynonletters@U\&\mst@varfam@mathampersand
\else
- \count@=\symmtoperatorfont
- \multiply\count@ by \@cclvi
- \advance\count@ by 35
- \mathcode`\#\count@
- \advance\count@ by \@ne
- \mathchardef\mathdollar\count@
- \advance\count@ by \@ne
- \mathcode`\%\count@
- \advance\count@ by \@ne
- \mathcode`\&\count@
- \count@=\symmtoperatorfont
- \multiply\count@ by \@cclvi
- \advance\count@ by 28707 % = "7023
- \mathchardef\mst@varfam@mathhash\count@
- \advance\count@ by \@ne
- \mathchardef\mst@varfam@mathdollar\count@
- \advance\count@ by \@ne
- \mathchardef\mst@varfam@mathpercent\count@
- \advance\count@ by \@ne
- \mathchardef\mst@varfam@mathampersand\count@
+ \count@=\symmtoperatorfont
+ \multiply\count@ by \@cclvi
+ \advance\count@ by 35
+ \mathcode`\#\count@
+ \advance\count@ by \@ne
+ \mathchardef\mathdollar\count@
+ \advance\count@ by \@ne
+ \mathcode`\%\count@
+ \advance\count@ by \@ne
+ \mathcode`\&\count@
+ \count@=\symmtoperatorfont
+ \multiply\count@ by \@cclvi
+ \advance\count@ by 28707 % = "7023
+ \mathchardef\mst@varfam@mathhash\count@
+ \advance\count@ by \@ne
+ \mathchardef\mst@varfam@mathdollar\count@
+ \advance\count@ by \@ne
+ \mathchardef\mst@varfam@mathpercent\count@
+ \advance\count@ by \@ne
+ \mathchardef\mst@varfam@mathampersand\count@
+ \mst@addtodo@easynonletters\#\mst@varfam@mathhash
+ \mst@addtodo@easynonletters\%\mst@varfam@mathpercent
+ \mst@addtodo@easynonletters\&\mst@varfam@mathampersand
+ \fi
+% \end{macrocode}
+% It is possible to mathematically activate the dollar sign, and to use
+% it in math mode as |\string$|... well, how many documents will have
+% done that? But we do not modify the mathcode of the |$| character
+% anyhow, so why should I add here a \cs{mst@OnlyIfNotMathActive}?
+% There is no good reason for that.
+% \begin{macrocode}
\mst@do@easynonletters\expandafter{\the\mst@do@easynonletters
- \mathcode`\#=\mst@varfam@mathhash
- \let\mathdollar\mst@varfam@mathdollar
- \mathcode`\%=\mst@varfam@mathpercent
- \mathcode`\&=\mst@varfam@mathampersand}
+ \let\mathdollar\mst@varfam@mathdollar}%
+% \end{macrocode}
+% Extras for \mstrelease{1.4} are needed. Here too we do not worry
+% about math active dollar character.
+% \begin{macrocode}
+ \ifmst@everymath\else
+ \edef\mst@tmp{\ifmst@XeOrLua\mst@Umathcharnumdef\else\mathchardef\fi
+ \mathdollar=\the\mathdollar\relax}%
+ \mst@undo@easynonletters\expandafter\expandafter\expandafter
+ {\expandafter\mst@tmp\the\mst@undo@easynonletters}%
\fi
\fi
% \end{macrocode}
@@ -8495,7 +9195,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% manipulations, but well, life is finite.
% \begin{macro}{\prod}
% \begin{macro}{\sum}
-% |1.13b|: I correct the brutal re-definitions of \cs{prod} and \cs{sum} from
+% \mstrelease{1.13b}: I correct the brutal re-definitions of \cs{prod} and \cs{sum} from
% the earlier versions of the package; most of the time the Symbol glyphs do
% appear to be too small in display mode. The new redefinitions do have some
% defects: |$\displaystyle\prod_1^2$| changes the position of limits but not
@@ -8506,40 +9206,50 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% October 2012: maybe I should re-examine what I did?
%
-% |1.3c| (|2013/12/14|) renames |\defaultprod| to |\MToriginalprod| and
+% \mstrelease{1.3c} (|2013/12/14|) renames |\defaultprod| to |\MToriginalprod| and
% |\defaultsum| to
% |\MToriginalsum|.
%
-% |1.3v| hesitates about making robust here \cs{prod} and \cs{sum}. Finally I
+% \mstrelease{1.3v} hesitates about making robust here \cs{prod} and \cs{sum}. Finally I
% use \cs{protected} for them.
+%
+% \mstrelease{1.4} finally replaces all control sequences defines earlier via
+% \cs{DeclareRobustCommand} to be defined using \cs{protected}\cs{def}. It
+% also removes \cs{mst@prod} and \cs{mst@sum} which were aliases of
+% \cs{MToriginalprod} and \cs{MToriginalsum}, and having both must have
+% been some left-over of earlier versions in 2012 or 2013 (unchecked).
% \begin{macrocode}
-\ifmst@symbolmisc\mst@infoline{symbolmisc: miscellaneous math symbols from Symbol font}
-\let\mst@prod\prod
+\ifmst@symbolmisc
+\mst@infoline{symbolmisc: miscellaneous math symbols from Symbol font}
\let\MToriginalprod\prod
\DeclareMathSymbol{\prodpsy}{\mathop}{mtpsymbol}{213}
-\protected\def\prod{\ifinner\prodpsy\else\mst@prod\fi}
-\let\mst@sum\sum
+\protected\def\prod{\ifinner\prodpsy\else\MToriginalprod\fi}
\let\MToriginalsum\sum
\DeclareMathSymbol{\sumpsy}{\mathop}{mtpsymbol}{229}
-\protected\def\sum{\ifinner\sumpsy\else\mst@sum\fi}
+\protected\def\sum{\ifinner\sumpsy\else\MToriginalsum\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
\DeclareMathSymbol{\mst@implies}{\mathrel}{mtpsymbol}{222}
-\DeclareRobustCommand*{\implies}{\;\mst@implies\;}
+\protected\def\implies{\;\mst@implies\;}
\DeclareMathSymbol{\mst@impliedby}{\mathrel}{mtpsymbol}{220}
-\DeclareRobustCommand*{\impliedby}{\;\mst@impliedby\;}
-\DeclareRobustCommand*{\iff}{\;\mst@impliedby\mathrel{\mkern-3mu}\mst@implies\;}
+\protected\def\impliedby{\;\mst@impliedby\;}
+\protected\def\iff{\;\mst@impliedby\mathrel{\mkern-3mu}\mst@implies\;}
\DeclareMathSymbol{\mst@iff}{\mathrel}{mtpsymbol}{219}
-\DeclareRobustCommand*{\shortiff}{\;\mst@iff\;}
-\DeclareMathSymbol{\mst@to}{\mathrel}{mtpsymbol}{174}
+\protected\def\shortiff{\;\mst@iff\;}
+% \end{macrocode}
+% \mstrelease{1.4} drops defining a \cs{mst@to} and employs \cs{to}
+% in subsequent definitions
+% \begin{macrocode}
+\let\to\relax
+\DeclareMathSymbol{\to}{\mathrel}{mtpsymbol}{174}
\DeclareMathSymbol{\mst@trait}{\mathrel}{mtpsymbol}{190}
-\DeclareRobustCommand*\to{\mst@to}
-\DeclareRobustCommand*\longto{\mkern2mu\mst@trait\mathrel{\mkern-10mu}\mst@to}
-\DeclareRobustCommand*\mapsto{\mapstochar\mathrel{\mkern0.2mu}\mst@to}
-\DeclareRobustCommand*\longmapsto{%
-\mapstochar\mathrel{\mkern2mu}\mst@trait\mathrel{\mkern-10mu}\mst@to}
+\protected\def\longto{\mkern2mu\mst@trait\mathrel{\mkern-10mu}\to}
+\protected\def\mapsto{\mapstochar\mathrel{\mkern0.2mu}\to}
+\protected\def\longmapsto{%
+ \mapstochar\mathrel{\mkern2mu}\mst@trait\mathrel{\mkern-10mu}\to
+}
\DeclareMathSymbol{\aleph}{\mathord}{mtpsymbol}{192}
\DeclareMathSymbol{\inftypsy}{\mathord}{mtpsymbol}{165}
\DeclareMathSymbol{\emptyset}{\mathord}{mtpsymbol}{198}
@@ -8593,7 +9303,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{symbolre}
% I like the \cs{Re} and \cs{Im} from Symbol, so I overwrite the CM ones.
% \begin{macrocode}
-\ifmst@symbolre\mst@infoline{symbolre: \string\Re\space and \string\Im\space from Symbol font}
+\ifmst@symbolre
+\mst@infoline{symbolre: \string\Re\space and \string\Im\space from Symbol font}
\DeclareMathSymbol{\Re}{\mathord}{mtpsymbol}{"C2}
\DeclareMathSymbol{\Im}{\mathord}{mtpsymbol}{"C1}
\DeclareMathSymbol{\DotTriangle}{\mathord}{mtpsymbol}{92}
@@ -8603,12 +9314,12 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{Greek letters}
% LGRgreek $>$ selfGreek $>$ eulergreek $>$ symbolgreek
%
-% |1.11| I correct some bugs on how eulergreek and
+% \mstrelease{1.11} I correct some bugs on how eulergreek and
% symbolgreek interacted.
%
-% |1.12b| more bug fixes.
+% \mstrelease{1.12b} more bug fixes.
%
-% |1.13|
+% \mstrelease{1.13}
%
% * Option LGRgreek.
%
@@ -8616,10 +9327,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% the default shape is now the one for letters, not for operator-names
% and digits. This complies to the ISO standard.
%
-% * bugfix: version |1.12b| did not define the \cs{omicron} in the
+% * bugfix: version \mstrelease{1.12b} did not define the \cs{omicron} in the
% case when no Greek-related option was passed to the package.
%
-% |1.13d| has new macros |\MTstandardgreek| and |\MTcustomgreek|.
+% \mstrelease{1.13d} has new macros |\MTstandardgreek| and |\MTcustomgreek|.
% And in the subdued case |\MTstandardgreek| is done when switching to
% the normal or bold math versions (previously something like this
% was only done in case of |LGRgreek| option. )
@@ -8672,13 +9383,13 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macrocode}
\ifx\mst@mathord\mathord
% \end{macrocode}
-% symbolgreek but neither eulergreek nor selfGreek
-% \begin{macrocode}
-%% attention le P de Symbol est un \Pi pas un \Rho
+% \noindent symbolgreek but neither eulergreek nor selfGreek\newline
+% Attention le P de Symbol est un \cs{Pi} pas un \cs{Rho}.\newline
+% Attention le X de Symbol est un \cs{Xi} pas un \cs{Chi}.\newline
+% Attention le F de Symbol est un \cs{Phi}. Il n'y a pas de \cs{Digamma}.
+% \begin {macrocode}
\DeclareMathSymbol{\mst@Rho}{\mathord}{mtpsymbol}{"52}
-%% attention le X de Symbol est un \Xi pas un \Chi
\DeclareMathSymbol{\mst@Chi}{\mathord}{mtpsymbol}{"43}
-%% attention le F de Symbol est un \Phi. Il n'y a pas de \Digamma
\DeclareMathSymbol{\mst@Gamma}{\mathord}{mtpsymbol}{"47}
\DeclareMathSymbol{\mst@Delta}{\mathord}{mtpsymbol}{"44}
\DeclareMathSymbol{\mst@Theta}{\mathord}{mtpsymbol}{"51}
@@ -8690,7 +9401,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\DeclareMathSymbol{\mst@Phi}{\mathord}{mtpsymbol}{"46}
\DeclareMathSymbol{\mst@Psi}{\mathord}{mtpsymbol}{"59}
\DeclareMathSymbol{\mst@Omega}{\mathord}{mtpsymbol}{"57}
- \else % de \mst@mathord=\mathord
+ \else
% \end{macrocode}
% not symbolgreek but eulergreek or selfGreek. Note |2015/10/31| : apparemment
% un moment dans le pass je considrais eulergreek et selfGreek comme pouvant
@@ -8709,8 +9420,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\DeclareMathSymbol\mst@Phi {\mathalpha}{\mst@font@tbu}{"08}
\DeclareMathSymbol\mst@Psi {\mathalpha}{\mst@font@tbu}{"09}
\DeclareMathSymbol\mst@Omega {\mathalpha}{\mst@font@tbu}{"0A}
- \fi % de \mst@mathord=\mathord
-\fi % fin de goahead
+ \fi
+\fi
% \end{macrocode}
% There are differences regarding Euler and Symbol with respect to the
% available var-letters. We include one or two things like the |wp| and the
@@ -8796,10 +9507,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\fi
% \end{macrocode}
% \begin{macro}{\alphaup etc...}
-% Completely refactored at |1.3x| to define |\Alphaup|, |\Alphait|,
+% Completely refactored at \mstrelease{1.3y} to define |\Alphaup|, |\Alphait|,
% |\alphaup|, |\alphait|, etc\dots{} and prepare templates |\Alpha|, \dots{},
% |\alpha|, \dots{}, which when activating a math version will be submitted to
-% an |\expanded|, whose behaviour will depend on version-specific conditionals.
+% an |\expanded|, whose behavior will depend on version-specific conditionals.
% \begin{macrocode}
\ifmst@LGRgreek
% cf http://milde.users.sourceforge.net/LGR/lgrxenc.def.html
@@ -8832,7 +9543,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\DeclareMathSymbol{\Tauit}{\mathalpha}{mtgreekit}{84}
\DeclareMathSymbol{\Chiit}{\mathalpha}{mtgreekit}{81}
% \end{macrocode}
-% |1.3w| and earlier had a bug regarding Digamma which was set up
+% \mstrelease{1.3w} and earlier had a bug regarding Digamma which was set up
% to use same font shape as for lowercase digamma.
% \begin{macrocode}
\DeclareMathSymbol{\Digammaup}{\mathalpha}{mtgreekup}{195}
@@ -8916,7 +9627,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\DeclareMathSymbol{\omegaup}{\mathalpha}{mtgreekup}{119}
%
\DeclareMathSymbol{\digammaup}{\mathalpha}{mtgreekup}{147}
-% only varsigma defined (I should check this again)
+% \end{macrocode}
+% Only varsigma defined (I should check this again).
+% \begin{macrocode}
\DeclareMathSymbol{\varsigmaup}{\mathalpha}{mtgreekup}{99}
%
\DeclareMathSymbol{\alphait}{\mathalpha}{mtgreekit}{97}
@@ -8981,12 +9694,12 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{\MTstandardgreek}
% \begin{macro}{\MTcustomgreek}
% \begin{macro}{\MTrecordstandardgreek}
-% |1.3d 2014/05/23| defines the commands |\MTstandardgreek| and
+% \mstrelease{1.3d} |2014/05/23| defines the commands |\MTstandardgreek| and
% |\MTcustomgreek| for package and user. I leave |\MTrecordstandardgreek|
% undocumented as I don't want to encourage people to load math packages
% after \mst.
%
-% |1.3h 2015/10/31|: corrected |\MTcustomgreek| as it caused |\ell| to
+% \mstrelease{1.3h} |2015/10/31|: corrected |\MTcustomgreek| as it caused |\ell| to
% become undefined under option |symbolgreek| and, much more catastrophic,
% caused |\alpha|, etc.. to become undefined under option |selfGreek| !
% \begin{macrocode}
@@ -9055,7 +9768,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
\let\mst@origpartial\partial
\let\mst@origwp\wp
- \let\mst@origell\ell }% \MTrecordstandardgreek
+ \let\mst@origell\ell }%
\MTrecordstandardgreek
\renewcommand*{\MTstandardgreek}{%
\let\Alpha\mst@origAlpha
@@ -9119,10 +9832,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\partial\mst@origpartial
\let\wp\mst@origwp
\let\ell\mst@origell
-}% \MTstandardgreek
+}%
\ifmst@greekplus
% \end{macrocode}
-% |1.3za| implementation of |LGRgreek+| option. It is not exactly
+% \mstrelease{1.3za} implementation of |LGRgreek+| option. It is not exactly
% clear what we should do for \cs{mathnormal} and \cs{mathnormalbold}.
%
% This definition allows usage of \cs{alpha} for example in numerical
@@ -9210,7 +9923,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\mst@define@lowergreekletter\omega\mst@omega
\mst@define@lowergreekletter\varsigma\mst@varsigma
\mst@define@lowergreekletter\digamma\mst@digamma
-}% end of True branch of \ifmst@greekplus
+}%
\else
% \end{macrocode}
% Under |selfGreek| or other Greek option but not |LGRgreek|, these Greek
@@ -9243,8 +9956,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\noexpand\Rho\mst@Rho
\let\noexpand\Tau\mst@Tau
\let\noexpand\Chi\mst@Chi
- }% end of first big \expanded
-% 1.3h: \mst@Digamma not defined if symbolgreek option
+ }%
+% \end{macrocode}
+% \mstrelease{1.3h}: \cs{mst@Digamma} not defined if |symbolgreek| option.
+% \begin{macrocode}
\ifmst@symbolgreek\else
\expanded{\let\noexpand\Digamma\mst@Digamma}%
\fi
@@ -9260,10 +9975,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\noexpand\Phi\mst@Phi
\let\noexpand\Psi\mst@Psi
\let\noexpand\Omega\mst@Omega
- }% end of second big \expanded
+ }%
% \end{macrocode}
-% |1.3h 2015/10/31| adds this conditional to correct the bad bug in
-% |1.3d 2014/05/23| which caused |\alpha| etc... to become undefined
+% \mstrelease{1.3h} |2015/10/31| adds this conditional to correct the bad bug in
+% \mstrelease{1.3d} |2014/05/23| which caused |\alpha| etc... to become undefined
% under option |selfGreek|.
% \begin{macrocode}
\ifmst@selfGreek\else
@@ -9293,28 +10008,34 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\noexpand\psi\mst@psi
\let\noexpand\omega\mst@omega
\let\noexpand\varsigma\mst@varsigma
- }% end of third big \expanded
-% 1.3h: digamma only defined with option LGRgreek:
+ }%
+% \end{macrocode}
+% \mstrelease{1.3h}: digamma only defined with option |LGRgreek|.
+% \begin{macrocode}
\ifmst@LGRgreek
\expanded{\let\noexpand\digamma\mst@digamma}%
\fi
-% conditional added 1.3h 2015/10/31
+% \end{macrocode}
+% Conditional added \mstrelease{1.3h} |2015/10/31|.
+% \begin{macrocode}
\ifmst@LGRgreek\else
\let\varepsilon\mst@varepsilon
\let\vartheta\mst@vartheta
\let\varpi\mst@varpi
\let\varrho\mst@varrho
\let\varphi\mst@varphi
-%
\let\partial\mst@partial
\let\wp\mst@wp
-% 1.3h: no \mst@ell if symbolgreek (bugfix 1.3h 2015/10/31)
+% \end{macrocode}
+% \mstrelease{1.3h}: no \cs{mst@ell} if |symbolgreek| (bugfix
+% \mstrelease{1.3h} |2015/10/31|).
+% \begin{macrocode}
\ifmst@symbolgreek\else\let\ell\mst@ell\fi
\fi
\fi
-}% \MTcustomgreek
-\fi% end of else branch of \ifmst@greekplus
-\fi% end of \ifmst@customgreek
+}%
+\fi
+\fi
\let\Mathastextstandardgreek\MTstandardgreek
\let\Mathastextcustomgreek\MTcustomgreek
\ifmst@subdued\else\MTcustomgreek\fi
@@ -9322,22 +10043,22 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macro}\end{macro}\end{macro}
% \begin{macro}{\inodot}
% \begin{macro}{\jnodot}
-% In |1.0|, I had them of type |mathord|, here I choose |mathalpha|. If I
+% In \mstrelease{1.0}, I had them of type |mathord|, here I choose |mathalpha|. If I
% used \cs{i} and \cs{j} from the text font the problem would be with the
% fontsize, if in scriptstyle. The amsmath \cs{text} would do the trick.
%
-% |1.14b| |2011/04/02|: again this bug in the EU1/EU2 encoding part, as in the
+% \mstrelease{1.14b} |2011/04/02|: again this bug in the EU1/EU2 encoding part, as in the
% code redefining \$ etc in math mode (see above). Fixed.
%
-% |1.3l| |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
+% \mstrelease{1.3l} |2016/01/29|: anticipating TL2016 fontspec's switch to |TU|.
%
-% |1.3t| |2018/08/22| removes the definitions done of |\i| and |\j|
-% since |1.12| (as robust commands usable both in text and math mode).
+% \mstrelease{1.3t} |2018/08/22| removes the definitions done of |\i| and |\j|
+% since \mstrelease{1.12} (as robust commands usable both in text and math mode).
%
-% |1.3u| lets the \cs{imath} and \cs{jmath} react to the font encoding at each
+% \mstrelease{1.3u} lets the \cs{imath} and \cs{jmath} react to the font encoding at each
% math version.
%
-% |1.3v| lets the redefined \cs{imath} and \cs{jmath} be \cs{protected}.
+% \mstrelease{1.3v} lets the redefined \cs{imath} and \cs{jmath} be \cs{protected}.
% \begin{macrocode}
\def\mst@subduedinodot{%
\let\inodot\mst@original@imath
@@ -9352,7 +10073,6 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\def\mst@dothe@inodotstuff#1#2#3{%
\edef\mst@tmp@enc{#3}%
\if1\mst@OneifUniEnc
- % Unicode engine and font
\mst@Umathchardef#1="7 \symmtletterfont "0131 \relax
\mst@Umathchardef#2="7 \symmtletterfont "0237 \relax
\else
@@ -9360,7 +10080,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
{\csname\mst@tmp@enc\string\i\endcsname}
\DeclareMathSymbol{#2}{\mathalpha}{mtletterfont}
{\csname\mst@tmp@enc\string\j\endcsname}
- \fi}% \mst@dothe@inodotstuff
+ \fi}%
\ifmst@defaultimath\else\mst@infoline{\string\imath\space and \string\jmath\space}
\AtEndOfPackage{\AtBeginDocument{%
\protected\def\imath{\inodot}%
@@ -9382,10 +10102,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% define math versions with different encodings. Here I
% take T1 if it was the default at the time of loading the
% package, else OT1.
-% |1.12b|: I add LY1 which is quasi like OT1.
+% \mstrelease{1.12b}: I add LY1 which is quasi like OT1.
% \end{quote}
%
-% At |1.3u 2019/08/20| I decide to remove the hard-coded slot positions
+% At \mstrelease{1.3u} |2019/08/20| I decide to remove the hard-coded slot positions
% for OT1, T1 and LY1, and replace them with some hack which assumes
% LaTeX2e way of handling text accents got executed by the encoding
% definition file. If not, some breakage on package loading could occur, but
@@ -9395,21 +10115,22 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% The |\vec| accent is not considered here because it has no suitable
% available glyph in a standard 8bits text font encodings.
%
-% Also at |1.3u| the math accents adapt to the font encoding at each math
+% Also at \mstrelease{1.3u} the math accents adapt to the font encoding at each math
% version.
%
-% |1.3v| adapts to \LaTeX{} |2019-10-01| which now comes with robust math
-% accent macros. The original-named macros are without the robustifying
-% space (NOT true anymore, see |1.3w| next), as they only serve as meaning
+% (obsolete at \mstrelease{1.4}) \mstrelease{1.3v} adapts to \LaTeX{}
+% |2019-10-01| which now comes with robust math accent macros. The
+% original-named macros are without the robustifying space (NOT true
+% anymore, see \mstrelease{1.3w} next), as they only serve as meaning
% holders.
%
-% On the other hand the macros
-% indexed by math version names are (in the pdflatex branch) always defined
-% via \cs{DeclareMathAccent} hence they will be robust with |2019-10-01| or
+% (obsolete at \mstrelease{1.4}) On the other hand the macros indexed by
+% math version names are (in the pdflatex branch) always defined via
+% \cs{DeclareMathAccent} hence they will be robust with |2019-10-01| or
% later and we must use the \cs{mst@robustifyingspace} with them to access
% their real meaning (this thus differs from the situation with \cs{hbar}).
%
-% |1.3w| The above was a bit optimistic as |amsmath| for example modifies
+% \mstrelease{1.3w} The above was a bit optimistic as |amsmath| for example modifies
% \LaTeX{} internals and handles math accents differently.
%
% We thus needed to double our
@@ -9456,73 +10177,63 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\add@unicode@accent\@firstoftwo
\if1\mst@OneifUniEnc
\ifmst@unimathaccents
- % \` -> \grave
\expandafter\xdef\csname mst@grave@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\`\endcsname{}\relax}%
- % \' -> \acute
\expandafter\xdef\csname mst@acute@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\'\endcsname{}\relax}%
- % \v -> \check
\expandafter\xdef\csname mst@check@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\v\endcsname{}\relax}%
- % \u -> \breve
\expandafter\xdef\csname mst@breve@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\u\endcsname{}\relax}%
- % \= -> \bar
\expandafter\xdef\csname mst@bar@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\=\endcsname{}\relax}%
- % \. -> \dot
\expandafter\xdef\csname mst@dot@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\.\endcsname{}\relax}%
- % \" -> \ddot
\expandafter\xdef\csname mst@ddot@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\"\endcsname{}\relax}%
- % \r -> \mathring
\expandafter\xdef\csname mst@mathring@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\r\endcsname{}\relax}%
- % \^ -> \hat
\expandafter\xdef\csname mst@hat@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\^\endcsname{}\relax}%
- % \~ -> \tilde
\expandafter\xdef\csname mst@tilde@mv#1\mst@robustifyingspace\endcsname
{\mst@Umathaccent
7
\number\symmtoperatorfont\space
\csname#2\string\~\endcsname{}\relax}%
- \else % false branch of ifmst@unimathaccents
+ \else
% \end{macrocode}
-% |1.3u| used some \cs{def} but this made the accent macro meanings look
+% \mstrelease{1.3u} used some \cs{def} but this made the accent macro meanings look
% slightly different depending on whether the math version being set-up was
% with an 8bit encoding or TU encoding.
%
-% For the sake of uniform treatment we modify this at |1.3v|, but this is a
+% For the sake of uniform treatment we modify this at \mstrelease{1.3v}, but this is a
% bit complicated regarding timing: we need, in absence of |unimathaccents|
% option, in math versions with an OpenType font, to let the \cs{acute} etc...
% acquire back some prior non-\mst meanings. To allow maximal flexibility,
@@ -9535,8 +10246,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% definition of the original-named macros but prior to the (last one, if
% multiple) \cs{mst@nonsubduedmathaccents}.
%
-% Hence |1.3v| delayed a bit the initial execution of this macro (see further
-% down in the code) compared to what happened in |1.3u|.
+% Hence \mstrelease{1.3v} delayed a bit the initial execution of this macro (see further
+% down in the code) compared to what happened in \mstrelease{1.3u}.
%
% We are in a group but \cs{AtEndOfPackage} does the right thing.
% \begin{macrocode}
@@ -9561,7 +10272,6 @@ defaultbf,defaultit,defaultsf,defaulttt}}
%
% But wouldn't it be simpler to manage \cs{protected} macros?
% \begin{macrocode}
- \ifmst@robust@obsessed@LaTeX@era
\@tfor\@tempa:={grave}{acute}{check}{breve}{bar}%
{dot}{ddot}{mathring}{hat}{tilde}%
\do
@@ -9569,58 +10279,47 @@ defaultbf,defaultit,defaultsf,defaulttt}}
{\noexpand\protect
\expandafter\noexpand\csname mst@\@tempa @mv#1 \endcsname}%
}%
- \fi
- \else % false branch of ifUniEnc
+ \else
% \end{macrocode}
% \cs{DeclareMathAccent} works \cs{global}ly. And with \LaTeX{} |2019-10-01|
% or later it creates robust macros.
%
% \cs{mst@DeclareMathAccent} to work around \url{https://github.com/latex3/latex2e/issues/216}
% \begin{macrocode}
- % \` -> \grave
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@grave@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\`\endcsname{}}
- % \' -> \acute
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@acute@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\'\endcsname{}}
- % \v -> \check
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@check@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\v\endcsname{}}
- % \u -> \breve
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@breve@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\u\endcsname{}}
- % \= -> \bar
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@bar@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\=\endcsname{}}
- % \. -> \dot
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@dot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\.\endcsname{}}
- % \" -> \ddot
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@ddot@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\"\endcsname{}}
- % \r -> \mathring
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@mathring@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\r\endcsname{}}
- % \^ -> \hat
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@hat@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\^\endcsname{}}
- % \~ -> \tilde
\expandafter\mst@DeclareMathAccent\expandafter
{\csname mst@tilde@mv#1\endcsname}{\mathalpha}{mtoperatorfont}%
{\csname#2\string\~\endcsname{}}
\fi
\endgroup
}%
-\fi % \ifmst@mathaccents
+\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{\MTDeclareVersion}
@@ -9634,14 +10333,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \cs{SetSymbolFont}|{mteulervm}||{versionname}||{U}{zeur}{bx}{n}| if
% one wants to have a math version with bold Euler characters.
%
-% For version |1.1| we add an optional parameter specifying the shape
+% For version \mstrelease{1.1} we add an optional parameter specifying the shape
% to be used for letters.
%
% Note: (|2012/10/24|) I really should check whether the user attempts to
% redefine the `normal' and `bold' versions and issue a warning in
-% that case! Finally done at |1.3w| |2019/11/16|! Better late than never...
+% that case! Finally done at \mstrelease{1.3w} |2019/11/16|! Better late than never...
%
-% |1.3c| (|2013/12/14|) adds an extra optional parameter after all
+% \mstrelease{1.3c} (|2013/12/14|) adds an extra optional parameter after all
% previous ones, to inherit the settings from another version. Typically
% to be used with [bold]. I take this opportunity to sanitize a bit some
% line endings to avoid generating (in the preamble, document macros were
@@ -9650,11 +10349,11 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% purpose) the strange way I used |\@onlypreamble| in earlier
% version.
%
-% |1.3u| adds storage of macros holding the needed meanings for
+% \mstrelease{1.3u} adds storage of macros holding the needed meanings for
% \cs{imath}, \cs{hbar}, math accents, and the minus symbol,
% version wise.
%
-% |1.3w| adds the check to forbid |normal| and |bold| as version names.
+% \mstrelease{1.3w} adds the check to forbid |normal| and |bold| as version names.
% \begin{macrocode}
\newcommand*\MTDeclareVersion[6][]{%
\edef\mst@declareversionargs{{#1}{#2}{#3}{#4}{#5}{#6}}%
@@ -9666,14 +10365,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\MTDoNotDeclareVersion@\expandafter\@gobblefour
\fi
\relax\DeclareMathVersion{\mst@version}\MTDeclareVersion@
-}% \MTDeclareVersion
+}%
\newcommand*\MTDoNotDeclareVersion@[1][]{%
\PackageWarningNoLine{mathastext}{You asked to declare a version with name
`\mst@version'.^^J%
\@spaces Sorry but you are not allowed to do that.^^J%
\@spaces \ifmst@subdued Anyway the `subdued' option is in force\else
Use rather \string\Mathastext\space macro (with no optional argument)\fi
-}}%\MTDoNotDeclareVersion@
+}}%
\newcommand*\MTDeclareVersion@[1][]{%
\edef\mst@tmp{#1}%
\ifx\mst@tmp\empty\else
@@ -9685,7 +10384,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
inherits from `#1\string'\@gobble}%
\fi
\expandafter\MTDeclareVersion@@\mst@declareversionargs
-}% \MTDeclareVersion@
+}%
\newcommand*\MTDeclareVersion@@[6]{%
\expandafter\edef\csname mst@encoding@\mst@version\endcsname{#3}%
\expandafter\edef\csname mst@family@\mst@version\endcsname{#4}%
@@ -9706,46 +10405,69 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\ifx\mst@tmp\empty
\ifmst@italic
\SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{\mst@ltsh}%
-\immediate\write\m@ne{}%
-\PackageInfo{mathastext}{Latin letters in math version `#2\string'\MessageBreak
+ \immediate\write\m@ne{}%
+ \PackageInfo{mathastext}%
+ {\ifmst@noletters
+ \else
+ Latin letters in math version `#2\string'\MessageBreak
declared\on@line\MessageBreak
will use the font #3/#4/#5/\mst@ltsh
\ifmst@frenchmath\space(uppercase: #6)\fi\MessageBreak
+ \fi
Other characters (digits, ...) and \protect\log-like names\MessageBreak
- will be in `#6\string' shape\@gobble}%
-\immediate\write\m@ne{}%
+ \ifmst@noletters
+ will use the font #3/#4/#5/#6%
+ \else
+ will be in `#6\string' shape%
+ \fi\@gobble}%
+ \immediate\write\m@ne{}%
\expandafter\edef\csname mst@ltshape@\mst@version\endcsname{\mst@ltsh}%
\else
\SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#6}%
-\immediate\write\m@ne{}%
-\PackageInfo{mathastext}{Latin letters in math version `#2\string'\MessageBreak
+ \ifmst@noletters
+ \else
+ \immediate\write\m@ne{}%
+ \PackageInfo{mathastext}%
+ {Latin letters in math version `#2\string'\MessageBreak
declared\on@line\MessageBreak
will use the fonts #3/#4/#5(\mst@bold)/#6\@gobble}%
-\immediate\write\m@ne{}%
+ \fi
+ \immediate\write\m@ne{}%
\expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#6}%
\fi
- \else % #1 not empty
+ \else
+% \end{macrocode}
+% |#1| not empty.
+% \begin{macrocode}
\SetSymbolFont{mtletterfont}{#2}{#3}{#4}{#5}{#1}%
-\immediate\write\m@ne{}%
-\PackageInfo{mathastext}{Latin letters in math version `#2\string'\MessageBreak
+ \immediate\write\m@ne{}%
+ \PackageInfo{mathastext}%
+ {\ifmst@noletters
+ \else
+ Latin letters in math version `#2\string'\MessageBreak
declared\on@line\MessageBreak
will use the font #3/#4/#5/#1%
\ifmst@frenchmath\space(uppercase: #6)\fi\MessageBreak
+ \fi
Other characters (digits, ...) and
\protect\log-like names\MessageBreak
- will be in `#6\string' shape\@gobble}%
-\immediate\write\m@ne{}%
- \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1}%
+ \ifmst@noletters
+ will use the font #3/#4/#5/#6%
+ \else
+ will be in `#6\string' shape%
+ \fi\@gobble}%
+ \immediate\write\m@ne{}%
+ \expandafter\edef\csname mst@ltshape@\mst@version\endcsname{#1}%
\fi
% \end{macrocode}
-% Here and elsewhere |1.3za| has removed an
+% Here and elsewhere \mstrelease{1.3za} has removed an
% \cs{ifmst@nonormalbold} conditional.
% \begin{macrocode}
\SetMathAlphabet{\Mathnormalbold}{#2}{#3}{#4}{\mst@bold}%
{\csname mst@ltshape@\mst@version\endcsname}%
\SetSymbolFont{mtoperatorfont}{#2}{#3}{#4}{#5}{#6}%
% \end{macrocode}
-% Since |1.3za| (and prior to |1.15f|) these math alphabet
+% Since \mstrelease{1.3za} (and prior to \mstrelease{1.15f}) these math alphabet
% commands are always defined.
% \begin{macrocode}
\SetMathAlphabet{\Mathbf}{#2}{#3}{#4}{\mst@bold}{#6}
@@ -9765,12 +10487,12 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% options as well as on the (local to this version) shapes for letters
% and digits.
%
-% |1.3x| replaces \cs{updefault} by \cs{MTgreekupdefault} and
+% \mstrelease{1.3y} replaces \cs{updefault} by \cs{MTgreekupdefault} and
% \cs{itdefault} by \cs{MTgreekitdefault}. It also prepares to store
% two Boolean settings saying whether lowercase respectively uppercase
% Greek letters will use `upright' or `italic' (|LGRgreek(s)| only).
%
-% The |1.3x| refactoring of |LGRgreek| is done via a decoupling,
+% The \mstrelease{1.3y} refactoring of |LGRgreek| is done via a decoupling,
% thus things are done here under |selfGreek| or other Greek options
% which ultimately serve nothing and conversely things are done here
% for |LGRgreek| which are superfluous.
@@ -9813,7 +10535,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\mst@greek@upper@uptrue
\fi
% \end{macrocode}
-% |1.3za| refactoring to reduce code duplication; I briefly considered
+% \mstrelease{1.3za} refactoring to reduce code duplication; I briefly considered
% trying to enhance \cs{MTgreekfont} to work also with |LGRgreeks| and
% |selfGreeks| but I have dropped the idea for now.
% \begin{macrocode}
@@ -9875,7 +10597,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\expandafter\mst@dothe@hyphenstuff\mst@tmp
\fi
\fi
-}% \MTDeclareVersion@@
+}%
\let\MathastextDeclareVersion\MTDeclareVersion
% \end{macrocode}
% \end{macro}
@@ -9890,45 +10612,48 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% additionally to the math fonts. Present already in the initial
% version of the package (January 2011.)
%
-% |1.15|: some modifications for the subdued option vs LGRgreek and
+% \mstrelease{1.15}: some modifications for the subdued option vs LGRgreek and
% for the math muskips after \cs{exists} and \cs{forall}.
%
-% |1.2|: with the subdued option sets the math alphabets in the
+% \mstrelease{1.2}: with the subdued option sets the math alphabets in the
% normal and bold math versions do not apply to operator
% names and non-alphabetical symbols. The switch for braces
% is left as it is.
%
-% |1.2b|: with the subdued option, the italic corrections are not added.
+% \mstrelease{1.2b}: with the subdued option, the italic corrections are not added.
% Else, we check the shape of letters in this version. Also, there was a bug
-% since |1.15|: the values of the math skips were taken not from the
+% since \mstrelease{1.15}: the values of the math skips were taken not from the
% settings for the math version (\#2) but from those of the optional argument
% (\#1), if present...
%
-% |1.3|: activation of italic corrections is now separated from actual math
+% \mstrelease{1.3}: activation of italic corrections is now separated from actual math
% activation of letters.
%
-% |1.3c|: a starred variant is added which does not modify the text fonts,
+% \mstrelease{1.3c}: a starred variant is added which does not modify the text fonts,
% only the math set-tup.
%
-% |1.3d|: replaced in |\MTversion@| things like |\edef\mst@encoding{...}| and
-% |\renewcommand{\encodingdefault}{\mst@@encoding}| by
+% \mstrelease{1.3d}: replaced in |\MTversion@| things like |\edef\mst@encoding{...}| and
+% \centeredline{|\renewcommand{\encodingdefault}{\mst@@encoding}|} by
% |\edef\encodingdefault{...}| etc\dots All those |\mst@@...| things were
% useless. I also redefine |\seriesdefault| rather than |\mddefault|.
%
-% |1.3d|: mechanism of restoration of Greek in subdued normal and bold
+% \mstrelease{1.3d}: mechanism of restoration of Greek in subdued normal and bold
% versions has been to all cases, and not only for the
% |LGRgreek| option.
%
-% |1.3u|: version savvy (i.e.\@ font-encoding savvy) minus sign,
+% \mstrelease{1.3u}: version savvy (i.e.\@ font-encoding savvy) minus sign,
% \cs{hbar}, \cs{imath}, math accents.
%
-% |1.3x|: Booleans recovered from stored data in the math version will
+% \mstrelease{1.3y}: Booleans recovered from stored data in the math version will
% configure the things \cs{MTcustomgreek} do, under |LGRgreek| option.
% \begin{macrocode}
-\newcommand*\MTversion {\@ifstar\MTversion@s\MTversion@ }
-\newcommand*\MTversion@s [1]{\mathversion{#1}\MTversion@@ }
+\newcommand*\MTversion {\@ifstar\MTversion@s\MTversion@}
+\newcommand*\MTversion@s [1]{\mathversion{#1}\MTversion@@}
\newcommand*\MTversion@ [2][]{%
- \mathversion{#2}% defines \math@version as expanded #2
+% \end{macrocode}
+% This defines \cs{math@version} as expanded |#2|.
+% \begin{macrocode}
+ \mathversion{#2}%
\edef\mst@tmpa{#1}%
\ifx\mst@tmpa\empty
\let\mst@tmp\math@version
@@ -9946,14 +10671,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\edef\ttdefault {\csname mst@ttdefault@\mst@tmp\endcsname}%
\usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}%
\MTversion@@
-}% \MTversion@
+}%
% \end{macrocode}
-% |1.3j| has a stronger subdued which does \cs{MTnormalprime},
+% \mstrelease{1.3j} has a stronger subdued which does \cs{MTnormalprime},
% \cs{MTnormalexists}, \cs{MTnormalforall} rather than setting the skips to
% |0mu|. Hence \cs{MTversion} by default should do \cs{MTprimedoesskip},
% \cs{MTexistsdoesskip}, \cs{MTforalldoesskip}.
%
-% |1.3u| drops the argument, as the info is in \cs{math@version} from
+% \mstrelease{1.3u} drops the argument, as the info is in \cs{math@version} from
% \LaTeX2e code.
% \begin{macrocode}
\newcommand*\MTversion@@ {%
@@ -9979,18 +10704,18 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\edef\mst@tmpa{\csname mst@ltshape@\math@version\endcsname}%
\edef\mst@tmpb{\csname mst@shape@\math@version\endcsname}%
% \end{macrocode}
-% |v1.15c|: extending subdued to LGRgreek.
+% \mstrelease{1.15c}: extending subdued to LGRgreek.
%
-% |v1.15f|: subdueing math alphabets in a simpler way than in |1.15e|.
+% \mstrelease{1.15f}: subdueing math alphabets in a simpler way than in \mstrelease{1.15e}.
%
-% |v1.2b|: subdueing the activation of characters in math mode.
+% \mstrelease{1.2b}: subdueing the activation of characters in math mode.
%
-% |v1.2d|: special treatment of the asterisk.
+% \mstrelease{1.2d}: special treatment of the asterisk.
%
-% |v1.3d|: extended LGRgreek mechanism of activation/restoration of Greek to all
+% \mstrelease{1.3d}: extended LGRgreek mechanism of activation/restoration of Greek to all
% cases.
%
-% |v1.3j|: use of \cs{MTeverymathdefault}, which includes \cs{MTicinmath}, but
+% \mstrelease{1.3j}: use of \cs{MTeverymathdefault}, which includes \cs{MTicinmath}, but
% must be corrected then according to shape of letters and presence or absence
% of option |frenchmath|. We do only |\def\mst@ITcorr{\ifnum\fam=\m@ne\/\fi}|
% and not \cs{MTICinmath} to not overwrite some user-defined
@@ -9999,6 +10724,12 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% user customizing possibilities, but if I moved it later, I would possibly
% have to put inside the \cs{MTicinmath} the check for |it| ot |sl|. Similary
% the \cs{MTcustomgreek} always executed (if not |subdued|).
+%
+% MEMO: \cs{MTeverymathdefault} is executed \emph{also} if in |subdued| mode
+% but there is a \cs{MTeverymathoff} done next in the \emph{normal} and
+% \emph{bold} version. It does \cs{MTicinmath} and \cs{MTmathactivedigits}
+% which however are no-ops (only partly for the former, and for the latter
+% always anyhow if no option |activedigits|) in subdude mode.
% \begin{macrocode}
\MTmathoperatorsobeymathxx
\MTeverymathdefault
@@ -10009,7 +10740,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\@for\mst@tmpc:=it,sl\do{\ifx\mst@tmpc\mst@tmpb\MTnoICinmath\fi}%
\fi
% \end{macrocode}
-% |1.3j| has a stronger subdued which does \cs{MTnormalprime},
+% \mstrelease{1.3j} has a stronger subdued which does \cs{MTnormalprime},
% \cs{MTnormalexists}, \cs{MTnormalforall} rather than simply setting the
% skips to |0mu|. Note: \cs{MTnormalprime} is done as part of
% \cs{MTeverymathoff}.
@@ -10027,13 +10758,18 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\MTmathoperatorsdonotobeymathxx
\MTnormalexists
\MTnormalforall
+% \end{macrocode}
+% \mstrelease{1.4} has kept \cs{MTmathstandardletters} inside
+% \cs{MTeverymathoff} but its action is now quite different from earlier
+% situation as it resets mathcodes from active to normal status on the spot.
+% \begin{macrocode}
\MTeverymathoff
\MTresetnewmcodes
% \end{macrocode}
-% |1.3t| adds better compatibility with |subdued| mode for
+% \mstrelease{1.3t} adds better compatibility with |subdued| mode for
% |\imath/\jmath| and perfect compatibility for the minus sign.
%
-% |1.3u| extends this further to allow per-math-version meanings
+% \mstrelease{1.3u} extends this further to allow per-math-version meanings
% for them.
% \begin{macrocode}
\mst@subduedhbar
@@ -10056,7 +10792,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\else
\mst@setalphabets
% \end{macrocode}
-% |1.3x| addition for \cs{MTcustomgreek} under |LGRgreeks| option.
+% \mstrelease{1.3y} addition for \cs{MTcustomgreek} under |LGRgreeks| option.
+%
+% MEMO: the needed mathematical re-activation of letters when switching from
+% \emph{normal} or \emph{bold} to a non-|subdued| math version has already
+% been done above from the \cs{MTicinmath} which is part of
+% \cs{MTeverymathdefault}.
+%
+% MEMO: idem for digits under option |activedigits|.
% \begin{macrocode}
\expandafter\let\csname ifmst@greek@upper@up\expandafter\endcsname
\csname ifmst@greek@\math@version @upper@up\endcsname
@@ -10071,19 +10814,22 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\fi
\else
% \end{macrocode}
-% |1.3x| addition for \cs{MTcustomgreek} under |LGRgreek| option.
+% \mstrelease{1.3y} addition for \cs{MTcustomgreek} under |LGRgreek| option.
+%
+% MEMO: the mathematical activation of letters happened above from
+% \cs{MTeverymathdefault}. Idem if |activedigits| for digits.
% \begin{macrocode}
\expandafter\let\csname ifmst@greek@upper@up\expandafter\endcsname
\csname ifmst@greek@\math@version @upper@up\endcsname
\expandafter\let\csname ifmst@greek@lower@up\expandafter\endcsname
\csname ifmst@greek@\math@version @lower@up\endcsname
- \MTcustomgreek % new with 1.3d
+ \MTcustomgreek
\mst@nonsubduedhbar
\mst@nonsubduedinodot
\mst@nonsubduedmathaccents
\mst@nonsubduedminus
\fi
-}% \MTversion@@
+}%
\let\MathastextVersion\MTversion
\let\Mathastextversion\MTversion
\let\MTVersion\MTversion
@@ -10100,7 +10846,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\MTfamily{#3}
\MTseries{#4}
\MTshape{#5}
- \ifmst@italic\MTlettershape{\itdefault}\fi % was missing in v 1.14 and prior
+ \ifmst@italic\MTlettershape{\itdefault}\fi
\edef\mst@tmp{#1}
\ifx\mst@tmp\empty\else\MTlettershape{#1}\fi
\Mathastext}
@@ -10113,23 +10859,23 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% preamble and any number of time, the last one is the
% one that counts.
%
-% In version |1.1| we have two fonts: they only differ in
+% In version \mstrelease{1.1} we have two fonts: they only differ in
% shape. The |mtletterfont| is for letters, and the
% |mtoperatorfont| for digits and log-like operator
% names. The default is that both are upright.
%
-% Starting with version |1.12|, an optional argument makes
+% Starting with version \mstrelease{1.12}, an optional argument makes
% \cs{Mathastext} act as the declaration of a math
% version, to be later used in the document.
%
-% Versions |1.15x| brought some adaptations related to the subdued
+% Versions \mstrelease{1.15x} brought some adaptations related to the subdued
% option.
%
-% |1.3c| adds a second optional parameter to inherit previous settings
+% \mstrelease{1.3c} adds a second optional parameter to inherit previous settings
% from another version; mostly done to inherit the bold version fonts for
% symbols and large symbols. This is done in |\MTDeclareVersion|.
%
-% |1.3j| moves the code related to \cs{MTicinmath} from \cs{Mathastext@} to
+% \mstrelease{1.3j} moves the code related to \cs{MTicinmath} from \cs{Mathastext@} to
% \cs{AtBeginDocument} (code depending on whether |subdued| option in use).
% But we omit for this from \cs{MTicinmath} the \cs{MTmathactiveletters}
% and issue the latter during loading of package, hence allowing
@@ -10139,15 +10885,15 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% command without optional parameter does not any |\SetSymbolFont| etc...
% but it has a few other tasks to complete nevertheless.
%
-% |1.3u| fixes some long-standing bug that \cs{Mathastext} did not repeat some
+% \mstrelease{1.3u} fixes some long-standing bug that \cs{Mathastext} did not repeat some
% font-encoding dependent things: they got done only once during package
% loading (things regarding the \cs{hbar}, \cs{imath}, the math accents and
% the minus sign). They are now part of the contents of \cs{Mathastext} macro
% itself (which is executed during package loading).
%
-% |1.3x| has refactored the |LGRgreek| associated math fonts.
+% \mstrelease{1.3y} has refactored the |LGRgreek| associated math fonts.
% \begin{macrocode}
-\def\Mathastext {\@ifnextchar [\Mathastext@declare\Mathastext@ }
+\def\Mathastext {\@ifnextchar[\Mathastext@declare\Mathastext@}% ]
\def\Mathastext@declare [#1]{%
\edef\mst@tmp{#1}%
\ifx\mst@tmp\empty
@@ -10156,7 +10902,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\fi
\Mathastext@
{\MTDeclareVersion[\mst@ltsh]{#1}{\mst@enc}{\mst@fam}{\mst@ser}{\mst@opsh}}%
-}% \Mathastext@declare
+}%
\def\Mathastext@ {%
\mst@update@greeksh
\edef\mst@encoding@normal{\mst@enc}%
@@ -10187,7 +10933,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\edef\mst@prime@skip@bold{\mst@prime@skip}%
\ifmst@subdued
% \end{macrocode}
-% Since |1.3j| this branch is actually almost superfluous, as entering
+% Since \mstrelease{1.3j} this branch is actually almost superfluous, as entering
% |normal| or |bold| with \cs{MTversion} does \cs{MTnormalexists},
% \cs{MTnormalforall}, and \cs{MTnormalprime}. But some default values are
% needed if the user insists on issuing \cs{MTexistsdoesskip}, etc...
@@ -10199,7 +10945,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\def\mst@exists@skip@bold{0mu}%
\def\mst@forall@skip@bold{0mu}%
\def\mst@prime@skip@bold{0mu}%
- \else % not subdued
+ \else
\ifmst@italic
\ifmst@frenchmath
\mst@exists@muskip\mst@exists@skip\relax
@@ -10220,8 +10966,8 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\fi
\fi
% \end{macrocode}
-% Here and elsewhere |1.3za| has removed usage of an
-% \cs{ifmst@nonormalbold} conditional which was added at |1.15f|.
+% Here and elsewhere \mstrelease{1.3za} has removed usage of an
+% \cs{ifmst@nonormalbold} conditional which was added at \mstrelease{1.15f}.
% \begin{macrocode}
\SetMathAlphabet{\Mathnormalbold}{normal}{\mst@encoding@normal}%
{\mst@family@normal}%
@@ -10249,7 +10995,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
{\mst@series@bold}%
{\mst@shape@bold}%
% \end{macrocode}
-% |1.3za| removes the |1.15f| added conditional checks.
+% \mstrelease{1.3za} removes the \mstrelease{1.15f} added conditional checks.
% \begin{macrocode}
\SetMathAlphabet{\Mathbf}{normal}{\mst@encoding@normal}%
{\mst@family@normal}%
@@ -10283,10 +11029,10 @@ defaultbf,defaultit,defaultsf,defaulttt}}
{\mst@ttdefault@bold}%
{\mst@series@bold}%
{\mst@shape@bold}%
- \fi % de \ifmst@subdued
+ \fi
% \end{macrocode}
% \begin{macro}{\MathEulerBold}
-% |1.14c|: We reset |mteulervm| and \cs{MathEulerBold} here as the
+% \mstrelease{1.14c}: We reset |mteulervm| and \cs{MathEulerBold} here as the
% variant for bold may have been changed by the user via
% \cs{Mathastextboldvariant}|{m}|; and we should keep this local to
% math versions.
@@ -10309,9 +11055,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \begin{macro}{selfGreek*}
% LGRgreek, LGRgreeks, selfGreek, and selfGreeks options.
%
-% |1.3x| has refactored the |LGRgreek| associated math fonts.
+% \mstrelease{1.3y} has refactored the |LGRgreek| associated math fonts.
%
-% |1.3za| adds the math alphabets \cs{mathgreekitbold} and
+% \mstrelease{1.3za} adds the math alphabets \cs{mathgreekitbold} and
% \cs{mathgreekupbold}.
% And it executes this code also in |subdued| mode, because
% anyhow the symbolfonts |mtgreekup| and |mtgreekit| and
@@ -10352,7 +11098,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macrocode}
% \end{macro}
% \end{macro}
-% |1.3za| adds the log message in case of |selfGreek| option.
+% \mstrelease{1.3za} adds the log message in case of |selfGreek| option.
% \begin{macrocode}
\ifmst@subdued
\else
@@ -10380,7 +11126,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\mst@infoline{Other characters (digits, ...) and \string\log-like names will be}%
\mst@infoline{typeset with the \mst@shape@normal\space shape.}%
\fi
- \fi % end of else branch \ifmst@subdued
+ \fi
\ifmst@nohbar\else
\mst@infoline{\string\hbar}%
\mst@dothe@hbarstuff
@@ -10415,9 +11161,9 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\let\mst@varfam@minus@mvbold\mst@varfam@minus@mvnormal
\fi
\fi
- \fi % minus
+ \fi
% \end{macrocode}
-% |1.3zb| moves this info line last and also explicitly mentions |italic| or
+% \mstrelease{1.3zb} moves this info line last and also explicitly mentions |italic| or
% |frenchmath| (here and at some other locations above).
% \begin{macrocode}
\ifmst@subdued
@@ -10427,7 +11173,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\mst@infoline{The \ifmst@frenchmath frenchmath \else
italic \fi option is in effect.}%
\fi
-}% \Mathastext@
+}%
\let\mathastext\Mathastext
\Mathastext
% \end{macrocode}
@@ -10488,14 +11234,23 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\MTeverymathoff}
-% |1.3i 2016/01/06| Compatibility patch with |\url| from |url.sty| and
+% \mstrelease{1.3i} |2016/01/06| Compatibility patch with |\url| from |url.sty| and
% |\url/\nolinkurl| from |hyperref.sty|.
%
-% |1.3j 2016/01/15| renamed the macro from |\MTactivemathoff| to
+% \mstrelease{1.3j} |2016/01/15| renamed the macro from |\MTactivemathoff| to
% |\MTeverymathoff|, as it is not exclusively a matter of math active
% characters due to |\MTeasynonlettersdonotobeymathxx|.
%
-% |1.3o 2016/05/03| adds \cs{MTdonotfixfonts}. Operant with \LuaLaTeX\ only.
+% \mstrelease{1.3o} |2016/05/03| adds \cs{MTdonotfixfonts}. Operant with
+% \LuaLaTeX\ only.
+%
+% \mstrelease{1.4} |2024/07/20| keeps the \cs{MTmathstandardletters} as a
+% component of \cs{MTeverymathoff}. It was checked that \ctanpkg{url} and
+% \ctanpkg{hyperref} do not change mathcodes of ascii letters prior to
+% location where \cs{MTeverymathoff} gets executed, so nothing is
+% overwritten, despite the new mode of action of \cs{MTmathstandardletters}.
+%
+% \mstrelease{1.4} has \cs{MTmathstandarddigits} and inserts it into \cs{MTeverymathoff}.
% \begin{macrocode}
\newcommand*\MTeverymathoff {%
\MTnormalasterisk
@@ -10503,6 +11258,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\MTnonlettersdonotobeymathxx
\MTeasynonlettersdonotobeymathxx
\MTmathstandardletters
+ \MTmathstandarddigits
\MTdonotfixfonts
}%
\AtBeginDocument {%
@@ -10513,7 +11269,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\MTeverymathdefault}
-% |1.3j 2016/01/15| Customizable command which gets executed by
+% \mstrelease{1.3j} |2016/01/15| Customizable command which gets executed by
% \cs{MTversion} except when switching to |normal/bold| if option |subdued|.
% The included \cs{MTicinmath} does \cs{MTmathactiveletters} which will also
% activate the math skips around letters.
@@ -10537,13 +11293,18 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% it will not be overruled (as it is delayed at begin document to after \mst
% dealings).
%
-% |1.3o 2016/05/03| adds \cs{MTfixfonts}. Operant with \LuaLaTeX\ only.
+% \mstrelease{1.3o} |2016/05/03| adds \cs{MTfixfonts}. Operant with
+% \LuaLaTeX\ only.
+%
+% \cs{MTmathactivedigits} of \mstrelease{1.4} is a no-op except under option
+% |activedigits|.
% \begin{macrocode}
\newcommand*\MTeverymathdefault {%
\MTactiveasterisk
\MTprimedoesskip
\MTeasynonlettersobeymathxx
\MTicinmath
+ \MTmathactivedigits
\MTfixfonts
}%
% \end{macrocode}
@@ -10552,48 +11313,54 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% \def~{\rlap}
% \begin{macro}{Things to do last ~{``at begin document''}}
% \let~\temp
+%
+% \mstrelease{1.4} has a significant change here that mathematical
+% activation of ascii letters is now not incorporated into the \cs{everymath}
+% and \cs{everydisplay}.
% \begin{macrocode}
-\AtBeginDocument{%
- \everymath\expandafter{\the\everymath
- \mst@the\mst@do@nonletters \let\mst@the\@gobble
- \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
- \mst@thef\mst@do@az \let\mst@thef\@gobble
- \mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
- \everydisplay\expandafter{\the\everydisplay
- \mst@the\mst@do@nonletters \let\mst@the\@gobble
- \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
- \mst@thef\mst@do@az \let\mst@thef\@gobble
- \mst@theF\mst@do@AZ \let\mst@theF\@gobble}%
-% \end{macrocode}
-% |1.3j|: moved here to be executed at begin document (and not from inside
+\ifmst@everymath
+ \AtBeginDocument{%
+ \everymath\expandafter{\the\everymath
+ \mst@the\mst@do@nonletters \let\mst@the\@gobble
+ \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
+ }%
+ \everydisplay\expandafter{\the\everydisplay
+ \mst@the\mst@do@nonletters \let\mst@the\@gobble
+ \mst@theeasy\mst@do@easynonletters \let\mst@theeasy\@gobble
+ }%
+ }
+\fi
+% \end{macrocode}
+% \mstrelease{1.3j}: moved here to be executed at begin document (and not from inside
% \cs{Mathastext@}.) The \cs{MTeverymathoff} does: \cs{MTnormalasterisk},
% \cs{MTnormalprime}, \cs{MTnonlettersdonotobeymathxx},
% \cs{MTeasynonlettersdonotobeymathxx}, \cs{MTmathstandardletters}.
%
-% |1.3m|: doing \cs{MTmathactiveletters} in subdued mode immediately after
+% \mstrelease{1.3m}: doing \cs{MTmathactiveletters} in subdued mode immediately after
% |\begin{document}| resulted in errors because \cs{mst@itcorr} had been left
% undefined. We thus add \cs{MTnoicinmath} to the subdued initialization.
%
-% Since |1.3n| there is \cs{MTresetnewmcodes} which needs
+% Since \mstrelease{1.3n} there is \cs{MTresetnewmcodes} which needs
% \cs{mst@originalnewmcodes@}, itself defined at begin document. Thus we have
-% wrapped the whole thing in \cs{AtEndOfPackage} (at |1.3u| whole code
+% wrapped the whole thing in \cs{AtEndOfPackage} (at \mstrelease{1.3u} whole code
% directly moved at end of package).
%
-% And |1.3p| adds here \cs{MTcustomizenewmcodes} which had been regrettably
-% forgotten by |1.3n|.
+% And \mstrelease{1.3p} adds here \cs{MTcustomizenewmcodes} which had been regrettably
+% forgotten by \mstrelease{1.3n}.
%
-% |1.3t| adds some extras to handle correctly the minus sign and
+% \mstrelease{1.3t} adds some extras to handle correctly the minus sign and
% dotless i and j in subdued mode, even in case of usage with fontspec.
%
-% |1.3u| similarly lets math accents be correctly subdued.
+% \mstrelease{1.3u} similarly lets math accents be correctly subdued.
%
-% |1.3v| adapts to \cs{hbar} and math accents now being robust with \LaTeX{}
+% \mstrelease{1.3v} adapts to \cs{hbar} and math accents now being robust with \LaTeX{}
% |2019-10-01| or later.
%
-% |1.3w| pays attention to the fact that \cs{hbar} may well be
+% \mstrelease{1.3w} pays attention to the fact that \cs{hbar} may well be
% a |\mathchar| and not a robust macro! And no need to worry about
% \cs{hbar<space>} finally in revised code.
% \begin{macrocode}
+\AtBeginDocument{%
\MTcustomizenewmcodes
\let\mst@original@hbar\hbar
\let\mst@original@imath\imath
@@ -10617,21 +11384,18 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\MTresetnewmcodes
\MTnoicinmath
\MTmathoperatorsdonotobeymathxx
- %\mst@subduedhbar
\let\inodot\imath
\let\jnodot\jmath
- %\mst@subduedmathaccents
\mst@subduedminus
\else
\mst@nonsubduedhbar
% \end{macrocode}
-% |1.3v| needs this \cs{mst@nonsubduedmathaccents} to get executed later (see
+% \mstrelease{1.3v} needs \cs{mst@nonsubduedmathaccents} to get executed later (see
% code comments for \cs{mst@dothe@mathaccentsstuff}).
% \begin{macrocode}
- % \mst@nonsubduedmathaccents % will get executed later
\mst@nonsubduedminus
% \end{macrocode}
-% |1.3j|: an earlier version of this code was earlier part of \cs{Mathastext@}.
+% \mstrelease{1.3j}: an earlier version of this code was earlier part of \cs{Mathastext@}.
% As we are now in \cs{AtBeginDocument} we try to be careful not to overwrite
% \cs{MTicinmath}, \cs{MTnoicinmath}, \cs{MTicalsoinmathxx}, ... if issued by
% the user in the preamble, though. And we do not execute
@@ -10652,12 +11416,12 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\fi
\fi
\fi
-}% \AtBeginDocument
+}%
\AtEndOfPackage{\AtBeginDocument{\ifmst@subdued\else\mst@nonsubduedmathaccents\fi}}%
% \end{macrocode}
% \end{macro}
% \begin{macro}{subdued}
-% |1.15|: The subdued code was initiated in May 2011. I returned to
+% \mstrelease{1.15}: The subdued code was initiated in May 2011. I returned to
% |mathastext| on Sep 24, 2012, and decided to complete what I had started
% then, but in the mean time I had forgotten almost all of the little I knew
% about \LaTeX{} macro programming.
@@ -10671,7 +11435,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% $^1$but the \emph{euler} package for example
% assigns the digits to the \emph{letters} symbol font...
%
-% |1.15d|: Oct 13, 2012. The \cs{mathcode} thing has to be used with care
+% \mstrelease{1.15d}: Oct 13, 2012. The \cs{mathcode} thing has to be used with care
% under Unicode engines. Unfortunately the \cs{luatexUmathcode} macro is
% helpless as it is not possible to know if it will return a legacy mathcode
% or a Unicode mathcode. On the other hand the much saner
@@ -10683,14 +11447,14 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% treats identically under both unicode engines the equal and minus signs (and
% the vertical bar).}
%
-% |1.15e|: Oct 22, 2012. I add the necessary things to also subdue the
+% \mstrelease{1.15e}: Oct 22, 2012. I add the necessary things to also subdue the
% \cs{mathbf}, \cs{mathit}, \cs{mathsf} and \cs{mathtt} macros (previous
% version only took care of the symbol alphabets \cs{mathnormal} and
-% \cs{mathrm}.) [update: |1.15f| does that in a completely different and much
+% \cs{mathrm}.) [update: \mstrelease{1.15f} does that in a completely different and much
% simpler way] Notice that the package defines a \cs{mathnormalbold} macro,
% but it will not be subdued in the normal and bold math versions.
%
-% |1.15f|: Oct 23, 2012. The previous version of the code queried the math
+% \mstrelease{1.15f}: Oct 23, 2012. The previous version of the code queried the math
% family of a, respectively 1, to guess and then extract the fonts to be
% reassigned to mtletterfont and mtoperatorfont (which is done at the end of
% this .sty file). The present code simply directly uses letters and operators
@@ -10705,23 +11469,24 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% to revert these changes (and one would have to do even more hacking for
% |\mathversion{normal}| and not only |\MTversion{normal}| to work).
%
-% |1.15f|: and also I take this opportunity to do the subdued math
+% \mstrelease{1.15f}: and also I take this opportunity to do the subdued math
% alphabets things in a much much easier way, see below.
%
-% |1.3s 2018/08/21|: I have half-forgotten the reasons for modifiying the
+% \mstrelease{1.3s} |2018/08/21|: I have half-forgotten the reasons for modifiying the
% font encoding to current |\encodingdefault|, but at any rate this should
% not be done in a \ctanpkg{fontspec} context, encoding default being (now) |TU| it
% is very unlikely modifying from |TU| or to |TU| from something else will
-% do any good.^^A See
+% do any good.
+%^^A See
%^^A \centeredline{\url{https://tex.stackexchange.com/questions/444565/mathastext-wrong-digits-in-math-mode/}}
%^^A for original report.
% I add workaround here for case of \ctanpkg{fontspec} being
% detected via the |\encodingdefault| setting.
%
-% |1.3t 2018/08/22|: the |1.3s| fix erroneously removed the
+% \mstrelease{1.3t} |2018/08/22|: the \mstrelease{1.3s} fix erroneously removed the
% |OT1->T1| replacement in |TU| context.
%
-% |1.3u|: the whole thing will only get executed At Begin
+% \mstrelease{1.3u}: the whole thing will only get executed At Begin
% Document.
%
% I realize extremely late (|2023/12/28|) I never said explicitly anywhere
@@ -10734,7 +11499,7 @@ defaultbf,defaultit,defaultsf,defaulttt}}
% behavior of the package.
% \begin{macrocode}
\ifmst@subdued
-\AtBeginDocument{%
+ \AtBeginDocument{%
\def\mst@reserved#1\getanddefine@fonts\symletters#2#3\@nil{%
\def\mst@normalmv@letter{#2}}%
\expandafter\mst@reserved\mv@normal\@nil
@@ -10773,15 +11538,19 @@ defaultbf,defaultit,defaultsf,defaulttt}}
\else
\mst@tmp@enc
\fi/\mst@reste\endcsname}%
- \expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@letter\symmtletterfont
- \expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@letter\symmtletterfont
- \expandafter\SetSymbolFont@ \expandafter\mv@normal\mst@normalmv@operator\symmtoperatorfont
- \expandafter\SetSymbolFont@ \expandafter\mv@bold\mst@boldmv@operator\symmtoperatorfont
-\immediate\write\m@ne{}%
+ \expandafter\SetSymbolFont@
+ \expandafter\mv@normal\mst@normalmv@letter\symmtletterfont
+ \expandafter\SetSymbolFont@
+ \expandafter\mv@bold\mst@boldmv@letter\symmtletterfont
+ \expandafter\SetSymbolFont@
+ \expandafter\mv@normal\mst@normalmv@operator\symmtoperatorfont
+ \expandafter\SetSymbolFont@
+ \expandafter\mv@bold\mst@boldmv@operator\symmtoperatorfont
+ \immediate\write\m@ne{}%
\PackageInfo{mathastext}{...entering subdued mode...\MessageBreak ...done}%
-\immediate\write\m@ne{}%
-}% \AtBeginDocument
-\fi % \ifmst@subdued
+ \immediate\write\m@ne{}%
+ }%
+\fi
% \end{macrocode}
%^^A In the short-lived |1.15e| I was doing the following for alphabets:\\
%^^A |\def\mst@reservedc#1#2#3#4{\def\mst@normalmv@mathbf{#4#3}}|\\
diff --git a/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx
index d6a14105cad..f0f644acbd8 100644
--- a/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx
+++ b/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx
@@ -14,7 +14,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamercolorthememoloch}[2024-03-06 v0.3.0 Moloch color theme] % x-release-please-version
+\ProvidesPackage{beamercolorthememoloch}[2024-07-09 v0.4.0 Moloch color theme] % x-release-please-version
%</package>
% \fi
% \CheckSum{0}
diff --git a/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx
index 4748387c3cc..cc3396fe472 100644
--- a/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx
+++ b/Master/texmf-dist/source/latex/moloch/beamerfontthememoloch.dtx
@@ -14,7 +14,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerfontthememoloch}[2024-03-06 v0.3.0 Moloch font theme] % x-release-please-version
+\ProvidesPackage{beamerfontthememoloch}[2024-07-09 v0.4.0 Moloch font theme] % x-release-please-version
%</package>
% \fi
% \CheckSum{0}
@@ -27,9 +27,12 @@
%
% A |beamer| font theme sets the style of the font used in the document.
%
+%
+%
% \subsubsection{Package dependencies}
%
% \begin{macrocode}
+\RequirePackage{etoolbox}
\RequirePackage{pgfopts}
% \end{macrocode}
%
@@ -51,6 +54,188 @@
\setbeamerfont{standout}{size=\Large, series=\bfseries}
% \end{macrocode}
%
+%
+%
+% \subsubsection{Title format options}
+%
+% \begin{macro}{titleformat title}
+% Controls the format of the title.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/font/titleformat title/.cd,
+ .is choice,
+ regular/.code={%
+ \let\moloch@titleformat\@empty%
+ \setbeamerfont{title}{shape=\normalfont}%
+ },
+ smallcaps/.code={%
+ \let\moloch@titleformat\@empty%
+ \setbeamerfont{title}{shape=\scshape}%
+ },
+ allsmallcaps/.code={%
+ \let\moloch@titleformat\lowercase%
+ \setbeamerfont{title}{shape=\scshape}%
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat title=allsmallcaps can lead to problems%
+ }
+ },
+ allcaps/.code={%
+ \let\moloch@titleformat\uppercase%
+ \setbeamerfont{title}{shape=\normalfont}
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat title=allcaps can lead to problems%
+ }
+ },
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{titleformat subtitle}
+% Control the format of the subtitle.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/font/titleformat subtitle/.cd,
+ .is choice,
+ regular/.code={%
+ \let\moloch@subtitleformat\@empty%
+ \setbeamerfont{subtitle}{shape=\normalfont}%
+ },
+ smallcaps/.code={%
+ \let\moloch@subtitleformat\@empty%
+ \setbeamerfont{subtitle}{shape=\scshape}%
+ },
+ allsmallcaps/.code={%
+ \let\moloch@subtitleformat\MakeLowercase%
+ \setbeamerfont{subtitle}{shape=\scshape}%
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat subtitle=allsmallcaps can lead to problems%
+ }
+ },
+ allcaps/.code={%
+ \let\moloch@subtitleformat\MakeUppercase%
+ \setbeamerfont{subtitle}{shape=\normalfont}%
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat subtitle=allcaps can lead to problems%
+ }
+ },
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{titleformat section}
+% Controls the format of the section title.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/font/titleformat section/.cd,
+ .is choice,
+ regular/.code={%
+ \let\moloch@sectiontitleformat\@empty%
+ \setbeamerfont{section title}{shape=\normalfont}%
+ },
+ smallcaps/.code={%
+ \let\moloch@sectiontitleformat\@empty%
+ \setbeamerfont{section title}{shape=\scshape}%
+ },
+ allsmallcaps/.code={%
+ \let\moloch@sectiontitleformat\MakeLowercase%
+ \setbeamerfont{section title}{shape=\scshape}%
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat section=allsmallcaps can lead to problems%
+ }
+ },
+ allcaps/.code={%
+ \let\moloch@sectiontitleformat\MakeUppercase%
+ \setbeamerfont{section title}{shape=\normalfont}%
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat section=allcaps can lead to problems%
+ }
+ },
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{frametitleformat}
+% Control the format of the frame title.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/font/titleformat frame/.cd,
+ .is choice,
+ regular/.code={%
+ \let\moloch@frametitleformat\@empty%
+ \setbeamerfont{frametitle}{shape=\normalfont}%
+ },
+ smallcaps/.code={%
+ \let\moloch@frametitleformat\@empty%
+ \setbeamerfont{frametitle}{shape=\scshape}%
+ },
+ allsmallcaps/.code={%
+ \let\moloch@frametitleformat\MakeLowercase%
+ \setbeamerfont{frametitle}{shape=\scshape}%
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat frame=allsmallcaps can lead to problems%
+ }
+ },
+ allcaps/.code={%
+ \let\moloch@frametitleformat\MakeUppercase%
+ \setbeamerfont{frametitle}{shape=\normalfont}
+ \PackageNote{beamerthememoloch}{%
+ Be aware that titleformat frame=allcaps can lead to problems%
+ }
+ },
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{titleformat aliases}
+% Allows |titleformat title| et al. to be used in the |\usetheme|
+% declaration, where \LaTeX{} automatically removes all spaces.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/font/.cd,
+ titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
+ titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
+ titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
+ titleformatframe/.code=\pgfkeysalso{titleformat frame=#1},
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\moloch@font@setdefaults}
+% Sets default values for font theme options.
+% \begin{macrocode}
+\newcommand{\moloch@font@setdefaults}{
+ \pgfkeys{/moloch/font/.cd,
+ titleformat title=regular,
+ titleformat subtitle=regular,
+ titleformat section=regular,
+ titleformat frame=regular,
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% We first define hooks to change the case format of the titles.
+%
+% \begin{macrocode}
+\def\moloch@titleformat#1{#1}
+\def\moloch@subtitleformat#1{#1}
+\def\moloch@sectiontitleformat#1{#1}
+\def\moloch@frametitleformat#1{#1}
+% \end{macrocode}
+%
+% To make the uppercase and lowercase macros work in the title, subtitle, etc.,
+% we have to patch the appropriate |beamer| commands that set their values.
+% This solution was suggested by Enrico Gregorio in an answer to
+% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
+% question}.
+%
+%
+% \subsubsection{Process package options}
+%
+% \begin{macrocode}
+\moloch@font@setdefaults
+\ProcessPgfPackageOptions{/moloch/font}
+% \end{macrocode}
% \iffalse
%</package>
% \fi
diff --git a/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx
index 2b626d526d4..9815a0995f5 100644
--- a/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx
+++ b/Master/texmf-dist/source/latex/moloch/beamerinnerthememoloch.dtx
@@ -14,7 +14,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerinnerthememoloch}[2024-03-06 v0.3.0 Moloch inner theme] % x-release-please-version
+\ProvidesPackage{beamerinnerthememoloch}[2024-07-09 v0.4.0 Moloch inner theme] % x-release-please-version
%</package>
% \fi
% \CheckSum{0}
@@ -173,7 +173,7 @@
% \begin{macrocode}
\setbeamertemplate{title}{
\raggedright%
- \inserttitle%
+ \moloch@titleformat{\inserttitle}%
\par%
\vspace*{0.2em}
}
@@ -184,8 +184,9 @@
% Set the subtitle on the title page.
% \begin{macrocode}
\setbeamertemplate{subtitle}{
+ \vspace*{0.1em}
\raggedright%
- \insertsubtitle%
+ \moloch@subtitleformat{\insertsubtitle}%
\par%
\vspace*{0.2em}
}
@@ -201,6 +202,7 @@
\setbeamertemplate{title separator}{
\tikzexternaldisable%
\begin{tikzpicture}
+ \mmzUnmemoizable%
\fill[fg] (0,0) rectangle (\textwidth, \moloch@titleseparator@linewidth);
\end{tikzpicture}%
\tikzexternalenable%
@@ -256,7 +258,7 @@
\begin{center}
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
- \insertsectionhead\par
+ \moloch@sectiontitleformat{\insertsectionhead}\par
\ifx\insertsubsectionhead\@empty\else
\usebeamercolor[fg]{subsection title}
\usebeamerfont{subsection title}
@@ -270,7 +272,7 @@
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
- \insertsectionhead\\[-1ex]
+ \moloch@sectiontitleformat{\insertsectionhead}\\[-1ex]
\usebeamertemplate*{progress bar in section page}
\par
\ifx\insertsubsectionhead\@empty\else%
@@ -338,9 +340,10 @@
\setbeamertemplate{progress bar in section page}{
\pgfmathsetlength{\moloch@progressonsectionpage}{
\textwidth * min(1,\insertframenumber/\inserttotalframenumber)
- }
- \tikzexternaldisable
+ }%
+ \tikzexternaldisable%
\begin{tikzpicture}
+ \mmzUnmemoizable%
\fill[bg]
(0,0)
rectangle
@@ -350,7 +353,7 @@
rectangle
(\moloch@progressonsectionpage, \moloch@progressonsectionpage@linewidth);
\end{tikzpicture}
- \tikzexternalenable
+ \tikzexternalenable%
}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx
index a5d59108319..a0ce0af5804 100644
--- a/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx
+++ b/Master/texmf-dist/source/latex/moloch/beamerouterthememoloch.dtx
@@ -14,7 +14,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerouterthememoloch}[2024-03-06 v0.3.0 Moloch outer theme] % x-release-please-version
+\ProvidesPackage{beamerouterthememoloch}[2024-07-09 v0.4.0 Moloch outer theme] % x-release-please-version
%</package>
% \fi
% \CheckSum{0}
@@ -160,23 +160,42 @@
% Templates for the frame title, which is optionally underlined with a
% progress bar.
% \begin{macrocode}
+\newlength{\moloch@frametitle@padding}
+\setlength{\moloch@frametitle@padding}{2.2ex}
+\newcommand{\moloch@frametitlestrut@start}{%
+ \rule{0pt}{\moloch@frametitle@padding +%
+ \totalheightof{%
+ \ifcsdef{moloch@frametitleformat}{\moloch@frametitleformat X}{X}%
+ }%
+}%
+}
+
+\newcommand{\moloch@frametitlestrut@end}{%
+ \vphantom{\rule[-\moloch@frametitle@padding]{0pt}{\moloch@frametitle@padding}}
+}
\defbeamertemplate{frametitle}{plain}{%
\nointerlineskip%
\begin{beamercolorbox}[%
wd=\paperwidth,%
- sep=1.1ex,%
- leftskip=0.5ex,%
- rightskip=\the\glueexpr 0.5ex plus 1fill\relax,%
+ leftskip=1.6ex,%
+ rightskip=\the\glueexpr 1.6ex plus 1fill\relax,%
]{frametitle}%
\usebeamerfont{frametitle}%
- \vbox{}\vskip-0.4ex%
- \strut\insertframetitle\nolinebreak\strut\par%
+ \moloch@frametitlestrut@start%
+ \moloch@frametitleformat{\insertframetitle}%
{%
\ifx\insertframesubtitle\@empty%
\else%
- {\usebeamerfont{framesubtitle}\vspace{-0.8ex}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\strut\par}%
+ {%
+ \par%
+ \usebeamerfont{framesubtitle}%
+ \vspace{-0.8ex}%
+ \usebeamercolor[fg]{framesubtitle}%
+ \insertframesubtitle%
+ }%
\fi
}%
+ \moloch@frametitlestrut@end%
\end{beamercolorbox}%
}
\setbeamertemplate{frametitle continuation}{\romannumeral\insertcontinuationcount}
@@ -192,13 +211,14 @@
\newlength{\moloch@progressinheadfoot@linewidth}
\setlength{\moloch@progressinheadfoot@linewidth}{0.4pt}
\setbeamertemplate{progress bar in head/foot}{
- \nointerlineskip
+ \nointerlineskip%
\pgfmathsetlength{\moloch@progressinheadfoot}{%
\paperwidth * min(1,\insertframenumber/\inserttotalframenumber)%
- }
+ }%
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
- \tikzexternaldisable
+ \tikzexternaldisable%
\begin{tikzpicture}
+ \mmzUnmemoizable%
\fill[bg]
(0,0)
rectangle
@@ -208,7 +228,7 @@
rectangle
(\moloch@progressinheadfoot, \moloch@progressinheadfoot@linewidth);
\end{tikzpicture}
- \tikzexternalenable
+ \tikzexternalenable%
\end{beamercolorbox}
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx b/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx
index fcebef5a811..e6447ec7918 100644
--- a/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx
+++ b/Master/texmf-dist/source/latex/moloch/beamerthememoloch.dtx
@@ -12,7 +12,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerthememoloch}[2024-03-06 v0.3.0 Moloch Beamer theme] % x-release-please-version
+\ProvidesPackage{beamerthememoloch}[2024-07-09 v0.4.0 Moloch Beamer theme] % x-release-please-version
%</package>
% \fi
% \CheckSum{0}
@@ -52,14 +52,69 @@
}
% \end{macrocode}
%
+% \begin{macro}{titleformat plain}
+% Controls the formatting of the text on standout ``plain'' frames.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/titleformat plain/.cd,
+ .is choice,
+ regular/.code={%
+ \let\moloch@plaintitleformat\@empty%
+ \setbeamerfont{standout}{shape=\normalfont}%
+ },
+ smallcaps/.code={%
+ \let\moloch@plaintitleformat\@empty%
+ \setbeamerfont{standout}{shape=\scshape}%
+ },
+ allsmallcaps/.code={%
+ \let\moloch@plaintitleformat\MakeLowercase%
+ \setbeamerfont{standout}{shape=\scshape}%
+ },
+ allcaps/.code={%
+ \let\moloch@plaintitleformat\MakeUppercase%
+ \setbeamerfont{standout}{shape=\normalfont}%
+ },
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{titleformat}
+% Sets a standard format for titles, subtitles, section titles, frame
+% titles, and the text on standout ``plain'' frames.
+% \begin{macrocode}
+\pgfkeys{
+ /moloch/titleformat/.code=\pgfkeysalso{
+ font/titleformat title=#1,
+ font/titleformat subtitle=#1,
+ font/titleformat section=#1,
+ font/titleformat frame=#1,
+ titleformat plain=#1,
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Set default values for options.
+%
+% \begin{macrocode}
+\newcommand{\moloch@setdefaults}{
+ \pgfkeys{/moloch/.cd,
+ titleformat plain=regular,
+ }
+}
+% \end{macrocode}
+%
% To avoid generating externalized figures of the progressbar we have to disable
% them with ``tikzexternalenable'' and ``tikzexternaldisable''. However, if the
% ``external'' libray is not loaded we would get undefined control sequence
% problems, hence we define them as no-ops if they are not defined yet.
+% We do the same for the ``mmzUnmemoizable'' command from the memoize package, in
+% order to avoid memoization of the progress bars.
%
% \begin{macrocode}
\providecommand{\tikzexternalenable}{}
\providecommand{\tikzexternaldisable}{}
+\providecommand{\mmzUnmemoizable}{}
% \end{macrocode}
%
% \subsubsection{Component sub-packages}
@@ -98,6 +153,7 @@
% \subsubsection{Process package options}
%
% \begin{macrocode}
+\moloch@setdefaults
\ProcessPgfOptions{/moloch}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/moremath/moremath.dtx b/Master/texmf-dist/source/latex/moremath/moremath.dtx
new file mode 100644
index 00000000000..3b520f4ac21
--- /dev/null
+++ b/Master/texmf-dist/source/latex/moremath/moremath.dtx
@@ -0,0 +1,5515 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2024 Marcel Ilg
+%
+% This work 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 version.
+% The latest version of this license is in
+%
+% https://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status ‘maintained’.
+%
+% The Current Maintainer of this work is Marcel Ilg.
+%
+% This work consists of the files listed in MANIFEST.md.
+% \fi
+%
+% \iffalse
+%
+%<*driver>
+% Generated by ctanbib
+\begin{filecontents*}[overwrite]{\jobname.bib}
+@preamble{ "\providecommand\ctanbibpkgname[1]{\textsl{#1}}" }
+@manual{amsfonts,
+ title = {The \ctanbibpkgname{amsfonts} package},
+ subtitle = {TeX fonts from the American Mathematical Society},
+ author = {{The American Mathematical Society}},
+ url = {https://ctan.org/pkg/amsfonts},
+ urldate = {2024-07-04},
+ date = {},
+ version = {3.04},
+}
+
+@preamble{ "\providecommand\ctanbibpkgname[1]{\textsl{#1}}" }
+@manual{amsmath,
+ title = {The \ctanbibpkgname{amsmath} package},
+ subtitle = {AMS mathematical facilities for LaTeX},
+ author = {{The LaTeX Project Team}},
+ url = {https://ctan.org/pkg/amsmath},
+ urldate = {2024-07-04},
+ date = {2023-05-13},
+ version = {2.17o},
+}
+
+@preamble{ "\providecommand\ctanbibpkgname[1]{\textsl{#1}}" }
+@manual{bm,
+ title = {The \ctanbibpkgname{bm} package},
+ subtitle = {Access bold symbols in maths mode},
+ author = {Carlisle, David and Mittelbach, Frank and {The LaTeX Project Team}},
+ url = {https://ctan.org/pkg/bm},
+ urldate = {2024-07-04},
+ date = {2023-12-19},
+ version = {1.2f},
+}
+
+@preamble{ "\providecommand\ctanbibpkgname[1]{\textsl{#1}}" }
+@manual{mathtools,
+ title = {The \ctanbibpkgname{mathtools} package},
+ subtitle = {Mathematical tools to use with amsmath},
+ author = {Høgholm, Morten and Madsen, Lars and Robertson, Will and Wright, Joseph and {The LaTeX Project Team}},
+ url = {https://ctan.org/pkg/mathtools},
+ urldate = {2024-07-04},
+ date = {2024-03-11},
+ version = {1.30},
+}
+\end{filecontents*}
+\begin{filecontents*}[overwrite]{\jobname-ams-op-table.tex}
+\begin{tabular}{rlrlrlrl}
+ \cs[module=amsmath,replace=false]{arccos} &\(\arccos\) &\cs[module=amsmath,replace=false]{deg} &\( \deg \) &\cs[module=amsmath,replace=false]{lg} &\( \lg \) &\cs[module=amsmath,replace=false]{projlim} &\( \projlim \)\\
+ \cs[module=amsmath,replace=false]{arcsin} &\(\arcsin\) &\cs[module=amsmath,replace=false]{det} &\( \det \) &\cs[module=amsmath,replace=false]{lim} &\( \lim \) &\cs[module=amsmath,replace=false]{sec} &\( \sec \)\\
+ \cs[module=amsmath,replace=false]{arctan} &\(\arctan\) &\cs[module=amsmath,replace=false]{dim} &\( \dim \) &\cs[module=amsmath,replace=false]{liminf} &\( \liminf \) &\cs[module=amsmath,replace=false]{sin} &\( \sin \)\\
+ \cs[module=amsmath,replace=false]{arg} &\(\arg\) &\cs[module=amsmath,replace=false]{exp} &\( \exp \) &\cs[module=amsmath,replace=false]{limsup} &\( \limsup \) &\cs[module=amsmath,replace=false]{sinh} &\( \sinh \)\\
+ \cs[module=amsmath,replace=false]{cos} &\(\cos\) &\cs[module=amsmath,replace=false]{gcd} &\( \gcd \) &\cs[module=amsmath,replace=false]{ln} &\( \ln \) &\cs[module=amsmath,replace=false]{sup} &\( \sup \)\\
+ \cs[module=amsmath,replace=false]{cosh} &\(\cosh\) &\cs[module=amsmath,replace=false]{hom} &\( \hom \) &\cs[module=amsmath,replace=false]{log} &\( \log \) &\cs[module=amsmath,replace=false]{tan} &\( \tan \)\\
+ \cs[module=amsmath,replace=false]{cot} &\(\cot\) &\cs[module=amsmath,replace=false]{inf} &\( \inf \) &\cs[module=amsmath,replace=false]{max} &\( \max \) &\cs[module=amsmath,replace=false]{tanh} &\( \tanh \)\\
+ \cs[module=amsmath,replace=false]{coth} &\(\coth\) &\cs[module=amsmath,replace=false]{injlim} &\(\injlim\) &\cs[module=amsmath,replace=false]{min} &\( \min \) & &\\
+ \cs[module=amsmath,replace=false]{csc} &\(\csc\) &\cs[module=amsmath,replace=false]{ker} &\(\ker\) &\cs[module=amsmath,replace=false]{Pr} &\( \Pr \) & &\\
+\end{tabular}
+\begin{center}
+ \begin{tabular}{rlrl}
+ \cs[module=amsmath,replace=false]{varinjlim} &\(\varinjlim\) &\cs[module=amsmath,replace=false]{varliminf} &\(\varliminf\)\\
+ \cs[module=amsmath,replace=false]{varprojlim} &\(\varprojlim\) &\cs[module=amsmath,replace=false]{varlimsup} &\(\varlimsup\)\\
+ \end{tabular}
+\end{center}
+\end{filecontents*}
+
+
+% custom commands for use inside the documentation
+\ExplSyntaxOn
+% Property list storing version date information
+\prop_new:N \l__moremathdoc_version_date_prop
+
+\cs_new_protected:Nn \moremathdoc_add_version:nn
+{
+ \prop_put_if_new:Nnn \l__moremathdoc_version_date_prop {#1} {#2}
+}
+
+\cs_new_protected:Nn \moremathdoc_get_version:n
+{
+ \group_begin:
+ \prop_get:NnNT \l__moremathdoc_version_date_prop {#1} \l_tmpa_tl
+ {
+ \tl_use:N \l_tmpa_tl
+ }
+ \group_end:
+}
+
+\NewDocumentCommand \AddVersion { m m }
+{
+ \moremathdoc_add_version:nn {#1} {#2}
+}
+
+\NewDocumentCommand \GetVersionDate { m }
+{
+ \moremathdoc_get_version:n {#1}
+}
+\ExplSyntaxOff
+
+\documentclass[%
+%show-notes,%
+]{l3doc}
+
+\SetupDoc{reportchangedates=true}
+\RecordChanges
+
+\usepackage[american]{babel}
+\AddBabelHook[american]{nofrench}{afterextras}{\frenchspacing}
+
+\usepackage[style=alphabetic]{biblatex}
+\addbibresource{\jobname.bib}
+
+\usepackage{csquotes}
+\SetCiteCommand{\autocite}
+
+\usepackage{amssymb}
+\usepackage[bm]{moremath}
+
+% renew the ctanbibpkgname command
+\NewDocumentCommand\ctanbibpkgname{m}{\pkg{#1}}
+
+% Example operators and commands
+\DeclareMathOperator{\glorb}{glorb}
+\DeclarePairedDelimiter{\inparen}{\lparen}{\rparen}
+\DeclareDelimitedOperator{\pglorb}{\glorb}{\inparen}
+
+\begin{document}
+ \DocInput{moremath.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% ^^X Get the package version name etc.
+% \GetFileInfo{moremath.sty}
+%
+% ^^X Register changes here
+% \AddVersion{v0.1.0}{2024-06-28}
+% \AddVersion{v0.2.0}{2024-07-04}
+% \AddVersion{v0.3.0}{2024-07-08}
+% \AddVersion{v0.4.0}{2024-07-15}
+%
+% ^^X Placeholder for unreleased versions
+% \AddVersion{vUNRELEASED}{UNRELEASED}
+%
+% \begin{documentation}
+%
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{Initial development release}
+% \changes{v0.3.0}{\GetVersionDate{v0.3.0}}{
+% Split the documentation into several parts.
+% }
+% \changes{v0.4.0}{\GetVersionDate{v0.4.0}}{
+% \textbf{Breaking Change:} Rename the package
+% and the \meta{prefix} used for function names from
+% "conmath" to "moremath".
+% }
+%
+% \title{The \pkg{moremath} package\thanks{This document coresponds to
+% \textsf{moremath}~\fileversion, dated \filedate.}}
+%
+% \author{Marcel Ilg\thanks{\texttt{mister01x (at) web (dot) de}}}
+%
+% \date{Released \filedate}
+%
+% \maketitle
+%
+% \begin{abstract}
+% The \pkg{moremath} package provides several document level commands
+% to ease the typesetting
+% and \LaTeX{} code readability of certain mathematical constructs.
+% It provides complementary commands to all operators defined by \pkg{amsmath},
+% the commands typeset delimiters that may be automatically, manually or
+% not scaled at all.
+% The commands also accept optional sub- and superscripts to the operators.
+%
+% Furthermore it provides several commands to typeset gradient, divergence,
+% curl, and Laplace operators,
+% for which there are also versions with delimiters.
+% Those commands also accept an optional subscript
+% and their appearance can be modified using key-value options.
+%
+% Additionally commands are provided for producing row and column vectors,
+% as well as (anti-)diagonal matrices,
+% utilizing \pkg{mathtools} \env{matrix*} family of environments.
+%
+% Most of the document level commands defined by this package can also
+% be disabled using a package load-time option to avoid clashes with
+% commands defined by other packages.
+% \end{abstract}
+%
+% \section*{Note: This Package is Still in its Initial Development Phase}
+% Do not expect a stable interface until version 1.0.0 has been reached!
+% While I try to keep the interface stable and backwards compatible,
+% I am unable to promise this.
+%
+% \tableofcontents
+%
+% \part{Document Author Documentation}
+% \label{pt:doc-auth}
+%
+% \section{Introduction}
+% \label{sec:intro}
+%
+% When typesetting mathematics in \LaTeX{} it is very common to often encounter,
+% code patterns such as |\sin \left( \frac{x}{2} \right)|.
+% While this above code works as expected its not especially easy for human
+% readers of this code to immediately understand what that code is going to
+% do.
+%
+% This package tries to ease readability of such commonly used constructs
+% by providing commands that (hopefully) increase readability,
+% as well as speeding up writing math in \LaTeX{}.
+% Using \pkg{moremath} the above code can be simplified to |\psin*{\frac{x}{2}}|,
+% which is shorter and better \enquote{human readable}.
+% The package also provides the possibility for users to define such delimited operators,
+% on their own.
+%
+% There are also other things that can be improved when typesetting math.
+% One prominent example is the typsetting of row and column vectors,
+% which require the use of a \env{matrix} environment.
+% For this case \pkg{moremath} provides commands which accept a comma separated
+% list of vector entries,
+% obliterating the need for a \env{matrix} environment to typeset vectors.
+%
+% The same goes for (anti-)diagonal matrices,
+% only the elements of the diagonal are of importance here.
+% Therefore the production of those matrices may also be simplified into a single command,
+% which again improves readability of the code compared to a mostly empty \env{matrix} environment.
+%
+% Another feature of this package is the definition of several (delimited)
+% vector calculus operators such as gradient, divergence and curl operators,
+% this does not only improve the semantics of the math code
+% (|\mathop{\nabla} f| vs.\ |\grad f|),
+% but also tries to provide the correct spacing between the operator and its
+% arguments.
+%
+% The \pkg{moremath} package is written using \LaTeX{}3
+% and provides a small \LaTeX{}3 interface for class and package writers.
+%
+% The source code for \pkg{moremath} is hosted on GitHub at
+% \begin{center}
+% \url{https://github.com/Mister00X/moremath}
+% \end{center}
+% If you have any issues or found a bug, feel free to register an issue there.
+%
+% \section{Dependencies}
+% \label{sec:deps}
+%
+% The main dependency of this package is \pkg{mathtools}~\autocite{mathtools}.
+% Optionally the \pkg{bm}~\autocite{bm} may be loaded.
+%
+% If the option "no-vector" has \emph{not} been given as a package load time option,
+% this package also loads the \pkg{amssymb}~\autocite{amsfonts} package.
+%
+% \section{Package Options}
+% \label{sec:pack-opts}
+%
+% ^^X SUBSECTION: Package Load Time Options
+% \subsection{Package Load Time Options}
+% \label{sec:pkg-load-time-opts}
+% The options described in this section \emph{must} be given
+% at package load time i.e.\ as package options.
+% All options which are not described below will be passed to
+% \pkg{mathtools}~\autocite{mathtools},
+% see its documentation for more information.
+%
+% \DescribeOption{bm} The \verb|bm| option
+% loads the \pkg{bm}~\autocite{bm} package which provides a better version of
+% the \cs{boldsymbol} command.
+%
+%
+%
+%
+% The options
+% \DescribeOption{no-vector} "no-vector",
+% \DescribeOption{no-abs-shorthands} "no-abs-shorthands",
+% \DescribeOption{no-operators} "no-operators",
+% \DescribeOption{no-crvector} "no-crvector",
+% and \DescribeOption{no-matrix} "no-matrix"
+% disable the definition of the predefined commands described in sections~\ref{sec:vector-calculus},
+% \ref{sec:shorthands},
+% \ref{sec:delim-ops},
+% \ref{sec:rc-vectors},
+% and~\ref{sec:matrices}
+% respectively.
+%
+% \DescribeOption{nopredef}
+% The option |nopredef| achieves the same as the three
+% |no-|\meta{functionality} options above.
+% It accepts multiple values, valid option values are:
+% |vector|,
+% |abs|,
+% |operators|,
+% |crvector|,
+% |matrix|,
+% and |all|.
+% The values
+% |abs|,
+% |operators|,
+% and |vector|
+% disable the predefined
+% document level commands for
+% delimited operators,
+% vector calculus
+% and the shorthands for absolute value and norm respectively.
+% The values "crvector" and "matrix" disable the shorthand commands
+% for row and column vectors, and simple matrices respectively.
+% The special value |all| disables all of them.
+%
+% The option accepts multiple values which can be given as a comma separated
+% list, or as multiple key-value options, like in the examples below:
+% \begin{verbatim}
+% \usepackage[nopredef={vector,abs,operators}]{moremath}
+% \end{verbatim}
+% This is equivalent to
+% \begin{verbatim}
+% \usepackage[nopredef=all]{moremath}
+% \end{verbatim}
+% and to:
+% \begin{verbatim}
+% \usepackage[nopredef=vector,nopredef=abs,nopredef=operators]{moremath}
+% \end{verbatim}
+%
+% The command \cs{NewDelimitedOperator} is not affected by any of the above
+% settings.
+%
+% ^^X SUBSECTION: General Options
+% \subsection{General Options}
+% \label{sec:pkg-general-options}
+%
+% The options described in this section
+% \emph{must not} be given as package options,
+% instead they should be set using \cs{moremathsetup}
+% or given as optional argument to the commands described later.
+% \begin{function}[updated = 2024-07-15]{\moremathsetup}
+% \begin{syntax}
+% \cs{moremathsetup}\marg{kv~list}
+% \end{syntax}
+% Sets the options specified in the \meta{key-value list},
+% the assignment is local to the current group.
+% If a \meta{value} contains a comma it needs to be wrapped in braces.
+% This command may be used anywhere in the document after \pkg{moremath}
+% has been loaded.
+% \end{function}
+%
+% \subsubsection{Options Affecting Vector Calculus Operators}
+% \label{sec:options-vec-calc}
+%
+% \DescribeOption{nabla}
+% The option |nabla| sets the symbol to use by the document level commands
+% described in section~\ref{sec:vector-calculus} to use for the nabla.
+% It accepts a list of \meta{tokens}. Its default value is |\nabla|.
+%
+% \DescribeOption{arrownabla}
+% The option |arrownabla| puts a small arrow over the gradient operator symbol.
+% Its default value is |false|.
+%
+% \DescribeOption{boldnabla}
+% The option |boldnabla| makes the nabla symbol bold.
+% If the |bm| package option has been given the |\boldsymbol| command from
+% the \pkg{bm} package is used for the bold symbol,
+% otherwise the \pkg{amsmath}~\autocite{amsmath} version is used.
+%
+% \DescribeOption{grad-op}
+% The option |grad-op| may be used to overwrite,
+% the built in version of the gradient operator, it accepts a \meta{token list}.
+% Use at your own responsibility.
+%
+% \DescribeOption{laplacian-symb}
+% The option |laplacian-symb| sets the symbol to use by the document level
+% commands described in section~\ref{sec:vector-calculus} to use for the
+% Laplace operator. It accepts a list of \meta{tokens}.
+%
+% \DescribeOption{delta-laplace}
+% The option |delta-laplace| replaces the Laplace operator symbol
+% (by default \(\laplacian\)) with a uppercase delta
+% (\(\laplacian[delta-laplace=true]\)).
+% Its default value is |false|.
+%
+% \DescribeOption{arrowlaplace}
+% The option |arrowlaplace| if set to |true| makes the Laplace operator look
+% like this: \(\laplacian[arrowlaplace=true]\).
+%
+% \DescribeOption{laplacian}
+% Like the option |grad-op| above the option |laplacian| may be used to
+% overwrite the built-in version of the Laplace operator.
+% Use at your own responsibility.
+%
+% \DescribeOption{dalembert-symb}
+% Like the option "nabla" this sets the symbol to use by the document level
+% commands described in section~\ref{sec:dalembert-op-cmds} to use as symbol
+% for the \foreignlanguage{french}{d'Alembert} operator. It accepts a list of
+% \meta{tokens}. It's default value is \cs[module=amssymb,replace=false]{square}.
+%
+% \DescribeOption{vcenter}
+% The option "vcenter" controls if certain mathematical symbols
+% of the operators described in section~\ref{sec:vector-calculus} should be
+% vertically centered along the math-axis.
+% The default value of this option is "true".
+%
+%
+%
+% \subsubsection{Options Affecting Matrices and Vectors}
+% \label{sec:options-matrix}
+%
+% The options in this section only affect the commands described in sections~\ref{sec:rc-vectors}
+% and~\ref{sec:matrices}. To set them with \cs{moremathsetup} it is necessary
+% to add the prefix |matrix / | to these options,
+% so that the resulting command looks like \cs{moremathsetup}\texttt{\{matrix / \meta{option}\}}.
+% When using these options inside the optional argument of the commands described
+% in sections~\ref{sec:rc-vectors} and~\ref{sec:matrices}, the prefix "matrix /"
+% must be omitted.
+%
+% \DescribeOption{delimiter}
+% The option |delimiter| determines the delimiters used for the matrices,
+% valid values are "p" for parenthesis, "b" for brackets, "B" for braces,
+% "v" for single vertical lines (\enquote{\(\vert\)}),
+% "V" for double vertical lines (\enquote{\(\Vert\)}) or empty for no delimiters.
+% The default value is "{}" (empty).
+%
+% \DescribeOption{fill}
+% The fill option determines the values an (anti-)diagonal matrix is filled with,
+% outside the diagonal. The default is again empty.
+%
+% \DescribeOption{align}
+% This option determines the alignment of the numbers inside the matrix.
+% The value of this option gets passed to the optional argument of the \env{matrix*}
+% or \env{smallmatrix*} family of environments defined by \pkg{mathtools}~\autocite{mathtools}.
+% Valid values for both types of those environments are |l| for left alignment,
+% |r| for right alignment and |c| for centered alignment. The default is |c|.
+%
+% \begin{texnote}
+% The non-"small" versions of the commands described in the sections~\ref{sec:rc-vectors}
+% and~\ref{sec:matrices}, accept \textcquote{mathtools}{\textelp{}
+% any column type valid in the usual \env{array} environment.}
+% \end{texnote}
+%
+%
+% \section{Delimited Operators}
+% \label{sec:delim-ops}
+%
+% \subsection{Delimited Operators Predefined by \pkg{moremath}}
+% \label{sec:delim-op-predef}
+%
+% \DescribeOption{no-operators}
+% If the package load time option |no-operators| is not given this package defines several
+% delimited mathematical operators.
+%
+% \begin{table}
+% \caption{%
+% Operator commands defined by the \pkg{amsmath}~\autocite{amsmath}
+% package.}
+% \label{tab:amsmath-operators}
+% \vspace{.5\baselineskip}
+% \input{\jobname-ams-op-table.tex}
+% \end{table}
+%
+% \begin{function}{
+% \parccos, \barccos, \Barccos, \varccos, \Varccos,
+% }
+% \begin{syntax}
+% \cs{parccos} \oarg{size cmd} \marg{contents}
+
+% \cs{parccos} \oarg{size cmd} \textasciicircum\marg{superscript} \marg{contents}
+%
+% \cs{parccos} \oarg{size cmd} \_\marg{subscript} \marg{contents}
+%
+% \cs{parccos} \oarg{size cmd} \textasciicircum\marg{superscript} \_\marg{subscript} \marg{contents}
+%
+% \cs{parccos}* \marg{contents}
+%
+% \cs{parccos}* \textasciicircum\marg{superscript} \marg{contents}
+%
+% \cs{parccos}* \_\marg{subscript} \marg{contents}
+% \cs{parccos}* \textasciicircum\marg{superscript} \_\marg{subscript} \marg{contents}
+%
+%
+% \cs[no-index]{\meta{prefix}\meta{op name}} \oarg{size cmd} \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}} \oarg{size cmd} \textasciicircum\marg{superscript} \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}} \oarg{size cmd} \_\marg{subscript} \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}} \oarg{size cmd} \textasciicircum\marg{superscript} \_\marg{subscript} \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}}* \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}}* \textasciicircum\marg{superscript} \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}}* \_\marg{subscript} \marg{contents}
+% \cs[no-index]{\meta{prefix}\meta{op name}}* \textasciicircum\marg{superscript} \_\marg{subscript} \marg{contents}
+% \end{syntax}
+% For all of the operators predefined by \pkg{amsmath}~\autocite{amsmath},
+% which are shown in table~\ref{tab:amsmath-operators},
+% \pkg{moremath} declares delimited versions.
+% The name of those commands follows the scheme \cs[no-index]{\meta{prefix}\meta{op}},
+% where \meta{prefix} is one of |p|, |b|, |B|, |v|, or |V|
+% and \meta{op} is the name of one of the operators shown in table~\ref{tab:amsmath-operators}.
+%
+% The \meta{prefix}es |p|, |b|, |B|, |v|, and |V| stand for
+% parenthesis, brackets, braces, single vertical lines (\enquote{\(\vert\)}), and double vertical lines
+% (\enquote{\(\Vert\)}) respectively.
+%
+% The commands accept a \meta{size cmd} optional argument, which is usually one of
+% \cs{big}, \cs{Big}, \cs{bigg} and \cs{Bigg}.
+% These \meta{size cmd}s are used to change the size of the delimiters.
+%
+% The commands also accept sub- and superscripts,
+% which have to be issued \emph{after} the optional argument (if present),
+% but before the mandatory argument \meta{contents}.
+%
+% The starred variant uses automatic scaling for the delimiters depending on the height of its contents.
+% \end{function}
+%
+% \paragraph{Examples}
+%
+% The following examples showcase the use of those predefined delimited operators:
+% \begin{enumerate}
+% \item Different delimited operators without any scaling:
+%
+% \begin{verbatim}
+% \[
+% \pcos{x} \times \bcos{y}
+% \times \Bcos{z} \times \vcos{a}
+% \times \Vcos{b}
+% \]
+% \end{verbatim}
+% \[
+% \pcos{x} \times \bcos{y}
+% \times \Bcos{z} \times \vcos{a}
+% \times \Vcos{b}
+% \]
+%
+% \item Delimited operator with automatic scaling:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcos*{\frac{x^{2}}{2}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pcos*{\frac{x^{2}}{2}}
+% \]
+% \end{minipage}
+%
+% \item Delimited operator with manual scaling:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcos[\Big]{\frac{x^{2}}{2}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pcos[\Big]{\frac{x^{2}}{2}}
+% \]
+% \end{minipage}
+%
+% \item Delimited operator with subscript:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \plog_{10}{1+x}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% ^^X XXX: Using an underscore is broken here (because of l3doc???) therefore I
+% ^^X use "\sb" instead.
+% \[
+% \plog\sb{10}{1+x}
+% \]
+% \end{minipage}
+%
+% \item Delimited operator with superscript:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcos^{2}{x}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pcos^{2}{x}
+% \]
+% \end{minipage}
+%
+% \item Delimited operator with both sub- and superscript and manual scaling:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcos[\Big]^{2}_{x}{\frac{x}{2}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% ^^X XXX: Again use "\sb" instead of "_" because of l3doc
+% \[
+% \pcos[\Big]^{2}\sb{x}{\frac{x}{2}}
+% \]
+% \end{minipage}
+% \end{enumerate}
+%
+%
+% \subsection{Declaring New Delimited Operators}
+% \label{sec:delim-op-new}
+%
+% \begin{function}{\DeclareDelimitedOperator}
+% \begin{syntax}
+% \cs{DeclareDelimitedOperator}\marg{new op}\marg{op}\marg{delim}
+% \end{syntax}
+% Creates a new delimited operator,
+% the name of the new command will be \meta{new op}.
+% The \meta{op} is the command of the operator to use,
+% which is usually a command declared with
+% \cs[module=amsmath,replace=false]{DeclareMathOperator}.
+% \meta{delim} is the command to use as paired delimiter,
+% it is expected to behave like a paired delimiter declared by
+% \pkg{mathtools}~\autocite{mathtools}
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter}.
+% \end{function}
+%
+% \paragraph{Example: Creating a New Delimited Operator}
+% The following code creates a new operator and a paired delimiter
+% and uses it afterwards to declare a paired operator.
+% \begin{verbatim}
+% \documentclass{scrartcl}
+%
+% \DeclareMathOperator{\glorb}{glorb}
+% \DeclarePairedDelimiter{\inparen}{\lparen}{\rparen}
+% \DeclarePairedOperator{\pglorb}{\glorb}{\inparen}
+%
+% \begin{document}
+% \[
+% \pglorb{a}
+% \]
+% \end{document}
+% \end{verbatim}
+% The result then looks like this:
+% \[
+% \pglorb{a}
+% \]
+%
+%
+% \section{Vector Calculus Operators}
+% \label{sec:vector-calculus}
+%
+% \DescribeOption{no-vector}
+% The commands in this section are only declared if the option |no-vector|
+% has not been given to the package as a load time option.
+%
+% \DescribeOption{vcenter}
+% The option "vcenter" controls if the symbols for the operators described below
+% should be vertically centered along the math axis. Its default value is "true".
+%
+% This option only shows its effects if other options like "arrownabla",
+% "arrowlaplace", or "boldnabla" are set to "true".
+% Like in the example below:
+% \begin{quote}
+% \begin{verbatim}
+% \begin{gather*}
+% \grad f(x) \quad \grad[arrownabla,vcenter=false] f(x)
+% \quad \grad[arrownabla,vcenter=true] f(x)\\
+% \laplacian f(x) \quad \laplacian[arrowlaplace,vcenter=false] f(x)
+% \quad \laplacian[arrowlaplace,vcenter=true] f(x)
+% \end{gather*}
+% \end{verbatim}
+% \begin{gather*}
+% \grad f(x) \quad \grad[arrownabla,vcenter=false] f(x)
+% \quad \grad[arrownabla,vcenter=true] f(x)\\
+% \laplacian f(x) \quad \laplacian[arrowlaplace,vcenter=false] f(x)
+% \quad \laplacian[arrowlaplace,vcenter=true] f(x)
+% \end{gather*}
+% \end{quote}
+%
+% All of the commands described in this section take key-value options
+% as optional argument, which are described in section~\ref{sec:options-vec-calc}
+%
+% \subsection{Gradient Operator Commands}
+% \label{sec:grad-op-cmds}
+%
+% \subsubsection{Standalone Operator Command}
+% \label{sec:grad-op-standalone}
+%
+% \begin{function}[updated=2024-07-08]{
+% \grad,
+% }
+% \begin{syntax}
+% \cs{grad} \oarg{kv opts}
+% \cs{grad} \oarg{kv opts} \_\marg{subscript}
+% \end{syntax}
+% The \cs{grad} command produces a gradient operator
+% looking like this \enquote{\(\grad\)} by default.
+% The optional argument \meta{kv opts} accepts the key-value options
+% described in section~\ref{sec:options-vec-calc},
+% whitespace between the command name
+% and \oarg{kv~opts} is \emph{not allowed}.
+% An optional subscript using "_" may be given after the optional argument.
+% \end{function}
+%
+% \paragraph{Examples of Use}
+% \begin{enumerate}
+% \item Standalone gradient operator (with and without subscript):
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \grad f(x), \quad \grad_{x} f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \grad f(x), \quad \grad\sb{x} f(x)
+% \]
+% \end{minipage}
+%
+% \item Bold version of the gradient operator:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \grad[boldnabla] f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \grad[boldnabla] f(x)
+% \]
+% \end{minipage}
+%
+% \item Gradient operator with an arrow:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \grad[arrownabla] f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}{.49\linewidth}
+% \[
+% \grad[arrownabla] f(x)
+% \]
+% \end{minipage}
+% \end{enumerate}
+%
+% \subsubsection{Operators with Delimiters}
+% \label{sec:grad-op-delim}
+%
+% \begin{function}{
+% \pgrad,
+% \bgrad,
+% \Bgrad,
+% \vgrad,
+% \Vgrad
+% }
+% \begin{syntax}
+% \cs[no-index]{\meta{delim}grad} \oarg{size cmd} \marg{content}
+% \cs[no-index]{\meta{delim}grad} \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}grad} \oarg{size cmd} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}grad} \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}grad}* \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}grad}* \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}grad} family of commands produces
+% gradient operator which is followed by \meta{contents} inside delimiters.
+% The delimiter is determined by the first letter of the command \meta{delim},
+% which may be "p" for parenthesis, "b" for brackets, "B" for braces,
+% "v" for a single vertical line (\enquote{\(\vert\)}), or "V" for a double
+% vertical line (\enquote{\(\Vert\)}).
+%
+% The commands accept either a \meta{size command} as optional argument,
+% which gets passed to \pkg{mathtools}~\autocite{mathtools} paired delimiter
+% or a list of \meta{key-value option}s,
+% the \meta{kv opts} \emph{must} be given using the complete syntax,
+% i.e.\ \meta{key}"="\meta{value},
+% shorthands for options with an implicit default value (|arrownabla|),
+% will not work here.
+% The \meta{size~command} is usually one of \cs{big}, \cs{Big}, \cs{bigg} and
+% \cs{Bigg}.
+% Valid \meta{kv opts} are all options described in section~\ref{sec:options-vec-calc}
+% and the key "scale" which accepts a \meta{size cmd}.
+%
+% \begin{quote}
+% \textbf{Note:}\\
+% Do not mix \meta{kv opts} and \meta{size cmd},
+% use either |\pgrad[\big]{f(x)}| or |\pgrad[arrownabla=true,scale=\big]{f(x)}|.
+% \end{quote}
+%
+% \medskip\noindent
+% An optional \meta{subscript} may be given between the optional argument,
+% and \meta{contents}. One use case for this subscript is to write formulae
+% using the so called Feynman-notation, where the gradient operator acts
+% only on one variable.
+%
+% The starred version of the commands automatically scale the delimiters
+% with its contents.
+% \end{function}
+%
+% \paragraph{Examples:}
+% \begin{enumerate}
+% \item Gradient operator with non-scaled delimiters:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pgrad{1+\vec{x}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pgrad{1+\vec{x}}
+% \]
+% \end{minipage}
+%
+% \item Bold version:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pgrad[boldnabla=true]{1+\vec{x}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pgrad[boldnabla=true]{1+\vec{x}}
+% \]
+% \end{minipage}
+%
+% \item Gradient operator with automatically scaled delimiters:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pgrad*{\frac{1}{x}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pgrad*{\frac{1}{x}}
+% \]
+% \end{minipage}
+%
+% \item Manually scaled version:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \begin{gather*}
+% \pgrad[\Big]{\frac{1}{x}}\\[.5ex]
+% \pgrad[scale=\Big]{\frac{1}{x}}
+% \end{gather*}
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \begin{gather*}
+% \pgrad[\Big]{\frac{1}{x}}\\[.5ex]
+% \pgrad[scale=\Big]{\frac{1}{x}}
+% \end{gather*}
+% \end{minipage}
+%
+% \item Feynman-Notation:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pgrad_{x}{x+y+z}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pgrad\sb{x}{x+y+z}
+% \]
+% \end{minipage}
+% \end{enumerate}
+%
+% \subsection{Divergence Operator Commands}
+% \label{sec:div-op-cmds}
+%
+% \subsubsection{Standalone Operator Command}
+% \label{sec:div-op-standalone}
+%
+% \begin{function}[updated=2024-07-08]{\divergence}
+% \begin{syntax}
+% \cs{divergence} \oarg{kv opts}
+% \cs{divergence} \oarg{kv opts} \_\marg{subscript}
+% \end{syntax}
+% The \cs{divergence} command produces the divergence operator
+% \enquote{\(\divergence\)},
+% its usage is analogous to the use of the \cs{grad} command,
+% which is described in section~\ref{sec:grad-op-standalone}.
+% \end{function}
+%
+% \paragraph{Examples}
+% \begin{enumerate}
+% \item Standalone divergence operator
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \divergence f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\divergence f\]
+% \end{minipage}
+%
+% \item Standalone divergence operator
+% with an arrow over the gradient operator
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \divergence[arrownabla] f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\divergence[arrownabla] f(x)\]
+% \end{minipage}
+%
+% \item Standalone divergence operator with subscript
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \divergence_{x} f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% ^^X We need to use \sb because of the subscript package
+% \begin{minipage}{.49\linewidth}
+% \[\divergence\sb{x} f(x)\]
+% \end{minipage}
+% \end{enumerate}
+% \subsubsection{Operators with Delimiters}
+% \label{sec:div-op-delim}
+%
+% \begin{function}{
+% \pdiv,
+% \bdiv,
+% \Bdiv,
+% \vdiv,
+% \Vdiv
+% }
+% \begin{syntax}
+% \cs[no-index]{\meta{delim}div} \oarg{size cmd} \marg{content}
+% \cs[no-index]{\meta{delim}div} \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}div} \oarg{size cmd} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}div} \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}div}* \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}div}* \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}div} family of commands produces the divergence
+% operator with its arguments placed inside delimiters.
+% The usage of these commands is analogous to the \cs[no-index]{\meta{delim}grad}
+% family of commands described in section~\ref{sec:grad-op-delim}.
+% \end{function}
+%
+% \paragraph{Examples}
+%
+% \begin{enumerate}
+% \item Divergence operator with parenthesis and no scaling
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pdiv{1+x}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\pdiv{1+x}\]
+% \end{minipage}
+% \item Bold version with manual scaling and subscript
+%
+% \begin{verbatim}
+% \[
+% \pdiv[boldnabla=true,scale=\Big]_{x}{1 + \frac{1}{x}}
+% \]
+% \end{verbatim}
+% \[\pdiv[boldnabla=true,scale=\Big]\sb{x}{1+\frac{1}{x}}\]
+%
+% \item Automatic scaling
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pdiv*{1 + \frac{1}{x}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\pdiv*{1 + \frac{1}{x}}\]
+% \end{minipage}
+% \end{enumerate}
+%
+% \subsection{Curl Operator Commands}
+% \label{sec:curl-op-cmds}
+%
+% \subsubsection{Standalone Operator Command}
+% \label{sec:curl-op-standalone}
+%
+% \begin{function}[updated=2024-07-08]{\curl}
+% \begin{syntax}
+% \cs{curl} \oarg{kv opts}
+% \cs{curl} \oarg{kv opts} \_\marg{subscript}
+% \end{syntax}
+% The \cs{curl} command produces the curl operator \enquote{\(\curl\)},
+% its usage is analogous to the use of the \cs{grad} command
+% described in section~\ref{sec:grad-op-standalone}.
+% \end{function}
+%
+% \paragraph{Examples}
+% \begin{enumerate}
+% \item Standalone curl operator
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \curl f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\curl f(x)\]
+% \end{minipage}
+%
+% \item Standalone curl operator with an arrow over the gradient operator
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \curl[arrownabla] f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\curl[arrownabla] f(x)\]
+% \end{minipage}
+%
+% \item Standalone curl operator with subscript
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \curl_{x} f(x,y)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\curl\sb{x} f(x,y)\]
+% \end{minipage}
+% \end{enumerate}
+%
+% \subsubsection{Operators with Delimiters}
+% \label{sec:curl-op-delim}
+%
+% \begin{function}{
+% \pcurl,
+% \bcurl,
+% \Bcurl,
+% \vcurl,
+% \Vcurl
+% }
+% \begin{syntax}
+% \cs[no-index]{\meta{delim}curl} \oarg{size cmd} \marg{content}
+% \cs[no-index]{\meta{delim}curl} \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}curl} \oarg{size cmd} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}curl} \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}curl}* \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}curl}* \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}curl} family of commands produce the curl operator
+% with its arguments placed inside delimiters.
+% The usage of these commands is analogous to the \cs[no-index]{\meta{delim}grad}
+% family of commmands described in section~\ref{sec:grad-op-delim}.
+% \end{function}
+%
+% \paragraph{Examples}
+% \begin{enumerate}
+% \item Curl operator with parenthesis without scaling
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcurl{1+x}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\pcurl{1+x}\]
+% \end{minipage}
+%
+% \item Bold version with manual scaling and subscript
+%
+% \begin{verbatim}
+% \[
+% \pcurl[boldnabla=true,scale=\Big]_{x}{1 + \frac{1}{x}}
+% \]
+% \end{verbatim}
+% \[
+% \pcurl[boldnabla=true,scale=\Big]\sb{x}{1 + \frac{1}{x}}
+% \]
+%
+% \item Automatic scaling
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcurl*{1 + \frac{1}{x}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\pcurl*{1 + \frac{1}{x}}\]
+% \end{minipage}
+% \end{enumerate}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Fixed example to match description.
+% }
+%
+%
+% \subsection{Laplace Operator Commands}
+% \label{sec:laplace-op-cmds}
+%
+% This section describes commands which can be used to typeset a Laplace
+% operator.
+%
+%
+% Like the commands described in sections~\ref{sec:grad-op-cmds},
+% \ref{sec:div-op-cmds}, and~\ref{sec:curl-op-cmds}
+% the commands in this section accept key-value options via an optional
+% argument.
+% There is some deviation from the options compared to the above commands:
+% The "arrownabla" option is ignored,
+% instead the "arrowlaplace" option produces an arrow over the operator.
+% The "boldnabla" option on the other hand is not ignored.
+% Finally the "delta-laplace" option replaces the symbol used
+% for the operator from \(\laplacian\) to \(\laplacian[delta-laplace]\)
+%
+% \subsubsection{Standalone Operator Command}
+% \label{sec:laplace-op-standalone}
+%
+%
+% \begin{function}[updated=2024-07-08]{\laplacian}
+% \begin{syntax}
+% \cs{laplacian} \oarg{kv opts}
+% \cs{laplacian} \oarg{kv opts} \_\marg{subscript}
+% \end{syntax}
+% The \cs{laplacian} command produces a Laplace operator,
+% which looks by default like this: \(\laplacian\).
+%
+% Its interface is analogous to the \cs{grad}, \cs{divergence},
+% and \cs{curl} commands described above,
+% with the difference in key-value options described at the start of this
+% subsection.
+% \end{function}
+%
+%
+% \subsubsection{Operators with Delimiters}
+% \label{sec:laplace-op-delim}
+%
+% \begin{function}{
+% \plaplacian,
+% \blaplacian,
+% \Blaplacian,
+% \vlaplacian,
+% \Vlaplacian
+% }
+% \begin{syntax}
+% \cs[no-index]{\meta{delim}laplacian} \oarg{size cmd} \marg{content}
+% \cs[no-index]{\meta{delim}laplacian} \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}laplacian} \oarg{size cmd} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}laplacian} \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \cs[no-index]{\meta{delim}laplacian}* \oarg{kv opts} \marg{content}
+% \cs[no-index]{\meta{delim}laplacian}* \oarg{kv opts} \_\marg{subscript} \marg{content}
+% \end{syntax}
+% \end{function}
+%
+% \paragraph{Examples}
+% \begin{enumerate}
+% \item Laplace operator delimited by parenthesis without scaling
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \plaplacian{1+x}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\plaplacian{1+x}\]
+% \end{minipage}
+%
+% \item Version with arrow, manual scaling and subscript
+%
+% \begin{verbatim}
+% \[
+% \plaplacian[arrowlaplace=true,scale=\Big]_{x}{1 + \frac{1}{x}}
+% \]
+% \end{verbatim}
+% \[
+% \plaplacian[arrowlaplace=true,scale=\Big]\sb{x}{1 + \frac{1}{x}}
+% \]
+%
+% \item Version with automatic scaling
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \plaplacian*{1 + \frac{1}{x}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\plaplacian*{1 + \frac{1}{x}}\]
+% \end{minipage}
+%
+% \item Using a delta as symbol for the Laplacian
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \plaplacian[delta-laplace=true]{1+x}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\plaplacian[delta-laplace=true]{1+x}\]
+% \end{minipage}
+% \end{enumerate}
+%
+%
+% \subsection{^^X
+% Commands Producing a \foreignlanguage{french}{d'Alembert} operator
+% }
+% \label{sec:dalembert-op-cmds}
+%
+% \subsubsection{Standalone Operator Command}
+% \label{sec:dalembert-op-standalone}
+%
+% \begin{function}[
+% added = 2024-07-04,
+% updated=2024-07-08,
+% ]{\quabla}
+% \begin{syntax}
+% \cs{quabla} \oarg{kv~opts}
+% \cs{quabla} \oarg{kv~opts} \_\marg{subscript}
+% \end{syntax}
+% The \cs{quabla} command produces
+% the \foreignlanguage{french}{d'Alembert} operator \enquote{\(\quabla\)}.
+% This command accepts an optional subscript.
+% \end{function}
+%
+% The command is called \cs{quabla} because thats shorter and easier to type than
+% \cs[no-index]{dalembertian}.
+% If you want to have a command called \cs[no-index]{dalembertian},
+% put the following in your documents preamble.
+% \begin{verbatim}
+% \NewCommandCopy\quabla\dalembertian
+% \end{verbatim}
+%
+% \paragraph{Example of Use:}
+% \begin{quote}
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \quabla f(x)
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\quabla f(x)\]
+% \end{minipage}
+% \end{quote}
+%
+%
+% \subsubsection{Operators with Delimiters}
+% \label{sec:dalembert-op-delim}
+%
+% \begin{function}[added = 2024-07-04]{
+% \pquabla,
+% \bquabla,
+% \Bquabla,
+% \vquabla,
+% \Vquabla,
+% }
+% \begin{syntax}
+% \cs[no-index]{\meta{delim}quabla} \oarg{size~cmd} \marg{contents}
+% \cs[no-index]{\meta{delim}quabla} \oarg{kv~opts} \marg{contents}
+% \cs[no-index]{\meta{delim}quabla} \oarg{size~cmd} \_\marg{subscript} \marg{contents}
+% \cs[no-index]{\meta{delim}quabla} \oarg{kv~opts} \_\marg{subscript} \marg{contents}
+% \cs[no-index]{\meta{delim}quabla}* \oarg{kv~opts} \marg{contents}
+% \cs[no-index]{\meta{delim}quabla}* \oarg{kv~opts} \_\marg{subscript} \marg{contents}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}quabla} family of commands produce a
+% \foreignlanguage{french}{d'Alembert} operator with <contents> placed inside
+% delimiters.
+% Their usage is analogous to the \cs[no-index]{\meta{delim}grad} family of
+% commands described in section~\ref{sec:grad-op-delim}.
+% \end{function}
+%
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Fixed syntax description of standalone operators not matching reality.
+% }
+%
+%
+% \section{Row- and Column Vectors}
+% \label{sec:rc-vectors}
+%
+% \DescribeOption{no-crvector}
+% The command in this section are only declared if the option |no-crvector|
+% has not been given as a package option.
+%
+% ^^X \DescribeOption{delimiter}
+% ^^X \DescribeOption{fill}
+% ^^X \DescribeOption{align}
+% ^^X The commands in this section all accept key-value options as optional argument.
+% Valid keys are "delimiter", "fill", and "align",
+% their usage is described in section~\ref{sec:options-matrix}.
+%
+% \begin{function}{
+% \cvector,
+% \rvector
+% }
+% \begin{syntax}
+% \cs{cvector} \oarg{kv opts} \marg{clist}
+% \cs{rvector} \oarg{kv opts} \marg{clist}
+% \end{syntax}
+% The commands \cs{cvector} and \cs{rvector} produce row and column vectors
+% respectively. Both of them accept key-value options as optional argument
+% \meta{kv opts}. Valid keys and values are described in section~\ref{sec:options-matrix}.
+%
+% The mandatory argument \meta{clist} is a comma-separated-list,
+% whose elements are the entries of the column/row vector.
+% If a comma has to appear inside an entry the entire entry has to be wrapped
+% in braces.
+%
+% The delimiter of the row or column vectors depends on the current value of
+% the option |delimiter|, by default empty. The option |fill| has no effect
+% on the commands and is simply ignored.
+%
+% \begin{texnote}
+% If you were to define your own \env{matrix*}-like environment
+% called \env{mymatrix*},
+% which has an interface compatible to \pkg{mathtools}'s \env{matrix*}
+% family of environments,
+% you could make use of it by setting the value of |delimiter| to |my|.
+% \end{texnote}
+% \end{function}
+%
+% \medbreak\noindent
+% \textbf{Examples:}
+% \begin{enumerate}
+% \item Column \enquote{vector} without delimiters:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \cvector{a_{1},a_{2},a_{3}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \cvector{a_{1},a_{2},a_{3}}
+% \]
+% \end{minipage}
+%
+% \item A column vectors delimited with parenthesis and different alignment:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \cvector[delimiter=p,align=c]{-1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \cvector[delimiter=p,align=c]{-1,2,3}
+% \]
+% \end{minipage}\\[1ex]
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \cvector[delimiter=p,align=r]{-1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \cvector[delimiter=p,align=r]{-1,2,3}
+% \]
+% \end{minipage}\\[1ex]
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \cvector[delimiter=p,align=l]{-1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \cvector[delimiter=p,align=l]{-1,2,3}
+% \]
+% \end{minipage}
+% \end{enumerate}
+%
+% \paragraph{Row- and Column Vectors with Predefined Delimiters}
+%
+% As vectors are commonly delimited by parenthesis, brackets, braces, etc.\
+% several shorthands producing delimited vectors are also available.
+% \begin{function}{
+% \pcvector,
+% \bcvector,
+% \Bcvector,
+% \vcvector,
+% \Vcvector,
+% \prvector,
+% \brvector,
+% \Brvector,
+% \vrvector,
+% \Vrvector,
+% \prvector,
+% \brvector,
+% \Brvector,
+% \vrvector,
+% \Vrvector
+% }
+% \begin{syntax}
+% \cs[no-index]{\meta{delim}cvector} \oarg{kv opts} \marg{clist}
+% \cs[no-index]{\meta{delim}rvector} \oarg{kv opts} \marg{clist}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}\meta{c or r}vector} family of commands,
+% accepts a list of key-value options as optional argument \meta{kv opts}.
+% Valid keys are described in section~\ref{sec:options-matrix}.
+%
+% The mandatory argument \meta{clist} is a comma-separated-list of
+% the entries of the vector.
+% If a comma needs to appear inside an entry of the vector,
+% that entry has to be wrapped in braces.
+%
+% \meta{delim} may have the value "p" for parenthesis,
+% "b" for brackets, "B" for braces, "v" for a single vertical line,
+% or "V" for a double vertical line.
+% \end{function}
+%
+% \subparagraph{Example}
+% \begin{quote}
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pcvector{a_{1},a_{2},a_{3}}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pcvector{a_{1},a_{2},a_{3}}
+% \]
+% \end{minipage}
+% \end{quote}
+%
+% \subsection{Small Versions for Inline Math}
+% \label{sec:rc-vectors-small}
+%
+% As the \env{matrix} and \env{matrix*} family of environments is unsuitable,
+% for inline math,
+% \pkg{mathtools}~\autocite{mathtools} provides the \env{smallmatrix}
+% and \env{smallmatrix*} family of environments.
+% This package provides analogous commands for row and column vectors
+% to be typeset in inline math mode.
+%
+% \begin{function}{
+% \smallcvector,
+% \smallrvector
+% }
+% \begin{syntax}
+% \cs{smallcvector} \oarg{kv opts} \marg{clist}
+% \cs{smallrvector} \oarg{kv opts} \marg{clist}
+% \end{syntax}
+% \cs{smallcvector} and \cs{smallrvector} produce column and row vectors
+% suitable for inline math.
+% Both commands accept the same optional key-value arguments as
+% \cs{cvector} and \cs{rvector}.
+% \end{function}
+%
+%
+% \medbreak\noindent
+% \textbf{Example:}
+% \begin{quote}
+% \begin{verbatim}
+% An inline version of \verb|\cvector| looks like this
+% \(\smallcvector{1,0}\).
+% \end{verbatim}
+% An inline version of \verb|\cvector| looks like this
+% \(\smallcvector{1,0}\).
+% \end{quote}
+%
+% \begin{function}{
+% \psmallcvector,
+% \bsmallcvector,
+% \Bsmallcvector,
+% \vsmallcvector,
+% \Vsmallcvector,
+% \psmallrvector,
+% \bsmallrvector,
+% \Bsmallrvector,
+% \vsmallrvector,
+% \Vsmallrvector,
+% }
+% \begin{syntax}
+% \cs{psmallcvector} \oarg{kv opts} \marg{clist}
+% \cs[no-index]{psmallrvector} \oarg{kv opts} \marg{clist}
+% \cs[no-index]{\meta{delim}small\meta{c or r}vector} \oarg{kv opts} \marg{clist}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}small\meta{c or r}vector} family of commands
+% like \cs{psmallcvector} produce small inline math version of row and column
+% vectors. Their interface is identical to the commands described above.
+% \end{function}
+%
+% \medbreak\noindent
+% \textbf{Example:}\nobreak
+% \begin{quote}
+% \begin{verbatim}
+% An inline version of \verb|\pcvector| looks like this
+% \(\psmallcvector{1,0}\).
+% \end{verbatim}
+% An inline version of \verb|\pcvector| looks like this
+% \(\psmallcvector{1,0}\).
+% \end{quote}
+%
+%
+% \section{Shorthands for Simple Matrices}
+% \label{sec:matrices}
+%
+% \DescribeOption{no-matrix}
+% The commands in this section are only defined if the option "no-matrix"
+% \emph{has not been given} to the package at load-time.
+%
+%
+% \subsection{(Anti-)diagonal Matrices}
+% \label{sec:diagonal-matrices}
+%
+% \begin{function}{
+% \diagmat,
+% \antidiagmat,
+% }
+% \begin{syntax}
+% \cs{diagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{antidiagmat} \oarg{kv opts} \marg{diagonal}
+% \end{syntax}
+% \cs{diagmat} and \cs{antidiagmat} produce a diagonal or anti-diagonal matrix
+% respectively.
+% The optional argument \meta{kv~opts} accepts the key value options
+% described in section~\ref{sec:options-matrix}.
+%
+% The key "fill" determines the contents of the matrix entries
+% which are not part of the (anti-)diagonal,
+% its default value is |{}| i.e.\ empty.
+% The key "align" determines the alignment of the entries inside the
+% matrix, valid values are usually "l", "c", and "r",
+% the default is "c".
+% The key "delimiter" determines the delimiter around the matrix,
+% its default value is |{}| (none).
+% Valid values for the delimiters are "p" for parenthesis,
+% "b" for brackets, "B" for braces, "v" for a single vertical line
+% (\enquote{\(\vert\)}), and "V" for a double vertical line (\enquote{\(\Vert\)}).
+% See the \pkg{mathtools} manual~\autocite{mathtools} for more information.
+%
+% \begin{texnote}
+% The value of "delimiter" gets inserted inside the |\begin{#1matrix*}|
+% and |\end{#1matrix*}| commands.
+% Therefore it would be possible to define your own \env{matrix*}
+% like environment,
+% called for example \env{mymatrix*} and set "delimiter=my"
+% to make use of it.
+% \end{texnote}
+%
+% The mandatory argument \meta{diagonal} has to be a comma separated list
+% of the entries of the (anti-)diagonal.
+% If an entry of the diagonal needs to contain a comma "," the entire entry
+% has to be wrapped in braces.
+% \end{function}
+%
+% \medskip\noindent
+% \textbf{Examples:}
+% \begin{enumerate}
+% \item A diagonal and an anti-diagonal matrix without delimiters:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \begin{gather*}
+% \diagmat{1,2,3}\\[.5ex]
+% \antidiagmat{1,2,3}
+% \end{gather*}
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \begin{gather*}
+% \diagmat{1,2,3}\\[.5ex]
+% \antidiagmat{1,2,3}
+% \end{gather*}
+% \end{minipage}
+% \item A diagonal matrix delimited by parenthesis filled with zeros:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \diagmat[delimiter=p,fill=0]{1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \diagmat[delimiter=p,fill=0]{1,2,3}
+% \]
+% \end{minipage}
+%
+% \item A diagonal matrix filled with a symbol:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \diagmat[fill=\square]{1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\diagmat[fill=\square]{1,2,3}\]
+% \end{minipage}
+%
+% \item Diagonal matrices with different alignment:
+%
+% \begin{verbatim}
+% \[
+% \diagmat[delimiter=p,align=c,fill=0]{-1,-2,-3} \qquad
+% \diagmat[delimiter=p,align=l,fill=0]{-1,-2,-3} \qquad
+% \diagmat[delimiter=p,align=r,fill=0]{-1,-2,-3}
+% \]
+% \end{verbatim}
+% \[
+% \diagmat[delimiter=p,align=c,fill=0]{-1,-2,-3} \qquad
+% \diagmat[delimiter=p,align=l,fill=0]{-1,-2,-3} \qquad
+% \diagmat[delimiter=p,align=r,fill=0]{-1,-2,-3}
+% \]
+% \end{enumerate}
+%
+%
+% \paragraph{Shorthands for (Anti-)diagonal Matrices with Delimiters}
+%
+% As matrices are more often than not written inside of delimiters,
+% \pkg{moremath} provides several shorthands for producing those matrices
+% without having to set the "delimiter" key explicitly.
+% \begin{function}{
+% \pdiagmat,
+% \bdiagmat,
+% \Bdiagmat,
+% \vdiagmat,
+% \Vdiagmat
+% }
+% \begin{syntax}
+% \cs{pdiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{bdiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Bdiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{vdiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Vdiagmat} \oarg{kv opts} \marg{diagonal}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}diagmat} family of commands provides
+% shorthands for producing a delimited (anti-)diagonal matrix
+% without having to set the "delimiter" key explicitly every time.
+% The pre-set "delimiter" may be overwritten by explicitly passing "delimiter"
+% as a key-value option.
+%
+% The optional argument \meta{kv~opts} accepts the same key-value arguments
+% as \cs{diagmat}.
+% \end{function}
+%
+% \medskip\noindent
+% \textbf{Example:}
+% \begin{quote}
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pdiagmat{1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pdiagmat{1,2,3}
+% \]
+% \end{minipage}
+% \end{quote}
+%
+% \begin{function}{
+% \pantidiagmat,
+% \bantidiagmat,
+% \Bantidiagmat,
+% \vantidiagmat,
+% \Vantidiagmat
+% }
+% \begin{syntax}
+% \cs{pantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{bantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Bantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{vantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Vantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \end{syntax}
+% The \cs[no-index]{\meta{delim}antidiagmat} family of commands behaves
+% like the \cs[no-index]{\meta{delim}diagmat} commands described above,
+% except they produce anti-diagonal matrices.
+% \end{function}
+%
+% \medskip\noindent
+% \textbf{Example:}
+% \begin{quote}
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pantidiagmat{1,2,3}
+% \]
+% \end{verbatim}
+% \end{minipage}
+% \begin{minipage}{.49\linewidth}
+% \[
+% \pantidiagmat{1,2,3}
+% \]
+% \end{minipage}
+% \end{quote}
+%
+%
+% \subsubsection{Small Versions for Inline Math}
+% \label{sec:matrices-small}
+%
+% \pkg{mathtools} defines special matrix environments for use in
+% inline math mode,
+% the \env{smallmatrix} and \env{smallmatrix*} family of environments.
+% \pkg{moremath} provides for the case of typesetting an (anti-)diagonal
+% matrix several commands which utilize these inline math versions.
+%
+% \begin{function}{
+% \smalldiagmat,
+% \smallantidiagmat,
+% }
+% \begin{syntax}
+% \cs{smalldiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{smallantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \end{syntax}
+% The \cs{smalldiagmat} and \cs{smallantidiagmat} commands behave like
+% their non-"small" counterpart described above,
+% see their description for more information.
+% \end{function}
+%
+% \medskip\noindent
+% \textbf{Example:}
+% \begin{quote}
+% \begin{verbatim}
+% An inline version of a diagonal matrix looks like this
+% \(\smalldiagmat{1,1}\).
+% \end{verbatim}
+% An inline version of a diagonal matrix looks like this
+% \(\smalldiagmat{1,1}\).
+% \end{quote}
+%
+% \begin{function}{
+% \psmalldiagmat,
+% \bsmalldiagmat,
+% \Bsmalldiagmat,
+% \vsmalldiagmat,
+% \Vsmalldiagmat,
+% }
+% \begin{syntax}
+% \cs{psmalldiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{bsmalldiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Bsmalldiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{vsmalldiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Vsmalldiagmat} \oarg{kv opts} \marg{diagonal}
+% \end{syntax}
+% Like the \cs[no-index]{\meta{delim}diagmat} commands described above
+% there are also shorthand commands for producing an inline math version
+% of a diagonal matrix with pre-set delimiters.
+% \end{function}
+%
+% \medbreak\noindent
+% \textbf{Example:}
+% \begin{quote}
+% \begin{verbatim}
+% An inline math delimited diagonal matrix looks like this
+% \(\psmalldiagmat{1,1}\).
+% \end{verbatim}
+% An inline math delimited diagonal matrix looks like this
+% \(\psmalldiagmat{1,1}\).
+% \end{quote}
+%
+% \begin{function}{
+% \psmallantidiagmat,
+% \bsmallantidiagmat,
+% \Bsmallantidiagmat,
+% \vsmallantidiagmat,
+% \Vsmallantidiagmat,
+% }
+% \begin{syntax}
+% \cs{psmallantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{bsmallantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Bsmallantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{vsmallantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \cs{Vsmallantidiagmat} \oarg{kv opts} \marg{diagonal}
+% \end{syntax}
+% Like the \cs[no-index]{\meta{delim}antidiagmat} commands described above
+% there are also shorthand commands for producing inline math versions
+% of anti-diagonal matrices inside of delimiters.
+% \end{function}
+%
+% \medbreak\noindent
+% \textbf{Example:}
+% \begin{quote}
+% \begin{verbatim}
+% A delimited version of an inline math anti-diagonal matrix
+% looks like this \(\psmallantidiagmat{1,1}\).
+% \end{verbatim}
+% A delimited version of an inline math anti-diagonal matrix
+% looks like this \(\psmallantidiagmat{1,1}\).
+% \end{quote}
+%
+% \subsection{Identity Matrices}
+% \label{sec:id-matrices}
+%
+% As identity matrices are always quadratic,
+% one can further simplify the typesetting of identity matrices to a command,
+% which constructs the identity matrix from the number of dimensions.
+% The commands in this subsection perform this.
+%
+% \begin{function}[added = 2024-07-04]{
+% \idmat,
+% \smallidmat,
+% }
+% \begin{syntax}
+% \cs{idmat} \oarg{kv~opts} \marg{dimension}
+% \cs{smallidmat} \oarg{kv~opts} \marg{dimension}
+% \end{syntax}
+% The \cs{idmat} command produces an identity matrix.
+% The optional argument <kv~opts> accepts any valid \emph{matrix} key-value
+% arguments,
+% which are described in section~\ref{sec:options-matrix}.
+% The mandatory argument <dimension> expects a \emph{positive} integer,
+% which specifies the dimensions of the identity matrix.
+%
+% The \cs{smallidmat} command behaves like the \cs{idmat} command,
+% except it produces a matrix suitable for inline math mode.
+%
+% \begin{texnote}
+% The maximum number of columns is determined by the \TeX{} counter
+% "MaxMatrixCols",
+% which has a default value of 10.
+% See \textcite{amsmath} for more information.
+% \end{texnote}
+% \end{function}
+%
+%
+% \begin{function}[added = 2024-07-04]{
+% \pidmat,
+% \bidmat,
+% \Bidmat,
+% \vidmat,
+% \Vidmat
+% }
+% \begin{syntax}
+% \cs{pidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{bidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{Bidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{vidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{Vidmat} \oarg{kv~opts} \marg{dimension}
+% \end{syntax}
+% Like the \cs[no-index]{\meta{delim}diagmat} commands,
+% the \cs[no-index]{\meta{delim}idmat} commands produce an identity matrix
+% with a pre-set delimiter around the matrix,
+% i.e.\ they behave like \cs{idmat}|[delimiter = |<delim>|]|\marg{dimension}.
+% <delim> can be "p" for parenthesis,
+% "b" for brackets,
+% "B" for braces,
+% "v" for a single vertical line (\enquote{\(\vert\)}),
+% or "V" for a double vertical line (\enquote{\(\Vert\)}).
+%
+% Furthermore these commands accept the same <kv~opts> as the \cs{idmat} command.
+% \end{function}
+%
+% \begin{function}[added = 2024-07-04]{
+% \psmallidmat,
+% \bsmallidmat,
+% \Bsmallidmat,
+% \vsmallidmat,
+% \Vsmallidmat
+% }
+% \begin{syntax}
+% \cs{psmallidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{bsmallidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{Bsmallidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{vsmallidmat} \oarg{kv~opts} \marg{dimension}
+% \cs{Vsmallidmat} \oarg{kv~opts} \marg{dimension}
+% \end{syntax}
+% These commands are provide inline math suitable versions of the
+% \cs[no-index]{\meta{delim}idmat} commands described above.
+% See their description for more information.
+%
+% The commands accept any of the key-value options described in section~\ref{sec:options-matrix}
+% as optional argument <kv~opts>.
+% \end{function}
+%
+% \paragraph{Examples of Use}
+% \begin{enumerate}
+% \item Identity matrix without delimiters:
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \idmat{3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\idmat{3}\]
+% \end{minipage}
+%
+% \item Identity matrices with different delimiters:
+%
+% \begin{verbatim}
+% \[
+% \pidmat{3}\text{,}\quad \bidmat{3}\text{,}\quad
+% \Bidmat{3}\text{,}\quad \vidmat{3}\text{,}\quad
+% \Vidmat{3}
+% \]
+% \end{verbatim}
+% \[
+% \pidmat{3}\text{,}\quad
+% \bidmat{3}\text{,}\quad
+% \Bidmat{3}\text{,}\quad
+% \vidmat{3}\text{,}\quad
+% \Vidmat{3}
+% \]
+%
+% \item Inline math versions of identity matrices with delimiters:
+%
+% \begin{verbatim}
+% Inline math mode matrices look like this:
+% \(\psmallidmat{2}\), \(\bsmallidmat{2}\), \(\Bsmallidmat{2}\),
+% \(\vsmallidmat{2}\), \(\Vsmallidmat{2}\).
+% \end{verbatim}
+% Inline math mode matrices look like this:
+% \(\psmallidmat{2}\), \(\bsmallidmat{2}\), \(\Bsmallidmat{2}\),
+% \(\vsmallidmat{2}\), \(\Vsmallidmat{2}\).
+%
+% \item Identity matrix using the "fill" option for the non-diagonal elements
+%
+% \begin{minipage}{.49\linewidth}
+% \begin{verbatim}
+% \[
+% \pidmat[fill=\star]{3}
+% \]
+% \end{verbatim}
+% \end{minipage}\hfill
+% \begin{minipage}{.49\linewidth}
+% \[\pidmat[fill=\star]{3}\]
+% \end{minipage}
+% \end{enumerate}
+%
+%
+% \section{Shorthands for Absolute Value and Norm}
+% \label{sec:shorthands}
+%
+% \DescribeOption{no-abs-shorthands}
+% The commands in this section are only declared if the option "no-abs-shorthands"
+% has not been given to the package as a load time option.
+%
+% \begin{function}{
+% \abs,
+% \norm
+% }
+% \begin{syntax}
+% \cs{abs} \oarg{size cmd} \marg{content}
+% \cs{abs}* \marg{content}
+% \cs{norm} \oarg{size cmd} \marg{content}
+% \cs{norm}* \marg{content}
+% \end{syntax}
+% The commands \cs{abs} and \cs{norm}, produce \(\abs{\cdot}\) and
+% \(\norm{\cdot}\) respectively.
+% These commands are simply paired delimiters defined using \pkg{mathtools}'
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter} command,
+% instruction on their usage can therefore be found in~\textcite{mathtools}.
+% \end{function}
+%
+%
+% \section{Vertically Centering Math Along the Math Axis}
+% \label{sec:vcenter}
+%
+% Sometimes it is useful to explicitly center a math symbol along the math axis.
+% A prominent example is the case of |\mathop{\boldsymbol\nabla}\nolimits|
+% vs.\ |\mathop{\nabla}\nolimits|,
+% as displayed below.
+% \[
+% \mathop{\boldsymbol\nabla}\nolimits f(x)
+% \quad \mathop{\nabla}\nolimits f(x)
+% \]
+% Here the bold nabla is slightly higher up than the non-bold version.
+%
+% \begin{function}[added=2024-07-08]{\VCenterMath}
+% \begin{syntax}
+% \cs{VCenterMath} \marg{contents}
+% \end{syntax}
+% \begin{danger}
+% The command \cs{VCenterMath} centers <contents> along the current math axis,
+% while adhering to the current math style.
+% This command is not in a \TeX{}-sense
+% \tn[no-index]{long}, i.e.\ it does not take \tn[no-index]{par} tokens.
+%
+% This command is somewhat dangerous as it utilizes the \tn{vcenter} primitive,
+% which leaves math mode and requires to reenter it.
+% \emph{Use at your own responsibility.}
+% \end{danger}
+% \begin{texnote}
+% This command is a wrapper around \tn{vcenter}, \cs{hbox:n}
+% and \tn{mathpalette}, it reenters math mode inside the hbox.
+% \end{texnote}
+% \end{function}
+%
+% With \cs{VCenterMath} it is possible to fix the above example to:
+% \begin{quote}
+% \begin{verbatim}
+% \[
+% \mathop{\VCenterMath{\boldsymbol\nabla}}\nolimits f(x)
+% \quad \mathop{\nabla}\nolimits f(x)
+% \]
+% \end{verbatim}
+% \[
+% \mathop{\VCenterMath{\boldsymbol\nabla}}\nolimits f(x)
+% \quad \mathop{\nabla}\nolimits f(x)
+% \]
+% \end{quote}
+%
+%
+% \part{Documentation for Class and Package Authors}
+% \label{sec:package-auth-doc}
+%
+% \section{Setting of Options}
+% \label{sec:authors-options}
+%
+% \begin{function}[updated = 2024-07-15]{
+% \moremath_setup:n
+% }
+% \begin{syntax}
+% \cs{moremath_setup:n} \marg{kv opts}
+% \end{syntax}
+% This functions sets the key-value options \meta{kv~opts} in the "moremath" namespace.
+% \end{function}
+%
+% \section{Delimited Operators}
+% \label{sec:authors-delim-op}
+%
+% \begin{function}[updated = 2024-07-15]{
+% \moremath_delim_op_noscale:NNnnn,
+% \moremath_delim_op_autoscale:NNnnn
+% }
+% \begin{syntax}
+% \cs{moremath_delim_op_noscale:NNnnn} \meta{math~op} \meta{delim}
+% \hspace*{2ex} \marg{sup~tl} \marg{sub~tl} \marg{tl}
+% \cs{moremath_delim_op_autoscale:NNnnn} \meta{math op} \meta{delim}
+% \hspace*{2ex} \marg{sup~tl} \marg{sub~tl} \marg{tl}
+% \end{syntax}
+% The two functions \cs{moremath_delim_op_noscale:NNnnn} and \cs{moremath_delim_op_autoscale:NNnnn}
+% provide a version of a delimited operator with no scaling or automatic scaling respectively.
+% The token list arguments \meta{sup~tl} and \meta{sub~tl} take the super- and subscript
+% of the operator respectively. Both of those token lists may be empty.
+%
+% The first argument to the function is a control sequence \meta{math~op},
+% which should be an operator declared with
+% \cs[module=amsmath,replace=false]{DeclareMathOperator}.
+% The second argument \meta{delim} has to be a control sequence of a paired delimiter,
+% as defined by \pkg{mathtools}'s
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter}.
+%
+% The final argument \meta{tl} is a list of arbitrary token to put inside the delimiters.
+% \end{function}
+%
+% \begin{function}[updated=2024-07-15]{
+% \moremath_delim_op_manuscale:NNnnnn,
+% \moremath_delim_op_manuscale:NNVnnn
+% }
+% \begin{syntax}
+% \cs{moremath_delim_op_manuscale:NNnnnn} \meta{math op} \meta{delim} \marg{scale cmd}
+% \hspace*{2ex} \marg{sup} \marg{sub} \marg{tl}
+% \end{syntax}
+% The function \cs{moremath_delim_op_manuscale:NNnnnn} typesets a math operator with
+% manual scaling of its delimiters.
+% Its arguments are identical to \cs{moremath_delim_op_noscale:NNnnn}
+% except for the argument \meta{scale~cmd} which has to be a token list containing
+% a \meta{size~cmd} that can be understood by \pkg{mathtools},
+% usually \cs{big}, \cs{Big}, \cs{bigg} and \cs{Bigg}.
+% \end{function}
+%
+% \begin{function}[updated=2024-07-15]{
+% \moremath_new_delim_op_command:NNN,
+% \moremath_new_delim_op_command:cNN,
+% }
+% \begin{syntax}
+% \cs{moremath_new_delim_op_command:NNN} \meta{new~csname} \meta{operator} \meta{delim}
+% \end{syntax}
+% The function \cs{moremath_new_delim_op_command:NNN} defines a new document level command
+% called \meta{new~csname}, utilizing the operator \meta{operator} and the delimiter \meta{delim}.
+%
+% \meta{operator} has to be a control sequence referring to an operator,
+% as declared by \cs{DeclareMathOperator}.
+%
+% \meta{delim} has to be a paired delimiter as defined by \pkg{mathtools}'
+% \cs{DeclarePairedDelimiter}.
+% \end{function}
+%
+% \section{Vector Calculus Typesetting}
+% \label{sec:authors-vec-calc}
+%
+% \subsection{Functions Producing Standalone Operators with Subscripts}
+% \label{sec:authors-vec-calc-operators}
+%
+% \begin{function}[updated=2024-07-15]{
+% \moremath_gradient_operator:n,
+% \moremath_divergence_operator:n,
+% \moremath_curl_operator:n,
+% \moremath_laplace_operator:n,
+% \moremath_dalembert_operator:n
+% }
+% \begin{syntax}
+% \cs{moremath_gradient_operator:n} \marg{subscript}
+% \cs{moremath_divergence_operator:n} \marg{subscript}
+% \cs{moremath_curl_operator:n} \marg{subscript}
+% \cs{moremath_laplace_operator:n} \marg{subscript}
+% \cs{moremath_dalembert_operator:n} \marg{subscript}
+% \end{syntax}
+% Each of these functions return a vector calculus operator,
+% with an (optional) subscript.
+% The argument \meta{subscript}, a token list, may be empty,
+% in which case no subscript is produced.
+%
+% The actual operator produced depends on the current settings
+% of the key-value options described in section~\ref{sec:pack-opts}
+% inside the current group.
+% \end{function}
+%
+% \subsection{Functions Producing Operators with Delimiters}
+% \label{sec:authors-vec-calc-delim-ops}
+%
+% \begin{function}[updated=2024-07-15]{
+% \moremath_delim_nabla_op_noscale:NNnn,
+% \moremath_delim_nabla_op_autoscale:NNnn,
+% }
+% \begin{syntax}
+% \cs{moremath_delim_nabla_op_noscale:NNnn} \meta{operator} \meta{delim}
+% \hspace*{2ex} \marg{sub} \marg{contents}
+%
+% \cs{moremath_delim_nabla_op_autoscale:NNnn} \meta{operator} \meta{delim}
+% \hspace*{2ex} \marg{sub} \marg{contents}
+% \end{syntax}
+% The usage of these functions is similar to the functions
+% \cs{moremath_delim_op_noscale:NNnnn} and \cs{moremath_delim_op_autoscale:NNnnn}
+% except for the missing superscript.
+%
+% The first argument \meta{operator} has to be a function which accepts one argument
+% (the subscript).
+% This is usually one of the \cs[no-index]{moremath_\meta{op}_operator:n} commands.
+%
+% The argument \meta{sub}, which may be empty,
+% is a token list to pass as the subscript to
+% \cs[no-index]{moremath_\meta{op}_operator:n}.
+%
+% The last argument \meta{contents} is a token list to put inside the delimiters.
+%
+% \end{function}
+%
+% \begin{function}[updated=2024-07-15]{
+% \moremath_delim_nabla_op_manuscale:NNnnn,
+% \moremath_delim_nabla_op_manuscale:NNVnn,
+% }
+% \begin{syntax}
+% \cs{moremath_delim_nabla_op_manuscale:NNnnn} \meta{operator} \meta{delim}
+% \hspace*{2ex} \marg{scale~cmd} \marg{sub} \marg{contents}
+% \end{syntax}
+% The usage of function is similar to the above functions
+% except for the additional argument \meta{scale~cmd} which is a token list
+% with a \meta{size~cmd} that should be understood by \pkg{mathtools}
+% (e.g.\ \cs{big}, \cs{Big}, etc.).
+% \end{function}
+%
+% \section{Formatting Matrices and Vectors}
+% \label{sec:authors-matrix}
+%
+% \begin{function}[updated=2024-07-15]{
+% \moremath_column_vector:nn,
+% \moremath_row_vector:nn,
+% \moremath_column_smallvector:nn,
+% \moremath_row_smallvector:nn
+% }
+% \begin{syntax}
+% \cs{moremath_column_vector:nn} \marg{delim spec tl} \marg{clist}
+% \cs{moremath_row_vector:nn} \marg{delim spec tl} \marg{clist}
+% \cs{moremath_column_smallvector:nn} \marg{delim spec tl} \marg{clist}
+% \cs{moremath_row_smallvector:nn} \marg{delim spec tl} \marg{clist}
+% \end{syntax}
+% These functions produce a column or row vector.
+% The "small"\meta{c~or~r}"vector" versions are intended for inline math mode.
+%
+% The first argument \meta{delim spec tl} should be the specification of
+% a delimiter, as used in the naming of the \env{matrix*} environments
+% by \pkg{mathtools}.
+%
+% The second argument \meta{clist}, is a comma-separated list of entries
+% of the vector.
+%
+% Of this commands the "c" versions produce column vectors, the "r" versions
+% produce row vectors.
+%
+% The alignment of the entries inside the vector depends on the current
+% value of the key "align".
+% \end{function}
+%
+% \begin{function}[
+% updated = 2024-07-04,
+% updated=2024-07-15,
+% ]{
+% \moremath_diagonal_matrix:nn,
+% \moremath_diagonal_matrix:nV,
+% \moremath_diagonal_matrix:Vn,
+% \moremath_diagonal_matrix:VV,
+% \moremath_antidiagonal_matrix:nn,
+% \moremath_antidiagonal_matrix:nV,
+% \moremath_antidiagonal_matrix:Vn,
+% \moremath_antidiagonal_matrix:VV,
+% \moremath_diagonal_smallmatrix:nn,
+% \moremath_diagonal_smallmatrix:nV,
+% \moremath_diagonal_smallmatrix:Vn,
+% \moremath_diagonal_smallmatrix:VV,
+% \moremath_antidiagonal_smallmatrix:nn,
+% \moremath_antidiagonal_smallmatrix:nV,
+% \moremath_antidiagonal_smallmatrix:Vn,
+% \moremath_antidiagonal_smallmatrix:VV,
+% }
+% \begin{syntax}
+% \cs{moremath_diagonal_matrix:nn} \marg{delim tl} \marg{clist}
+% \cs{moremath_antidiagonal_matrix:nn} \marg{delim tl} \marg{clist}
+% \cs{moremath_diagonal_smallmatrix:nn} \marg{delim tl} \marg{clist}
+% \cs{moremath_antidiagonal_smallmatrix:nn} \marg{delim tl} \marg{clist}
+% \end{syntax}
+% These functions produce (anti-)diagonal matrices.
+% The argument \meta{delim~tl} is a token list,
+% intended to specify the delimiter of the matrix or no delimiter if the
+% <tl> is empty no delimiters are produced.
+%
+% The argument <clist> is a list of comma separated values which specify the
+% entries of the diagonal.
+% Other properties of the matrix to produce like alignment ("align")
+% and the tokens to insert for non-diagonal entries ("fill")
+% depend on the current setting of the keys described in section~\ref{sec:options-matrix}.
+%
+% The "smallmatrix" versions are intended for use in inline math mode.
+% \end{function}
+%
+% \begin{function}[
+% added = 2024-07-04,
+% updated=2024-07-15,
+% ]{
+% \moremath_id_matrix:n,
+% \moremath_id_matrix:V,
+% \moremath_id_smallmatrix:n,
+% \moremath_id_smallmatrix:V,
+% }
+% \begin{syntax}
+% \cs{moremath_id_matrix:n} \marg{dimensions}
+% \cs{moremath_id_smallmatrix:n} \marg{dimensions}
+% \end{syntax}
+% These functions produce a identity matrix with <dimensions> rows and columns.
+% <dimensions> is expected to be a \emph{positive} integer.
+% The "smallmatrix" version utilizes \pkg{mathtools}' \env{smallmatrix*} environment,
+% which makes it suitable for inline math mode.
+%
+% The delimiter around the matrix is determined by the current value of the key
+% "matrix / delimiter" inside the current group.
+%
+% As these functions utilize \cs{moremath_diagonal_matrix:VV} or
+% \cs{moremath_diagonal_smallmatrix:VV} and make use of temporary variables
+% it is advised to put them into their own group,
+% i.e.\ surround them by \cs{group_begin:} and \cs{group_end:}.
+% \end{function}
+%
+% \section{Vertically Centering Math Along the Math Axis}
+% \label{sec:autors-vcenter}
+%
+% As already said in section~\ref{sec:vcenter} sometimes it is needed to
+% explicitly center some math code.
+%
+% \begin{function}[
+% added=2024-07-08,
+% updated=2024-07-15,
+% ]{
+% \moremath_vcenter:n,
+% }
+% \begin{syntax}
+% \cs{moremath_vcenter:n} \marg{contents}
+% \end{syntax}
+% The function \cs{moremath_vcenter:n} places <contents> inside a "hbox",
+% which is centered along the math axis by \tn{vcenter}.
+% The contents inside the "hbox" are set in math mode.
+% The function also applies the \enquote{outer} math style
+% to the contents of the "hbox".
+%
+% This function is not \tn[no-index]{long},
+% as it sets its contents inside a "hbox".
+%
+% \begin{texnote}
+% This function is a wrapper around \tn{vcenter}, \cs{hbox:n},
+% and \tn{mathpalette}.
+% Inside the "hbox" math mode is reentered.
+% \end{texnote}
+% \end{function}
+%
+% \end{documentation}
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+% \begin{implementation}
+% \part{Implementation}
+% \label{pt:implementation}
+% Start the \pkg{DocStrip} guards.
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+%
+% Set the internal prefix for this package so that \pkg{DocStrip} knows what to
+% do.
+% \begin{macrocode}
+%<@@=moremath>
+% \end{macrocode}
+%
+% \section{Initial Setup}
+%
+% First set the required version of \LaTeX{},
+% we need at least
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+% \end{macrocode}
+% for key-value option handling, \pkg{xparse}-like document commands
+% (especially for using the "=" option specification)
+% and hooks.
+%
+% Then identify this package as \pkg{moremath}.
+% \begin{macrocode}
+\ProvidesExplPackage{moremath}
+ {2024-07-15}{v0.4.0}{More Math Macros}
+% \end{macrocode}
+%
+% ^^X Debugging switch
+% \iffalse
+% \debug_on:n {all}
+% \fi
+% \section{Key-value interfaces}
+% \label{sec:key-val}
+% To make use of key-value interfaces we need to define a few keys.
+%
+% \subsection{Package load time options}
+% \label{sec:load-time-options}
+%
+% To allow for the conditional definition of macros at load time
+% we define a few keys.
+%
+% But before doing so we define a few messages to write the package options to
+% the log file.
+% One message to issue if the \texttt{bm} option has been given:
+% \begin{macrocode}
+\msg_new:nnn { moremath } {load / bm}
+{
+ Option~'bm'~given.\\
+ Loading~the~bm~package~\msg_line_context:.
+}
+% \end{macrocode}
+% And a more generic message to issue for the other options,
+% which all disable certain parts of the library.
+% \begin{macrocode}
+\msg_new:nnn {moremath} { load / disabling }
+{
+ Option~'#1'~given.\\
+ Disabling~#2~\msg_line_context:.
+}
+% \end{macrocode}
+%
+% \begin{variable}{
+% \l_@@_predef_vector_op_bool,
+% \l_@@_predef_operators_bool,
+% \l_@@_predef_crvector_bool,
+% \l_@@_predef_matrix_bool,
+% \l_@@_predef_abs_bool,
+% }
+% To store the values of several switch type key-value options
+% we declare several boolean variables.
+% \begin{macrocode}
+\bool_new:N \l_@@_predef_vector_op_bool
+\bool_new:N \l_@@_predef_operators_bool
+\bool_new:N \l_@@_predef_crvector_bool
+\bool_new:N \l_@@_predef_matrix_bool
+\bool_new:N \l_@@_predef_abs_bool
+% \end{macrocode}
+%
+% The variables \cs{l_@@_predef_vector_op_bool}, \cs{l_@@_predef_operators_bool}
+% \cs{l_@@_predef_abs_bool}, \cs{l_@@_predef_matrix_bool}
+% and \cs{l_@@_predef_crvector_bool}
+% control if the predefined macros
+% for vector calculus, delimited operators, the matrix shorthands,
+% the row and column vectors,
+% and the shorthands for absolute value
+% and norm shall be defined.
+%
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{
+% Explicitly declared boolean variables used to store key-value options.
+% }
+% \end{variable}
+%
+% \begin{optionenv}{
+% bm,
+% no-vector,
+% no-operators,
+% no-abs-shorthands,
+% no-matrix,
+% no-crvector,
+% nopredef,
+% }
+% Now we define package load time keys:
+% \begin{macrocode}
+\keys_define:nn { moremath / load }
+{
+% \end{macrocode}
+% We provide an option to conditionally load the \pkg{bm}-package~\autocite{bm}
+% to provide better looking bold symbols.
+% \begin{macrocode}
+ bm .code:n = {
+ \msg_info:nn {moremath} {load / bm}
+ \RequirePackage{bm}
+ },
+ bm .value_forbidden:n = true,
+ bm. usage:n = load,
+% \end{macrocode}
+% Then we define options for en-/disabling predefined macros of this package
+% to avoid name clashes.
+% \begin{macrocode}
+ no-vector .bool_set_inverse:N = \l_@@_predef_vector_op_bool,
+ no-vector .default:n = true,
+ no-vector .initial:n = false,
+ no-vector .usage:n = load,
+ no-operators .bool_set_inverse:N = \l_@@_predef_operators_bool,
+ no-operators .default:n = true,
+ no-operators .initial:n = false,
+ no-operators .usage:n = load,
+ no-abs-shorthands .bool_set_inverse:N = \l_@@_predef_abs_bool,
+ no-abs-shorthands .default:n = true,
+ no-abs-shorthands .initial:n = false,
+ no-abs-shorthands .usage:n = load,
+ no-matrix .bool_set_inverse:N = \l_@@_predef_matrix_bool,
+ no-matrix .initial:n = false,
+ no-matrix .default:n = true,
+ no-matrix .usage:n =load,
+ no-crvector .bool_set_inverse:N = \l_@@_predef_crvector_bool,
+ no-crvector .default:n = true,
+ no-crvector .initial:n = false,
+ no-crvector .usage:n = load,
+ nopredef .multichoice:,
+ nopredef / operators .meta:nn = { moremath / load }
+ {
+ no-operators = true
+ },
+ nopredef / vector .meta:nn = { moremath / load }
+ {
+ no-vector = true
+ },
+ nopredef / abs .meta:nn = { moremath / load }
+ {
+ no-abs-shorthands = true,
+ },
+ noperdef / matrix .meta:nn = { moremath / load }
+ {
+ no-matrix = true,
+ },
+ nopredef / crvector .meta:nn = {moremath / load}
+ {
+ no-crvector = true,
+ },
+ nopredef / all .meta:nn = { moremath / load }
+ {
+ no-operators = true,
+ no-vector = true,
+ no-abs-shorthands = true
+ },
+ nopredef .usage:n = load,
+% \end{macrocode}
+% Unknown package options get passed to \pkg{mathtools}.
+% \begin{macrocode}
+ unknown .code:n = {\PassOptionsToPackage{\CurrentOption}{mathtools}},
+ unknown .usage:n = load,
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added package load-time options.
+% }
+% \end{optionenv}
+%
+%
+% \subsection{Keys controlling appearance}
+% \label{sec:keys-appearance}
+%
+% \begin{variable}{
+% \l_@@_nabla_tl,
+% \l_@@_nabla_arrow_bool,
+% \l_@@_nabla_arrow_bold_bool,
+% \l_@@_grad_op_tl,
+% \l_@@_laplacian_symb_tl,
+% \l_@@_laplacian_delta_bool,
+% \l_@@_laplacian_arrow_bool,
+% \l_@@_laplacian_tl,
+% \l_@@_dalembert_symb_tl,
+% }
+% We declare several variables to store the values of the keys affecting
+% appearance.
+% \begin{macrocode}
+\tl_new:N \l_@@_nabla_tl
+\bool_new:N \l_@@_nabla_arrow_bool
+\bool_new:N \l_@@_nabla_arrow_bold_bool
+\tl_new:N \l_@@_grad_op_tl
+% \end{macrocode}
+%
+% The symbol to use as \enquote{nabla} is stored in \cs{l_@@_nabla_tl}.
+% The variables \cs{l_@@_nabla_arrow_bool} and \cs{l_@@_nabla_bold_bool}
+% determine if the nabla-symbol shall have an arrow over itself and/or be bold
+% respectively.
+%
+% The variable \cs{l_@@_grad_op_tl} contains a user provided token list to
+% overwrite the built-in gradient operator of the package.
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_laplacian_symb_tl
+\bool_new:N \l_@@_laplacian_delta_bool
+\bool_new:N \l_@@_laplacian_arrow_bool
+\tl_new:N \l_@@_laplacian_tl
+% \end{macrocode}
+% The token list variable \cs{l_@@_laplacian_symb_tl} stores the tokens to be
+% used for the Laplace operator.
+% The boolean variable \cs{l_@@_laplacian_delta_bool}
+% determines if a delta should be used instead
+% of \(\laplacian\) for the laplacian symbol.
+% If the boolean variable \cs{l_@@_laplacian_arrow_bool} a small arrow will be
+% placed over the Laplace operator symbol.
+% If the user wants to overwrite the symbol used for the Laplacian,
+% the user provided list of tokens is stored in the variable
+% \cs{l_@@_laplacian_tl}.
+%
+% Finally we define a variable to hold the symbol to use for the
+% \foreignlanguage{french}{d'Alembert} operator.
+% \begin{macrocode}
+\tl_new:N \l_@@_dalembert_symb_tl
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Explicitly declared variables before using them to set keys.
+% }
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added: New variable \cs{l_@@_dalembert_symb_tl}
+% }
+% \end{variable}
+%
+% \begin{variable}{
+% \l_@@_vcenter_bool,
+% }
+% Additionally we declare a variable to decide if certain math symbols
+% shall be centered explicitly along the math axis.
+% \begin{macrocode}
+\bool_new:N \l_@@_vcenter_bool
+% \end{macrocode}
+% If \cs{l_@@_vcenter_bool} is true, the symbols of certain math operators,
+% should be centered explicitly.
+% \end{variable}
+%
+% \begin{optionenv}{
+% nabla,
+% arrownabla,
+% boldnabla,
+% grad-op,
+% laplacian-symb,
+% delta-laplace,
+% arrowlaplace,
+% laplacian,
+% dalembert-symb,
+% }
+% First define keys for the vector calculus macros.
+% \begin{macrocode}
+\keys_define:nn { moremath }
+{
+% \end{macrocode}
+% First we define keys for use with the gradient and gradient based operators.
+% \begin{macrocode}
+ % Symbol to use for the nabla
+ nabla .tl_set:N = \l_@@_nabla_tl,
+ nabla .initial:n = {\nabla},
+ nabla .value_required:n = true,
+ % shall the nabla have an arrow over it
+ arrownabla .bool_set:N = \l_@@_nabla_arrow_bool,
+ arrownabla .default:n = {true},
+ arrownabla .initial:n = {false},
+ % shall the nabla be bold
+ boldnabla .bool_set:N = \l_@@_nabla_bold_bool,
+ boldnabla .default:n = {true},
+ boldnabla .initial:n = {false},
+% \end{macrocode}
+% We also provide an override for the gradient operator
+% \begin{macrocode}
+ % Symbol to use for the gradient operator
+ grad-op .tl_set:N = \l_@@_grad_op_tl,
+ grad-op .value_required:n = true,
+% \end{macrocode}
+%
+% Then we define keys for the laplacian.
+% \begin{macrocode}
+ % Symbol to use for the laplacian
+ laplacian-symb .tl_set:N = \l_@@_laplacian_symb_tl,
+ laplacian-symb .initial:n = {\l_@@_nabla_tl},
+ % shall the Laplace operator be a delta
+ delta-laplace .bool_set:N = \l_@@_laplacian_delta_bool,
+ delta-laplace .initial:n = {false},
+ % shall the laplace operator have an arrow over itself
+ arrowlaplace .bool_set:N = \l_@@_laplacian_arrow_bool,
+ arrowlaplace .default:n = {true},
+ arrowlaplace .initial:n = {false},
+ % overwrite the laplace operator
+ laplacian .tl_set:N = \l_@@_laplacian_tl,
+ laplacian .value_required:n = true,
+% \end{macrocode}
+% And keys for the \foreignlanguage{french}{d'Alembert} operator.
+% \begin{macrocode}
+ dalembert-symb .tl_set:N = \l_@@_dalembert_symb_tl,
+ dalembert-symb .initial:n = {\square},
+% \end{macrocode}
+% \begin{optionenv}{
+% vcenter,
+% }
+% The "vcenter" option will control the manual centering of certain math
+% operators.
+% \begin{macrocode}
+ vcenter .bool_set:N = \l_@@_vcenter_bool,
+ vcenter .initial:n = true,
+ vcenter .value_required:n = true,
+}% \keys_define:nn
+% \end{macrocode}
+% \changes{v0.3.0}{\GetVersionDate{v0.3.0}}{
+% Added new option.
+% }
+% \end{optionenv} ^^X vcenter
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added options controlling appearance.
+% }
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added: New option "dalembert-symb".
+% }
+% \end{optionenv}
+%
+% \begin{optionenv}{
+% delimiter,
+% fill,
+% align
+% }
+% Then we define some keys for the matrix based environments:
+% \begin{macrocode}
+\keys_define:nn { moremath / matrix }
+{
+% \end{macrocode}
+% \begin{variable}{
+% \l_@@_matrix_delim_tl,
+% \l_@@_matrix_fill_tl,
+% \l_@@_matrix_align_tl,
+% }
+% Every one of the following keys stores its value inside a token list variable.
+% \begin{macrocode}
+ delimiter .tl_set:N = \l_@@_matrix_delim_tl,
+ delimiter .initial:n = {},
+ fill .tl_set:N = \l_@@_matrix_fill_tl,
+ fill .initial:n = {},
+ align .tl_set:N = \l_@@_matrix_align_tl,
+ align .initial:n = {c},
+ align .value_required:n = true,
+}
+% \end{macrocode}
+% The keys \verb|delimiter| and \verb|fill| set the variables
+% \cs{l_@@_matrix_delim_tl} and \cs{l_@@_matrix_fill_tl} respectively.
+% \cs{l_@@_matrix_delim_tl} determines the delimiter in use to surround
+% matrices and \cs{l_@@_matrix_fill_tl} determines the fill values of the
+% \cs{diag}, \cs{smalldiag}, \cs[no-index]{Xdiag} and \cs[no-index]{Xsmalldiag}
+% commands, which are used for non-diagonal matrix entries.
+% The variable \cs{l_@@_matrix_align_tl} contains the alignment specifier
+% for use with the \env{matrix*} environment.
+%
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added internal variables.
+% }
+% \end{variable}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added options for the matrix-based environments of \pkg{mathtools}.
+% }
+% \end{optionenv}
+%
+% \subsection{Functions for Setting Options}
+% \label{sec:option-setters}
+%
+%
+% Now we define a function for setting the options within the document
+% \begin{macro}{\moremath_setup:n}
+% \begin{macrocode}
+\cs_new_protected:Nn \moremath_setup:n
+{
+ \keys_set:nn {moremath} {#1}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added function for setting options.
+% }
+% \end{macro}
+%
+% Additionally we provide the user with a version of this command.
+% \begin{macro}{\moremathsetup}
+% \begin{macrocode}
+\NewDocumentCommand \moremathsetup {m}
+{
+ \moremath_setup:n {#1}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added document command for setting package options.
+% }
+% \end{macro}
+% We also need a function for setting the package load time options.
+% This function should set all given values for all key families
+% and pass unknown options to mathtools.
+% \begin{macro}{\@@_load_time_setup:}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_load_time_setup:
+{
+ \ProcessKeyOptions[ moremath / load ]
+}
+% \end{macrocode}
+% \end{macro}
+%
+% ^^X SUBSECTION: Package Initialization
+% \section{Package Initialization}
+% \label{sec:init}
+%
+% We now \enquote{initialize} the package by processing the package options,
+% all unknown options are passed to \pkg{mathtools}~\autocite{mathtools},
+% which is loaded afterwards.
+% Because certain \pkg{mathtools}-features are needed by this package,
+% we need to require a version of at least 2004/06/05.
+% As explained in section~\ref{sec:load-time-options} this may also load \pkg{bm}
+% if the \verb|bm| package option has been given.
+% \begin{macrocode}
+\@@_load_time_setup:
+% \end{macrocode}
+% If the "no-vector" option has not been given during load time,
+% we also need the \pkg{amssymb} package~\autocite{amsfonts} for the
+% \cs[module=amssymb,replace=false]{square} command.
+% We first define a message to inform the user about this.
+% \begin{macrocode}
+\msg_new:nnn { moremath } { load / loading-amssymb }
+{
+ Vector~calculus~commands~enabled.\\
+ Loading~amssymb~package~\msg_line_context:.
+}
+% \end{macrocode}
+% Then we conditionally load the package.
+% \begin{macrocode}
+\bool_if:NT \l_@@_predef_vector_op_bool
+{
+ \msg_info:nn { moremath } { load / loading-amssymb }
+ \RequirePackage{amssymb}
+}
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{
+% New: Load \pkg{amssymb} if the "no-vector" option has \emph{not} been given.
+% }
+%
+% Finally we load our most important dependency \pkg{mathtools}.
+% \begin{macrocode}
+\RequirePackage{mathtools}[2004/06/05]
+% \end{macrocode}
+%
+%
+% \section{Centering Math Symbols Along the Math-Axis}
+% \label{sec:impl-vcenter}
+%
+% Certain math constructs such cause \TeX{}
+% to not center the operator along the math axis,
+% like case of |\mathop{\nabla}\nolimits| vs.\
+% |\mathop{\boldsymbol\nabla}\nolimits|,
+% as can be seen below.
+% \[
+% \mathop{\nabla}\nolimits f(x)
+% \quad \text{vs.} \quad
+% \mathop{\boldsymbol\nabla}\nolimits f(x)
+% \]
+% As can be seen the bold nabla symbol is slightly higher up than the non-bold
+% version.
+% Because of this it is sometimes useful to manually center some math symbols,
+% along the math axis.\footnote{%
+% The code in this section is inspired by
+% \url{http://www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf}
+% }
+%
+% \begin{macro}[added = 2024-07-08]{
+% \moremath_vcenter:n
+% }
+% The function \cs{moremath_vcenter:n} is a wrapper around the \tn{vcenter}
+% \TeX{} primitive.
+% It takes a single argument.
+% \begin{arguments}
+% \item A \meta{tl} containing math mode material to center along the math axis.
+%
+% This argument is typeset in math mode.
+% \end{arguments}
+% The function uses the \tn{mathpalette} primitive to switch to the right
+% math style.
+% The function is not in a \TeX{}-sense long,
+% i.e.\ it does not take \tn{par} tokens.
+%
+% As this function might be useful not only for internal use by \pkg{moremath},
+% we declare it as a public function here.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_vcenter:n
+{
+ \mathpalette \@@_vcenter:Nn {#1}
+}
+% \end{macrocode}
+% \changes{v0.3.0}{\GetVersionDate{v0.3.0}}{
+% Added new function.
+% }
+% \end{macro}
+%
+% \begin{macro}[added=2024-07-08]{
+% \@@_vcenter:Nn,
+% }
+% As \tn{mathpalette} needs as its first argument a macro which takes two
+% arguments
+% (the first is a math style switch and the second the contents).\footnote{%
+% See \TeX{}SE answer \url{https://tex.stackexchange.com/a/34412}
+% }
+% We define an internal helper function for \cs{moremath_vcenter:n} for
+% \cs{mathpalette} to call.
+%
+% The function \cs{@@_vcenter:Nn} takes two arguments:
+% \begin{arguments}
+% \item The math style macro, which is passed to this function by
+% \tn{mathpalette}.
+%
+% \item The \meta{tl} to typeset inside the \tn{vcenter}.
+% \end{arguments}
+%
+% Because of the properties of \tn{vcenter}, it switches to vertical mode,
+% we need to put the contents to typeset inside a horizontal box.
+% Because of this we also need to reenter math mode, and because of this
+% we need to remove the spacing inserted by entering math mode
+% by setting \tn{mathsurround} to zero.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \@@_vcenter:Nn
+{
+ \vcenter
+ {
+ \hbox:n
+ {
+ $
+ \mathsurround=0pt
+ #1 {#2}
+ $
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection*{Document Level Command}
+%
+% Although unlikely there might arise the need for a document author to center
+% some math along the math axis.
+% For this purpose we are going to define a new document level command.
+%
+% But first we are going to declare some messages to use by the command.
+% The first message informs the user that the command is not available,
+% because its \meta{csname} is already taken.
+% \begin{macrocode}
+\msg_new:nnn { moremath } { csname-already-defined }
+{
+ Control~sequence~' #1 '~is~already~ defined.\\
+ Skipping~definition~\msg_line_context:
+}
+% \end{macrocode}
+% The second message should be issued if a command that only works in math mode
+% was given outside of it.
+% \begin{macrocode}
+\msg_new:nnnn { moremath } { vcenter / only-in-math-mode }
+{
+ Command~#1~used~outside~math~mode~\msg_line_context:.
+}
+{
+ The~command~#1~may~only~be~used~inside~math~mode.
+}
+% \end{macrocode}
+% \begin{macro}{
+% \VCenterMath,
+% }
+% Now to the document level command for centering math along the math axis.
+% \begin{macrocode}
+\cs_if_free:NTF \VCenterMath
+{
+ \NewDocumentCommand \VCenterMath { m }
+ {
+ \mode_if_math:TF
+ {
+ \moremath_vcenter:n {#1}
+ }{% \mode_if_math:TF FALSE BRANCH
+ \msg_error:nnn { moremath } { vcenter / only-in-math-mode } {\VCenterMath}
+ }
+ }
+}{% \cs_if_free:NTF \VCenterMath FALSE BRANCH
+ \msg_warning:nnn { moremath } { csname-already-defined } {\VCenterMath}
+}
+% \end{macrocode}
+% \changes{v0.3.0}{\GetVersionDate{v0.3.0}}{
+% Added new document level command.
+% }
+% \end{macro}
+%
+%
+% ^^X SECTION: Paired Delimiters
+% \section{Declaring Paired Delimiters for Internal Use}
+% \label{sec:impl-paired-delim}
+%
+% \begin{macro}{
+% \@@_inparent:w,
+% \@@_inbrack:w,
+% \@@_inbrace:w,
+% \@@_in_vert:w,
+% \@@_in_Vert:w
+% }
+% As we are going to use \pkg{mathtools}' \emph{paired delimiters}
+% at several places throughout this package,
+% we define \emph{paired delimiters} for internal use, as functions with weird
+% syntax.
+% \begin{macrocode}
+\DeclarePairedDelimiter{\@@_inparent:w}{\lparen}{\rparen}
+\DeclarePairedDelimiter{\@@_inbrack:w}{\lbrack}{\rbrack}
+\DeclarePairedDelimiter{\@@_inbrace:w}{\lbrace}{\rbrace}
+\DeclarePairedDelimiter{\@@_in_vert:w}{\lvert}{\rvert}
+\DeclarePairedDelimiter{\@@_in_Vert:w}{\lVert}{\rVert}
+% \end{macrocode}
+% \end{macro}
+%
+% ^^X SECTION: Delimited Operators
+% \section{Delimited Operators}
+% \label{sec:impl-delim-op}
+%
+% We need three different functions for providing the delimited operators.
+% But as we share a lot of code between those, we define an additional
+% helper function beforehand.
+% \begin{macro}{
+% \@@_operator:Nnn
+% }
+% The function \cs{@@_operator:Nnn} takes care of the operator part
+% of the new delimiter.
+% It allows the operator to have super- and subscripts.
+% It takes three arugments.
+% \begin{arguments}
+% \item The \meta{csname} of the operator to use.
+% \item A \meta{token list}, which is used as the superscript operator.
+%
+% This argument may be empty
+% \item A \meta{tl}, which is used as the subscript operator.
+%
+% The \meta{tl} may be empty.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_operator:Nnn
+{
+ #1
+ % add superscript if present
+ \tl_if_empty:nF {#2} {^{#2}}
+ % add subscript if present
+ \tl_if_empty:nF {#3} { \c_math_subscript_token {#3} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% We now define three version of the delimited operators.
+% \begin{macro}{
+% \moremath_delim_op_noscale:NNnnn,
+% \moremath_delim_op_autoscale:NNnnn,
+% }
+% \cs{moremath_delim_op_noscale:NNnnn} is provides a delimited operator without
+% any scaling of the delimiters
+% and \cs{moremath_delim_op_autoscale:NNnnn} provides a version with
+% automatic scaling of the delimiters.
+% Both of them take five arguments:
+% \begin{arguments}
+% \item The \meta{csname} of the operator to use.
+%
+% Any operator declared with \pkg{amsmath}'s \cs{operatorname}
+% and/or\linebreak[3]
+% \cs[module=amsmath,replace=false]{DeclareMathOperator}
+% is valid for this.
+%
+% \item The \meta{csname} of a paired delimiter declared by
+% \pkg{mathtools}'~\autocite{mathtools}
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter}.
+%
+% \item A \meta{tl} to use as the superscript of the operator.
+%
+% \item A \meta{tl} to use as the subscript of the operator.
+%
+% \item A \meta{tl} to insert inside the delimiters.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_delim_op_noscale:NNnnn
+{
+ \@@_operator:Nnn #1 {#3} {#4}
+ % #2 is the paired delimiter
+ #2 {#5}
+}
+
+\cs_new_protected_nopar:Nn \moremath_delim_op_autoscale:NNnnn
+{
+ \@@_operator:Nnn #1 {#3} {#4}
+ % #2 is the paired delimiter
+ #2 * {#5}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added "noscale" and "autoscale" versions.
+% }
+% \end{macro}
+% \begin{macro}{
+% \moremath_delim_op_manuscale:NNnnnn,
+% \moremath_delim_op_manuscale:NNVnnn
+% }
+% \cs{moremath_delim_op_manuscale:NNnnnn} provides a delimited operator with
+% manual scaling.
+% This version takes six arguments:
+% \begin{arguments}
+% \item The \meta{csname} of the operator to use.
+%
+% \item The \meta{csname} of the paired delimiter
+% declared by \pkg{mathtools}'~\autocite{mathtools}\linebreak[3]
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter}.
+%
+% \item A \meta{tl} containing the scaling macro i.e.\ \cs{big}, \cs{Big},
+% \cs{Bigg},\dots
+%
+% \item A \meta{tl} containing the superscript of the operator.
+%
+% The \meta{tl} may be empty
+%
+% \item A \meta{tl} containing the subscript of the operator
+%
+% The \meta{tl} may be empty.
+%
+% \item A \meta{tl} to insert inside the delimiters
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_delim_op_manuscale:NNnnnn
+{
+ \@@_operator:Nnn #1 {#4} {#5}
+ % #2 is the paired delimiter
+ #2 [ #3 ] {#6}
+}
+% \end{macrocode}
+% We also provide a variant for the scaling macro.
+% \begin{macrocode}
+\cs_generate_variant:Nn \moremath_delim_op_manuscale:NNnnnn {NNVnnn}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Function added.
+% }
+% \end{macro}
+%
+% For the creation of document level commands we also create a function,
+% so that the user is also able to declare new delimited operators.
+% But before we do so we create a message to inform the user if a
+% \meta{csname} was already taken.
+% \begin{macrocode}
+\msg_new:nnn { moremath } { delimop / already-defined-skip }
+{
+ Control~sequence~'#1'~is~already~defined.\\
+ Skipping~definition~of~delimited~operator~'#1'~\msg_line_context:.
+}
+% \end{macrocode}
+%
+% We also create a message to inform the user about conflicting options
+% given to the command.
+% \begin{macrocode}
+\msg_new:nnn { moremath } { delimop / auto-manu-scale-conflict }
+{
+ Both~star~and~scale~cmd~given~to~'#1'.\\
+ Automatic~scaling~will~be~preferred,~the~size~command~will~be~
+ ignored~\msg_line_context:.
+}
+% \end{macrocode}
+% \begin{macro}{
+% \moremath_new_delim_op_command:NNN,
+% \moremath_new_delim_op_command:cNN,
+%}
+% \cs{moremath_new_delim_op_command:NNN} takes three arguments:
+% \begin{arguments}
+% \item The \meta{csname} to be defined.
+%
+% \item The \meta{csname} of the operator to use,
+% which should be an operator declared with
+% \cs[module=amsmath,replace=false]{DeclareMathOperator}.
+%
+% \item The \meta{csname} of the delimiter to use,
+% which should have been declared with
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter}.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \moremath_new_delim_op_command:NNN
+{
+ \cs_if_free:NTF #1
+ {
+ \exp_args:NNe \NewDocumentCommand #1
+ { s o E{ ^ \char_generate:nn {`_} {8} }{{}{}} m }
+ {
+ \tl_if_novalue:nTF {##2}
+ {
+ % second argument empty
+ \bool_if:nTF {##1}
+ {
+ % star given
+ \moremath_delim_op_autoscale:NNnnn #2 #3 {##3} {##4} {##5}
+ }{
+ % star not given
+ \moremath_delim_op_noscale:NNnnn #2 #3 {##3} {##4} {##5}
+ }
+ }{
+ % second argument present
+ % star given?
+ \bool_if:nTF {##1}
+ {
+ % Warn if both star and scaling factor are present
+ \msg_warning:nnn { moremath } { delimop / auto-manu-scale-conflict }
+ {#1}
+ \moremath_delim_op_autoscale:NNnnn #2 #3 {##3} {##4} {##5}
+ }{ % FALSE BRANCH
+ \moremath_delim_op_manuscale:NNnnnn #2 #3 {##2} {##3} {##4} {##5}
+ }
+ }
+ }
+ }{ % \cs_if_free:nTF #1 FALSE BRANCH
+ \msg_warning:nnn { moremath } { delimop / already-defined-skip }
+ {#1}
+ }
+}
+
+\cs_generate_variant:Nn \moremath_new_delim_op_command:NNN {cNN}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added function and variant.
+% }
+% \end{macro}
+%
+% \subsection{Document Level Commands}
+% \label{sec:impl-delim-op-doc-cmds}
+%
+% \begin{macro}{\DeclareDelimitedOperator}
+% Finally provide the user with a command to declare an additional
+% delimited operator.
+% \begin{macrocode}
+\NewDocumentCommand\DeclareDelimitedOperator { m m m }
+{
+ \msg_redirect_name:nnn { moremath } { delimop / already-defined-skip } { error }
+ \moremath_new_delim_op_command:NNN #1 #2 #3
+ \msg_redirect_name:nnn { moremath } { delimop / already-defined-skip } {}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{Added document level command.}
+% \end{macro}
+%
+% As \pkg{amsmath}~\autocite{amsmath} pre-defines the following operators
+% it is only sensible to also define delimited versions of them:\\
+% \input{\jobname-ams-op-table.tex}
+%
+% \begin{macro}{\@@_new_delim_op_cmds:nN}
+% \cs{@@_new_delim_op_cmds:nN} creates document level macros of the form
+% \cs[no-index]{\meta{prefix}\meta{op name}}.
+% It declares fife versions \cs[no-index]{p\meta{op name}},
+% \cs[no-index]{b\meta{op name}}, \cs[no-index]{B\meta{op name}},
+% \cs[no-index]{v\meta{op name}} and \cs[no-index]{V\meta{op name}}.
+%
+% The function takes two arguments:
+% \begin{arguments}
+% \item A token list which contains \meta{op name}
+%
+% \item The \meta{csname} of the operator to use.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_new_delim_op_cmds:nN
+{
+ \moremath_new_delim_op_command:cNN {p #1} #2 \@@_inparent:w
+ \moremath_new_delim_op_command:cNN {b #1} #2 \@@_inbrack:w
+ \moremath_new_delim_op_command:cNN {B #1} #2 \@@_inbrace:w
+ \moremath_new_delim_op_command:cNN {v #1} #2 \@@_in_vert:w
+ \moremath_new_delim_op_command:cNN {V #1} #2 \@@_in_Vert:w
+}
+% \end{macrocode}
+% \end{macro}
+%
+% The decision if the following macros are defined depends on a package load
+% time option.
+% \begin{macrocode}
+\bool_if:NTF \l_@@_predef_operators_bool
+{
+% \end{macrocode}
+% We define the commands for the operators already declared by amsmath.
+% \begin{macro}[documented-as=\parccos]{
+% \parccos, \barccos, \Barccos, \varccos, \Varccos,
+% }
+% For \cs[module=amsmath,replace=false]{arccos},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {arccos} \arccos
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added delimited document commands for all \pkg{amsmath}-defined operators.
+% }
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \parcsin, \barcsin, \Barcsin, \varcsin, \Varcsin,
+% }
+% \cs[module=amsmath,replace=false]{arcsin},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {arcsin} \arcsin
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \parctan, \barctan, \Barctan, \varctan, \Varctan,
+% }
+% \cs[module=amsmath,replace=false]{arctan},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {arctan} \arctan
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \Parg, \barg, \Barg, \varg, \Varg,
+% }
+% \cs[module=amsmath,replace=false]{arg}
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {arg} \arg
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pcos, \bcos, \Bcos, \vcos, \Vcos,
+% }
+% \cs[module=amsmath,replace=false]{cos}
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {cos} \cos
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pcosh, \bcosh, \Bcosh, \vcosh, \Vcosh,
+% }
+% \cs[module=amsmath,replace=false]{cosh},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {cosh} \cosh
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pcot, \bcot, \Bcot, \vcot, \Vcot,
+% }
+% \cs[module=amsmath,replace=false]{cot},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {cot} \cot
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pcoth, \bcoth, \Bcoth, \vcoth, \Vcoth,
+% }
+% \cs[module=amsmath,replace=false]{coth},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {coth} \coth
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pcsc, \bcsc, \Bcsc, \vcsc, \Vcsc,
+% }
+% \cs[module=amsmath,replace=false]{csc},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {csc} \csc
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pdeg, \bdeg, \Bdeg, \vdeg, \Vdeg,
+% }
+% \cs[module=amsmath,replace=false]{deg},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {deg} \deg
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pdet, \bdet, \Bdet, \vdet, \Vdet,
+% }
+% \cs[module=amsmath,replace=false]{det},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {det} \det
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pdim, \bdim, \Bdim, \vdim, \Vdim,
+% }
+% \cs[module=amsmath,replace=false]{dim},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {dim} \dim
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pexp, \bexp, \Bexp, \vexp, \Vexp,
+% }
+% \cs[module=amsmath,replace=false]{exp},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {exp} \exp
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pgcd, \bgcd, \Bgcd, \vgcd, \Vgcd,
+% }
+% \cs[module=amsmath,replace=false]{gcd},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {gcd} \gcd
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \phom, \bhom, \Bhom, \vhom, \Vhom,
+% }
+% \cs[module=amsmath,replace=false]{hom},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {hom} \hom
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pinf, \binf, \Binf, \vinf, \Vinf,
+% }
+% \cs[module=amsmath,replace=false]{inf},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {inf} \inf
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pinjlim, \binjlim, \Binjlim, \vinjlim, \Vinjlim,
+% }
+% \cs[module=amsmath,replace=false]{injlim},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {injlim} \injlim
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pker, \bker, \Bker, \vker, \Vker,
+% }
+% \cs[module=amsmath,replace=false]{ker},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {ker} \ker
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \plg, \blg, \Blg, \vlg, \Vlg,
+% }
+% \cs[module=amsmath,replace=false]{lg},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {lg} \lg
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \plim, \blim, \Blim, \vlim, \Vlim,
+% }
+% \cs[module=amsmath,replace=false]{lim},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {lim} \lim
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pliminf, \bliminf, \Bliminf, \vliminf, \Vliminf,
+% }
+% \cs[module=amsmath,replace=false]{liminf},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {liminf} \liminf
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \plimsup, \blimsup, \Blimsup, \vlimsup, \Vlimsup,
+% }
+% \cs[module=amsmath,replace=false]{limsup},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {limsup} \limsup
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pln, \bln, \Bln, \vln, \Vln,
+% }
+% \cs[module=amsmath,replace=false]{ln}
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {ln} \ln
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \plog, \blog, \Blog, \vlog, \Vlog,
+% }
+% \cs[module=amsmath,replace=false]{log},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {log} \log
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pmax, \bmax, \Bmax, \vmax, \Vmax,
+% }
+% \cs[module=amsmath,replace=false]{max},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {max} \max
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pmin, \bmin, \Bmin, \vmin, \Vmin,
+% }
+% \cs[module=amsmath,replace=false]{min},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {min} \min
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pPr, \bPr, \BPr, \vPr, \VPr,
+% }
+% \cs[module=amsmath,replace=false]{Pr},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {Pr} \Pr
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pprojlim, \bprojlim, \Bprojlim, \vprojlim, \Vprojlim,
+% }
+% \cs[module=amsmath,replace=false]{projlim},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {projlim} \projlim
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \psec, \bsec, \Bsec, \vsec, \Vsec,
+% }
+% \cs[module=amsmath,replace=false]{sec},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {sec} \sec
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \psin, \bsin, \Bsin, \vsin, \Vsin,
+% }
+% \cs[module=amsmath,replace=false]{sin},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {sin} \sin
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \psinh, \bsinh, \Bsinh, \vsinh, \Vsinh,
+% }
+% \cs[module=amsmath,replace=false]{sinh},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {sinh} \sinh
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \psup, \bsup, \Bsup, \vsup, \Vsup,
+% }
+% \cs[module=amsmath,replace=false]{sup},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {sup} \sup
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \ptan, \btan, \Btan, \vtan, \Vtan,
+% }
+% \cs[module=amsmath,replace=false]{tan},
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {tan} \tan
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \ptanh, \btanh, \Btanh, \vtanh, \Vtanh
+% }
+% and \cs[module=amsmath,replace=false]{tanh}.
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {tanh} \tanh
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}[documented-as=\parccos]{
+% \pvarinjlim, \bvarinjlim, \Bvarinjlim, \vvarinjlim, \Vvarinjlim,
+% \pvarprojlim, \bvarprojlim, \Bvarprojlim, \vvarprojlim, \Vvarprojlim,
+% \pvarliminf, \bvarliminf, \Bvarliminf, \vvarliminf, \Vvarliminf,
+% \pvarlimsup, \bvarlimsup, \Bvarlimsup, \vvarlimsup, \Vvarlimsup,
+% }
+% We also provide delimited versions of \cs[module=amsmath,replace=false]{varinjlim},
+% \cs[module=amsmath,replace=false]{varprojlim},
+% \cs[module=amsmath,replace=false]{varliminf},
+% and \cs[module=amsmath,replace=false]{varlimsup}.
+% \begin{macrocode}
+\@@_new_delim_op_cmds:nN {varinjlim} \varinjlim
+\@@_new_delim_op_cmds:nN {varprojlim} \varprojlim
+\@@_new_delim_op_cmds:nN {varliminf} \varliminf
+\@@_new_delim_op_cmds:nN {varlimsup} \varlimsup
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+}{
+ \msg_info:nnnn {moremath} {load /disabling} {no-operators}
+ {
+ predefined~delimited~operator~macros
+ }
+} % End of the conditional
+% \end{macrocode}
+%
+% ^^X SECTION: Vector Calculus Macros
+% \section{Vector Calculus Macros}
+% \label{sec:vector-calc}
+%
+% For providing macros which help with vector differentials,
+% we first need some setup functions.
+%
+% \subsection{Macros Providing Symbols of Operators}
+% \label{sec:op-symbols}
+%
+% \begin{macro}{
+% \@@_maybe_vcenter:n,
+% }
+% Sometimes a symbol should be centered explicitly,
+% as this will depend on the current setting of "vcenter",
+% i.e.\ the current value of \cs{l_@@_vcenter_bool},
+% we provide a helper function which puts its argument
+% \begin{arguments}
+% \item A list of \meta{tokens}
+% \end{arguments}
+% inside a \tn{vcenter} by means of \cs{moremath_vcenter:n}
+% or not depending on the current value of \cs{l_@@_vcenter_bool}.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \@@_maybe_vcenter:n
+{
+ \bool_if:NTF \l_@@_vcenter_bool
+ {
+ \moremath_vcenter:n {#1}
+ }{
+ #1
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_gradient_operator_get:}
+% This function returns the gradient operator depending on the current setting
+% of the keys.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_gradient_operator_get:
+{
+ \tl_if_empty:NTF \l_@@_grad_op_tl
+ {
+ \mathop
+ {
+% \end{macrocode}
+% Otherwise we first need to check if the operator shall have an arrow over it.
+% Afterwards if the nabla shall be bold.
+% \begin{macrocode}
+ \bool_if:NTF \l_@@_nabla_arrow_bool
+ {
+ \vec
+ {
+% \end{macrocode}
+% In case \cs{l_@@_nabla_arrow_bool} is true we should \emph{maybe}
+% center the symbol.
+% \begin{macrocode}
+ \@@_maybe_vcenter:n
+ {
+ \bool_if:NT \l_@@_nabla_bold_bool
+ {
+ \boldsymbol
+ }
+ \l_@@_nabla_tl
+ }
+ }
+ }{
+% \end{macrocode}
+% Like in the case above we should \emph{maybe} center the symbol
+% if \cs{l_@@_nabla_bold_bool} is true.
+% \begin{macrocode}
+ \bool_if:NTF \l_@@_nabla_bold_bool
+ {
+ \@@_maybe_vcenter:n
+ {
+ \boldsymbol
+ \l_@@_nabla_tl
+ }
+ }{
+ \l_@@_nabla_tl
+ }
+ }
+ }% \mathop
+ \nolimits
+ }{
+% \end{macrocode}
+% If the user provided its own implementation of the operator,
+% we simply return it.
+% \begin{macrocode}
+ \l_@@_grad_op_tl
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_laplace_operator_get:}
+% Then we define a function for returning the laplace operator symbol,
+% depending on the currently set keys.
+% The function wraps the symbol for the operator inside
+% \tn{mathop} to provide the right spacing.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_laplace_operator_get:
+{
+ \tl_if_empty:NTF \l_@@_laplacian_tl
+ {
+ \mathop
+ {
+ \bool_if:NTF \l_@@_laplacian_delta_bool
+ {
+ \Delta
+ }{
+ \bool_if:NTF \l_@@_laplacian_arrow_bool
+ {
+ \vec{
+ \@@_maybe_vcenter:n
+ {
+ \bool_if:NT \l_@@_nabla_bold_bool {\boldsymbol}
+ \l_@@_laplacian_symb_tl
+ }
+ }
+ }{
+ \bool_if:NTF \l_@@_nabla_bold_bool
+ {
+ \@@_maybe_vcenter:n
+ {
+ \boldsymbol
+ \l_@@_laplacian_symb_tl
+ }
+ }{
+ \l_@@_laplacian_symb_tl
+ }
+ }
+ }
+ }\nolimits
+ \bool_if:NF \l_@@_laplacian_delta_bool
+ {
+ \c_math_superscript_token
+ {
+ 2
+ }
+ }
+ }{
+ \l_@@_laplacian_tl
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_dalembert_operator_get:
+% }
+% This function returns the \foreignlanguage{french}{d'Alembert} operator
+% depending on the currently set keys. The symbol for the
+% \foreignlanguage{french}{d'Alembert} operator is wrapped inside \tn{mathop}
+% to provide proper spacing.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_dalembert_operator_get:
+{
+ \mathop
+ {
+ \l_@@_dalembert_symb_tl
+ }% \mathop
+ \nolimits
+}
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added function: \cs{@@_dalembert_operator_get:}
+% }
+% \end{macro}
+%
+% \subsection{Macros Producing an Operator}
+% \label{sec:op-macros}
+%
+% After we have defined the symbols it is now time to provide a function which
+% produces the entire gradient operator
+% \begin{macro}{
+% \moremath_gradient_operator:n,
+% \moremath_laplace_operator:n
+% }
+% This function takes one arguments, the subscript to use with the operator.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_gradient_operator:n
+{
+ \@@_gradient_operator_get:
+ \tl_if_empty:nF {#1} {\c_math_subscript_token {#1}}
+}
+% \end{macrocode}
+%
+% Like for the gradient operator we do the same for the laplacian
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_laplace_operator:n
+{
+ \@@_laplace_operator_get:
+ \tl_if_empty:nF {#1} {\c_math_subscript_token {#1}}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added functions.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \moremath_divergence_operator:n,
+% \moremath_curl_operator:n
+% }
+% Using the already defined gradient operator it is possible to define a
+% function which acts as an operator suitable for representing the divergence
+% operator and the curl operator.
+% Like the gradient operator this functions take one argument
+% \begin{arguments}
+% \item the subscript of the gradient operator.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_divergence_operator:n
+{
+% \end{macrocode}
+% The braces around \cs{moremath_gradient_operator:n} are necessary to avoid
+% issues with the spacing between \tn{cdot} and the following \tn{mathopen}
+% from any braces.\footnote{%
+% See: \url{https://tex.stackexchange.com/a/223914}
+% }
+% Example:
+% \[
+% \text{With braces:}\quad \pdiv{f(x)} \text{,}
+% \qquad\text{without braces: }\quad \mathop{\nabla}\nolimits\cdot(f(x))
+% \]
+% \begin{macrocode}
+ {
+ \moremath_gradient_operator:n {#1}
+ }
+ \cdot
+}
+
+\cs_new_protected_nopar:Nn \moremath_curl_operator:n
+{
+ {
+ \moremath_gradient_operator:n {#1}
+ }
+ \times
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added functions.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \moremath_dalembert_operator:n
+% }
+% This function produces the \foreignlanguage{french}{d'Alembert} operator,
+% including an optional subscript.
+% The function takes one argument:
+% \begin{arguments}
+% \item A \meta{tl} with the contents of the subscript of the operator.
+%
+% This variable may be empty,
+% in this case no subscript (not even an empty one) is produced.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \moremath_dalembert_operator:n
+{
+ \@@_dalembert_operator_get:
+ \tl_if_empty:nF {#1}
+ {
+ \c_math_subscript_token {#1}
+ }
+}
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added new function \cs{moremath_dalembert_operator:n}.
+% }
+% \end{macro}
+%
+%
+% \subsection{Producing Delimited Vector Calculus Operators}
+% \label{sec:delim-vec-ops}
+%
+% \begin{macro}{
+% \moremath_delim_nabla_op_noscale:NNnn,
+% \moremath_delim_nabla_op_autoscale:NNnn
+% }
+% These functions produce a vector calculus operator with \meta{contents}
+% inside delimiters.
+% The "autoscale" variant scales the delimiters with the size of \meta{contents},
+% the "noscale" variant does no scaling at all.
+% \begin{arguments}
+% \item The \meta{csname} of the operator to use.
+%
+% This should have the same form as \cs{moremath_gradient_operator:n},
+% i.e.\ the function passed as \meta{csname} should accept one argument
+% to typeset as subscript.
+%
+% \item The \meta{csname} of the \emph{paired delimiter} to use.
+%
+% The paired delimiter has to be one declared using \pkg{mathtools}'
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter} command.
+%
+% \item A \meta{tl} with the subscript of the operator.
+%
+% \item A \meta{tl} with the contents to typeset inside the delimiters
+% \end{arguments}
+% We begin with the "noscale" version.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_delim_nabla_op_noscale:NNnn
+{
+ #1 {#3} #2{#4}
+}
+% \end{macrocode}
+% Then we create the version with automatic scaling.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_delim_nabla_op_autoscale:NNnn
+{
+ #1 {#3} #2 * {#4}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added "noscale" and "autoscale" functions.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \moremath_delim_nabla_op_manuscale:NNnnn
+% }
+% This function produces a vector calculus operator like
+% \cs{moremath_delim_nabla_op_noscale:NNnn}
+% and \cs{moremath_delim_nabla_op_autoscale:NNnn},
+% but with manual scaling.
+% It takes five arguments:
+% \begin{arguments}
+% \item The \meta{csname} of the operator to use.
+%
+% \item The \meta{csname} of the paired delimiter.
+%
+% \item A \meta{token~list} containing the \meta{scale~cmd} like
+% \cs{big}, \cs{Big}, \cs{bigg}, etc.
+%
+% \item A \meta{tl} with the subscript of the operator.
+%
+% \item A \meta{tl} with the contents to typeset inside the delimiters.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_delim_nabla_op_manuscale:NNnnn
+{
+ #1 {#4} #2 [#3] {#5}
+}
+% \end{macrocode}
+% \begin{macro}{
+% \moremath_delim_nabla_op_manuscale:NNVnn
+% }
+% We also declare a variant for passing a variable with the \meta{scale~cmd}
+% instead of a \meta{token~list}.
+% \begin{macrocode}
+\cs_generate_variant:Nn \moremath_delim_nabla_op_manuscale:NNnnn {NNVnn}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Add variant.
+% }
+% \end{macro}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Add function.
+% }
+% \end{macro}
+%
+% To ease the definition of those macros we define a function for defining
+% the delimited versions.
+%
+% Of course we also need a way to declare a user interface for this functions.
+% For this purpose we first need some helpers for setting
+% necessary parameters.
+% \begin{macro}{\@@_parse_kv_args:nN}
+% This helper macro takes two arguments,
+% \begin{arguments}
+% \item A token list of the key-value arguments.
+% \item The \meta{csname} of a token list to put the scale value in.
+% \end{arguments}
+% The function sets the given keys but before it does so it searches for a
+% key named \verb|scale| and puts it into the second argument.
+% For this to work it is necessary that all values have \verb|=| in them.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_parse_kv_args:nN
+{
+% \end{macrocode}
+% We first put the key-value arguments inside a property list.
+% Afterwards we check if the key \verb|scale| has been given.
+% If yes we pop it and assign it to the second argument.
+% Otherwise we do nothing.
+% \begin{macrocode}
+ \prop_set_from_keyval:Nn \l_tmpa_prop {#1}
+
+ \prop_pop:NnNT \l_tmpa_prop {scale} #2 {}
+
+ \keys_set:ne {moremath} {\prop_to_keyval:N \l_tmpa_prop}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% We also need a warning message for conflicting arguments,
+% to inform the user that one of his options is going to be ignored.
+% \begin{macrocode}
+\msg_new:nnn { moremath } { vector-calc / scale-star-conflict }
+{
+ Both~star~and~scaling~factor~given~to~'#1'.\\
+ Automatic~scaling~will~be~preferred,~the~size~command~'#2'~will~be~
+ ignored~\msg_line_context:.
+}
+% \end{macrocode}
+%
+% \begin{macro}{
+% \@@_new_delim_nabla_doc_cmd:NNN,
+% \@@_new_delim_nabla_doc_cmd:cNN,
+% }
+% This function takes three arguments:
+% \begin{arguments}
+% \item The \meta{csname} of the to be defined command
+% \item The \meta{csname} of the operator to use.
+%
+% This should be a function like \cs{moremath_gradient_operator:n}.
+% \item The \meta{csname} of the delimiter function to use.
+%
+% This should be a macro/command created with \pkg{mathtools}
+% \cs[module=mathtools,replace=false]{DeclarePairedDelimiter} command.
+% \end{arguments}
+% Its purpose is to create a new document level command,
+% for the delimited vector calculus operators.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_new_delim_nabla_doc_cmd:NNN
+{
+ \cs_if_free:NTF #1
+ {
+ \exp_args:NNe \NewDocumentCommand #1
+ {
+ s ={scale} o E{ \char_generate:nn {`_}{8} }{ {} } m
+ }
+ { % command code
+ \group_begin:
+ % optional arguments given?
+ \tl_if_novalue:nF {##2}
+ {
+ \@@_parse_kv_args:nN {##2} \l_tmpa_tl
+ }
+ % star given?
+ \bool_if:nTF {##1}
+ {
+ % scale factor given?
+ \tl_if_empty:NF \l_tmpa_tl
+ {
+ \msg_warning:nnnV { moremath } { vector-calc / scale-star-conflict }
+ {#1} \l_tmpa_tl
+ }
+ \moremath_delim_nabla_op_autoscale:NNnn #2 #3 {##3} {##4}
+ }{ % \bool_if:nTF {##1} FALSE BRANCH
+ % scale factor given?
+ \tl_if_empty:NTF \l_tmpa_tl
+ {
+ \moremath_delim_nabla_op_noscale:NNnn #2 #3 {##3} {##4}
+ }{ % FALSE BRANCH
+ \moremath_delim_nabla_op_manuscale:NNVnn #2 #3 \l_tmpa_tl {##3} {##4}
+ }
+ } % \bool_if:nTF {##1}
+ \group_end:
+ }
+ }{ % \cs_if_free:NTF #1 FALSE BRANCH
+ \msg_warning:nnn { moremath } { vector-calc / already-defined-skip } {#1}
+ } % \cs_if_free:NTF #1
+}
+%
+\cs_generate_variant:Nn \@@_new_delim_nabla_doc_cmd:NNN {cNN}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_new_nabla_doc_cmds:nN}
+% This internal function creates five different document level commands at once,
+% using \cs{@@_new_delim_nabla_doc_cmd:cNN}.
+% It takes two arguments:
+% \begin{arguments}
+% \item The a \meta{suffix~tl} for constructing the command names.
+%
+% The resulting commands will have the form \cs[no-index]{p\meta{suffix}},
+% \cs[no-index]{b\meta{suffix}}, \cs[no-index]{B\meta{suffix}},
+% \cs[no-index]{v\meta{suffix}} and \cs[no-index]{V\meta{suffix}}.
+%
+% \item The \meta{csname} of the operator to use
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_new_nabla_doc_cmds:nN
+{
+ \@@_new_delim_nabla_doc_cmd:cNN { p #1 } #2 \@@_inparent:w
+ \@@_new_delim_nabla_doc_cmd:cNN { b #1 } #2 \@@_inbrack:w
+ \@@_new_delim_nabla_doc_cmd:cNN { B #1 } #2 \@@_inbrace:w
+ \@@_new_delim_nabla_doc_cmd:cNN { v #1 } #2 \@@_in_vert:w
+ \@@_new_delim_nabla_doc_cmd:cNN { V #1 } #2 \@@_in_Vert:w
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Document Level Commands}
+% \label{sec:vec-doc-lvl-commands}
+%
+% The predefined macros for vector calculus are also guarded by a package
+% option to be conditionally disabled by the user.
+% \begin{macrocode}
+\bool_if:NTF \l_@@_predef_vector_op_bool
+{
+% \end{macrocode}
+% \subsubsection{Standalone Operators}
+% \label{par:impl-vector-calc-standalone}
+% The user might want to use also a non-delimited version
+% of the vector calculus operators,
+% we provide them with a standalone version of those.
+%
+% As the definition of a new document command can fail if the \meta{csname}
+% clashes with some already defined macro,
+% we define an error message to use when defining document level commands.
+% \begin{macrocode}
+\msg_new:nnn { moremath } { vector-calc / already-defined-skip }
+{
+ Control~sequence~'#1'~is~already~defined.\\
+ Skipping~definition~\msg_line_context:.
+}
+% \end{macrocode}
+%
+% \begin{macro}{
+% \grad,
+% \divergence,
+% \curl,
+% \laplacian
+% }
+% Now we provide the user with document level commands for
+% \cs[no-index]{moremath_\meta{op}_operator:n}.
+% \begin{macrocode}
+\cs_if_free:NTF \grad
+{
+ \exp_args:NNe \NewDocumentCommand \grad { !o E{ \char_generate:nn {`_}{8} }{{}} }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn {moremath} {#1}
+ }
+ \moremath_gradient_operator:n {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn {moremath} { vector-calc / already-defined-skip } {\grad}
+}
+
+\cs_if_free:NTF \divergence
+{
+ \exp_args:NNe \NewDocumentCommand \divergence
+ { !o E{ \char_generate:nn {`_} {8} }{{}} }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn {moremath} {#1}
+ }
+ \moremath_divergence_operator:n {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn {moremath} { vector-calc / already-defined-skip } {\divergence}
+}
+
+\cs_if_free:NTF \curl
+{
+ \exp_args:NNe \NewDocumentCommand \curl
+ { !o E{ \char_generate:nn {`_}{8} }{{}} }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn {moremath} {#1}
+ }
+ \moremath_curl_operator:n {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn {moremath} {vector-calc / already-defined-skip} {\curl}
+}
+
+\cs_if_free:NTF \laplacian
+{
+ \exp_args:NNe \NewDocumentCommand \laplacian
+ { !o E{ \char_generate:nn {`_}{8} }{{}} }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn {moremath} {#1}
+ }
+ \moremath_laplace_operator:n {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn {moremath} { vector-calc / already-defined-skip }
+ {\laplacian}
+}
+% \end{macrocode}
+% \begin{macro}{\quabla}
+% We now also define a command to use as a standalone
+% \foreignlanguage{french}{d'Alembert} operator.
+% As the name \cs[no-index]{dalembertian} is a bit cumbersome to type out,
+% I've decided to use one of its alternate names \cs{quabla}
+% \begin{macrocode}
+\cs_if_free:NTF \quabla
+{
+ \exp_args:NNe \NewDocumentCommand \quabla
+ { !o E{ \char_generate:nn {`_} { 8 } }{{}} }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath } {#1}
+ }
+ \moremath_dalembert_operator:n {#2}
+ \group_end:
+ }
+}{ % \cs_if_free:NTF \quabla FALSE BRANCH
+ \msg_warning:nnn { moremath } { vector-calc / already-defined-skip }
+ {\quabla}
+}
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{
+% Added \cs{quabla} command.
+% }
+% \changes{v0.3.0}{\GetVersionDate{v0.3.0}}{
+% Changed: Spaces between the \meta{csname}
+% and the optional argument are now disallowed.
+% }
+% \end{macro}^^X \quabla
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added \cs{grad}, \cs{divergence}, \cs{curl} and \cs{laplacian}
+% commands.
+% }
+% \changes{v0.3.0}{\GetVersionDate{v0.3.0}}{
+% Changed: Spaces between the \meta{csname}
+% and the optional argument are now disallowed
+% for \cs{grad}, \cs{divergence}, \cs{curl} and \cs{laplacian}.
+% }
+% \end{macro}
+%
+% \subsubsection{Operators with Delimiters}
+% \label{par:impl-vec-calc-op-delim}
+%
+% \begin{macro}{
+% \pgrad,
+% \bgrad,
+% \Bgrad,
+% \vgrad,
+% \Vgrad,
+% }
+% Now lets declare the delimited gradient operators.
+% We provide five versions using parenthesis, brackets, braces, single \tn{vert},
+% and double \tn{Vert}.
+% \begin{macrocode}
+\@@_new_nabla_doc_cmds:nN {grad} \moremath_gradient_operator:n
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added commands for delimited gradient operators.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \pdiv,
+% \bdiv,
+% \Bdiv,
+% \vdiv,
+% \Vdiv
+% }
+% Now we do the same for the divergence operator.
+% \begin{macrocode}
+\@@_new_nabla_doc_cmds:nN {div} \moremath_divergence_operator:n
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added commands for delimited divergence operators.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \pcurl,
+% \bcurl,
+% \Bcurl,
+% \vcurl,
+% \Vcurl
+% }
+% Now to the curl macros.
+% \begin{macrocode}
+\@@_new_nabla_doc_cmds:nN {curl} \moremath_curl_operator:n
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added commands for delimited curl operators.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \plaplacian,
+% \blaplacian,
+% \Blaplacian,
+% \vlaplacian,
+% \Vlaplacian
+% }
+% Next we take care of the laplacian
+% \begin{macrocode}
+\@@_new_nabla_doc_cmds:nN {laplacian} \moremath_laplace_operator:n
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added commands for delimited Laplace operators.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \pquabla,
+% \bquabla,
+% \Bquabla,
+% \vquabla,
+% \Vquabla
+% }
+% Finally we define delimited commands for the
+% \foreignlanguage{french}{d'Alembert} operator.
+% \begin{macrocode}
+\@@_new_nabla_doc_cmds:nN {quabla} \moremath_dalembert_operator:n
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{
+% Added commands for a delimited \foreignlanguage{french}{d'Alembert}
+% operator.
+% }
+% \end{macro}
+%
+% If the user issued \texttt{no-vector} as a package loading option,
+% write this to the log file.
+% \begin{macrocode}
+}{ % IF NOT \l_@@_predef_vector_op_bool
+ \msg_info:nnnn {moremath} { load /disabling } {no-vector}
+ {
+ predefined~vector~calculus~macros
+ }
+} % END \l_@@_predef_vector_op_bool
+% \end{macrocode}
+%
+% \section{Macros Producing Matrices and Vectors}
+% \label{sec:impl-matr-vec}
+%
+% \subsection{Producing Row and Column Vectors}
+%
+% The functions in this section are used to generate row and column vectors
+% utilizing \pkg{mathtools}~\autocite{mathtools} \env{matrix*} and
+% \env{smallmatrix*} environments.
+%
+% \begin{variable}{\l_@@_vector_entries_seq}
+% For generating row or column vectors it is necessary to store the entries
+% inside a variable. \cs{l_@@_vector_entries_seq} is used for this purpose.
+% \begin{macrocode}
+\seq_new:N \l_@@_vector_entries_seq
+% \end{macrocode}
+% \end{variable}
+%
+% Then we need a function for formatting the actual entries of the vector.
+% We need two version one for the row vector and one for the column vector
+% version.
+% \begin{macro}{
+% \@@_seq_to_column_vector:N,
+% \@@_seq_to_row_vector:N
+% }
+% These functions take one argument
+% \begin{arguments}
+% \item A sequence which should be converted to the contents of the single
+% column/row matrix.
+% \end{arguments}
+% They format the input suitable to be put inside a \env{matrix*} environment.
+% We begin with the column vector version.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \@@_seq_to_column_vector:N
+{
+ \seq_use:Nn #1 {\\}
+}
+% \end{macrocode}
+% Then we get to the row vector.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \@@_seq_to_row_vector:N
+{
+ \seq_use:Nn #1 {&}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% In the next step we construct the single row/column matrix from the user
+% provided input.
+% \begin{macro}{
+% \moremath_column_vector:nn,
+% \moremath_row_vector:nn,
+% }
+% The two commands \cs{moremath_column_vector:n} and \cs{moremath_row_vector:n}
+% construct the matrix, they both take two arguments.
+% \begin{arguments}
+% \item The delimiter specifier.
+%
+% This should be one of the prefixes of the \env{\meta{prefix}matrix*},
+% environments.
+%
+% Another possibility is to issue |small| as this parameter to get
+% an inline matrix.
+%
+% \item The comma separated contents of the matrix.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_column_vector:nn
+{
+ \seq_clear:N \l_@@_vector_entries_seq
+ \seq_set_from_clist:Nn \l_@@_vector_entries_seq {#2}
+
+ \exp_args:NnNV \begin{#1 matrix*} [ \l_@@_matrix_align_tl ]
+ \@@_seq_to_column_vector:N \l_@@_vector_entries_seq
+ \end{#1 matrix*}
+}
+
+\cs_new_protected_nopar:Nn \moremath_row_vector:nn
+{
+ \seq_clear:N \l_@@_vector_entries_seq
+ \seq_set_from_clist:Nn \l_@@_vector_entries_seq {#2}
+
+ \exp_args:NnNV \begin{#1matrix*} [ \l_@@_matrix_align_tl ]
+ \@@_seq_to_row_vector:N \l_@@_vector_entries_seq
+ \end{#1matrix*}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added functions producing row- and column vectors.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \moremath_column_smallvector:nn,
+% \moremath_row_smallvector:nn
+% }
+% To make the code more readable, we define functions specifically for
+% creating row and column vectors using the \env{smallmatrix*} family of
+% environments. These functions take the same arguments as the non-small
+% versions above.
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_column_smallvector:nn
+{
+ \moremath_column_vector:nn {#1 small} {#2}
+}
+
+\cs_new_protected_nopar:Nn \moremath_row_smallvector:nn
+{
+ \moremath_row_vector:nn {#1 small} {#2}
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added functions producing inline math row- and column vectors.
+% }
+% \end{macro}
+%
+% ^^X SUBSECTION: Shorthands for simple matrices
+% \subsection{Shorthands for Simple Matrices}
+% \label{sec:impl-matr-shorth}
+%
+% The construction of several simple matrices like diagonal matrices,
+% can be simplified as there is no need to use the \env{matrix} environment.\footnote{%
+% The code in this section is heavily inspired by the following answer on
+% \TeX{}SE: \url{https://tex.stackexchange.com/a/539741}
+% }
+%
+% \begin{variable}{
+% \l_@@_mat_diag_entries_seq,
+% \l_@@_mat_row_entries_seq,
+% }
+% We construct the matrices row by row, therefore we need to store the
+% currently constructed row inside a variable.
+% The same is true for the diagonal entries which also need to be stored
+% somewhere.
+% We therefore declare two sequence variables \cs{l_@@_mat_diag_entries_seq}
+% and \cs{l_@@_mat_row_seq} for this purpose
+% \begin{macrocode}
+\seq_clear_new:N \l_@@_mat_diag_entries_seq
+\seq_clear_new:N \l_@@_mat_row_entries_seq
+% \end{macrocode}
+% \end{variable}
+%
+% \subsubsection{(Anti-)diagonal matrices}
+% We split the construction of the matrix into multiple parts,
+% utilizing internal helper functions.
+% \begin{macro}{
+% \@@_constr_diagmat_row:n,
+% \@@_constr_antidiagmat_row:n
+% }
+% \cs{@@_constr_diagmat_row:n} and \cs{@@_constr_antidiagmat_row:n}
+% take one integer argument:
+% \begin{arguments}
+% \item The number of the current row.
+% \end{arguments}
+% They both construct a matrix row and place it inside the input stream.
+% They take the content of the (anti-)diagonal from the variable
+% \cs{l_@@_mat_diag_entries_seq}
+% and use the variable \cs{l_@@_mat_row_entries_seq}
+% to store the current row.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_constr_diagmat_row:n
+{
+ \seq_clear:N \l_@@_mat_row_entries_seq
+% \end{macrocode}
+% As all diagonal matrices \(M \in A^{m \times n}\), where \(A\) is a field,
+% are quadratic i.e.\ \(A^{m \times n} \equiv A^{n \times n}\) the length of the
+% diagonal sequence equals the number of rows and columns of the matrix.
+% We exploit this fact here.
+% \begin{macrocode}
+ \int_step_inline:nn {\seq_count:N \l_@@_mat_diag_entries_seq}
+ {
+ \int_compare:nTF { #1 == ##1 }
+ {
+ \seq_put_right:Nx \l_@@_mat_row_entries_seq
+ {
+ \seq_item:Nn \l_@@_mat_diag_entries_seq { #1 }
+ }
+ }{ % false branch
+ \seq_put_right:NV \l_@@_mat_row_entries_seq \l_@@_matrix_fill_tl
+ } % \int_compare:nTF { #1 == ##1 }
+ }
+ \seq_use:Nn \l_@@_mat_row_entries_seq { & } \\
+}
+
+% Anti-diagonal version
+\cs_new_protected:Nn \@@_constr_antidiagmat_row:n
+{
+ \seq_clear:N \l_@@_mat_row_entries_seq
+ \int_step_inline:nn {\seq_count:N \l_@@_mat_diag_entries_seq}
+ {
+ \int_compare:nTF { #1 == ##1 }
+ {
+ % as this is a anti diagonal matrix we put in the elements from the
+ % left so that the first entry is the right most entry
+ \seq_put_left:Nx \l_@@_mat_row_entries_seq
+ {
+ \seq_item:Nn \l_@@_mat_diag_entries_seq { #1 }
+ }
+ }{ % false branch
+ \seq_put_left:NV \l_@@_mat_row_entries_seq \l_@@_matrix_fill_tl
+ } % \int_compare:nTF { #1 == ##1 }
+ }
+ \seq_use:Nn \l_@@_mat_row_entries_seq { & } \\
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \moremath_diagonal_matrix:nn,
+% \moremath_antidiagonal_matrix:nn,
+% \moremath_diagonal_smallmatrix:nn,
+% \moremath_antidiagonal_smallmatrix:nn,
+% }
+% The \cs[no-index]{moremath_\meta{a or d}_matrix:nn} and
+% \cs[no-index]{moremath_\meta{a or d}_smallmatrix:nn} family of functions
+% produce a matrix based on \pkg{mathtools}~\autocite{mathtools}
+% \env{matrix*} environment.
+% The functions take two arguments.
+% \begin{arguments}
+% \item The delimiter specifier.
+%
+% This should be one of the prefixes of the \env{\meta{prefix}matrix*}
+% environments.
+%
+% \item The comma separated contents of the (anti-)diagonal.
+% \end{arguments}
+% These functions also use the values of the variables
+% \cs{l_@@_matrix_fill_tl} and \cs{l_@@_matrix_align_tl}.
+% And modifies the variable \cs{l_@@_mat_diag_entries_seq}.
+% \begin{macrocode}
+\cs_new_protected:Nn \moremath_diagonal_matrix:nn
+{
+ \seq_set_from_clist:Nn \l_@@_mat_diag_entries_seq { #2 }
+ \exp_args:NnNV \begin{#1 matrix*} [ \l_@@_matrix_align_tl ]
+ \int_step_function:nN { \seq_count:N \l_@@_mat_diag_entries_seq }
+ \@@_constr_diagmat_row:n
+ \end{#1 matrix*}
+}
+
+% Anti-diagonal matrix
+\cs_new_protected:Nn \moremath_antidiagonal_matrix:nn
+{
+ \seq_set_from_clist:Nn \l_@@_mat_diag_entries_seq { #2 }
+ \exp_args:NnNV \begin{ #1 matrix* } [ \l_@@_matrix_align_tl ]
+ \int_step_function:nN { \seq_count:N \l_@@_mat_diag_entries_seq }
+ \@@_constr_antidiagmat_row:n
+ \end{ #1 matrix* }
+}
+
+% Small versions
+\cs_new_protected:Nn \moremath_diagonal_smallmatrix:nn
+{
+ \moremath_diagonal_matrix:nn {#1 small} {#2}
+}
+
+\cs_new_protected:Nn \moremath_antidiagonal_smallmatrix:nn
+{
+ \moremath_antidiagonal_matrix:nn {#1 small} {#2}
+}
+% \end{macrocode}
+% \begin{macro}{
+% \moremath_diagonal_matrix:nV,
+% \moremath_diagonal_matrix:Vn,
+% \moremath_diagonal_matrix:VV,
+% \moremath_antidiagonal_matrix:nV,
+% \moremath_antidiagonal_matrix:Vn,
+% \moremath_antidiagonal_matrix:VV,
+% \moremath_diagonal_smallmatrix:nV,
+% \moremath_diagonal_smallmatrix:Vn,
+% \moremath_diagonal_smallmatrix:VV,
+% \moremath_antidiagonal_smallmatrix:nV,
+% \moremath_antidiagonal_smallmatrix:Vn,
+% \moremath_antidiagonal_smallmatrix:VV,
+% }
+% For convenience we also define some variants of the above functions.
+% \begin{macrocode}
+\cs_generate_variant:Nn \moremath_diagonal_matrix:nn { n V }
+\cs_generate_variant:Nn \moremath_diagonal_matrix:nn { V n }
+\cs_generate_variant:Nn \moremath_diagonal_matrix:nn { V V }
+\cs_generate_variant:Nn \moremath_antidiagonal_matrix:nn { n V }
+\cs_generate_variant:Nn \moremath_antidiagonal_matrix:nn { V n }
+\cs_generate_variant:Nn \moremath_antidiagonal_matrix:nn { V V }
+\cs_generate_variant:Nn \moremath_diagonal_smallmatrix:nn { n V }
+\cs_generate_variant:Nn \moremath_diagonal_smallmatrix:nn { V n }
+\cs_generate_variant:Nn \moremath_diagonal_smallmatrix:nn { V V }
+\cs_generate_variant:Nn \moremath_antidiagonal_smallmatrix:nn { n V }
+\cs_generate_variant:Nn \moremath_antidiagonal_smallmatrix:nn { V n }
+\cs_generate_variant:Nn \moremath_antidiagonal_smallmatrix:nn { V V }
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{Added variants.}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{Added "nV" and "VV" variants.}
+% \end{macro}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added functions producing (anti-)diagonal matrices.
+% Also added versions for inline math.
+% }
+% \end{macro}
+%
+%
+% \subsubsection{Identity Matrices}
+% As we already have functions available for producing diagonal matrices,
+% it makes only sense to also provide a shorthand for producing an identity matrix,
+% i.e.\ a diagonal matrix with \enquote{1} along the diagonal.
+%
+%
+% \begin{macro}{
+% \@@_generate_one_filled_clist:Nn
+% }
+% The function \cs{@@_generate_one_filled_clist:Nn} produces a \meta{clist},
+% consisting only of \enquote{1} as entries.
+% This function takes two arguments:
+% \begin{arguments}
+% \item The \emph{csname} of a \meta{clist~var} to store the \meta{clist}
+% into.
+%
+% \item An \meta{int} to represent the number of entries to produce.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \@@_generate_one_filled_clist:Nn
+{
+ \seq_clear:N \l_tmpa_seq
+ \int_step_inline:nn {#2}
+ {
+ \seq_put_right:NV \l_tmpa_seq \c_one_int
+ }
+ \clist_set_from_seq:NN #1 \l_tmpa_seq
+}
+% \end{macrocode}
+% \begin{macro}{
+% \@@_generate_one_filled_clist:NV
+% }
+% We also define a variant accepting an integer variable.
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_generate_one_filled_clist:Nn { N V }
+% \end{macrocode}
+% \end{macro}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added function.
+% }
+% \end{macro}
+%
+% \begin{variable}{
+% \l_@@_id_entries_clist
+% }
+% As we want to utilize the \cs{moremath_diagonal_matrix:VV} and
+% \cs{moremath_diagonal_smallmatrix:VV} functions for creating the identity
+% matrix we declare an internal \meta{clist~var} called
+% \cs{l_@@_id_entries_clist} for passing the \meta{clist} around.
+% \begin{macrocode}
+\clist_new:N \l_@@_id_entries_clist
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{Added variable.}
+% \end{variable}
+%
+% \begin{macro}{
+% \moremath_id_matrix:n,
+% \moremath_id_smallmatrix:n
+% }
+% These functions are intended to produce an identity matrix from an integer
+% expression.
+% They take one argument.
+% \begin{arguments}
+% \item The number of diagonal entries.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_id_matrix:n
+{
+ \clist_clear:N \l_@@_id_entries_clist
+ \@@_generate_one_filled_clist:Nn \l_@@_id_entries_clist {#1}
+ \moremath_diagonal_matrix:VV \l_@@_matrix_delim_tl \l_@@_id_entries_clist
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected_nopar:Nn \moremath_id_smallmatrix:n
+{
+ \clist_clear:N \l_@@_id_entries_clist
+ \@@_generate_one_filled_clist:Nn \l_@@_id_entries_clist {#1}
+ \moremath_diagonal_smallmatrix:VV \l_@@_matrix_delim_tl \l_@@_id_entries_clist
+}
+% \end{macrocode}
+%
+% \begin{macro}{
+% \moremath_id_matrix:V,
+% \moremath_id_smallmatrix:V
+% }
+% We also provide variants, which accepts a "V"-type argument:
+% \begin{macrocode}
+\cs_generate_variant:Nn \moremath_id_matrix:n { V }
+\cs_generate_variant:Nn \moremath_id_smallmatrix:n { V }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added functions \cs{moremath_id_matrix:n} and \cs{moremath_id_smallmatrix:n}
+% and variants.
+% }
+% \end{macro}
+%
+% \subsection{Document Level Commands}
+% \label{sec:mat-doc-lvl-cmds}
+%
+% Now we define document level commands for the previously defined
+% functions.
+%
+% But before we do so we define a message to be issued in case the targeted
+% \meta{csname} is already defined elsewhere.
+% \begin{macrocode}
+\msg_new:nnnn { moremath } { matrix / already-defined-doc-cmd-skip }
+{
+ Control~sequence~'#1'~is~already~defined.\\
+ Skipping~definition~\msg_line_context:.
+}
+{
+ The~control~sequence~'#1'~has~already\\
+ been~defined~by~some~other~package.\\
+ And~I~am~refusing~to~overwrite~the~existing~definition,\\
+ therefore~I~am~skipping~the~definition~of~this~command.
+}
+% \end{macrocode}
+%
+% \subsubsection{Row and Column Vectors}
+% We begin with the row and column vector functions.
+% As with the other document level commands, we guard the definitions
+% with a key value option, so that the user can disable them.
+% \begin{macrocode}
+\bool_if:nTF \l_@@_predef_crvector_bool
+{
+% \end{macrocode}
+% \begin{macro}{
+% \cvector,
+% \rvector,
+% \smallcvector,
+% \smallrvector
+% }
+% First we define the document level command for the bare column vector
+% \begin{macrocode}
+\cs_if_free:NTF \cvector
+{
+ \NewDocumentCommand \cvector { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_column_vector:nn {\l_@@_matrix_delim_tl} {#2}
+ \group_end:
+ }
+}{
+ % issue a warning message if the csname is already taken.
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ \cvector
+ }
+} % \cs_if_free:NTF \cvector
+% \end{macrocode}
+% and the row vector.
+% \begin{macrocode}
+\cs_if_free:NTF \rvector
+{
+ \NewDocumentCommand \rvector { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_row_vector:nn {\l_@@_matrix_delim_tl} {#2}
+ \group_end:
+ }
+}{
+ % warn if csname is already taken
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip}
+ {
+ \rvector
+ }
+} % \cs_if_free:NTF \rvector
+% \end{macrocode}
+% Then we define the smaller inline versions of those commands.
+% \begin{macrocode}
+\cs_if_free:NTF \smallcvector
+{
+ \NewDocumentCommand \smallcvector { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn {moremath / matrix} {#1}
+ }
+ \moremath_column_smallvector:nn {\l_@@_matrix_delim_tl} {#2}
+ \group_end:
+ }
+}{
+ % Issue a warning message if the csname is already taken
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ \smallcvector
+ }
+} % \cs_if_free:NTF \smallcvector
+
+\cs_if_free:NTF \smallrvector
+{
+ \NewDocumentCommand \smallrvector { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_row_smallvector:nn {\l_@@_matrix_delim_tl} {#2}
+ \group_end:
+ }
+}{
+ % warn if csname is taken
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ \smallrvector
+ }
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added commands producing row and column vectors,
+% including inline math versions.
+% }
+% \end{macro}
+%
+% \paragraph{Commands with Pre-defined Delimiters}
+% Next we define several shorthands to for the commonly used delimiters,
+% to avoid code duplication, we first create some helper functions which
+% define those functions.
+% \begin{macro}{
+% \@@_new_vector_shorth_doc_cmd:NNn
+% }
+% The function \cs{@@_new_vector_shorth_doc_cmd} creates a new vector shorthand,
+% command. It takes three arguments:
+% \begin{arguments}
+% \item The \meta{csname} to be defined.
+% \item The \meta{function} to use for this shorthand.
+%
+% This should be one of the
+% \cs[no-index]{moremath_\meta{type}_\meta{size}vector:nn}
+% like commands.
+%
+% \item The \meta{delimiter} to use.
+%
+% Usually one of |p|, |b|, |B|, |v|, |V|.
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_new_vector_shorth_doc_cmd:NNn
+{
+ \cs_if_free:NTF #1
+ {
+ \NewDocumentCommand #1 { o m }
+ {
+ \group_begin:
+ % set the delimiter key pre-set for this function
+ \keys_set:nn {moremath / matrix } {delimiter = #3}
+ \tl_if_novalue:nF {##1}
+ {
+ \keys_set:nn {moremath / matrix } {##1}
+ }
+ #2 {\l_@@_matrix_delim_tl} {##2}
+ \group_end:
+ }
+ }{
+ % warn if csname is taken
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ #1
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \pcvector,
+% \bcvector,
+% \Bcvector,
+% \vcvector,
+% \Vcvector,
+% \prvector,
+% \brvector,
+% \Brvector,
+% \vrvector,
+% \Vrvector,
+% }
+% Now we define shorthands for all of the matrix types so that the user
+% does not have to specify |delimiter=|\meta{delim} every time.
+% We begin with the column vector.
+% \begin{macrocode}
+% parenthesis
+\@@_new_vector_shorth_doc_cmd:NNn \pcvector \moremath_column_vector:nn {p}
+% brackets
+\@@_new_vector_shorth_doc_cmd:NNn \bcvector \moremath_column_vector:nn {b}
+% braces
+\@@_new_vector_shorth_doc_cmd:NNn \Bcvector \moremath_column_vector:nn {B}
+% single vert
+\@@_new_vector_shorth_doc_cmd:NNn \vcvector \moremath_column_vector:nn {v}
+% double vert
+\@@_new_vector_shorth_doc_cmd:NNn \Vcvector \moremath_column_vector:nn {V}
+% \end{macrocode}
+% Now to the row vectors.
+% \begin{macrocode}
+% parenthesis
+\@@_new_vector_shorth_doc_cmd:NNn \prvector \moremath_row_vector:nn {p}
+% brackets
+\@@_new_vector_shorth_doc_cmd:NNn \brvector \moremath_row_vector:nn {b}
+% braces
+\@@_new_vector_shorth_doc_cmd:NNn \Brvector \moremath_row_vector:nn {B}
+% single vert
+\@@_new_vector_shorth_doc_cmd:NNn \vrvector \moremath_row_vector:nn {v}
+% double vert
+\@@_new_vector_shorth_doc_cmd:NNn \Vrvector \moremath_row_vector:nn {V}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added commands for row and column vectors with predefined delimiters.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \psmallcvector,
+% \bsmallcvector,
+% \Bsmallcvector,
+% \vsmallcvector,
+% \Vsmallcvector,
+% \psmallrvector,
+% \bsmallrvector,
+% \Bsmallrvector,
+% \vsmallrvector,
+% \Vsmallrvector
+% }
+% We also define shorthands for the \cs{shortcvector} and \cs{shortrvector}
+% versions.
+% \begin{macrocode}
+% column vectors
+% parenthesis
+\@@_new_vector_shorth_doc_cmd:NNn \psmallcvector \moremath_column_smallvector:nn
+ {p}
+% brackets
+\@@_new_vector_shorth_doc_cmd:NNn \bsmallcvector \moremath_column_smallvector:nn
+ {b}
+% braces
+\@@_new_vector_shorth_doc_cmd:NNn \Bsmallcvector \moremath_column_smallvector:nn
+ {B}
+% single vert
+\@@_new_vector_shorth_doc_cmd:NNn \vsmallcvector \moremath_column_smallvector:nn
+ {v}
+% double vert
+\@@_new_vector_shorth_doc_cmd:NNn \Vsmallcvector \moremath_column_smallvector:nn
+ {V}
+%
+% row vectors
+% parenthesis
+\@@_new_vector_shorth_doc_cmd:NNn \psmallrvector \moremath_row_smallvector:nn {p}
+% brackets
+\@@_new_vector_shorth_doc_cmd:NNn \bsmallrvector \moremath_row_smallvector:nn {b}
+% braces
+\@@_new_vector_shorth_doc_cmd:NNn \Bsmallrvector \moremath_row_smallvector:nn {B}
+% single vert
+\@@_new_vector_shorth_doc_cmd:NNn \vsmallrvector \moremath_row_smallvector:nn {v}
+% double vert
+\@@_new_vector_shorth_doc_cmd:NNn \Vsmallrvector \moremath_row_smallvector:nn {V}
+
+
+}{ % \bool_if:nTF \l_@@_predef_crvector_bool FALSE PATH
+ \msg_info:nnnn {moremath} {load / disabling} {no-crvector}
+ {
+ commands~producing~row~and~column~vectors
+ }
+} % \bool_if:nTF \l_@@_predef_crvector_bool
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added commands for inline math row and column vectors
+% with predefined delimiters.
+% }
+% \end{macro}
+%
+%
+% \subsubsection{(Anti-)diagonal Matrices}
+% Now to the (anti-)diagonal matrix shorthands,
+% these are also guarded by a key value option.
+% \begin{macrocode}
+\bool_if:nTF \l_@@_predef_matrix_bool
+{
+% \end{macrocode}
+% \begin{macro}{
+% \diagmat,
+% \antidiagmat,
+% \smalldiagmat,
+% \smallantidiagmat,
+% }
+% \begin{NOTE}{MI}
+% Say something like we begin with some commands producing a matrix that
+% is not necessarily delimited.
+% \end{NOTE}
+% \begin{macrocode}
+\cs_if_free:NTF \diagmat
+{
+ \NewDocumentCommand \diagmat { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_diagonal_matrix:Vn \l_@@_matrix_delim_tl {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn {moremath} {matrix / already-defined-doc-cmd-skip}
+ {
+ \diagmat
+ }
+} % \cs_if_free:nTF \diagmat
+
+\cs_if_free:NTF \antidiagmat
+{
+ \NewDocumentCommand \antidiagmat { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_antidiagonal_matrix:Vn \l_@@_matrix_delim_tl {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ \antidiagmat
+ }
+} % \cs_if_free:nTF \antidiagmat
+
+\cs_if_free:NTF \smalldiagmat
+{
+ \NewDocumentCommand \smalldiagmat { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_diagonal_smallmatrix:Vn \l_@@_matrix_delim_tl {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ \smalldiagmat
+ }
+}
+
+\cs_if_free:NTF \smallantidiagmat
+{
+ \NewDocumentCommand \smallantidiagmat { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_antidiagonal_smallmatrix:Vn \l_@@_matrix_delim_tl {#2}
+ \group_end:
+ }
+}{
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ \smallantidiagmat
+ }
+}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added commands producing (anti-)diagonal matrices, including inline math
+% versions.
+% }
+% \end{macro}
+%
+% \paragraph{(Anti-)diagonal Matrices with Pre-defined Delimiters}
+% As it is sort of cumbersome to always specify the delimiter key,
+% we also provide commands with pre-defined delimiters.
+% \begin{macro}{
+% \@@_new_matrix_shorth_doc_cmd:NNn
+% }
+% To provide several shorthands for delimited matrices,
+% we use a helper function to avoid code duplication.
+% \cs{@@_new_matrix_shorth_doc_cmd:NNn} takes three arguments:
+% \begin{arguments}
+% \item The \meta{csname} to define
+% \item The \meta{csname} of the matrix function to use,
+% which should have the signature |Vn|.
+% \item The \enquote{predefined} delimiter of this version
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_new_matrix_shorth_doc_cmd:NNn
+{
+ \cs_if_free:NTF #1
+ {
+ \NewDocumentCommand #1 { o m }
+ {
+ \group_begin:
+ \tl_if_empty:nF {#3}
+ {
+ \keys_set:nn { moremath / matrix }
+ {
+ delimiter = #3
+ }
+ } % \tl_if_empty:nF {#3}
+ \tl_if_novalue:nF {##1}
+ {
+ \keys_set:nn { moremath / matrix } {##1}
+ }
+ #2 \l_@@_matrix_delim_tl {##2}
+ \group_end:
+ }
+ }{
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {
+ #1
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% We now define the shorthand commands with predefined delimiters.
+% \begin{macro}{
+% \pdiagmat,
+% \bdiagmat,
+% \Bdiagmat,
+% \vdiagmat,
+% \Vdiagmat,
+% }
+% We begin with the regular diagonal matrix
+% \begin{macrocode}
+\@@_new_matrix_shorth_doc_cmd:NNn \pdiagmat \moremath_diagonal_matrix:Vn {p}
+\@@_new_matrix_shorth_doc_cmd:NNn \bdiagmat \moremath_diagonal_matrix:Vn {b}
+\@@_new_matrix_shorth_doc_cmd:NNn \Bdiagmat \moremath_diagonal_matrix:Vn {B}
+\@@_new_matrix_shorth_doc_cmd:NNn \vdiagmat \moremath_diagonal_matrix:Vn {v}
+\@@_new_matrix_shorth_doc_cmd:NNn \Vdiagmat \moremath_diagonal_matrix:Vn {V}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added commands for delimited diagonal matrices.
+% }
+% \end{macro}
+% \begin{macro}{
+% \pantidiagmat,
+% \bantidiagmat,
+% \Bantidiagmat,
+% \vantidiagmat,
+% \Vantidiagmat,
+% }
+% Now for the anti-diagonal matrix commands.
+% \begin{macrocode}
+\@@_new_matrix_shorth_doc_cmd:NNn \pantidiagmat
+ \moremath_antidiagonal_matrix:Vn {p}
+\@@_new_matrix_shorth_doc_cmd:NNn \bantidiagmat
+ \moremath_antidiagonal_matrix:Vn {b}
+\@@_new_matrix_shorth_doc_cmd:NNn \Bantidiagmat
+ \moremath_antidiagonal_matrix:Vn {B}
+\@@_new_matrix_shorth_doc_cmd:NNn \vantidiagmat
+ \moremath_antidiagonal_matrix:Vn {v}
+\@@_new_matrix_shorth_doc_cmd:NNn \Vantidiagmat
+ \moremath_antidiagonal_matrix:Vn {V}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added commands for delimited antidiagonal matrices.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \psmalldiagmat,
+% \bsmalldiagmat,
+% \Bsmalldiagmat,
+% \vsmalldiagmat,
+% \Vsmalldiagmat,
+% }
+% We continue with the inline math versions based on the \env{smallmatrix*}
+% environment.
+% \begin{macrocode}
+\@@_new_matrix_shorth_doc_cmd:NNn \psmalldiagmat
+ \moremath_diagonal_smallmatrix:Vn {p}
+\@@_new_matrix_shorth_doc_cmd:NNn \bsmalldiagmat
+ \moremath_diagonal_smallmatrix:Vn {b}
+\@@_new_matrix_shorth_doc_cmd:NNn \Bsmalldiagmat
+ \moremath_diagonal_smallmatrix:Vn {B}
+\@@_new_matrix_shorth_doc_cmd:NNn \vsmalldiagmat
+ \moremath_diagonal_smallmatrix:Vn {v}
+\@@_new_matrix_shorth_doc_cmd:NNn \Vsmalldiagmat
+ \moremath_diagonal_smallmatrix:Vn {V}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added commands for delimited diagonal matrices suitable for inline math.
+% }
+% \end{macro}
+% \begin{macro}{
+% \psmallantidiagmat,
+% \bsmallantidiagmat,
+% \Bsmallantidiagmat,
+% \vsmallantidiagmat,
+% \Vsmallantidiagmat,
+% }
+% We provide also anti-diagonal versions of the small matrices.
+% \begin{macrocode}
+\@@_new_matrix_shorth_doc_cmd:NNn \psmallantidiagmat
+ \moremath_antidiagonal_smallmatrix:Vn {p}
+\@@_new_matrix_shorth_doc_cmd:NNn \bsmallantidiagmat
+ \moremath_antidiagonal_smallmatrix:Vn {b}
+\@@_new_matrix_shorth_doc_cmd:NNn \Bsmallantidiagmat
+ \moremath_antidiagonal_smallmatrix:Vn {B}
+\@@_new_matrix_shorth_doc_cmd:NNn \vsmallantidiagmat
+ \moremath_antidiagonal_smallmatrix:Vn {v}
+\@@_new_matrix_shorth_doc_cmd:NNn \Vsmallantidiagmat
+ \moremath_antidiagonal_smallmatrix:Vn {V}
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{
+% Added commands for delimited anti-diagonal matrices suitable for inline math.
+% }
+% \end{macro}
+%
+% \subsubsection{Identity Matrices}
+% We also provide document level commands for producing an identity matrix.
+% These commands are also guarded by the same variable as the other matrix commands
+% (\cs{l_@@_predef_matrix_bool}).
+%
+% \begin{macro}{
+% \idmat,
+% \smallidmat,
+% }
+% We provide two document level commands for producing the identiy matrix,
+% one for inline math mode and one for display math mode.
+%
+% We start with the display math mode version.
+% \begin{macrocode}
+\cs_if_free:NTF \idmat
+{
+ \NewDocumentCommand \idmat { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_id_matrix:n {#2}
+ \group_end:
+ }
+}{ % \cs_if_free:NTF \idmat FALSE BRANCH
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {\idmat}
+}
+% \end{macrocode}
+% Afterwards we continue with the inline math mode version.
+% \begin{macrocode}
+\cs_if_free:NTF \smallidmat
+{
+ \NewDocumentCommand \smallidmat { o m }
+ {
+ \group_begin:
+ \tl_if_novalue:nF {#1}
+ {
+ \keys_set:nn { moremath / matrix } {#1}
+ }
+ \moremath_id_smallmatrix:n {#2}
+ \group_end:
+ }
+}{ % \cs_if_free:NTF \smallidmat FALSE BRANCH
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {\smallidmat}
+}
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added \cs{idmat} and \cs{smallidmat} document level commands.
+% }
+% \end{macro}
+%
+% \paragraph{Identity Matrices with Pre-defined Delimiters}
+% We also define shorthands for the commonly used delimiters around matrices,
+% to avoid code duplication, we first declare a helper function for this.
+% \begin{macro}{
+% \@@_new_id_matrix_doc_cmd:NNn
+% }
+% This function creates a new document level command for an identity matrix like
+% command.
+% It allows pre-setting \meta{kv~opts}.
+% The function takes three arguments.
+% \begin{arguments}
+% \item The \meta{csname} of the document level command to define
+%
+% \item The \meta{csname} of the function to use
+%
+% This is indented to be one of \cs{moremath_id_matrix:n} or
+% \cs{moremath_id_smallmatrix:n}
+%
+% \item \meta{kv~opts} to preset in the "moremath / matrix" namespace
+% for this command
+%
+% This is meant to be used for pre-setting the key "delimiter".
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_new_id_matrix_doc_cmd:NNn
+{
+ \cs_if_free:NTF #1
+ {
+ \NewDocumentCommand #1 { o m }
+ {
+ \group_begin:
+ \tl_if_empty:nF {#3}
+ {
+ \keys_set:nn { moremath / matrix } {#3}
+ }
+ \tl_if_novalue:nF {##1}
+ {
+ \keys_set:nn { moremath / matrix } {##1}
+ }
+ #2 {##2}
+ \group_end:
+ }
+ }{ % \cs_if_free:NTF #1 FALSE BRANCH
+ \msg_warning:nnn { moremath } { matrix / already-defined-doc-cmd-skip }
+ {#1}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \pidmat,
+% \bidmat,
+% \Bidmat,
+% \vidmat,
+% \Vidmat
+% }
+% We begin with the display math versions,
+% starting with the version delimited by parenthesis,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \pidmat \moremath_id_matrix:n { delimiter = p }
+% \end{macrocode}
+% continue with the bracketed version,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \bidmat \moremath_id_matrix:n { delimiter = b }
+% \end{macrocode}
+% the version using braces,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \Bidmat \moremath_id_matrix:n { delimiter = B }
+% \end{macrocode}
+% single vertical lines,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \vidmat \moremath_id_matrix:n { delimiter = v }
+% \end{macrocode}
+% and finally double vertical lines.
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \Vidmat \moremath_id_matrix:n { delimiter = V }
+% \end{macrocode}
+%
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{
+% Added document level commands \cs{pidmat}, \cs{bidmat}, \cs{Bidmat},
+% \cs{vidmat}, and \cs{Vidmat}.
+% }
+% \end{macro}
+%
+% \begin{macro}{
+% \psmallidmat,
+% \bsmallidmat,
+% \Bsmallidmat,
+% \vsmallidmat,
+% \Vsmallidmat,
+% }
+% Now we also define shorthands for inline math mode.
+% We start again defining the version using parenthesis,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \psmallidmat \moremath_id_smallmatrix:n
+ { delimiter = p }
+% \end{macrocode}
+% then brackets,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \bsmallidmat \moremath_id_smallmatrix:n
+ { delimiter = b }
+% \end{macrocode}
+% then braces,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \Bsmallidmat \moremath_id_smallmatrix:n
+ { delimiter = B }
+% \end{macrocode}
+% followed by single vertical lines,
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \vsmallidmat \moremath_id_smallmatrix:n
+ { delimiter = v }
+% \end{macrocode}
+% and finally double vertical lines.
+% \begin{macrocode}
+\@@_new_id_matrix_doc_cmd:NNn \Vsmallidmat \moremath_id_smallmatrix:n
+ { delimiter = V }
+% \end{macrocode}
+% \changes{v0.2.0}{\GetVersionDate{v0.2.0}}{%
+% Added document level commands \cs{psmallidmat}, \cs{bsmallidmat},
+% \cs{Bsmallidmat}, \cs{vsmallidmat} and \cs{Vsmallidmat}.
+% }
+% \end{macro}
+%
+% \begin{macrocode}
+}{ % \bool_if:nTF \l_@@_predef_matrix_bool FALSE BRANCH
+ \msg_info:nnnn {moremath} { load / disabling } { no-matrix }
+ {
+ (anti-)diagonal~matrix~commands
+ }
+} % \bool_if:nTF \l_@@_predef_matrix_bool
+% \end{macrocode}
+%
+%
+% \section{Shorthand Macros for Absolute Value and Norm}
+% \label{sec:impl-abs-shorthands}
+%
+% We first declare another warning message to inform the user of the case that,
+% the \meta{csnames} are already taken.
+% \begin{macrocode}
+\msg_new:nnnn { moremath } { abs-shorth / csname-already-defined-skip }
+{
+ Control~sequence~'#1'~is~already~defined.\\
+ Skipping~declaration~of~paired~delimiter~\msg_line_context:.\\
+ Use~package~option~'no-abs-shorthands'~to~disable~the~paired\\
+ delimiter~shorthands.
+}{
+ The~control~sequence~'#1'~has~already~been\\
+ defined~by~something~else.\\
+ I~am~refusing~to~overwrite~its~existing~definition~and~instead~avoid\\
+ declaring~a~paired~delimiter.\\
+}
+% \end{macrocode}
+%
+%
+% As with the other parts these macros may be conditionally disabled.
+% \begin{macrocode}
+\bool_if:NTF \l_@@_predef_abs_bool
+{
+% \end{macrocode}
+% \begin{macro}{\abs,\norm}
+% These macros provide shorthands for \(\abs{\meta{content}}\)
+% and \(\norm{\meta{content}}\).
+% \begin{macrocode}
+\cs_if_free:NTF \abs
+{
+ \DeclarePairedDelimiter \abs {\lvert} {\rvert}
+}{
+ % warn if the csname is taken
+ \msg_warning:nnn { moremath } { abs-shorth / csname-already-defined-skip }
+ {\abs}
+} % \cs_if_free:NTF \abs
+
+\cs_if_free:NTF \norm
+{
+ \DeclarePairedDelimiter \norm {\lVert} {\rVert}
+}{
+ % warn if csname is already taken
+ \msg_warning:nnn { moremath } { abs-shorth / csname-already-defined-skip }
+ {\norm}
+} % \cs_if_free:NTF
+% \end{macrocode}
+% \changes{v0.1.0}{\GetVersionDate{v0.1.0}}{%
+% Added shorthands for absolute value and norm.
+% }
+% \end{macro}
+%
+% \begin{macrocode}
+}{
+ \msg_info:nnnn {moremath} {load / disabling} {no-abs-shorthands}
+ {
+ '\abs'~and~'\norm'~macros
+ }
+} % End of the conditional
+% \end{macrocode}
+%
+% \iffalse debug-switch
+%\debug_off:n {all}
+% \fi
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \end{implementation}
+%
+% \section*{Copyright and License}
+% \addcontentsline{toc}{section}{Copyright and License}
+% \label{sec:license}
+%
+% The following copyright notice applies to the \pkg{moremath} package:
+%
+% \begin{quote}
+% Copyright \textcopyright{} 2024 Marcel Ilg
+%
+% This work 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 version.
+% The latest version of this license is in
+% \url{https://www.latex-project.org/lppl.txt}
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status \enquote{maintained}.
+%
+% The Current Maintainer of this work is Marcel Ilg.
+%
+% This work consists of the files listed in \file{MANIFEST.md}.
+% \end{quote}
+%
+% \noindent The file \file{MANIFEST.md} has to be distributed together with the
+% package.
+%
+%
+% \printbibliography[heading=bibintoc]
+% \PrintChanges
+% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/moremath/moremath.ins b/Master/texmf-dist/source/latex/moremath/moremath.ins
new file mode 100644
index 00000000000..f04f2b04b20
--- /dev/null
+++ b/Master/texmf-dist/source/latex/moremath/moremath.ins
@@ -0,0 +1,66 @@
+%%
+%% Copyright (C) 2024 Marcel Ilg
+%%
+%% This work 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 version.
+%% The latest version of this license is in
+%%
+%% https://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status ‘maintained’.
+%%
+%% The Current Maintainer of this work is Marcel Ilg.
+%%
+%% This work consists of the files listed in MANIFEST.md.
+
+\input docstrip
+
+\usedir{tex/latex/moremath}
+
+\keepsilent
+
+\preamble
+
+This is a generated file.
+
+
+Copyright (C) 2024 Marcel Ilg
+
+This work 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 version.
+The latest version of this license is in
+
+ https://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status ‘maintained’.
+
+The Current Maintainer of this work is Marcel Ilg.
+
+This work consists of the files listed in MANIFEST.md.
+
+\endpreamble
+
+\generate{\file{moremath.sty}{\from{moremath.dtx}{package}}}
+
+\obeyspaces
+\Msg{***************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following file into a}
+\Msg{* directory searched by TeX:}
+\Msg{*}
+\Msg{* moremath.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file moremath.dtx through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{***************************************************************************}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx b/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
index 059c4b2ca6c..05251bd9cd5 100644
--- a/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
+++ b/Master/texmf-dist/source/latex/nicematrix/nicematrix-code.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% This file should be compiled with $xelatex$.
+% This file should be compiled with $lualatex$.
%
% Copyright (C) 2018-2024 by F. Pantigny
% ------------------------------------------
@@ -17,8 +17,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{6.28}
-\def\myfiledate{2024/05/29}
+\def\myfileversion{6.28b}
+\def\myfiledate{2024/06/29}
%
%
%<*batchfile>
@@ -155,9 +155,11 @@ version 2005/12/01 or later.
% In the version 2.6a of \pkg{array}, important modifications have been done for
% the Tagging Project.
% \begin{macrocode}
-\bool_const:Nn \c_@@_tagging_array_bool { \cs_if_exist_p:N \ar@ialign }
+\bool_const:Nn \c_@@_tagging_array_bool
+ { \IfPackageAtLeastTF { array } { 2024/05/01 } \c_true_bool \c_false_bool }
\bool_const:Nn \c_@@_testphase_table_bool
- { \IfPackageLoadedTF { latex-lab-testphase-table } \c_true_bool \c_false_bool }
+ { \IfPackageLoadedTF { latex-lab-testphase-table } \c_true_bool \c_false_bool
+ }
% \end{macrocode}
%
%
@@ -287,19 +289,27 @@ version 2005/12/01 or later.
%
% \bigskip
% \begin{macrocode}
-\cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+\bool_if:NTF \c_@@_tagging_array_bool
{
- \peek_meaning:NF \unskip { \@@_error:n { Internal~error } }
- #1
+ \cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \textonly@unskip { \@@_error:n { Internal~error } }
+ #1
+ }
+ }
+ {
+ \cs_new_protected:Npn \@@_security_test_i:w \ignorespaces #1
+ {
+ \peek_meaning:NF \unskip { \@@_error:n { Internal~error } }
+ #1
+ }
}
% \end{macrocode}
%
% \bigskip
% Here, the box |\l_tmpa_box| will be used as sandbox to take our security test.
-% This code has been modified in version 6.18 (see question 682891 on TeX
-% StackExchange).
% \begin{macrocode}
-\hook_gput_code:nnn { begindocument / after } { . }
+\hook_gput_code:nnn { begindocument / end } { . }
{
\IfPackageLoadedTF { mdwtab }
{ \@@_fatal:n { mdwtab~loaded } }
@@ -385,6 +395,7 @@ version 2005/12/01 or later.
\tl_const:Nn \c_@@_dot_tl { . }
\tl_const:Nn \c_@@_default_tl { default }
\tl_const:Nn \c_@@_star_tl { * }
+\str_const:Nn \c_@@_star_str { * }
\str_const:Nn \c_@@_r_str { r }
\str_const:Nn \c_@@_c_str { c }
\str_const:Nn \c_@@_l_str { l }
@@ -1489,10 +1500,11 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% For the vertical position, the possible values are |c|, |t| and |b|.
+% For the vertical position, the possible values are |c|, |t|, |b|, |T| and |B|
+% (but |\l_@@_vpos_block_str| will remain empty if the user doesn't use a key
+% for the vertical position).
% \begin{macrocode}
\str_new:N \l_@@_vpos_block_str
-\str_set:Nn \l_@@_vpos_block_str { c }
% \end{macrocode}
%
%
@@ -1765,6 +1777,14 @@ version 2005/12/01 or later.
\newcounter { tabularnote }
% \end{macrocode}
%
+% We want to avoid error messages for duplicate labels when the package
+% \pkg{hyperref} is used. That's why we will count all the tabular notes of the
+% whole document with |\g_@@_tabularnote_int|.
+% \begin{macrocode}
+\int_new:N \g_@@_tabularnote_int
+\cs_set:Npn \theHtabularnote { \int_use:N \g_@@_tabularnote_int }
+% \end{macrocode}
+%
% \begin{macrocode}
\seq_new:N \g_@@_notes_seq
\seq_new:N \g_@@_notes_in_caption_seq
@@ -1990,7 +2010,12 @@ version 2005/12/01 or later.
% \begin{macrocode}
\int_gdecr:N \c@tabularnote
\int_set_eq:NN \l_tmpa_int \c@tabularnote
- \refstepcounter { tabularnote }
+% \end{macrocode}
+% The following line is only to avoid error messages for multipy defined labels
+% when the package \pkg{hyperref} is used.
+% \begin{macrocode}
+ \int_gincr:N \g_@@_tabularnote_int
+ \refstepcounter { tabularnote }
\int_compare:nNnT \l_tmpa_int = \c@tabularnote
{ \int_gincr:N \c@tabularnote }
\seq_clear:N \l_@@_notes_labels_seq
@@ -2504,6 +2529,7 @@ version 2005/12/01 or later.
{
ampersand-in-blocks .bool_set:N = \l_@@_amp_in_blocks_bool ,
ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
no-cell-nodes .code:n =
\cs_set_protected:Npn \@@_node_for_cell:
{ \box_use_drop:N \l_@@_cell_box } ,
@@ -5416,22 +5442,12 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-%
% \begin{macrocode}
\str_new:N \c_@@_ignorespaces_str
\str_set:Nx \c_@@_ignorespaces_str { \ignorespaces }
\str_remove_all:Nn \c_@@_ignorespaces_str { ~ }
-% \end{macrocode}
-%
-% \bigskip
-% In order to test whether a cell is empty, we test whether it begins by
-% |\ignorespaces\unskip|. However, in some circunstancies, for example when
-% |\collectcell| of \pkg{collcell} is used, the cell does not begin with
-% |\ignorespaces|. In that case, we consider as not empty...
-%
-% First, we test if the next token is |\ignorespaces| and it's not very easy...
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_test_if_empty: { \peek_after:Nw \@@_test_if_empty_i: }
+\cs_new_protected:Npn \@@_test_if_empty:
+ { \peek_after:Nw \@@_test_if_empty_i: }
\cs_new_protected:Npn \@@_test_if_empty_i:
{
\str_set:Nx \l_tmpa_str { \token_to_meaning:N \l_peek_token }
@@ -5439,17 +5455,40 @@ version 2005/12/01 or later.
{ \@@_test_if_empty:w }
}
\cs_new_protected:Npn \@@_test_if_empty:w \ignorespaces
- {
- \peek_meaning:NT \unskip
- {
- \tl_gput_right:Nn \g_@@_cell_after_hook_tl
- {
- \box_set_wd:Nn \l_@@_cell_box \c_zero_dim
- \skip_horizontal:N \l_@@_col_width_dim
- }
+ { \peek_after:Nw \@@_test_if_empty_ii: }
+% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_nullify_cell:
+ {
+ \tl_gput_right:Nn \g_@@_cell_after_hook_tl
+ {
+ \box_set_wd:Nn \l_@@_cell_box \c_zero_dim
+ \skip_horizontal:N \l_@@_col_width_dim
}
}
% \end{macrocode}
+%
+% \bigskip
+% \begin{macrocode}
+\bool_if:NTF \c_@@_tagging_array_bool
+ {
+ \cs_new_protected:Npn \@@_test_if_empty_ii:
+ { \peek_meaning:NT \textonly@unskip \@@_nullify_cell: }
+ }
+% \end{macrocode}
+% In the old version of \pkg{array}, we test whether it begins by
+% |\ignorespaces\unskip|. However, in some circunstancies, for example when
+% |\collectcell| of \pkg{collcell} is used, the cell does not begin with
+% |\ignorespaces|. In that case, we consider as not empty...
+% First, we test if the next token is |\ignorespaces| and it's not very easy...
+% \begin{macrocode}
+ {
+ \cs_new_protected:Npn \@@_test_if_empty_ii:
+ { \peek_meaning:NT \unskip \@@_nullify_cell: }
+ }
+% \end{macrocode}
%
%
% \begin{macrocode}
@@ -6769,7 +6808,7 @@ version 2005/12/01 or later.
}
}
{
- \@@_create_col_nodes:
+ \@@_create_col_nodes:
\endarray
}
% \end{macrocode}
@@ -6817,7 +6856,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
{
\@@_create_col_nodes:
- \endarray
+ \endarray
}
% \end{macrocode}
%
@@ -7193,7 +7232,7 @@ version 2005/12/01 or later.
\endpgfpicture
}
}
- % \cr
+ % \cr
}
% \end{macrocode}
%
@@ -12984,6 +13023,9 @@ version 2005/12/01 or later.
b .value_forbidden:n = true ,
B .code:n = \str_set:Nn \l_@@_vpos_block_str B ,
B .value_forbidden:n = true ,
+ m .code:n = \str_set:Nn \l_@@_vpos_block_str c ,
+ m .value_forbidden:n = true ,
+ v-center .meta:n = m ,
p .code:n = \bool_set_true:N \l_@@_p_block_bool ,
p .value_forbidden:n = true ,
color .code:n =
@@ -13071,12 +13113,12 @@ version 2005/12/01 or later.
% \begin{macrocode}
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #1 } }
- { \str_if_eq_p:nn { #1 } { * } }
+ { \str_if_eq_p:Vn \c_@@_star_str { #1 } }
{ \int_set:Nn \l_tmpa_int { 100 } }
{ \int_set:Nn \l_tmpa_int { #1 } }
\bool_lazy_or:nnTF
{ \tl_if_blank_p:n { #2 } }
- { \str_if_eq_p:nn { #2 } { * } }
+ { \str_if_eq_p:Vn \c_@@_star_str { #2 } }
{ \int_set:Nn \l_tmpb_int { 100 } }
{ \int_set:Nn \l_tmpb_int { #2 } }
% \end{macrocode}
@@ -13124,20 +13166,10 @@ version 2005/12/01 or later.
\bool_set_false:N \l_tmpa_bool
\bool_if:NT \l_@@_amp_in_blocks_bool
{ \tl_if_in:nnT { #5 } { & } { \bool_set_true:N \l_tmpa_bool } }
- \bool_if:NTF \l_tmpa_bool
- { \exp_args:Nee \@@_Block_vii:nnnnn }
- {
- \bool_if:NTF \l_@@_p_block_bool
- { \exp_args:Nee \@@_Block_vi:nnnnn }
- {
- \bool_if:nTF
- {
- (
- \int_compare_p:nNn \l_tmpa_int = \c_one_int
- ||
- \int_compare_p:nNn \l_tmpb_int = \c_one_int
- )
- && ! \tl_if_empty_p:n { #5 }
+ \bool_case:nF
+ {
+ \l_tmpa_bool { \exp_args:Nee \@@_Block_vii:nnnnn }
+ \l_@@_p_block_bool { \exp_args:Nee \@@_Block_vi:nnnnn }
% \end{macrocode}
% For the blocks mono-column, we will compose right now in a box in order to
% compute its width and take that width into account for the width of the
@@ -13147,12 +13179,14 @@ version 2005/12/01 or later.
% column, it's imperative. Otherwise, the process for the determination of the
% widths of the columns will be wrong.
% \begin{macrocode}
- && ! \l_@@_X_bool
- }
- { \exp_args:Nee \@@_Block_iv:nnnnn }
- { \exp_args:Nee \@@_Block_v:nnnnn }
- }
- }
+ \l_@@_X_bool { \exp_args:Nee \@@_Block_v:nnnnn }
+ { \tl_if_empty_p:n { #5 } } { \exp_args:Nee \@@_Block_v:nnnnn }
+ { \int_compare_p:nNn \l_tmpa_int = \c_one_int }
+ { \exp_args:Nee \@@_Block_iv:nnnnn }
+ { \int_compare_p:nNn \l_tmpb_int = \c_one_int }
+ { \exp_args:Nee \@@_Block_iv:nnnnn }
+ }
+ { \exp_args:Nee \@@_Block_v:nnnnn }
{ \l_tmpa_int } { \l_tmpb_int } { #3 } { #4 } { #5 }
}
% \end{macrocode}
@@ -13265,7 +13299,7 @@ version 2005/12/01 or later.
{ ! \g_@@_rotate_bool }
}
% \end{macrocode}
-% When the block is mono-column in a column with a fixed width (eg |p{3cm}|), we
+% When the block is mono-column in a column with a fixed width (e.g. |p{3cm}|), we
% use a |{minipage}|.
% \begin{macrocode}
{
@@ -13339,9 +13373,16 @@ version 2005/12/01 or later.
}
% \end{macrocode}
% If we are in a mono-row block we take into account the height and the depth of
-% that block for the height and the depth of the row.
+% that block for the height and the depth of the row, excepted when the block
+% uses explicitely an option of vertical position.
% \begin{macrocode}
- \int_compare:nNnT { #1 } = \c_one_int
+ \bool_lazy_and:nnT
+ { \int_compare_p:nNn { #1 } = \c_one_int }
+% \end{macrocode}
+% If the user has not used a key for the vertical position of the block, then
+% |\l_@@_vpos_block_str| remains empty.
+% \begin{macrocode}
+ { \str_if_empty_p:N \l_@@_vpos_block_str }
{
\dim_gset:Nn \g_@@_blocks_ht_dim
{
@@ -13384,7 +13425,6 @@ version 2005/12/01 or later.
{ m }
{ \int_compare:nNnT \c@iRow = \l_@@_last_row_int T }
}
-
}
{
\box_use_drop:c
@@ -13576,6 +13616,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block / SecondPass }
{
+ ampersand-in-blocks .bool_set:N = \l_@@_amp_in_blocks_bool ,
+ ampersand-in-blocks .default:n = true ,
+ &-in-blocks .meta:n = ampersand-in-blocks ,
tikz .code:n =
\IfPackageLoadedTF { tikz }
{ \seq_put_right:Nn \l_@@_tikz_seq { { #1 } } }
@@ -13707,10 +13750,22 @@ version 2005/12/01 or later.
{
\int_compare:nNnTF \l_@@_last_row_int > \g_@@_row_total_int
{ \msg_error:nnnn { nicematrix } { Block~too~large~1 } { #1 } { #2 } }
- { \@@_Block_v:nnnnnn { #1 } { #2 } { #3 } { #4 } { #5 } { #6 } }
+ {
+ \@@_Block_v:nnVVnn
+ { #1 }
+ { #2 }
+ \l_@@_last_row_int
+ \l_@@_last_col_int
+ { #5 }
+ { #6 }
+ }
}
}
% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \@@_Block_v:nnnnnn { n n V V n n }
+% \end{macrocode}
%
%
% \medskip
@@ -14172,13 +14227,15 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% Now, we will put the label of the block.
+% Now, we will put the label of the block. We recall that |\l_@@_vpos_block_str|
+% is empty when the user has not used a key for the vertical position of the block.
% \begin{macrocode}
\pgfpicture
\pgfrememberpicturepositiononpagetrue
\pgf@relevantforpicturesizefalse
\bool_lazy_any:nTF
{
+ { \str_if_empty_p:N \l_@@_vpos_block_str } % added 2024/06/29
{ \str_if_eq_p:on \l_@@_vpos_block_str { c } }
{ \str_if_eq_p:on \l_@@_vpos_block_str { T } }
{ \str_if_eq_p:on \l_@@_vpos_block_str { B } }
@@ -14206,6 +14263,19 @@ version 2005/12/01 or later.
{
\str_case:on \l_@@_vpos_block_str
{
+% \end{macrocode}
+% We recall that |\l_@@_vpos_block_str| is empty when the user has not used a key
+% for the vertical position of the block.
+% \begin{macrocode}
+ { } { % added 2024-06-29
+ \str_case:on \l_@@_hpos_block_str
+ {
+ c { center }
+ l { west }
+ r { east }
+ j { center }
+ }
+ }
c {
\str_case:on \l_@@_hpos_block_str
{
@@ -15656,6 +15726,7 @@ version 2005/12/01 or later.
{
\nullfont
\c_math_toggle_token
+ \colorlet { current-color } { . }
\@@_color:o \l_@@_delimiters_color_tl
\left .
\vcenter
@@ -15667,7 +15738,7 @@ version 2005/12/01 or later.
}
\right #1
\tl_if_empty:nF { #3 } { _ { \smash { #3 } } }
- ^ { \smash { #4 } }
+ ^ { \color { current-color } \smash { #4 } }
\c_math_toggle_token
}
{ #2 }
@@ -15705,9 +15776,12 @@ version 2005/12/01 or later.
{
left-shorten .bool_set:N = \l_@@_brace_left_shorten_bool ,
left-shorten .default:n = true ,
+ left-shorten .value_forbidden:n = true ,
right-shorten .bool_set:N = \l_@@_brace_right_shorten_bool ,
- shorten .meta:n = { left-shorten , right-shorten } ,
right-shorten .default:n = true ,
+ right-shorten .value_forbidden:n = true ,
+ shorten .meta:n = { left-shorten , right-shorten } ,
+ shorten .value_forbidden:n = true ,
yshift .dim_set:N = \l_@@_brace_yshift_dim ,
yshift .value_required:n = true ,
yshift .initial:n = \c_zero_dim ,
@@ -16438,7 +16512,7 @@ version 2005/12/01 or later.
~you~try~to~use~more~columns~than~allowed~by~your~
\@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~
\int_use:N \g_@@_static_num_of_col_int\
- ~(plus~the~potential~exterior~ones).
+ ~(plus~the~potential~exterior~ones).~
This~error~is~fatal.
}
% \end{macrocode}
@@ -17211,9 +17285,10 @@ version 2005/12/01 or later.
\c_@@_available_keys_str
}
{
- The~available~keys~are~(in~alphabetic~order):~b,~B,~borders,~c,~draw,~fill,~
- hlines,~hvlines,~l,~line-width,~name,~opacity,~rounded-corners,~r,~
- respect-arraystretch,~t,~T,~tikz,~transparent~and~vlines.
+ The~available~keys~are~(in~alphabetic~order):~&-in-blocks,~ampersand-in-blocks,~
+ b,~B,~borders,~c,~draw,~fill,~hlines,~hvlines,~l,~line-width,~name,~
+ opacity,~rounded-corners,~r,~respect-arraystretch,~t,~T,~tikz,~transparent~
+ and~vlines.
}
% \end{macrocode}
%
@@ -17347,7 +17422,9 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
allow-duplicate-names,~
+ ampersand-in-blocks,~
caption-above,~
cell-space-bottom-limit,~
cell-space-limits,~
@@ -17405,6 +17482,8 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -17469,6 +17548,8 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
@@ -17532,6 +17613,8 @@ version 2005/12/01 or later.
}
{
The~available~keys~are~(in~alphabetic~order):~
+ &-in-blocks,~
+ ampersand-in-blocks,~
b,~
baseline,~
c,~
diff --git a/Master/texmf-dist/source/latex/oberdiek/aliascnt.dtx b/Master/texmf-dist/source/latex/oberdiek/aliascnt.dtx
index 47bfec1ee27..7010eb64e13 100644
--- a/Master/texmf-dist/source/latex/oberdiek/aliascnt.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/aliascnt.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex aliascnt.dtx
% makeindex -s gind.ist aliascnt.idx
% pdflatex aliascnt.dtx
@@ -308,7 +308,7 @@ and the derived files
% Therefore we must ensure that manipulations to the clear list
% are done with the clear list macro of a real counter.
% \begin{macro}{\AC@findrootcnt}
-% \cs{AC@findrootcnt} walks throught the aliasing relations
+% \cs{AC@findrootcnt} walks through the aliasing relations
% to find the base counter.
% \begin{macrocode}
\newcommand*{\AC@findrootcnt}[1]{%
diff --git a/Master/texmf-dist/source/latex/oberdiek/bmpsize.dtx b/Master/texmf-dist/source/latex/oberdiek/bmpsize.dtx
index 0eec647c99c..bdcf6004d06 100644
--- a/Master/texmf-dist/source/latex/oberdiek/bmpsize.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/bmpsize.dtx
@@ -54,7 +54,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex bmpsize.dtx
% makeindex -s gind.ist bmpsize.idx
% pdflatex bmpsize.dtx
@@ -339,7 +339,7 @@ and the derived files
%
% A parser sets the switch \cs{ifbmpsize@ok} to true, if it
% could successfully parse the image file.
-% The width and height are returnd in \cs{bmpsize@width} and
+% The width and height are returned in \cs{bmpsize@width} and
% \cs{bmpsize@height}. If information about density is available,
% it is used to calculate width and height of the image, otherwise
% the values given by option \xoption{defaultresolution} is used.
diff --git a/Master/texmf-dist/source/latex/oberdiek/centernot.dtx b/Master/texmf-dist/source/latex/oberdiek/centernot.dtx
index dd990a33197..aa2cff5f0d8 100644
--- a/Master/texmf-dist/source/latex/oberdiek/centernot.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/centernot.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex centernot.dtx
% makeindex -s gind.ist centernot.idx
% pdflatex centernot.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/chemarr.dtx b/Master/texmf-dist/source/latex/oberdiek/chemarr.dtx
index 78e1a3cbebb..24989ed9db3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/chemarr.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/chemarr.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex chemarr.dtx
% makeindex -s gind.ist chemarr.idx
% pdflatex chemarr.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/classlist.dtx b/Master/texmf-dist/source/latex/oberdiek/classlist.dtx
index 8b454645215..370fc269d01 100644
--- a/Master/texmf-dist/source/latex/oberdiek/classlist.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/classlist.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex classlist.dtx
% makeindex -s gind.ist classlist.idx
% pdflatex classlist.dtx
@@ -233,7 +233,7 @@ and the derived files
% configured by
% \item[\cs{PrintClassListTitle}] for the title and
% \item[\cs{PrintClassListEntry}] for formatting the entries.
-% See the implemenation how to use these.
+% See the implementation for how to use these.
% \end{description}
%
% \StopEventually{
diff --git a/Master/texmf-dist/source/latex/oberdiek/colonequals.dtx b/Master/texmf-dist/source/latex/oberdiek/colonequals.dtx
index aeae542c39f..007a42cbe5f 100644
--- a/Master/texmf-dist/source/latex/oberdiek/colonequals.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/colonequals.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex colonequals.dtx
% makeindex -s gind.ist colonequals.idx
% pdflatex colonequals.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/dvipscol.dtx b/Master/texmf-dist/source/latex/oberdiek/dvipscol.dtx
index 0141ae2a947..335196bf918 100644
--- a/Master/texmf-dist/source/latex/oberdiek/dvipscol.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/dvipscol.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex dvipscol.dtx
% makeindex -s gind.ist dvipscol.idx
% pdflatex dvipscol.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/engord.dtx b/Master/texmf-dist/source/latex/oberdiek/engord.dtx
index 6c759532002..a0ba888a1a0 100644
--- a/Master/texmf-dist/source/latex/oberdiek/engord.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/engord.dtx
@@ -55,7 +55,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex engord.dtx
% makeindex -s gind.ist engord.idx
% pdflatex engord.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/enparen.dtx b/Master/texmf-dist/source/latex/oberdiek/enparen.dtx
index 773ebc861c9..af503d79dc4 100644
--- a/Master/texmf-dist/source/latex/oberdiek/enparen.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/enparen.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex enparen.dtx
% makeindex -s gind.ist enparen.idx
% pdflatex enparen.dtx
@@ -335,12 +335,12 @@ and the derived files
% \subsection{Notes}
%
% \begin{description}
-% \item[Implicite kerning:]
-% Unexpandable stuff might affect the implicite kerning.
+% \item[Implicit kerning:]
+% Unexpandable stuff might affect the implicit kerning.
% The package cannot avoid this, because it need to define
-% and redefine macros at the occurence of each symbol.
+% and redefine macros at the occurrence of each symbol.
% This is done before the opening and after the closing
-% symbol, thus that the implicite kerning inside
+% symbol, thus that the implicit kerning inside
% is not affected.
% \end{description}
%
diff --git a/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx b/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx
index d27e99d34ec..87f0aceaa45 100644
--- a/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/eolgrab.dtx
@@ -58,7 +58,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex eolgrab.dtx
% makeindex -s gind.ist eolgrab.idx
% pdflatex eolgrab.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/fibnum.dtx b/Master/texmf-dist/source/latex/oberdiek/fibnum.dtx
index 9c3f8f79868..de66a377109 100644
--- a/Master/texmf-dist/source/latex/oberdiek/fibnum.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/fibnum.dtx
@@ -56,7 +56,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex fibnum.dtx
% bibtex fibnum.aux
% makeindex -s gind.ist fibnum.idx
diff --git a/Master/texmf-dist/source/latex/oberdiek/flags.dtx b/Master/texmf-dist/source/latex/oberdiek/flags.dtx
index 6a2d05c7b44..8834113617e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/flags.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/flags.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex flags.dtx
% makeindex -s gind.ist flags.idx
% pdflatex flags.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
index 9ac40aa5ae9..b9ba295cfa6 100644
--- a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex holtxdoc.dtx
% makeindex -s gind.ist holtxdoc.idx
% pdflatex holtxdoc.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx
index dd26b08d2b5..2b5781775c5 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hypbmsec.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex hypbmsec.dtx
% makeindex -s gind.ist hypbmsec.idx
% pdflatex hypbmsec.dtx
@@ -260,7 +260,7 @@ and the derived files
% \begin{itemize}
% \item An additional second optional argument in square brackets.
% \item An additional optional argument in parentheses (in
-% assoziation with a pdf string that is internally surrounded
+% association with a pdf string that is internally surrounded
% by parentheses, too).
% \end{itemize}
% Because \Package{\filename} stores the original meaning of the
@@ -375,7 +375,7 @@ and the derived files
[2016/05/16 v2.5 Bookmarks in sectioning commands (HO)]
% \end{macrocode}
%
-% Because of redifining the sectioning commands, it is dangerous
+% Because of redefining the sectioning commands, it is dangerous
% to reload the package several times.
% \begin{macrocode}
\@ifundefined{hbs@do}{}{%
@@ -554,7 +554,7 @@ and the derived files
% \end{macrocode}
%
% Other packages are allowed to redefine the sectioning commands,
-% if they does not change the syntax. Therefore the redefinitons
+% if they does not change the syntax. Therefore the redefinitions
% of this package should be done after the other packages.
% \begin{macrocode}
\let\hbs@part \part
diff --git a/Master/texmf-dist/source/latex/oberdiek/hypgotoe.dtx b/Master/texmf-dist/source/latex/oberdiek/hypgotoe.dtx
index 3f6af63a3ee..7a4c55e4511 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hypgotoe.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hypgotoe.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex hypgotoe.dtx
% makeindex -s gind.ist hypgotoe.idx
% pdflatex hypgotoe.dtx
@@ -195,7 +195,7 @@ and the derived files
% \item
% Currently only embedded files and named destinations are supported.
% \item
-% Missing are support for destination arrays and attachted files.
+% Missing are support for destination arrays and attached files.
% \item
% Special characters aren't supported either.
% \end{itemize}
diff --git a/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx b/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx
index e0fd44bf126..996257b0d43 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hyphsubst.dtx
@@ -56,7 +56,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex hyphsubst.dtx
% makeindex -s gind.ist hyphsubst.idx
% pdflatex hyphsubst.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/ifdraft.dtx b/Master/texmf-dist/source/latex/oberdiek/ifdraft.dtx
index 0b4918a6d07..7b695054496 100644
--- a/Master/texmf-dist/source/latex/oberdiek/ifdraft.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/ifdraft.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex ifdraft.dtx
% makeindex -s gind.ist ifdraft.idx
% pdflatex ifdraft.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/iflang.dtx b/Master/texmf-dist/source/latex/oberdiek/iflang.dtx
index fa784b7d453..9eebbd0a8cc 100644
--- a/Master/texmf-dist/source/latex/oberdiek/iflang.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/iflang.dtx
@@ -57,7 +57,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex iflang.dtx
% makeindex -s gind.ist iflang.idx
% pdflatex iflang.dtx
@@ -200,7 +200,7 @@ and the derived files
% Package \xpackage{babel} defines \cs{iflanguagename}. As first
% argument it takes a language name and executes the second or
% third argument depending on the current language. This
-% language test is based on hypenation patterns. However, it
+% language test is based on hyphenation patterns. However, it
% is possible that different languages or dialects share the
% same patterns. In such cases \cs{iflanguagename} fails.
%
@@ -211,7 +211,7 @@ and the derived files
%
% \begin{declcs}{IfLanguageName} \M{lang} \M{then} \M{else}
% \end{declcs}
-% Makro \cs{IfLanguageName} compares language \meta{lang} with
+% Macro \cs{IfLanguageName} compares language \meta{lang} with
% the current setting of macro \cs{languagename}. If both
% contains the same name then the \meta{then} part is called,
% otherwise the \meta{else} part.
@@ -562,7 +562,7 @@ and the derived files
% at the conference Bacho\TeX~2005:
% \url{http://www.gust.org.pl/projects/pearls/2005p/david-kastrup/bachotex2005-david-kastrup-pearl1.pdf}
%
-% The orignal code allows macros inside the second string.
+% The original code allows macros inside the second string.
% Because also \cs{languagename} might consists of further
% macros, we need a variant that allows macros in the first
% string, too.
diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
index dc59a6e0247..099d1f538d0 100644
--- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
+++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
@@ -3,7 +3,7 @@
%
% Copyright (C)
% 1999, 2001, 2006 Heiko Oberdiek
-% 2016-2020 Oberdiek Package Support Group
+% 2016-2024 Oberdiek Package Support Group
% https://github.com/ho-tex/oberdiek/issues
%
% This work may be distributed and/or modified under the
@@ -40,7 +40,6 @@
\batchinput{flags.dtx}
\batchinput{holtxdoc.dtx}
\batchinput{hypbmsec.dtx}
-\batchinput{hypcap.dtx}
\batchinput{hypgotoe.dtx}
\batchinput{hyphsubst.dtx}
\batchinput{ifdraft.dtx}
@@ -58,7 +57,6 @@
\batchinput{stampinclude.dtx}
\batchinput{tabularht.dtx}
\batchinput{tabularkv.dtx}
-\batchinput{telprint.dtx}
\batchinput{thepdfnumber.dtx}
\batchinput{twoopt.dtx}
diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
index 3849551d71c..0759250c248 100644
--- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
+++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
@@ -11,11 +11,11 @@
\newcommand*{\Author}{Heiko Oberdiek}
\newcommand*{\Email}{ho-tex at tug.org}
-\newcommand*{\Date}{2023/01/10}
+\newcommand*{\Date}{2024/07/26}
% Copyright (C) 2006-2016 by
% Heiko Oberdiek
-% Copyright (C) 2016-2023 by
+% Copyright (C) 2016-2024 by
% Oberdiek Package Support Group
%
% This work may be distributed and/or modified under the
@@ -203,8 +203,6 @@
[\entrysep]
\entry{hypbmsec}{Bookmarks in sectioning commands}%
[\entrysep]
-\entry{hypcap}{Adjusting the anchors of captions}%
-[\entrysep]
\entry{hypgotoe}{Links to embedded files}%
[\entrysep]
\entry{hyphsubst}{Substitute hyphenation patterns}%
@@ -239,8 +237,6 @@
[\entrysep]
\entry{tabularkv}{Tabular with key value interface}%
[\entrysep]
-\entry{telprint}{Format German phone numbers}%
-[\entrysep]
\entry{thepdfnumber}{Print PDF numbers with minimal digits}%
[\entrysep]
\entry{twoopt}{Definitions with two optional arguments}%
@@ -391,20 +387,6 @@ a replacement for the bookmarks can be given.
\tocinclude{hypbmsec}
\newpage
-\subsection{\pkgsectformat{hypcap}}
-\label{hypcap}
-\begin{abstract}
-This package tries a solution of the problem with
-hyperref, that links to floats points below the
-caption and not at the beginning of the float.
-Therefore this package divides the task into two
-part, the link setting with \cs{capstart} or
-automatically at the beginning of a float and
-the rest in the \cs{caption} command.
-\end{abstract}
-\tocinclude{hypcap}
-
-\newpage
\subsection{\pkgsectformat{hypgotoe}}
\label{hypgotoe}
\begin{abstract}
@@ -520,7 +502,7 @@ is supported. Index preambles can be given either by means of package
\label{setouterhbox}
\begin{abstract}
If math stuff is set in an \cs{hbox}, then TeX
-performs some optimization and omits the implicite
+performs some optimization and omits the implicit
penalties \cs{binoppenalty} and \cs{relpenalty}.
This packages tries to put stuff into an \cs{hbox}
without getting lost of those penalties.
@@ -578,15 +560,6 @@ especially if package \xpackage{tabularht} is used.
\tocinclude{tabularkv}
\newpage
-\subsection{\pkgsectformat{telprint}}
-\label{telprint}
-\begin{abstract}
-Package \xpackage{telprint} provides \cs{telprint} for formatting
-German phone numbers.
-\end{abstract}
-\tocinclude{telprint}
-
-\newpage
\subsection{\pkgsectformat{thepdfnumber}}
\label{thepdfnumber}
\begin{abstract}
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdfcolparallel.dtx b/Master/texmf-dist/source/latex/oberdiek/pdfcolparallel.dtx
index 17893f98a98..02df672d4eb 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdfcolparallel.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdfcolparallel.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex pdfcolparallel.dtx
% makeindex -s gind.ist pdfcolparallel.idx
% pdflatex pdfcolparallel.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdfcolparcolumns.dtx b/Master/texmf-dist/source/latex/oberdiek/pdfcolparcolumns.dtx
index 77d8aab0716..a382037b426 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdfcolparcolumns.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdfcolparcolumns.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex pdfcolparcolumns.dtx
% makeindex -s gind.ist pdfcolparcolumns.idx
% pdflatex pdfcolparcolumns.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/pdfcrypt.dtx b/Master/texmf-dist/source/latex/oberdiek/pdfcrypt.dtx
index e4681efa8c2..3c5070829c4 100644
--- a/Master/texmf-dist/source/latex/oberdiek/pdfcrypt.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/pdfcrypt.dtx
@@ -55,7 +55,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex pdfcrypt.dtx
% makeindex -s gind.ist pdfcrypt.idx
% pdflatex pdfcrypt.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx b/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx
index cff42cccf7d..21aab0c9fcd 100644
--- a/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/protecteddef.dtx
@@ -56,7 +56,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex protecteddef.dtx
% makeindex -s gind.ist protecteddef.idx
% pdflatex protecteddef.dtx
@@ -246,7 +246,7 @@ and the derived files
% is not supported. Macro \meta{cmd} is to be defined as
% \cs{long} macro without star with \meta{num} arguments.
%
-% The number of arguments \meta{num} must be given as explicite digit
+% The number of arguments \meta{num} must be given as explicit digit
% |0| upto |9|. Otherwise the part between the argument \meta{cmd} and
% the \meta{definition text} is taken as parameter text in the syntax
% of vanilla \hologo{TeX}. Examples (with \cs{protected}):
diff --git a/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx b/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
index 4a078649172..8ec4cc8a13c 100644
--- a/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex resizegather.dtx
% makeindex -s gind.ist resizegather.idx
% pdflatex resizegather.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx b/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx
index 3023347fe16..aa807540118 100644
--- a/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/rotchiffre.dtx
@@ -56,7 +56,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex rotchiffre.dtx
% makeindex -s gind.ist rotchiffre.idx
% pdflatex rotchiffre.dtx
@@ -214,7 +214,7 @@ and the derived files
% \begin{declcs}{EdefRot} \M{type} \M{cmd} \M{text}
% \end{declcs}
% The \meta{text} is expanded and sanitized. All tokens
-% are letters with catcode 12 (other) with the exeption of
+% are letters with catcode 12 (other) with the exception of
% the space token that has character code 32 (0x20) and
% catcode 10 (space). This follows \hologo{TeX}'s convention of
% \cs{string} and \cs{meaning}.
diff --git a/Master/texmf-dist/source/latex/oberdiek/scrindex.dtx b/Master/texmf-dist/source/latex/oberdiek/scrindex.dtx
index fea57fd1a9d..63deeaab2fc 100644
--- a/Master/texmf-dist/source/latex/oberdiek/scrindex.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/scrindex.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex scrindex.dtx
% makeindex -s gind.ist scrindex.idx
% pdflatex scrindex.dtx
@@ -195,7 +195,7 @@ and the derived files
% the standard classes |article|, |report|, and |book|. It
% redefines environment `theindex' for its needs.
% However, it does not know other classes such as KOMA-Script.
-% This package closes the compatibiliy gap between KOMA-Script's
+% This package closes the compatibility gap between KOMA-Script's
% classes and package \xpackage{index}.
%
% Environment |theindex| is redefined to support both package
diff --git a/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx b/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx
index 001cd278d3d..cc937c16a46 100644
--- a/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/setouterhbox.dtx
@@ -57,7 +57,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex setouterhbox.dtx
% makeindex -s gind.ist setouterhbox.idx
% pdflatex setouterhbox.dtx
@@ -190,7 +190,7 @@ and the derived files
%
% \begin{abstract}
% If math stuff is set in an \cs{hbox}, then TeX
-% performs some optimization and omits the implicite
+% performs some optimization and omits the implicit
% penalties \cs{binoppenalty} and \cs{relpenalty}.
% This packages tries to put stuff into an \cs{hbox}
% without getting lost of those penalties.
@@ -234,7 +234,7 @@ and the derived files
% method we discuss here. Nowadays we have \eTeX\ that extends
% the tool set of a \TeX\ macro programmer. Especially useful
% \eTeX\ was in this package for detecting and dealing with
-% errorneous situations.
+% erroneous situations.
%
% However also nowadays a perfect solution for the problem
% is still missing at macro level. Probably someone has
diff --git a/Master/texmf-dist/source/latex/oberdiek/settobox.dtx b/Master/texmf-dist/source/latex/oberdiek/settobox.dtx
index c38d502a534..c1d7af6ae9a 100644
--- a/Master/texmf-dist/source/latex/oberdiek/settobox.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/settobox.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex settobox.dtx
% makeindex -s gind.ist settobox.idx
% pdflatex settobox.dtx
@@ -282,7 +282,7 @@ and the derived files
% c) Print #1 commands.
% d) Print box with frame
%
-% The implemenation looks more weird:
+% The implementation looks more weird:
\makeatletter
\newcommand*{\test}[1]{%
\par
diff --git a/Master/texmf-dist/source/latex/oberdiek/stackrel.dtx b/Master/texmf-dist/source/latex/oberdiek/stackrel.dtx
index 6b3444c33c6..09110de9476 100644
--- a/Master/texmf-dist/source/latex/oberdiek/stackrel.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/stackrel.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex stackrel.dtx
% makeindex -s gind.ist stackrel.idx
% pdflatex stackrel.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/stampinclude.dtx b/Master/texmf-dist/source/latex/oberdiek/stampinclude.dtx
index 9acd8a61f84..ba468e85916 100644
--- a/Master/texmf-dist/source/latex/oberdiek/stampinclude.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/stampinclude.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex stampinclude.dtx
% makeindex -s gind.ist stampinclude.idx
% pdflatex stampinclude.dtx
@@ -225,7 +225,7 @@ and the derived files
% This package \xpackage{stampinclude} goes another way.
% \LaTeX\ reads and writes a separate \xext{aux} file for each
% file that is included by \cs{include}. There \LaTeX\ remembers
-% counter valuses. Changed \xext{tex}
+% counter values. Changed \xext{tex}
% files can therefore be detected by comparing the file date stamp of
% the \xext{tex} file with the date stamp of its \xext{aux} file.
% Since version 1.30.0 \pdfTeX\ provides \cs{pdffilemoddate}
@@ -254,7 +254,7 @@ and the derived files
%
% \subsubsection{Other file dependencies}
%
-% A file that is included by \cs{include} may input ore reference
+% A file that is included by \cs{include} may input or reference
% other files:
% \begin{itemize}
% \item other \TeX\ files using \cs{input},
diff --git a/Master/texmf-dist/source/latex/oberdiek/tabularht.dtx b/Master/texmf-dist/source/latex/oberdiek/tabularht.dtx
index 20688068b07..e6c26f1040f 100644
--- a/Master/texmf-dist/source/latex/oberdiek/tabularht.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/tabularht.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex tabularht.dtx
% makeindex -s gind.ist tabularht.idx
% pdflatex tabularht.dtx
@@ -250,7 +250,7 @@ and the derived files
% and add the vertical lines. The lines in a tabular
% with \xpackage{tabularht} support (environments of this package)
% are numbered from left to right. The gap that is
-% controlled by \cs{interrowspace} or inbetween \cs{interrowstart}
+% controlled by \cs{interrowspace} or in between \cs{interrowstart}
% and \cs{interrowstop} is then filled with the detected
% vertical lines.
%
@@ -472,7 +472,7 @@ and the derived files
\def\tabH@spread{spread}
% \end{macrocode}
% First argument is the height of the table,
-% then the orignal arguments for tabular follow.
+% then the original arguments for tabular follow.
% \begin{macrocode}
\newenvironment{tabularht}[1]{%
\tabH@setheight{#1}%
diff --git a/Master/texmf-dist/source/latex/oberdiek/tabularkv.dtx b/Master/texmf-dist/source/latex/oberdiek/tabularkv.dtx
index 57ef5e87457..b324e6e8abc 100644
--- a/Master/texmf-dist/source/latex/oberdiek/tabularkv.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/tabularkv.dtx
@@ -53,7 +53,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex tabularkv.dtx
% makeindex -s gind.ist tabularkv.idx
% pdflatex tabularkv.dtx
diff --git a/Master/texmf-dist/source/latex/oberdiek/thepdfnumber.dtx b/Master/texmf-dist/source/latex/oberdiek/thepdfnumber.dtx
index 61eb42684c3..c1aa4bf9fac 100644
--- a/Master/texmf-dist/source/latex/oberdiek/thepdfnumber.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/thepdfnumber.dtx
@@ -57,7 +57,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex thepdfnumber.dtx
% makeindex -s gind.ist thepdfnumber.idx
% pdflatex thepdfnumber.dtx
@@ -256,7 +256,7 @@ and the derived files
% \item The decimal part is omitted, if the number is an integer (5, 7).
% \item Trailing zeros from the decimal part are stripped (5, 6, 7, 9).
% \end{itemize}
-% The resulting number representation can be catched with one of the
+% The resulting number representation can be caught with one of the
% following Perl regular expressions:
% \begin{itemize}
% \item |^0$| (zero)
@@ -295,11 +295,11 @@ and the derived files
% \subsection{Input number}
%
% The user macros expect a number as argument. The number can either
-% be given explicitely or as macro that expands in one step
-% to an explicite number, because the first token of the argument
+% be given explicitly or as macro that expands in one step
+% to an explicit number, because the first token of the argument
% is expanded once.
%
-% The explicite number consists of
+% The explicit number consists of
% \begin{itemize}
% \item optional signs `\texttt{+}' and `\texttt{-}',
% \item digits `\texttt{0}' upto `\texttt{9}' and
@@ -320,7 +320,7 @@ and the derived files
% The package is not intended for validating numbers or to
% decide if an argument is a number. Therefore it is an usage
% error to use the user macros with arguments that are not
-% explicite numbers as specified in the previous sections.
+% explicit numbers as specified in the previous sections.
% Nevertheless some error conditions are sometimes recognized.
% Errors are given in form of an undefined command sequence.
% It is the only way to notify \hologo{TeX} in expandable context.
diff --git a/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx b/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx
index 10334f0d3a9..806799fd410 100644
--- a/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx
@@ -52,7 +52,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex twoopt.dtx
% makeindex -s gind.ist twoopt.idx
% pdflatex twoopt.dtx
diff --git a/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx b/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
index e096f502f6e..fcc5a731763 100644
--- a/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
+++ b/Master/texmf-dist/source/latex/orcidlink/orcidlink.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2019-2023 by Leo C. Stein <leo.stein@gmail.com>
+% Copyright (C) 2019-2024 by Leo C. Stein <leo.stein@gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -27,9 +27,12 @@
%<*driver>
\documentclass{ltxdoc}
\usepackage[dvipsnames]{xcolor}
-\usepackage{orcidlink}[2023/12/30]
-\hypersetup{colorlinks,urlcolor=NavyBlue,citecolor=NavyBlue,linkcolor=NavyBlue,pdfusetitle}
+\usepackage{orcidlink}[2024/06/25]
+\hypersetup{colorlinks,urlcolor=NavyBlue,citecolor=NavyBlue,linkcolor=NavyBlue}
+\hypersetup{pdftitle={The orcidlink package},pdfauthor={Leo C. Stein},
+ pdfsubject={-}}
\usepackage{graphicx}
+\usepackage{microtype}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -40,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{41}
+% \CheckSum{59}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -69,6 +72,8 @@
% working correctly with XeTeX. Thanks to Tim Henke for the bug report.}
% \changes{v1.0.5}{2023/12/30}{Turn off TikZ externalization of logos.
% Thanks to github user aquileia for the bug report.}
+% \changes{v1.1.0}{2024/06/25}{Support ORCID's three different ID
+% formats. Thanks to Hugo Heagren for suggestions.}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -84,8 +89,10 @@
%
% \section{Introduction}
%
-% This is a LaTeX style file to add a macro for inserting a linked
-% ORCiD logo. The package provides exactly one command, |\orcidlink|.
+% This is a LaTeX style file providing a macro for inserting a
+% hyperlinked ORCiD logo. The package also provides three commands
+% for ORCiD's three recommended ID printing formats, and a command for
+% just the ORCiD logo, not linked to anything.
%
% \section{Usage}
%
@@ -113,6 +120,36 @@
% \includegraphics[width=0.5\textwidth]{preview}\newline{}
% The macro is used in the author line of this documentation as well.
%
+% \DescribeMacro{\orcidlogo}
+% If you simply want the ORCiD logo without a hyperlink anywhere, use
+% |\orcidlogo|.
+%
+% ORCiD's \href{https://info.orcid.org/brand-guidelines/}{guidelines}
+% recommend three formats: full, compact, and inline. The three
+% formats are available:
+% \begin{enumerate}
+% \item \DescribeMacro{\orcidlinkf\marg{orcid}} Full format. Example:
+% |\orcidlinkf{0000-0001-7559-9597}| will insert
+% \orcidlinkf{0000-0001-7559-9597}
+% \item \DescribeMacro{\orcidlinkc\marg{orcid}} Compact format.
+% Example: |\orcidlinkc{0000-0001-7559-9597}| will insert
+% \orcidlinkc{0000-0001-7559-9597}
+% \item \DescribeMacro{\orcidlinki\marg{Name}\marg{orcid}} Inline
+% format. Example: |\orcidlinki{Leo C. Stein}{0000-0001-7559-9597}|
+% will insert \orcidlinki{Leo C. Stein}{0000-0001-7559-9597}
+% \end{enumerate}
+%
+% \DescribeMacro{\orcidlinkX\marg{before}\marg{orcid}\marg{after}}
+%
+% The command |\orcidlinkX{before}{orcid}{after}| is a helper macro
+% that's used to implement all of the others. Though it is just an
+% internal helper, I saw no reason to keep it internal.
+% |\orcidlinkX{before}{orcid}{after}| results in
+% \orcidlinkX{before}{orcid}{after}. The entire output is hyperlinked
+% to the ORCiD page. There is a thin space |\,| between ``before,''
+% the logo, and ``after.'' However if ``before'' is empty, the space
+% will be omitted; similarly for ``after.''
+%
% \section{Package Compatibility}
%
% This package relies on \texttt{hyperref} and \texttt{tikz}. If you
@@ -132,10 +169,11 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{orcidlink}
- [2023/12/30 v1.0.5 Linked ORCiD logo macro package]
+ [2024/06/26 v1.1.0 Support ORCID's three different ID formats.]
-%% All I did was package up Milo's code on TeX.SE,
-%% see https://tex.stackexchange.com/a/445583/34063
+%% This started out as Milo's code on TeX.SE,
+%% see https://tex.stackexchange.com/a/445583/34063.
+%% It has since been expanded with more commands.
\RequirePackage{hyperref}
\RequirePackage{tikz}
@@ -168,18 +206,45 @@
% \end{macrocode}
%
-% \begin{macro}{\orcidlink}
+% \begin{macro}{\orcidlogo}
% \begin{macrocode}
-\DeclareRobustCommand\orcidlink[1]{%
+\newcommand{\orcidlogo}{%
\texorpdfstring{%
\setlength{\@curXheight}{\fontcharht\font`X}%
-\href{https://orcid.org/#1}{\XeTeXLinkBox{\mbox{%
+\XeTeXLinkBox{%
\@preventExternalization%
\begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight,
xscale=\@OrigHeightRecip*\@curXheight,transform shape]
\pic{orcidlogo};
\end{tikzpicture}%
-}}}}{}}
+}}{}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\orcidlinkX}
+% \begin{macrocode}
+\DeclareRobustCommand\orcidlinkX[3]{\href{https://orcid.org/#2}{%
+\ifstrempty{#1}{}{#1\,}\orcidlogo\ifstrempty{#3}{}{\,#3}}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinkf}
+% \begin{macrocode}
+\newcommand{\orcidlinkf}[1]{\orcidlinkX{}{#1}{https://orcid.org/#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinkc}
+% \begin{macrocode}
+\newcommand{\orcidlinkc}[1]{\orcidlinkX{}{#1}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlinki}
+% \begin{macrocode}
+\newcommand{\orcidlinki}[2]{\orcidlinkX{#1}{#2}{}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\orcidlink}
+% \begin{macrocode}
+\newcommand{\orcidlink}[1]{\orcidlinkX{}{#1}{}}
\endinput
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins b/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins
index 201841f6386..bd2ce9a35c8 100644
--- a/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins
+++ b/Master/texmf-dist/source/latex/orcidlink/orcidlink.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2019-2023 by Leo C. Stein <leo.stein@gmail.com>
+%% Copyright (C) 2019-2024 by Leo C. Stein <leo.stein@gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,7 +25,7 @@
This is a generated file.
-Copyright (C) 2019-2023 by Leo C. Stein <leo.stein@gmail.com>
+Copyright (C) 2019-2024 by Leo C. Stein <leo.stein@gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/source/latex/overarrows/overarrows.dtx b/Master/texmf-dist/source/latex/overarrows/overarrows.dtx
index 419593f5775..ff63a958c39 100644
--- a/Master/texmf-dist/source/latex/overarrows/overarrows.dtx
+++ b/Master/texmf-dist/source/latex/overarrows/overarrows.dtx
@@ -16,14 +16,17 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{overarrows}
%<*package>
-[2023/02/15 v1.1 Custom extensible arrows over math expressions]
+[2024/07/11 v1.2 Custom extensible arrows over math expressions]
%</package>
%
%<*driver>
\documentclass[nohyperref]{ltxdoc}
+\usepackage{metalogo}
+\usepackage{enumitem}
+\usepackage{array}
\usepackage{overarrows-doc} %^^A defined at end of this file, with guard <docstyle>
-\usepackage[old-arrows, esvect, tikz, pstarrows, allcommands]{overarrows}
+\usepackage[old-arrows, esvect, tikz, pstricks, pstarrows, allcommands]{overarrows}
\EnableCrossrefs
\PageIndex
@@ -36,8 +39,8 @@
%% Arrows used in doc
\usepackage{amssymb}% for \twoheadrightarrow
-\NewOverArrowCommand{amsoverrightarrow}{amsmath=strict, end={\rightarrow}}
-\NewOverArrowCommand{overrightnewarrow}{%
+\NewOverArrowCommand{\amsoverrightarrow}{amsmath=strict, end={\rightarrow}}
+\NewOverArrowCommand{\overrightnewarrow}{%
amsmath, middle config=relbar, end=\rightarrow,
right arrow,
}
@@ -49,22 +52,22 @@
\DeclareMathSymbol{\fldrf}{\mathrel}{esvector}{'026}
\DeclareMathSymbol{\fldrg}{\mathrel}{esvector}{'027}
\DeclareMathSymbol{\fldrh}{\mathrel}{esvector}{'030}
-\NewOverArrowCommand{esveca}{esvect=strict, end={\fldra}}
-\NewOverArrowCommand{esvecb}{esvect=strict, end={\fldrb}}
-\NewOverArrowCommand{esvecc}{esvect=strict, end={\fldrc}}
-\NewOverArrowCommand{esvecd}{esvect=strict, end={\fldrd}}
-\NewOverArrowCommand{esvece}{esvect=strict, end={\fldre}}
-\NewOverArrowCommand{esvecg}{esvect=strict, end={\fldrg}}
-\NewOverArrowCommand{esvech}{esvect=strict, end={\fldrh}}
-\NewOverArrowCommand{vva}{esvect, middle config=auto, end=\fldra}
-\NewOverArrowCommand{esvecf}{esvect=strict, end={\fldrf}}
-\NewOverArrowCommand{vvb}{esvect, middle config=auto, end=\fldrb}
-\NewOverArrowCommand{vvc}{esvect, middle config=auto, end=\fldrc}
-\NewOverArrowCommand{vvd}{esvect, middle config=auto, end=\fldrd}
-\NewOverArrowCommand{vve}{esvect, middle config=auto, end=\fldre}
-\NewOverArrowCommand{vvf}{esvect, middle config=auto, end=\fldrf}
-\NewOverArrowCommand{vvg}{esvect, middle config=auto, end=\fldrg}
-\NewOverArrowCommand{vvh}{esvect, middle config=auto, end=\fldrh}
+\NewOverArrowCommand{\esveca}{esvect=strict, end={\fldra}}
+\NewOverArrowCommand{\esvecb}{esvect=strict, end={\fldrb}}
+\NewOverArrowCommand{\esvecc}{esvect=strict, end={\fldrc}}
+\NewOverArrowCommand{\esvecd}{esvect=strict, end={\fldrd}}
+\NewOverArrowCommand{\esvece}{esvect=strict, end={\fldre}}
+\NewOverArrowCommand{\esvecg}{esvect=strict, end={\fldrg}}
+\NewOverArrowCommand{\esvech}{esvect=strict, end={\fldrh}}
+\NewOverArrowCommand{\vva}{esvect, middle config=auto, end=\fldra}
+\NewOverArrowCommand{\esvecf}{esvect=strict, end={\fldrf}}
+\NewOverArrowCommand{\vvb}{esvect, middle config=auto, end=\fldrb}
+\NewOverArrowCommand{\vvc}{esvect, middle config=auto, end=\fldrc}
+\NewOverArrowCommand{\vvd}{esvect, middle config=auto, end=\fldrd}
+\NewOverArrowCommand{\vve}{esvect, middle config=auto, end=\fldre}
+\NewOverArrowCommand{\vvf}{esvect, middle config=auto, end=\fldrf}
+\NewOverArrowCommand{\vvg}{esvect, middle config=auto, end=\fldrg}
+\NewOverArrowCommand{\vvh}{esvect, middle config=auto, end=\fldrh}
\makeatletter
\newcommand{\unsetoldarrows}{
@@ -94,7 +97,7 @@
%
% \title{The \pkg{overarrows} package\thanks{This document
% corresponds to \pkg{overarrows}~\fileversion, dated \filedate.}}
-% \author{Julien Labb\'e \\ \texttt{Julien.Labbe@univ-grenoble-alpes.fr}}
+% \author{Julien Labb\'e \\ {\small \url{https://github.com/julienlabbe/latex-packages}}}
%
% \maketitle
%
@@ -111,7 +114,7 @@
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{overrightharpoon}{%
+\NewOverArrowCommand{\overrightharpoon}{%
end=\rightharpoonup
}
@@ -188,9 +191,9 @@
%
% The \pkg{overarrows} package was primitively written for vectors, but in
% a highly customisable way. It can be used to define a large variety of arrows,
-% using math symbols, or PGF/TikZ commands. It's also possible to create
-% commands that draw the arrows under. Some predefined commands are provided,
-% giving\footnotemark{}, for arrow over:
+% using math symbols, or drawing commands from PGF/TikZ or PSTricks. It's also
+% possible to create commands that draw the arrows under. Some predefined
+% commands are provided, giving\footnotemark{}, for arrow over:
% \footnotetext{Displayed here with the \refOpt{old-arrows} option.}
% \begin{align*}
% \overrightarrow{\alpha+\beta}
@@ -222,34 +225,42 @@
% above\footnotemark{}. For this second convention, \TeX/\LaTeX provides the
% command \cs{vec}, which accents its content (using the \cs{mathaccent}
% command) with the character~\symb{\mathchar "017E\relax}
-% (\cs{mathchar}|"017E| in Computer Modern font).
-% But \symb{\mathchar "017E\relax} isn't extensible, and gives: $\vec{v}$,
-% $\vec{AB}$ or $\vec{\text{grad}}$ (there's no command \cs{widevec} analogous
-% to \cs{widehat}).
+% (\cs{mathchar}|"017E| in Computer Modern font). But \symb{\mathchar
+% "017E\relax} isn't extensible\footnotemark{}, and gives: $\vec{v}$, $\vec{AB}$
+% or $\vec{\text{grad}}$ (there's no command \cs{widevec} analogous to
+% \cs{widehat}).
%
+% \addtocounter{footnote}{-2}%^^A two footnotemarks
+%
+% \stepcounter{footnote}
% \footnotetext{See, for example: International Organization for
% Standardization. (2019). \emph{Quantities and units -- Part 2: Mathematics}
% (ISO Standard No. 80000-2:2019).
% \url{https://www.iso.org/standard/64973.html}.}
%
+% \stepcounter{footnote}
+% \footnotetext{In fact, with the unicode engines \LuaTeX{} and \XeTeX{}, the
+% command \cs{Umathaccent} can now define extensible accents. This is used by
+% the \pkg{unicode-math} package, which also set the arrows displayed by \cs{vec}
+% and \cs{overrightarrow} in a coherent manner.}
+%
% An extensible alternative is given by the command \cs{overrightarrow},
% available in \TeX/\LaTeX, and which is redefined by the commonly used
% \pkg{amsmath} package. But its arrow, built with the \cs{rightarrow} symbol
-% \symb{\rightarrow}, is too large with the default \emph{Computer Modern} font:
-% $\amsoverrightarrow{AB}$. Another alternative is the \pkg{esvect} package,
-% which provides the \cs{vv} command and a set of custom arrows: $\esveca{AB}$,
-% $\esvecb{AB}$, $\esvecc{AB}$, $\esvecd{AB}$, $\esvece{AB}$, $\esvecf{AB}$,
-% $\esvecg{AB}$, $\esvech{AB}$.
+% \symb{\rightarrow}, is too large, using the default \emph{Computer Modern}
+% font: $\amsoverrightarrow{AB}$. Another alternative is the \pkg{esvect}
+% package, which provides the \cs{vv} command and a set of custom arrows:
+% $\esveca{AB}$, $\esvecb{AB}$, $\esvecc{AB}$, $\esvecd{AB}$, $\esvece{AB}$,
+% $\esvecf{AB}$, $\esvecg{AB}$, $\esvech{AB}$.
%
% \subsection{Stack and arrow macros}
%
% It's worth looking at the definition of \pkg{amsmath} \cs{overrightarrow}
-% command:
-% \iffalse
+% command: \iffalse
%<*example>
% \fi
\begin{dispListing}
- \long macro:->\mathpalette {\overarrow@ \rightarrowfill@ }
+\long macro:->\mathpalette {\overarrow@ \rightarrowfill@ }
\end{dispListing}
% \iffalse
%</example>
@@ -314,7 +325,7 @@
% The \pkg{overarrows} package also provides an alternative mechanism.
% When used, the length \cs{overarrowlength} is set, according to the arrow
% command content, and can be employed, for example, to draw arrows using
-% PGF/TikZ or the \LaTeX{} picture environment.
+% PGF/TikZ, PSTricks or the \LaTeX{} picture environment.
%
% \section{Quick start}
%
@@ -382,14 +393,13 @@
% \subsection{Commands creation}
%
% Commands are created with \refCom{NewOverArrowCommand}. This macro take two
-% mandatory arguments : the name of the command (without backslash), and the
-% arrow configuration as comma-separated list of key-values. By default, a right
-% arrow is set:
+% mandatory arguments : the name of the command and the arrow configuration as
+% comma-separated list of key-values. By default, a right arrow is set:
% \iffalse
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{myovercmd}{}
+\NewOverArrowCommand{\myovercmd}{}
$\myovercmd{test}$
\end{dispExample}
% \iffalse
@@ -417,7 +427,7 @@ $ v_{sub} \qquad \myovercmd{v}_{sub} \qquad \myovercmd*{v}_{sub} $
%<*example>
% \fi
\begin{dispListing}
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
start=\lhook, end=\twoheadrightarrow,
}
\end{dispListing}
@@ -436,12 +446,12 @@ $ v_{sub} \qquad \myovercmd{v}_{sub} \qquad \myovercmd*{v}_{sub} $
% \iffalse
%</example>
% \fi
-% With the previous definition, the result of the command
+% But with the previous definition, the result of the command
% \cs{overhooktwoheadrightarrow} is faulty:
% \iffalse
%<*example>
% \fi
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
start=\lhook, end=\twoheadrightarrow,
}
\begin{dispExample}
@@ -459,7 +469,7 @@ $ \overhooktwoheadrightarrow{v} \qquad \overhooktwoheadrightarrow{AB} $
% \fi
\csundef{overhooktwoheadrightarrow}
\begin{dispExample}
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
start=\lhook, end=\twoheadrightarrow,
trim start=1.5, trim end=2,
}
@@ -474,16 +484,18 @@ $ \overhooktwoheadrightarrow{v} \qquad \overhooktwoheadrightarrow{AB} $
% If the math font differs from the default \emph{Computer Modern}, the central
% part of the arrow may have inappropriate position or line width. This is
% because the default symbol used for the arrow line is \cs{relbareda}
-% \symb{\relbareda} from the \pkg{esvect} package. If needed, try to set the
-% \refKey{middle} key with the symbol \cs{relbar} \symb{\relbar}. The trimming
-% should also be adapted:
+% \symb{\relbareda} from the \pkg{esvect} package\footnote{Except if the
+% \pkg{unicode-math} package is used with a math font that provides the
+% \cs{harrowextender} symbol (see the \refKey*{middle config}|=auto| key).}.
+% If needed, try to set the \refKey{middle} key with the symbol \cs{relbar}
+% \symb{\relbar}. The trimming should also be adapted:
% \iffalse
%<*example>
% \fi
\csundef{overhooktwoheadrightarrow}
\begin{dispExample}
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
- start=\lhook, end=\twoheadrightarrow, middle=\relbar, %
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
+ start=\lhook, end=\twoheadrightarrow, middle=\relbar,
trim start=0, trim end=3, trim middle=5,
}
$ \overhooktwoheadrightarrow{v} \qquad \overhooktwoheadrightarrow{AB} $
@@ -500,7 +512,7 @@ $ \overhooktwoheadrightarrow{v} \qquad \overhooktwoheadrightarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\TestOverArrow{overhooktwoheadrightarrow}
+\TestOverArrow{\overhooktwoheadrightarrow}
\end{dispExample}
% \iffalse
%</example>
@@ -514,7 +526,7 @@ $ \overhooktwoheadrightarrow{v} \qquad \overhooktwoheadrightarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{OverRightarrow}{%
+\NewOverArrowCommand{\OverRightarrow}{%
start=\Relbar,
middle=\Relbar,
end=\Rightarrow,
@@ -535,7 +547,7 @@ $ \OverRightarrow{v} \qquad \OverRightarrow{AB} $
% \fi
\csundef{OverRightarrow}
\begin{dispExample}
-\NewOverArrowCommand{OverRightarrow}{%
+\NewOverArrowCommand{\OverRightarrow}{%
start={\smallermathstyle\Relbar},
middle={\smallermathstyle\Relbar},
end=\Rightarrow,
@@ -557,7 +569,7 @@ $ \OverRightarrow{v} \qquad \OverRightarrow{AB} $
% \fi
\csundef{OverRightarrow}
\begin{dispExample}
-\NewOverArrowCommand{OverRightarrow}{%
+\NewOverArrowCommand{\OverRightarrow}{%
start={\smallermathstyle\Relbar},
middle={\smallermathstyle\Relbar},
end=\Rightarrow,
@@ -579,7 +591,7 @@ $ \OverRightarrow{v} \qquad \OverRightarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{OverLeftarrow}{%
+\NewOverArrowCommand{\OverLeftarrow}{%
start={\smallermathstyle\Leftarrow},
middle={\smallermathstyle\Relbar},
end=\Relbar,
@@ -601,7 +613,7 @@ $ \OverLeftarrow{v} \qquad \OverLeftarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{OverLeftRightarrow}{%
+\NewOverArrowCommand{\UnderLeftRightarrow}{%
start={\smallermathstyle\Leftarrow},
middle={\smallermathstyle\Relbar},
end=\Rightarrow,
@@ -610,7 +622,7 @@ $ \OverLeftarrow{v} \qquad \OverLeftarrow{AB} $
space before arrow=0.5ex,
shift left=0, shift right=0,
}
-$ \OverLeftRightarrow{v} \qquad \OverLeftRightarrow{AB} $
+$ \UnderLeftRightarrow{v} \qquad \UnderLeftRightarrow{AB} $
\end{dispExample}
% \iffalse
%</example>
@@ -650,7 +662,7 @@ $ \tttail $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{overtttailrightarrow}{%
+\NewOverArrowCommand{\overtttailrightarrow}{%
start={\tttail},
end={\rightarrow},
trim start=12,
@@ -683,7 +695,7 @@ $ \overtttailrightarrow{v} \qquad \overtttailrightarrow{AB} $
% \fi
\csundef{overtttailrightarrow}
\begin{dispExample}
-\NewOverArrowCommand{overtttailrightarrow}{%
+\NewOverArrowCommand{\overtttailrightarrow}{%
start={\vcenter{\hbox{$\smallermathstyle\tttail$}}},
end={\rightarrow},
trim start=12,
@@ -710,7 +722,7 @@ $ \overtttailrightarrow{v} \qquad \overtttailrightarrow{AB} $
\begin{dispExample}
\newcommand*{\leftarrowhead}{\usefont{U}{lasy}{m}{n}\symbol{40}}
\newcommand*{\righttarrowhead}{\usefont{U}{lasy}{m}{n}\symbol{41}}
-\NewOverArrowCommand{overrightleftarrow}{%
+\NewOverArrowCommand{\overrightleftarrow}{%
start=\text{\righttarrowhead},
end=\text{\leftarrowhead},
trim start=0.7, trim end=0.7,
@@ -751,7 +763,7 @@ $ \overrightleftarrow{AB} \qquad \scriptstyle\overrightleftarrow{AB} $
% \medskip
%
% To use PGF/TikZ language, the optional argument |tikz| must be passed to
-% \refCom{NewOverArrowCommand} . TikZ picture are not extensible. That's why the
+% \refCom{NewOverArrowCommand}. TikZ pictures are not extensible. That's why the
% \pkg{overarrows} package provides three lengths that can be used in TikZ
% commands:
% \begin{itemize}
@@ -767,7 +779,7 @@ $ \overrightleftarrow{AB} \qquad \scriptstyle\overrightleftarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand[tikz]{overtikzarrow}{}
+\NewOverArrowCommand[tikz]{\overtikzarrow}{}
$ \overtikzarrow{v} \qquad \overtikzarrow{AB} $
\end{dispExample}
% \iffalse
@@ -791,7 +803,7 @@ $ \overtikzarrow{v} \qquad \overtikzarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand[tikz]{overarchedleftrightarrow}{%
+\NewOverArrowCommand[tikz]{\overarchedleftrightarrow}{%
add tikz options={y=\overarrowlength},
add tikz options={line width={\overarrowsmallerthickness}},
path options={arrows={<[scale=0.5]->[scale=0.5]}},
@@ -807,20 +819,72 @@ $ \overarchedleftrightarrow{v} \qquad \overarchedleftrightarrow{ABCD} $
%</example>
% \fi
%
+% \subsection{Drawing the arrow with PSTricks}
+%
+% In addition to PGF/TikZ, the arrow can be drawn with PSTricks macros.
+% For this, the optional argument |pstricks| must be passed to
+% \refCom{NewOverArrowCommand}. Like with
+% |tikz|, the three lengths \refCom{overarrowlength}, \refCom{overarrowthickness}
+% and \refCom{overarrowsmallerthickness} can be used in PSTricks commands.
+% By default, a right arrow is drawn:
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\NewOverArrowCommand[pstricks]{\overpstarrow}{}
+$ \overpstarrow{v} \qquad \overpstarrow{AB} $
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+% \noindent The \pkg{pstricks} package has to be loaded (for example, using the
+% \refOpt{pstricks} option of the \pkg{overarrows} package)
+%
+% Keys to use PSTricks commands are described in section~\ref{sec:pstricks-keys},
+% page~\pageref{sec:pstricks-keys}. The main keys are \refKey{pstricks command},
+% \refKey{psset}, \refDoc{key:pstricks}{arrow}, \refDoc{key:pstricks}{geometry}
+% an \refDoc{key:pstricks}{line thickness}. Examples:
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\NewOverArrowCommand[pstricks]{\overreddisks}{%
+ psset={linecolor=red}, arrow=*-*, center arrow,
+}
+$ \overreddisks{v} \qquad \overreddisks{AB} $
+\end{dispExample}
+\begin{dispExample}
+\NewOverArrowCommand[pstricks]{\ellipticarrow}{%
+ pstricks command={%
+ \psellipticarcn{->}%^^A avoid space before coordinates
+ (0.5\overarrowlength,0.2\overarrowlength)%^^A avoid space before coordinates
+ (0.5\overarrowlength,0.2\overarrowlength)
+ {170}{10}
+ },
+ geometry={(0,0.2\overarrowlength)(\overarrowlength,0.4\overarrowlength)},
+ line thickness={\overarrowsmallerthickness},
+ center arrow,
+}
+$ \ellipticarrow{v} \qquad \ellipticarrow{AB} $
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+%
% \subsection{Drawing the arrow with \LaTeX{} picture environment}
%
-% As well as TikZ, the \LaTeX{} |picture| environment can be used to draw the
-% arrow. For this, the optional argument |picture| must be passed to
-% \refCom{NewOverArrowCommand}. Like for TikZ, the three lengths
-% \refCom{overarrowlength}, \refCom{overarrowthickness} and
-% \refCom{overarrowsmallerthickness} can be used in |picture| commands.
-% By default, a right vector is drawn:
+% Without any other package, arrows can also be drawn with the \LaTeX{}
+% |picture| environment. In this case, the optional argument |picture| must be
+% passed to \refCom{NewOverArrowCommand}. As with |tikz| or |pstricks|, the
+% three lengths \refCom{overarrowlength}, \refCom{overarrowthickness} and
+% \refCom{overarrowsmallerthickness} are available and can be used in
+% |picture| drawing commands. By default, a right vector is drawn:
% \iffalse
%<*example>
% \fi
\ltxarrows%^^A classic arrows
\begin{dispExample}
-\NewOverArrowCommand[picture]{overpictarrow}{}
+\NewOverArrowCommand[picture]{\overpictarrow}{}
$ \overpictarrow{v} \qquad \overpictarrow{AB} $
\end{dispExample}
% \iffalse
@@ -835,7 +899,7 @@ $ \overpictarrow{v} \qquad \overpictarrow{AB} $
\pstarrows%^^A pst arrows
\csundef{overpictarrow}
\begin{dispExample}
-\NewOverArrowCommand[picture]{overpictarrow}{}
+\NewOverArrowCommand[picture]{\overpictarrow}{}
$ \overpictarrow{v} \qquad \overpictarrow{AB} $
\end{dispExample}
% \iffalse
@@ -844,13 +908,13 @@ $ \overpictarrow{v} \qquad \overpictarrow{AB} $
%
% Keys to use \LaTeX{} |picture| environment are described in
% section~\ref{sec:picture-keys}, page~\pageref{sec:picture-keys}. The main keys
-% are \refKey{picture command}, \refKey{geometry} an \refDoc{key:picture}{line
-% thickness}. Here is an example:
+% are \refKey{picture command}, \refDoc{key:picture}{geometry} an
+% \refDoc{key:picture}{line thickness}. Here is an example:
% \iffalse
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand[picture]{overbandedarrow}{
+\NewOverArrowCommand[picture]{\overbandedarrow}{
picture command={%
\qbezier
(0.0\overarrowlength,0)
@@ -875,7 +939,6 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
% \subsection{Package options}
% \label{sec:package-options}
%
-%
% The \pkg{overarrows} package accepts many options, given as a comma-separated
% list \meta{options} at package loading:
% \cs{usepackage}|[|\meta{options}|]{overarrows}|.
@@ -889,7 +952,8 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
% \begin{docOption}{esvect}
% Loads the \pkg{esvect} package and redefines its vector commands \refCom{vv}
% through the \pkg{overarrows} mechanism. Original \pkg{esvect} \cs{vv} macro
-% is still available with \refCom{esvectvv}.
+% is still available with \refCom{esvectvv}. The \pkg{esvect} font description
+% is fixed to allow any font sizes.
%
% The \pkg{esvect} package provides the symbol \cs{relbareda} \symb{\relbareda}
% which is smaller and often more flexible than the classic one \cs{relbar}
@@ -1098,6 +1162,16 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
% library are loaded independently.
% \end{docOption}
%
+% \begin{docOption}{pstricks}
+% Loads the package \pkg{pstricks-add}.
+%
+% Note that, as it, this will compile with \LaTeX{}, \LuaLaTeX{} and
+% \XeLaTeX{}, but not with \makebox{pdf\LaTeX} (see the PSTricks
+% documentation). PSTricks arrows, drawn with the |pstricks| method, are
+% always available, even if this option is not set, provided the
+% \pkg{pstricks} package is loaded independently.
+% \end{docOption}
+%
% \begin{docOption}{pstarrows}
% Loads the \pkg{pict2e} package, with its option |pstarrows|. Vectors using
% \LaTeX{} |picture| environment gives then \pstarrows$\overpictarrow{AB}$
@@ -1117,6 +1191,7 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
% \end{docOption}
%
% \begin{docOption}{subother}
+% \tcbdocmarginnote{\tcbdocnew{v1.1 2023/02/15}}
% Sets to 12 (\emph{other} catcode category) the catcode of the ``|_|" symbol
% used for subscript detection, when this is enabled by the key \refKey{detect
% subscripts} (see the section~\ref{sec:non-standard-subscripts},
@@ -1124,6 +1199,7 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
% \end{docOption}
%
% \begin{docOption}{subactive}
+% \tcbdocmarginnote{\tcbdocnew{v1.1 2023/02/15}}
% Sets to 13 (\emph{active} catcode category) the catcode of the ``|_|" symbol
% used for subscript detection, when this is enabled by the key \refKey{detect
% subscripts} (see the section~\ref{sec:non-standard-subscripts},
@@ -1142,45 +1218,51 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
% \begin{docCommands}{%
% {
% doc name=NewOverArrowCommand,
-% doc parameter=\oarg{method}\marg{name}\marg{keys},
+% doc parameter=\oarg{method}\marg{command}\marg{keys},
% },
% {
% doc name=RenewOverArrowCommand,
-% doc parameter=\oarg{method}\marg{name}\marg{keys},
+% doc parameter=\oarg{method}\marg{command}\marg{keys},
% },
% {
% doc name=ProvideOverArrowCommand,
-% doc parameter=\oarg{method}\marg{name}\marg{keys},
+% doc parameter=\oarg{method}\marg{command}\marg{keys},
% },
% {
% doc name=DeclareOverArrowCommand,
-% doc parameter=\oarg{method}\marg{name}\marg{keys},
+% doc parameter=\oarg{method}\marg{command}\marg{keys},
% },
% }
-% Creates the command \cs{\meta{name}} and its starred variant
-% \cs{\meta{name}*}. The starred variant \cs{\meta{name}*} removes the extra
+% Creates the command \meta{command} and its starred variant
+% \meta{command}|*|. The starred variant \meta{command}|*| removes the extra
% end space generated by the arrow, which is suitable, as example, when
% a subscript follows.
%
+% \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+% \meta{command} can be given with or without backslash (prior to the version
+% 1.2, only the name, without backslash, was accepted).
+%
% \begin{description}
-% \item[\cs{NewOverArrowCommand}] raises an error if \cs{\meta{name}} is
-% already defined.
+% \item[\cs{NewOverArrowCommand}] raises an error if \meta{command} is
+% already defined.
%
-% \item[\cs{RenewOverArrowCommand}] raises an error if \cs{\meta{name}} is undefined.
+% \item[\cs{RenewOverArrowCommand}] raises an error if \meta{command}
+% is undefined.
%
-% \item[\cs{ProvideOverArrowCommand}] sets \cs{\meta{name}} if the command is
-% undefined and does nothing if it is already defined, without raising
-% any error.
+% \item[\cs{ProvideOverArrowCommand}] sets \meta{command} if the command is
+% undefined and does nothing if it is already defined, without raising
+% any error.
%
-% \item[\cs{DeclareOverArrowCommand}] sets \cs{\meta{name}}, whether the
-% command is already defined
-% or not, without raising any error.
+% \item[\cs{DeclareOverArrowCommand}] sets \meta{command}, whether the command
+% is already defined or not, without raising any error.
% \end{description}
%
% The \meta{method} used to draw the arrow must be:
% \begin{description}
% \item[|symb|] to draw the arrow by symbols assemblage (default);
% \item[|tikz|] to draw the arrow with PGF/TikZ;
+% \item[|pstricks|] to draw the arrow with PSTricks;
+% \tcbdocmarginnote{\tcbdocnew{v1.2 2024/07/11}}
% \item[|picture|] to draw the arrow with the \LaTeX{}
% |picture| environment.
% \end{description}
@@ -1196,7 +1278,7 @@ $ \overbandedarrow{v} \qquad \overbandedarrow{AB} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand[tikz]{myoverarrow}{arrows={Bar-Bar}, center arrow}
+\NewOverArrowCommand[tikz]{\myoverarrow}{arrows={Bar-Bar}, center arrow}
$ \myoverarrow{v} \qquad \myoverarrow{ABCD} $
\end{dispExample}
% \iffalse
@@ -1207,19 +1289,23 @@ $ \myoverarrow{v} \qquad \myoverarrow{ABCD} $
% \begin{docCommands}{%
% {
% doc name=TestOverArrow,
-% doc parameter=\oarg{pattern}\marg{name},
+% doc parameter=\oarg{pattern}\marg{command},
% },
% {
% doc name=TestOverArrow*,
-% doc parameter=\oarg{pattern}\marg{name},
+% doc parameter=\oarg{pattern}\marg{command},
% },
% }
-% Displays the result of the command \meta{name} for patterns of various
+% Displays the result of the command \meta{command} for patterns of various
% lengths and for the four math styles. A custom \meta{pattern} can be added
% to the predefined ones.
%
% The starred variant \cs{TestOverArrow*} displays a full report, including
-% kerning tests of the commands \cs{\meta{name}} and \cs{\meta{name}*} .
+% kerning tests of the commands \meta{command} and \meta{command}|*|.
+%
+% \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+% \meta{command} can be given with or without backslash (prior to the version
+% 1.2, only the name, without backslash, was accepted).
%
% \iffalse
%<*example>
@@ -1261,9 +1347,9 @@ $ \myoverarrow{v} \qquad \myoverarrow{ABCD} $
% \begin{docCommand}{smallermathstyle}{}
% Applies the next math style, smaller than the current. That is:
% \begin{itemize}
-% \item sets \cs{scriptstyle} if the current math style is \cs{displaystyle}
+% \item uses \cs{scriptstyle} if the current math style is \cs{displaystyle}
% or \cs{textstyle};
-% \item sets \cs{scriptscriptstyle} if the current math style is
+% \item uses \cs{scriptscriptstyle} if the current math style is
% \cs{scriptstyle};
% \item does nothing if the current math style is \cs{scriptscriptstyle}.
% \end{itemize}
@@ -1283,19 +1369,20 @@ $ \displaystyle AB \quad \smallermathstyle AB
%
% \end{docCommand}
%
-% \subsubsection{Useful lengths for TikZ or \texttt{picture} environment}
+% \subsubsection{Useful lengths for TikZ, PSTricks or \texttt{picture} environment}
%
-% Arrows drawn with graphic languages, like PGF/TikZ or the \LaTeX{} |picture|
-% environment, are not extensible. The three lengths \refLen*{overarrowlength},
-% \refLen*{overarrowthickness} and \refLen*{overarrowsmallerthickness} are
-% computed at each utilisation of a command set with the |tikz| or |picture|
-% method, so they can be used in drawing commands.
+% Arrows drawn with graphic languages, like PGF/TikZ, PSTricks or the \LaTeX{}
+% |picture| environment, are not extensible. The three lengths
+% \refLen*{overarrowlength}, \refLen*{overarrowthickness} and
+% \refLen*{overarrowsmallerthickness} are computed at each utilisation of
+% a command set with the |tikz|, |pstricks| or |picture| method, so they can be
+% used in drawing commands.
%
% \iffalse
%<*example>
% \fi
\begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand[tikz]{overparabola}{%
+\NewOverArrowCommand[tikz]{\overparabola}{%
path options={x=\overarrowlength, line width=\overarrowsmallerthickness},
path={(0,0) parabola[parabola height=0.2\overarrowlength] (1,0)},
arrows={-}, center arrow, min length=30,
@@ -1320,8 +1407,13 @@ $\scriptstyle \overparabola{v} \qquad \overparabola{ABCD} $ \par
% \item |\fontdimen 8 \scriptscriptfont 3| in
% \cs{scriptscriptstyle}.
% \end{itemize}
+%
+% \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+% Theses settings are adapted when the package \pkg{unicode-math} is loaded
+% (using \cs{Umathoverbarrule} with \LuaLaTeX{} or |\fontdimen 54|, family~2
+% with \XeLaTeX{} --- see the manual of \pkg{unicode-math}).
% \end{docLength}
-%
+%
% \begin{docLength}{overarrowsmallerthickness}
% Is set to the default rule thickness of the next smaller math style.
% That is:
@@ -1330,6 +1422,11 @@ $\scriptstyle \overparabola{v} \qquad \overparabola{ABCD} $ \par
% \item |\fontdimen 8 \scriptscriptfont 3| in \cs{scriptstyle} or
% \cs{scriptscriptstyle}.
% \end{itemize}
+%
+% \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+% Theses settings are adapted when the package \pkg{unicode-math} is loaded
+% (using \cs{Umathoverbarrule} with \LuaLaTeX{} or |\fontdimen 54|, family~2
+% with \XeLaTeX{} --- see the manual of \pkg{unicode-math}).
% \end{docLength}
%
% \subsubsection{Vectors macros}
@@ -1507,8 +1604,9 @@ $ \esvectvv*{\imath}{0} \quad \esvectvv*{e}{r} \quad \esvectvv*{L}{\Delta} $
% page~\pageref{sec:macro-for-commands-creation} for the documentation of
% commands creation):
% \begin{itemize}
-% \item \meta{number}| = 0 | for the |symb| method (default);
+% \item \meta{number}| = 0 | for the |symb| method (method by default);
% \item \meta{number}| = 12| for the |tikz| method;
+% \item \meta{number}| = 12| for the |pstricks| method;
% \item \meta{number}| = 18| for the |picture| method.
% \end{itemize}
%
@@ -1516,7 +1614,7 @@ $ \esvectvv*{\imath}{0} \quad \esvectvv*{e}{r} \quad \esvectvv*{L}{\Delta} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{overlongarrow}{min length=50}
+\NewOverArrowCommand{\overlongarrow}{min length=50}
$ \overlongarrow{v} \qquad \overlongarrow{ABCDEF} $
\end{dispExample}
% \iffalse
@@ -1550,7 +1648,7 @@ $ \overlongarrow{v} \qquad \overlongarrow{ABCDEF} $
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{underhooks}{%
+\NewOverArrowCommand{\underhooks}{%
start={\lhook}, end={\rhook}, trim=1,
arrow under, shift leftright=-4,
}
@@ -1580,8 +1678,8 @@ $ \underhooks{v} \qquad \underhooks{AB} $
% page~\pageref{sec:macro-for-commands-creation} for the documentation of
% commands creation):
% \begin{itemize}
-% \item \meta{number}| = 0 | for the |symb| method (default);
-% \item \meta{number}| = -2| for the |tikz| and |picture| methods.
+% \item \meta{number}| = 0 | for the |symb| method (method by default);
+% \item \meta{number}| = -2| for the |tikz|, |pstricks| and |picture| methods.
% \end{itemize}
%
%\end{docKey}
@@ -1590,7 +1688,7 @@ $ \underhooks{v} \qquad \underhooks{AB} $
%<*example>
% \fi
\begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand{lookback}{%
+\NewOverArrowCommand{\lookback}{%
start={\leftarrow}, end={\rightharpoondown},
shift left=-50, shift right=-10,
}
@@ -1658,7 +1756,7 @@ $ \lookback{\text{look back}} $
%<*example>
% \fi
\begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand{overharpoonsdown}{%
+\NewOverArrowCommand{\overharpoonsdown}{%
start=\leftharpoondown, end=\rightharpoondown, center arrow,
space before arrow=-0.2ex, space after arrow=0.3ex,
}
@@ -1693,7 +1791,7 @@ $ \dot{\overharpoonsdown{v}} \qquad \ddot{\overharpoonsdown{AB}}$
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{autosub}{detect subscripts}
+\NewOverArrowCommand{\autosub}{detect subscripts}
$ \imath_0 \qquad \autosub{\imath}_0 \qquad
{\autosub{\imath}}_0 \qquad {\autosub*{\imath}}_0 $
\end{dispExample}
@@ -1745,7 +1843,7 @@ $ \imath_0 \qquad \autosub{\imath}_0 \qquad
%<*example>
% \fi
\begin{dispExample}
-\NewOverArrowCommand{smalleroverrightarrow}{%
+\NewOverArrowCommand{\smalleroverrightarrow}{%
start={\smallermathstyle\relbar},
middle={\smallermathstyle\relbareda},
end={\rightarrow},
@@ -1784,16 +1882,26 @@ $ \smalleroverrightarrow{v} \qquad \smalleroverrightarrow{AB} $
% Clears \refKey{trim start}, \refKey{trim middle} and \refKey{trim end}.
% \end{docKey}
%
-%\begin{docKey}{middle config}{=auto\textbar relbar\textbar relbareda}{no default}
-% Sets a suitable configuration for the keys \refKey{middle} and \refKey{trim middle}:
+%\begin{docKey}{middle config}{=auto\textbar relbar\textbar relbareda\textbar harrowextender}{no default}
+% Sets a suitable configuration for the keys \refKey{middle} and \refKey{trim
+% middle}:
% \begin{description}
-% \item[For \refKey*{middle config}| = relbar|,] \refKey{middle} is set to
-% \cs{relbar} \symb{\relbar} and \refKey{trim middle} to |2.5|.
-% \item[For \refKey*{middle config}| = relbareda|,] \refKey{middle} is set to
-% \cs{relbareda} \symb{\relbareda} and \refKey{trim middle} to |1|.
-% \item[For \refKey*{middle config}| = auto|,] \refKey{middle} is set with
-% \refKey*{middle config}| = relabareda| if the option \refOpt{esvect} is set
-% (which is the default) and \refKey*{middle config}| = relabar| if not.
+% \item[For \refKey*{middle config}| = relbar|,] \refKey{middle} is set to
+% \cs{relbar} \symb{\relbar} and \refKey{trim middle} to |2.5|.
+% \item[For \refKey*{middle config}| = relbareda|,] \refKey{middle} is set to
+% \cs{relbareda} \symb{\relbareda} and \refKey{trim middle} to |1|.
+% \item[For \refKey*{middle config}| = harrowextender|,]
+% \tcbdocmarginnote{\tcbdocnew{v1.2 2024/07/11}}
+% \refKey{middle} is set to \cs{harrowextender} and \refKey{trim middle} to
+% |0|.
+% \item[For \refKey*{middle config}| = auto|,]
+% \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+% if \cs{harrowextender} is provided by the math font\footnote{See the
+% documentation of the package \pkg{unicode-math}.}, \refKey{middle} is set
+% with \refKey*{middle config}| = harrowextender|. If \cs{harrowextender}
+% isn't availlable, \refKey{middle} is set with \refKey*{middle config}%
+% | = relbareda| if the option \refOpt{esvect} is set (which is the
+% default) and \refKey*{middle config}| = relabar| if not.
% \end{description}
%\end{docKey}
%
@@ -1880,14 +1988,14 @@ $ \smalleroverrightarrow{v} \qquad \smalleroverrightarrow{AB} $
% commands creation), the |tikz| method is chosen, then the arrow is drawn by
% the command:
% \begin{center}
-% \cs{tikz}|[|\refKey*{tikz options}|]{|\refKey*{tikz command}|}|
+% \cs{tikz}|[<|\refKey*{tikz options}|>]{<|\refKey*{tikz command}|>}|
% \end{center}
% \noindent where \refKey{tikz options} and \refKey{tikz command} are two keys
% described below. When \refKey*{tikz command} is let unset, the drawing command
% turns into:
% \begin{center}
-% \cs{tikz}|[|\refKey*{tikz options}|]{|\cs{draw}|[|\refKey*{path options}|]|
-% \refKey*{path}|;}|
+% \cs{tikz}|[<|\refKey*{tikz options}|>]{|\cs{draw}|[<|\refKey*{path options}|>]|
+% |<|\refKey*{path}|>;}|
% \end{center}
%
% The best way to customise |tikz| arrows is then to set the keys \refKey{tikz
@@ -1899,7 +2007,7 @@ $ \smalleroverrightarrow{v} \qquad \smalleroverrightarrow{AB} $
%<*example>
% \fi
\begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand[tikz]{overdotteddoublearrow}{%
+\NewOverArrowCommand[tikz]{\overdotteddoublearrow}{%
add tikz options={blue}, add path options={densely dotted},
arrows={->[scale=0.5]>[scale=0.5]}, thinner,
min length=20, space after arrow={0.3ex},
@@ -1910,16 +2018,18 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%</example>
% \fi
%
+% \bigskip
+%
% The following keys are available when the |tikz| method is chosen.
%
-% \begin{docKey}[][before lower=\medskip\par]
+% \begin{docKey}[][before lower=\bigskip\par]
% {tikz options}{=\marg{TikZ options}}
% {no default, initially |x=|\cs{overarrowlength}|, line
% width=|\cs{overarrowthickness}}
% Sets TikZ options to \meta{TikZ options}.
%\end{docKey}
%
-% \begin{docKey}[][before lower=\medskip\par]
+% \begin{docKey}[][before lower=\bigskip\par]
% {path options}{=\marg{path options}}
% {no default, initially |arrows={-Classical TikZ Rightarrow}, cap=round|}
% Sets TikZ path options to \meta{path options}.
@@ -1957,21 +2067,102 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% value \cs{draw}|[|\refKey*{path options}|] |\refKey*{path}|;| is used.
%\end{docKey}
%
+% \subsubsection{PSTricks settings}
+% \label{sec:pstricks-keys}
+%
+% \tcbdocmarginnote{\tcbdocnew{v1.2 2024/07/11}}
+% If, at command creation (see section~\ref{sec:macro-for-commands-creation},
+% page~\pageref{sec:macro-for-commands-creation} for the documentation of
+% commands creation), the |pstricks| method is chosen, then the arrow is drawn
+% by:
+% \begin{flushleft}\leftskip=3cm
+% \cs{begin}|{pspicture}<|\refDoc{key:pstricks}*{geometry}|>%|\\
+% \quad\cs{psset}|{linewidth=<|\refDoc{key:pstricks}*{line thickness}|>}%|\\
+% \quad\cs{psset}|{<|\refKey*{psset}|>}%|\\
+% \quad|<|\refKey*{pstricks command}|>%|\par
+% \cs{end}|{pspicture}%|
+% \end{flushleft}
+% \noindent where \refDoc{key:pstricks}{geometry}, \refDoc{key:pstricks}{line
+% thickness} \refKey*{psset} and \refKey*{pstricks command} are four keys
+% described below.
+%
+%\iffalse
+%<*example>
+% \fi
+\begin{dispExample*}{grow to left by=-2em}
+\NewOverArrowCommand[pstricks]{\overloopandarrow}{
+ pstricks command={%
+ \pscurve{->}(0,0)
+ (0.6\overarrowlength,0.05\overarrowlength)
+ (0.5\overarrowlength,0.1\overarrowlength)
+ (0.4\overarrowlength,0.05\overarrowlength)
+ (\overarrowlength,0)
+ },
+ geometry={(0,0)(\overarrowlength,0.2\overarrowlength)},
+ space after arrow=2pt, min length=20,
+ geometry={(0,0)(\overarrowlength,0.2\overarrowlength)},
+}
+$ \overloopandarrow{v} \qquad \overloopandarrow{AB} $
+\end{dispExample*}
+% \iffalse
+%</example>
+% \fi
+%
+% \bigskip
+%
+% The following keys are available when the |pstricks| method is chosen.
+%
+% \begin{docKey}[][before lower=\bigskip\par]
+% {pstricks command}{=\marg{pstricks command}}
+% {no default, initially \cs{psline}|\{->\}(0,0)(|\refCom*{overarrowlength}|,0)|}
+% Sets the |pspicture| command to \meta{pstricks command}.
+% \end{docKey}
+%
+% \begin{docKey}[][doc label={pstricks:arrow}]%^^A same name as for TikZ
+% {arrow}{=\marg{arrow}}
+% {no default, initially |->|}
+% Sets \refKey{pstricks command} with
+% |\psline{|\meta{arrow}|}(0,0)(|\refCom*{overarrowlength}|,0)|.
+% \end{docKey}
+%
+% \begin{docKey}[][]
+% {psset}{=\marg{pstricks setting}}
+% {no default, initially empty}
+% Sets \meta{pstricks setting} with \cs{psset}.
+% \end{docKey}
+%
+% \begin{docKey}[][before lower=\bigskip\par, doc label={pstricks:geometry}]%^^A same name as for picture
+% {geometry}{=\marg{pstricks geometry specification}}
+% {no default, initially |(0,-0.5ex)(|\refCom*{overarrowlength}|,1ex)|}
+% Sets the |pspicture| geometry to \meta{pstricks geometry specification}.
+% \end{docKey}
+%
+% \begin{docKey}[][doc label={pstricks:line thickness}]%^^A same name as for TikZ
+% {line thickness}{=\marg{length}}{no default}
+% Sets the line thickness to \meta{length}.
+% \end{docKey}
+%
+% \begin{docKey}[][doc label={pstricks:thinner}]%^^A same name as for TikZ
+% {thinner}{}{}
+% Sets the keys \refDoc{key:pstricks}{line thickness} with
+% \cs{overarrowsmallerthickness}.
+% \end{docKey}
+%
% \subsubsection{Picture environment settings}
% \label{sec:picture-keys}
%
% If, at command creation (see section~\ref{sec:macro-for-commands-creation},
% page~\pageref{sec:macro-for-commands-creation} for the documentation of
% commands creation), the |picture| method is chosen, then the arrow is drawn
-% with by:
+% by:
% \begin{flushleft}\leftskip=3cm
-% \cs{begin}|{picture}|\refKey*{geometry}|%|\\
-% \quad\cs{linethickness}|{|\refDoc{key:picture}*{line thickness}|}%|\\
-% \quad\refKey*{picture command}|%|\par
+% \cs{begin}|{picture}<|\refDoc{key:picture}*{geometry}|>%|\\
+% \quad\cs{linethickness}|{<|\refDoc{key:picture}*{line thickness}|>}%|\\
+% \quad|<|\refKey*{picture command}|>%|\par
% \cs{end}|{picture}%|
% \end{flushleft}
-% \noindent where \refKey{geometry}, \refDoc{key:picture}{line thickness} and
-% \refKey*{picture command} are three keys described below.
+% \noindent where \refDoc{key:picture}{geometry}, \refDoc{key:picture}{line
+% thickness} and \refKey*{picture command} are three keys described below.
%
%\iffalse
%<*example>
@@ -1979,7 +2170,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\begin{dispExample*}{grow to left by=-2em}
% ^^A \arc and \roundcap commands are from the pict2e package
% ^^A this example needs \usepackage{pict2e} in the preamble
- \NewOverArrowCommand[picture]{overarc}{%
+ \NewOverArrowCommand[picture]{\overarc}{%
picture command={%
\roundcap
\put(0.5\overarrowlength,0){\arc[180,0]{0.6\overarrowlength}}
@@ -1994,15 +2185,18 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% \iffalse
%</example>
% \fi
-% The following keys are available when the |picture| method is chosen.
%
-% \begin{docKey}[][before lower=\medskip\par]
+% \bigskip
+%
+%The following keys are available when the |picture| method is chosen.
+%
+% \begin{docKey}[][before lower=\bigskip\par]
% {picture command}{=\marg{picture command}}
% {no default, initially \cs{put}|(0,0)\{|\cs{vector}|(1,0)\{|\refCom*{overarrowlength}|\}\}|}
% Sets picture command to \meta{picture command}.
% \end{docKey}
%
-% \begin{docKey}[][before lower=\medskip\par]
+% \begin{docKey}[][before lower=\bigskip\par, doc label={picture:geometry}]%^^A same name as for pstricks
% {geometry}{=\marg{picture geometry specification}}
% {no default, initially |(|\refCom*{overarrowlength}|,1ex)(0,-0.5ex)|}
% Sets picture geometry to \meta{picture geometry specification}.
@@ -2029,6 +2223,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% \subsubsection{Advanced commands}
%
% \begin{docCommand}{SetOverArrowsSubscriptCommand}{\marg{command}}
+% \tcbdocmarginnote{\tcbdocnew{v1.1 2023/02/15}}
% Sets to \meta{command} the command used for subscript detection, when this
% is enabled by the key \refKey{detect subscripts} (see the
% section~\ref{sec:non-standard-subscripts},
@@ -2131,6 +2326,12 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% \symb{\relbareda} from the \pkg{esvect} package. This can be fixed with the
% \refOpt{noesvect} option.
%
+% Depending of the math font, predefined commands may be faulty. For example, at
+% the time of writing, hooks vertical position is incorrect with \emph{Asana
+% Math} or \cs{harrowextender} is badly positioned with \emph{Stix two Math}
+% (for the smallest math styles), \emph{Libertinus Math} and
+% \emph{GFSNeohellenicMath}.
+%
% \subsubsection{Detection of non standard subscripts}
% \label{sec:non-standard-subscripts}
%
@@ -2225,11 +2426,25 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \subsection{Changelog}
%
-% \begin{description}
-% \item[v1.1] Support for non-standard subscripts
-% \item[v1.0.1] Bug fix for under* options.
-% \item[v1.0] Initial version.
-% \end{description}
+% \begingroup
+% \renewcommand{\arraystretch}{2}
+% \begin{tabular*}{\linewidth}
+% {@{} l @{\extracolsep{\fill}} p{0.9\linewidth} @{}}
+% v1.2 & \noindent\par\vspace{-\baselineskip}
+% \begin{itemize}[left=0pt, topsep=0pt, partopsep=0pt]
+% \item Fix compatibility issues with \pkg{unicode-math}.
+% \item Allow to draw the arrow with PSTricks.
+% \item Make \pkg{esvect} handle all font sizes.
+% \item Rewrite starred variant for better performances.
+% \end{itemize}
+% \\
+% v1.1 & Support for non-standard subscripts.
+% \\
+% v1.0.1 & Bug fix for under* options.
+% \\
+% v1.0 & Initial version.
+% \end{tabular*}
+% \endgroup
%
% \StopEventually{}
%
@@ -2250,6 +2465,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\newif\ifovar@option@oldarrows@
\newif\ifovar@option@esvect@ \ovar@option@esvect@true \PassOptionsToPackage{f}{esvect}
\newif\ifovar@option@tikz@
+\newif\ifovar@option@pstricks@
\newif\ifovar@option@pstarrows@
\newif\ifovar@detectsubscripts@
\newif\ifovar@option@subother@
@@ -2280,6 +2496,8 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \subsubsection*{Declaration of options}
%
+% \changes{v1.2}{2024/07/11}{Add option pstricks}
+%
% \begin{macrocode}
\DeclareOption{esvect}{\ovar@option@esvect@true}
\DeclareOption{noesvect}{\ovar@option@esvect@false}
@@ -2293,6 +2511,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\DeclareOption{esvecth}{\ovar@option@esvect@true\PassOptionsToPackage{h}{esvect}}
\DeclareOption{old-arrows}{\ovar@option@oldarrows@true}
\DeclareOption{tikz}{\ovar@option@tikz@true}
+\DeclareOption{pstricks}{\ovar@option@pstricks@true}
\DeclareOption{pstarrows}{\ovar@option@pstarrows@true}
\DeclareOption{subscripts}{\ovar@detectsubscripts@true}
\DeclareOption{subother}{\ovar@option@subother@true}
@@ -2381,23 +2600,42 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\RequirePackage{amsmath}
\RequirePackage{etoolbox}
% \end{macrocode}
+%
% Option \refOpt{old-arrows}. Configuration of arrows used for
% predefined commands.
+% \changes{v1.2}{2024/07/11}{Use \cs{def} instead of \cs{let} for
+% \cs{ovar@rightarrow} and \cs{ovar@leftarrow}}
% \begin{macrocode}
-\let\ovar@rightarrow\rightarrow
-\let\ovar@leftarrow\leftarrow
+\def\ovar@rightarrow{\rightarrow}
+\def\ovar@leftarrow{\leftarrow}
\ifovar@option@oldarrows@
\RequirePackage[old]{old-arrows}
- \let\ovar@rightarrow\varrightarrow
- \let\ovar@leftarrow\varleftarrow
+ \def\ovar@rightarrow{\varrightarrow}
+ \def\ovar@leftarrow{\varleftarrow}
\fi
% \end{macrocode}
+%
% Option \refOpt{esvect}.
% \begin{macrocode}
\ifovar@option@esvect@
\RequirePackage{esvect}
+% \end{macrocode}
+% \changes{v1.2}{2024/07/11}{Fix esvect font sizes}
+% Fix font description in |uesvect.fd| to allow any sizes (taken from Enrico
+% Gregorio, \url{https://tex.stackexchange.com/a/689863/})
+% \begin{macrocode}
+ \DeclareFontFamily{U}{esvect}{}
+ \DeclareFontShape{U}{esvect}{m}{n}{
+ <-5.5> vect5
+ <5.5-6.5> vect6
+ <6.5-7.5> vect7
+ <7.5-8.5> vect8
+ <8.5-9.5> vect9
+ <9.5-> vect10
+ }{}
\fi
% \end{macrocode}
+%
% Option \refOpt{tikz}.
% \begin{macrocode}
\ifovar@option@tikz@
@@ -2405,6 +2643,14 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\usetikzlibrary{arrows.meta}
\fi
% \end{macrocode}
+%
+% Option \refOpt{pstricks}.
+% \begin{macrocode}
+\ifovar@option@pstricks@
+ \RequirePackage{pstricks-add}
+\fi
+% \end{macrocode}
+%
% Option \refOpt{pstarrows}.
% \begin{macrocode}
\ifovar@option@pstarrows@
@@ -2412,6 +2658,43 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\fi
% \end{macrocode}
%
+% Add hook rules to apply settings after \pkg{unicode-math}.
+% \begin{macrocode}
+\DeclareHookRule{begindocument}{overarrows}{after}{unicode-math-luatex}
+\DeclareHookRule{begindocument}{overarrows}{after}{unicode-math-xetex}
+% \end{macrocode}
+%
+% \changes{v1.2}{2024/07/11}{Use \cs{harrowextender}, if availlable.}
+% Set \cs{ovar@auto@middle} and \cs{ovar@auto@trim@middle}, used by
+% configurations made with \refKey*{middle config}|=auto|.
+% \begin{macrocode}
+\AddToHook{begindocument}[overarrows]
+ {%
+ \ifdef{\relbareda}
+ {%
+ \gdef\ovar@auto@middle{\relbareda}
+ \gdef\ovar@auto@trim@middle{1}
+ }
+ {%
+ \gdef\ovar@auto@middle{\relbar}
+ \gdef\ovar@auto@trim@middle{2.5}
+ }%
+ \@ifpackageloaded{unicode-math}
+ {%
+% \end{macrocode}
+% Test of \cs{harrowextender} availability taken from Enrico Gregorio,
+% (\url{https://tex.stackexchange.com/a/218407/}).
+% \begin{macrocode}
+ \check@mathfonts
+ \iffontchar\textfont\tw@\string"23AF
+ \gdef\ovar@auto@middle{\mathrel\harrowextender}
+ \gdef\ovar@auto@trim@middle{0}
+ \fi
+ }
+ {}%
+ }
+% \end{macrocode}
+%
% \subsection*{Configuration of subscripts detection}
%
% \changes{v1.1}{2023/02/15}{Support for non-standard subscripts}
@@ -2424,6 +2707,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% \end{macro}
%
% Initial configuration.
+% \changes{v1.2}{2024/07/11}{Remove useless \cs{AtBeginDocument}}
% \begin{macrocode}
\SetOverArrowsSubscriptCommand{_}
% \end{macrocode}
@@ -2432,7 +2716,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\ifovar@option@subother@
\begingroup
\catcode `_=12
- \AddToHook{begindocument/end}{\SetOverArrowsSubscriptCommand{_}}
+ \SetOverArrowsSubscriptCommand{_}%
\endgroup
\fi
% \end{macrocode}
@@ -2441,7 +2725,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\ifovar@option@subactive@
\begingroup
\catcode `_=13
- \AddToHook{begindocument/end}{\SetOverArrowsSubscriptCommand{_}}
+ \SetOverArrowsSubscriptCommand{_}%
\endgroup
\fi
% \end{macrocode}
@@ -2662,12 +2946,25 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
}
}
},
+% \end{macrocode}
+% \changes{v1.2}{2024/07/11}{Add config \refKey*{middle config}|=harrowextender|}
+% \begin{macrocode}
+ middle config/harrowextender/.code={%
+ \pgfkeysalso{%
+ middle={\harrowextender},
+ trim middle={0},
+ }
+ },
+% \end{macrocode}
+% Set \refKey*{middle config} with (hopefully) a good configuration. It would be
+% better to reuse the previous \refKey*{middle config} settings, but we have to
+% wait for the |begindocument| hook to know which one to use.
+% \begin{macrocode}
middle config/auto/.code={%
- \ifovar@option@esvect@
- \pgfkeysalso{middle config=relbareda}
- \else
- \pgfkeysalso{middle config=relbar}
- \fi
+ \pgfkeysalso{%
+ middle={\ovar@auto@middle},
+ trim middle={\ovar@auto@trim@middle},
+ }
},
% \end{macrocode}
% \refKey{amsmath}.
@@ -2775,6 +3072,59 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
}
% \end{macrocode}
%
+% \subsubsection*{Keys for the \texttt{pstricks} method}
+%
+% \changes{v1.2}{2024/07/11}{Add the method pstricks}
+%
+% \begin{macrocode}
+\SetOverArrowsMethod[lens]{pstricks}{%
+% \end{macrocode}
+% Arrow macro.
+% \begin{macrocode}
+ no arrow macro hook/.code={%
+ \ovar@set{%
+ arrow macro/.expanded={%
+ $\noexpand\mkern \expandonce{\ovar@shift@left} mu\noexpand\relax$%
+ \noexpand\begin{pspicture}\expandonce{\ovar@pstricks@geometry}%
+ \noexpand\psset{linewidth=\expandonce{\ovar@pstricks@linethickness}}%
+ \noexpand\psset{\expandonce{\ovar@pstricks@psset}}%
+ \expandonce{\ovar@pstricks@command}%
+ \noexpand\end{pspicture}%
+ $\noexpand\mkern \expandonce{\ovar@shift@right} mu\noexpand\relax$%
+ }
+ }
+ },
+% \end{macrocode}
+% Pstricks parts: \refKey{pstricks command}, \refKey{psset},
+% \refDoc{key:pstricks}{geometry}, \refDoc{key:pstricks}{line thickness}.
+% \begin{macrocode}
+ pstricks command/.store in=\ovar@pstricks@command,
+ psset/.store in=\ovar@pstricks@psset,
+ geometry/.store in=\ovar@pstricks@geometry,
+ line thickness/.store in=\ovar@pstricks@linethickness,
+ pstricks command/.value required,
+ psset/.value required,
+ geometry/.value required,
+ line thickness/.value required,
+% \end{macrocode}
+% Pstricks handy key: \refDoc{key:pstricks}{arrow}, \refDoc{key:pstricks}{thinner}.
+% \begin{macrocode}
+ arrow/.style={pstricks command={\psline{##1}(0,0)(\overarrowlength,0)}},%
+ arrow/.value required,%
+ thinner/.style={line thickness={\overarrowsmallerthickness}},%
+ thinner/.value forbidden,%
+% \end{macrocode}
+% Initial configuration.
+% \begin{macrocode}
+ shift right=-2,
+ min length=12,
+ geometry={(0,-0.5ex)(\overarrowlength,0.5ex)},%
+ line thickness={\overarrowthickness},%
+ arrow={->},%
+ psset={},%
+}
+% \end{macrocode}
+%
% \subsubsection*{Keys for the \texttt{picture} method}
%
% \begin{macrocode}
@@ -2795,7 +3145,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
}
},
% \end{macrocode}
-% Picture parts: \refKey{picture command}, \refKey{geometry},
+% Picture parts: \refKey{picture command}, \refDoc{key:picture}{geometry},
% \refDoc{key:picture}{line thickness}.
% \begin{macrocode}
picture command/.store in=\ovar@picture@command,
@@ -2831,9 +3181,9 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
Previous definition will be overridden}
}{}
% \end{macrocode}
-% Use a default value of |3.5 mu|, as recommended by egreg (see
+% Use a default value of |3.5 mu|, as recommended by Enrico Gregorio (see
% \url{https://tex.stackexchange.com/a/471736}). \cs{joinrel}
-% uses a value of 3 mu.
+% uses a value of 3 mu.
% \begin{macrocode}
\DeclareRobustCommand{\xjoinrel}[1][3.5]{\mathrel{\mkern-#1mu}}
% \end{macrocode}
@@ -2872,7 +3222,6 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\newlength{\overarrowlength}
\newlength{\overarrowthickness}
\newlength{\overarrowsmallerthickness}
-\newlength{\ovar@extralength}
\newlength{\ovar@tempdim}
% \end{macrocode}
%
@@ -2891,26 +3240,75 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
% \end{macro}
%
% \begin{macro}{\ovar@set@arrowthickness}
+% \begin{macro}{\ovar@set@arrowthickness@UM@lua}
% Sets \refLen{overarrowthickness} and \refLen{overarrowsmallerthickness}.\\
-% |#1|: arrow length\\
-% |#2|: math style
+% |#1|: math style
+%
+% Set to the default rule thickness of the current math style, normaly given by
+% \cs{fontdimen} 8 family 3. With \pkg{unicode-math}, use instead:
+% \begin{itemize}
+% \item \cs{fontdimen} 54 family 2 with XeTeX,
+% \item \cs{Umathoverbarrule} with LuaTex.
+% \end{itemize}
+% \changes{v1.2}{2024/07/11}{Get the correct rule thickness with unicode-math}
% \begin{macrocode}
-\def\ovar@set@arrowthickness#1{% use rule thickness=\fontdimen 8 font family 3
+\def\ovar@rulethickness@fontdimen{8}
+\def\ovar@rulethickness@family{3}
+\def\ovar@set@arrowthickness#1{%
\ifx#1\displaystyle%
- \overarrowthickness = \fontdimen 8 \textfont 3%
- \overarrowsmallerthickness = \fontdimen 8 \scriptfont 3%
+ \overarrowthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \textfont \ovar@rulethickness@family%
+ \overarrowsmallerthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \scriptfont \ovar@rulethickness@family%
\else\ifx#1\textstyle%
- \overarrowthickness = \fontdimen 8 \textfont 3%
- \overarrowsmallerthickness = \fontdimen 8 \scriptfont 3%
+ \overarrowthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \textfont \ovar@rulethickness@family%
+ \overarrowsmallerthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \scriptfont \ovar@rulethickness@family%
\else\ifx#1\scriptstyle%
- \overarrowthickness = \fontdimen 8 \scriptfont 3%
- \overarrowsmallerthickness = \fontdimen 8 \scriptscriptfont 3%
+ \overarrowthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \scriptfont \ovar@rulethickness@family%
+ \overarrowsmallerthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \scriptscriptfont \ovar@rulethickness@family%
\else%
- \overarrowthickness = \fontdimen 8 \scriptscriptfont 3%
+ \overarrowthickness =
+ \fontdimen \ovar@rulethickness@fontdimen \scriptscriptfont \ovar@rulethickness@family%
\overarrowsmallerthickness = \overarrowthickness%
\fi\fi\fi%
}
% \end{macrocode}
+% \pkg{unicode-math} with LuaTeX version.
+% \begin{macrocode}
+\def\ovar@set@arrowthickness@UM@lua#1{%
+ \overarrowthickness = \Umathoverbarrule #1
+ \ifx#1\displaystyle%
+ \overarrowsmallerthickness = \Umathoverbarrule \textstyle%
+ \else\ifx#1\textstyle%
+ \overarrowsmallerthickness = \Umathoverbarrule \scriptstyle%
+ \else%
+ \overarrowsmallerthickness = \Umathoverbarrule \scriptscriptstyle%
+ \fi\fi%
+}
+% \end{macrocode}
+% Test which version to use.
+% \begin{macrocode}
+\AddToHook{begindocument}[overarrows]
+ {%
+ \@ifpackageloaded{unicode-math-luatex}
+ {%
+ \global\let\ovar@set@arrowthickness\ovar@set@arrowthickness@UM@lua
+ }
+ {%
+ \@ifpackageloaded{unicode-math-xetex}
+ {%
+ \gdef\ovar@rulethickness@fontdimen{54}
+ \gdef\ovar@rulethickness@family{2}
+ }
+ {}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
% \subsubsection*{Stack macros}
@@ -3017,18 +3415,39 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \subsubsection*{Macro for commands creation}
%
+% \changes{v1.2}{2024/07/11}{Allow backslash in command name}
+% In the initial version, the commands names must be given as csname (without
+% backslash). To harmonize the syntax with standard \cs{NewDocumentCommand},
+% define an argument processor so that both
+% \cs{NewOverArrowCommand}|{\myarrow}| and
+% \cs{NewOverArrowCommand}|{myarrow}| are accepted.
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_new_protected:Npn \__overarrows_processor_strip_escape_char:n #1
+ {
+ \regex_match:nnTF { ^\cC. } { #1 }
+ { \tl_set:Nx \ProcessedArgument { \cs_to_str:N #1 } }
+ { \tl_set:Nx \ProcessedArgument { #1 } }
+ }
+\cs_new_eq:NN \ovar@cmdname@processor \__overarrows_processor_strip_escape_char:n
+\ExplSyntaxOff
+% \end{macrocode}
+%
% \begin{macro}{\DeclareOverArrowCommand}
% \begin{macrocode}
-\NewDocumentCommand{\DeclareOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\DeclareOverArrowCommand}{
+ O{symb} >{\ovar@cmdname@processor} m m
+}{%
\begingroup
\ovar@set@common
\ifcsdef{ovar@set@#1}{%
\csuse{ovar@set@#1}
}{%
\PackageError{overarrows}{Unknown method #1}
- {Try with 'symb', 'tikz' or 'picture'}
+ {Try with 'symb', 'tikz', 'pstriks' or 'picture'}
}
- \ovar@set{#3 }
+ \ovar@set{#3}
\ifdef{\ovar@macro@arrow}{}{%
\ovar@set{no arrow macro hook}
}
@@ -3050,7 +3469,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\ifovar@detectsubscripts@%
\csgdef{ovar@#2@auto}##1{%
% \end{macrocode}
-% \vspace{-2\smallskipamount}%^^A remove space between code blocs
+% \vspace{-2\smallskipamount}%^^A remove space between code blocks
% \changes{v1.1}{2023/02/15}{Support for non-standard subscripts}
% \begin{macrocode}
\@ifnextchar \ovar@subcmd {%
@@ -3080,7 +3499,9 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \begin{macro}{\ProvideOverArrowCommand}
% \begin{macrocode}
-\NewDocumentCommand{\ProvideOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\ProvideOverArrowCommand}{
+ O{symb} >{\ovar@cmdname@processor} m m
+}{%
\ifcsdef{#2}{}{
\DeclareOverArrowCommand[#1]{#2}{#3}
}
@@ -3090,7 +3511,9 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \begin{macro}{\NewOverArrowCommand}
% \begin{macrocode}
-\NewDocumentCommand{\NewOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\NewOverArrowCommand}{
+ O{symb} >{\ovar@cmdname@processor} m m
+}{%
\ifcsdef{#2}{%
\PackageError{overarrows}{Command \csname #2\endcsname already defined}%
{You have used \protect\NewOverArrowCommand\space with a command that
@@ -3105,7 +3528,9 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \begin{macro}{\RenewOverArrowCommand}
% \begin{macrocode}
-\NewDocumentCommand{\RenewOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\RenewOverArrowCommand}{
+ O{symb} >{\ovar@cmdname@processor} m m
+}{%
\ifcsundef{#2}{%
\PackageError{overarrows}{Command \csname #2\endcsname undefined}%
{You have used \protect\RenewOverArrowCommand\space with a command that was
@@ -3120,17 +3545,21 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \subsubsection*{Starred variant}
%
+% \changes{v1.2}{2024/07/11}{Use boxes in starred variant for better performances}
% \begin{macro}{\ovar@starversion}
% |#1|: definition (stack macro + arrow macro)\\
% |#2|: math style\\
% |#3|: content
% \begin{macrocode}
+\newsavebox\ovar@tempbox
\def\ovar@starversion#1#2#3{%
- #1#2{#3}%
- \settowidth{\ovar@extralength}{$\m@th#1#2{#3}$}
- \settowidth{\ovar@tempdim}{$\m@th#2{#3}$}
- \deflength{\ovar@extralength}{0.5\ovar@extralength-0.5\ovar@tempdim}%
- \kern-\ovar@extralength%
+ \sbox{\ovar@tempbox}{$\m@th #1#2{#3}$}%
+ \usebox{\ovar@tempbox}%
+% \end{macrocode}
+% Remove the extra space added by the arrow.
+% \begin{macrocode}
+ \settowidth{\ovar@tempdim}{$\m@th #2{#3}$}%
+ \kern\dimeval{0.5\ovar@tempdim - 0.5\wd\ovar@tempbox}%
}
% \end{macrocode}
% \end{macro}
@@ -3144,7 +3573,11 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\ifovar@option@esvect@
\let\esvectvv\vv
\undef\vv
- \NewOverArrowCommand{vv}{esvect, middle config=auto}
+% \end{macrocode}
+% \changes{v1.2}{2024/07/11}{Use \refKey{middle config}|=relbareda| instead of
+% \refKey{middle config}|=auto|}
+% \begin{macrocode}
+ \NewOverArrowCommand{\vv}{esvect, middle config = relbareda}
\fi
% \end{macrocode}
% \end{macro}
@@ -3152,216 +3585,231 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \subsubsection*{Predefined commands}
%
+% \changes{v1.2}{2024/07/11}{Declare predefined commands after \pkg{unicode-math} settings}
+% Declare predefined commands after \pkg{unicode-math} settings.
+%
+% \begin{macrocode}
+\AddToHook{begindocument}[overarrows]
+ {
+% \end{macrocode}
+%
% \begin{macro}{\overrightarrow}
% \begin{macrocode}
-\ifovar@option@overrightarrow@
- \DeclareOverArrowCommand{overrightarrow}{%
- amsmath, middle config=relbar,
- end=\ovar@rightarrow,
- right arrow,
- }
-\fi
+ \ifovar@option@overrightarrow@
+ \DeclareOverArrowCommand{\overrightarrow}{%
+ amsmath, middle config=relbar,
+ end=\ovar@rightarrow,
+ right arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underrightarrow}
% \begin{macrocode}
-\ifovar@option@underrightarrow@
- \DeclareOverArrowCommand{underrightarrow}{%
- amsmath, middle config=relbar,
- end=\ovar@rightarrow,
- right arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underrightarrow@
+ \DeclareOverArrowCommand{\underrightarrow}{%
+ amsmath, middle config=relbar,
+ end=\ovar@rightarrow,
+ right arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overleftarrow}
% \begin{macrocode}
-\ifovar@option@overleftarrow@
- \DeclareOverArrowCommand{overleftarrow}{%
- amsmath, middle config=relbar,
- start=\ovar@leftarrow,
- end=\relbar,
- left arrow,
- }
-\fi
+ \ifovar@option@overleftarrow@
+ \DeclareOverArrowCommand{\overleftarrow}{%
+ amsmath, middle config=relbar,
+ start=\ovar@leftarrow,
+ end=\relbar,
+ left arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underleftarrow}
% \begin{macrocode}
-\ifovar@option@underleftarrow@
- \DeclareOverArrowCommand{underleftarrow}{%
- amsmath, middle config=relbar,
- start=\ovar@leftarrow,
- end=\relbar,
- left arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underleftarrow@
+ \DeclareOverArrowCommand{\underleftarrow}{%
+ amsmath, middle config=relbar,
+ start=\ovar@leftarrow,
+ end=\relbar,
+ left arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overleftrightarrow}
% \begin{macrocode}
-\ifovar@option@overleftrightarrow@
- \DeclareOverArrowCommand{overleftrightarrow}{%
- amsmath, middle config=relbar,
- start=\ovar@leftarrow,
- end=\ovar@rightarrow,
- center arrow,
- }
-\fi
+ \ifovar@option@overleftrightarrow@
+ \DeclareOverArrowCommand{\overleftrightarrow}{%
+ amsmath, middle config=relbar,
+ start=\ovar@leftarrow,
+ end=\ovar@rightarrow,
+ center arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underleftrightarrow}
% \begin{macrocode}
-\ifovar@option@underleftrightarrow@
- \DeclareOverArrowCommand{underleftrightarrow}{%
- amsmath, middle config=relbar,
- start=\ovar@leftarrow,
- end=\ovar@rightarrow,
- center arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underleftrightarrow@
+ \DeclareOverArrowCommand{\underleftrightarrow}{%
+ amsmath, middle config=relbar,
+ start=\ovar@leftarrow,
+ end=\ovar@rightarrow,
+ center arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overrightharpoonup}
% \begin{macrocode}
-\ifovar@option@overrightharpoonup@
- \DeclareOverArrowCommand{overrightharpoonup}{%
- amsmath, middle config=relbar,
- end=\rightharpoonup,
- right arrow,
- }
-\fi
+ \ifovar@option@overrightharpoonup@
+ \DeclareOverArrowCommand{\overrightharpoonup}{%
+ amsmath, middle config=relbar,
+ end=\rightharpoonup,
+ right arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underrightharpoonup}
% \begin{macrocode}
-\ifovar@option@underrightharpoonup@
- \DeclareOverArrowCommand{underrightharpoonup}{%
- amsmath, middle config=relbar,
- end=\rightharpoonup,
- right arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underrightharpoonup@
+ \DeclareOverArrowCommand{\underrightharpoonup}{%
+ amsmath, middle config=relbar,
+ end=\rightharpoonup,
+ right arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overrightharpoondown}
% \begin{macrocode}
-\ifovar@option@overrightharpoondown@
- \DeclareOverArrowCommand{overrightharpoondown}{%
- amsmath, middle config=relbar,
- end=\rightharpoondown,
- right arrow,
- }
-\fi
+ \ifovar@option@overrightharpoondown@
+ \DeclareOverArrowCommand{\overrightharpoondown}{%
+ amsmath, middle config=relbar,
+ end=\rightharpoondown,
+ right arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underrightharpoondown}
% \begin{macrocode}
-\ifovar@option@underrightharpoondown@
- \DeclareOverArrowCommand{underrightharpoondown}{%
- amsmath, middle config=relbar,
- end=\rightharpoondown,
- right arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underrightharpoondown@
+ \DeclareOverArrowCommand{\underrightharpoondown}{%
+ amsmath, middle config=relbar,
+ end=\rightharpoondown,
+ right arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overleftharpoonup}
% \begin{macrocode}
-\ifovar@option@overleftharpoonup@
- \DeclareOverArrowCommand{overleftharpoonup}{%
- amsmath, middle config=relbar,
- start=\leftharpoonup,
- end=\relbar,
- left arrow,
- }
-\fi
+ \ifovar@option@overleftharpoonup@
+ \DeclareOverArrowCommand{\overleftharpoonup}{%
+ amsmath, middle config=relbar,
+ start=\leftharpoonup,
+ end=\relbar,
+ left arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underleftharpoonup}
% \begin{macrocode}
-\ifovar@option@underleftharpoonup@
- \DeclareOverArrowCommand{underleftharpoonup}{%
- amsmath, middle config=relbar,
- start=\leftharpoonup,
- end=\relbar,
- left arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underleftharpoonup@
+ \DeclareOverArrowCommand{\underleftharpoonup}{%
+ amsmath, middle config=relbar,
+ start=\leftharpoonup,
+ end=\relbar,
+ left arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overleftharpoondown}
% \begin{macrocode}
-\ifovar@option@overleftharpoondown@
- \DeclareOverArrowCommand{overleftharpoondown}{%
- amsmath, middle config=relbar,
- start=\leftharpoondown,
- end=\relbar,
- left arrow,
- }
-\fi
+ \ifovar@option@overleftharpoondown@
+ \DeclareOverArrowCommand{\overleftharpoondown}{%
+ amsmath, middle config=relbar,
+ start=\leftharpoondown,
+ end=\relbar,
+ left arrow,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\underleftharpoondown}
% \begin{macrocode}
-\ifovar@option@underleftharpoondown@
- \DeclareOverArrowCommand{underleftharpoondown}{%
- amsmath, middle config=relbar,
- start=\leftharpoondown,
- end=\relbar,
- left arrow,
- arrow under,
- }
-\fi
+ \ifovar@option@underleftharpoondown@
+ \DeclareOverArrowCommand{\underleftharpoondown}{%
+ amsmath, middle config=relbar,
+ start=\leftharpoondown,
+ end=\relbar,
+ left arrow,
+ arrow under,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\overbar}
% \begin{macrocode}
-\ifovar@option@overbar@
- \DeclareOverArrowCommand{overbar}{%
- amsmath, middle config=relbar,
- start={\std@minus}, end={\std@minus},% \relbar is defined with \mathsm@sh
- shift leftright=0,
- space after arrow=-0.3ex,
- }
-\fi
+ \ifovar@option@overbar@
+ \DeclareOverArrowCommand{\overbar}{%
+ amsmath, middle config=relbar,
+ start={\std@minus}, end={\std@minus},% \relbar is defined with \mathsm@sh
+ shift leftright=0,
+ space after arrow=-0.3ex,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
+% With \pkg{unicode-math}, add |\vphantom{+}| to get the correct position.
% \begin{macro}{\underbar}
% \begin{macrocode}
-\ifovar@option@underbar@
- \DeclareOverArrowCommand{underbar}{%
- amsmath, middle config=relbar,
- start={\std@minus}, end={\std@minus},% \relbar is defined with \mathsm@sh
- shift leftright=0,
- arrow under,
- space before arrow=-0.3ex,
- }
-\fi
+ \ifovar@option@underbar@
+ \DeclareOverArrowCommand{\underbar}{%
+ amsmath, middle config=relbar,
+ start={\vphantom{+}\std@minus}, end={\std@minus},% \relbar is defined with \mathsm@sh
+ shift leftright=0,
+ arrow under,
+ space before arrow=-0.3ex,
+ }
+ \fi
% \end{macrocode}
% \end{macro}
%
+% End of |\AddToHook{begindocument}| hook.
+% \begin{macrocode}
+ }
+% \end{macrocode}
+%
+%
% \subsubsection*{Test macros}
%
% \begin{macro}{\ovar@testmathstyles}
@@ -3422,7 +3870,9 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
%
% \begin{macro}{\TestOverArrow}
% \begin{macrocode}
-\NewDocumentCommand{\TestOverArrow}{ s o m }{
+\NewDocumentCommand{\TestOverArrow}{
+ s o >{\ovar@cmdname@processor} m
+}{%
\ifcsdef{#3}{}{%
\PackageWarning{overarrows}{Unknown name '#3' passed to
\protect\TestOverArrow}
@@ -3494,6 +3944,7 @@ $ \overdotteddoublearrow{v} \qquad \overdotteddoublearrow{AB} $
\lstdefinestyle{lstovardoc}{%
language = [LaTeX]TeX,
columns = flexible,
+ keepspaces = true,
keywordstyle = {\bfseries\color{ovar_darkblue}},
texcsstyle = *{\bfseries\color{ovar_darkblue}},
commentstyle = {\color{gray}},
@@ -3618,7 +4069,7 @@ actual '='
name=macrocode,
firstnumber=auto,
style = lstovarcode,
- showlines=false,
+ showlines = false,
% \end{macrocode}
% Commands and lengths identification and indexing
%
@@ -3648,8 +4099,9 @@ actual '='
% \begin{macrocode}
texcs = [4]{% internal macros
ovar@rightarrow, ovar@leftarrow, ifovar@option@oldarrows@,
- ifovar@option@esvect@, ifovar@option@tikz@, ifovar@option@pstarrows@,
- ifovar@detectsubscripts@, ifovar@option@debug@,
+ ifovar@option@esvect@, ifovar@option@tikz@, ifovar@option@pstricks@,
+ ifovar@option@pstarrows@, ifovar@detectsubscripts@,
+ ifovar@option@subother@, ifovar@option@subactive@, ifovar@option@debug@,
ifovar@option@overrightarrow@, ifovar@option@underrightarrow@,
ifovar@option@overleftarrow@, ifovar@option@underleftarrow@,
ifovar@option@overleftrightarrow@, ifovar@option@underleftrightarrow@,
@@ -3657,20 +4109,23 @@ actual '='
ifovar@option@overrightharpoondown@, ifovar@option@underrightharpoondown@,
ifovar@option@overleftharpoonup@, ifovar@option@underleftharpoonup@,
ifovar@option@overleftharpoondown@, ifovar@option@underleftharpoondown@,
- ifovar@option@overbar@, ifovar@option@underbar@, ovar@set, ovar@length@min,
+ ifovar@option@overbar@, ifovar@option@underbar@, ovar@auto@middle,
+ ovar@auto@trim@middle, ovar@subcmd, ovar@set, ovar@length@min,
ovar@before@arrow, ovar@after@arrow, ovar@macro@stack, ovar@macro@arrow,
- ovar@set@, ovar@shift@left, ovar@shift@right, ovar@stack@fill,
- ovar@stackunder@fill, ovar@stack@lens, ovar@stackunder@lens,
- ovar@macro@arrowfill, ovar@arrow@fill, ovar@arrow@start, ovar@trim@start,
- ovar@trim@middle, ovar@arrow@middle, ovar@trim@end, ovar@arrow@end,
- ovar@tikz@command, ovar@tikz@pathoptions, ovar@tikz@path,
- ovar@tikz@options, ovar@picture@geometry, ovar@picture@linethickness,
- ovar@picture@command, ovar@extralength, ovar@tempdim, ovar@set@arrowlength,
- ovar@set@arrowthickness, ovar@stackover@@, ovar@stackunder@@,
- ovar@stackover@, ovar@stackunder@, ovar@stackover@fill,
- ovar@stackover@lens, ovar@set@common, ovar@starversion,
- ovar@testmathstyles, ovar@row@teststyle,%
- ifovar@option@subother@,ifovar@option@subactive@,ovar@subcmd,ovar@testkerning,%
+ ovar@shift@left, ovar@shift@right, ovar@stack@fill, ovar@stackunder@fill,
+ ovar@stack@lens, ovar@stackunder@lens, ovar@macro@arrowfill,
+ ovar@arrow@fill, ovar@arrow@start, ovar@trim@start, ovar@trim@middle,
+ ovar@arrow@middle, ovar@trim@end, ovar@arrow@end, ovar@tikz@command,
+ ovar@tikz@pathoptions, ovar@tikz@path, ovar@tikz@options,
+ ovar@pstricks@geometry, ovar@pstricks@linethickness, ovar@pstricks@psset,
+ ovar@pstricks@command, ovar@picture@geometry, ovar@picture@linethickness,
+ ovar@picture@command, ovar@tempdim, ovar@set@arrowlength,
+ ovar@set@arrowthickness, ovar@set@arrowthickness@UM@lua,
+ ovar@rulethickness@fontdimen, ovar@rulethickness@family, ovar@stackover@@,
+ ovar@stackunder@@, ovar@stackover@, ovar@stackunder@, ovar@stackover@fill,
+ ovar@stackover@lens, ovar@cmdname@processor, ovar@set@common,
+ ovar@starversion, ovar@tempbox, ovar@testmathstyles, ovar@row@teststyle,
+ ovar@testkerning%
},
index = [4][texcs4],%
indexstyle = [4]\indexmacrointernal,%
@@ -3678,20 +4133,25 @@ actual '='
% Other macros identification
% \begin{macrocode}
moretexcs = [5]{% other macros
- Relbar, relbareda, relbaredd, rightarrow, Rightarrow, varleftarrow,
- varrightarrow, twoheadrightarrow,%
+ relbar, Relbar, relbareda, relbaredd, harrowextender, rightarrow,
+ Rightarrow, varleftarrow, varrightarrow, twoheadrightarrow,%
},
% \end{macrocode}
-% Il would be nice to also index keys, but spaces are badly handled by listings.
+% Il would be nice to also index keys, but spaces are badly handled by
+% \pkg{listings}.
% \begin{macrocode}
%^^A morekeywords = [2]{%
-%^^A no stack macro hook, stack macro, arrow macro, no arrow macro hook, min
-%^^A length, before arrow, after arrow, space before arrow, space after arrow,
-%^^A shift left, shift right, shift leftright, center arrow, left arrow, right
-%^^A arrow, arrow under, fill macro, start, middle, end, trim start, trim
-%^^A middle, trim end, trim, no trimming, middle config, amsmath, esvect, tikz
-%^^A command, tikz options, path options, path, add path options, add tikz
-%^^A options, arrows, line thickness, thinner, picture command, geometry, detect subscripts,
+%^^A overarrows, no stack macro hook, stack macro, detect subscripts, arrow
+%^^A macro, no arrow macro hook, min length, before arrow, after arrow, space
+%^^A before arrow, space after arrow, shift left, shift right, shift leftright,
+%^^A center arrow, left arrow, right arrow, arrow under, arrow under/noconfig,
+%^^A arrow under/autoconfig, fill macro, start, middle, end, trim start, trim
+%^^A middle, trim end, trim, no trimming, middle config, middle config/relbar,
+%^^A middle config/relbareda, middle config/harrowextender, middle config/auto,
+%^^A amsmath, amsmath/mimic, amsmath/strict, esvect, esvect/mimic,
+%^^A esvect/strict, tikz command, tikz options, path options, path, add path
+%^^A options, add tikz options, arrows, line thickness, thinner, pstricks
+%^^A command, psset, geometry, arrow, picture command,%
%^^A },
%^^A index = [3][keywords2],%
%^^A indexstyle = [3]\lstindexmacro,%
diff --git a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
index ffdb92ee01b..573a23b6117 100644
--- a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
+++ b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
@@ -1,33 +1,33 @@
% \iffalse meta-comment
-%
+%
% File: pdfx.dtx
%
% Copyright (c) 2019, CV Radhakrishnan <cvr@river-valley.org>,
% Han The Thanh <thanh@river-valley.org>,
% Ross Moore <ross.moore@mq.edu.au>,
% Peter Selinger <selinger@mathstat.dal.ca>
-%
+%
% This file may be distributed and/or modified under the conditions
% of the LaTeX Project Public License, either version 1.2 of this
% license or (at your option) any later version. The latest version
% of this license is in:
-%
+%
% http://www.latex-project.org/lppl.txt
-%
+%
% and version 1.2 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
%
% \fi
%
-% \CheckSum{6309}
+% \CheckSum{6802}
% \iffalse
%
%<*driver>
\pdfcompresslevel 9
\providecommand{\pdfxopt}{a-2u}
\providecommand{\lastyear}{2018}
-\providecommand{\thisyear}{2019}
-\begin{filecontents*}{./\jobname.xmpdata}
+\providecommand{\thisyear}{2024}
+\begin{filecontents}[force]{./\jobname.xmpdata}
\Title{Generation of PDF/X- and PDF/A-compliant PDFs with pdfTeX \textemdash\ pdfx.sty}
\Author{\CVR\sep \Thanh\sep Ross Moore\sep Peter Selinger}
\Subject{This package supports generation of PDF/X-, PDF/A- and PDF/E-compliant documents, in most of their variants, using pdfLaTeX, LuaLaTeX and XeLaTeX.}
@@ -37,10 +37,10 @@
\Copyright{Public domain.}
\Copyrighted{False}
\CopyrightURL{http://tug.org/texlive/}
-\CoverDisplayDate{March \thisyear}
-\CoverDate{\thisyear-03-10}
+\CoverDisplayDate{July \thisyear}
+\CoverDate{\thisyear-07-01}
\CreatorTool{LaTeX + pdfx.sty with option \pdfxopt, from TeX Live \thisyear}
-\Date{2017-05-18\sep 2017-06-23\sep 2018-11-29\sep 2018-12-22\sep 2019-02-08\sep 2019-03-10}
+\Date{2024-07-01}
\Advisory{An earlier version of this documentation was published as: TUGboat 36, No.2, pp.136\textendash 142 (2015)}
\Advisory{v1.6: Added XMP support for PDF/UA-1. Added more Metadata fields and Language support.}
\Advisory{v1.6: Default RGB and CMYK profiles now require the colorprofiles.sty package.}
@@ -52,16 +52,29 @@
\Advisory{v1.6: Support for 8-bit Hebrew encodings, some Arabic and Devanagari.}
\Advisory{v1.6: Updated documentation, incl. for LaTeX changes.}
\Advisory{v1.6.1: Fixed issue with ifthen package; improved Metadata with LuaTeX and XeTeX.}
-\Advisory{v.1.6.1: Flexibility with page boxes for PDF/X.}
-\Advisory{v.1.6.2: Fixed passing of options to xcolor, and some glyphtounicode values.}
-\Advisory{v.1.6.2: Fixed encoding issue. Extra warning when colorprofiles.tex is missing.}
-\Advisory{v.1.6.3: Properly fixed encoding issue; supports \string\pdfomitcharset\ primitive.}
-\Advisory{v.1.6.3: Reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.}
-\Advisory{v.1.6.3: Patched \string\mathaccentV\ to output accents after the base character.}
+\Advisory{v1.6.1: Flexibility with page boxes for PDF/X.}
+\Advisory{v1.6.2: Fixed passing of options to xcolor, and some glyphtounicode values.}
+\Advisory{v1.6.2: Fixed encoding issue. Extra warning when colorprofiles.tex is missing.}
+\Advisory{v1.6.3: Properly fixed encoding issue; supports \string\pdfomitcharset\ primitive.}
+\Advisory{v1.6.3: Reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.}
+\Advisory{v1.6.3: Patched \string\mathaccentV\ to output accents after the base character.}
+\Advisory{v1.6.4: Added check and warning with luatex for whether \string\pdfminorversion\ can be changed.}
+\Advisory{v1.6.4: Ensure correct \string\catcode for input characters up to 31, when reading .xmpdata file.}
+\Advisory{v1.6.4: Disabled patched \string\mathaccentV\ due to incompatibility with wide base expressions.}
+\Advisory{v1.6.5: Support for \string\Nickname\ as Metadata command.}
+\Advisory{v1.6.5: Ensure par is unexpandable when reading Metadata.}
+\Advisory{v1.6.5a: Support for Memoir class's \string\stockwidth\ and \string\stockheight.}
+\Advisory{v1.6.5a: Added pdf20 option for PDF 2.0, with support for \string\pdfmajorversion.}
+\Advisory{v1.6.5b: Avoid loading xmpincl package from within a TeX grouping.}
+\Advisory{v1.6.5c: Avoid loading stringenc package from within a TeX grouping.}
+\Advisory{v1.6.5d: Disable some options for xcolor after use.}
+\Advisory{v1.6.5e: Ensure \string\pdfmajorversion\ and \string\pdfminorversion\ are both defined and set correctly.}
+\Advisory{v1.6.5e: Updated documentation; added new Bibliography entries and revised URL links.}
+\Advisory{v1.6.5f: Reset ifpdf properly; support \string\creationdate with XeTeX. Revised Glossary layout.}
\pdfxEnableCommands{%
\def\CVR{C.V. Radhakrishnan}\def\Thanh{H\`an Th\eee Thanh}%
\def\eee{^^c3^^aa^^cc^^81 }}
-\end{filecontents*}
+\end{filecontents}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\documentclass[a4paper]{ltxdoc}
\usepackage[\pdfxopt]{pdfx}
@@ -104,12 +117,12 @@
% \GetFileInfo{pdfx.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
-%
+%
% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
-% \DoNotIndex{\space,\@empty,\special,\@nil,\advance\@nnil,\z@,\@@mod}
+% \DoNotIndex{\space,\@empty,\special,\@nil,\z@,\@@mod}
% \DoNotIndex{\\,\@gobble,\@@,\@fornoop,\@fortmp,\@ifundefined,\@firstoftwo,\@secondoftwo}
% \DoNotIndex{\@tempcnta,\@tempcntb,\@tempboxa,\ifnot@empty,\@this,\@firstofone}
% \DoNotIndex{\{,\},\alph,\bgroup,\dp,\ht,\kern,\egroup}
@@ -134,78 +147,92 @@
% \DoNotIndex{\scantokens,\typeout,\vrule,\wd}
%
% \changes{v1.00}{2008/12/01}{Initial commit to the CVS.}
-% \changes{v1.01}{2008/12/10}{glyphtounicode-cmr.tex included with the package.}
-% \changes{v1.3}{2008/12/01}{Fix copyright in xmp files.}
+% \changes{v1.01}{2008/12/10}{\texttt{glyphtounicode-cmr.tex} included with the package.}
+% \changes{v1.3}{2008/12/01}{Fix copyright in \texttt{.xmp} files.}
% \changes{v1.5.4}{2015/02/28}{Fixed timezone bug; Unicode support; more
% PDF variants; added color profiles.}
-% \changes{v1.5.5}{2015/03/23}{Support for PDF/X-4p and PDF/X-5pg
+% \changes{v1.5.5}{2015/03/23}{Support for PDF/X-4p and PDF/X-5pg
% with external color profiles.}
% \changes{v1.5.6}{2016/02/05}{Suppressed `dummy-space' font warning;
-% removed spurious '?' in XMP packets; improved handling of Color Profiles;
-% ensure Hy@pdfatrue when building PDF/A, for link flags;
-% properly enables xcolor conversion of color models.}
-% \changes{v1.5.7}{2016/02/17}{Removed UTF-8 characters that appear in
+% removed spurious `?' in XMP packets; improved handling of Color Profiles;
+% ensure \texttt{\textbackslash Hy@pdfatrue} when building PDF/A, for link flags;
+% properly enables \texttt{xcolor} conversion of color models.}
+% \changes{v1.5.7}{2016/02/17}{Removed UTF-8 characters that appear in
% the documentation only, within comments in the package source,
% but result in a validation failure. Language support in XMP metadata.
% Added macros for Windows and Mac system color profile directories.}
% \changes{v1.5.8}{2016/05/03}{MediaBox, TrimBox, etc. derived from
-% the paperheight, paperwidth. Improved language support, incl. KOI8-R
+% the \texttt{\textbackslash paperheight}, \texttt{\textbackslash paperwidth}.
+% Improved language support, incl. KOI8-R
% encoded cyrillics, Armenian OT6, and LGR Greek encoding, incl. polytonic Greek.
% All the encodings Latin-1--9 are supported for upper 8-bit characters.
-% Fixed the quoted file-name problem, evident with LuaTeX.
+% Fixed the quoted file-name problem, evident with Lua\TeX.
% Method to generate correct bookmarks with non-active (transliterated) input.
-% Added support for XeLaTeX, improvements with LuaTeX. Updated documentation.}
+% Added support for Xe\LaTeX, improvements with Lua\TeX. Updated documentation.}
% \changes{v1.5.82}{2017/05/12}{%
-% Adjusted to changes in the LaTeX core, affecting macros for composite
+% Adjusted to changes in the \LaTeX\ core, affecting macros for composite
% commands; incl. \texttt{\textbackslash textsuperscript} and others.}%
-% \changes{v1.5.83}{2017/05/16}{Improved support for XeLaTeX and LuaLaTeX.}%
-% \changes{v1.5.84}{2017/05/18}{Fully expand options for hyperref. Better support
+% \changes{v1.5.83}{2017/05/16}{Improved support for Xe\LaTeX\ and Lua\LaTeX.}%
+% \changes{v1.5.84}{2017/05/18}{Fully expand options for \texttt{hyperref}. Better support
% for extended IPA letters and modifiers. Adjusted release versions and dates.}%
-% \changes{v1.5.85}{2017/06/23}{Fixed bugs, and fully implemented L8U as
-% a pseudo-encoding; renamed L8U files into the form *-penc.def }%
-% \changes{v1.6}{2018/11/18}{Added XMP support for PDF/UA-1.
-% Added more Metadata fields and Language support.
-% Default RGB and CMYK profiles now require the colorprofiles.sty package.
-% Added file CallasColorProfiles.tex .
-% Revised glyphtounicode.sty to use variation selectors, altered maps to PUA
-% codepoints; added more glyphs via glyphtounicode-ntx.tex .
+% \changes{v1.5.85}{2017/06/23}{Fixed bugs, and fully implemented L8U as
+% a pseudo-encoding; renamed L8U files into the form \texttt{*-penc.def}.}%
+% \changes{v1.6}{2018/11/18}{Added XMP support for PDF/UA-1.
+% Added more Metadata fields and Language support.
+% Default RGB and CMYK profiles now require the \texttt{colorprofiles.sty} package.
+% Added file \texttt{CallasColorProfiles.tex}.
+% Revised \texttt{glyphtounicode.sty} to use variation selectors, altered maps to PUA
+% codepoints; added more glyphs via \texttt{glyphtounicode-ntx.tex}.
% Support for 8-bit Hebrew encodings, some Arabic and Devanagari.
-% Updated documentation, incl. for LaTeX changes.
+% Updated documentation, incl. for \LaTeX\ changes.
% }%
-% \changes{v1.6.1}{2018/12/22}{Fixed issue with ifthen package;
-% improved Metadata with LuaTeX and XeTeX. Flexibility with page boxes for PDF/X.}%
-% \changes{v1.6.2}{2019/01/04}{Fixed passing of options to xcolor, and some glyphtounicode values.}%
-% \changes{v1.6.3}{2019/02/27}{Fixed encoding issues; support for new pdfomitcharset primitive;
-% reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.}%
+% \changes{v1.6.1}{2018/12/22}{Fixed issue with \texttt{ifthen} package;
+% improved Metadata with Lua\TeX\ and Xe\TeX. Flexibility with page boxes for PDF/X.}%
+% \changes{v1.6.2}{2019/01/04}{Fixed passing of options to \texttt{xcolor}, and some \texttt{glyphtounicode} values.}%
+% \changes{v1.6.3}{2019/02/27}{Fixed encoding issues; support for new \texttt{\textbackslash pdfomitcharset} primitive;
+% reference to \textsf{veraPDF} validation software; additions to \texttt{glyphtounicode-ntx.tex}.}%
+% \changes{v1.6.4}{2019/09/26}{Added check and warning with \texttt{luatex} for whether \texttt{\textbackslash pdfminorversion} can be changed;
+% ensure correct \texttt{\textbackslash catcode} for input characters up to 31, when reading \texttt{.xmpdata} file;
+% disabled patched \texttt{\textbackslash mathaccentV} due to incompatibility with wide base expressions.}
+% \changes{v1.6.5}{2021/07/06}{Support for \texttt{\textbackslash Nickname} as Metadata command;
+% ensure \texttt{\textbackslash par} is unexpandable when processing XMP metadata.}
+% \changes{v1.6.5a}{2023/10/17}{Added option \texttt{pdf20} for future need with PDF 2.0; support for \texttt{\textbackslash pdfmajorversion};
+% support for Memoir's \texttt{\textbackslash stockwidth} and \texttt{\textbackslash stockheight} dimen registers.}
+% \changes{v1.6.5b}{2024/04/05}{Avoid loading \texttt{xmpincl} package from within a \TeX\ grouping.}
+% \changes{v1.6.5c}{2024/05/23}{Avoid loading \texttt{stringenc} package from within a \TeX\ grouping.}
+% \changes{v1.6.5d}{2024/05/29}{Adjust for non-zero \texttt{\textbackslash stockwidth} only; prevent changes to \texttt{xcolor} options after use.}
+% \changes{v1.6.5e}{2024/06/22}{Ensure \texttt{\textbackslash pdfmajorversion} and \texttt{\textbackslash pdfminorversion}
+% are both defined and set correctly. Updated documentation; added new Bibliography entries and revised URL links.}
+% \changes{v1.6.5f}{2024/06/24}{Reset \texttt{\textbackslash ifpdf} properly; support \texttt{\textbackslash creationdate} with Xe\TeX. Revised Glossary layout.}
% \title{Generation of PDF/X- and PDF/A-\penalty-200 compliant PDFs with \pdftex --- \texttt{pdfx.sty}}
-% \date{2019/02/27}
-% \version{1.6.3}
+% \date{2024/07/01}
+% \version{1.6.5f}
% \keywords{PDF, PDF/A, PDF/X, pdf\TeX, \LaTeX, Multilingual Metadata}
% \author{C.\,V.\,Radhakrishnan, \Thanh, Ross Moore {\upshape\small
% and} Peter Selinger}
% \contact{\texttt{[cvr,thanh]@river-valley.org},\\%
-% \texttt{ross.moore@mq.edu.au}, \texttt{selinger@mathstat.dal.ca}\hss}
-%
+% \texttt{ozross@icloud.com}, \texttt{selinger@mathstat.dal.ca}\hss}
+%
% \maketitle
%
% \StopEventually{}
%
% \section[Introduction]{Introduction}
%
-% This package\footnote{An earlier version of this documentation
+% This package\footnote{An earlier version of this documentation
% was published as \cite{pdfx}. All the changes since then have been developed
% and coded by the 3rd-listed author.}
-% currently supports generation of PDF/X-, PDF/A- and PDF/E-compliant
+% currently supports generation of PDF/X-, PDF/A- and PDF/E-compliant
% documents, using \pdftex, in most of their variants;
% see the complete list in Section~\ref{ssec-options} below.
% As of \TeX\,Live 2016 it now also works with Lua\LaTeX\ and Xe\LaTeX,
% when using appropriate command-line options\footnote{%
-% The required invokation is:\quad
+% The required invocation is:\quad
% |xelatex --shell-escape -output-driver="xdvipdfmx -z 0" <filename>.tex |}, but
% with some limitations --- see Sections~\ref{sssec-xetex} and \ref{sssec-luatex}.
-% By `supports', we mean that the package provides correct and sufficient
+% By `supports', we mean that the package provides correct and sufficient
% means to declare that a document conforms with a stated PDF variant
-% (PDF/X, PDF/A, PDF/E, PDF/VT, PDF/UA, etc.) along with the version and/or
+% (PDF/X, PDF/A, PDF/E, PDF/VT, PDF/UA, etc.) along with the version and/or
% level of conformance.
% This package also allows appropriate Metadata and Color Profile
% to be specified, according to the requirements of the PDF variant.
@@ -216,7 +243,7 @@
% information as well as a large range of optional data, a fully validating
% PDF file cannot be achieved. The PDF can be created, having the correct
% visual appearance on all pages, but it will not pass validation checks.
-% Sections~\ref{ssec-metadata} and \ref{ssec-multi} describe
+% Sections~\ref{ssec-metadata} and \ref{ssec-multi} describe
% how this file should be constructed.
%
% \medskip
@@ -224,23 +251,24 @@
% of document structure and type of content that may be required
% (or restricted) within a PDF variant. For example, PDF/VT \cite{PDFVT} requires
% well-structured parts, using Form XObject sections tagged as `/DPart'.
-% Similarly PDF/A-1a (and 2a and 3a) \cite{PDFA,PDFA2,PDFA3} require
-% a fully `Tagged PDF', including a detailed structure tagging which
+% Similarly PDF/A-1a (and 2a and 3a) \cite{PDFA,PDFA2,PDFA3} require
+% a fully `Tagged PDF', including a detailed structure tagging which
% envelops the complete contents of the document, as does also PDF/UA \cite{PDF-UA}.
-% This is beyond the current version of \LaTeX\ engines, as commonly shipped.
+% This is beyond the current version of \LaTeX\ engines as commonly shipped;
+% though see Section~\ref{sec-pdf20} for recent developments.
% So while this package provides enough to meet the declaration,
-% metadata and font-handling aspects for these PDF/A variants,
-% it is not sufficient to produce fully conforming PDFs.
-% However, with extra \pdftex-based software or macro coding that \emph{is} capable
-% of producing `Tagged PDF', this package can be used as part of
-% the overall workflow to produce fully conforming documents.
+% Metadata and font-handling aspects for these PDF/A variants,
+% it is not sufficient to produce fully-conforming PDFs.
+% However, with extra \pdftex-based software or macro coding that \emph{is} capable
+% of producing `Tagged PDF', this package can be used as part of
+% the overall workflow to produce fully-conforming documents; see \cite{tpdf}.
%
%
% \subsection{PDF standards}\label{ssec-standards}
%
% PDF/X and PDF/A are umbrella terms used to denote several ISO
-% standards \cite{PDFX,PDFX3,PDFX1a,PDFX4,PDFX5,PDFA,PDFA2,PDFA3}
-% that define different subsets of the PDF standard \cite{PDF17,ISO32000}.
+% standards \cite{PDFX,PDFX3,PDFX1a,PDFX4,PDFX5,PDFA,PDFA2,PDFA3}
+% that define different subsets of the PDF standard \cite{PDF17,ISO32000}.
% The objective of PDF/X is to facilitate graphics exchange between
% document creator and printer and therefore, has all requirements
% related to printing. For instance, in PDF/X, all fonts need to be
@@ -249,28 +277,28 @@
% specifications of PDF/X.
% Since 2005 other variants of PDF/X have emerged, as extra effects
% (such as layering and transparency) have been supported within the PDF
-% standard itself. The full range of versions and conformance supported
+% standard itself. The full range of versions and conformance supported
% in this package is discussed below in Section~\ref{ssec-options}.
%
% PDF/A defines a profile for archiving PDF documents, which ensures
% the documents can be reproduced in the exact same way in years to
% come. A key element to achieving this is that PDF/A documents
% are 100\% self-contained. All the information needed to display the
-% document in the same manner every time is embedded in the file.
+% document in the same manner every time is embedded in the file.
% A PDF/A document is not permitted to be reliant on information from
% external sources. Other restrictions include avoidance of
-% audio/video content, JavaScript and encryption.
-% Mandatory inclusion of fonts, color profile and standards-based metadata
+% audio/video content, JavaScript and encryption.
+% Mandatory inclusion of fonts, color profile and standards-based metadata
% are absolutely essential for PDF/A.
% Later versions allow for use of image compression and file attachments.
%
-% PDF/E is an ISO standard \cite{PDFE} intended for documents used in engineering workflows.
+% PDF/E is an ISO standard \cite{PDFE} intended for documents used in engineering workflows.
% PDF/VT \cite{PDFVT} allows for high-volume customised form printing, such as utility bills.
% PDF/UA (`Universal Accessibility') has emerged as a standard \cite{PDF-UA,PDFUA1,PDFUABSI}
-% supporting Assistive Technologies, incorporating web-accessibility guidelines (WCAG)
-% for electronic documents.
+% supporting Assistive Technologies, incorporating web-accessibility guidelines (WCAG)
+% for electronic documents.
% In future, PDF/H may emerge for health records and medical-related
-% documents. Other applications can be envisaged.
+% documents. Other applications can be envisaged.
% Declarations and Metadata are supported for the first three of these.
% The others are the subject of further work; revised versions of this
% package can be expected in later years.
@@ -281,6 +309,30 @@
% and whatever else is relevant to how the standards have been established
% and how they can be used.
%
+% \subsection{Later \LaTeX\ changes, support for newer PDF standards}\label{sec-pdf20}
+%
+% Although PDF 2.0~\cite{PDF20} was first published in 2017 and revised in 2020, it has taken
+% a long time for it to become a target format for documents built using \LaTeX.
+% This is because the requirement of using `Tagged PDF' is stringent, requiring
+% a reworking of almost every aspect of \LaTeX's document production model \cite{LaTeXPDF}.
+% Work to this end is going on, via the PDF Association's `\LaTeX\ Project LWG'\cite{PDF-LaTeX},
+% the experimental |tagpdf| package \cite{tagpdf}, and Ross Moore's |tpdf| package and macro suite \cite{tpdf}.
+% Significant internal changes have been made to \LaTeX\ itself, which in turn have
+% required the |v1.6.5x| updates in 2024 to this |pdfx| package. We thank the following users for reporting
+% issues arising from such changes: Sergio Zenoni, Takehiko Tanabe, Tom\'a\v s Nov\'a\v cek.
+%
+% In early 2024 the PDF Association published several documents for new and updated standards
+% based upon PDF 2.0~\cite{PDF20}. These include PDF/UA-2 \cite{PDFUA2}, PDF `Declarations' \cite{PDFDecl},
+% `Well-Tagged PDF' (WTPDF) \cite{WTPDF} with declarations for `Accessibility' and `Reuse',
+% adding to PDF/A-4 \cite{PDFA4}, PDF/X-6 \cite{PDFX6} and PDF/VT-3 \cite{PDFVT3}, each with various flavours.
+% To support these, there will be released in late 2024 a variant named |pdfx2| as an extension of |pdfx|,
+% with separate documentation detailing how to specify appropriate XMP metadata \cite{XMP-ISO}.
+%
+% Once |pdfx2| becomes available, this will take on the role of handling new developments for
+% \LaTeX\ support of PDF 2.0-based software solutions. The |pdfx| package will remain under
+% active development, primarily to ensure compatibility of existing documents with PDF 1.7-based
+% requirements (tagged or otherwise), following any further changes in \LaTeX\ or other packages.
+%
% \section[Usage]{Usage}\label{sec-usage}
%
% The package can be loaded with the command:
@@ -292,7 +344,7 @@
% \subsection{Package options}\label{ssec-options}
%
% \subsubsection{PDF/A options}
-%
+%
% PDF/A is an ISO standard~\cite{PDFA,PDFA2,PDFA3} intended for long-term archiving of
% electronic documents. It therefore emphasizes self-containedness and
% reproducibility, as well as machine-readable metadata. The PDF/A
@@ -307,7 +359,7 @@
% versions contain a subset of the features of later versions, so for
% maximum portability, it is preferable to use a lower-numbered
% version, when the extra features allowed in higher versions are not used.
-% There is no conformance level `u' in version 1 of the standard.
+% There is no conformance level `u' in version 1 of the standard.
% Thus for many typical uses of PDF/A, it is sufficient to use PDF/A-1b.
%
% \begin{itemize}
@@ -320,28 +372,28 @@
% \item |a-3b|: generate PDF/A-3b.
% \item |a-3u|: generate PDF/A-3u.
% \end{itemize}
-% By `Experimental, not fully implemented' here we mean primarily that
+% By `Experimental, not fully implemented' here we mean primarily that
% the document structure, as required for `Tagged PDF', is not handled
-% by this package. Using other \pdftex-based software that \emph{is}
+% by this package. Using other \pdftex-based software that \emph{is}
% capable of producing such complete tagging, conforming documents
% can indeed be produced.
%
% \subsubsection{PDF/E options}
-%
+%
% PDF/E is an ISO standard~\cite{PDFE} intended for documents used in engineering
% workflows. There is only one version of the PDF/E standard so far,
% and it is called PDF/E-1.
-%
+%
% \begin{itemize}
% \item |e-1|: generate PDF/E-1.
% \item |e|: same as |e-1|.
% \end{itemize}
%
% \subsubsection{PDF/UA options}
-%
-% PDF/UA is an ISO and ANSI standard~\cite{PDF-UA,PDFUABSI} intended for making
-% structured documents readable and navigable using Assistive Technology;
-% e.g., screen-readers, Braille keyboards and such-like.
+%
+% PDF/UA is an ISO and ANSI standard~\cite{PDF-UA,PDFUABSI} intended for making
+% structured documents readable and navigable using Assistive Technology;
+% e.g., screen-readers, Braille keyboards and such-like.
% Documents prepared this way can be easily saved in other formats which
% preserve the structure, such as XML, HTML, and (Microsoft) Word-based formats.
%
@@ -359,20 +411,20 @@
% multi-file exchange, and level 2s is for streamed delivery.
% Currently, none of the PDF/VT conformance levels are fully
% implemented by the |pdfx| package.
-%
+%
% \begin{itemize}
% \item |vt-1|: generate PDF/VT-1, based on PDF/X-4. Experimental, not fully implemented
% \item |vt-2|: generate PDF/VT-2, based on PDF/X-5pg. Experimental, not fully implemented.
% \item |vt-2s|: generate PDF/VT-2s. Experimental, not fully implemented.
% \end{itemize}
-% By `Experimental, not fully implemented' here we mean primarily that
+% By `Experimental, not fully implemented' here we mean primarily that
% the structuring of a document into `/DPart' sections, as Form XObjects,
-% is not handled by this package.
-% This \emph{is} possible with current \pdftex\ software,
+% is not handled by this package.
+% This \emph{is} possible with current \pdftex\ software,
% but not yet in a way that lends itself easily to full automation, due to
% requirements of knowing the internal object number of certain internal
-% PDF constructs. All the other aspects: PDFInfo declaration, Metadata
-% and Color Profile, of the PDF/VT variants are correctly handled.
+% PDF constructs. All the other aspects: PDFInfo declaration, Metadata
+% and Color Profile, of the PDF/VT variants are correctly handled.
%
% \subsubsection{PDF/X options}
%
@@ -380,13 +432,13 @@
% emphasizes printing-related requirements, such as embedded fonts and
% color profiles. The PDF/X standard has a large number of variants
% and conformance levels. The basic variants are X-1, X-1a,
-% X-3, X-4, and X-5. (Note that a revised version of the X-2 standard
-% was published in 2003 but withdrawn as an ISO standard in 2011,
-% basically due to lack of interest in using it).
-% The PDF/X-1a standard exists in revisions of 2001 and 2003,
-% the PDF/X-3 standard exists in revisions of 2002 and 2003,
-% and the PDF/X-4 and PDF/X-5 standards exist in revisions of 2008 and 2010.
-% Moreover, some of these standards have a `p' version, which permits the
+% X-3, X-4, and X-5. (Note that a revised version of the X-2 standard
+% was published in 2003 but withdrawn as an ISO standard in 2011,
+% basically due to lack of interest in using it).
+% The PDF/X-1a standard exists in revisions of 2001 and 2003,
+% the PDF/X-3 standard exists in revisions of 2002 and 2003,
+% and the PDF/X-4 and PDF/X-5 standards exist in revisions of 2008 and 2010.
+% Moreover, some of these standards have a `p' version, which permits the
% use of an externally supplied color profile (instead of an embedded one),
% and/or a `g' version, which permits the use of external graphical
% content. Moreover, PDF/X-5 has an `n' version, which extends
@@ -401,14 +453,14 @@
% \item |x-2|: generate PDF/X-2; unpublished, doesn't validate.
% \item |x-3|: generate PDF/X-3. Options |x-302| and |x-303| are
% also available to specify PDF/X-3:2002 or PDF/X-3:2003 explicitly.
-% \item |x-4|: generate PDF/X-4. Options |x-408| and |x-410| are
+% \item |x-4|: generate PDF/X-4. Options |x-408| and |x-410| are
% also available to specify PDF/X-4:2008 or PDF/X-4:2010 explicitly.
% \item |x-4p|: generate PDF/X-4p. Options |x-4p08| and |x-4p10| are
% also available to specify PDF/X-4p:2008 or PDF/X-4p:2010 explicitly.
% \item |x-5g|: generate PDF/X-5g. Options |x-5g08| and |x-5g10| are
% also available to specify PDF/X-5g:2008 or PDF/X-5g:2010 explicitly.
% \item |x-5n|: generate PDF/X-5n. Options |x-5n08| and |x-5n10| are
-% also available to specify PDF/X-5n:2008 or PDF/X-5n:2010 explicitly.
+% also available to specify PDF/X-5n:2008 or PDF/X-5n:2010 explicitly.
% Experimental, not fully implemented.
% \item |x-5pg|: generate PDF/X-5pg. Options |x-5pg08| and |x-5pg10| are
% also available to specify PDF/X-5pg:2008 or PDF/X-5pg:2010 explicitly.
@@ -441,9 +493,11 @@
% applicable standard.\\This may produce a non-standard-conforming PDF file.
% \item |pdf17|: use PDF 1.7, overriding the version specified by the
% applicable standard.\\This may produce a non-standard-conforming PDF file.
+% \item |pdf20|: use PDF 2.0, experimental in preparation for use with future
+% software, under development. This may produce a non-standard-conforming PDF file.
% \item |nocharset|: do not generate the Charset entry for fonts (\pdftex\ only).
% \item |usecharset|: generate the Charset entry for fonts (\pdftex\ only).
-% \end{itemize}
+% \end{itemize}
% The latter two options affect the value of the |\pdfomitcharset| primitive,
% added to \pdftex\ in 2019, due to differing requirements for PDF/A-1
% and other PDF/A versions. Indeed use of the |/Charset| entry for a font
@@ -451,14 +505,14 @@
%
% \subsubsection{XMP language options}\label{ssec-xmplang}
%
-% These options allow for characters in alphabets other than those
-% used for English and Western European languages to be used
-% within the |.xmpdata| file (see Section~\ref{ssec-metadata}),
+% These options allow for characters in alphabets other than those
+% used for English and Western European languages to be used
+% within the |.xmpdata| file (see Section~\ref{ssec-metadata}),
% supported through \LaTeX\ character representation macros.
% \begin{itemize}
-% \item |latxmp|: extended Latin blocks, |Ux0180|--|Ux024F|
-% and |Ux1E00|--|Ux1EFF|
-% \item |armxmp|: armenian letters and ligatures, |Ux0530|--|Ux058F|,
+% \item |latxmp|: extended Latin blocks, |Ux0180|--|Ux024F|
+% and |Ux1E00|--|Ux1EFF|
+% \item |armxmp|: armenian letters and ligatures, |Ux0530|--|Ux058F|,
% via macros |\armyba|, |\armfe|, |\armcomma|, etc.
% \item |cyrxmp|: cyrillic letters and accents, |Ux0400|--|Ux04FF|
% and |Ux0500|--|Ux0527| via macros |\cyra|, |\CYRN|, etc.
@@ -472,8 +526,8 @@
% via macros |\abreve|, |\uhorn|, |\ECIRCUMFLEX|, etc.
% \item |ipaxmp|: phonetic extensions, |Ux0250|--|Ux02AF|
% and |Ux1D00|--|Ux1DFF|
-% \item |mathxmp|: mathematical letters, symbols, operators
-% arrows, alphanumeric forms.
+% \item |mathxmp|: mathematical letters, symbols, operators
+% arrows, alphanumeric forms.
% \item |allxmp|: all of the above, as well as those listed next;
% used primarily for testing compatibility with other packages.
% \end{itemize}
@@ -486,13 +540,13 @@
% Further options allow direct (enclosed) input of upper 8-bit
% characters, from encodings such as Latin-1--Latin-9, KOI8-R,
% LGR (Greek), ArmSSCI8, and a few more.
-% Use of these requires a carefully controlled parsing regime.
+% Use of these requires a carefully controlled parsing regime.
% Here we list the package options that declare such content
% may be present in the |.xmpdata| file.
-% A detailed account of how these are used is given
+% A detailed account of how these are used is given
% in~Section~\ref{ssec-multi} (``Multilingual Metadata'').
% \begin{itemize}
-% \item |LATxmp|: support for direct use of the upper-range characters
+% \item |LATxmp|: support for direct use of the upper-range characters
% (byte codes 160--255) for input encodings Latin1--Latin9, for
% Latin-based alphabets as used in European countries and elsewhere.
% This defines parser macros |\textLAT|, |\textLII|, \dots, |\textLIX|.
@@ -501,7 +555,7 @@
% of upper-range characters (byte codes 148--255) under input
% encodings KOI8-R and KOIR8-RU, using |\textKOI| as parser macro.
% All support from |cyrxmp| is loaded also.
-% \item |LGRxmp|: support for greek letters entered using either
+% \item |LGRxmp|: support for greek letters entered using either
% the LGR input transliteration of ASCII characters, or the ISO-8859-7
% encoding of upper-range characters (byte codes 160--255),
% or a combination of both, using |\textLGR| as parser macro.
@@ -509,25 +563,25 @@
% \item |AR8xmp|: support for armenian letters entered using the
% Arm\TeX~2.0 input transliteration of ASCII characters, or the
% ArmSCII8 encoding of upper-range characters (byte codes 160--255),
-% or a combination of both, using |\textARM| as parser macro.
+% or a combination of both, using |\textARM| as parser macro.
% All support from |armxmp| is loaded also.
-% \item |HEBxmp|: support for hebrew letters entered using either
-% LHE input transliteration of ASCII characters, or the CP1255, CP862
+% \item |HEBxmp|: support for hebrew letters entered using either
+% LHE input transliteration of ASCII characters, or the CP1255, CP862
% or ISO-8859-8 (HE8) encoding of upper-range characters (byte codes 160--255),
% or a combination of these using |\textLHE|, |\textHEBO|, |\textHEB| as parser macros.
% All support from |hebxmp| is loaded also.
% \end{itemize}
-% These `parser' options have received limited testing, so please
+% These `parser' options have received limited testing, so please
% report any mistakes in the UTF-8 output that you may encounter.
%
% \subsection{Data file for metadata}\label{ssec-metadata}
%
-% As mentioned above, standards-compliant PDF documents require
-% document-level metadata to be included.
-% This, known as an `XMP packet'~\cite{XMP-spec,XMP-ISO},
+% As mentioned above, standards-compliant PDF documents require
+% document-level metadata to be included.
+% This, known as an `XMP packet'~\cite{XMP-spec,XMP-ISO},
% is like having a library catalog card included within the PDF itself. It is an unencrypted
% portion of the PDF file, with data expressed in Extensible Markup Language (XML),
-% using Resource Description Format (RDF~\cite{RDF}) syntax, encoded as UTF-8
+% using Resource Description Format (RDF~\cite{RDF}) syntax, encoded as UTF-8
% so readable by any text editing software on any modern computing platform.
%
% Some advantages of doing this are clear.
@@ -539,12 +593,12 @@
% \item For the author(s): who can specify the kind of information most appropriate
% to help readers understand the nature and purpose of the document.
% \end{itemize}
-%
-% The |pdfx| package builds the XMP metadata from information supplied via a special data file
-% called |\jobname.xmpdata|. Here, |\jobname| is usually the basename of the document's main
-% |.tex| file. For example, if your document source is in the file |main.tex|,
-% then the metadata must be in a file called |main.xmpdata|.
-% None of the individual metadata fields are mandatory, but for most documents, it makes sense
+%
+% The |pdfx| package builds the XMP metadata from information supplied via a special data file
+% called |\jobname.xmpdata|. Here, |\jobname| is usually the basename of the document's main
+% |.tex| file. For example, if your document source is in the file |main.tex|,
+% then the metadata must be in a file called |main.xmpdata|.
+% None of the individual metadata fields are mandatory, but for most documents, it makes sense
% to specify at least the title and the author. For more technical aspects of metadata
% and its uses, consult the work of the Dublin Core Initiative~\cite{DC} and PRISM~\cite{PRISM}.
%
@@ -557,72 +611,73 @@
% |\Publisher{Baking International}|
% \end{decl}
% You should note that multiple authors and keywords have been separated
-% by |\sep|. This |\sep| macro serves a technical purpose and is
+% by |\sep|. This |\sep| macro serves a technical purpose and is
% permitted within the |\Author|, |\Keywords|, and |\Publisher| fields,
-% as well as some others. See \S\ref{mdfields} below for a complete listing
+% as well as some others. See \S\ref{mdfields} below for a complete listing
% of the supported author-supplied metadata fields.
%
% After processing, the local directory contains a file named such as
% |pdfa.xmpi| or |pdfe.xmpi| or |pdfx.xmpi| according to the PDF variant desired.
-% This file is the complete XMP Metadata packet.
-% It can be checked for validity, using an online validator, such as at
+% This file is the complete XMP Metadata packet.
+% It can be checked for validity, using an online validator, such as at
% \href{http://www.pdflib.com/knowledge-base/xmp-metadata/free-xmp-validator/}{www.pdflib.com}.
-% \textsf{veraPDF}~\cite{veraPDF} is Open Source software providing validation for PDF/A,
+% \textsf{veraPDF}~\cite{veraPDF} is Open Source software providing validation for PDF/A,
% and other checkers useful in a PDF/A production setting.
-%
+%
% \textbf{Warning}: The |\jobname.xmpdata| file may be included in the
-% main document source, within a |{filecontents*}| environment,
+% main document source, within a |{filecontents}| environment,
% provided this comes \emph{before} the |\documentclass| command, as follows.
+% The |force| option ensures overwriting a previous file to catch recent edits.
% \begin{decl}[]
-% |\begin{filecontents*}{\jobname.xmpdata}|\\
+% |\begin{filecontents}[force]{\jobname.xmpdata}|\\
% | \Title{Baking through the ages}|\\
% | \Author{A. Baker\sep C. Kneader}|\\
% | \Language{en-GB}|\\
% | \Keywords{cookies\sep muffins\sep cakes}|\\
% | \Publisher{Baking International}|\\
-% |\end{filecontents*}|\\
+% |\end{filecontents}|\\
% |\documentclass[11pt,a4paper]{article}|\\
% |...|
% \end{decl}
% Including the metadata with the \LaTeX\ source is very convenient.
-% Having it at the top of the file also brings attention to it, placing emphasis on
-% the desirability of including metadata, and keeping it accurate while the main
-% content of the document is subject to changes or revision.
-% Macro definitions can also occur prior to the |\documentclass| command,
-% including any that may be needed within the metadata.
+% Having it at the top of the file also brings attention to it, placing emphasis on
+% the desirability of including metadata, and keeping it accurate while the main
+% content of the document is subject to changes or revision.
+% Macro definitions can also occur prior to the |\documentclass| command,
+% including any that may be needed within the metadata.
% An example of this is apparent in Figure~\ref{koi8-code} occurring later.
%
-% However, this ordering is also extremely important, else any non-ascii UTF-8 byte
-% sequences can become active characters and expand upon data being written out,
+% However, this ordering is also extremely important, else any non-ascii UTF-8 byte
+% sequences can become active characters and expand upon data being written out,
% rather than remaining as inactive bytes.
% If you edit the metadata supplied this way, remember to remove the
% existing copy of |\jobname.xmpdata| file before the next processing run,
-% as \LaTeX\ does not write a new copy of the file when it exists on disk already,
+% as \LaTeX\ does not write a new copy of the file when it exists on disk already,
% within the current working directory or elsewhere that \LaTeX\ may find.
% In development or testing situations the filename may need to be given as
% |./\jobname.xmpdata|, else an older version may be loaded in error.
-%
+%
% Experienced users/programmers can employ the \verb|\write18| mechanism%
-% \footnote{If you don't already know what this is, they you probably
-% should not try using it |:-)|.}, together with the |--shell-escape| command-line
-% option, to automatically execute a shell command that removes |\jobname.xmpdata|
-% on every (or on selected) processing runs.
+% \footnote{If you don't already know what this is, they you probably
+% should not try using it |:-)|.}, together with the |--shell-escape| command-line
+% option, to automatically execute a shell command that removes |\jobname.xmpdata|
+% on every (or on selected) processing runs.
% This is only useful when the metadata changes, for whatever reason.
%
% \medskip
-% Other places for the |{filecontents*}| environment can work,
+% Other places for the |{filecontents}| environment can work,
% but \emph{only} when it contains \emph{no} non-ascii UTF-8 byte sequences.
-% Since 2018, with default
+% Since 2018, with default
% See Section~\ref{ssec-symbols} below for more information on the macros
% that can be safely used within |.xmpdata| metadata files.
-%
+%
% \subsection{List of supported metadata fields}\label{mdfields}
-%
+%
% Following is a complete list of user-definable metadata fields currently supported,
% separated into particular groupings.
-% Each command is accompanied by the specific XML tagged field name (with namespace)
-% that is placed into the document-level Metadata packet, as well as the kind of information
-% being conveyed.
+% Each command is accompanied by the specific XML tagged field name (with namespace)
+% that is placed into the document-level Metadata packet, as well as the kind of information
+% being conveyed.
% More may be added in the future.
% These commands can \emph{only} be used within the |.xmpdata| file.
%
@@ -630,13 +685,13 @@
% using RFC5646 (BCP 47)~\cite{BCP47} codes, in which the metadata field is given.
% Languages for multiple entries can use e.g., |\sep[de] ...|.
% Only those fields requiring a specific format (e.g. dates) do \emph{not}
-% support language specifiers; these are indicated with \fixmd.
+% support language specifiers; these are indicated with \fixmd.
% Fields allowing more than one value are indicated with \starmd.
% Multiple values may be given as separate instances of the macro, or as a single
-% instance with the values delimited by |\sep|, as in the example above.
-%
+% instance with the values delimited by |\sep|, as in the example above.
+%
% \subsubsection{General information:}
-%
+%
% \begin{itemize}
% \item \starmd|\Author|: \hfill (|dc:creator|)\\
% the document's human author(s). Separate multiple authors with |\sep|.
@@ -661,10 +716,10 @@
% location of a web page describing the owner
% and/or rights statement for this document.
% \item \fixmd|\Copyrighted|: \hfill (|xmpRights:Marked|)\\
-% `True' if the document is copyrighted, and `False' if it isn't.
-% This is automatically set to `True' if either |\Copyright| or |\CopyrightURL| is specified,
-% but this can be overridden.
-% For example, if the copyright statement is `Public Domain',
+% `True' if the document is copyrighted, and `False' if it isn't.
+% This is automatically set to `True' if either |\Copyright| or |\CopyrightURL| is specified,
+% but this can be overridden.
+% For example, if the copyright statement is `Public Domain',
% then specify also |\Copyrighted{False}|.
% \item \starmd|\Owner|: \hfill (|xmpRights:Owner|)\\
% specifies the owner(s) of the document or resource.
@@ -673,18 +728,18 @@
% \end{itemize}
%
% \subsubsection{more Dublin Core metadata:}\label{sssec-dc}
-% From version 1.6 of |pdfx.sty|, the following fields can be used to provide a greater
-% range of information to be specified as metadata.
+% From version 1.6 of |pdfx.sty|, the following fields can be used to provide a greater
+% range of information to be specified as metadata.
% \begin{itemize}
% \item \starmd|\Contributor|: \hfill (|dc:contributor|)\\
% contributor(s) other than author(s) of the PDF document.
% \item |\Coverage|: \hfill (|dc:coverage|)\\
% statement about the extent or scope of the document's contents.
% \item \starmd\fixmd|\Date|: \hfill (|dc:date|)\\
-% date(s) when something significant occurred relating to the resource (e.g., version changes);
+% date(s) when something significant occurred relating to the resource (e.g., version changes);
% must be in ISO date format |YYYY-MM-DD| or |YYYY-MM|.
% \item \fixmd|\PublicationType|: \hfill (|dc:type|)\\
-% The type of publication. If specified, must be one of `book', `catalog', `feed', `journal',
+% The type of publication. If specified, must be one of `book', `catalog', `feed', `journal',
% `magazine', `manual', `newsletter', `pamphlet'. This is automatically set to `journal'
% if |\Journaltitle| is specified (see below), but can be overridden.
% \item \starmd|\Relation|: \hfill (|dc:relation|)\\
@@ -700,10 +755,10 @@
% \end{itemize}
%
% The remaining Dublin Core field |(dc:format)| is always set to `|application/pdf|'.
-%
+%
% \subsubsection{Publication information:}\label{sssec-publ}
-% The following macros allow for inclusion of publication related metadata fields,
-% as specified by PRISM~\cite{PRISM} to meet publishing requirements.
+% The following macros allow for inclusion of publication related metadata fields,
+% as specified by PRISM~\cite{PRISM} to meet publishing requirements.
% \begin{itemize}
% \item |\Journaltitle|: \hfill (|prism:issueName|)\\
% The title of the journal in which the document was published.
@@ -720,7 +775,7 @@
% \item |\CoverDisplayDate|: \hfill (|prism:coverDisplayDate|)\\
% Date on the cover of the journal issue, as a human-readable text string.
% \item \fixmd|\CoverDate|: \hfill (|prism:coverDate|)\\
-% Date on the cover of the journal issue, in a format suitable for storing in a database
+% Date on the cover of the journal issue, in a format suitable for storing in a database
% field with a `date' data type; e.g. |YYYY-MM|, or |YYYY-MM-DD|.
% \end{itemize}
% This is an area which can be expanded, to deal with more kinds
@@ -729,20 +784,20 @@
% Examples of this can be found in the template files |pdfx.xmp|, |pdfa.xmp|, |pdfe.xmp|.
%
% \subsubsection{Backward Compatibility}
-% The following macros are also recognised, for backward compatibility
+% The following macros are also recognised, for backward compatibility
% with earlier versions of the package.
% \begin{itemize}
% \item \starmd|\AuthoritativeDomain|: \hfill (|pdfx:AuthoritativeDomain|)\\
% specifies extra names (e.g., of companies) associated to the existence of the PDF or resource.
% \item |\Creator|: \hfill (|xmp:CreatorTool|)\\
-% synonymous with |\CreatorTool| which is usually handled automatically anyway,
+% synonymous with |\CreatorTool| which is usually handled automatically anyway,
% but can be over-ridden.
% \item |\Org|: synonymous with |\Publisher|.
% \item |\WebStatement|: synonymous with |\CopyrightURL|.
% \end{itemize}
-%
+%
% \subsubsection{more XMP metadata:}\label{sssec-xmp}
-%
+%
% \begin{itemize}
% \item \starmd|\Advisory|: \hfill (|xmp:Advisory|)\\
% noteworthy information; e.g., revision data or changes.
@@ -763,7 +818,7 @@
% with a PDF standard, and level of conformance.
% There are no separate user-macros to alter these.
% The first three dates are usually set to be identical.
-%
+%
% \begin{itemize}
% \item (|xmp:CreateDate|) : creation date\&time of the PDF.
% \item (|xmp:MetadataDate|) : creation date\&time of the Metadata for the PDF.
@@ -776,7 +831,7 @@
% \item (|pdfaid:conformance|) : |a|, |b| or |u| for PDF/A-??
% \item (|pdfuaid:part|) : currently |1| for PDF/UA-1
% \item (|pdfe:ISO_PDFEVersion|) : currently |1| for PDF/E-1
-% \item (|pdf:Version|) : |PDF/X-1|, |PDF/X-2| or |PDF/X-3|
+% \item (|pdf:Version|) : |PDF/X-1|, |PDF/X-2| or |PDF/X-3|
% \item (|pdfx:GTS_PDFXVersion|) : e.g., |PDF/X-1a:2003| up to PDF/X-3 ;
% but no year for PDF/X-4 and PDF/X-5 variants
% \item (|pdfx:GTS_PDFXConformance|) : e.g., |PDF/X-1a:2003| up to PDF/X-2
@@ -788,13 +843,13 @@
% \subsection{Symbols permitted in metadata}\label{ssec-symbols}
%
% Within the metadata, all printable ASCII characters except
-% |\|, |{|, |}| and |%| represent themselves. Also, all printable Unicode characters
-% from the basic multilingual plane (i.e., up to code point U+FFFF)
+% |\|, |{|, |}| and |%| represent themselves. Also, all printable Unicode characters
+% from the basic multilingual plane (i.e., up to code point U+FFFF)
% can be used directly with the UTF-8 encoding.
-% (Please note: encodings other than UTF-8 are not supported in the metadata,
-% except as arguments to `parser-macros'; see Section~\ref{ssec-xmplang}).
-% Consecutive whitespace characters are combined into a single space.
-% Whitespace after a macro such as |\copyright|, |\backslash|, or |\sep| is ignored.
+% (Please note: encodings other than UTF-8 are not supported in the metadata,
+% except as arguments to `parser-macros'; see Section~\ref{ssec-xmplang}).
+% Consecutive whitespace characters are combined into a single space.
+% Whitespace after a macro such as |\copyright|, |\backslash|, or |\sep| is ignored.
% Blank lines are not permitted.
% Moreover, the following markup can be used:
%
@@ -807,32 +862,32 @@
% \item |\copyright|: the copyright symbol \textcopyright
% \end{itemize}
% The macro |\sep| is permitted within |\Author|, |\Keywords|,
-% |\Publisher|, and other macros marked with \starmd\ above.
-% It's purpose is to separate multiple authors, keywords, etc.
-% to appear as separate list items appropriately and consistently
-% in the different ways that such information is represented
-% within the PDF file.
+% |\Publisher|, and other macros marked with \starmd\ above.
+% It's purpose is to separate multiple authors, keywords, etc.
+% to appear as separate list items appropriately and consistently
+% in the different ways that such information is represented
+% within the PDF file.
% The package takes care of this when |\sep| is used.
% For example, in the XMP metadata, it expands as |</rdf:li><rdf:li>| tagging.
%
% \subsubsection{PDF Info strings}\label{sssec-info}
-% When |\sep| is not used within its argument, the metadata from |\Title|,
-% |\Author| and |\Keywords| is also included in the PDF |/Info| dictionary.
+% When |\sep| is not used within its argument, the metadata from |\Title|,
+% |\Author| and |\Keywords| is also included in the PDF |/Info| dictionary.
% When this is the case, validation for the declared standard
% will occur only if the corresponding |/Info| item and XMP metadata field
-% convert to exactly the same Unicode string.
+% convert to exactly the same Unicode string.
% This cannot happen when |\sep| is used, so the |/Info| items are then not populated.
%
% Unfortunately not all PDF browsers (in particular, older ones and much Apple software)
% give ready access to the XMP metadata packet. Some authors want to see everything
-% using e.g., the Unix/Linux command: |pdfinfo -enc UTF-8 |. In fact there is the |-meta|
-% option to get the complete metadata packet (in UTF-8 encoding).
+% using e.g., the Unix/Linux command: |pdfinfo -enc UTF-8 |. In fact there is the |-meta|
+% option to get the complete metadata packet (in UTF-8 encoding).
% This can give more than what one wants, so use it as follows:
% \begin{decl}[]
% pdfinfo -meta <filename>.pdf \textbar\ grep 'dc:'
% \end{decl}
% to extract just the Dublin Core metadata fields.
-%
+%
% Another possibility is to \emph{not} use |\sep| with multiple authors and/or keywords.
% Instead replace it with simply `|, |'. We do not recommend doing this, as more sophisticated
% metadata tools will see the result as a single value, rather than multiple authors, say.
@@ -842,21 +897,21 @@
%
% \subsection{Macros permitted in metadata}\label{ssec-macros}
%
-% Other \TeX\ macros actually can be used, provided the author is very
+% Other \TeX\ macros actually can be used, provided the author is very
% careful and not ask for too-complicated \TeX\ or \LaTeX\ expansions
% into internal commands or non-character primitives; basically just accents,
% macros for Latin-based special characters, and simple textual replacements,
-% perhaps with a simple parameter. A special macro |\pdfxEnableCommands{...}|
+% perhaps with a simple parameter. A special macro |\pdfxEnableCommands{...}|
% is provided to help resolve difficulties that may arise.
%
% Here is an example\footnote{ Other use cases are discussed with regard to
-% Figures~\ref{arm-code} and \ref{math-wflow}.} of the use of |\pdfxEnableCommands|,
-% which occurs with the name of one of our authors {(H\`an Th\'{\^e} Thanh)}
+% Figures~\ref{arm-code} and \ref{math-wflow}.} of the use of |\pdfxEnableCommands|,
+% which occurs with the name of one of our authors {(H\`an Th\'{\^e} Thanh)}
% due to the doubly-accented letter \'{\^e}.
% It is usual to define a macro such as: |\def\thanh{H\`an Th\'{\^e} Thanh}|.
-% In previous versions of the |pdfx| package, use of such a macro
+% In previous versions of the |pdfx| package, use of such a macro
% within the |.xmpdata| file, in the |Copyright| information say,
-% could result in the accent macros expanding into internal primitives, such as
+% could result in the accent macros expanding into internal primitives, such as
% \begin{decl}[]
% | H\unhbox \voidb@x \bgroup \let \unhbox \voidb@x \setbox \@tempboxa ... |
% \end{decl}
@@ -867,7 +922,7 @@
% | \def\`#1{#1^^cc^80}\def\'#1{#1^^cc^81}\def\^#1{#1^^cc^82}}|
% \end{decl}
% \removelastskip\noindent
-% where the |^^cc^80|, |^^cc^81|, |^^cc^82| cause \TeX\ to generate the correct
+% where the |^^cc^80|, |^^cc^81|, |^^cc^82| cause \TeX\ to generate the correct
% UTF-8 bytes for `combining accent' characters.
%
% This works fine for metadata fields that appear just in the XMP packet.
@@ -878,22 +933,22 @@
% | \def\thanh{H^^c3^^a0n Th\eee Thanh}\def\eee{^^c3^^aa^^cc^^81 }}|
% \end{decl}
% \removelastskip\noindent
-% or the above with `\`a' typed directly as UTF-8 instead of |^^c3^^a0|
+% or the above with `\`a' typed directly as UTF-8 instead of |^^c3^^a0|
% and `\^e' in UTF-8 for |^^c3^^aa|.
% The reason for this is due to the |\pdfstringdef| command, which constructs
-% the accented latin letters as single combined characters \`a and \^e,
+% the accented latin letters as single combined characters \`a and \^e,
% without resorting to combining accents, wherever possible.
-% If the Metadata does not have the same, irrespective of Unicode normalisation,
+% If the Metadata does not have the same, irrespective of Unicode normalisation,
% then validation fails.
%
% With version (1.5.6) of the |pdfx| package, such difficulties
-% have been overcome, at least for characters used in Western European,
-% Latin-based languages. The input encoding used when reading the |.xmpdata|
-% file now includes interpretations of \TeX's usual accent commands to
+% have been overcome, at least for characters used in Western European,
+% Latin-based languages. The input encoding used when reading the |.xmpdata|
+% file now includes interpretations of \TeX's usual accent commands to
% produce the required UTF-8 byte sequences.
%
% \medskip
-% Since version (1.5.8) this input encoding was extended to include
+% Since version (1.5.8) this input encoding was extended to include
% macro definitions covering \LaTeX's internal character representation
% of other alphabets (e.g., extended Latin, Cyrillic, Greek, etc.).
% However this can become memory intensive, requiring a large number of
@@ -902,12 +957,12 @@
% be relevant. Currently these are as in Section~\ref{ssec-xmplang}.
%
% A significant portion of the Unicode Basic Plane characters can be covered
-% this way. Modules could even be provided for CJK character sets and
+% this way. Modules could even be provided for CJK character sets and
% mathematical symbols, etc. However, as this can become memory intensive,
% significant testing will be required before these become a standard
-% part of the |pdfx| package.
+% part of the |pdfx| package.
+%
%
-%
% \subsection{Color profiles}\label{sec-profiles}
%
% Most standards compliant PDF documents require a \emph{color
@@ -915,26 +970,26 @@
% determines precisely how the colors used in the document will be
% rendered when printed to a physical medium. This can be used to
% ensure that the document will look exactly the same, even when it is
-% printed on different printers, with different paper types, etc.
-% The inclusion of a color profile is necessary to make the document
+% printed on different printers, with different paper types, etc.
+% The inclusion of a color profile is necessary to make the document
% completely self-contained.
%
% Since most \LaTeX\ users are not graphics professionals and are not
% particularly picky about colors, the |pdfx| package includes default
-% profiles that will be included when nothing else is specified.
+% profiles that will be included when nothing else is specified.
% Therefore, the average user doesn't have to do anything
% special about color.
%
% For users who have a specific color profile they wish to use, it is
% possible to do so by including a |\setRGBcolorprofile| or
% |\setCMYKcolorprofile| command in the |.xmpdata| file. Note that
-% PDF/A and PDF/E require a profile of type `|mnrt|' (monitor) which
-% is usually an RGB color profile, while PDF/X and PDF/VT require type `|prtr|'
+% PDF/A and PDF/E require a profile of type `|mnrt|' (monitor) which
+% is usually an RGB color profile, while PDF/X and PDF/VT require type `|prtr|'
% (printer) which is usually a CMYK color profile; but valid documents
% can be created with the correct type designed for the other color space.
-% Use the following commands to specify an RGB or CMYK color profile,
+% Use the following commands to specify an RGB or CMYK color profile,
% respectively:
-%
+%
% \begin{decl}
% \defmacro{setRGBcolorprofile}\marg{filename}\marg{identifier}\marg{info
% string}\marg{registry URL}
@@ -944,7 +999,7 @@
% \end{decl}
% Within the arguments of these macros, the characters |<|, |>|, |&|,
% |^|, |_|, |#|, |$|, and |~| can be used as themselves, but
-% |%| must be escaped as |\%|.
+% |%| must be escaped as |\%|.
%
% From version (1.6) the default RGB and CMYK color profiles are now supplied
% using the |colorprofiles| package by Norbert Preining and Ross Moore~\cite{colorp}.
@@ -966,7 +1021,7 @@
% \url{http://www.color.org/iccprofile.xalter}.
%
% Alternatively, color profiles are shipped with many Adobe software
-% applications; these are then available for use also with non-Adobe
+% applications; these are then available for use also with non-Adobe
% software. Now the |pdfx| package includes coding to streamline
% inclusion of these profiles in PDF documents, or to specify
% them as `external' profiles, with PDF/X-4p and PDF/X-5pg variants.
@@ -977,17 +1032,17 @@
% Both define commands to use Color Profiles as follows.
% \begin{decl}[]
% \begin{tabular}{ll}
-% \texttt{\string\FOGRAXXXIX} & Coated FOGRA39 (ISO 12647-2:2004)\\
+% \texttt{\string\FOGRAXXXIX} & Coated FOGRA39 (ISO 12647-2:2004)\\
% \texttt{\string\SWOPCGATSI} & U.S. Web Coated (SWOP) v2\\
-% \texttt{\string\JapanColorMMICoated} & Japan Color 2001 Coated\\
-% \texttt{\string\JapanColorMMIUncoated} & Japan Color 2001 Uncoated\\
-% \texttt{\string\JapanColorMMIINewspaper} & Japan Color 2002 Newspaper\\
-% \texttt{\string\JapanWebCoatedAd} & Japan Web Coated (Ad)\\
-% \texttt{\string\CoatedGRACoL} & Coated GRACoL 2006 (ISO 12647-2:2004)\\
+% \texttt{\string\JapanColorMMICoated} & Japan Color 2001 Coated\\
+% \texttt{\string\JapanColorMMIUncoated} & Japan Color 2001 Uncoated\\
+% \texttt{\string\JapanColorMMIINewspaper} & Japan Color 2002 Newspaper\\
+% \texttt{\string\JapanWebCoatedAd} & Japan Web Coated (Ad)\\
+% \texttt{\string\CoatedGRACoL} & Coated GRACoL 2006 (ISO 12647-2:2004)\\
% \texttt{\string\SNAPCGATSII} & CGATS TR 002\\
% \texttt{\string\SWOPCGATSIII} & CGATS TR 003\\
% \texttt{\string\SWOPCGATSV} & CGATS TR 005\\
-% \texttt{\string\ISOWebCoated} & Web Coated FOGRA28 (ISO 12647-2:2004)\\
+% \texttt{\string\ISOWebCoated} & Web Coated FOGRA28 (ISO 12647-2:2004)\\
% \texttt{\string\ISOCoatedECI} & ISO Coated v2 (ECI)\\
% \texttt{\string\CoatedFOGRA} & Coated FOGRA27 (ISO 12647-2:2004)\\
% \texttt{\string\WebCoatedFOGRA} & Web Coated FOGRA28 (ISO 12647-2:2004)\\
@@ -999,18 +1054,18 @@
% As of the time of first compiling this list, only the first six of these result in PDFs
% which can validate with external profiles (i.e., for PDF/X-4p and PDF/X-5pg)
% using the then-current versions of Adobe Acrobat Pro software. It is unclear
-% whether the others (incl.\,\verb|\IFRAXXVI| and \verb|\IFRAXXX|) failed due
-% to incorrect data or problems in the validation software.
+% whether the others (incl.\,\verb|\IFRAXXVI| and \verb|\IFRAXXX|) failed due
+% to incorrect data or problems in the validation software.
% Since then, with updates to Acrobat Pro, almost all the others have been verified
% to work, except \verb|\IFRAXXX| which seems no longer available.
-% Thus these commands come with a `use at own risk' clause.
+% Thus these commands come with a `use at own risk' clause.
%
-% For `external' profiles, there is a command |\setEXTERNALprofile|, taking 9 arguments,
+% For `external' profiles, there is a command |\setEXTERNALprofile|, taking 9 arguments,
% that must be used. Consult |AdobeExternalProfiles.tex| for examples of its use.
-%
-% All but the last of the macros listed above can also be used for valid embedded profiles,
-% providing the corresponding files can be found.
-% The following macros are used to set the (absolute or relative) path,
+%
+% All but the last of the macros listed above can also be used for valid embedded profiles,
+% providing the corresponding files can be found.
+% The following macros are used to set the (absolute or relative) path,
% on the local operating system, to the location of color profile files.
% \begin{decl}
% \defmacro{pdfxSetRGBcolorProfileDir}\marg{path to RGB color profiles}\\
@@ -1020,7 +1075,7 @@
% One can use either a macro |\MacOSColordir| which expands
% into the path for system-provided profiles:
% \begin{decl}[]
-% |/System/Library/ColorSync/Profiles/|
+% |/System/Library/ColorSync/Profiles/|
% \end{decl}
% or the macro |\MacOSLibraryColordir| expanding to:
% \begin{decl}[]
@@ -1030,23 +1085,23 @@
% \begin{decl}[]
% |/Library/Application Support/Adobe/Color/Profiles/Recommended/|
% \end{decl}
-% Under Windows an available macro is |\WindowsColordir| which expands to:
+% Under Windows an available macro is |\WindowsColordir| which expands to:
% \begin{decl}[]
% |C:\Windows\System32\Spool\Drivers\Color/|
% \end{decl}
% being the common location for color profiles.
-% Use these within the \verb|.xmpdata| file as, e.g.,
+% Use these within the \verb|.xmpdata| file as, e.g.,
% \begin{decl}[]
% |\pdfxSetCMYKcolorProfileDir{\AdobeMacOSdir}|
% \end{decl}
% Authors may change the paths to suit their own circumstances, either
-% \emph{before} loading |pdfx.sty| or within the \verb|.xmpdata| file.
+% \emph{before} loading |pdfx.sty| or within the \verb|.xmpdata| file.
%
% PDF/A and PDF/E usually need an RGB profile, while PDF/X and PDF/VT
-% require a CMYK profile. It is possible to use a CMYK profile with PDF/A
+% require a CMYK profile. It is possible to use a CMYK profile with PDF/A
% or PDF/E by specifying |\setRGBcolorprofile{}{}{}{}| in the \verb|.xmpdata| file.
% Beware however, that with PDF/A any coloured hyperlink annotations can
-% cause a validation problem, as these are interpreted as RGB colours
+% cause a validation problem, as these are interpreted as RGB colours
% even when 4 components are given. This may be a bug in validators,
% as PDF specifies that the number of components should match the color space.
%
@@ -1070,44 +1125,44 @@
% \end{decl}
% which uses a profile that accompanies the \texttt{pdfaPilot} software from
% Callas Software Gmbh~\cite{pdfaPilot}.
-% The macro |\CallasMacOSpdfaPilotdir|, defined in the file \texttt{CallasColorProfiles.tex},
+% The macro |\CallasMacOSpdfaPilotdir|, defined in the file \texttt{CallasColorProfiles.tex},
% specifies the directory where this Custom profile is located, when installed under MacOS.
% One needs to |\input CallasColorProfiles.tex| \emph{before} loading the |pdfx| package.
-% Macros for other directories are also defined in this file.
+% Macros for other directories are also defined in this file.
%
% \subsection{Notes on the internal representation of metadata}
-%
+%
% Within the PDF file, metadata is deposited in two places: some data
% goes into the native PDF |/Info| dictionary, and some data goes into
% an XMP packet stored separately within the file. XMP is Adobe's
-% Extensible Metadata Platform~\cite{XMP-spec,XMP-ISO}, and is an XML-based format.
+% Extensible Metadata Platform~\cite{XMP-spec,XMP-ISO}, and is an XML-based format.
% See \href{http://www.adobe.com/devnet/xmp/}{Adobe XMP Development Center}
-% for more exhaustive information about XMP.
+% for more exhaustive information about XMP.
% An XMP Toolkit SDK which supports the GNU/Linux, Macintosh and Windows operating
% systems is also available under modified BSD licence.
%
% Some of the metadata, such as the author, title, and keywords, can be
-% stored \emph{both} in the XMP packet and in the |/Info| dictionary.
-% For the resulting file to be standards-compliant, the two copies of the data
+% stored \emph{both} in the XMP packet and in the |/Info| dictionary.
+% For the resulting file to be standards-compliant, the two copies of the data
% must be identical. This is taken care of automatically by the |pdfx| package,
% except when |\sep| is used to handle multiple entries, as discussed above
-% in \S\ref{sssec-info}. In such cases the string is not included within the |/Info|
+% in \S\ref{sssec-info}. In such cases the string is not included within the |/Info|
% dictionary. Note that this is in accordance with the PDF 2.0 specification~\cite{PDF20},
% which deprecates use of the |/Info| dictionary for such metadata.
-%
-% In principle, users can resort to alternate ways to create an XMP file
-% for inclusion in PDF. In this case, one should create a customised template
+%
+% In principle, users can resort to alternate ways to create an XMP file
+% for inclusion in PDF. In this case, one should create a customised template
% file |pdfa.xmp| or |pdfx.xmp| or |pdfe.xmp| (etc., depending on the PDF flavor)
-% containing the pre-defined data. This can be done by modifying the ones supplied
-% with the |pdfx| package. However, this is an error-prone process and is
-% \emph{not} recommended for most users.
+% containing the pre-defined data. This can be done by modifying the ones supplied
+% with the |pdfx| package. However, this is an error-prone process and is
+% \emph{not} recommended for most users.
% If there is a particular field of metadata that you need and that is not currently
% supported, please contact the package authors.
%
% |pdfx| makes use of the |xmpincl| package to include XMP data into
% the PDF. The documentation of |xmpincl| package may help interested
% users to understand the process of XMP data inclusion.
-%
+%
% \subsection{Tutorials and technical notes}
%
% A tutorial with step-by-step instructions for generating PDF/A files
@@ -1120,7 +1175,7 @@
% \url{http://support.river-valley.com/wiki/index.php?title=Generating_PDF/A_compliant_PDFs_from_pdftex}.
% Be aware that this is based on use of an earlier version of the |pdfx| package,
% so some of the advice may have been superseded.
-%
+%
%
% \section[Installing]{Installing}
% The |pdfx.dtx| package is available on CTAN as usual, via
@@ -1131,24 +1186,24 @@
% For those wishing to do a manual installation, here are some notes.
% The file |pdfx.dtx| is a composite document of program code and
% documentation in \LaTeX{} format, in the tradition of \emph{literate
-% programming}. After having installed the package,
+% programming}. After having installed the package,
% to get the documentation that you are reading now,
-% run (\textsc{pdf})\LaTeX{} on the file |pdfx.dtx|.
+% run (\textsc{pdf})\LaTeX{} on the file |pdfx.dtx|.
% The resulting PDF should be valid as PDF/A-2u.
% Or better, use the included |Makefile|, which will also regenerate the index.
%
% To install the package, first extract the program code; i.e., the
-% file |pdfx.sty|, by running \LaTeX{} or \TeX{} on the file |pdfx.ins|.
+% file |pdfx.sty|, by running \LaTeX{} or \TeX{} on the file |pdfx.ins|.
% Create a directory named |pdfx| under |$TEXMF/tex/latex| and copy the files
-% |pdfx.sty|, |8bit.def|, |glyphtounicode-cmr.tex|, |glyphtounicode-ntx.tex| as well
+% |pdfx.sty|, |8bit.def|, |glyphtounicode-cmr.tex|, |glyphtounicode-ntx.tex| as well
% as the other |*.tex|, |l8u*-penc.def| and |*.xmp| files, into it. Then update
% \TeX's file database using the appropriate command for your distribution
% and operating system (such as |texhash| or |mktexlsr|, or similar).
-%
+%
% \subsection{Limitations and dependencies}
-%
-% The |pdfx.sty| package works with \pdftex\ and also Lua\TeX\ and Xe\TeX\
-% with some minor limitations.
+%
+% The |pdfx.sty| package works with \pdftex\ and also Lua\TeX\ and Xe\TeX\
+% with some minor limitations.
% It further depends on the following other packages.
% \begin{enumerate}
% \item |xmpincl| for insertion of metadata into PDF.
@@ -1159,28 +1214,28 @@
% hyperlinking, bookmarks, etc.
% \item |xcolor| for ensuring consistent use of the color model
% appropriate the PDF variant, within text and hyperlinks (when allowed).
-% \item |glyphtounicode.tex| (not Xe\LaTeX) maps glyph names
+% \item |glyphtounicode.tex| (not Xe\LaTeX) maps glyph names
% to corresponding Unicode code-points.
% \item |ifluatex| allowing coding specific to Lua\LaTeX.
% \item |ifxetex| allowing coding specific to Xe\LaTeX.
-% \item |luatex85| or |pdftexcmds| (Lua\TeX\ only) for access
+% \item |luatex85| or |pdftexcmds| (Lua\TeX\ only) for access
% to primitive commands using \pdftex\ macro names.
-% \item |stringenc| used to help generate proper bookmarks with transliterated input;
+% \item |stringenc| used to help generate proper bookmarks with transliterated input;
% e.g., with |\textLGR| or |\textARM| --- see Section~\ref{sssec-arm}.
% \end{enumerate}
% Other files and packages are loaded as sub-packages or as
-% configuration files for these. Since some of these packages
-% may be loaded by existing documents we provide here advice on
+% configuration files for these. Since some of these packages
+% may be loaded by existing documents we provide here advice on
% how to deal with potential loading and option conflicts.
%
% Firstly, it is best if |pdfx| is the first package loaded; e.g.,
-% directly after the |\documentclass| line. This is not a strict requirement,
+% directly after the |\documentclass| line. This is not a strict requirement,
% but it is worthwhile to deal with the metadata at the top of your \LaTeX\ source,
% allowing correct options to be loaded to cope with validation aspects.
%
% Secondly, replace |\usepackage[<options>]{hyperref}| with |\hypersetup{<options>}|.
-% This deals with most loading issues with the |hyperref| package.
-% Note that PDF/X is a format intended for printing.
+% This deals with most loading issues with the |hyperref| package.
+% Note that PDF/X is a format intended for printing.
% It forbids inclusion of hyperlinks and other actions, including via bookmarks.
% To produce a validating PDF/X document, |pdfx| overrides internal macros
% while keeping colors associated with link anchors.
@@ -1191,53 +1246,53 @@
% Furthermore, options to set metadata components (such as |pdfauthor|,
% |pdftitle|, |pdfsubject|, |pdfkeywords|, etc.) are disabled, since
% |pdfx| has already taken care of this information.
-%
+%
% Thirdly, conflicts with other packages may be dealt with by simply
% changing |\usepackage| to |\RequirePackage| within the document's
-% preamble. But this may not be possible when the |\usepackage|
+% preamble. But this may not be possible when the |\usepackage|
% or |\RequirePackage| command occurs within another package, or with
-% a specific set of options, thereby causing processing to stop.
-% Few packages have a command analogous to |\hypersetup|.
+% a specific set of options, thereby causing processing to stop.
+% Few packages have a command analogous to |\hypersetup|.
% Instead |\PassOptionsToPackage{<options>}{<package>}| can help.
% For |<options>| specify the ones associated with the loading yet to come.
% This can give a smooth processing run, but you'll need to check whether
% the results from those options have actually taken effect.
-% Some examples of this can be seen later, in Figures~\ref{koi8-code}
+% Some examples of this can be seen later, in Figures~\ref{koi8-code}
% and \ref{tldoc-pol}.
%
% \subsubsection{Limitations using Xe\LaTeX}\label{sssec-xetex}
%
-% To process a file using Xe\LaTeX, to produce a document that can
+% To process a file using Xe\LaTeX, to produce a document that can
% validate to a particular PDF standard, one need to use a command
% to run the \TeX\ engine, as follows.
% \begin{decl}[]
% |xelatex -shell-escape -output-driver="xdvipdfmx -z 0" <filename>.tex |
% \end{decl}
% The |-shell-escape| option allows a command-line task to be run,
-% which writes the creation-date \& time of the running job into
-% a small file on disk. This data, written in a specific format, is then
+% which writes the creation-date \& time of the running job into
+% a small file on disk. This data, written in a specific format, is then
% read by the job for inclusion into several metadata fields.
% This emulates the result of \pdftex's |\pdfcreationdate| primitive.
% As there are security implications in allowing arbitrary commands to be run,
-% this need for |-shell-escape| must be viewed as imposing a limitation on the
+% this need for |-shell-escape| must be viewed as imposing a limitation on the
% work-flows in which this can be safely used.
%
-% The |-output-driver="xdvipdfmx -z 0"| suppresses compression, which
+% The |-output-driver="xdvipdfmx -z 0"| suppresses compression, which
% is not allowed for the XMP metadata packet. Without this, the resulting PDF
-% may fail to pass validation tests.
+% may fail to pass validation tests.
%
% Xe\TeX\ is designed for processing UTF-8 input only. When presented
-% with \LaTeX\ source using a legacy encoding, such as |latin2| or |koi8-r|,
-% the input is accepted and a PDF produced. Yet there will be garbage
+% with \LaTeX\ source using a legacy encoding, such as |latin2| or |koi8-r|,
+% the input is accepted and a PDF produced. Yet there will be garbage
% characters corresponding to each character entered from the upper range
-% (128--255). This is evident in the PDF content and bookmarks;
+% (128--255). This is evident in the PDF content and bookmarks;
% yet |pdfx| produces the correct XMP metadata packet.
% So while the techniques explained later in Section~\ref{ssec-multi} are
% valid, the PDF itself does not contain correct content.
%
% Not all fonts, in particular Open-Type fonts (OTF), naturally come with
% mappings of the glyphs to Unicode code points. This is a requirement
-% with PDF/A, PDF/E and PDF/UA standards.
+% with PDF/A, PDF/E and PDF/UA standards.
% Use of such fonts can result in validation errors, such as:
% \begin{itemize}
% \item
@@ -1245,7 +1300,7 @@
% \item
% Type 2 CID font: CIDToGID map is invalid or missing.
% \end{itemize}
-%
+%
% If one has access to Adobe's |Acrobat Pro| software, then its |Preflight|
% utility can rewrite the uncompressed output from Xe\LaTeX\ into a valid
% PDF standard, using compression of the contents but not of the XMP packet.
@@ -1256,7 +1311,7 @@
%
% Lua\LaTeX\ can handle the OTF font issues mentioned for Xe\LaTeX,
% so can produce valid PDF/A documents where Xe\LaTeX\ fails.
-% However, since Lua\TeX\ expects all input source to be UTF8-encoded,
+% However, since Lua\TeX\ expects all input source to be UTF8-encoded,
% it cannot work at all with documents using older legacy encodings.
% Instead one gets error messages such as:
%\begin{decl}
@@ -1299,15 +1354,15 @@
% \item |l8uheb-penc.def| --- input macro declarations for Hebrew alphabet.
% \item |l8ulat-penc.def| --- input macro declarations for Latin 1--9 encodings.
% \item |l8umath-penc.def| --- input macro declarations for mathematical symbols.
-% \item |glyphtounicode-cmr.tex|, |glyphtounicode-ntx.tex| --- maps glyph names
+% \item |glyphtounicode-cmr.tex|, |glyphtounicode-ntx.tex| --- maps glyph names
% to corresponding Unicode for Computer Modern and other \TeX-specific fonts.
% \item |AdobeColorProfiles.tex| --- macros for inclusion of Adobe-supplied color profiles.
% \item |AdobeExternalProfiles.tex| --- macros for use of external color profiles.
% \item |CallasColorProfiles.tex| --- macros for profiles included with Callas pdfaPilot software.
% \end{itemize}
-%
+%
% \subsubsection{Documentation \& Examples}
-%
+%
% \begin{itemize}
% \item |README| --- usual top-level information.
% \item |manifest.txt| --- file list.
@@ -1315,9 +1370,9 @@
% \item |sample.tex|, |sample.xmpdata| --- a sample file with sample metadata.
% \item |small2e-pdfx.tex| --- sample file with included metadata.
% \end{itemize}
-%
+%
% \subsubsection{Sources}
-%
+%
% \begin{itemize}
% \item |src/pdfx.dtx| --- composite package and documentation.
% \item |src/pdfx.ins| --- installer batch file.
@@ -1326,10 +1381,10 @@
% \item |src/Makefile| --- a Makefile for building the documentation.
% \item |src/MANIFEST| --- list of files in this directory.
% \item |src/text89.def| --- used with Figure\,\ref{ex-arm} in the documentation.
-% \item |src/{arm-start,koi8-example,koi8-example2,latin2-example}.tex|
+% \item |src/{arm-start,koi8-example,koi8-example2,latin2-example}.tex|
% --- used in the documentation with figures showing example coding.
% \item |src/{TL-POL-meta,TL-RU-LICRs,TL-RU-metadata,TL-RU-toc,Armenian-example-UTF8,|\\
-% |armtex-meta,usage-meta,math-assign5}.png| --- screenshot images showing multilingual
+% |armtex-meta,usage-meta,math-assign5}.png| --- screenshot images showing multilingual
% and other metadata.
% \end{itemize}
%
@@ -1337,9 +1392,9 @@
%
% The package is released under the \LaTeX{} Project Public
% Licence. Bug reports, suggestions, feature requests, etc., may be
-% sent to the original authors at
+% sent to the original authors at
% \href{mailto:cvr@river-valley.org}{\ttfamily cvr@river-valley.org}
-% and/or
+% and/or
% \href{mailto:thanh@river-valley.org}{\ttfamily thanh@river-valley.org},
% or to the more recent contributors at
% \href{mailto:ross.moore@mq.edu.au}{\ttfamily ross.moore@mq.edu.au}
@@ -1348,9 +1403,9 @@
%
%
% \section[Multilingual and Technical Considerations]{Multilingual and Technical Considerations}\label{sec-meta}
-%
-% \TeX\ and \LaTeX\ have an on-going practice of including metadata within
-% the source files and package documentation. Usually this is done as comments
+%
+% \TeX\ and \LaTeX\ have an on-going practice of including metadata within
+% the source files and package documentation. Usually this is done as comments
% at the beginning of the file; such as the following from the English
% language version of the 2015 \TeX\ Live documentation\footnote{%
% found at |/usr/local/texlive/2016/texmf-dist/doc/texlive/texlive-en/|.}.
@@ -1360,10 +1415,10 @@
% |Michel Goossens, now maintained by Karl Berry and others.|\\
% |Public domain.|
% \end{decl}
-% This provides information, ideally suited for copyright metadata
-% fields, as in Section~\ref{sssec-copy}, as well as for |\Subject|
-% and |\CoverDate| from Section~\ref{sssec-publ}.
-%
+% This provides information, ideally suited for copyright metadata
+% fields, as in Section~\ref{sssec-copy}, as well as for |\Subject|
+% and |\CoverDate| from Section~\ref{sssec-publ}.
+%
% Also near the top of the file one finds front-matter content
% \begin{decl}[]
% |\title{%|\\
@@ -1374,7 +1429,7 @@
% | }|\\
% |\date{May 2015}|
% \end{decl}
-% which supplies metadata information for the commands |\Title|, |\Author|,
+% which supplies metadata information for the commands |\Title|, |\Author|,
% |\CoverDisplayDate| also from Section~\ref{sssec-publ}, and |\CopyrightURL|.
%
% Most of the hundreds of thousands, if not millions of documents prepared
@@ -1384,14 +1439,14 @@
% requirement, for PDFs to satisfy a standard that requires inclusion
% of metadata. This is especially so for government agencies and institutions
% receiving government funding, in several countries around the world.
-%
+%
% It is an aim of the |pdfx| to simplify the process of capturing and
-% including metadata within \LaTeX-produced PDFs, from both the author's
-% view and that of archivists. The extra features introduced with version
-% 1.5.8 take a large step in that direction.
+% including metadata within \LaTeX-produced PDFs, from both the author's
+% view and that of archivists. The extra features introduced with version
+% 1.5.8 take a large step in that direction.
% This includes the ability, described in the next subsection, to reliably
% include data presented in different text encodings, rather than being
-% restricted to UTF-8 only. It is a role of the software to make the
+% restricted to UTF-8 only. It is a role of the software to make the
% conversion, rather than rely on some 3rd party for a translation.
%
%
@@ -1400,40 +1455,40 @@
% A cursory search of the documentation (|.../texmf-dist/doc|) subtree
% of the forthcoming \TeX\,Live 2016 release reveals more than 730 different
% |.tex| or |.dtx| document sources which specify an input encoding,
-% via the |\usepackage[...]{inputenc}| command. Roughly 380 (a bit more
-% than half) declare UTF-8 as the input encoding.
-% Of the remainder there are $\approx 20$ other encodings specified,
-% covering a range of languages for at least part of their content.
+% via the |\usepackage[...]{inputenc}| command. Roughly 380 (a bit more
+% than half) declare UTF-8 as the input encoding.
+% Of the remainder there are $\approx 20$ other encodings specified,
+% covering a range of languages for at least part of their content.
% At some point in time, these documents may be required to have accurate
-% accompanying metadata, as part of conformance to a designated PDF
-% (or other) standard. There are libraries and archives that already must
+% accompanying metadata, as part of conformance to a designated PDF
+% (or other) standard. There are libraries and archives that already must
% meet such standards.
%
-% We have shown above, in Section~\ref{ssec-metadata}, how the |.xmpdata|
-% file can be inserted into the document source, which then ensures that
+% We have shown above, in Section~\ref{ssec-metadata}, how the |.xmpdata|
+% file can be inserted into the document source, which then ensures that
% metadata is reliably transferred along with the source itself.
% This seems a good strategy, but are there any problems with it,
% especially in a multi-lingual context?
-%
-% Modern editing software can require an encoding to be associated
-% with each file. This is what allows the correct characters to be shown,
-% from what is otherwise just a sequence of 8-bit bytes. The flip-side
-% is that arbitrary editing is not permitted. Add some UTF-8 data into
-% a file that is encoded as Latin-2 then try to save it. You may be asked
+%
+% Modern editing software can require an encoding to be associated
+% with each file. This is what allows the correct characters to be shown,
+% from what is otherwise just a sequence of 8-bit bytes. The flip-side
+% is that arbitrary editing is not permitted. Add some UTF-8 data into
+% a file that is encoded as Latin-2 then try to save it. You may be asked
% to specify a new encoding, or the application may even crash out entirely.
-% Maybe this happens \emph{accidentally}. It is not hard for a curly quote
-% (`) or endash (--) to be included; many editors have settings which can
+% Maybe this happens \emph{accidentally}. It is not hard for a curly quote
+% (`) or endash (--) to be included; many editors have settings which can
% do this with normal ascii input. Turn \emph{off} such settings.
%
% The approach that we advocate is that when editing to add metadata,
-% best is to:
+% best is to:
% \begin{enumerate}
-% \item
-% use the \emph{same encoding} as is specified for the file itself,
+% \item
+% use the \emph{same encoding} as is specified for the file itself,
% if known (as is usually the case);
-% \item
-% even if 1. is not possible, use Copy/Paste \emph{within} the document source
-% (e.g., for authors' names, addresses, affiliations, etc.) and from comments,
+% \item
+% even if 1. is not possible, use Copy/Paste \emph{within} the document source
+% (e.g., for authors' names, addresses, affiliations, etc.) and from comments,
% as in Section~\ref{sec-meta} above;
% \item
% avoid typing new characters, especially quotes and dashes, and be extra
@@ -1470,7 +1525,7 @@
% as could be produced for the Russian language version of the \TeX\ Live documentation,
% from coding as shown in Figure\,\ref{koi8-code}.
% The source file itself is actually encoded for KOI8-R, as indicated by the presence
-% of the code line |\usepackage[koi8-r]{inputenc}|,
+% of the code line |\usepackage[koi8-r]{inputenc}|,
% but is deliberately shown here encoded as |T1|~\cite[p.\,449]{LC2}.
% This difference is immaterial for checking the validity of the metadata.
% For example, the stream of upper (accents, etc.) characters within
@@ -1480,17 +1535,17 @@
% in the document, and from early subsection titles.
%
% It is the `parser' command/macro |\textKOI{ ... }| that indicates that the upper range
-% characters (having byte codes 128--255) are to be treated as KOI8-R characters,
+% characters (having byte codes 128--255) are to be treated as KOI8-R characters,
% rather than as part of UTF-8 byte sequences. It works by examining each byte in sequence,
-% and returning the appropriate UTF-8 2-byte sequence for the required cyrillic character.
-% This happens during the processing of data from |\jobname.xmpdata| for fleshing-out
+% and returning the appropriate UTF-8 2-byte sequence for the required cyrillic character.
+% This happens during the processing of data from |\jobname.xmpdata| for fleshing-out
% the XMP metadata packet to be included within the final PDF/A document.
%
% The `parser' macros defined for various encodings, are given in Figure\,\ref{parsers}.
-% In Section\,\ref{ssec-xmplang} the package options are given
+% In Section\,\ref{ssec-xmplang} the package options are given
% for loading the appropriate support for desired languages or alphabets.
% Support for other encodings can be added, if there proves to be a need.
-%
+%
%\begin{figure}[ht]
% \centering
% \begin{tabular}{lll}\hline
@@ -1519,13 +1574,13 @@
% \caption{How to see LICRs in the \texttt{.log} window.}\label{koi8-LICR}
% \end{figure}
%
-% With encoded characters marked in this way with a `parser' macro,
+% With encoded characters marked in this way with a `parser' macro,
% it is actually possible to mix UTF-8 metadata with other bytes;
% provided, of course, you have an editor that allows such a file
% to be created and saved. On the other hand, if you are unhappy with mixing
% content having different encodings, then there is another way, based upon
-% \LaTeX's LICR macros~\cite[\S\,7.11]{LC2} for representing accented
-% and non-latin characters.
+% \LaTeX's LICR macros~\cite[\S\,7.11]{LC2} for representing accented
+% and non-latin characters.
% These are normally hidden away (`I $=$ Internal') but in fact can be seen
% within auxiliary files, such as |.aux| and |.toc|, |.lof| and |.lot|.
% This is how \LaTeX\ stores the knowledge of such characters for use in
@@ -1548,20 +1603,20 @@
% \caption{How to get desired LICRs into the \texttt{.toc} file.}\label{koi8-toc}
% \end{figure}
%
-% Figure~\ref{koi8-LICR} shows how to see this.
+% Figure~\ref{koi8-LICR} shows how to see this.
% The document source in the lower portion clearly shows the cyrillic
% input, whereas the |.log| messages in a command-line window above
% reveal the LICR representation. A command |\showLICRs| is available
% with |pdfx.sty| version 1.5.8, specifically to allow this.
-% Now the LICR representation can be copied directly from the |.log| file,
+% Now the LICR representation can be copied directly from the |.log| file,
% modulo slight difficulties due to the way long lines are broken.
% As this representation is entirely with ASCII characters, it should not
% cause any conflict with any UTF-8 metadata that you want within the same file.
% The |.xmpdata| file might now look as in Figure~\ref{koi8-code2}.
% Although very verbose, this should be resistant to any corruption due to
-% character encodings, and produces the same result within the PDF,
+% character encodings, and produces the same result within the PDF,
% as in Figure~\ref{koi8-meta}.
-%
+%
% Alternatively one can exploit the |.toc| file, using \LaTeX's command
% |\addtocontents|, as shown in Figure~\ref{koi8-toc}.
% After processing the file, you can copy the LICR representations out
@@ -1570,24 +1625,24 @@
%
% Of course once you have harvested the metadata in this format, remove
% or comment-out those extra |\showLICRs| to get uninterrupted processing.
-% Similarly comment-out the extra |\addtocontents| lines, else the real
+% Similarly comment-out the extra |\addtocontents| lines, else the real
% Table-of-Contents will become corrupted with unwanted entries.
% A couple more \LaTeX\ processing runs should restore the PDF to the
% way you want it.
%
% \subsubsection[Metadata with Polish]{Metadata with Polish}\label{sssec-pol}
-%
-% The next example has upper-range bytes intended to represent Latin-2 encoded
-% characters, as used in Polish.
-% With the \LaTeX\ source starting as in Figure~\ref{tldoc-pol},
+%
+% The next example has upper-range bytes intended to represent Latin-2 encoded
+% characters, as used in Polish.
+% With the \LaTeX\ source starting as in Figure~\ref{tldoc-pol},
% the resulting metadata is shown in Figure~\ref{tlmeta-pol}.
-%
+%
%\begin{figure}[htb]
% \centering
% \includegraphics[scale=.45]{TL-POL-meta}
%\caption{Metadata generated from the coding shown in Figure~\ref{tldoc-pol}
-% for the Polish version of \TeX\ Live 2015 documentation, showing Latin-2 encoded
-% characters. The document is valid for PDF/A-2, after having been processed with
+% for the Polish version of \TeX\ Live 2015 documentation, showing Latin-2 encoded
+% characters. The document is valid for PDF/A-2, after having been processed with
% pdf-\LaTeX.}\label{tlmeta-pol}
%\end{figure}
%
@@ -1597,13 +1652,13 @@
% \input{latin2-example}
%\end{decl}
% }%
-%\caption{Start of the \LaTeX\ source for the Polish version of \TeX\ Live
-% documentation. Although Latin-2 encoded, the bytes are shown here using
+%\caption{Start of the \LaTeX\ source for the Polish version of \TeX\ Live
+% documentation. Although Latin-2 encoded, the bytes are shown here using
% \LaTeX's \texttt{T1} encoding \cite[p.\,449]{LC2}.}\label{tldoc-pol}
%\end{figure}
%
% Here the `parser macro' is |\textLII|, which can be seen in Figure~\ref{tldoc-pol}
-% to surround either complete metadata entries, or just those parts containing
+% to surround either complete metadata entries, or just those parts containing
% polish accented (or other) characters in entries that also contain english words.
% The macro |\textLF| provides a line-feed character for the UTF-8 output.
%
@@ -1619,38 +1674,38 @@
% Let's understand better how this example was created. There are three files involved.
%\begin{itemize}
% \item |pdfx.dtx|, the source for this documentation, open in an editor with
-% encoding declared as UTF-8;
+% encoding declared as UTF-8;
% \item |texlive-pl.tex| the Polish documentation for \TeX\ Live, open in the
% same editor with Latin-2 encoding;
% \item |latin2-example.tex| which starts life as an empty file on disk.
%\end{itemize}
% \noindent
-% This latter file must be opened in the editor, with encoding declared as
+% This latter file must be opened in the editor, with encoding declared as
% Latin-2 (ISO-8859-2).
% Next the preamble is copied from |texlive-pl.tex| and pasted into |latin2-example.tex|
% which is then saved to disk. Further editing is done to |latin2-example.tex| to
% add verbatim markers (\texttt{$\vert$...$\vert$}) and adjust line lengths for display
-% within Figure~\ref{tldoc-pol}. This file's contents is included as part of the
-% documentation via |\input{latin2-example}| within an environment that handles
+% within Figure~\ref{tldoc-pol}. This file's contents is included as part of the
+% documentation via |\input{latin2-example}| within an environment that handles
% presentation aspects, and (since 2018) declares |\UseRawInputEncoding|.
%
% What \emph{cannot} be done is to paste the preamble content directly into |pdfx.dtx|.
-% Consider what would then happen, using `t{\l}umaczy' (`translators', on line 10
-% following `UWAGA'). This word shows correctly in the Latin-2 encoded files.
-% It was typeset here using |\l| for the `\l' letter, having Unicode code-point
-% |Ux0142| (so UTF-8 byte pair |"C5|\,|"82|).
-% However, it occurs at slot |"B3| within Latin-2 encoding.
-% In the |T1| font encoding \cite[p.\,449]{LC2} the character glyph name
-% for slot |"B3| is |/scedilla|, which is what shows in Figure~\ref{tldoc-pol}.
-% When the `\l' is pasted directly into a UTF-8 file and shown verbatim,
-% the result is the pair of glyphs |"C5| (|/Aring|) and |"82| (|/Cacute|);
+% Consider what would then happen, using `t{\l}umaczy' (`translators', on line 10
+% following `UWAGA'). This word shows correctly in the Latin-2 encoded files.
+% It was typeset here using |\l| for the `\l' letter, having Unicode code-point
+% |Ux0142| (so UTF-8 byte pair |"C5|\,|"82|).
+% However, it occurs at slot |"B3| within Latin-2 encoding.
+% In the |T1| font encoding \cite[p.\,449]{LC2} the character glyph name
+% for slot |"B3| is |/scedilla|, which is what shows in Figure~\ref{tldoc-pol}.
+% When the `\l' is pasted directly into a UTF-8 file and shown verbatim,
+% the result is the pair of glyphs |"C5| (|/Aring|) and |"82| (|/Cacute|);
% \emph{viz.} {\UseRawInputEncoding |tłumaczy|}.
%
% As with Figure~\ref{koi8-code} it is not important that the correct characters
% are shown here, but that the metadata in |\jobname.xmpdata| corresponds to what
% is used on the titlepage of the PDF; e.g., the contents of |\Title| and |\title|,
% |\Author| and |\author|, etc.
-%
+%
%
% \subsubsection[Metadata with Greek]{Metadata with Greek}\label{sssec-grk}
%
@@ -1674,7 +1729,7 @@
%|% ... |\\
%| |\\
%|\providecommand{\pdfxopts}{a-2u,LGRxmp,LATxmp}|\\
-%|\begin{filecontents*}{\jobname.xmpdata}|\\
+%|\begin{filecontents}[force]{\jobname.xmpdata}|\\
%|\Title{Writing Greek with the "greek" option of the "babel" package}|\\
%{\color{verbcolor}\texttt{\string\Author\{Apostolos Syropoulos\string\sep\ G\"unter Milde\}}}\\
%|\Subject{This document describes the use of the Latin transliteration for Greek that is |\\
@@ -1690,11 +1745,11 @@
%| \textaristerikeraia\textAlpha\textSampi\textQoppa\textZeta\textdexiakeraia}}|\\
%|\CoverDate{1997-10-15}|\\
%|\CoverDisplayDate{October 15, 1997}|\\
-%|\Copyright{This file is part of the Babel system.\textLF This file may be distributed and/or|\\
+%|\Copyright{This file is part of the Babel system.\textLF 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 version.}|\\
%|\CopyrightURL{http://www.latex-project.org/lppl.txt}|\\
-%|\end{filecontents*}|\\
+%|\end{filecontents}|\\
%|%|\\
%|\documentclass[11pt]{article}|\\
%|\usepackage[\pdfxopts]{pdfx}[2016/04/13]|\\
@@ -1725,70 +1780,70 @@
%
% Prior to proper support for UTF-8 input, a method for preparing document source
% for the modern Greek language (and also for polytonic Greek), involved the use
-% of LGR encoded fonts. Such a font has Greek (instead of Latin) letters in the
+% of LGR encoded fonts. Such a font has Greek (instead of Latin) letters in the
% slots for |a-zA-Z|, see~\cite[\S9.4.2]{LC2}. Thus ordinary ASCII letters are used
% to produce the Greek characters; the mapping of ASCII to Greek is referred to as
-% a `transliteration' scheme. It serves as \emph{both} an input encoding, and as
-% a font encoding. Accents and diacritic marks are provided through ligatures
-% built-in to the fonts. Various documents can be found on the web\footnote{e.g.,
+% a `transliteration' scheme. It serves as \emph{both} an input encoding, and as
+% a font encoding. Accents and diacritic marks are provided through ligatures
+% built-in to the fonts. Various documents can be found on the web\footnote{e.g.,
% \url{http://milde.users.sourceforge.net/LGR/}} and
% within \TeX\ Live distributions\footnote{%
-% TeXLive: \textcolor{urlcolor}{\texttt{.../2016/texmf-dist/doc/generic/babel-greek/}}}.
+% TeXLive: \textcolor{urlcolor}{\texttt{.../2016/texmf-dist/doc/generic/babel-greek/}}}.
%
% Indeed the current maintainer G\"unther Milde states
% ``The LGR transliteration does not work for PDF metadata''.
% This is because there is no translation of LGR input into \LaTeX\ LICRs,
% as happens with say |\usepackage[utf8]{inputenc}| for UTF-8 input,
-% or when upper 8-bit characters are present using |\usepackage[iso-8859-7]{inputenc}|.
-% With these, LICRs such as |\textAlpha|, |\textOmicron|, \dots, |\textomega|
+% or when upper 8-bit characters are present using |\usepackage[iso-8859-7]{inputenc}|.
+% With these, LICRs such as |\textAlpha|, |\textOmicron|, \dots, |\textomega|
% are produced, which result in the correct characters for metadata and bookmarks,
% perhaps employing Unicode `combining' characters for accented letters.
% Using |pdfx| the UTF-8 characters can be put directly into the |.xmpdata| file;
% LICRs are interpreted provided the |grkxmp| loading option has been specified.
-%
-% Using the methods of |pdfx| the metadata difficulty is remedied, as can be seen in
-% Figure~\ref{greek-meta} using coding as shown in Figure~\ref{greek-code}. This requires
-% the |LGRxmp| option and |\textLGR| `parser' macro. The original document source,
+%
+% Using the methods of |pdfx| the metadata difficulty is remedied, as can be seen in
+% Figure~\ref{greek-meta} using coding as shown in Figure~\ref{greek-code}. This requires
+% the |LGRxmp| option and |\textLGR| `parser' macro. The original document source,
% called |usage.tex|, can be found in the directory specified in the footnote below.
% As this document is essentially an English description of how to use LGR for Greek,
-% we have used the `Keywords' field to provide examples of such usage.
-% Since a macro |\textgreek| can be used for greek portions within such documents,
+% we have used the `Keywords' field to provide examples of such usage.
+% Since a macro |\textgreek| can be used for greek portions within such documents,
% this macro name is aliased to |\textLGR| within the context where metadata is processed.
-% Furthermore, parsing using |\textLGR| generates correct pre-composed characters
+% Furthermore, parsing using |\textLGR| generates correct pre-composed characters
% for letters with accents or diacritics. Bookmarks can also be generated from
% LGR input, using a technique described in Section~\ref{sssec-arm}.
%
% \bigskip\noindent
% The features available with different loading options are summarised here.
% \begin{itemize}
-% \item
+% \item
% no option: all metadata in |.xmpdata| file is in UTF-8 (incl. ASCII)
% \item
-% |grkxmp|: LICRs can be present; e.g. |\textAlpha|, |\textOmega|, etc.
+% |grkxmp|: LICRs can be present; e.g. |\textAlpha|, |\textOmega|, etc.
% \item
% |LGRxmp|: supports LGR-encoded input and |ISO-8859-7| upper range characters,
-% using the |\textLGR| `parser' macro.
+% using the |\textLGR| `parser' macro.
% \end{itemize}
-% With |LGRxmp| specified, the features of |grkxmp| are also available; so any
+% With |LGRxmp| specified, the features of |grkxmp| are also available; so any
% lower-listed option allows data to be mixed with that for higher-listed ones.
%
%
% The final piece to get validation for PDF/A from LGR input, is to specify
-% a Unicode point for the `|v|' used only in the strong `|sv|' ligature to obtain
-% a non-final `sigma' typeset in isolation.
+% a Unicode point for the `|v|' used only in the strong `|sv|' ligature to obtain
+% a non-final `sigma' typeset in isolation.
%\begin{decl}[]
% |\pdfglyphtounicode{internalchar2}{200D}|
%\end{decl}
% This gives an interpretation as `zero-width joiner'.
% There are two instances of this within |usage.tex|. Copy/Paste works as desired.
-% Using \pdftex\ the above command is done automatically.
-% Drivers, such as Xe\LaTeX\ lacking an implementation of |\pdfglyphtounicode|,
+% Using \pdftex\ the above command is done automatically.
+% Drivers, such as Xe\LaTeX\ lacking an implementation of |\pdfglyphtounicode|,
% can fail to produce a valid PDF due to this rather minor deficiency.
-%
+%
% Greek numerals, using |\greeknumeral| or |\Greeknumeral| cannot work directly within
% a |.xmpdata| file. However if such is desired, the following technique allows
-% correct LICRs to be found for use in the metadata.
-% At any convenient place within the \LaTeX\ source; e.g., near where the required
+% correct LICRs to be found for use in the metadata.
+% At any convenient place within the \LaTeX\ source; e.g., near where the required
% number is used, insert coding such as:
% \begin{decl}[]
% |{\pdfxGreeknumeralsHack \textgreek{\edef\num{\greeknumeral{1997}}\show\num}}%|
@@ -1820,7 +1875,7 @@
%
% \def\ArmTeX{Arm\kern -0.15em\TeX}%
% \subsubsection[Metadata with Armenian]{Metadata with Armenian}\label{sssec-arm}
-%
+%
% \begin{figure}[!htbp]
% \centering
% \includegraphics[scale=.42]{armtex-meta}
@@ -1840,20 +1895,20 @@
% \caption{Enriched \LaTeX\ source for the Armenian version of the \ArmTeX\ manual,
% with added metadata demonstrating the \ArmTeX\ transliteration scheme for \texttt{OT6} encoding.
% Also shown is coding used to produce bookmarks from the transliteration.}\label{arm-code}
-% \end{figure}
-%
+% \end{figure}
+%
% The \ArmTeX\ package\footnote{documentation: %
% TeXLive: \textcolor{urlcolor}{\texttt{.../2016/texmf-dist/doc/generic/armenian/}}}
-% provides the method to typeset Armenian, with input being specified in various ways
-% including a transliteration scheme from ASCII input. This transliteration is directed
+% provides the method to typeset Armenian, with input being specified in various ways
+% including a transliteration scheme from ASCII input. This transliteration is directed
% at the use of the |OT6| encoding, developed for this purpose.
% Each way is supported by |pdfx.sty| with appropriate loading options, similar
-% to the support for Greek~(see Section~\ref{sssec-grk}).
+% to the support for Greek~(see Section~\ref{sssec-grk}).
% \begin{itemize}
-% \item
-% no option: all metadata in |.xmpdata| file is in UTF-8 (incl. ASCII)
% \item
-% |armxmp|: using LICR-like macro names; e.g. |\armAyb|, |\armsha|, |\armfe| etc.
+% no option: all metadata in |.xmpdata| file is in UTF-8 (incl. ASCII)
+% \item
+% |armxmp|: using LICR-like macro names; e.g. |\armAyb|, |\armsha|, |\armfe| etc.
% \item
% |AR8xmp|: using the \ArmTeX\ (|OT6|) transliteration scheme or with upper-range
% characters in |ArmSCII8| encoding, using the `parser' macro |\textARM|.
@@ -1866,9 +1921,9 @@
% implemented in the |OT6|-encoded font, or careful parsing of the input into
% LICR-like macros.
% \LaTeX\ source\footnote{TeXLive: %
-% \textcolor{urlcolor}{\texttt{.../2016/texmf-dist/doc/generic/armenian/examples/latex/}}}
-% for the \ArmTeX\ documentation is available in both English and Armenian.
-% Figure~\ref{arm-meta} shows the result of enriching the Armenian version with relevant
+% \textcolor{urlcolor}{\texttt{.../2016/texmf-dist/doc/generic/armenian/examples/latex/}}}
+% for the \ArmTeX\ documentation is available in both English and Armenian.
+% Figure~\ref{arm-meta} shows the result of enriching the Armenian version with relevant
% metadata, using coding as shown in Figure~\ref{arm-code}.
%
% As in earlier examples, that metadata has come from the extensive comments at the head
@@ -1883,18 +1938,18 @@
% process, as follows.
% \begin{enumerate}
% \item
-% conversion of transliterated source into UTF-8.
+% conversion of transliterated source into UTF-8.
% This is done as the |.xmpdata| file is processed, using |\pdfxEnableCommands|
-% to make global definitions; e.g,
+% to make global definitions; e.g,
%\begin{decl}[]
-% |\xdef\sectAtitle{\textARM{Nerac'uthyun}}|
+% |\xdef\sectAtitle{\textARM{Nerac'uthyun}}|
%\end{decl}
% capturing the section title in the form supplied in the \LaTeX\ source.
-% This can be seen in Figure~\ref{arm-code}, near the end of the |{filecontents*}|
+% This can be seen in Figure~\ref{arm-code}, near the end of the |{filecontents}|
% environment, and at the bottom where the |\section| command would occur.
% \item
% conversion of the UTF-8 representation into |UTF16-be|, suitable for bookmark
-% strings within the PDF file. With \pdftex\ thishis is done using
+% strings within the PDF file. With \pdftex\ this is done using
% |\StringEncodingConvert| from Heiko Oberdiek's |stringenc.sty| package.
% Lua\LaTeX\ and Xe\LaTeX\ can use the UTF-8 representation directly.
% \item
@@ -1909,8 +1964,8 @@
% \end{decl}
% Now |\pdfxBookmark| first checks that the macro passed as the 2nd argument
% actually exists. If it does not, an error message is given and upon continuation
-% would just do |\section{Nerac'uthyun}| as normal.
-% When it does exist, then step 2 is done (by \pdftex) storing the result as |\pdfx@temp|.
+% would just do |\section{Nerac'uthyun}| as normal.
+% When it does exist, then step 2 is done (by \pdftex) storing the result as |\pdfx@temp|.
% With Lua\TeX\ and Xe\TeX, |\pdfx@temp| stores a copy of the UTF-8 data.
% Then the commands needing to be executed are essentially
%\begin{decl}[]
@@ -1921,9 +1976,9 @@
% so that the correct section heading is displayed on the page,
% but when |\sectAtitle| is processed to create a bookmark it is replaced
% by the pre-prepared contents of |\pdfx@temp|.
-% There are some technicalities\footnote{In fact a small change is made
-% to how \textcolor{verbcolor}{\texttt{\string\@@writetorep}} is used.}
-% to make this work cleanly,
+% There are some technicalities\footnote{In fact a small change is made
+% to how \textcolor{verbcolor}{\texttt{\string\@@writetorep}} is used.}
+% to make this work cleanly,
% as just doing these commands would interfere with other uses of |\pdfstringdef|.
% In case a long sectioning command has an optional argument, or a $*$-variant
% is needed, then include it this way.
@@ -1933,32 +1988,32 @@
%
%
% \subsubsection[Other Languages]{Other Languages}\label{sssec-other}
-%
+%
% There is support for Metadata using characters from other languages,
-% with corresponding loading options, as follows.
+% with corresponding loading options, as follows.
% \begin{itemize}
-% \item |arbxmp| : Arabic;
+% \item |arbxmp| : Arabic;
% via LICRs |\textarabicalef|, |\textarabicqaf|,\\ |\textarabicaleflowerhamza|, etc.
-% \item |devxmp| : Devanagari;
+% \item |devxmp| : Devanagari;
% via LICRs |\textdevanagaria|, |\textdevanagarivocalicr|,\\ |\textdevanagaricandrabindu|, etc.
% \item |hebxmp| : Hebrew;
% via LICRs |\hebalef|, |\hebsamekh|, |\hebfinalpe| and accent marks |\segol|, |\qubuts|, etc.
-% \item |vnmxmp| : Vietnamese;
+% \item |vnmxmp| : Vietnamese;
% via LICRs |\ABREVE|, |\OCIRCUMFLEX|, |\uhorn| etc. and the combinations of multiple accents
% applied as usual via |\'|, |\`|, |\^|, etc.
% \end{itemize}
% The LICRs include support mapping accented letters to precomposed glyphs, falling back on
% `combining characters' only in unusual situations. Special input conventions or methods,
-% such as transliteration schemes, are \emph{not yet} supported.
-% Indeed, these options are largely untested, so any difficulties encountered should
+% such as transliteration schemes, are \emph{not yet} supported.
+% Indeed, these options are largely untested, so any difficulties encountered should
% be reported to the package authors. Requests to support extra input methods or other
% language blocks should also be directed to the authors, along with pointers to where
-% the desired input methods are fully described.
+% the desired input methods are fully described.
% Sample `real-world' documents would be greatly appreciated.
%
%
% \subsection[L8U pseudo-encoding]{L8U pseudo-encoding}\label{ssec-L8U}
-%
+%
% To understand how |pdfx| handles the translation into UTF-8 of input that is not already
% in that format, we'll briefly discuss \LaTeX's font-encoding mechanism, which is the
% basis for LICR macros~\cite[\S\,7.11]{LC2}. As an example, consider the macro |\textgamma|
@@ -1973,32 +2028,32 @@
% |ucs/data/uni-3.def:\uc@dclc{947}{default}{\textgamma}%|
% \end{decl}
% Here the |\uc@dclc| commands associate UTF-8 input of |Ux0263| (IPA small letter gamma)
-% and |Ux03B3| (Greek small letter gamma) internally with |\textgamma|,
+% and |Ux03B3| (Greek small letter gamma) internally with |\textgamma|,
% whereas the others deal with output formats\footnote{Whereas {\color{verbcolor}\texttt{ucs.sty}}
-% handles UTF-8 input, mapping it to LICRs, with {\color{verbcolor}\texttt{pdfx.sty}}
+% handles UTF-8 input, mapping it to LICRs, with {\color{verbcolor}\texttt{pdfx.sty}}
% we need the reverse mapping into UTF-8, not just from LICRs but also from legacy
-% 8-bit encodings and transliteration schemes.}.
-% In four of these examples there is a number, which refers to a position in an `encoding vector'
+% 8-bit encodings and transliteration schemes.}.
+% In four of these examples there is a number, which refers to a position in an `encoding vector'
% for the particular font used to place the character onto the printable page.
% For example |LGR| refers to greek fonts, encoded as explained in Section~\ref{sssec-grk}.
% IPA phonetics use the |T3| encoding, so |\textgamma| refers to a character
% from a different Unicode block.
%
% With two of these cases there is no specific font.
-% For example, |PU| is used to create bookmark strings,
-% and other PDF string inclusions, using |\pdfstringdef| from the |hyperref| package.
-% With |greek-euenc.def| designed for Xe\TeX\ and Lua\TeX, the encoding can be variable,
-% with the output bytes being those for the UTF-8 encoding of $\gamma$, namely |^^ce^^b3|,
-% shown here as the |T1|-encoded pair |γ|.
-% The term `pseudo-encoding' has been coined by the \LaTeX\ team.
-% Although there is no actual font to determine the encoding, to an author there is essentially
-% no difference in how corresponding macros can be used to get a character placed into
-% an appropriate structure within the PDF.
+% For example, |PU| is used to create bookmark strings,
+% and other PDF string inclusions, using |\pdfstringdef| from the |hyperref| package.
+% With |greek-euenc.def| designed for Xe\TeX\ and Lua\TeX, the encoding can be variable,
+% with the output bytes being those for the UTF-8 encoding of $\gamma$, namely |^^ce^^b3|,
+% shown here as the |T1|-encoded pair |γ|.
+% The term `pseudo-encoding' has been coined by the \LaTeX\ team.
+% Although there is no actual font to determine the encoding, to an author there is essentially
+% no difference in how corresponding macros can be used to get a character placed into
+% an appropriate structure within the PDF.
%
% Thus there are 4 output forms for this character,
% and we've not even considered how $\gamma$ is used in mathematics!
% To handle these concurrently, one has internally-defined control-sequence names
-% \begin{decl}[]
+% \begin{decl}[]
% |\LGR\textgamma=\char"67| \qquad where $6\times 16 + 7 = 103$\\
% |\T3\textgamma=\char"47| \qquad where $4\times 16 + 7 = 71$\\
% |\PU\textgamma=\long macro:->\83\263|\\
@@ -2006,12 +2061,12 @@
% \end{decl}
% where the 2nd `\textbackslash' is part of the name\footnote{%
% obtained using {\color{verbcolor}%
-% \texttt{\string\csname\space LGR\string\string\string\textgamma\string\endcsname}}.}.
+% \texttt{\string\csname\space LGR\string\string\string\textgamma\string\endcsname}}.}.
% The latter macro is explained below.
% To use the specific version of the macro, \LaTeX\ maintains a `font-encoding'
% parameter, set using |\fontencoding{...}| local to the surrounding environment grouping.
%
-% To the above declarations of |\textgamma|, to deal with conversion to UTF-8,
+% To the above declarations of |\textgamma|, to deal with conversion to UTF-8,
% the |pdfx| package adds the following declarations when the |LGRxmp| option is used.
% \begin{decl}[]
% |pdfx/l8ugrk.def:\DeclareTextCommand{\textgamma}{L8U}{γ}|\\
@@ -2019,11 +2074,11 @@
% |pdfx/l8ugrk.def:\DeclareTextCompositeCommand{\textLGRenc}{L8U}{g}{γ} |\\
% |pdfx/l8ugrk.def:\DeclareTextCompositeCommand{\textLGRenc}{L8U}{^^e3}{γ}|
% \end{decl}
-% The pseudo-encoding name |L8U| indicates \textbf{L}ocal conversion into UTF-\textbf{8} \textbf{U}nicode,
-% as required for metadata, using |pdfx.sty|. Currently this pseudo-encoding is used in one place only;
+% The pseudo-encoding name |L8U| indicates \textbf{L}ocal conversion into UTF-\textbf{8} \textbf{U}nicode,
+% as required for metadata, using |pdfx.sty|. Currently this pseudo-encoding is used in one place only;
% during the interpretation of information supplied through the |\jobname.xmpdata| file.
% This happens as part of the |pdfx| package, \emph{before} it uses |xmpincl.sty|.
-% Such specificity justifies being called a `Local' encoding.
+% Such specificity justifies being called a `Local' encoding.
% However, other tasks may emerge requiring on-the-fly conversion to UTF-8.
% In this case all the functionality of this pseudo-encoding could be shifted into a separate package,
% and the name changed to reflect this more general usage.
@@ -2031,7 +2086,7 @@
% is possibly a sufficient reason to have a separate package. Another possibility is to
% generate on-the-fly creation of UTF-8 strings, to be sent to Xe\TeX\ or Lua\TeX\ running
% as a slave process to generate images of string using OTF fonts, which \pdftex\ currently
-% cannot handle. The result would then be imported back into the running job as an image.
+% cannot handle. The result would then be imported back into the running job as an image.
% The authors invite suggestions of how this |L8U| pseudo-encoding functionality can be put to
% good use.
%
@@ -2041,7 +2096,7 @@
% |\DeclareTextComposite{\`}{T1}{A}{192}|
%\end{decl}
% to get the pre-composed `\`A', rather than a composite built from \`{} and `A'.
-% The last parameter is an index into a font; however the |\DeclareTextCompositeCommand|
+% The last parameter is an index into a font; however the |\DeclareTextCompositeCommand|
% variant allows arbitrary coding as that final parameter, so can be the bytes for the
% UTF-8 representation of a character.
% In the above code lines, macros are defined as follows
@@ -2067,18 +2122,18 @@
% | ... \textLGRenc{#1}\textgreekLGR@i #2\@empty | \quad if |#2| has more tokens\\
% |\textgreekLGR@i #1->\textgreekLGR@ii #1|
%\end{decl}
-% Thus |\textLGRenc| is called on each token in the argument of |\textLGR|.
+% Thus |\textLGRenc| is called on each token in the argument of |\textLGR|.
% Now |\textLGRenc|, which is applicable only when |L8U| pseudo-encoding is in effect,
% has a default expansion of just passing the character through unchanged; \emph{viz.}
%\begin{decl}[]
% |\DeclareTextCommand{\textLGRenc}{L8U}[1]{#1}|
%\end{decl}
% but by using |\DeclareTextCompositeCommand{\textLGRenc}{L8U}{...}{...}|,
-% alternate expansions apply with specific arguments, as shown above.
+% alternate expansions apply with specific arguments, as shown above.
% In particular, that final argument can include coding that `looks ahead' to find the next
% character. This is used, for example, with diacritics in Greek, multi-letter sequences
% for Armenian letters, and other special cases related to ligatures and punctuation symbols.
-% To illustrate this Figure~\ref{ex-arm} (below) follows the conversion of a specific word,
+% To illustrate this Figure~\ref{ex-arm} (below) follows the conversion of a specific word,
% given in the transliteration for Armenian~(see Section~\ref{sssec-arm}).
% This conversion occurs using only \TeX's macro-expansion ability.
% Some details relevant to this example are explained there.
@@ -2117,26 +2172,26 @@
%\end{decl}
% The macro |\armen@en| (named for \textbf{e}mpty or \textbf{n}ext),
% looks ahead to see if the 5th-next argument token is |\@empty|,
-% signifying that there is nothing left of the original input.
-% (A closed bracing |{...}| counts as a single argument.) If |\@empty| the tokens in
+% signifying that there is nothing left of the original input.
+% (A closed bracing |{...}| counts as a single argument.) If |\@empty| the tokens in
% the 2nd bracing are substituted, otherwise those in the 3rd bracing.
-% Similarly |\armen@nc| (named for \textbf{n}ext \textbf{c}haracter)
+% Similarly |\armen@nc| (named for \textbf{n}ext \textbf{c}haracter)
% looks to see whether that 5th argument token matches with the character in the
% 1st bracing. If so, the 2nd bracing's tokens are substituted, else those of the 3rd bracing.
-% This is how to cope with `Sh' or `SH', implemented as ligatures in an |OT6| encoded font,
-% denoting a different letter from a single `S'. The macro |\armuh| is used here
+% This is how to cope with `Sh' or `SH', implemented as ligatures in an |OT6| encoded font,
+% denoting a different letter from a single `S'. The macro |\armuh| is used here
% to \emph{prevent} a ligature from |ev| that would otherwise occur.
-% One writes |e\armuh v| to get the separate letters. As the space becomes an active token,
-% we need |\textarmgobblespace| to restart parsing appropriately.
-% Of course |\textarmenARM@i| behaves like |\textgreekLGR@i|
-% as explained earlier, with a test for |\@empty| as the 2nd token.
+% One writes |e\armuh v| to get the separate letters. As the space becomes an active token,
+% we need |\textarmgobblespace| to restart parsing appropriately.
+% Of course |\textarmenARM@i| behaves like |\textgreekLGR@i|
+% as explained earlier, with a test for |\@empty| as the 2nd token.
% At the end, any remaining |\@empty| expand into nothing.
%
% \caption{Partial tracing of the conversion of an Armenian word, indicated by the red oval
% in Figure~\ref{arm-meta}, from {\color{verbcolor}\texttt{OT6}} transliterated form into UTF-8 bytes.
-% In each line, \TeX\ expansion occurs at the position of the left-most `\textbackslash'.
-% The resulting bytes are shown here in {\color{verbcolor}\texttt{T1}} encoding,
-% as in previous examples, with {\color{verbcolor}\texttt{?}} indicating an invisible character
+% In each line, \TeX\ expansion occurs at the position of the left-most `\textbackslash'.
+% The resulting bytes are shown here in {\color{verbcolor}\texttt{T1}} encoding,
+% as in previous examples, with {\color{verbcolor}\texttt{?}} indicating an invisible character
% in the byte range {\color{verbcolor}\texttt{Ox80}--\texttt{Ox9f}}.
% See Figure\,\ref{src-arm} for how this source appears with UTF-8 encoding.
% }\label{ex-arm}
@@ -2147,8 +2202,8 @@
% to an LICR called |\textarmuh|. Since |\armuh| is already defined, not as an LICR,
% it cannot be declared to be one without creating problems.
% Instead, within the environment grouping where |L8U| pseudo-encoding is specified,
-% one uses |\let\armuh\textarmuh| within a `rebinding' macro command
-% |\LIIXUmaparmenianletters|\footnote{The start of the macro name is derived from pseudo-Roman
+% one uses |\let\armuh\textarmuh| within a `rebinding' macro command
+% |\LIIXUmaparmenianletters|\footnote{The start of the macro name is derived from pseudo-Roman
% numerals: IX = 9, IIX = 8}
% to get LICR functionality from user-commands.
%\begin{decl}[]
@@ -2161,7 +2216,7 @@
% | \def\armbf{}%|\\
% | ... }|
%\end{decl}
-% As well as rebinding each command for a letter, the font style-switching commands
+% As well as rebinding each command for a letter, the font style-switching commands
% are aliased to do nothing, as these are not relevant to creating UTF-8 output.
% Being localised by the |L8U| grouping, this causes no problem elsewhere within the document.
% These are similar to macros |\psdaliasnames| and |\psdmapshortnames| from |hyperref.sty|,
@@ -2169,7 +2224,7 @@
%
% \begin{figure}[htb]
% \includegraphics[scale=.625]{Armenian-example-UTF8.png}
-% \caption{Image of part of the source coding for Figure~\ref{ex-arm},
+% \caption{Image of part of the source coding for Figure~\ref{ex-arm},
% viewed as UTF-8 encoded, within editing software.}\label{src-arm}
% \end{figure}
%
@@ -2186,10 +2241,10 @@
% \item |\LIIXUmaplatinchars| and |\LIIXUcancelfontswitches| with |LATxmp|
% \item |\LIIXUmapmathletterlikes| always defined
% \item |\LIIXUmapmathspaces| always defined
-% \item |\LIIXUmapmath...| with |mathxmp| --- see Section~\ref{ssec-math} below.
+% \item |\LIIXUmapmath...| with |mathxmp| --- see Section~\ref{ssec-math} below.
%\end{itemize}
% It may well be that more macro names can be added to some of these commands,
-% to allow macro usage within the metadata.
+% to allow macro usage within the metadata.
% Suggestions for such additions should be sent to the |pdfx| package authors, along
% with example documents. Similarly support for more languages can be requested.
%
@@ -2199,9 +2254,9 @@
% Macro commands for many mathematical symbols can be used directly in metadata without extra
% support; e.g., basic arithmetic operations, letter-like symbols, spacing commands.
% Super- and subscripted letters and numerals can use |\textsuperscript| and |\textsubscript|
-% when there is an appropriate Unicode character (digits, comma, $+$/$-$/$=$, parentheses,
+% when there is an appropriate Unicode character (digits, comma, $+$/$-$/$=$, parentheses,
% many letters but not all).
-%
+%
% When the |mathxmp| loading option is specified, many more symbols become available,
% using `rebinding' macros. These are necessary, as the macros for mathematical symbols
% are generally \emph{not} defined as LICRs, but use |\mathchar|. Thus new LICRs are needed,
@@ -2243,8 +2298,8 @@
% where |\liixu@mathreorder| uses some \TeX\ pattern-matching to allow the |\textmathrmstring|
% parser macro to work on the argument to |\mathrm| before allowing |\textmathnormal| parsing
% to continue afterwards. We refer to this as `nested parsing'.
-%
-% Similarly `nested parsing' can be used with superscripts and subscripts using |^{...}| and |_{...}|
+%
+% Similarly `nested parsing' can be used with superscripts and subscripts using |^{...}| and |_{...}|
% and to specify linebreaks, and even super-/subscripts within styles; viz.
%\begin{decl}[]
% |\Declar...CompositeCommand{\textmathnormal}{L8U}{^}{\liixu@mathreorder\textsuperstring}|\\
@@ -2259,7 +2314,7 @@
% is required to uncover cases which may require special handling.
% An ultimate aim is to be able to just copy the \LaTeX\ source for the `Abstract' of a technical
% paper into the |\Subject{...}| field of the |.xmpdata| file, with a large expectation that
-% it will `just work', or need only trivial edits to make it so.
+% it will `just work', or need only trivial edits to make it so.
%
%
% \subsection[Metadata in a Production Workflow]{Metadata in a Production Workflow}\label{ssec-wflow}
@@ -2273,8 +2328,8 @@
% \noindent
% At Macquarie University, the Mathematics Department produces personalised topmatter
% or coversheets for student assignments and tutorial papers using \LaTeX, incorporating
-% information that has been stored in a database. This is done by writing extra definitions
-% at the top of a copy of the \LaTeX\ source as prepared by the lecturers.
+% information that has been stored in a database. This is done by writing extra definitions
+% at the top of a copy of the \LaTeX\ source as prepared by the lecturers.
% For example information analogous to the following
%\begin{decl}[]
% |\def\thestudentname{\utext{Moore} Ross}|\\
@@ -2286,7 +2341,7 @@
% |\def\theduedate{09/05 2016}|\\
% |...|
%\end{decl}
-% is prepended to the file shown in Figure~\ref{math-wflow},
+% is prepended to the file shown in Figure~\ref{math-wflow},
% for each student downloading their personalised assignment paper.
% The \LaTeX\ source makes use of this information, including recording some of it
% within the Metadata.
@@ -2301,7 +2356,7 @@
% |\def\assigntopics{orbits, stabilisers, groups of matrices}|\\
% |\providecommand{\pdfxopts}{a-1b}|\\
% |%% XMP metadata for PDF/A conformance|\\
-% |\begin{filecontents*}{\jobname.xmpdata}|\\
+% |\begin{filecontents}[force]{\jobname.xmpdata}|\\
% |\Title{\theunitcode\ \theoffering: Assignment \theassignmentnumber}|\\
% |\Author{\assignLecturer}|\\
% |\Copyright{Macquarie University, Mathematics Department}|\\
@@ -2310,7 +2365,7 @@
% |\Keywords{\assigntopics}|\\
% |\Creator{pdfTeX + pdfx.sty with \pdfxopts\space option}|\\
% |\pdfxEnableCommands{\def\utext#1{#1,}}|\\
-% |\end{filecontents*}|\\
+% |\end{filecontents}|\\
% ||\\
% |\documentclass[a4paper,11pt]{article}|\\
% |\RequirePackage{assignments}|\\
@@ -2332,7 +2387,7 @@
% Another way that jobs can be customised using essentially the same \LaTeX\ source,
% is via the command used to initiate the job. For example the file |sample.tex|,
% accompanying the |pdfx| distribution, can be used to test the loading options to create
-% PDFs conforming to the various flavours of PDF/A, PDF/E and PDF/X.
+% PDFs conforming to the various flavours of PDF/A, PDF/E and PDF/X.
% Consider a shell script containing the following (Unix/Linux) commands.
%\begin{decl}[]
% |pdflatex "\def\pdfxopt{a-2b}\input sample.tex"|\\
@@ -2348,11 +2403,11 @@
% from the same \LaTeX\ source, named according to each particular variant.
% A default |\providecommand{\pdfxopt}{a-1b}| at the start of |sample.tex| catches the case
% of normal typesetting, doing nothing when |\pdfxopt| already has an expansion value.
-%
+%
% \goodbreak
% \subsection[Further Developments]{Further Developments}\label{ssec-further}
%
-% Prospects for further development of the |pdfx| package are as follows,
+% Prospects for further development of the |pdfx| package are as follows,
% listed not necessarily in order of perceived importance.
% \begin{itemize}
% \item
@@ -2363,7 +2418,7 @@
% Conformance to multiple PDF standards; e.g. both PDF/A and PDF/E,
% both PDF/A and PDF/X with RGB or CMYK color profile, other combinations.
% \item
-% Explore delaying the processing of metadata until |\begin{document}|,
+% Explore delaying the processing of metadata until |\begin{document}|,
% thereby allowing some fields to be set automatically from other information
% supplied within the document preamble.
% \item
@@ -2384,7 +2439,6 @@
% Support emerging standards based on PDF 2.0~\cite{PDF20}.
% \end{itemize}
%
-%
% \section[Bibliography]{Bibliography}%
% {\let\newpage\relax
% \begin{thebibliography}{999}
@@ -2396,28 +2450,35 @@
%
% \bibitem{XMP-spec}Adobe Systems Inc.;
% XMP Specification, Adding Intelligence to Media. September 2005.
-% Also available as ISO 16684-1:2012\,\cite{XMP-ISO}.\\
+% Also available as ISO 16684-1:2012\,\cite{XMP-ISO}. %\\
% \url{http://www.adobe.com/devnet/xmp/}.
%
% \bibitem{PDFUA1} ANSI\,/\,AIIM\,/\,ISO\,14289-1:2012;
% Document management applications --- Electronic document file format enhancement for accessibility
% --- Part 1: Use of ISO\,32000-1\,(PDF/UA-1);
-% Technical Committee ISO/TC\,171/SC\,2 (July 2012).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=54564}.\\
-% Revised as ISO\,14289-1:2014 (December 2014):
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=64599}.\\
-% Available from ANSI at \url{https://webstore.ansi.org/Standards/ISO/ISO142892014}.
+% Technical Committee ISO/TC\,171/SC\,2 (July 2012 -- withdrawn). %\\
+% Revised as ISO\,14289-1:2014 (Dec. 2014):
+% \url{https://www.iso.org/standard/64599.html}.\\
+% Available from ANSI at \url{https://webstore.ansi.org/standards/iso/iso142892014}.
%
-% \bibitem{PDFUABSI} BS,/\,ISO\,14289-1:2014; Document Management Applications.
-% Electronic Document File Format Enhancement For Accessibility. Use Of ISO 32000-1 (PDF/UA-1) (British Standard)
-% \url{https://webstore.ansi.org/Standards/BSI/BSISO142892014}.
+% \bibitem{PDFUA2} ISO\,14289-2:2024;
+% Document management applications --- Electronic document file format enhancement for accessibility
+% --- Part 2: Use of ISO\,32000-2\,(PDF/UA-2);\\
+% Technical Committee ISO/TC\,171/SC\,2 WG9 (March 2024).
+% \href{https://pdfa.org/iso-14289-2-pdfua-2/}%
+% {\UrlFont https://pdfa.org/iso-\penalty-20 14289-2-pdfua-2/}
+%
+% \bibitem{PDFUABSI} BS,/\,ISO\,14289-1:2014; Document Management Applications.
+% Electronic Document File Format Enhancement For Accessibility.
+% Use Of ISO 32000-1 (PDF/UA-1) (British Standard)
+% \url{https://webstore.ansi.org/standards/bsi/bsiso142892014}.
%
-% \bibitem{pdfaPilot} Callas Software Gmbh.;
+% \bibitem{pdfaPilot} Callas Software Gmbh.;
% \texttt{pdfaPilot}, plug-in or desktop software for PDF/A versions.
% \url{https://www.callassoftware.com/en/products/pdfapilot}.
%
% \bibitem{DC}
-% Dublin Core Metadata Element Set, Version 1.1, October 2010\\
+% Dublin Core Metadata Element Set, Version 1.1, October 2010\\
% \url{http://dublincore.org/documents/dces/}.
%
% \bibitem{BCP47}IETF; Best Current Practice \#47: Tags for Identifying Languages.
@@ -2425,115 +2486,157 @@
% \url{https://tools.ietf.org/pdf/bcp47.pdf}.
%
% \bibitem{PDFX}ISO\,15930-1:2001;
-% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 1:
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 1:
% Complete exchange using CMYK data (PDF/X-1 and PDF/X-1a).
% Technical Committee ISO/TC\,130 (December 2001).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=29061}.
+% \url{https://www.iso.org/standard/29061.html}.
%
% \bibitem{PDFX3}ISO\,15930-3:2002;
-% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 3:
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 3:
% Complete exchange suitable for colour-managed workflows (PDF/X-3).
% Technical Committee ISO/TC\,130 (September 2002).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=34941}.
+% \url{https://www.iso.org/standard/34941.html}.
%
% \bibitem{PDFX1a}ISO\,15930-4:2003;
-% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 4:
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 4:
% Complete exchange of CMYK and spot colour printing data using PDF 1.4 (PDF/X-1a).
% Technical Committee ISO/TC\,130 (December 2003).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=39938}.
+% \url{https://www.iso.org/standard/39938.html}.
%
% \bibitem{PDFX3a}ISO\,15930-6:2003;
-% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 6:
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 6:
% Complete exchange of printing data suitable for colour-managed workflows using PDF 1.4 (PDF/X-3).
% Technical Committee ISO/TC\,130 (December 2003).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=39940}.
+% \url{https://www.iso.org/standard/39940.html}.
%
% \bibitem{PDFX4}ISO\,15930-7:2010;
-% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 7:
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 7:
% Complete exchange of printing data (PDF/X-4) and partial exchange of printing data with external profile reference (PDF/X-4p) using PDF 1.6.
% Technical Committee ISO/TC\,130 (July 2010).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=55843}.
+% \url{https://www.iso.org/standard/55843.html}.
%
% \bibitem{PDFX5}ISO\,15930-8:2010;
-% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 8:
-% Partial exchange of printing data using PDF 1.6 (PDF/X-5). \hfil
-% Technical Committee ISO/TC\,130 (July 2010). \hfil
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=55844}.
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 8:
+% Partial exchange of printing data using PDF 1.6 (PDF/X-5).
+% Technical Committee ISO/TC\,130 (July 2010).
+% \url{https://www.iso.org/standard/55844.html}.
% Revision via Corrigendum: ISO\,15930-8:2010/Cor\,1:2011 (August 2011);
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=60210}.
+% \url{https://www.iso.org/standard/60210.html}.
+%
+% \bibitem{PDFX6}ISO\,15930-9:2020;
+% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 9:
+% Complete exchange of printing data (PDF/X-6) and partial exchange of printing data
+% with external profile reference (PDF/X-6p and PDF/X-6n) using PDF 2.0
+% Technical Committee ISO/TC\,130 (November 2020).
+% \url{https://www.iso.org/standard/77103.html}.
+%
%
% \bibitem{PDFVT}ISO\,16612-2:2010;
-% Graphic technology\,---\,Variable data exchange\,---\,Part 2:\hfil
-% Using PDF/X-4 \penalty-5000 and PDF/X-5 (PDF/VT-1 and PDF/VT-2).
-% Technical Committee ISO/TC\,130 (December 2005). \hfil
-% \href{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=38013}%
-% {{\small\tt http://www.iso.org/iso/home/store/catalogue\_tc/catalogue\_detail.htm?\penalty-200csnumber=38013}}.
+% Graphic technology\,---\,Variable data exchange---Part\,2:
+% Using PDF/X-4\penalty-5000\ and PDF/X-5 (PDF/VT-1 and PDF/VT-2).
+% Technical Committee ISO/TC\,130 (December 2005).
+% \url{https://www.iso.org/standard/38013.html}.%
+%
+%
+% \bibitem{PDFVT3}ISO\,16612-3:2020;
+% Graphic technology\,---\,Variable data exchange---Part\,3:
+% Using PDF/X-6\penalty-5000\ (PDF/VT-3).
+% Technical Committee ISO/TC\,130 (Edition1, 2020).
+% \url{https://www.iso.org/standard/75218.html}.%
%
% \bibitem{XMP-ISO}ISO\,16684-1:2012;
-% Graphic technology --- Extensible metadata platform (XMP) specification --- Part 1:
+% Graphic technology --- Extensible metadata platform (XMP) specification --- Part 1:
% Data model, serialization and core properties.
-% Technical Committee ISO/TC\,130 (February 2012).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=57421}.
+% Technical Committee ISO/TC\,130 (February 2012 -- withdrawn).
+% Revised as ISO\,16684-1:2019; (Edition 2, 2019).
+% \url{https://www.iso.org/standard/75163.html}.
%
-% \bibitem{PDFA}ISO\,19005-1:2005;
+% \bibitem{PDFA}ISO\,19005-1:2005;
% Document Management --- Electronic document file format for long term preservation
% --- Part 1: Use of PDF\,1.4\,(PDF/A-1);
% Technical Committee ISO/TC\,171/SC\,2 (Sept. 2005).
-% Revisions via Corrigenda: ISO\,19005-1:2005/Cor\,1:2007 (March 2007);
-% ISO\,19005-1:2005/Cor\,2:2011 (Dec. 2011). \\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=38920}.
+% Revisions via Corrigenda: ISO\,19005-1:2005/Cor\,1:2007 (March 2007);
+% ISO\,19005-1:2005/Cor\,2:2011 (Dec. 2011).
+% \url{https://www.iso.org/standard/38920.html}.
%
% \bibitem{PDFA2}ISO\,19005-2:2011;
% Document Management --- Electronic document file format for long term preservation
% --- Part 2: Use of ISO\,32000-1\,(PDF/A-2); \hfill
-% Technical Committee ISO/\penalty-200 TC\,171/SC\,2 (June 2011).\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=50655}.
+% Technical Committee ISO/\penalty-200 TC\,171/SC\,2 (June 2011).
+% \url{https://www.iso.org/standard/50655.html}.
%
% \bibitem{PDFA3}ISO\,19005-3:2012;
% Document Management --- Electronic document file format for long term preservation
% --- Part 3: Use of ISO\,32000-1 with support for embedded files (PDF/A-3);
-% Technical Committee ISO/TC\,171/SC\,2 (October 2012).\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=57229}.
+% Technical Committee ISO/TC\,171/SC\,2 (October 2012).
+% \url{https://www.iso.org/standard/57229.html}.
+%
+% \bibitem{PDFA4}ISO\,19005-4:2020;
+% Document Management --- Electronic document file format for long term preservation
+% --- Part 4: Use of ISO\,32000-2 (PDF/A-4);
+% Technical Committee ISO/TC\,171/SC\,2 (Edition 1, 2020).
+% \url{https://www.iso.org/standard/71832.html}.
+%
+% \bibitem{PDFDecl} PDF Declarations. A use of ISO\,32000.
+% PDF Association, Berlin, Germany (2019).
+% \url{https://pdfa.org/resource/pdf-declarations/}
%
% \bibitem{PDFE}ISO\,24517-1:2008;
-% Document Management --- Engineering document format using PDF --- Part 1:
+% Document Management --- Engineering document format using PDF --- Part 1:
% Use of PDF 1.6 (PDF/E-1);
% Technical Committee ISO/TC\,171/SC\,2 (May 2008).\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=42274}.
+% \url{https://www.iso.org/standard/42274.html}.
%
% \bibitem{ISO32000}ISO\,32000-1:2008;
% Document management\,---\,Portable document format\,(PDF\,1.7);
-% Technical Committee ISO/TC\,171/SC\,2 (July 2008).
+% Technical Committee ISO/TC\,171/SC\,2 (July 2008).
% Also available as \cite{PDF17}.\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=51502}.
+% \url{https://www.iso.org/standard/51502.html}.
%
% \bibitem{PDF20}ISO\,32000-2:2017;
% Document management --- Portable document format --- Part~2: PDF\,2.0;
-% Technical Committee ISO/TC\,171/SC\,2 Document file formats, EDMS systems
-% and authenticity of information. (July 2017)\\
-% \url{https://www.iso.org/standard/63534.html}.
+% Technical Committee ISO/TC\,171/SC\,2 Document file formats, EDMS systems
+% and authenticity of information. (July 2017 --- withdrawn)
+% Revised as ISO\,32000-2:2020; (Edition 2, 2020)
+% \url{https://www.iso.org/standard/75839.html}.\\
+% Sponsored access available since 5 April 2023, from
+% \href{https://www.pdfa-inc.org/product/iso-32000-2-pdf-2-0-bundle-sponsored-access/}{PDF Association}.
%
% \bibitem{LC2} F.\,Mittelbach, M.\,Goossens with J.\,Braams, D.\,Carlisle, C.\,Rowley;
% The \LaTeX\ Companion --- 2nd edition. Addison--Wesley (now Pearson Education Inc.), 2004.
% ISBN 0-201-36299-6 (paperback).
%
-% \bibitem{TN0009}PDF/A Competence Centre;
-% TechNote 0009: XMP Extension Schemas in PDF/A-1. (March 2008)
+% \bibitem{PDF-LaTeX} \LaTeX\ Project Working Group, PDF Association.
+% \url{https://pdfa.org/community/latex-project-lwg/}
+%
+% \bibitem{LaTeXPDF} \LaTeX\ Tagged PDF\,---\,A blueprint for a large project.
+% Frank Mittelbach, Chris Rowley; TUGboat, Volume 41 (2020), No 3.
+% \url{https://tug.org/TUGboat/tb41-3/tb129mitt-tagpdf.pdf}.
+% Project website \url{https://www.latex-project.org/};
+% \href{https://www.latex-project.org/publications/2020-FMi-TUB-tb129mitt-tagpdf.pdf}{Preprint}.
+%
+% \bibitem{TN0009}PDF/A Competence Centre;\,
+% TechNote\,0009: XMP Extension Schemas in PDF/A-1.\penalty-2000\ (March 2008) \ \
% \href{https://www.pdfa.org/publication/technical-note-tn-0009-xmp-extension-schemas-in-pdfa-1/}%
-% {\small\tt https://www.pdfa.org/publication/technical-note-tn-0009-xmp-extension\penalty-200 -schemas-in-pdfa-1/}.
+% {\UrlFont https://www.pdfa.org/publication/technical-note-tn-0009-xmp-\penalty-20 extension-schemas-in-pdfa-1/}.
%
% \bibitem{PDF-UA}
-% PDF/UA Technical Implementation Guide: Understanding ISO\,14289-1 (PDF/UA-1). \penalty-200
-% AIIM Global Community of Information Professionals. \hfil
+% PDF/UA Technical Implementation Guide: Understanding ISO\,14289-1\penalty-2000\ (PDF/UA-1).
+% AIIM Global Community of Information Professionals.
% \href{http://www.aiim.org/Research-and-Publications/standards/committees/PDFUA/Technical-Implementation-Guide}%
-% {\small\tt http://www.aiim.org/Re\penalty-200 search-and-Publications/standards/committees/PDFUA/Technical-Implementation\penalty-200 -Guide}.
+% {\UrlFont http://\penalty-20 www.aiim.org/Research-and-Publications/standards/committees/PDFUA/Technical\penalty-200 -Implementation-Guide}.
+%
+% \bibitem{WTPDF} Well-Tagged PDF (WTPDF);
+% Using Tagged PDF for Accessibility and Reuse in PDF 2.0.
+% PDF Association; PDF Reuse TWG \& PDF/UA TWG. Version 1.0.0, February 2024.
+% \url{https://pdfa.org/wtpdf/}
%
-% \bibitem{colorp} N.\,Preining;
+% \bibitem{colorp} N.\,Preining;
% \texttt{colorprofiles} \textemdash\ Collection of free ICC profiles.
-% \TeX\ and \LaTeX\ package (by R.\,Moore), distributed with \TeX{}Live. (November 2018)\\
+% \TeX\ and \LaTeX\ package (by R.\,Moore), distributed with \TeX{}Live. (Nov. 2018)
% \url{https://ctan.org/pkg/colorprofiles}.
%
-% \bibitem{PRISM}PRISM; Publishing Requirements for Industry Standard Metadata.
+% \bibitem{PRISM}PRISM; Publishing Requirements for Industry Standard Metadata.
% PRISM Metadata Initiative; Idealliance Working Group.
% \url{http://www.idealliance.org/specifications/prism-metadata-initiative/prism}
%
@@ -2541,16 +2644,24 @@
% Generation of PDF/X- and PDF/A-compliant PDFs with \pdftex --- \texttt{pdfx.sty}.
% TUGboat Vol.\,36, No.\,2; TUG 2015 Conference Proceedings. \TeX\ Users Group, 2015; pp.\,136--142.
%
-% \bibitem{veraPDF} veraPDF. Industry Supported PDF/A Validation.
-% Software, dual-licensed under the GNU General Public License v3 or later (GPLv3+)
+% \bibitem{tagpdf} |tagpdf| -- Tools for experimenting with tagging using pdf\LaTeX\ and Lua\LaTeX.
+% Ulrike Fischer. Available via CTAN repository.
+% \url{https://ctan.org/pkg/tagpdf}.
+%
+% \bibitem{tpdf} |tpdf|; Ross Moore. Unpublished.
+% \LaTeX\ package and macro suite for producing `real-world' standards-conforming PDF documents.
+% Examples available at \url{http://maths.mq.edu.au/~ross/TaggedPDF/}.
+%
+% \bibitem{veraPDF} veraPDF. Industry Supported PDF/A Validation.
+% Software, dual-licensed under the GNU General Public License v3 or later (GPLv3+)
% and Mozilla Public License v2 or later (MPLv2+). \url{https://verapdf.org}.
% Wiki: \url{https://github.com/veraPDF/veraPDF-validation-profiles/wiki}
%
-% \bibitem{RDF} World Wide Web Consortium (W3C);
+% \bibitem{RDF} World Wide Web Consortium (W3C);
% Resource Description Format: RDF 1.1 XML Syntax. W3C Recommendation. (February 2014)
% \url{https://www.w3.org/TR/rdf-syntax-grammar/}.
-%
-% \bibitem{wikiPDF}Wikipedia;
+%
+% \bibitem{wikiPDF}Wikipedia;
% PDF/A: \url{https://en.wikipedia.org/wiki/PDF/A}\newline
% PDF/E: \url{https://en.wikipedia.org/wiki/PDF/E}\newline
% PDF/VT: \url{https://en.wikipedia.org/wiki/PDF/VT}\newline
@@ -2560,7 +2671,7 @@
% \end{thebibliography}
% }\goodbreak
% \section[Implementation]{Implementation}
-%
+%
% \iffalse
%<*package>
% \fi \hfuzz=2.5pt%
@@ -2575,7 +2686,7 @@
}{}%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pdfx}
- [2019/02/27 v1.6.3 PDF/X and PDF/A support (CVR/HTH/RRM/PS)]
+ [2024/06/24 v1.6.5f PDF/X and PDF/A support (CVR/HTH/RRM/PS)]
\newif\ifpdfx@noBOM \pdfx@noBOMfalse % use a BOM in the XMP packet
\newif\ifpdfx@x \pdfx@xfalse % PDF/X mode
@@ -2594,13 +2705,28 @@
\def\xmp@ReleaseDate{2005} % 2001 for PDF/X-1, 2005 for PDF/A-1,
% 2010 for PDF/A-2, 2012 for PDF/A-3.
+%% with Beamer pgf will have written Resource objects already
+\newif\ifpdfx@luacheck@needed
+\@ifpackageloaded{pgfcore}{\pdfx@luacheck@neededtrue}{}
+%% thanks to Ryutaroh Matsumoto for reporting this issue
+
\newcount\pdfx@minorversion
+\newcount\pdfx@majorversion
+\expandafter\ifx\csname pdfmajorversion\endcsname\relax
+%% RRM: 20240614 LuaLaTeX may not have this defined
+ \newcount\pdfmajorversion
+ \pdfmajorversion=1\relax
+\fi
\expandafter\ifx\csname pdfminorversion\endcsname\relax
-\else
- \global\pdfx@minorversion=\the\pdfminorversion
+%% RRM: 20240614 this could be set in luatex85 package
+ \newcount\pdfminorversion
+ \pdfminorversion=3\relax
\fi
+%% options can change these from the defaults
+\global\pdfx@majorversion=\the\pdfmajorversion
+\global\pdfx@minorversion=\the\pdfminorversion
-\def\pdfx@ErrorWarning#1#2#3#4{%
+\def\pdfx@ErrorWarning #1#2#3#4{%
\ifpdfx@noerr \PackageWarning{pdfx}{#1.^^J #2#3.^^J}%
\else \PackageError{pdfx}{#1}{#2#4.^^J
Use option 'noerr' to avoid this message.^^J}%
@@ -2781,6 +2907,9 @@
\DeclareOption{pdf15}{\global\pdfx@minorversion=5 }% 2005 Acrobat 6
\DeclareOption{pdf16}{\global\pdfx@minorversion=6 }% 2006 Acrobat 7 (ISBN 0-321-30474-8)
\DeclareOption{pdf17}{\global\pdfx@minorversion=7 }% 2008 ISO 32000-1:2008
+\DeclareOption{pdf20}{% 2020 ISO 32000-2:2020
+ \global\pdfx@majorversion=2 \relax
+ \global\pdfx@minorversion=0 }%
%% inhibits writing the XMP byte-order marker
\DeclareOption{noBOM}{\pdfx@noBOMtrue}
@@ -2845,6 +2974,13 @@
\ExecuteOptions{noBOM,a-1b}
\ProcessOptions
+\RequirePackage{ifluatex}
+\ifpdfx@luacheck@needed
+ \ifluatex
+ \RequirePackage{luatex85}
+ \fi
+\fi
+
\ifpdfx@ua\ifpdfx@x\else
\expandafter\if\xmp@Conformance A\else
\pdfx@ErrorWarning{PDF/UA requires 'Tagged PDF' for any structure.^^J
@@ -2857,19 +2993,23 @@
\expandafter\ifx\csname pdflastobj\endcsname\relax
\else
- \ifnum\pdflastobj >\z@ % pdftex has already written objects
+ \ifnum\pdflastobj >\z@ % pdf/luatex has already written objects
+ % e.g. by pgfcore , called from Beamer or other class
\ifnum\pdfx@minorversion=\pdfminorversion\else
\PackageError{pdfx}%
{^^J(pdfx) Cannot change the \string\pdfminorversion^^J%
- (pdfx) PDF version remains at 1.\the\pdfminorversion.^^J%
- (pdfx) Use \string\pdfminorversion=\the\pdfx@minorversion\space
+ (pdfx) PDF version remains at \the\pdfmajorversion.\the\pdfminorversion.^^J%
+ (pdfx) Use \string\pdfmajorversion=\the\pdfx@majorversion\space^^J%
+ and \string\pdfminorversion=\the\pdfx@minorversion\space
before \string\documentclass}%
{(pdfx) Another package or document-class has written objects into the PDF.^^J%
- (pdfx) Hit return to continue with PDF version 1.\the\pdfminorversion.%
- }%
+ (pdfx) Hit return to continue with PDF version %
+ \the\pdfmajorversion.\the\pdfminorversion.}%
+ \global\pdfx@majorversion=\the\pdfmajorversion
\global\pdfx@minorversion=\the\pdfminorversion
\fi
\else
+ \global\pdfmajorversion\pdfx@majorversion
\global\pdfminorversion\pdfx@minorversion
\fi
\fi
@@ -2877,6 +3017,7 @@
\expandafter\ifx\csname thepdfminorversion\endcsname\relax
\expandafter\ifx\csname pdfminorversion\endcsname\relax
\else
+ \xdef\thepdfmajorversion{\the\pdfmajorversion}
\xdef\thepdfminorversion{\the\pdfminorversion}
\fi\fi
@@ -2885,16 +3026,21 @@
\def\pdf@minorversion@xetex=#1{\gdef\thepdfminorversion{#1}}%
\let\pdfminorversion\pdf@minorversion@xetex
\else
- \ifnum\pdfminorversion < 4\relax
- \ifpdfx@x
- % more testing needed with PDF/X
- \else
- \pdfminorversion=4\relax % assumed for PDF/A ; options may change this for PDF/X
- \gdef\thepdfminorversion{4}%
- \fi
+ \ifnum\pdfmajorversion > 1\relax
+ \pdfminorversion=3\relax
+ %% else some JPG graphics with DCT encoding will fail
\else
- \ifnum\pdfminorversion<\thepdfminorversion\relax
- \global\pdfminorversion=\thepdfminorversion\relax
+ \ifnum\pdfminorversion < 4\relax
+ \ifpdfx@x
+ % more testing needed with PDF/X
+ \else
+ \pdfminorversion=4\relax % assumed for PDF/A ; options may change this for PDF/X
+ \gdef\thepdfminorversion{4}%
+ \fi
+ \else
+ \ifnum\pdfminorversion<\thepdfminorversion\relax
+ \global\pdfminorversion=\thepdfminorversion\relax
+ \fi
\fi
\fi
\fi
@@ -2902,7 +3048,8 @@
\pdfresetpageorigin=0
\fi
-\expandafter\ifx\csname pdfomitcharset\endcsname\relax\else
+\expandafter\ifx\csname pdfomitcharset\endcsname\relax
+\else
\ifpdfx@omitcharset
\pdfomitcharset = 1 %
%% do not create /Charset listings of font glyphs;
@@ -2940,8 +3087,10 @@
\RequirePackage{iftex}
\RequirePackage{ifpdf}
+%\expandafter\show\csname ifpdf\endcsname
%% Support for pdfTeX primitives when using XeTeX:
\RequirePackage{ifxetex}
+%\expandafter\show\csname ifpdf\endcsname
\ifxetex
\def\pdfx@pages@xetex#1{\special{pdf:put @pages <<#1>>}}
\def\pdfx@pageattr@xetex#1{\special{pdf:put @thispage <<#1>>}}
@@ -2971,7 +3120,10 @@
}%
\RequirePackage{pdftexcmds}%
\let\pdfx@mdfivesum\pdf@mdfivesum
- \let\pdfescapestring\pdf@escapestring
+% \let\pdfescapestring\pdf@escapestring
+ \long\def\pdf@escapestring@byte #1{%
+ \directlua {oberdiek.pdftexcmds.escapestring("\luaescapestring {#1}", "byte")}}%
+ %\let\pdf@escapestring\pdf@escapestring@byte
\else
\ifxetex
\expandafter\ifx\csname mdfivesum\endcsname\relax
@@ -3021,6 +3173,13 @@
\pdfgeninterwordspace=0 \relax
\fi
\begingroup
+ \expandafter\ifx\csname stockwidth\endcsname\relax\else
+ \ifdim\stockwidth=\z@ %% 20240528
+ \else
+ %% 20231023 support for memoir's stockwidth/height
+ \let\paperwidth\stockwidth
+ \let\paperheight\stockheight
+ \fi \fi
\dimen0=0.996264009963\paperwidth\relax
\edef\pdfx@mwidth{\strip@pt\dimen0}%
\advance\dimen0 -25\p@
@@ -3049,7 +3208,7 @@
\expandafter\immediate\pdfx@pageattr@xetex{\pdfx@everypage@xetex}}%
\EveryShipout{%
\expandafter\immediate\pdfx@pageattr@xetex{\pdfx@everypage@xetex}}%
- \else
+ \else
\EveryShipout{%
\expandafter\ifx\expandafter\relax\the\pdfpageattr\relax
\immediate\pdfpageattr\expandafter{\the\pdfpagesattr}%
@@ -3068,7 +3227,8 @@
\else
\ifnum\thepdfminorversion >3 \relax
\expandafter\ifx\csname pdfsuppresswarningdupmap\endcsname\relax
- \expandafter\ifx\csname pdfmapline\endcsname\relax\else
+ \expandafter\ifx\csname pdfmapline\endcsname\relax
+ \else
\pdfmapline{+dummy-space <dummy-space.pfb}
\fi
\else
@@ -3098,16 +3258,46 @@
\@namedef{M@L8U}{}%
%% adjust to LaTeX's 2018 change to the default encoding
+\def\pdfx@utfencodingname{utf8}%
+\def\pdfx@RawInputEncoding{%
+% \begingroup
+% \@tempcnta=0
+% % print out the catcodes of chars < 32
+% \loop
+% \typeout{\the\@tempcnta: \expandafter\the\catcode\@tempcnta}%
+% \advance\@tempcnta\@ne
+% \ifnum\@tempcnta<32
+% \repeat
+% \endgroup
+ \UseRawInputEncoding
+}
\expandafter\ifx\csname inputencodingname\endcsname\relax
\else
\def\pdfx@restoreencoding#1{%
- \@tempcnta=128
+ \@tempcnta=1\relax
+ \loop
+% \catcode\@tempcnta=13\relax
+ \advance\@tempcnta\@ne
+ \ifnum\@tempcnta<8\relax
+ \repeat
+ \catcode11=13 \relax
+ \@tempcnta=14\relax
+ \loop
+% \catcode\@tempcnta=13\relax
+ \advance\@tempcnta\@ne
+ \ifnum\@tempcnta<31 \relax
+ \repeat
+ \@tempcnta=128\relax
\loop
- \catcode\@tempcnta=13
+% \catcode\@tempcnta=13\relax
\advance\@tempcnta\@ne
\ifnum\@tempcnta<256
\repeat
- \inputencoding{#1}%
+% {\tracingall
+% \ifx\inputencodingname\pdfx@utfencodingname\else
+ \let\inputencodingname\relax %% kill previous
+% \fi
+ \inputencoding{#1}%}%
\let\LastDeclaredEncoding\pdfx@LastDeclaredEncoding
\let\DeclareFontEncoding@\pdfx@DeclareFontEncoding@
\let\DeclareUnicodeCharacter\pdfx@DeclareUnicodeCharacter
@@ -3116,7 +3306,18 @@
\let\pdfx@inputencodingname\inputencodingname
\global\let\pdfx@DeclareUnicodeCharacter\DeclareUnicodeCharacter
\global\let\pdfx@DeclareFontEncoding@\DeclareFontEncoding@
- \UseRawInputEncoding
+% \@tempcnta=0
+% \loop
+% \typeout{\the\@tempcnta: \expandafter\the\catcode\@tempcnta}%
+%% \expandafter\showthe\catcode\@tempcnta
+% \advance\@tempcnta\@ne
+% \ifnum\@tempcnta<32
+% \repeat
+%\show\UseRawInputEncoding
+%% if the encoding is utf8 then don't change it here – wrong!
+% \ifx\inputencodingname\pdfx@utfencodingname\else
+% \expandafter\expandafter
+ \expandafter\pdfx@RawInputEncoding %\fi
\fi
\InputIfFileExists{\pdfx@encodingfile}{}{}
\expandafter\ifx\csname pdfx@inputencodingname\endcsname\relax
@@ -3243,6 +3444,10 @@
\ifx\relax#1\relax\else\gdef\xmp@lang@Identifier{#1}\fi
\def\afterxmp@parse{\let\Identifier\pdfx@extraIdentifier}%
\xmp@parse{\global\let\xmp@Identifier\@this}}
+\newcommand{\pdfx@Nickname}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Nickname{#1}\fi
+% \def\afterxmp@parse{\let\Identifier\pdfx@extraNickname}%
+ \xmp@parse{\global\let\xmp@Nickname\@this}}
\newcommand{\pdfx@Thumbnails}{%
\def\afterxmp@parse{\let\Thumbnails\pdfx@extraThumbnails}%
\xmp@parse{\global\let\xmp@Thumbnails\@this}}
@@ -3443,6 +3648,28 @@
\xmp@parse{\global\let\xmp@extraIdentifier\@this}%
}%
+%% Nickname only supports a single usage, for PDF/X
+%\newcommand{\pdfx@extraNickname}[1][]{%
+% \ifx\relax#1\relax
+% \expandafter\expandafter\expandafter\gdef
+% \expandafter\expandafter\expandafter\xmp@Nickname
+% \expandafter\expandafter\expandafter{%
+% \expandafter\xmp@Nickname\pdfx@insert@sep}%
+% \else
+% \expandafter\expandafter\expandafter\gdef
+% \expandafter\expandafter\expandafter\xmp@Nickname
+% \expandafter\expandafter\expandafter{%
+% \expandafter\xmp@Nickname\pdfx@insert@sep[#1]}%
+% \fi
+% \def\afterxmp@parse{%
+% \expandafter\expandafter\expandafter\gdef
+% \expandafter\expandafter\expandafter\xmp@Nickname
+% \expandafter\expandafter\expandafter{%
+% \expandafter\xmp@Nickname\xmp@extraNickname}%
+% }%
+% \xmp@parse{\global\let\xmp@extraNickname\@this}%
+% }%
+
\newcommand{\pdfx@extraThumbnails}[1][]{%
\ifx\relax#1\relax
\expandafter\expandafter\expandafter\gdef
@@ -3737,7 +3964,7 @@
%\let\sep\pdfx@sep
%% Note: '\ ', \&, \copyright are already predefined by hyperref.
%% allow LICRs to expand into PDF strings
- \def\cf@encoding{PU}%
+ \def\cf@encoding{PU}%
\def\9##1{\ifcase##1\string\0\or\string\1\or\string\2\or\string\3\fi}%
\def\8{\string\00}%
\def\0{\string\0}\def\1{\string\1}\def\2{\string\2}\def\3{\string\3}%
@@ -3798,6 +4025,9 @@
%%----------------------------------------------------------------------
%% Alternative way to get the CreationDate using Lua for XeTeX
\ifdefined\pdfcreationdate\else
+ \ifdefined\creationdate %% added to XeTeX in 2019
+ \let\pdfcreationdate\creationdate
+ \else
\begingroup %% ensure correct catcodes, not done by \dospecials
\catcode`\:=12 \catcode`\.=12
\begin{filecontents*}{creationdate.lua}
@@ -3833,7 +4063,7 @@
\def\noexpand\pdfcreationdate{\string D:20181028075445+10'00'}}%
\x
\fi
-\fi
+\fi \fi
%%----------------------------------------------------------------------
\def\pdfx@findUUID#1{\edef\pdfx@tmpstring{\pdfx@mdfivesum{#1}}
@@ -4004,7 +4234,7 @@
\fi\fi
}%
\fi\fi
-\hypersetup{pdfencoding=auto}% unicode
+%\hypersetup{pdfencoding=auto}% 2019-12-08 No; this writes 8-bit bookmarks.
\expandafter\ifx\csname KV@Hyp@psdextra\endcsname\relax\else
\hypersetup{psdextra}
\fi
@@ -4370,7 +4600,7 @@
%% ----------------------------------------------------------------------
\begingroup
- \catcode`\_ 12 \catcode`\" 12 \catcode`\' 12
+ \catcode`\_ 12 \catcode`\" 12 \catcode`\' 12
\catcode`\< 12 \catcode`\> 12 \catcode`\/ 12 \catcode`\[ 12 \catcode`\] 12
\edef\@pctchar{\expandafter\@gobble\string\%}
\edef\@bchar{\expandafter\@gobble\string\\}
@@ -4733,22 +4963,24 @@
\fi
}% end of \catcode
+
%% ----------------------------------------------------------------------
%% \pdfx@topdfstring\toka\tokb: Convert the string in \tokb to a format
%% appropriate for PDF /Info strings, i.e., PDFDoc encoding or UTF-16
%% encoding, and store the result in \toka As a special case, if \tokb
%% is \@empty, set \toka to \@empty.
-\def\pdfx@topdfstring#1#2{%
- \ifx#2\@empty
+\RequirePackage{stringenc}% prevent it loading later inside a group
+\def\pdfx@topdfstring #1#2{%
+ \ifx #2\@empty
\global\let#1\empty
\else
\begingroup
\ifluatex\else\ifxetex\else
\inputencoding{utf8}%
\fi\fi
- \hypersetup{pdfencoding=auto}%
- \pdfstringdef#1{#2}%
+ \@ifl@t@r\fmtversion{2022/06/01}{}{\hypersetup{pdfencoding=auto}}%
+ \pdfstringdef #1{#2}%
\endgroup
\fi
}
@@ -4858,7 +5090,7 @@
\RequirePackage{stringenc}%
\begingroup
\catcode`\| 0
- \catcode `\\ 12
+ \catcode `\\ 12
|gdef |pdfx@parsebackslash#1{%
|begingroup
|def |pdfx@parsemacro{#1}%
@@ -4873,7 +5105,7 @@
|edef |pdfx@parseout{|pdfx@parseout \\}%
|def |next{|pdfx@doparsebackslash#2|pdfx@endparse}%
|fi |next
- }
+ }
|endgroup
\def\pdfx@parseend{%
\edef\next{\endgroup\def\expandafter\noexpand\pdfx@parsemacro{\pdfx@parseout}}%
@@ -5018,7 +5250,7 @@
\spacefactor\accent@spacefactor
}
%% same for named accents in math-mode
-\def\pdfx@mathaccentV#1#2#3#4#5{%
+\def\pdfx@mathaccentV #1#2#3#4#5{%
#5{\mathsurround=\z@\relax
\everymath{}%
\mathchoice
@@ -5027,12 +5259,74 @@
{\setbox\z@\hbox{$\scriptstyle #5$}\kern-\wd\z@}%
{\setbox\z@\hbox{$\scriptscriptstyle #5$}\kern-\wd\z@}%
}%
+% \pdfx@AMS@mathaccentV{#1}{#2}{#3}{#4}{#5}%
\AMS@mathaccentV{#1}{#2}{#3}{#4}{\phantom{#5}}%
}
+
+%%% the original AMS coding:
+%%\mathaccentV=macro: #1#2#3#4#5->\ifmmode
+%% \gdef \macc@tmp {\macc@depth \@ne }%
+%% \setbox \z@ \hbox {\let\mathaccentV \macc@test
+%% \let \use@mathgroup \@gobbletwo
+%% \let \select@group \@gobblethree \frozen@everymath {}$#5$}\macc@tmp
+%% \ifnum \macc@depth =\@ne
+%% \global \let \macc@nucleus \@empty
+%% \mathaccent "\accentclass@
+%% \else \@xp \macc@nested
+%% \fi #2#3#4{#5}\macc@nucleus
+%% \else
+%% \@xp \nonmatherr@ \csname #1\endcsname \fi .
+
+\def\pdfx@AMS@mathaccentV #1#2#3#4#5{%
+ \ifmmode
+ \gdef \macc@tmp {\macc@depth \@ne }%
+ \setbox \z@ \hbox {\let\mathaccentV \macc@test
+ \let \use@mathgroup \@gobbletwo
+ \let \select@group \@gobblethree \frozen@everymath {}$\phantom{#5}$}\macc@tmp
+ \ifnum \macc@depth =\@ne
+ \global \let \macc@nucleus \@empty
+ \mathaccent "\accentclass@
+ \else \@xp \macc@nested
+ \fi #2#3#4{#5}\macc@nucleus
+ \else
+ \@xp \nonmatherr@ \csname #1\endcsname
+ \fi
+}
+
+
+%% code supplied by Yuwsuke Kieda, 7 May 2019 :
+%% https://gist.github.com/yuw/a31936370647d0044eeb4e47f3ae913f
+%%
+\@ifpackageloaded{amsmath}{%
+ \def\pdfx@macc@a #1#2{%
+ \begingroup
+ \let\macc@style#1\relax
+ \def\macc@palette ##1{##1\macc@style}%
+ \advance\macc@depth\m@ne
+ \ifnum\macc@depth=\z@
+ \gdef\macc@nucleus{\phantom{#2}}%% <<< here
+ \setbox\z@\hbox{$#1#2\@empty{}\macc@skewchar$}%
+ \setbox\tw@\hbox{$#1#2\@empty\macc@skewchar$}%
+ \dimen@\tw@\wd\tw@ \advance\dimen@-\tw@\wd\z@
+ \xdef\macc@kerna{\the\dimen@\relax}%
+ \setbox4\hbox{$#1#2\acc@check\@empty$}%
+ \global\setbox\@ne\hbox to\wd4{}%
+ \ht\@ne\ht4 \dp\@ne\dp4
+ \xdef\macc@kernb{\the\wd4\relax}%
+ \mathaccent\macc@code{\box\@ne\kern\macc@kerna}%
+ \else
+ \mathaccent\macc@code{\let\macc@adjust\@empty #1#2\@empty}%
+ \macc@adjust
+ \fi
+ \endgroup
+ }}\relax
+%
\AtBeginDocument{%
\@ifpackageloaded{amsmath}{%
\let\AMS@mathaccentV\mathaccentV
- \let\mathaccentV\pdfx@mathaccentV}%
+% \let\mathaccentV\pdfx@mathaccentV
+% \let\macc@a\pdfx@macc@a
+ }%
}%
%% How to support XeTeX here ?
@@ -5284,10 +5578,25 @@
%% it should be loaded outside the grouping, else biblatex may barf
%%
\RequirePackage{ifthen}
-\begingroup
+
+%% 2024-04-05: from July 2024 LaTeX will not allow packages to load
+%% within a grouping, so reorganise a bit.
+%%
%% override the \ifpdf check of xmpincl package, inside the grouping
- \pdftrue
- \RequirePackage{xmpincl}
+%% after saving its current value:
+\let\pdfx@ifpdf\ifpdf
+\pdftrue
+%% now load the packages, then enter the grouping:
+\RequirePackage{xmpincl}
+%%
+\begingroup
+%%% 20240405 revert the value of \ifpdf ...
+\pdfx@ifpdf
+\else
+ %% 20240624 ... outside the grouping
+ \aftergroup\pdffalse
+\fi
+
%% combine coding from xmpincl and hyperxml to support XeTeX
\def\pdfx@xmpincl@xetex#1{%
\IfFileExists{#1.xmp}{%
@@ -5343,6 +5652,13 @@
%%----------------------------------------------------------------------
\begingroup
+%% 20210706 we need a pointer to unexpandable \par
+ \expandafter\ifx\csname tex_par:D\endcsname \relax
+ \let\pdfx@par\par
+ \else
+%% using LaTeX 2021-06 or later
+ \expandafter\let\expandafter\pdfx@par\csname tex_par:D\endcsname
+ \fi
\ifpdfx@x
\ifpdfx@vt
\def\xmp@template{pdfvt}%
@@ -5396,9 +5712,11 @@
%% beware 128 space characters -- for padding end of XMP packet
\gdef\paddingline{ }%
\typeout{Using XMP template file: \xmp@template.xmp}%
+ %% 20210706 ensure \par is unexpandable
+ \let\par\pdfx@par
\includexmp{\xmp@template}%
\endgroup
-
+%%%
%%
%% revert active characters to previous encoding
%%
@@ -5462,13 +5780,27 @@
%%
%% controls the color model and conversions with xcolor package
%%
+\def\pdfx@selectcolormodel@doing #1{%% Warning
+ \PackageWarning{pdfx}{Setting all color commands to #1,^^J%
+ consistent with the Color Model for PDF/%
+ \ifpdfx@x X \else \ifpdfx@e E \else A \fi\fi}%
+ }%% 20240528 inhibit any changes
+\def\pdfx@selectcolormodel@done #1{%% Warning
+ \PackageWarning{pdfx}{Color Model already set for PDF/%
+ \ifpdfx@x X\else \ifpdfx@e E\else A\fi\fi,^^Jcannot change to #1 }%
+ }%% 20240528 inhibit any changes
+%%
\ifpdfx@cmyk
%
% this will have been done already for PDF/X
%
\PassOptionsToPackage{cmyk,hyperref}{xcolor}
- \def\pdfx@handlexcolor{\def\@@mod{cmyk}\selectcolormodel{cmyk}%
- \convertcolorsUtrue\convertcolorsDtrue}
+ \def\pdfx@handlexcolor{\def\@@mod{cmyk}%
+ \pdfx@selectcolormodel@doing{cmyk}%
+ \selectcolormodel{cmyk}%
+ \convertcolorsUtrue\convertcolorsDtrue
+ \let\selectcolormodel\pdfx@selectcolormodel@done
+ }
\ifpdfx@x
\else
%% \AtBeginDocument{%
@@ -5491,8 +5823,12 @@
\fi
\else
\PassOptionsToPackage{rgb,hyperref}{xcolor}
- \def\pdfx@handlexcolor{\def\@@mod{rgb}\selectcolormodel{rgb}%
- \convertcolorsUtrue\convertcolorsDtrue}
+ \def\pdfx@handlexcolor{\def\@@mod{rgb}%
+ \pdfx@selectcolormodel@doing{rgb}%
+ \selectcolormodel{rgb}%
+ \convertcolorsUtrue\convertcolorsDtrue
+ \let\selectcolormodel\pdfx@selectcolormodel@done
+ }
\fi
\@ifpackageloaded{xcolor}{\pdfx@handlexcolor
\ifpdfx@cmyk\else\color{black}\fi}{%
@@ -5628,7 +5964,9 @@
%</package>
% \fi
% \Finale
-% \let\newpage\relax
% \PrintIndex
+% \let\realGlossaryParms\GlossaryParms \let\realsubitem\subitem
+% \long\def\GlossaryParms{\realGlossaryParms \def\hdpindex ##1##2{}%
+% \long\def\subitem ##1:\ ##2\pfill{\par\hangindent 30pt\hspace*{15pt}##2\hfil}}%
% \PrintChanges
% \endinput
diff --git a/Master/texmf-dist/source/latex/pdfx/pdfx.ins b/Master/texmf-dist/source/latex/pdfx/pdfx.ins
index afd943fbb59..88defbfee80 100644
--- a/Master/texmf-dist/source/latex/pdfx/pdfx.ins
+++ b/Master/texmf-dist/source/latex/pdfx/pdfx.ins
@@ -4,9 +4,9 @@
\preamble
- Copyright (c) 2019, CV Radhakrishnan <cvr@river-valley.org>,
+ Copyright (c) 2019-2024, CV Radhakrishnan <cvr@river-valley.org>,
Han The Thanh <thanh@river-valley.org>,
- Ross Moore <ross.moore@mq.edu.au>,
+ Ross Moore <ozross@icloud.com> - primary contact,
Peter Selinger <selinger@mathstat.dal.ca>
This file may be distributed and/or modified under the conditions
diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
index 09cac66703d..9e018afc668 100644
--- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
@@ -8,7 +8,7 @@
\iffalse
%</internal>
%<*README>
-# THE POLYGLOSSIA PACKAGE v2.1
+# THE POLYGLOSSIA PACKAGE v2.2
## Multilingual typesetting with XeLaTeX and LuaLaTeX
This package provides an alternative to Babel for users of XeLaTeX and LuaLaTeX.
@@ -65,7 +65,8 @@ to track the issues and follow progress.
____________________________
The polyglossia package
- (C) 2008–2010 François Charette
+ (C) 2008–2010 François Charette
+ (C) 2023-2024 Udi Fogiel
(C) 2011–2024 Arthur Reutenauer
(C) 2013 Elie Roux
(C) 2019 Bastien Roucariès
@@ -76,19 +77,29 @@ to track the issues and follow progress.
\endpreamble
\postamble
- Copyright (C) 2024 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org>
+ Copyright (C) 2024 by The Polyglossia Team http://github.com/reutenauer/polyglossia/
- This work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
- The latest version of this license is in
- http://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of LaTeX
- version 2005/12/01 or later.
-
- This work has the LPPL maintenance status `maintained'.
+ Except where otherwise noted, Polyglossia is placed under the terms of the
+ MIT licence (https://opensource.org/licenses/MIT).
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the Software
+ is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR
+ A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- The Current Maintainer of this work is Arthur Reutenauer.
+ Please report issues to http://github.com/reutenauer/polyglossia/issues
\endpostamble
@@ -98,8 +109,8 @@ to track the issues and follow progress.
\generate{\file{farsical.sty}{\from{polyglossia.dtx}{farsical.sty}}}
\generate{\file{hebrewcal.sty}{\from{polyglossia.dtx}{hebrewcal.sty}}}
\generate{\file{hijrical.sty}{\from{polyglossia.dtx}{hijrical.sty}}}
+\generate{\file{polyglossia-cjk-spacing.lua}{\from{polyglossia.dtx}{polyglossia-cjk-spacing.lua}}}
\generate{\file{polyglossia-french.lua}{\from{polyglossia.dtx}{polyglossia-french.lua}}}
-\generate{\file{polyglossia-korean.lua}{\from{polyglossia.dtx}{polyglossia-korean.lua}}}
\generate{\file{polyglossia-latin.lua}{\from{polyglossia.dtx}{polyglossia-latin.lua}}}
\generate{\file{polyglossia-punct.lua}{\from{polyglossia.dtx}{polyglossia-punct.lua}}}
\generate{\file{polyglossia-sanskrit.lua}{\from{polyglossia.dtx}{polyglossia-sanskrit.lua}}}
@@ -109,7 +120,7 @@ to track the issues and follow progress.
\generate{\file{babelsh.def}{\from{polyglossia.dtx}{babelsh.def}}}
\generate{\file{cal-util.def}{\from{polyglossia.dtx}{cal-util.def}}}
\generate{\file{xgreek-fixes.def}{\from{polyglossia.dtx}{xgreek-fixes.def}}}
-\generate{\file{gloss-acadien.ldf}{\from{polyglossia.dtx}{gloss-acadien.ldf}}}
+\generate{\file{gloss-acadian.ldf}{\from{polyglossia.dtx}{gloss-acadian.ldf}}}
\generate{\file{gloss-aeb.ldf}{\from{polyglossia.dtx}{gloss-aeb.ldf}}}
\generate{\file{gloss-af.ldf}{\from{polyglossia.dtx}{gloss-af.ldf}}}
\generate{\file{gloss-afb.ldf}{\from{polyglossia.dtx}{gloss-afb.ldf}}}
@@ -163,6 +174,7 @@ to track the issues and follow progress.
\generate{\file{gloss-ckb-Arab.ldf}{\from{polyglossia.dtx}{gloss-ckb-Arab.ldf}}}
\generate{\file{gloss-ckb-Latn.ldf}{\from{polyglossia.dtx}{gloss-ckb-Latn.ldf}}}
\generate{\file{gloss-ckb.ldf}{\from{polyglossia.dtx}{gloss-ckb.ldf}}}
+\generate{\file{gloss-classiclatin.ldf}{\from{polyglossia.dtx}{gloss-classiclatin.ldf}}}
\generate{\file{gloss-cop.ldf}{\from{polyglossia.dtx}{gloss-cop.ldf}}}
\generate{\file{gloss-coptic.ldf}{\from{polyglossia.dtx}{gloss-coptic.ldf}}}
\generate{\file{gloss-croatian.ldf}{\from{polyglossia.dtx}{gloss-croatian.ldf}}}
@@ -195,6 +207,7 @@ to track the issues and follow progress.
\generate{\file{gloss-dsb.ldf}{\from{polyglossia.dtx}{gloss-dsb.ldf}}}
\generate{\file{gloss-dutch.ldf}{\from{polyglossia.dtx}{gloss-dutch.ldf}}}
\generate{\file{gloss-dv.ldf}{\from{polyglossia.dtx}{gloss-dv.ldf}}}
+\generate{\file{gloss-ecclesiasticlatin.ldf}{\from{polyglossia.dtx}{gloss-ecclesiasticlatin.ldf}}}
\generate{\file{gloss-el-monoton.ldf}{\from{polyglossia.dtx}{gloss-el-monoton.ldf}}}
\generate{\file{gloss-el-polyton.ldf}{\from{polyglossia.dtx}{gloss-el-polyton.ldf}}}
\generate{\file{gloss-el.ldf}{\from{polyglossia.dtx}{gloss-el.ldf}}}
@@ -277,9 +290,6 @@ to track the issues and follow progress.
\generate{\file{gloss-lao.ldf}{\from{polyglossia.dtx}{gloss-lao.ldf}}}
\generate{\file{gloss-latex.ldf}{\from{polyglossia.dtx}{gloss-latex.ldf}}}
\generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}}
-\generate{\file{gloss-latinclassic.ldf}{\from{polyglossia.dtx}{gloss-latinclassic.ldf}}}
-\generate{\file{gloss-latinecclesiastic.ldf}{\from{polyglossia.dtx}{gloss-latinecclesiastic.ldf}}}
-\generate{\file{gloss-latinmedieval.ldf}{\from{polyglossia.dtx}{gloss-latinmedieval.ldf}}}
\generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}}
\generate{\file{gloss-lithuanian.ldf}{\from{polyglossia.dtx}{gloss-lithuanian.ldf}}}
\generate{\file{gloss-lo.ldf}{\from{polyglossia.dtx}{gloss-lo.ldf}}}
@@ -292,6 +302,7 @@ to track the issues and follow progress.
\generate{\file{gloss-malay.ldf}{\from{polyglossia.dtx}{gloss-malay.ldf}}}
\generate{\file{gloss-malayalam.ldf}{\from{polyglossia.dtx}{gloss-malayalam.ldf}}}
\generate{\file{gloss-marathi.ldf}{\from{polyglossia.dtx}{gloss-marathi.ldf}}}
+\generate{\file{gloss-medievallatin.ldf}{\from{polyglossia.dtx}{gloss-medievallatin.ldf}}}
\generate{\file{gloss-mk.ldf}{\from{polyglossia.dtx}{gloss-mk.ldf}}}
\generate{\file{gloss-ml.ldf}{\from{polyglossia.dtx}{gloss-ml.ldf}}}
\generate{\file{gloss-mn.ldf}{\from{polyglossia.dtx}{gloss-mn.ldf}}}
@@ -351,16 +362,9 @@ to track the issues and follow progress.
\generate{\file{gloss-welsh.ldf}{\from{polyglossia.dtx}{gloss-welsh.ldf}}}
\generate{\file{gloss-zh-CN.ldf}{\from{polyglossia.dtx}{gloss-zh-CN.ldf}}}
\generate{\file{gloss-zh-TW.ldf}{\from{polyglossia.dtx}{gloss-zh-TW.ldf}}}
-\generate{\file{arabicdigits.map}{\from{polyglossia.dtx}{arabicdigits.map}}}
-\generate{\file{bengalidigits.map}{\from{polyglossia.dtx}{bengalidigits.map}}}
-\generate{\file{devanagaridigits.map}{\from{polyglossia.dtx}{devanagaridigits.map}}}
-\generate{\file{farsidigits.map}{\from{polyglossia.dtx}{farsidigits.map}}}
-\generate{\file{gurmukhidigits.map}{\from{polyglossia.dtx}{gurmukhidigits.map}}}
-\generate{\file{odiadigits.map}{\from{polyglossia.dtx}{odiadigits.map}}}
-\generate{\file{thaidigits.map}{\from{polyglossia.dtx}{thaidigits.map}}}
\def\MetaPrefix{-- }
+\generate{\file{polyglossia-cjk-spacing.lua}{\from{polyglossia.dtx}{polyglossia-cjk-spacing.lua}}}
\generate{\file{polyglossia-french.lua}{\from{polyglossia.dtx}{polyglossia-french.lua}}}
-\generate{\file{polyglossia-korean.lua}{\from{polyglossia.dtx}{polyglossia-korean.lua}}}
\generate{\file{polyglossia-latin.lua}{\from{polyglossia.dtx}{polyglossia-latin.lua}}}
\generate{\file{polyglossia-punct.lua}{\from{polyglossia.dtx}{polyglossia-punct.lua}}}
\generate{\file{polyglossia-sanskrit.lua}{\from{polyglossia.dtx}{polyglossia-sanskrit.lua}}}
@@ -405,8 +409,10 @@ to track the issues and follow progress.
]{hyperref}
\usepackage{array}
\usepackage{metalogo}
-\let\XeTeX\undefined
-\let\XeLaTeX\undefined
+\ifxetex
+ \let\XeTeX\undefined
+ \let\XeLaTeX\undefined
+\fi
\usepackage[babelshorthands]{polyglossia}
\usepackage{farsical}
%
@@ -506,15 +512,23 @@ to track the issues and follow progress.
\usepackage[osf]{libertine}
% Monospace: Package dejavu-otf
\setmonofont[Scale=MatchLowercase]{DejaVuSansMono}
-% Libertine includes Hebrew, but we load it separately since
-% osf is not supported with this script and we want to avoid the
-% respective warnings
-\newfontfamily\hebrewfont[Script=Hebrew]{Linux Libertine O}
+% Package culmus
+\newfontfamily\hebrewfont[Script=Hebrew]{DavidCLM}[
+ UprightFont = *-Medium,
+ BoldFont = *-Bold,
+ Extension = .otf,
+ ItalicFont = *-MediumItalic,
+ BoldItalicFont = *-BoldItalic]
% Package dejavu-otf
\newfontfamily\armenianfont[Script=Armenian,Scale=MatchLowercase]{DejaVuSans}
\newfontfamily\georgianfont[Scale=MatchLowercase]{DejaVuSerif}
% Package amiri
-\newfontfamily\arabicfont[Script=Arabic]{Amiri-Regular}
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}[%
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ Extension = .ttf,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic]
% No Syriac otf/ttf font seems available on CTAN
% This one, from the Syriac Institute, is included on Linux
% in the x11-fonts set and can be downloaded from
@@ -850,7 +864,7 @@ to track the issues and follow progress.
% dv & divehi & \tabularnewline
% el & greek & \tabularnewline
% el-monoton & greek & variant=monotonic [\emph{default}] \tabularnewline
-% el-polyton & greek & varant=polytonic \tabularnewline
+% el-polyton & greek & variant=polytonic \tabularnewline
% en & english & \tabularnewline
% en-AU & english & variant=australian \tabularnewline
% en-CA & english & variant=canadian \tabularnewline
@@ -1164,13 +1178,25 @@ to track the issues and follow progress.
%
% \section{Font setup}
%
-% With polyglossia it is possible to associate a specific font with any script or language
+% With \pkg{polyglossia} it is possible to associate a specific font with any script or language
% that occurs in the document. That font should always be defined as
-% \cmd{\⟨script⟩font}\ or \cmd{\⟨language⟩font}.
+% \cmd{\⟨script⟩font}\ or \cmd{\⟨language⟩font}. Note that ¦⟨language⟩¦ points to the \pkg{polyglossia}
+% language name, ¦⟨script⟩¦ might point either to an OpenType script name as defined by \pkg{fontspec}
+% (\eg ¦Latin¦) \new{2.2}or a BCP-47 script tag (\eg ¦Latn¦), though the script is fully lower-cased
+% in the \cmd{\⟨script⟩font}\ command.
+%
% For instance, if the default font defined by \cmd\setmainfont\
% does not support Greek, then one can define the font used to display Greek with:\\
-% \centerline{ \cmd\newfontfamily\cmd{\greekfont[Script=Greek,\meta{…}]\marg{font}}. }
-% Note that polyglossia will use the font defined as is, so assure to do all necessary settings
+% \centerline{\cmd\newfontfamily\cmd{\greekfont[Script=Greek,\meta{…}]\marg{font}}}
+% ^^A
+% If you want to setup a blackletter font specifically for the German blackletter script variant,
+% you might do so by:\\
+% \centerline{\cmd\newfontfamily\cmd{\latffont[\meta{…}]\marg{font}}}
+% ^^A
+% Setting up a font specifically for traditional Chinese is possible via:\\
+% \centerline{\cmd\newfontfamily\cmd{\hantfont[Script=CJK,\meta{…}]\marg{font}}}
+% ^^A
+% Note that \pkg{polyglossia} will use the font defined as is, so assure to do all necessary settings
% (please refer to the \pkg{fontspec} documentation for details).
% For instance, if \cmd\arabicfont\ is explicitly defined, then the option ¦Script=Arabic¦ should
% be included in that definition.
@@ -1180,10 +1206,12 @@ to track the issues and follow progress.
% \cmd{\⟨script⟩fontsf} or \cmd{\⟨language⟩fontsf} and \cmd{\⟨script⟩fonttt} or \cmd{\⟨language⟩fonttt}, respectively.
%
% Whenever a new language is activated, \pkg{polyglossia} will first check whether
-% a font has been defined for that language or – for languages in non-Latin scripts –
-% for the script it uses. If it is not defined, it will use the currently active font
-% and – in the case of OpenType fonts – will attempt to turn on the appropriate
-% OpenType tags for the script and language used, in case these are available in
+% a font has been defined for that language. If this is not the case, it will check whether a font associated
+% with the BCP-47 script tag of the current language is defined. If this also isn't the case, \pkg{polyglossia}
+% will finally check (but this only for languages in non-Latin scripts) whether there is a font associated
+% with the OpenType script tag. If none of these fonts is defined, \pkg{polyglossia} will use the currently
+% active font as defined by ¦\setmainfont¦, ¦\setsansfont¦ or ¦\setmonofont¦ and – in the case of OpenType fonts –
+% will attempt to turn on the appropriate OpenType tags for the script and language used, in case these are available in
% the font, by means of \pkg{fontspec}’s \cmd\addfontfeature. If the current font
% does not appear to support the script of that language, an error message is
% displayed.
@@ -1978,7 +2006,7 @@ to track the issues and follow progress.
% \end{table}
% \item \xpgchoicekey[1.46]{hyphenation}{\xpgvalue{classic}, \xpgvalue{modern}, or \xpgvalue{liturgical}}
% There are three different sets of hyphenation patterns for Latin. Separate
-% documention for them is available on the
+% documentation for them is available on the
% Internet.\footnote{Refer to \url{https://github.com/gregorio-project/hyphen-la/blob/master/doc/README.md\#hyphenation-styles}}
% Each of the four variants mentioned above has its default set of hyphenation
% patterns as indicated by table \ref{tab:latin-hyphenation}. Use the
@@ -2050,7 +2078,7 @@ to track the issues and follow progress.
% \item[¦'AE¦] for Ǽ (AE ligature with acute), also available for \'Œ
% \end{shorthands}
% \item \xpgboolkeyfalse[1.46]{prosodicshorthands}
-% Enable shorthands for prosodic marks (macrons and breves) very similiar to
+% Enable shorthands for prosodic marks (macrons and breves) very similar to
% those provided by \pkg{babel-latin} using the ¦withprosodicmarks¦
% modifier.
% Note that the active ¦=¦ character used for macrons will cause problems with
@@ -2956,7 +2984,7 @@ to track the issues and follow progress.
% \subsection{Islamic calendar (hijrical.sty)}\label{sec:hijrical}
% This package computes dates in the lunar Islamic (Hijra) calendar.\footnote{ %
% It makes use of the arithmetical algorithm in chapter 6 of
-% Reingold \& Gershowitz, \textit{Calendrical calculation: the Millenium edition}
+% Reingold \& Gershowitz, \textit{Calendrical calculation: the Millennium edition}
% (Cambridge University Press, 2001).\label{reingold}}
% It provides two macros for the end-user.
% The command
@@ -3091,6 +3119,31 @@ to track the issues and follow progress.
%
% \bgroup\footnotesize
%
+% \subsection*{2.2 (2024/07/15)}
+%
+% \subsubsection*{Bug fixes}
+% \begin{itemize}
+% \item Fix \texttt{lang} environment (\TXI{633}).
+% \item Fix first number of Maghrib abjad numbering for Algeria, Morocco and
+% Tunisia (\TXI{640}).
+% \item Fix some captions strings in Bulgarian, Chinese, Esperanto, Estonian, Hindi,
+% Latvian, and Slovak (\TXP{651})
+% \item Improve performance with multilingual documents that have a TOC (\TXI{641}).
+% \end{itemize}
+%
+% \subsubsection*{New Features}
+% \begin{itemize}
+% \item Add possibility to associate a font to a language/variant with reference to
+% a BCP-47 script tag (\TXI{636}).
+% \end{itemize}
+%
+% \subsubsection*{Internal work}
+% \begin{itemize}
+% \item The major rewrite of the package code has been finished. More code has been cleaned up,
+% and \pkg{polyglossia} employs modern concepts (\pkg{latex3} and modern \LaTeXe).
+% All key-val handling uses \pkg{l3keys} now rather than \pkg{xkeyval}.
+% \end{itemize}
+%
% \subsection*{2.1 (2024/03/07)}
%
% \subsubsection*{Bug fixes}
@@ -4149,7 +4202,7 @@ to track the issues and follow progress.
% \section{Acknowledgements (by François Charette)}
% \pkg{Polyglossia} is notable for being a recycle box of previous contributions
% by other people. I take this opportunity to thank the following individuals,
-% whose splendid work has made my task almost trivial in comparision: \TA{Johannes
+% whose splendid work has made my task almost trivial in comparison: \TA{Johannes
% Braams} and the numerous contributors to the \pkg{babel} package (in particular
% \TA{Boris Lavva} and others for its Hebrew support), \TA{Alexej Kryukov} (\pkg{antomega}),
% \TA{Will Robertson} (\pkg{fontspec}), \TA{Apostolos Syropoulos} (\pkg{xgreek}), \TA{Youssef Jabri}
@@ -4176,7 +4229,7 @@ to track the issues and follow progress.
% since we took over.
% In alphabetical order: \TA{Ignas Anikevicius}, \TA{Sina Ahmadi}, \TA{Matthew Bertucci}, \TA{Wouter Bolsterlee}, \TA{Christian Buhtz},
% \TA{Ashok Das}, \TA{Oleg Domanov}, user \TA{fakhriaunur}, \TA{Philipp Gesang}, \TA{Kevin Godby},
-% \TA{Enrico Gregorio}, \TA{Khaled Hosny}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime},
+% \TA{Enrico Gregorio}, \TA{Khaled Hosny}, \TA{Stephen Huan}, \TA{Najib Idrissi}, user \TA{julroy67}, \TA{Dohyun Kim}, \TA{Phil Kime},
% \TA{Mike Kroutikov}, \TA{Ivan Kokan}, \TA{Caleb Maclennan}, \TA{Gyula Magyarkuti}, \TA{José Mancera}, \TA{Miquel Ortega},
% \TA{Yevgen Pogribnyi}, \TA{Will Robertson}, \TA{Maïeul Rouquette}, \TA{Elie Roux}, \TA{Hugo Roy}, \TA{Guy Rutenberg},
% \TA{Marcin Serwin}, \TA{Arvinder Singh}, \TA{Avisek Jena}, \TA{Philipp Stephani}, \TA{Niranjan Tambe}, \TA{Takuji Tanaka},
@@ -4208,33 +4261,28 @@ to track the issues and follow progress.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage
- {polyglossia} {2024/03/07} {v2.1}
+ {polyglossia} {2024/07/15} {v2.2}
{Modern multilingual typesetting with XeLaTeX and LuaLaTeX}
+% TODO Handle remaining uses in the gloss files (\patchcmd)
+% and remove package call afterwards
\RequirePackage{etoolbox}
-\RequirePackage{xkeyval}[2008/08/13]
% Will raise error if used with anything else than XeTeX or LuaTeX
\RequirePackage{fontspec}[2010/06/08]% v2.0
\RequirePackage{iftex}
\prg_generate_conditional_variant:Nnn \clist_if_in:Nn {Ne} {TF, T, F} % check if needed
-% correct a bug in tracklang
-\AddToHook{package/tracklang/after}{%
- \IfPackageAtLeastTF{tracklang}{2019/08/30}
- {}
- {\cs_gset_eq:NN \AddTrackedLangage \AddTrackedLanguage}
-}
-
%% The following is for compatibility with Babel-aware package:
% \languageshorthands is provided by babelsh.def, which is
% only loaded by some glosses, but some classes presuppose
% it is there generally. So let's provide a stub:
\ProvideDocumentCommand \languageshorthands { m } {}
% These have to be provided at the end of the preamble
-\AddToHook{begindocument/before}{
- \cs_gset_eq:NN \bbl@set@language \xpg@set@language@aux % for biblatex
- \cs_gset_eq:NN \bbl@main@language \xpg@main@language % for biblatex
+\hook_gput_code:nnn {begindocument/before} {.}
+{
+ \cs_gset_eq:NN \bbl@set@language \xpg_set_language_aux:nn % for biblatex
+ \cs_gset_eq:NN \bbl@main@language \xpg_main_language_tl % for biblatex
\ProvideDocumentCommand \texorpdfstring { m m } { #1 } % dummy command if hyperref is not loaded
}
@@ -4243,16 +4291,15 @@ to track the issues and follow progress.
%% \l@nohyphenation is defined in polyglossia.lua
\sys_if_engine_luatex:TF
{
- \RequirePackage{luatexbase} % already included by fontspec, but needed here
- \RequireLuaModule{polyglossia}
+ \lua_load_module:n{polyglossia}
}{
\cs_if_free:cT { l@nohyphenation }
{ \chardef\l@nohyphenation=255 }
}
-% Which version of XeTeX do we use? What is the boudary class? 4095 or 255
+% Which version of XeTeX do we use? What is the boundary class? 4095 or 255
\cs_if_exist:cTF { e@alloc@intercharclass@top }
- { \let\xpg@boundaryclass=\e@alloc@intercharclass@top }
+ { \cs_gset_eq:NN \xpg@boundaryclass \e@alloc@intercharclass@top }
{ \chardef\xpg@boundaryclass=\@cclv }
% Useful for getting list of loaded languages and variants. Like babel's bbl@loaded
@@ -4288,18 +4335,18 @@ to track the issues and follow progress.
\cs_new_nopar:Nn \__xpg_at_begin_document:
{
% save various command
- \let\latin@alph\@alph % TODO rename when we have the C locale
- \let\latin@Alph\@Alph % TODO rename when we have the C locale
+ \cs_gset_eq:cc{latin@alph}{@alph}% TODO rename when we have the C locale
+ \cs_gset_eq:cc{latin@Alph}{@Alph}% TODO rename when we have the C locale
% push to C language gloss
- \let\polyglossia@Clang@@arabic\@arabic
- \let\polyglossia@Clang@arabic\arabic
+ \cs_gset_eq:cc{xpg_Clang_arabic}{@arabic}
\xpg_initial_setup:
% apply \familydefault changes
- \xpg@set@familydefault
+ \xpg_set_familydefault:
}
-\AddToHook{begindocument}{
+\hook_gput_code:nnn {begindocument} {.}
+{
\__xpg_at_begin_document:
}
@@ -4307,7 +4354,8 @@ to track the issues and follow progress.
% loaded after \set[main|other]language
% Track whether the main language has been set
\bool_new:N \g_xpg_main_lang_set_bool
-\AddToHook{begindocument/end}{
+\hook_gput_code:nnn {begindocument/end} {.}
+{
% now we have the C locale definition: select the language
\__xpg_at_begin_document_selectlanguage:
\bool_gset_true:N \g_xpg_main_lang_set_bool
@@ -4315,99 +4363,177 @@ to track the issues and follow progress.
\__xpg_at_begin_document_hyphenation:
}
-%% custom message macros
-\providecommand*{\xpg@error}[1]{
- \PackageError{polyglossia}{#1}{}
+%
+% MESSAGES
+%
+
+% message templates
+\msg_new:nnn { polyglossia } { general } { #1 }
+
+\msg_new:nnn { polyglossia } { languagenotloaded }
+{
+ The~ language~ #1~ is~ not~ loaded.~ You~ must~ load~ it~ in~ order~ to~ use~ it.
}
+\msg_redirect_name:nnn { polyglossia } { languagenotloaded } { critical }
-\providecommand*{\xpg@warning}[1]{
- \PackageWarning{polyglossia}{#1}
+\msg_new:nnn { polyglossia } { languagenolongerloaded }
+{
+ The~ language~ #1~ is~ no~ longer~ loaded.~ Please~ rerun~ LaTeX.
}
+\msg_redirect_name:nnn { polyglossia } { languagenolongerloaded } { warning }
-\providecommand*{\xpg@info}[1]{
- \PackageInfo{polyglossia}
- {#1\@gobble}
-} %% the \@gobble is to prevent displaying the line nr
+\msg_new:nnn { polyglossia } { unknownlocalnumeral }
+{
+ Unknown~ key~ "#1"~ in~ \string\localnumeral.
+}
-%TODO change all instances of \xpg@nopatterns in gloss-*.ldf files
-\providecommand*{\xpg@nopatterns@fallback}[2][nohyphenation]{
- \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#2'\MessageBreak
- I~ will~ use~ \string\language=\string\l@ #1\space instead}
- \expandafter\adddialect\csname l@#2\expandafter\endcsname\csname l@#1\endcsname\relax}
+\msg_new:nnn { polyglossia } { localnumeralemptyvalue }
+{
+ Keys~ of~ \string\localnumeral~ must~ have~ a~ value.
+}
-\providecommand*{\xpg@nopatterns}[1]{
- \xpg@warning{No~ hyphenation~ patterns~ were~ loaded~ for~ `#1'\MessageBreak
- I~ will~ use~ \string\language=\string\l@nohyphenation\space instead}
- %%TODO? \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
- }
+\msg_new:nnn { polyglossia } { illvalue }
+{
+ Illegal~ value~ (#1)~ for~ #2!
+}
-\def\xpg@ill@value#1#2{
- \xpg@warning{Illegal~ value~ (#1)~ for~ #2}}
+\msg_new:nnn { polyglossia } { illarg }
+{
+ Invalid~ argument~ (#1)~ for~ #2!
+}
-% error out if lang is not loaded
-\cs_new_nopar:Nn \xpg_error_if_lang_not_loaded:n
+\msg_new:nnn { polyglossia } { nopatterns }
{
- \seq_if_in:NeF \__xpg_langs_loaded {#1}
- {
- \xpg@error{language~ #1~ is~ not~ loaded.~ Please~ load~ it~ before~ using~ it.}
- }
+ No~ hyphenation~ patterns~ were~ loaded~ for~ `#2' \iow_newline:
+ I~ will~ use~ \string\language=\string\l@ #1\space instead.
}
-\msg_new:nnn { polyglossia } { languagenotloaded }
+\msg_new:nnn { polyglossia } { undefcmd }
{
- The~ language~ #1~ is~ not~ loaded.~ You~ should~ load~ it.
+ \tl_to_str:N {#1} ~ is~ not~ defined!
}
-\msg_redirect_name:nnn { polyglossia } { languagenotloaded } { critical }
-\msg_new:nnn { polyglossia } { languagenolongerloaded }
+%% custom message macros
+\cs_new_nopar:Nn \xpg_error_msg:n
{
- The~ language~ #1~ is~ no~ longer~ loaded.~ Please~ rerun~ LaTeX.
+ \exp_args:Nnne \msg_error:nnn { polyglossia } { general } { #1 }
}
-\msg_redirect_name:nnn { polyglossia } { languagenolongerloaded } { warning }
-\msg_new:nnn { polyglossia } { unknownlocalnumeral }
+\cs_new_nopar:Nn \xpg_warning_msg:n
{
- Unknown~ key~ "#1"~ in~ \string\localnumeral.
+ \exp_args:Nnne \msg_warning:nnn { polyglossia } { general } { #1 }
}
-\msg_new:nnn { polyglossia } { localnumeralemptyvalue }
+\cs_new_nopar:Nn \xpg_info_msg:n
+{
+ \exp_args:Nnne \msg_info:nnn { polyglossia } { general } { #1 }
+}
+
+\cs_new_nopar:Nn \xpg_no_patterns_msg:n
{
- Keys~ of~ \string\localnumeral~ must~ have~ value.
+ \msg_warning:nnnn { polyglossia } { nopatterns } { nohyphenation } { #1 }
}
+\cs_new_nopar:Nn \xpg_ill_value_msg:nn
+{
+ \msg_warning:nnnn { polyglossia } { illvalue } { #1 } { #2 }
+}
+
+\cs_new_nopar:Nn \xpg_ill_arg_msg:nn
+{
+ \msg_error:nnnn { polyglossia } { illarg } { #1 } { #2 }
+}
+
+% error out if lang is not loaded
+\cs_new_nopar:Nn \xpg_error_if_lang_not_loaded:n
+{
+ \seq_if_in:NeF \__xpg_langs_loaded {#1}
+ {
+ \msg_error:nnn { polyglossia } { languagenotloaded } { #1 }
+ }
+}
%% use macro if defined, else warn that it is not
\cs_new_nopar:Nn \__xpg_use_or_warn:N
{
\cs_if_exist_use:NF {#1}
{
- \xpg@warning { \tl_to_str:N {#1} ~ is~ not~ defined }
+ \msg_error:nnn { polyglossia } { undefcmd } { #1 }
}
}
\cs_generate_variant:Nn \__xpg_use_or_warn:N {c}
+% gloss message interface
+\cs_set_eq:cc { xpg@error } { xpg_error_msg:n }
+\cs_set_eq:cc { xpg@warning } { xpg_warning_msg:n }
+\cs_set_eq:cc { xpg@info } { xpg_info_msg:n }
+\cs_set_eq:cc { xpg@ill@value } { xpg_ill_value_msg:nn }
+
+
+\NewDocumentCommand \XPGNoPatternsFallback { O{ nohyphenation } m }
+{
+ \msg_warning:nnnn { polyglossia } { nopatterns } { #1 } { #2 }
+ \exp_args:Ncc \adddialect {l@#2} {l@#1}
+}
+
+\NewDocumentCommand \CheckHyphenationPatterns { m }
+{
+ \xpg_if_language_defined:nF {#1}
+ {
+ \XPGNoPatternsFallback{#1}
+ }
+}
+
+%
+% END MESSAGES
+
%% ensure directionality if bidi is loaded, else ignore
-\def\@@ensure@dir#1{\ifcsundef{@ensure@dir}{#1}{\@ensure@dir{#1}}}
-\def\@@ensure@maindir#1{\ifcsundef{@ensure@maindir}{#1}{\@ensure@maindir{#1}}}
+%%% FIXME still used?
+\cs_new_nopar:Npn \@@ensure@dir #1
+{
+ \cs_if_exist_use:c{@ensure@dir}{#1}
+}
-%% Used by the language definitions files for right-to-left languages
-\NewDocumentCommand \RequireBidi {}
+\cs_new_nopar:Npn \@@ensure@maindir #1
{
- \sys_if_engine_luatex:TF
- {\ifx\@onlypreamble\@notprerr\else\RequirePackage{luabidi}\fi}
- {\ifx\@onlypreamble\@notprerr\else\RequirePackage{bidi}\fi}
+ \cs_if_exist_use:c{@ensure@maindir}{#1}
}
-% if #1 is LR run #2 else #3
+% if we are in the document preamble run T else F
+\prg_set_conditional:Nnn \xpg_if_in_preamble: {T, F, TF}
+{
+ \cs_if_eq:NNTF { \@onlypreamble } { \@notprerr }
+ {
+ \prg_return_false:
+ }
+ {
+ \prg_return_true:
+ }
+}
+
+%% Used by the language definitions files for right-to-left languages
+\DeclareDocumentCommand \RequireBidi {}
+ {
+ \xpg_if_in_preamble:T
+ {
+ \sys_if_engine_luatex:TF
+ { \RequirePackage{luabidi} }
+ { \RequirePackage{bidi} }
+ }
+ \DeclareDocumentCommand \RequireBidi {} {}
+ }
+
+% if #1 is LR run T else F
\prg_set_conditional:Nnn \__xpg_if_LR_str:n {p, T, F, TF}
{
- \str_case_e:nnF{#1}{
+ \str_case_e:nnF{#1}
+ {
{LR}{\prg_return_true:}
{RL}{\prg_return_false:}
}
{
- \xpg@error{Unknown~ direction~#1}
+ \xpg_error_msg:n {Unknown~ direction~#1}
\prg_return_false:
}
}
@@ -4420,17 +4546,18 @@ to track the issues and follow progress.
{
\__xpg_if_LR_str:nF {#1}
{
- \xpg@error{right-to-left,~ but~ (lua)bidi~ package~ was~ not~ loaded!}
+ \xpg_error_msg:n {right-to-left,~ but~ (lua)bidi~ package~ was~ not~ loaded!}
}
}
\cs_new_nopar:Nn \__xpg_set_text_direction:n
{
\__xpg_if_LR_str:nF {#1}
{
- \xpg@error{right-to-left,~ but~ (lua)bidi~ package~ was~ not~ loaded!}
+ \xpg_error_msg:n {right-to-left,~ but~ (lua)bidi~ package~ was~ not~ loaded!}
}
}
-\AddToHook{package/bidi/after}{
+\hook_gput_code:nnn {package/bidi/after} {.}
+{
\cs_gset_nopar:Nn \__xpg_set_par_direction:n
{
\__xpg_if_LR_str:nTF{#1}
@@ -4452,7 +4579,8 @@ to track the issues and follow progress.
}
}
}
-\AddToHook{package/luabidi/after}{
+\hook_gput_code:nnn {package/luabidi/after} {.}
+{
\cs_gset_nopar:Nn \__xpg_set_par_direction:n
{
\__xpg_if_LR_str:nTF{#1}
@@ -4481,13 +4609,21 @@ to track the issues and follow progress.
{ \cs_new_nopar:Nn \__xpg_setRTLmain: { \@RTLmaintrue\setnonlatin } }
%% compatibility with babel
-\let\addto\gappto % gappto is defined in etoolbox
+\cs_set:Npn \addto #1 #2
+{
+ \cs_if_exist:NF { #1 }
+ { \cs_new:Npn { #1 } {} }
+ \tl_gput_right:Nn { #1 } { #2 }
+}
-%% NEW EXPERIMENTAL SETUP INTERFACE FOR GLOSS FILES
+%% SETUP INTERFACE FOR GLOSS FILES
%% options currently available:
%% language : the name of the language (as understood by fontspec)
%% hyphennames : the different hyphenation patterns to try (comma separated list)
-%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback, with \xpg@nopatterns@fallback - i.e. with a warning: e.g. sanskrit for hindi, or catalan for asturian. – Also for languages with variants! (English and German, etc.)
+%%% TODO: if pattern is prefixed by !, then it should be loaded as a fallback,
+%%%% with \CheckHyphenationPatterns - i.e. with a warning: e.g. sanskrit for hindi,
+%%%% or catalan for asturian. – Also for languages with variants!
+%%%% (English and German, etc.)
%% script : the name of the script (as understood by fontspec) – default is Latin
%% scripttag : the OpenType tag for the script
%% langtag : the OpenType tag for the language
@@ -4495,19 +4631,20 @@ to track the issues and follow progress.
%% frenchspacing : boolean
%% indentfirst : boolean
%% fontsetup : boolean
-%% TODO: nouppercase : boolean (for scripts like Arabic, Devanagari, etc which have no concept of uppercase/lowercase)
+%% TODO: nouppercase : boolean (for scripts like Arabic, Devanagari, etc which have
+%% no concept of uppercase/lowercase)
%% TODO: localalph = {<alph_csname>,<Alph_csname>}
%% TODO: localnumeral = <csname>
%% or even better localdigits = {0123456789} for fully automatic setup
-\newcommand*\PolyglossiaSetup[2]{
+\NewDocumentCommand \PolyglossiaSetup { m m }
+{
\__xpg_keys_define_lang:n{#1}
\keys_set:nn { polyglossia / #1 } { #2 }
\__xpg_setup_hyphen:n {#1}
%define booleans etoolbox style and set defaults
%% TODO ? \providetoggle{#1@setup@done}%
- % we initialize these so that we can use \gappto below
- \csgdef{init@extras@#1}{}
- \csgdef{init@noextras@#1}{} % we don't use this yet: remove?
+ % we initialize this so that we can append below
+ \cs_gset:cpn {init@extras@#1} {}
% here we do the fontsetup:
\__xpg_auto_setupfont:n { #1 }
%% TODO? \toggletrue{#1@setup@done}
@@ -4526,35 +4663,41 @@ to track the issues and follow progress.
\clist_map_inline:nn { #1 } { \keys_set:nn { polyglossia / ##1 } { #2 } }
}
-
+\bool_new:N \l__xpg_have_hyphen_bool
% setup hyphennames from a str list of hyphen
\cs_new:Nn \__xpg_setup_hyphen:n
{
- \clist_set:Ne{\l_tmpa_clist}{\prop_item:Nn \g_xpg_langsetup_prop {#1 / hyphennames}}
- \providebool{havehyphen}
- \boolfalse{havehyphen}
+ \clist_set:Ne{\l_tmpa_clist}{\prop_item:Nn \l_xpg_langsetup_prop {#1 / hyphennames}}
+ \bool_set_false:N \l__xpg_have_hyphen_bool
% for each hyphen in the set until we find one that works
- \clist_map_inline:Nn \l_tmpa_clist {
- \ifbool{havehyphen}{}{
+ \clist_map_inline:Nn \l_tmpa_clist
+ {
+ \bool_if:NF \l__xpg_have_hyphen_bool
+ {
% check if language hyphenname is defined
- \__xpg_check_if_exist_l@:nF{#1}{
+ \__xpg_pattern_check_if_exists:nF{#1}
+ {
% if not, first consider nohyphenation
\str_if_eq:nnTF{##1}{nohyphenation}
{
\cs_gset_eq:cc{l@#1}{l@##1}
- \global\booltrue{havehyphen}
- }{
+ \bool_gset_true:N \l__xpg_have_hyphen_bool
+ }
+ {
% then test if hyphenation is defined
- \xpg@ifdefined{##1}{
+ \xpg_if_language_defined:nT {##1}
+ {
% test if language hyphenation is nohyphenation
- \cs_if_eq:cNF{l@#1}{\l@nohyphenation}{\global\booltrue{havehyphen}}{%
+ \cs_if_eq:cNTF{l@#1}{\l@nohyphenation}
+ { \bool_gset_true:N \l__xpg_have_hyphen_bool }
+ {
% if false define language to hyphenation if it is not equal...
\str_if_eq:nnF{#1}{##1}{\cs_gset_eq:cc{l@#1}{l@##1}}
% ...and load
- \xpg@set@hyphenation@patterns{##1}
- \global\booltrue{havehyphen}
- }
- }{}
+ \xpg_set_hyphenation_patterns:n {##1}
+ \bool_gset_true:N \l__xpg_have_hyphen_bool
+ }
+ }
}
}
}
@@ -4562,19 +4705,17 @@ to track the issues and follow progress.
% if l@#1 does not yet exist,
% we assign it to nohyphenation
% we do this here in case and if the hyphennames key was omitted
- \ifbool{havehyphen}{}{
- \xpg@ifdefined{#1}{}
- {
- \xpg@nopatterns{#1}
- \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax
- }
+ \bool_if:NF \l__xpg_have_hyphen_bool
+ {
+ \CheckHyphenationPatterns{#1}
}
- \csdef{#1@language}{
- \polyglossia@setup@language@patterns{#1}
+ \cs_gset:cpn {#1@language}
+ {
+ \SetupPolyglossiaLangPatterns{#1}
}
% setup hyphenmins
\clist_set:Ne \l_tmpa_clist
- { \prop_item:Nn \g_xpg_langsetup_prop {#1 / hyphenmins} }
+ { \prop_item:Nn \l_xpg_langsetup_prop {#1 / hyphenmins} }
\cs_if_eq:cNF {l@#1} \l@nohyphenation
{
\use:x
@@ -4586,7 +4727,8 @@ to track the issues and follow progress.
}
}
-\newcommand*\polyglossia@setup@language@patterns[1]{
+\NewDocumentCommand \SetupPolyglossiaLangPatterns { m }
+{
\bool_if:NTF \g__xpg_hyphenation_disabled_bool
{
\tl_gset:Ne \g__xpg_lastlanguage_tl {\the\csname l@#1\endcsname}
@@ -4600,32 +4742,29 @@ to track the issues and follow progress.
\language=\l@nohyphenation
}
{
- \xpg@set@hyphenation@patterns{#1}
+ \xpg_set_hyphenation_patterns:n {#1}
}
}
{
% Since this function is sometimes called from the gloss files
% directly, we need to check whether the requested hyphenname exists.
- \xpg@ifdefined{#1}{}
- {
- \xpg@nopatterns{#1}
- \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax%
- }
- \xpg@set@hyphenation@patterns{#1}
+ \CheckHyphenationPatterns{#1}
+ \xpg_set_hyphenation_patterns:n {#1}
}
}
}
-\prop_new:N \g_xpg_langsetup_prop
+\prop_new_linked:N \l_xpg_langsetup_prop
\cs_new_protected:Npn \__xpg_keys_define_lang:n #1
{
- \keys_define:nn {polyglossia}{
+ \keys_define:nn {polyglossia}
+ {
% the script font
#1 / script
.code:n = {
- \prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/script}{##1}
- \prop_gput:Nne{\g_xpg_langsetup_prop}{#1/lcscript}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/script}{##1}
+ \prop_put:Nne \l_xpg_langsetup_prop {#1/lcscript}
{\tl_if_empty:nF{##1}{\str_lowercase:n{##1}}}
},
#1 / script
@@ -4634,84 +4773,89 @@ to track the issues and follow progress.
.initial:n = latin,
% the opentype script tag
#1 / scripttag
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/scripttag}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/scripttag}{##1}},
#1 / scripttag
.default:n = {},
#1 / scripttag
.initial:n = {},
% the language full name
#1 / language
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/language}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/language}{##1}},
#1 / language
.value_required:n = true,
#1 / language
.initial:x = {\str_uppercase:n#1},
% the language tag
#1 / langtag
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/langtag}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/langtag}{##1}},
#1 / langtag
.value_required:n = true,
#1 / langtag
.initial:n = {},
% the BCP-47 tag
#1 / bcp47
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47}{##1}},
#1 / bcp47
.value_required:n = true,
#1 / bcp47
.initial:n = {},
% the BCP-47 language tag
#1 / bcp47-language
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-language}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-language}{##1}},
#1 / bcp47-language
.value_required:n = true,
#1 / bcp47-language
.initial:n = {},
% the BCP-47 region tag
#1 / bcp47-region
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-region}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-region}{##1}},
#1 / bcp47-region
.value_required:n = false,
#1 / bcp47-region
.initial:n = {},
% the BCP-47 script tag
#1 / bcp47-script
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-script}{##1}},
+ .code:n =
+ {
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-script}{##1}
+ \prop_put:Nne \l_xpg_langsetup_prop {#1/lc-bcp47-script}
+ {\tl_if_empty:nF{##1}{\str_lowercase:n{##1}}}
+ },
#1 / bcp47-script
.value_required:n = true,
#1 / bcp47-script
- .initial:n = {},
+ .initial:n = {Latn},
% the BCP-47 variant tag
#1 / bcp47-variant
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-variant}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-variant}{##1}},
#1 / bcp47-variant
.value_required:n = false,
#1 / bcp47-variant
.initial:n = {},
% the BCP-47 extension-t tag
#1 / bcp47-extension-t
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-extension-t}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-extension-t}{##1}},
#1 / bcp47-extension-t
.value_required:n = false,
#1 / bcp47-extension-t
.initial:n = {},
% the BCP-47 extension-u tag
#1 / bcp47-extension-u
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-extension-u}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-extension-u}{##1}},
#1 / bcp47-extension-u
.value_required:n = false,
#1 / bcp47-extension-u
.initial:n = {},
% the BCP-47 extension-x tag
#1 / bcp47-extension-x
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-extension-x}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-extension-x}{##1}},
#1 / bcp47-extension-x
.value_required:n = false,
#1 / bcp47-extension-x
.initial:n = {},
% the BCP-47 casing alias
#1 / bcp47-casing
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/bcp47-casing}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/bcp47-casing}{##1}},
#1 / bcp47-casing
.value_required:n = false,
#1 / bcp47-casing
@@ -4720,7 +4864,7 @@ to track the issues and follow progress.
#1 / hyphennames
.code:n = {
\clist_set:Nn{\l_tmpa_clist}{##1}
- \prop_gput:Nne{\g_xpg_langsetup_prop}{#1/hyphennames}{\clist_use:Nn \l_tmpa_clist {,}}
+ \prop_put:Nne \l_xpg_langsetup_prop {#1/hyphennames}{\clist_use:Nn \l_tmpa_clist {,}}
},
#1 / hyphennames
.value_required:n = true,
@@ -4733,8 +4877,8 @@ to track the issues and follow progress.
{LR}{}
{RL}{\RequireBidi}
}
- {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/direction}{##1}}
- {\xpg@error{Unknown~ direction~ "##1"~ for~ language~ "#1"}}
+ { \prop_put:Nnn \l_xpg_langsetup_prop {#1/direction}{##1} }
+ { \xpg_error_msg:n {Unknown~ direction~ "##1"~ for~ language~ "#1"} }
},
#1 / direction
.value_required:n = true,
@@ -4745,9 +4889,9 @@ to track the issues and follow progress.
.code:n = {
% check syntax
\int_compare:nNnF { \clist_count:n {##1} } = {2}
- {\xpg@error{hypenmins~should~be~a~list~of~two~entries,~got~"##1"}}
+ { \xpg_error_msg:n {hypenmins~should~be~a~list~of~two~entries,~got~"##1"} }
% set prop
- \prop_gput:Nnn \g_xpg_langsetup_prop {#1/hyphenmins} {##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/hyphenmins} {##1}
},
#1 / hyphenmins
.value_required:n = true,
@@ -4758,9 +4902,9 @@ to track the issues and follow progress.
.code:n = {
% check syntax
\int_compare:nNnF { \clist_count:n {##1} } = {1}
- {\xpg@error{totalhyphenhypenmin~should~be~a~single~entry,~got~"##1"}}
+ { \xpg_error_msg:n {totalhyphenhypenmin~should~be~a~single~entry,~got~"##1"} }
% set prop
- \prop_gput:Nnn \g_xpg_langsetup_prop {#1/totalhyphenmin} {##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/totalhyphenmin} {##1}
},
#1 / totalhyphenmin
.value_required:n = false,
@@ -4779,35 +4923,35 @@ to track the issues and follow progress.
% environment name
#1 / envname
.code:n = {
- \prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/envname}{##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/envname}{##1}
},
#1/ envname.value_required:n = true,
#1/ envname.initial:n = {#1},
% babel name
#1 / babelname
.code:n = {
- \prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/babelname}{##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/babelname}{##1}
},
#1/ babelname.value_required:n = true,
#1/ babelname.initial:n = {#1},
% default numerals
#1 / localnumeral
. code:n = {
- \prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/localnumeral}{##1}
- \prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/Localnumeral}{##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/localnumeral}{##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/Localnumeral}{##1}
},
#1 / localnumeral.value_required:n = true,
- #1 / localnumeral.initial:n = {polyglossia@C@localnumeral},
+ #1 / localnumeral.initial:n = {xpg_C_localnumeral:nn},
% uppercased
#1 / Localnumeral
. code:n = {
- \prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/Localnumeral}{##1}
+ \prop_put:Nnn \l_xpg_langsetup_prop {#1/Localnumeral}{##1}
},
#1 / Localnumeral.value_required:n = true,
- #1 / Localnumeral.initial:n = {polyglossia@C@localnumeral},
+ #1 / Localnumeral.initial:n = {xpg_C_localnumeral:nn},
% environment define command (by default create the environment)
#1 / DefineCommandsCmd
- .code:n = {\prop_gput:Nnn{\g_xpg_langsetup_prop}{#1/DefineCommandsCmd}{##1}},
+ .code:n = {\prop_put:Nnn \l_xpg_langsetup_prop {#1/DefineCommandsCmd}{##1}},
#1 / DefineCommandsCmd
.value_required:n = true,
#1 / DefineCommandsCmd
@@ -4815,9 +4959,20 @@ to track the issues and follow progress.
}
}
+\DeclareExpandableDocumentCommand \babelname { }
+ {
+ \prop_item:Ne \l_xpg_langsetup_prop { \languagename / babelname }
+ }
+
+\DeclareExpandableDocumentCommand \mainbabelname { }
+ {
+ \prop_item:Ne \l_xpg_langsetup_prop { \mainlanguagename / babelname }
+ }
+
% TODO move to C module
-\newcommand*{\polyglossia@C@localnumeral}[2]{
- \polyglossia@Clang@@arabic{#2}
+\cs_new:Nn \xpg_C_localnumeral:nn
+{
+ \xpg_Clang_arabic{#2}
}
\cs_new:Npn \__xpg_localnumeral_parse:nn #1 #2
@@ -4841,7 +4996,7 @@ to track the issues and follow progress.
\__xpg_localnumeral_parse:nn
} { #2 }
}
- { \use:c { \prop_item:Ne \g_xpg_langsetup_prop
+ { \use:c { \prop_item:Ne \l_xpg_langsetup_prop
{ \languagename / #3 } } { } { #1 } }
}
@@ -4876,31 +5031,31 @@ to track the issues and follow progress.
\cs_new_nopar:Npn \__xpg_indent_first:n #1
{
\bool_if:cTF { g__xpg_#1_if_bool }
- { \french@indent } { \nofrench@indent }
+ { \__xpg_french_indent: } { \__xpg_no_french_indent: }
}
\cs_new:Nn \__xpg_lang_set_par_direction:n
{
- \prop_get:NeNTF \g_xpg_langsetup_prop {#1/direction} \l_tmpa_tl
+ \prop_get:NeNTF \l_xpg_langsetup_prop {#1/direction} \l_tmpa_tl
{
\__xpg_set_par_direction:n{\l_tmpa_tl}
}
{
- \xpg@error{Could~ not~ retrieve~ key~ direction~ for~ language~ "#1"}
- \prop_show:N{\g_xpg_langsetup_prop}
+ \xpg_error_msg:n {Could~ not~ retrieve~ key~ direction~ for~ language~ "#1"}
+ \prop_show:N{\l_xpg_langsetup_prop}
}
}
\cs_new:Nn \__xpg_lang_set_text_direction:nn
{
- \prop_get:NeNTF \g_xpg_langsetup_prop {#1/direction} \l_tmpa_tl
+ \prop_get:NeNTF \l_xpg_langsetup_prop {#1/direction} \l_tmpa_tl
{
\__xpg_set_text_direction:n{\l_tmpa_tl}{#2}
}
{
- \xpg@error{Could~ not~ retrieve~ key~ direction~ for~ language~ "#1"}
- \prop_show:N{\g_xpg_langsetup_prop}
+ \xpg_error_msg:n {Could~ not~ retrieve~ key~ direction~ for~ language~ "#1"}
+ \prop_show:N{\l_xpg_langsetup_prop}
}
}
@@ -4931,7 +5086,7 @@ to track the issues and follow progress.
{
\bool_gset_true:N \g__xpg_hyphenation_disabled_bool
\tl_gset:Ne \g__xpg_lastlanguage_tl { \the\language }
- % We do not call \xpg@set@hyphenation@patterns here to avoid a warning message.
+ % We do not call \xpg_set_hyphenation_patterns:n here to avoid a warning message.
% "nohyphenation" is not listed in language.dat.lua.
\language=\l@nohyphenation
}
@@ -4943,19 +5098,19 @@ to track the issues and follow progress.
{
\bool_gset_false:N \g__xpg_hyphenation_disabled_bool
\language=\tl_use:N{\g__xpg_lastlanguage_tl}
- }%
+ }
}
\cs_new:Npn \__xpg_auto_setupfont:n #1
{
\bool_if:cTF { g__xpg_#1_fontsetup_bool }
{
- \str_if_eq:eeTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/lcscript}}{latin}
- {\xpg@fontsetup@latin{#1}}
- {\xpg@fontsetup@nonlatin{#1}}
+ \str_if_eq:eeTF{\prop_item:Nn{\l_xpg_langsetup_prop}{#1/lcscript}}{latin}
+ {\SetupLatinPolyglossiaFont{#1}}
+ {\SetupNonLatinPolyglossiaFont{#1}}
}
{
- \xpg@info{Skipping~ automatic~ font~ setup~ for~ language~ #1}
+ \xpg_info_msg:n{Skipping~ automatic~ font~ setup~ for~ language~ #1}
}
}
@@ -4967,40 +5122,40 @@ to track the issues and follow progress.
\bool_if:nTF{\tl_if_empty_p:n{#1} || \tl_if_empty_p:n{#2}}
{
% maybe an error ?
- \xpg@warning{Asking~ to~ add~ empty~ feature~to~ main~ font~
+ \xpg_warning_msg:n{Asking~ to~ add~ empty~ feature~to~ main~ font~
(Language="#2"~ to~ langtag~ "#1")}
}
{
- \str_if_eq:nnTF{#2}{Turkish}{
+ \str_if_eq:nnTF{#2}{Turkish}
+ {
\fontspec_if_language:nTF {TRK}
{
\addfontfeature{Language=Turkish}
}
{
- \fontspec_if_language:nTF {TUR}
+ \fontspec_if_language:nT {TUR}
{
\addfontfeature{Language=Turkish}
- }{}
+ }
}
}{
- \fontspec_if_language:nTF{#1}
+ \fontspec_if_language:nT{#1}
{
\addfontfeature{Language=#2}
}
- {}
}
}
}
-\cs_generate_variant:Nn \__xpg_add_font_feature_language:nn { on , no, oo , Vn, nV, VV , xn, nx, xx}
+\cs_generate_variant:Nn \__xpg_add_font_feature_language:nn { ee }
-% add fontfeature Script=#2 to scripttag #1
-% do nothing if #1 or #2 is empty
+% add fontfeature Script=#3 to scripttag #2 for family #1
+% do nothing if #2 or #3 is empty
\cs_new:Nn \__xpg_add_font_feature_script:nnn
{
\bool_if:nTF{\tl_if_empty_p:n{#2} || \tl_if_empty_p:n{#3}}
{
% maybe an error ?
- \xpg@warning{Asking~ to~ add~ empty~ feature~to~ main~ font
+ \xpg_warning_msg:n{Asking~ to~ add~ empty~ feature~to~ main~ font
(Script="#3"~ to~ scripttag~ "#2")}
}
{
@@ -5036,118 +5191,58 @@ to track the issues and follow progress.
\regex_replace_once:nnN { \.[^\.]* \Z } { } \xpg_fname_str
% ... and, finally, quotation marks
\regex_replace_once:nnN { " } { } \xpg_fname_str
- \xpg@error{
- The~ current~ main ~ \xpg_ffamily_tl\space font,~ \xpg_fname_str,~ does~ not~ contain~ the~"#3"~ script!\MessageBreak
- Please~ define~\csname\tl_if_empty:nF{#3}{\str_lowercase:n{#3}}font\xpg_ffamilysh_tl\endcsname~
- with~ \string\newfontfamily\space command
+ \xpg_error_msg:n
+ {
+ The~ current~ main ~ \xpg_ffamily_tl\space font,~ \xpg_fname_str,~ does~ not~ contain~ the~"#3"~ script! \iow_newline:
+ Please~ define~\csname\tl_if_empty:nF{#3}{\str_lowercase:n{#3}}font\xpg_ffamilysh_tl\endcsname~
+ with~ \string\newfontfamily\space command
}
}
}
}
-\cs_generate_variant:Nn \__xpg_add_font_feature_script:nnn { non , nno, noo , nVn, nnV, nVV , nxn, nnx, nxx}
-
-\def\xpg@fontsetup@latin#1{
- \begingroup
- \csgdef{#1@font@rm}{
- \cs_if_exist_use:cF{#1font}{
- \rmfamilylatin
- \__xpg_add_font_feature_language:xx{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/langtag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- }
- }
- \csgdef{#1@font@sf}{
- \cs_if_exist_use:cF{#1fontsf}{
- \sffamilylatin
- \__xpg_add_font_feature_language:xx{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/langtag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- }
- }
- \csgdef{#1@font@tt}{
- \cs_if_exist_use:cF{#1fonttt}{
- \ttfamilylatin
- \__xpg_add_font_feature_language:xx{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/langtag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- }
- }
- \endgroup
-}
+\cs_generate_variant:Nn \__xpg_add_font_feature_script:nnn { nee }
-\def\xpg@fontsetup@nonlatin#1{
- \begingroup
- \csgdef{#1@font@rm}{
- \cs_if_exist_use:cF{#1font}
- {
- \providetoggle{#1@use@script@font}
- \str_if_eq:nnTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/script}}{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- {\rmfamilylatin}
- {\cs_if_exist_use:cTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/lcscript} font}
- {
- \toggletrue{#1@use@script@font}
- }
- {
- \rmfamilylatin
- }
- }
- \iftoggle{#1@use@script@font}{}{
- \__xpg_add_font_feature_script:nxx{rm}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/scripttag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/script}}
- }%
- \__xpg_add_font_feature_language:xx{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/langtag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- }%
- \def\familytype{rm}
- }%
- \csgdef{#1@font@sf}{
- \cs_if_exist_use:cF{#1fontsf}
+%% TODO: probably can be cleaned a little more
+\cs_new_protected:Npn \__xpg_setup_font:nnnnn #1 #2 #3 #4 #5 % #1 = lang, #2 = family, #3 = family, #4 = gobble, #5 gobble
+ {
+ \cs_set_protected_nopar:cpn { #1@font@#2 }
{
- \providetoggle{#1@use@script@fontsf}
- \str_if_eq:nnTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/script}}{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- {\sffamilylatin}
- {\cs_if_exist_use:cTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/lcscript} fontsf}
+ \cs_if_exist_use:cF{ #1font#3 }
{
- \toggletrue{#1@use@script@fontsf}
- }
- {
- \sffamilylatin
- }
- }
- \iftoggle{#1@use@script@fontsf}{}{
- \__xpg_add_font_feature_script:nxx{sf}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/scripttag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/script}}
- }%
- \__xpg_add_font_feature_language:xx{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/langtag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- }%
- \def\familytype{sf}
- }%
- \csgdef{#1@font@tt}{
- \cs_if_exist_use:cF{#1fonttt}
- {
- \providetoggle{#1@use@script@fonttt}
- \str_if_eq:nnTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/script}}{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
- {\ttfamilylatin}
- {\cs_if_exist_use:cTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/lcscript} fonttt}
- {
- \toggletrue{#1@use@script@fonttt}
- }
- {
- \ttfamilylatin
- }
- }
- \iftoggle{#1@use@script@fonttt}{}{
- \__xpg_add_font_feature_script:nxx{tt}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/scripttag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/script}}
- }
- \__xpg_add_font_feature_language:xx{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/langtag}}
- {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/language}}
+ \cs_if_exist_use:cF { \prop_item:Nn \l_xpg_langsetup_prop { #1 / lc-bcp47-script } font#3 }
+ {
+ #4 { \prop_item:Nn \l_xpg_langsetup_prop { #1 / lcscript } font#3 }
+ {
+ \use:c { #2familylatin }
+ #5
+ {
+ \__xpg_add_font_feature_script:nee { #2 }
+ { \prop_item:Nn \l_xpg_langsetup_prop { #1 / scripttag } }
+ { \prop_item:Nn \l_xpg_langsetup_prop { #1 / script } }
+ }
+ }
+ }
+ \__xpg_add_font_feature_language:ee
+ { \prop_item:Nn \l_xpg_langsetup_prop { #1 / langtag } }
+ { \prop_item:Nn \l_xpg_langsetup_prop { #1 / language } }
+ }
+ \tl_set:Nn \familytype { #2 }
}
- \def\familytype{tt}
}
- \endgroup
-}
+
+\NewDocumentCommand \SetupLatinPolyglossiaFont { m }
+ {
+ \__xpg_setup_font:nnnnn { #1 } { rm } { } { \use_ii:nn } { \use_none:n }
+ \__xpg_setup_font:nnnnn { #1 } { sf } { sf } { \use_ii:nn } { \use_none:n }
+ \__xpg_setup_font:nnnnn { #1 } { tt } { tt } { \use_ii:nn } { \use_none:n }
+ }
+
+\NewDocumentCommand \SetupNonLatinPolyglossiaFont { m }
+ {
+ \__xpg_setup_font:nnnnn { #1 } { rm } { } { \cs_if_exist_use:cF } { \use:n }
+ \__xpg_setup_font:nnnnn { #1 } { sf } { sf } { \cs_if_exist_use:cF } { \use:n }
+ \__xpg_setup_font:nnnnn { #1 } { tt } { tt } { \cs_if_exist_use:cF } { \use:n }
+ }
%%% END OF PolyglossiaSetup
@@ -5156,40 +5251,53 @@ to track the issues and follow progress.
\cs_new_nopar:Nn \__xpg_local_marks:n { }
\cs_new_nopar:Nn \__xpg_enable_local_marks:
{
- \xpg@info{Option:~ localmarks}
+ \xpg_info_msg:n{Option:~ localmarks}
\cs_gset_nopar:Nn \__xpg_local_marks:n
{
- \def\xpg@tmp@lang{##1}
- \DeclareRobustCommand\markboth[2]{
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \unrestored@protected@xdef\@themark
- {
- {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####1}}}
- {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####2}}}
- }
- \@temptokena \expandafter{\@themark}
- \mark{\the\@temptokena}
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
- }
- \DeclareRobustCommand\markright[1]{
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \expandafter\@markright\@themark
- {\lowercase{\foreignlanguage{\xpg@tmp@lang}}{\protect\@@ensure@maindir{####1}}}
- \@temptokena \expandafter{\@themark}
- \mark{\the\@temptokena}
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi
- }
+ \DeclareDocumentCommand \markboth { m m }
+ {
+ \group_begin:
+ \cs_set_eq:cc { label } { relax }
+ \cs_set_eq:cc { index } { relax }
+ \cs_set_eq:cc { glossary } { relax }
+ \unrestored@protected@xdef\@themark
+ {
+ {\foreignlanguage{##1}{\protect\@@ensure@maindir{####1}}}
+ {\foreignlanguage{##1}{\protect\@@ensure@maindir{####2}}}
+ }
+ \@temptokena \expandafter{\@themark}
+ \mark_insert:nn{2e-left}{####1}
+ \mark_insert:nn{2e-right}{####2}
+ \tl_if_empty:nF{####2}{ \mark_insert:nn{2e-right-nonempty}{####2} }
+ \mark{\the\@temptokena}
+ \group_end:
+ \if@nobreak\ifvmode\nobreak\fi\fi
+ }
+ \DeclareDocumentCommand \markright { m }
+ {
+ \group_begin:
+ \cs_set_eq:cc { label } { relax }
+ \cs_set_eq:cc { index } { relax }
+ \cs_set_eq:cc { glossary } { relax }
+ \expandafter\@markright\@themark
+ {\foreignlanguage{##1}{\protect\@@ensure@maindir{####1}}}
+ \@temptokena \expandafter{\@themark}
+ \mark_insert:nn{2e-right}{####1}
+ \tl_if_empty:nF{####1}{ \mark_insert:nn{2e-right-nonempty}{####1} }
+ \mark{\the\@temptokena}
+ \group_end:
+ \if@nobreak\ifvmode\nobreak\fi\fi
+ }
}
}
%we call this macro when a gloss file is not found for a given language
-\def\xpg@nogloss#1{
- \xpg@warning{File~ gloss-#1.ldf~ do~ not~ exists!\MessageBreak
- I~ will~ nevertheless~ try~ to~ use~ hyphenation~ patterns~ for~ #1.}
+\cs_new_nopar:Nn \__xpg_no_gloss:n
+{
+ \xpg_warning_msg:n
+ {File~ gloss-#1.ldf~ do~ not~ exists! \iow_newline:
+ I~ will~ nevertheless~ try~ to~ use~ hyphenation~ patterns~ for~ #1.}
+
\PolyglossiaSetup{#1}{hyphenmins={2,3},hyphennames={#1},fontsetup=true}
% the above amounts to:
%\ifcsundef{l@#1}%
@@ -5198,59 +5306,64 @@ to track the issues and follow progress.
%\csdef{#1@language}{\language=\csname l@#1\endcsname}%
}
-\newcommand{\xpg@input}[1]{
+\cs_new_nopar:Nn \xpg_input:n
+{
% Store catcode of @ before making at letter
- \chardef\xpg@saved@at@catcode\catcode`\@
- \makeatletter
- \input{#1}
+ \cs_set_protected_nopar:Npx \__xpg_restore_at_catcode:
+ { \char_set_catcode:nn { `@ } { \char_value_catcode:n {`\@ } } }
+ \char_set_catcode_letter:N @
+ \file_input:n { #1 }
% restore former @ catcode
- \catcode`\@=\xpg@saved@at@catcode
+ \__xpg_restore_at_catcode:
}
% try to load a language file
-\cs_new:Nn \__xpg_load_lang_definition:nn {
- \file_if_exist:nTF{gloss-#2.ldf}
+\cs_new:Nn \__xpg_load_lang_definition:nn
+{
+ \file_if_exist:nTF{gloss-#2.ldf}
{
- % Temporarily force catcode of ~ to 13 since babelsh.def
+ \tl_set:Nn \xpg__tmp_default_options_tl { #1 }
+ % Temporarily force catcode of ~ to 13 (active) since babelsh.def
% requires it. This is needed particularly with LaTeX3
% packages which force \ExplSyntaxOn (#425)
- \protected\edef\xpg@restore@tilde@catcode{\catcode 126 = \the\catcode 126\relax}
- \catcode 126 = 13
- \xpg@input{gloss-#2.ldf}
- \setkeys{#2}{#1}
+ \cs_gset_protected:Npx \__xpg_restore_tilde_catcode:
+ { \char_set_catcode:nn { 126 } { \char_value_catcode:n { 126 } } }
+ \char_set_catcode_active:n { 126 }
+ \xpg_input:n {gloss-#2.ldf}
% restore former ~ catcode
- \xpg@restore@tilde@catcode
+ \__xpg_restore_tilde_catcode:
}
{
- \xpg@nogloss{#2}
+ \__xpg_no_gloss:n {#2}
}
}
\cs_generate_variant:Nn \__xpg_load_lang_definition:nn { ee }
% load a master language from an alias file
-\newcommand*\xpg@load@master@language[1] {
- \xpg@input{gloss-#1.ldf}
+\NewDocumentCommand \InheritGlossFile { m }
+{
\seq_if_in:NeF \__xpg_langs_loaded {#1}
{
+ \xpg_input:n {gloss-#1.ldf}
% define environment and command if not alias
\str_if_eq:eeT {\prop_item:Ne \__xpg_alias {#1/target}} {#1} {
- \use:c{\prop_item:Nn{\g_xpg_langsetup_prop}
+ \use:c{\prop_item:Nn{\l_xpg_langsetup_prop}
{#1/DefineCommandsCmd}}
{#1}
}
+ \seq_gput_right:Nn \__xpg_langs_loaded {#1}
}
\__xpg_register_language:nn{}{#1}
- \seq_gput_right:Nn \__xpg_langs_loaded {#1}
}
-\prop_new:N \__xpg_alias
+\prop_new_linked:N \__xpg_alias
% define environment and command if not alias
\cs_new:Nn \xpg_define_language_commands:n {
\str_if_eq:eeT {\prop_item:Ne \__xpg_alias {#1/target}} {#1}
{
\exp_args:Ne
- \NewDocumentEnvironment {\prop_item:Nn{\g_xpg_langsetup_prop}{#1/envname}} { O{} }
+ \NewDocumentEnvironment {\prop_item:Nn{\l_xpg_langsetup_prop}{#1/envname}} { O{} }
{
\otherlanguage [ ##1 ] { #1 }
}
@@ -5278,7 +5391,7 @@ to track the issues and follow progress.
% target to self fall back to language table
\str_if_eq:eeTF { \prop_item:Ne \__xpg_alias {#1/target} } { #1 }
{
- \prop_item:Nn{\g_xpg_langsetup_prop} {#1/#2}
+ \prop_item:Nn{\l_xpg_langsetup_prop} {#1/#2}
}
% load alias by recursion
{
@@ -5401,20 +5514,29 @@ to track the issues and follow progress.
\clist_if_in:NeF \xpg@loaded {#2}{
\clist_gput_right:Ne \xpg@loaded {#2}
}
- % Register the language options
- \__xpg_set_language_options:nnn {#2} {#1} {@xpg@set@langvariant}
+ \group_begin:
+ % set language options
+ \__xpg_set_language_options:nn {#2} {#1}
% register babelname
- \prop_get:NeN \g_xpg_langsetup_prop {#2/babelname} \l_tmpa_tl
+ \prop_get:NeN \l_xpg_langsetup_prop {#2/babelname} \l_tmpa_tl
\clist_if_in:NeF \xpg@bloaded {\l_tmpa_tl}{
\clist_gput_right:Ne \xpg@bloaded {\l_tmpa_tl}
}
% register BCP-47 ID
- \prop_get:NeN \g_xpg_langsetup_prop {#2/bcp47} \l_tmpa_tl
+ \prop_get:NeN \l_xpg_langsetup_prop {#2/bcp47} \l_tmpa_tl
\clist_if_in:NeF \xpg@bcp@loaded {\l_tmpa_tl}{
\clist_gput_right:Ne \xpg@bcp@loaded {\l_tmpa_tl}
}
+ % register variant
+ \prop_get:NnNT \l_xpg_curropt_prop {#2/variant} \l_tmpa_tl {
+ \clist_if_in:NeF \xpg@vloaded {\l_tmpa_tl}{
+ \clist_gput_right:Ne \xpg@vloaded {\l_tmpa_tl}
+ }}
+ \group_end:
}
+\prop_new_linked:N \l_xpg_curropt_prop
+
\DeclareDocumentCommand \setdefaultlanguage { O{} m }
{
% latex is an internal language, so do not record
@@ -5429,12 +5551,13 @@ to track the issues and follow progress.
\__xpg_load_lang_definition:nn{#1}{#2}
% define environment and command if not alias
\str_if_eq:eeT {\prop_item:Ne \__xpg_alias {#2/target}} {#2} {
- \use:c{\prop_item:Ne{\g_xpg_langsetup_prop}
+ \use:c{\prop_item:Ne{\l_xpg_langsetup_prop}
{#2/DefineCommandsCmd}}
{#2}
}
\seq_gput_right:Ne \__xpg_langs_loaded {#2}
}
+ \cs_set_nopar:Npe \mainlanguagevariant { \prop_item:Ne \l_xpg_curropt_prop { \xpg_alias_base_lang:n{#2} / variant } }
\exp_args:Nee \__xpg_set_default_language:nn {\xpg_alias_add_to_option_i:nn{#2}{#1}}
{\xpg_alias_base_lang:n{#2}}
}
@@ -5442,70 +5565,22 @@ to track the issues and follow progress.
\cs_new:Nn \__xpg_set_default_language:nn
{
- \gdef\xpg@main@language{#2}
- \tl_if_blank:nTF {#1}
- {
- \cs_gset_nopar:Npn \mainlanguagevariant {}
- }
- {
- % Register the language options
- \__xpg_set_language_options:nnn {#2} {#1} {@xpg@main@langvariant}
- }
- \csgdef{#2@gvar}{\mainlanguagevariant}
+ \tl_gset:Nn \xpg_main_language_tl {#2}
%% The following settings are for the default language and script
% this tells bidi.sty or luabidi.sty that the document is RTL
- \__xpg_if_LR_str:eF{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/direction}}
+ \__xpg_if_LR_str:eF{\prop_item:Nn{\l_xpg_langsetup_prop}{#2/direction}}
{
\__xpg_setRTLmain:
}
\cs_gset_nopar:Nn \__xpg_at_begin_document_selectlanguage: {
\selectbackgroundlanguage{#2}
- \selectlanguage[#1]{#2}%
+ \selectlanguage[#1]{#2}
}
- \xpg@info{Default~ language~ is~ #2}
- \polyglossia@set@language@name[#1]{#2}
+ \str_if_eq:eeF { #2 } { latex }
+ { \xpg_info_msg:n{Default~ language~ is~ #2} }
+ \xpg_set_language_name:n { #2 }
\cs_gset_nopar:Npn \mainlanguagename {#2}
- % Store babelname of main language (for external packages such as biblatex)
- \cs_gset_nopar:Npe \mainbabelname { \prop_item:Nn \g_xpg_langsetup_prop {#2/babelname} }
- % Store babelname of current language (for external packages such as biblatex)
- \cs_gset_eq:NN \babelname \mainbabelname
- \cs_gset_eq:cc{#2@gbabelname}{babelname}%
- % Store BCP-47 ID and subtags of main language:
- % 1. store main.* (sub)tags
- \cs_gset_nopar:cpe {bcp47.main.tag} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47 } }
- \cs_gset_nopar:cpe {bcp47.main.language} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47-language } }
- \cs_gset_nopar:cpe {bcp47.main.region} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47-region } }
- \cs_gset_nopar:cpe {bcp47.main.script} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47-script } }
- \cs_gset_nopar:cpe {bcp47.main.variant} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47-variant } }
- \cs_gset_nopar:cpe {bcp47.main.extension.t} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47extension-t } }
- \cs_gset_nopar:cpe {bcp47.main.extension.u} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47-extension-u } }
- \cs_gset_nopar:cpe {bcp47.main.extension.x} { \prop_item:Nn \g_xpg_langsetup_prop { #2 / bcp47-extension-x } }
- % For casing, we fall back to language if bcp47-casing is not explicitly set
- \cs_set_nopar:cpx {tmpcasing} { \prop_item:Ne \g_xpg_langsetup_prop { #2 / bcp47-casing } }
- \str_if_empty:NTF \tmpcasing
- { \cs_gset_nopar:cpe {bcp47.main.casing} { \prop_item:Nn \g_xpg_langsetup_prop {#2 / bcp47-language} } }
- { \cs_gset_nopar:cpe {bcp47.main.casing} { \tmpcasing } }
- % 2. Store lang (sub)tags
- \cs_gset_eq:cc {bcp47.tag} {bcp47.main.tag}
- \cs_gset_eq:cc {bcp47.language} {bcp47.main.language}
- \cs_gset_eq:cc {bcp47.region} {bcp47.main.region}
- \cs_gset_eq:cc {bcp47.script} {bcp47.main.script}
- \cs_gset_eq:cc {bcp47.variant} {bcp47.main.variant}
- \cs_gset_eq:cc {bcp47.extension.t} {bcp47.main.extension.t}
- \cs_gset_eq:cc {bcp47.extension.u} {bcp47.main.extension.u}
- \cs_gset_eq:cc {bcp47.extension.x} {bcp47.main.extension.x}
- \cs_gset_eq:cc {bcp47.casing} {bcp47.main.casing}
- % 3. Store global language BCP47 settings (with default subtags as set by main language options)
- \cs_gset_eq:cc{#2@g.bcp47.tag}{bcp47.tag}
- \cs_gset_eq:cc{#2@g.bcp47.language}{bcp47.language}
- \cs_gset_eq:cc{#2@g.bcp47.region}{bcp47.region}
- \cs_gset_eq:cc{#2@g.bcp47.script}{bcp47.script}
- \cs_gset_eq:cc{#2@g.bcp47.variant}{bcp47.variant}
- \cs_gset_eq:cc{#2@g.bcp47.extension.t}{bcp47.extension.t}
- \cs_gset_eq:cc{#2@g.bcp47.extension.u}{bcp47.extension.u}
- \cs_gset_eq:cc{#2@g.bcp47.extension.x}{bcp47.extension.x}
- \cs_gset_eq:cc{#2@g.bcp47.casing}{bcp47.casing}
}
\DeclareCommandCopy \setmainlanguage \setdefaultlanguage
@@ -5516,11 +5591,11 @@ to track the issues and follow progress.
{
\str_case:nnF {#1}
{
- {bcp-47} { \csuse{bcp47.tag} }
- {bcp47} { \csuse{bcp47.tag} }
+ {bcp-47} { \use:c{bcp47.tag} }
+ {bcp47} { \use:c{bcp47.tag} }
}
{
- \xpg@error{Invalid~ \string\languageid\space argument:~ #1}
+ \xpg_ill_arg_msg:nn { #1 } { \languageid }
}
}
@@ -5530,11 +5605,11 @@ to track the issues and follow progress.
{
\str_case:nnF {#1}
{
- {bcp-47} { \csuse{bcp47.main.tag} }
- {bcp47} { \csuse{bcp47.main.tag} }
+ {bcp-47} { \use:c{bcp47.main.tag} }
+ {bcp47} { \use:c{bcp47.main.tag} }
}
{
- \xpg@error{Invalid~ \string\mainlanguageid\space argument:~ #1}
+ \xpg_ill_arg_msg:nn { #1 } { \mainlanguageid }
}
}
% Kernel command to access to BCP-47 data.
@@ -5554,281 +5629,205 @@ to track the issues and follow progress.
% and main.* variants thereof
% See https://github.com/latex3/latex2e/issues/1035
\DeclareExpandableDocumentCommand \BCPdata {m}
+ {
+ \cs_if_exist_use:cF{bcp47.#1}
+ { \xpg_ill_arg_msg:nn { #1 } { \BCPdata } }
+ }
+
+\clist_map_inline:nn
+ {
+ language, region, script, variant,
+ extension.t, extension.u, extension.x
+ }{
+ \tl_set:Nn \l_tmpa_tl { #1 }
+ \tl_replace_once:Nnn \l_tmpa_tl { . } { - }
+ \cs_gset_nopar:cpe { bcp47.#1 }
+ {
+ \exp_not:n { \prop_item:Ne \l_xpg_langsetup_prop } { \exp_not:N \languagename / bcp47-\l_tmpa_tl }
+ }
+ \cs_gset_nopar:cpe { bcp47.main.#1 }
+ {
+ \exp_not:n { \prop_item:Ne \l_xpg_langsetup_prop } { \exp_not:N \mainlanguagename / bcp47-\l_tmpa_tl }
+ }
+ }
+\cs_gset_nopar:cpn { bcp47.casing }
+ {
+ \tl_if_empty:eTF { \prop_item:Ne \l_xpg_langsetup_prop { \languagename / bcp47-casing } }
+ {
+ \prop_item:Ne \l_xpg_langsetup_prop { \languagename / bcp47-language }
+ }{
+ \prop_item:Ne \l_xpg_langsetup_prop { \languagename / bcp47-casing }
+ }
+ }
+\cs_gset_nopar:cpn { bcp47.main.casing }
+ {
+ \tl_if_empty:eTF { \prop_item:Ne \l_xpg_langsetup_prop { \mainlanguagename / bcp47-casing } }
+ {
+ \prop_item:Ne \l_xpg_langsetup_prop { \mainlanguagename / bcp47-language }
+ }{
+ \prop_item:Ne \l_xpg_langsetup_prop { \mainlanguagename / bcp47-casing }
+ }
+ }
+\cs_gset_nopar:cpn { bcp47.tag }
+ {
+ \prop_item:Ne \l_xpg_langsetup_prop { \languagename / bcp47 }
+ }
+\cs_gset_nopar:cpn { bcp47.main.tag }
+ {
+ \prop_item:Ne \l_xpg_langsetup_prop { \mainlanguagename / bcp47 }
+ }
+
+\cs_new_nopar:Npn \languagevariant
+ {
+ \prop_item:Ne \l_xpg_curropt_prop { \languagename / variant }
+ }
+
+\cs_new:Nn \xpg_set_language_name:n
{
- \cs_if_exist_use:cF{bcp47.#1}
- { \xpg@error{Invalid~ \string\BCPdata\space argument:~ #1} }
-}
-
-% main babel name
-\cs_new_nopar:Npn \mainlanguagename {}
-\cs_new_nopar:Npn \mainbabelname {}
-\cs_new_nopar:cpn {bcp47.main.tag} {}
-\cs_new_nopar:cpn {bcp47.main.language} {}
-\cs_new_nopar:cpn {bcp47.main.region} {}
-\cs_new_nopar:cpn {bcp47.main.script} {}
-\cs_new_nopar:cpn {bcp47.main.variant} {}
-\cs_new_nopar:cpn {bcp47.main.extension.t} {}
-\cs_new_nopar:cpn {bcp47.main.extension.u} {}
-\cs_new_nopar:cpn {bcp47.main.extension.x} {}
-\cs_new_nopar:cpn {bcp47.main.casing} {}
-\cs_new_nopar:Npn \mainlanguagevariant {}%
-% Store main language variant for external packages
-\define@key{xpg@main@langvariant}{variant}{
- \cs_gset_nopar:Npn \mainlanguagevariant {#1}
-}
-
-\cs_new_nopar:Npn \babelname {}
-\def\languagevariant{}
-% Store current language variant for external packages
-\define@key{xpg@set@langvariant}{variant}{
- \def\languagevariant{#1}
-}
-
-\newcommand*\polyglossia@set@language@name[2][]{
- \def\languagename{#2}
- \tl_if_blank:nTF {#1}{
- \ifcsundef{#2@gvar}{\def\languagevariant{}}{\def\languagevariant{\csuse{#2@gvar}}}
- }{
- % Register the language options
- \__xpg_set_language_options:nnn {#2} {#1} {@xpg@set@langvariant}
- \cs_set_eq:cc{#2@var}{languagevariant}
- }%
+ \cs_set:Npn \languagename { #1 }
}
-
-\newcommand*{\resetdefaultlanguage}[2][]{
+\NewDocumentCommand \resetdefaultlanguage { O{} m }
+{
\__xpg_reset_default_language:nn
{\xpg_alias_add_to_option_i:nn{#2}{#1}}
{\xpg_alias_base_lang:n{#2}}
}
-\cs_new:Nn \__xpg_store_bcp_info:nn
-{
- % Store BCP-47 ID and subtags of current language
- \tl_if_blank:nTF {#1}{
- % tag (e.g., en-US)
- \ifcsundef{#2@g.bcp47.tag}{
- \csedef{bcp47.tag}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47 } }
- }{
- \csedef{bcp47.tag}{\csuse{#2@g.bcp47.tag}}
- }
- % language (e.g., en)
- \ifcsundef{#2@g.bcp47.language}{
- \csedef{bcp47.language}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-language } }
- }{
- \csedef{bcp47.language}{\csuse{#2@g.bcp47.language}}
- }
- % region (e.g., US)
- \ifcsundef{#2@g.bcp47.region}{%
- \csedef{bcp47.region}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-region } }
- }{
- \csedef{bcp47.region}{\csuse{#2@g.bcp47.region}}%
- }
- % script (e.g., Latn)
- \ifcsundef{#2@g.bcp47.script}{
- \csedef{bcp47.script}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-script } }
- }{
- \csedef{bcp47.script}{\csuse{#2@g.bcp47.script}}
- }
- % variant (e.g., 1996)
- \ifcsundef{#2@g.bcp47.variant}{
- \csedef{bcp47.variant}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-variant } }
- }{
- \csedef{bcp47.variant}{\csuse{#2@g.bcp47.variant}}
- }
- % extension.t (tranformation)
- \ifcsundef{#2@g.bcp47.extension.t}{%
- \csedef{bcp47.extension.t}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-extension-t } }
- }{
- \csedef{bcp47.extension.t}{\csuse{#2@g.bcp47.extension.t}}
- }
- % extension.u (additional locale information)
- \ifcsundef{#2@g.bcp47.extension.u}{%
- \csedef{bcp47.extension.u}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-extension-u } }
- }{
- \csedef{bcp47.extension.u}{\csuse{#2@g.bcp47.extension.u}}
- }
- % extension.x (private use area)
- \ifcsundef{#2@g.bcp47.extension.x}{
- \csedef{bcp47.extension.x}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-extension-x } }
- }{
- \csedef{bcp47.extension.x}{\csuse{#2@g.bcp47.extension.x}}
- }
- % casing
- \ifcsundef{#2@g.bcp47.casing}{
- % For casing, we fall back to language if bcp47-casing is not explicitly set
- \cs_set_nopar:cpx {tmpcasing} { \prop_item:Ne \g_xpg_langsetup_prop { #2 / bcp47-casing } }
- \str_if_empty:NTF \tmpcasing
- { \cs_gset_eq:cc {bcp47.casing} {bcp47.language} }
- { \csedef{bcp47.casing}{ \tmpcasing } }
- }{
- \csedef{bcp47.casing}{\csuse{#2@g.bcp47.casing}}
- }
- }{
- \csedef{bcp47.tag}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47 } }
- \csedef{bcp47.language}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-language } }
- \csedef{bcp47.region}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-region } }
- \csedef{bcp47.script}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-script } }
- \csedef{bcp47.variant}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-variant } }
- \csedef{bcp47.extension.t}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-extension-t } }
- \csedef{bcp47.extension.u}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-extension-u } }
- \csedef{bcp47.extension.x}{ \prop_item:Nn{ \g_xpg_langsetup_prop}{ #2 / bcp47-extension-x } }
- % For casing, we fall back to language if bcp47-casing is not explicitly set
- \cs_set_nopar:cpx {tmpcasing} { \prop_item:Ne \g_xpg_langsetup_prop { #2 / bcp47-casing } }
- \str_if_empty:NTF \tmpcasing
- { \cs_gset_eq:cc {bcp47.casing} {bcp47.language} }
- { \csedef{bcp47.casing}{ \tmpcasing } }
- }
-}
-
\cs_new:Nn \__xpg_reset_default_language:nn
{
\xpg_error_if_lang_not_loaded:n{#2}
% disable globalnumbers of previously defined default language
- \csuse{no\xpg@main@language @globalnumbers}
- \csuse{noextras@\xpg@main@language}%
+ \use:c{no\xpg_main_language_tl @globalnumbers}
+ \use:c{noextras@\xpg_main_language_tl}
% This is a hook for external packages which want to access variants
% via babelname (such as biblatex)
- \cs_if_exist_use:c{noextras@bbl@\mainbabelname}%
- \csuse{init@noextras@\xpg@main@language}%
- \polyglossia@set@language@name[#1]{#2}%
- \__xpg_if_LR_str:eF{\prop_item:Ne{\g_xpg_langsetup_prop}{#2/direction}}
+ \cs_if_exist_use:c{noextras@bbl@\mainbabelname}
+ \use:c{init@noextras@\xpg_main_language_tl}
+ \xpg_set_language_name:n { #2 }
+ \__xpg_if_LR_str:eF{\prop_item:Ne{\l_xpg_langsetup_prop}{#2/direction}}
{
\@rlmaintrue\@rl@footnotetrue
}
- \selectlanguage[#1]{#2}%
- \selectbackgroundlanguage{#2}%
- % Store babelname of current language (for external packages such as biblatex)
- \tl_if_blank:nTF {#1}{%
- \ifcsundef{#2@gbabelname}{
- \edef\babelname{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/babelname}}
- }{
- \edef\babelname{\csuse{#2@gbabelname}}
- }
- }{
- \edef\babelname{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/babelname}}
- }
- % Store variant
- \tl_if_blank:nTF {#1}
- {
- \cs_gset_nopar:Npn \mainlanguagevariant {}
- }
- {
- % Register the language options
- \__xpg_set_language_options:nnn {#2} {#1} {@xpg@main@langvariant}
- }
- \csgdef{#2@gvar}{\mainlanguagevariant}
- % Store BCP-47 id of current language
- \__xpg_store_bcp_info:nn {#1}{#2}
+ \selectlanguage[#1]{#2}
+ \selectbackgroundlanguage{#2}
+ \cs_set_nopar:Npe \mainlanguagevariant { \prop_item:Ne \l_xpg_curropt_prop { \xpg_alias_base_lang:n{#2} / variant } }
}
% This saves the normalfont for the latin script since we may change normalfont in other scripts
-\let\normalfontlatin=\normalfont
+\cs_set_eq:cc { normalfontlatin } { normalfont }
% Provide default fonts (as set with \setmainfont, \setsansfont and \setmonofont)
% for Latin scripts and as a fallback for non-Latin scripts.
-\DeclareRobustCommand\xpg@defaultfont@rm{
+\cs_set_protected:Nn \xpg_defaultfont_rm:
+{
\tl_if_empty:NF{\g__fontspec_nfss_enc_tl}{\fontencoding{\g__fontspec_nfss_enc_tl}}
\fontfamily\rmdefault
- \ifdefined\UseHook\UseHook{rmfamily}\fi
+ \hook_use:n { rmfamily }
\selectfont
}
-\DeclareRobustCommand\xpg@defaultfont@sf{
+
+\cs_set_protected:Nn \xpg_defaultfont_sf:
+{
\tl_if_empty:NF{\g__fontspec_nfss_enc_tl}{\fontencoding{\g__fontspec_nfss_enc_tl}}
\fontfamily\sfdefault
- \ifdefined\UseHook\UseHook{sffamily}\fi
+ \hook_use:n { sffamily }
\selectfont
}
-\DeclareRobustCommand\xpg@defaultfont@tt{
+
+\cs_set_protected:Nn \xpg_defaultfont_tt:
+{
\tl_if_empty:NF{\g__fontspec_nfss_enc_tl}{\fontencoding{\g__fontspec_nfss_enc_tl}}
\fontfamily\ttdefault
- \ifdefined\UseHook\UseHook{ttfamily}\fi
+ \hook_use:n { ttfamily }
\selectfont
}
-\def\xpg@patch@fontfamilies{
+\cs_new:Nn \__xpg_patch_fontfamilies:
+{
% This robustifies the redefinitions of \<xx>family (suggestion by Enrico Gregorio)
% e.g. to prevent expansion of the \familytype redefinition in auxiliary files
- \csgappto{rmfamily~}{\def\familytype{rm}}
- \csgappto{sffamily~}{\def\familytype{sf}}
- \csgappto{ttfamily~}{\def\familytype{tt}}
+ \tl_put_right:cn {rmfamily~} {\tl_set:Nn \familytype {rm}}
+ \tl_put_right:cn {sffamily~} {\tl_set:Nn \familytype {sf}}
+ \tl_put_right:cn {ttfamily~} {\tl_set:Nn \familytype {tt}}
}
% These switches activate the default fonts
% Note that a simple \let\rmfamilylatin=\rmfamily
% does not work reliably (see #24)
-\cs_gset_eq:cc{rmfamilylatin}{xpg@defaultfont@rm}
-\cs_gset_eq:cc{sffamilylatin}{xpg@defaultfont@sf}
-\cs_gset_eq:cc{ttfamilylatin}{xpg@defaultfont@tt}
-
-\def\xpg@set@familydefault{
- % We need the \edef route here in order
- % to detect both \renewcommand and \let
- % changes.
- \edef\tempa{\familydefault}
- \edef\tempb{\sfdefault}
- \ifcsequal{tempa}{tempb}
- {\def\familytype{sf}}
- {\edef\tempb{\ttdefault}
- \ifcsequal{tempa}{tempb}
- {\def\familytype{tt}}
- {\def\familytype{rm}}}
- \xpg@patch@fontfamilies
+\cs_set_eq:cc{rmfamilylatin}{xpg_defaultfont_rm:}
+\cs_set_eq:cc{sffamilylatin}{xpg_defaultfont_sf:}
+\cs_set_eq:cc{ttfamilylatin}{xpg_defaultfont_tt:}
+
+\cs_new:Nn \xpg_set_familydefault:
+{
+ \tl_set:Ne \l_tmpa_tl { \familydefault }
+ \tl_set:Ne \l_tmpb_tl { \sfdefault }
+ \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl
+ { \tl_set:Nn \familytype {sf} }
+ { \tl_set_eq:NN \l_tmpb_tl \ttdefault
+ \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl
+ { \tl_set:Nn \familytype {tt} }
+ { \tl_set:Nn \familytype {rm} }
+ }
+ \__xpg_patch_fontfamilies:
% This (re-)saves the normalfont for the latin script since we may
% change normalfont in other scripts
- \let\normalfontlatin=\normalfont
+ \cs_set_eq:cc{ normalfontlatin }{ normalfont }
% And for all cases, we also reset \<xx>familylatin
- \cs_gset_eq:cc{rmfamilylatin}{xpg@defaultfont@rm}
- \cs_gset_eq:cc{sffamilylatin}{xpg@defaultfont@sf}
- \cs_gset_eq:cc{ttfamilylatin}{xpg@defaultfont@tt}
-}
-
-\def\resetfontlatin{
- \DeclareRobustCommand\rmfamily{\xpg@defaultfont@rm}
- \DeclareRobustCommand\sffamily{\xpg@defaultfont@sf}
- \DeclareRobustCommand\ttfamily{\xpg@defaultfont@tt}
- \xpg@patch@fontfamilies
- \global\let\normalfont=\normalfontlatin
-}
-
-\def\selectfontfamilylatin{
- \def\tmp@tt{tt}\def\tmp@sf{sf}
- \ifx\familytype\tmp@tt
- \ttfamilylatin
- \else\ifx\familytype\tmp@sf
- \sffamilylatin
- \else\rmfamilylatin\fi\fi}
-
-\def\xpg@select@fontfamily#1{
- \def\tmp@tt{tt}\def\tmp@sf{sf}
- \ifx\familytype\tmp@tt
- \__xpg_use_or_warn:c{#1@font@tt}
- \else\ifx\familytype\tmp@sf
- \__xpg_use_or_warn:c{#1@font@sf}
- \else\__xpg_use_or_warn:c{#1@font@rm}\fi\fi}
-
-\def\xpg@set@normalfont#1{
- \letcs{\rmfamily}{#1@font@rm}
- \letcs{\sffamily}{#1@font@sf}
- \letcs{\ttfamily}{#1@font@tt}
- \robustify\rmfamily
- \robustify\sffamily
- \robustify\ttfamily
- \gdef\normalfont{\protect\xpg@select@fontfamily{#1}
- \fontseries{\seriesdefault}\selectfont
- \fontshape{\shapedefault}
- \ifdefined\UseHook\UseHook{normalfont}\fi
- \selectfont}
- \gdef\reset@font{\protect\normalfont}
-}
-
-\let\@@fterindentfalse\@afterindentfalse
-\def\french@indent{
- \let\@afterindentfalse\@afterindenttrue
+ \cs_set_eq:cc{ rmfamilylatin }{ xpg_defaultfont_rm: }
+ \cs_set_eq:cc{ sffamilylatin }{ xpg_defaultfont_sf: }
+ \cs_set_eq:cc{ ttfamilylatin }{ xpg_defaultfont_tt: }
+}
+
+\cs_set_nopar:Nn \xpg_select_fontfamily:n
+{
+ \str_if_eq:VnTF \familytype { tt }
+ { \__xpg_use_or_warn:c { #1@font@tt } }
+ { \str_if_eq:VnTF \familytype { sf }
+ { \__xpg_use_or_warn:c { #1@font@sf } }
+ { \__xpg_use_or_warn:c { #1@font@rm } }
+ }
+}
+
+\cs_set_protected:Npn \xpg_select_default_fontfamily:n #1
+ {
+ \tl_set:Ne \l_tmpa_tl { \familydefault }
+ \tl_set:Ne \l_tmpb_tl { \sfdefault }
+ \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl
+ { \tl_set:Nn \familytype {sf} }
+ { \tl_set_eq:NN \l_tmpb_tl \ttdefault
+ \tl_if_eq:NNTF \l_tmpa_tl \l_tmpb_tl
+ { \tl_set:Nn \familytype {tt} }
+ { \tl_set:Nn \familytype {rm} }
+ }
+ \xpg_select_fontfamily:n{#1}
+ }
+
+\cs_new_nopar:Nn \xpg_set_normalfont:n
+{
+ \cs_set_eq:cc { rmfamily } { #1@font@rm }
+ \cs_set_eq:cc { sffamily } { #1@font@sf }
+ \cs_set_eq:cc { ttfamily } { #1@font@tt }
+ \cs_set_nopar:Npn \normalfont
+ { \xpg_select_default_fontfamily:n {#1}
+ \fontseries{\seriesdefault}\selectfont
+ \fontshape{\shapedefault}
+ \hook_use:n { normalfont }
+ \selectfont
+ }
+ \cs_set_nopar:Npn \reset@font {\protect\normalfont}
+}
+
+\cs_gset_eq:cc { @@fterindentfalse } { @afterindentfalse }
+\cs_new_nopar:Nn \__xpg_french_indent:
+{
+ \cs_set_eq:cc { @afterindentfalse } { @afterindenttrue }
\@afterindenttrue
}
-\def\nofrench@indent{
- \let\@afterindentfalse\@@fterindentfalse
+\cs_new_nopar:Nn \__xpg_no_french_indent:
+{
+ \cs_set_eq:cc { @afterindentfalse } { @@fterindentfalse }
\@afterindentfalse
}
@@ -5839,10 +5838,10 @@ to track the issues and follow progress.
\cs_new:Nn \__xpg_select_background_language:n
{
- \str_if_eq:eeTF{\prop_item:Nn{\g_xpg_langsetup_prop}{#1/lcscript}}{latin}
+ \str_if_eq:eeTF { \prop_item:Nn{\l_xpg_langsetup_prop}{#1/lcscript} } { latin }
{}
- {\xpg@set@normalfont{#1}}
- \csuse{#1@globalnumbers}
+ { \xpg_set_normalfont:n{#1} }
+ \use:c{#1@globalnumbers}
}
\cs_generate_variant:Nn \__xpg_select_background_language:n {e}
% Declare secondary language #2 with language options #1
@@ -5853,7 +5852,7 @@ to track the issues and follow progress.
\__xpg_load_lang_definition:ee {#1} {#2}
% define environment and command if not alias
\str_if_eq:eeT {\prop_item:Ne \__xpg_alias {#2/target}} {#2} {
- \use:c{\prop_item:Ne{\g_xpg_langsetup_prop}
+ \use:c{\prop_item:Ne{\l_xpg_langsetup_prop}
{#2/DefineCommandsCmd}}
{#2}
}
@@ -5866,28 +5865,13 @@ to track the issues and follow progress.
\cs_new:Nn \__xpg_set_otherlanguage:nn
{
\__xpg_register_language:nn{#1}{#2}
- % If a variant is set, store it.
- \gdef\otherlanguagevariant{}
- % Register the language options
- \__xpg_set_language_options:nnn {#2} {#1} {@xpg@other@langvariant}
-
- \csgdef{#2@gvar}{\otherlanguagevariant}
- \prop_get:NeNT \g_xpg_langsetup_prop {#2/babelname} \l_tmpa_tl
- { \xdef\otherlanguagebabelname{\l_tmpa_tl} }
- \cs_gset_eq:cc{#2@gbabelname}{otherlanguagebabelname}
}
\cs_generate_variant:Nn \__xpg_set_otherlanguage:nn { ee }
-
-% Store main language variant for external packages
-\define@key{xpg@other@langvariant}{variant}{
- \gdef\otherlanguagevariant{#1}
-}
-
\NewDocumentCommand \setotherlanguages { m }
- {
+{
\clist_map_function:eN { #1 } \setotherlanguage
- }
+}
\cs_set:Nn \xpg_common_language:
{% FIXME is this really needed???
@@ -5910,7 +5894,8 @@ to track the issues and follow progress.
% for specific (esp. tag-based) aliases
% where \text<alias> would cause clashes
% (e.g., \textit)
-\newcommand\textlang[3][]{
+\NewDocumentCommand \textlang { O{} m +m }
+{
\__xpg_textlanguage:een {#1} {#2} {#3}
}
@@ -5919,45 +5904,20 @@ to track the issues and follow progress.
% inside case changing commands (e.g. \MakeUppercase)
\tl_put_right:Nn \l_text_case_exclude_arg_tl { \textlang }
-% Alias to {<lang>}, but more suitable
-% for specific (esp. tag-based) aliases
-% where {<alias>} would cause clashes
-% (e.g., \fi)
-\DeclareEnvironmentCopy { lang } { otherlanguage }
-
% wrapper for foreignlanguage and otherlanguage*
-\newcommand*\polyglossia@setforeignlanguage[2][]{
- \select@@language[#1]{#2}
+\cs_new_nopar:Nn \xpg_set_foreign_language:nn
+{
+ \xpg_select_language:nn { #1 } { #2 }
\__xpg_register_language:nn{#1}{#2}
- % Store babelname of current language (for external packages such as biblatex)
- \tl_if_blank:nTF {#1}{
- \ifcsundef{#2@gbabelname}{
- \edef\babelname{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/babelname}}
- }{
- \edef\babelname{\csuse{#2@gbabelname}}
- }
- }{
- \edef\babelname{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/babelname}}
- }
- % Store BCP-47 id of current language
- \__xpg_store_bcp_info:nn {#1}{#2}
-}
-
-% Expandable lowercasing. We use this to assure keyval
-% options are lowercased (also when used in \MakeUppercase
-% contexts e.g. in headings)
-% Macro adapted from tudscr.sty
-\newcommand*\xpg@str@lowercase[2]{
- \protected@edef#1{
- \lowercase{\def\noexpand#1{#2}}
- }#1
}
% lowercase options before passing to setkeys
-\cs_new:Nn \__xpg_set_keys:nn
+\NewDocumentCommand \SetGlossOptions { m m }
{
- \xpg@str@lowercase{\xpg@tmp@opts}{#2}
- \exp_args:Nne \setkeys{#1}{\xpg@tmp@opts}
+ % \text_lowercase:n fully expands
+ % (as opposed to \str_lowercase:n)
+ \use:c { xpg_#1_default_options_tl }
+ \exp_args:Ne \keys_set:ne{ polyglossia / gloss / #1 }{ \text_lowercase:n {#2} }
}
% joint code of \foreignlanguage, otherlanguage*
@@ -5967,54 +5927,30 @@ to track the issues and follow progress.
\cs_new:Nn \xpg_otherlanguage:nn
{
\xpg_error_if_lang_not_loaded:n{#2}
- \__xpg_set_keys:nn{#2}{#1}
- \polyglossia@setforeignlanguage[#1]{#2}
+ \SetGlossOptions{#2}{#1}
+ \xpg_set_foreign_language:nn { #1 } { #2 }
% Hook for external packages such as biblatex
\polyglossia@language@switched
% buggy restoration heure
- \csuse{inlineextras@#2}
+ \use:c{inlineextras@#2}
% This is a hook for external packages which want to access variants
% via babelname (such as biblatex)
\cs_if_exist_use:c{inlineextras@bbl@\babelname}
}
\DeclareDocumentCommand { \foreignlanguage } { O{} m +m }
- {
+{
\__xpg_foreignlanguage:eeen {#1} {#2} {\xpg_alias_base_lang:n{#2}} {#3}
- }
+}
% prevent case changing of language name in \foreignlanguage
\tl_put_right:Nn \l_text_case_exclude_arg_tl { \foreignlanguage }
-% Direct access to polyglossia@setforeignlanguage
+% Direct access to \xpg_set_foreign_language:nn
% used in captions
-\newcommand{\setforeignlanguage}[2][]
+\NewDocumentCommand \setforeignlanguage { O{} m }
{
- \polyglossia@setforeignlanguage[#1]{#2}
-}
-
-% Stack to store matrix languages
-\seq_new:N \__xpg_current_matrixlang_stack
-
-% Store embedding language when an embedded language is switched to
-\cs_new_nopar:Nn \__xpg_store_matrixlang:
-{
- \seq_gput_left:Nn \__xpg_current_matrixlang_stack \languagename
-}
-
-% When an embedded language is closed, reset to the embedding language
-% and remove stored matrix language from stack
-\cs_new_nopar:Nn \__xpg_reset_to_matrixlang:
-{
- % if stack is empty, use main language
- \seq_gpop_left:NNTF \__xpg_current_matrixlang_stack \l_tmpa_tl
- { \cs_set_eq:NN \__xpg_current_matrixlang \l_tmpa_tl }
- { \cs_set_eq:NN \__xpg_current_matrixlang \mainlanguagename }
- % Reset the language's/script's font families if the embedding script is latin
- \str_if_eq:eeT{\prop_item:Ne{\g_xpg_langsetup_prop}{\__xpg_current_matrixlang/lcscript}}{latin}
- {\resetfontlatin}
- % In case a \<lang>font is defined, re-activate that
- \exp_args:Ne \xpg@set@normalfont{\__xpg_current_matrixlang}
+ \xpg_set_foreign_language:nn { #1 } { #2 }
}
% internal wrapper for foreign language
@@ -6028,12 +5964,10 @@ to track the issues and follow progress.
{
\msg_show:nnn { polyglossia } { languagenotloaded } {#2}
}{
- \__xpg_store_matrixlang:
\group_begin:
\xpg_otherlanguage:nn{ \xpg_alias_add_to_option_i:nn{#2}{#1} }{ #3 }
\__xpg_lang_set_text_direction:nn{#3}{#4}
\group_end:
- \__xpg_reset_to_matrixlang:
}
}
\cs_generate_variant:Nn \__xpg_foreignlanguage:nnnn {eeen}
@@ -6042,11 +5976,9 @@ to track the issues and follow progress.
% otherlanguage* is the environment equivalent of \foreignlanguage
\DeclareDocumentEnvironment { otherlanguage* } { O{} m }
{
- \__xpg_store_matrixlang:
\__xpg_otherlanguage:eee { #1 } { #2 } { \xpg_alias_base_lang:n { #2 } }
}{
- \egroup% \group_end: does not work here!
- \__xpg_reset_to_matrixlang:
+ \c_group_end_token% \group_end: does not work here!
}
% internal wrapper
@@ -6061,7 +5993,7 @@ to track the issues and follow progress.
}{
\xpg_otherlanguage:nn{ \xpg_alias_add_to_option_i:nn{#2}{#1} }{ #3 }
\__xpg_lang_set_text_direction:nn{#3}%
- \bgroup% \group_begin: does not work here!
+ \c_group_begin_token% \group_begin: does not work here!
}
}
\cs_generate_variant:Nn \__xpg_otherlanguage:nnn { eee }
@@ -6077,9 +6009,6 @@ to track the issues and follow progress.
}
\cs_generate_variant:Nn \__xpg_textlanguage:nnn {een}
-% Track whether we are in an inline lang (\text...) switch
-\bool_new:N \l__xpg_inline_lang_bool
-
% use by \text<lang> and \textlang. Equivalent to \foreignlanguage,
% except that dates are localized.
% #1: option
@@ -6093,41 +6022,43 @@ to track the issues and follow progress.
\msg_show:nnn { polyglossia } { languagenotloaded } {#2}
}
{
- \__xpg_store_matrixlang:
\group_begin:
- \bool_set_true:N \l__xpg_inline_lang_bool
\xpg_otherlanguage:nn{#1}{#3}
- \csuse{date#3}
+ \use:c{date#3}
% This is a hook for external packages which want to access variants
% via babelname (such as biblatex)
\cs_if_exist_use:c{date@bbl@\babelname}
\__xpg_lang_set_text_direction:nn{#3}{#4}
\group_end:
- \__xpg_reset_to_matrixlang:
}
}
\cs_generate_variant:Nn \__xpg_textlanguage:nnnn {nnen}
% Define language-specific hyphenation exceptions
-\newcommand\pghyphenation[3][]{
- \bgroup
- \xpg_error_if_lang_not_loaded:n{#2}
- \setkeys{#2}{#1}
- \select@@language[#1]{#2}
+\NewDocumentCommand \pghyphenation {O{} m m}
+{
+ \c_group_begin_token
+ \xpg_error_if_lang_not_loaded:n { #2 }
+ \SetGlossOptions{#2}{#1}
+ \xpg_select_language:nn { #1 } { #2 }
\hyphenation{#3}
- \egroup
+ \c_group_end_token
}
% Hook that other package authors can use
% (for instance biblatex):
% Do not rename!
-\newcommand*{\xpg@hook@setlanguage}{}
+\cs_set_nopar:Npn \xpg@hook@setlanguage {}
-\def\xpg@pop@language@i#1#2{
- \xpg@set@language@aux[#1]{#2}
+\cs_set_nopar:Nn \__xpg_pop_language:nn
+{
+ \xpg_set_language_aux:nn { #1 } { #2 }
\xpg@hook@setlanguage
- \let\emp@langname\@undefined}
+% FIXME This seems to be a very old relict.
+% The macro is nowhere used. Probably remove.
+% \let\emp@langname\@undefined
+}
\DeclareDocumentCommand \selectlanguage {s O{} m}
{
@@ -6146,131 +6077,124 @@ to track the issues and follow progress.
\cs_new:Nn \__xpg_select_language:nnn
{
% Register the language options
- \__xpg_set_language_options:nnn {#3} {#2} {@xpg@set@langvariant}
+ \__xpg_set_language_options:nn {#3} {#2}
\IfBooleanTF { #1 } % The starred variant does not write to the aux
{
- \xpg@set@language@nonaux[#2]{#3}
+ \xpg_set_language_nonaux:nn { #2 } { #3 }
}{
- \cs_set_nopar:Npe \xpg@pop@language { \exp_not:N \xpg@pop@language@i {#2} {#3} }
- \group_insert_after:N \xpg@pop@language
- \xpg@set@language@aux[#2]{#3}
+ \cs_set_nopar:Ne \xpg_pop_language: { \exp_not:N \__xpg_pop_language:nn { #2 } { #3 } }
+ \group_insert_after:N \xpg_pop_language:
+ \xpg_set_language_aux:nn { #2 } { #3 }
}
- \__xpg_register_language:nn{#2}{#3}
+ \__xpg_register_language:nn { #2 } { #3 }
}
\cs_generate_variant:Nn \__xpg_select_language:nnn { nee, nne }
-
% set lang option #2 for lang #1
-\cs_new:Nn \__xpg_set_language_options:nnn
+\cs_new:Nn \__xpg_set_language_options:nn
{
- \tl_if_blank:nF {#2}
+ \cs_if_exist:cT { xpg_#1_default_options_prop }
{
- % If the optional argument sets a value for the key “variant”, copy it to xpg@langvariant
- \clist_map_inline:nn { #2 } {
- \xpg@parsevariantkeyvalue##1=#3:#1\relax
- }%
- \__xpg_set_keys:nn{#1}{#2}
+ \prop_concat:ccc { l_xpg_curropt_prop } { l_xpg_curropt_prop }
+ { xpg_#1_default_options_prop }
}
+ \xpg__keyval_parser:eeN { #2 } { #1 } \l_xpg_curropt_prop
+ \SetGlossOptions{#1}{#2}
}
% Initialize default language options, so that
% \iflanguageoption has the info it needs also
% for default settings
-\newcommand*\xpg@initialize@gloss@options[2]{
- \__xpg_set_language_options:nnn {#1} {#2} {@xpg@set@langvariant}
-}
+\NewDocumentCommand \InitializeGlossOptions { m m }
+{
+ \tl_new:c { xpg_#1_default_options_tl }
+ \prop_new:c { xpg_#1_default_options_prop }
+ \keys_precompile:nec { polyglossia / gloss / #1 }
+ { \text_lowercase:n { #2, \xpg__tmp_default_options_tl } }
+ { xpg_#1_default_options_tl }
+ \xpg__keyval_parser:enc { #2, \xpg__tmp_default_options_tl } { #1 }
+ { xpg_#1_default_options_prop }
+ \prop_concat:ccc { l_xpg_curropt_prop } { l_xpg_curropt_prop }
+ { xpg_#1_default_options_prop }
+ \use:c { xpg_#1_default_options_tl }
+ \__xpg_set_language_options:nn {#1} {#2}
+}
+\tl_new:N \xpg__tmp_default_options_tl
+\cs_generate_variant:Nn \keys_precompile:nnN { nec }
% Record synonymous keyvals such as variant=us and variant=american
-% Syntax: \xpg@set@alias@values{<lang>}{<key>}{<val>}{<alias vals, comma-separated>}
-\newcommand*\xpg@set@alias@values[4]{%
- \prop_if_exist:cF { xpg@alias@keyvals@#1@#3 }
- { \prop_new:c {xpg@alias@keyvals@#1@#3} }
- \prop_put:cnn { xpg@alias@keyvals@#1@#3 }
- {#2}{#4}
- \prop_if_exist:cF { xpg@alias@keyvals@#1@#4 }
- { \prop_new:c {xpg@alias@keyvals@#1@#4} }
- \prop_put:cnn { xpg@alias@keyvals@#1@#4 }
- {#2}{#3}
-}
-
-% Patch xkeyval to record default values of keys
-\pretocmd{\XKV@define@default}{%
- \csgdef{xpg@default@opt@\XKV@header #1}{#2}
-}{}{\xpg@warning{Patching xkeyval failed!}}
-
-% Helper to get and register option keyvals
-\def\xpg@parsevariantkeyvalue#1=#2@#3:#4\relax{
- \def\@tmpa{#1}
- \def\@tmpb{variant}
- % variant values are stored in specific macros
- % (\xpg@main@langvariant, \xpg@other@langvariant
- % and \xpg@set@langvariant)
- \ifx\@tmpa\@tmpb\setkeys{#3}{#1=#2}\fi
- \tl_if_empty:nTF{#2}
- {
- \ifcsdef{xpg@default@opt@KV@#4@#1}
- {\xpg@store@opt@keyval#1:\csuse{xpg@default@opt@KV@#4@#1}=:#4\relax}
- {}%
- }
- { \xpg@store@opt@keyval#1:#2:#4\relax }
-}%
-
-% Store option keys and values
-% This strips trailing '=' from values.
-\def\xpg@store@opt@keyval#1:#2=:#3\relax{
- \prop_if_exist:cF { xpg@current@options@#3 }
- { \prop_new:c {xpg@current@options@#3} }
- \prop_put:cnn { xpg@current@options@#3 }
- {#1}{#2}
+% Syntax: \SetLanguageAliasValues{<lang>}{<key>}{<alias vals, comma-separated>}
+\int_new:N \l_xpg_alias_keyvals_int
+\int_set:Nn \l_xpg_alias_keyvals_int { 2 }
+\NewDocumentCommand \SetLanguageAliasValues { m m m }
+{
+ \clist_map_inline:nn { #3 }
+ {
+ \int_const:cn { c_xpg_alias_keyvals_#1_#2_##1_int } { \l_xpg_alias_keyvals_int }
+ }
+ \int_incr:N \l_xpg_alias_keyvals_int
}
+\cs_new:Npn \xpg__keyval_parser:nnN #1 #2 #3 % #1 = key-vals, #2 = language, #3 = prop
+ {
+ \keyval_parse:nnn
+ { \xpg__keyval_parser_default:nnn { #2 } { #3 } }
+ { \xpg__keyval_parser_nondefault:nnnn { #2 } { #3 } }
+ { #1 }
+ }
+\cs_generate_variant:Nn \xpg__keyval_parser:nnN { eeN, enc }
+
+\cs_new:Npn \xpg__keyval_parser_default:nnn #1 #2 #3 % #1 = lang, #2 = prop, #3 = key
+ {
+ \str_set:Nn \l_tempa_str { #1 / #3 }
+ \str_concat:NNN \l_tempa_str \c__keys_default_root_str \l_tempa_str
+ \prop_put:Nne #2 { #1 / #3 } { \use:c { \l_tempa_str } }
+ }
+
+\cs_new:Npn \xpg__keyval_parser_nondefault:nnnn #1 #2 #3 #4 % #1 = lang, #2 = prop, #3 = key, #4 = value
+ {
+ \prop_put:Nnn #2 { #1 / #3 } { #4 }
+ }
\prg_set_conditional:Npnn \__xpg_check_option_value:NNN #1#2#3 { p , T , F , TF }
-{
- \prop_get:cnNTF {xpg@current@options@#1} {#2} \l_tmpa_tl
- {
- \str_if_eq:eeTF{\l_tmpa_tl}{#3}
- {\prg_return_true:}
+ {
+ \bool_lazy_or:nnTF
+ {
+ \str_if_eq_p:ee { \prop_item:Nn \l_xpg_curropt_prop { #1 / #2 } } { #3 }
+ } {
+ \int_compare_p:nNn
{
- \prop_get:cnNTF {xpg@alias@keyvals@#1@#3} {#2} \l_tmpb_tl
- {
- \clist_set:Ne{\l_tmpa_clist}{\l_tmpb_tl}
- \providetoggle{xpgvalfound}
- \togglefalse{xpgvalfound}
- \clist_map_inline:Nn \l_tmpa_clist {
- \str_if_eq:eeT{##1}{\l_tmpa_tl}
- { \toggletrue{xpgvalfound} }
- }
- \iftoggle{xpgvalfound}{\prg_return_true:}{\prg_return_false:}
- }
- {
- \prg_return_false:
- }
- }
- }
- {
- \prg_return_false:
- }
+ \cs_if_exist_use:cF { c_xpg_alias_keyvals_#1_#2_#3_int } { 0 }
+ } = {
+ \cs_if_exist_use:cF { c_xpg_alias_keyvals_#1_#2_\prop_item:Nn \l_xpg_curropt_prop { #1 / #2 }_int } { 1 }
+ }
+ } { \prg_return_true: } { \prg_return_false: }
+ }
+
+\prg_set_conditional:Npnn \xpg_if_main_language:n #1 { T, F, TF }
+{
+ \str_if_eq:VnTF \xpg_main_language_tl { #1 }
+ { \prg_return_true: }
+ { \prg_return_false: }
}
+\cs_set_eq:NN \IfMainLanguageTF \xpg_if_main_language:nTF
+
+\cs_set_eq:NN \IfMainLanguageT \xpg_if_main_language:nT
+
+\cs_set_eq:NN \IfMainLanguageF \xpg_if_main_language:nF
+
% Test if option value is set
\DeclareDocumentCommand \iflanguageoption { m m m m m }
{
\__xpg_check_option_value:NNNTF{#1}{#2}{#3}{#4}{#5}
}
-
-% Append any variant to csv list of variants
-\define@key{xpg@langvariant}{variant}{
- \clist_if_in:NeF \xpg@vloaded {#1}{
- \clist_gput_right:Ne \xpg@vloaded {#1}
- }
-}
-
% Test if language is loaded
\DeclareDocumentCommand \iflanguageloaded { m m m }
{
- \AddToHook{begindocument/end}{
+ \hook_gput_code:nnn {begindocument/end} {.}
+ {
\clist_if_in:NeTF \xpg@loaded{#1}{#2}{#3}
}
}
@@ -6278,7 +6202,8 @@ to track the issues and follow progress.
% Same for babellanguage is loaded
\DeclareDocumentCommand \ifbabellanguageloaded { m m m }
{
- \AddToHook{begindocument/end}{
+ \hook_gput_code:nnn {begindocument/end} {.}
+ {
\clist_if_in:NeTF \xpg@bloaded{#1}{#2}{#3}
}
}
@@ -6286,7 +6211,8 @@ to track the issues and follow progress.
% Same for languageid
\DeclareDocumentCommand \iflanguageidloaded { m m m m }
{
- \AddToHook{begindocument/end}{
+ \hook_gput_code:nnn {begindocument/end} {.}
+ {
\str_case:nnTF {#1}
{
{bcp-47} { \clist_if_in:NeTF \xpg@bcp@loaded{#2}{#3}{#4} }
@@ -6294,7 +6220,7 @@ to track the issues and follow progress.
}
{}
{
- \xpg@error{Invalid~ \string\iflanguageidloaded\space argument:~ #1}
+ \xpg_ill_arg_msg:nn { #1 } { \iflanguageidloaded }
}
}%
}
@@ -6324,53 +6250,46 @@ to track the issues and follow progress.
}
-\newcommand*{\xpg@set@language@nonaux}[2][]{
- \@select@language[#1]{#2}
+\cs_new_nopar:Nn \xpg_set_language_nonaux:nn
+{
+ \__xpg_start_language:nn { #1 } { #2 }
}
-\newcommand*{\xpg@set@language@aux}[2][]{
- % Store babelname of current language (for external packages such as biblatex)
- \tl_if_blank:nTF {#1}{
- \ifcsundef{#2@gbabelname}{
- \edef\babelname{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/babelname}}
- }{
- \edef\babelname{\csuse{#2@gbabelname}}
- }
- }{
- \edef\babelname{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/babelname}}
- }
- % Store BCP-47 id of current language
- \__xpg_store_bcp_info:nn {#1}{#2}
- \@select@language[#1]{#2}
+\cs_new_nopar:Nn \xpg_set_language_aux:nn
+{
+ \__xpg_start_language:nn { #1 } { #2 }
% Write to the aux
- \xpg@set@language@only@aux[#1]{#2}
+ \xpg_set_language_only_aux:nn { #1 } { #2 }
}
-\newcommand*{\xpg@set@language@only@aux}[2][]{
+\cs_new_nopar:Nn \xpg_set_language_only_aux:nn
+{
% Write to the aux (toc files)
\if@filesw
\addtocontents{toc}{\selectlanguage*[#1]{#2}}
\fi
}
-\AtBeginDocument{
+\hook_gput_code:nnn {begindocument} {.}
+{
\if@filesw
- \immediate\write\@mainaux
- {\ProvideDocumentCommand\selectlanguage{sO{}m}{}}
+ \immediate\write\@mainaux
+ {\ProvideDocumentCommand\selectlanguage{sO{}m}{}}
\fi
}
% Since captions might float to other language regions,
% we need to change the language here (#542)
-\AddToHook{cmd/caption/before}{
+\hook_gput_code:nnn {cmd/caption/before} {.}
+{
\ifhmode\unskip\fi
\addtocontents{lof}{\protect\setforeignlanguage{\languagename}}
\addtocontents{lot}{\protect\setforeignlanguage{\languagename}}
}
% check if language is defined
-\prg_set_conditional:Npnn \__xpg_check_if_exist_l@:n #1 { F, TF }
+\prg_set_conditional:Npnn \__xpg_pattern_check_if_exists:n #1 { F, TF }
{
\bool_lazy_and:nnTF
{ \cs_if_exist_p:c { l@#1 } }
@@ -6379,82 +6298,125 @@ to track the issues and follow progress.
{ \prg_return_false: }
}
-\def\polyglossia@luatex@load@lang#1{
+\cs_new_nopar:Nn \__xpg_luatex_load_lang:n
+{
% if \l@#1 is not properly defined, call lua function newloader(#1),
% and assign the returned number to \l@#1
- \__xpg_check_if_exist_l@:nF {#1}
+ \__xpg_pattern_check_if_exists:nF {#1}
{
\directlua { token.set_char('l@#1', polyglossia.newloader'#1') }
}
}
-% This check is also used by biblatex, so don't
-% rename silently.
-\newcommand\xpg@ifdefined[3]{
+% check if language is defined
+\prg_set_conditional:Npnn \xpg_if_language_defined:n #1 { T, F, TF }
+{
% With luatex, we first need to define \l@#1.
\sys_if_engine_luatex:T
{
- \polyglossia@luatex@load@lang{#1}
+ \__xpg_luatex_load_lang:n {#1}
}
- \__xpg_check_if_exist_l@:nTF{#1}{#2}{#3}
+ \__xpg_pattern_check_if_exists:nTF{#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
}
+% Aliases for gloss files
+\cs_gset_eq:cc { IfLanguageDefinedTF } { xpg_if_language_defined:nTF }
+\cs_gset_eq:cc { IfLanguageDefinedT } { xpg_if_language_defined:nT }
+\cs_gset_eq:cc { IfLanguageDefinedF } { xpg_if_language_defined:nF }
+
+% Check if patterns for language #1 is defined. If not, try
+% the comma-separated list of fallbacks in #2
+\NewDocumentCommand \TryPatternWithFallback { m m }
+{
+ \xpg_if_language_defined:nF { #1 }
+ {
+ \clist_clear_new:N \l_xpg_lang_patterns
+ \clist_set:Ne \l_xpg_lang_patterns { #2 }
+ \bool_set_false:N \l_tmpa_bool
+ \clist_map_inline:Nn \l_xpg_lang_patterns
+ {
+ \xpg_if_language_defined:nT { ##1 }
+ {
+ \cs_gset_eq:cc { l@#1 } { l@##1 }
+ \bool_set_true:N \l_tmpa_bool
+ \clist_map_break:
+ }
+ }
+ \bool_if:NF \l_tmpa_bool
+ {
+ \xpg_warning_msg:n
+ {No~ hyphenation~ patterns~ for~ #1~ found \iow_newline:
+ Falling~ back~ to~ the~ default~ patterns~ (=~English)!}
+ \exp_args:Nc \adddialect {l@#1} 0
+ }
+ }
+}
+
+% This old term is used by biblatex, so don't drop!
+\cs_gset_eq:cc { xpg@ifdefined } { xpg_if_language_defined:nTF }
+
% Set \bbl@hyphendata@\the\language, which is (lua)babel's
% hyphenation pattern hook
% FIXME Clarifiy why/when this is needed.
-\newcommand*\xpg@set@bbl@hyphendata[1]{
+\cs_new:Nn \xpg_set_bbl_hyphendata:n
+{
\sys_if_engine_luatex:T
{
- \ifcsdef{bbl@hyphendata@#1}{}{
- \global\@namedef{bbl@hyphendata@\the\language}{}
+ \cs_if_exist:cF {bbl@hyphendata@#1}
+ {
+ \cs_gset:cpn {bbl@hyphendata@\the\language} {}
}
}
}
% Set hyphenation patterns for a given language. This does the right
% thing both for XeTeX and LuaTeX
-\newcommand*\xpg@set@hyphenation@patterns[1]{
- \sys_if_engine_luatex:T { \polyglossia@luatex@load@lang{#1} }
+\cs_new:Nn \xpg_set_hyphenation_patterns:n
+{
+ \sys_if_engine_luatex:T { \__xpg_luatex_load_lang:n {#1} }
\language=\csname l@#1\endcsname
}
-\newcommand*\@select@language[2][]{
+\cs_new:Nn \__xpg_start_language:nn
+{
% hook for compatibility with biblatex
- \select@language{#2}
- \xpg@set@bbl@hyphendata{\the\language}
+ \select@language { #2 }
+ \xpg_set_bbl_hyphendata:n {\the\language}
\xpg_initial_setup:
- \select@@language[#1]{#2}%
+ \xpg_select_language:nn { #1 } { #2 }
% Hook for external packages such as biblatex
- \polyglossia@language@switched%
- \__xpg_lang_set_par_direction:n{#2}
- \csuse{captions#2}%
- \csuse{date#2}%
+ \polyglossia@language@switched
+ \__xpg_lang_set_par_direction:n {#2}
+ \use:c {captions#2}
+ \use:c {date#2}
% These are hooks for external packages which want to access variants
% via babelname (such as biblatex)
- \cs_if_exist_use:c{captions@bbl@\babelname}
- \cs_if_exist_use:c{date@bbl@\babelname}
- \__xpg_local_marks:n{#2}
- \csuse{init@extras@#2}%
+ \cs_if_exist_use:c {captions@bbl@\babelname}
+ \cs_if_exist_use:c {date@bbl@\babelname}
+ \__xpg_local_marks:n {#2}
+ \use:c {init@extras@#2}
\__xpg_indent_first:n { #2 }
- \csuse{blockextras@#2}%
+ \cs_if_exist_use:c {blockextras@#2}
% This is a hook for external packages which want to access variants
% via babelname (such as biblatex)
- \cs_if_exist_use:c{blockextras@bbl@\babelname}
- }
+ \cs_if_exist_use:c {blockextras@bbl@\babelname}
+}
% hook for compatibility with biblatex
% (probably no longer used due to the
% more general hook that follows, but
% we keep it for backwards comp.)
-\def\select@language#1{}
+\cs_set:Npn \select@language #1 {}
% Hook for external packages such as biblatex
% do not rename!
-\def\polyglossia@language@switched{}
+\cs_new:Npn \polyglossia@language@switched {}
-% remove all custumization for language #1
+% remove all customization for language #1
\cs_new:Npn \noextrascurrent #1
-{%
+{
\cs_if_exist_use:c{noextras@#1}%
% This is a hook for external packages which want to access variants
% via babelname (such as biblatex)
@@ -6462,160 +6424,105 @@ to track the issues and follow progress.
}
% Common code for `\select@language' and `\foreignlanguage'.
-\newcommand{\select@@language}[2][]{%
+\cs_new:Nn \xpg_select_language:nn
+{
% disable the extras and number settings of the previous language
\cs_if_exist:cT{languagename}
{
\noextrascurrent{\languagename}
\cs_if_exist_use:c{no\languagename @numbers}
\sys_if_engine_xetex:T{
- \__xpg_if_LR_str:eTF{\prop_item:Ne{\g_xpg_langsetup_prop}{\languagename/direction}}
+ \__xpg_if_LR_str:eTF{\prop_item:Ne{\l_xpg_langsetup_prop}{\languagename/direction}}
{
- \__xpg_if_LR_str:eF{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/direction}}
+ \__xpg_if_LR_str:eF{\prop_item:Nn{\l_xpg_langsetup_prop}{#2/direction}}
{\setnonlatin} % LTR -> RTL
}
{
- \__xpg_if_LR_str:eT{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/direction}}
+ \__xpg_if_LR_str:eT{\prop_item:Nn{\l_xpg_langsetup_prop}{#2/direction}}
{\setlatin} % RTL -> LTR
}
}
}
- \polyglossia@set@language@name[#1]{#2}
- % Set the language's/script's font families
- \str_if_eq:eeT{\prop_item:Nn{\g_xpg_langsetup_prop}{#2/lcscript}} {latin}
- {
- \resetfontlatin
- }
- \bool_if:NF \l__xpg_inline_lang_bool
- { % This for non-inline font switches
- % in case a \<lang>font is defined
- \xpg@set@normalfont{#2}
- }
- \xpg@select@fontfamily{#2}
+ \xpg_set_language_name:n { #2 }
+ \xpg_set_normalfont:n { #2 }
+ \xpg_select_fontfamily:n { #2 }
\__xpg_use_or_warn:c{#2@language}
\cs_if_exist_use:c{#2@numbers}
- \use@localhyphenmins[#1]{#2}
+ \__xpg_use_localhyphenmins:nn { #1 } { #2 }
\__xpg_french_spacing:n { #2 }
}
-\let\xpg@pop@language\relax
+\cs_undefine:N \xpg_pop_language:
-%
-% Keep track of the active (nested) languages and options
-%
-\clist_new:N \l_xpg_lang_stack
-
-\cs_new:Nn \__xpg_stack_language:nn
-{
- \clist_gpush:Nn \l_xpg_lang_stack {#1:#2}
-}
+\DeclareDocumentEnvironment { otherlanguage } { O{} m }
+ {
+ \selectlanguage[#1]{#2}
+ } { }
-\cs_generate_variant:Nn \__xpg_stack_language:nn {nx}
+% Alias to {<lang>}, but more suitable
+% for specific (esp. tag-based) aliases
+% where {<alias>} would cause clashes
+% (e.g., \fi)
+\DeclareEnvironmentCopy { lang } { otherlanguage }
-\cs_new:Nn \__xpg_unstack_language:n
+\NewDocumentCommand \setlocalhyphenmins { m m m }
{
- \clist_gpop:NNTF \l_xpg_lang_stack \l_tmpa_tl {
- % Stored format = options:language => split:
- \seq_set_split:Nne \l_tmpa_seq {:} \l_tmpa_tl
- \seq_get_left:NN \l_tmpa_seq \l_tmpb_tl
- \seq_get_right:NN \l_tmpa_seq \l_tmpc_tl
- % Execute passed command with language and maybe options
- % and re-set stored language's keys
- \tl_if_empty:NTF \l_tmpb_tl {\cs_if_exist_use:c{#1}{\l_tmpc_tl}}
- {\__xpg_set_keys:nn{\l_tmpc_tl}{\l_tmpb_tl}
- \cs_if_exist_use:c{#1}[\l_tmpb_tl]{\l_tmpc_tl}
- }
- }
- {}
-}
-
-\DeclareDocumentEnvironment { otherlanguage } { O{} m }
- {
- % Get real current (pre-switch) options (incl. defaults)
- \clist_clear_new:N \l_xpg_current_options
- \prop_if_exist:cF { xpg@current@options@\languagename }
- { \prop_new:c {xpg@current@options@\languagename} }
- \prop_map_inline:cn {xpg@current@options@\languagename}
+ \xpg_if_language_defined:nTF{#1}
+ {
+ \cs_if_eq:ccTF { l@#1 } { l@nohyphenation }
{
- \clist_put_right:Nn \l_xpg_current_options {##1=##2}
+ \xpg_warning_msg:n {\string\setlocalhyphenmin\space~ useless~ for~ unhyphenated~ language~ #1}
+ }{
+ \providehyphenmins{#1}{#2#3}
}
- % Store current (pre-switch) options and language on stack
- \__xpg_stack_language:nx{\clist_use:Nn \l_xpg_current_options {,}}{\languagename}
- \selectlanguage[#1]{#2}
- }
- {
- % restore previous language in aux file and remove closed one from stack
- \__xpg_unstack_language:n{xpg@set@language@only@aux}
- }
-
-\newcommand{\setlocalhyphenmins}[3]{
- \xpg@ifdefined{#1}{
- \expandafter\ifx\csname l@#1\endcsname\l@nohyphenation
- \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unhyphenated~ language~ #1}
- \else
- \providehyphenmins{#1}{#2#3}
- \fi
}{
- \xpg@warning{\string\setlocalhyphenmin\space~ useless~ for~ unknown~ language~ #1}
+ \xpg_warning_msg:n {\string\setlocalhyphenmin\space~ useless~ for~ unknown~ language~ #1}
}
}
% \setlanghyphenmins[options]{lang}{l}{r}
-\newcommand*\setlanghyphenmins[4][]{%
+\NewDocumentCommand \setlanghyphenmins { O{} m m m }
+{
% Check for real language name and options
- \edef\xpg@tmp@opts{\xpg_alias_add_to_option_i:nn{#2}{#1}}
- \edef\xpg@tmp@lang{\xpg_alias_base_lang:n{#2}}
- \bgroup
- \xpg_error_if_lang_not_loaded:n{\xpg@tmp@lang}
- \__xpg_set_keys:nn{\xpg@tmp@lang}{\xpg@tmp@opts}
+ \tl_set:Nx \l_tmp_opts_tl { \xpg_alias_add_to_option_i:nn{#2}{#1} }
+ \tl_set:Nx \l_tmp_lang_tl { \xpg_alias_base_lang:n{#2} }
+ \c_group_begin_token
+ \xpg_error_if_lang_not_loaded:n{\l_tmp_lang_tl}
+ \SetGlossOptions{\l_tmp_lang_tl}{ \l_tmp_opts_tl }
% Store bcp47.tag@hypenmins
- \tl_if_blank:nTF {\xpg@tmp@opts}{%
- \ifcsundef{\csname xpg@tmp@lang\endcsname @g.bcp47.tag}{
- \csedef{tmp@bcp47.tag}{\prop_item:Ne{\g_xpg_langsetup_prop}{ \xpg@tmp@lang / bcp47 }}
- }{
- \csedef{tmp@bcp47.tag}{\csuse{#2@g.bcp47.tag}}
- }
- }{
- \csedef{tmp@bcp47.tag}{\prop_item:Ne{\g_xpg_langsetup_prop}{ \xpg@tmp@lang / bcp47 }}
- }
- \csgdef{\csname tmp@bcp47.tag\endcsname @hyphenmins}{{#3}{#4}}
- \egroup
+ \cs_set_nopar:cpe {tmp@bcp47.tag} { \prop_item:Ne{\l_xpg_langsetup_prop}{ \l_tmp_lang_tl / bcp47 } }
+ \cs_gset:cpn {\csname tmp@bcp47.tag\endcsname @hyphenmins} {{#3}{#4}}
+ \c_group_end_token
}
-% \use@localhypenmins[options]{lang}
-\newcommand*\use@localhyphenmins[2][]{
- \bgroup
- \xpg_error_if_lang_not_loaded:n{#2}
- \__xpg_set_keys:nn{#2}{#1}
+% \__xpg_use_localhyphenmins:nn {options}{lang}
+\cs_new_nopar:Nn \__xpg_use_localhyphenmins:nn
+{
+ \c_group_begin_token
+ \xpg_error_if_lang_not_loaded:n {#2}
+ \SetGlossOptions {#2} {#1}
% Use bcp47.tag@hypenmins
- \tl_if_blank:nTF {#1}{
- \ifcsundef{#2@g.bcp47.tag}{
- \csxdef{tmp@bcp47.tag}{\prop_item:Nn{\g_xpg_langsetup_prop}{ #2 / bcp47 }}
- }{
- \csxdef{tmp@bcp47.tag}{\csuse{#2@g.bcp47.tag}}
- }
- }{
- \csxdef{tmp@bcp47.tag}{\prop_item:Nn{\g_xpg_langsetup_prop}{ #2 / bcp47 }}
- }
- \egroup
- \ifcsundef{\csname tmp@bcp47.tag\endcsname @hyphenmins}{
- \ifcsundef{#2hyphenmins}{}
+ \cs_gset_nopar:cpe {tmp@bcp47.tag} { \prop_item:Nn{\l_xpg_langsetup_prop}{ #2 / bcp47 } }
+ \c_group_end_token
+ \cs_if_exist:cTF {\csname tmp@bcp47.tag\endcsname @hyphenmins}
+ {
+ \tl_set:Ne \l_tmpa_tl { \use:c{\csname tmp@bcp47.tag\endcsname @hyphenmins} }
+ \expandafter \set@hyphenmins \l_tmpa_tl
+ }{
+ \cs_if_exist:cT{#2hyphenmins}
{
\expandafter\expandafter\expandafter\set@hyphenmins\csname #2hyphenmins\endcsname\relax
}
- }{
- \edef\tmpa{\csuse{\csname tmp@bcp47.tag\endcsname @hyphenmins}}
- \expandafter\expandafter\expandafter\set@hyphenmins\tmpa\relax
}
- \sys_if_engine_luatex:T{
+ \sys_if_engine_luatex:T
+ {
% Set \totalhyphenmin if specified
- \prop_get:NeNTF \g_xpg_langsetup_prop {#2/totalhyphenmin} \l_tmpa_tl
+ \prop_get:NeNT \l_xpg_langsetup_prop {#2/totalhyphenmin} \l_tmpb_tl
{
- \xpg@info{totalhyphenmin: '\l_tmpa_tl'}
- \expandafter\hyphenationmin \l_tmpa_tl
+ \xpg_info_msg:n {totalhyphenmin: '\l_tmpb_tl'}
+ \expandafter\hyphenationmin \l_tmpb_tl
}
- {}
}
}
@@ -6627,23 +6534,26 @@ to track the issues and follow progress.
\DeclareDocumentEnvironment { hyphenrules } { O{} m }
{
% Check for real language name and options
- \edef\xpg@tmp@opts{\xpg_alias_add_to_option_i:nn{#2}{#1}}
- \edef\xpg@tmp@lang{\xpg_alias_base_lang:n{#2}}
+ \tl_set:Nx \l_tmp_opts_tl { \xpg_alias_add_to_option_i:nn{#2}{#1} }
+ \tl_set:Nx \l_tmp_lang_tl { \xpg_alias_base_lang:n{#2} }
% Register the language options
- \__xpg_set_language_options:nnn {\xpg@tmp@lang} {\xpg@tmp@opts} {@xpg@set@langvariant}
+ \__xpg_set_language_options:nn { \l_tmp_lang_tl } { \l_tmp_opts_tl }
% Now switch patterns
- \__xpg_use_or_warn:c{\use:c{xpg@tmp@lang}@language}
+ \__xpg_use_or_warn:c{\use:c{l_tmp_lang_tl}@language}
% And activate hyphenmins
- \use@localhyphenmins[\xpg@tmp@opts]{\xpg@tmp@lang}
+ \__xpg_use_localhyphenmins:nn { \l_tmp_opts_tl } { \l_tmp_lang_tl }
}
{ }
-\AddToHook{begindocument/before}{
- \IfPackageLoadedTF{bidi}{
- \providecommand*{\aemph}[1]{$\overline{\hboxR{#1}}$}
+\hook_gput_code:nnn {begindocument/before} {.}
+{
+ \IfPackageLoadedTF{bidi}
+ {
+ \ProvideDocumentCommand \aemph { m } { $\overline{\hboxR{#1}}$ }
}{}
- \IfPackageLoadedTF{luabidi}{
- \providecommand*{\aemph}[1]{$\overline{\hbox{\RL{#1}}}$}
+ \IfPackageLoadedTF{luabidi}
+ {
+ \ProvideDocumentCommand \aemph { m } { $\overline{\hbox{\RL{#1}}}$ }
}{}
}
@@ -6677,7 +6587,8 @@ to track the issues and follow progress.
.value_required:n = true,
}
-\keys_set:nn { polyglossia } {
+\keys_set:nn { polyglossia }
+{
localmarks = false,
verbose = true,
babelshorthands = false,
@@ -6694,23 +6605,35 @@ to track the issues and follow progress.
\sys_if_engine_luatex:T{
\str_if_eq:eeF{\g_xpg_luatex_renderer_str}{none}
{
- \xpg@info{Setting~ LuaTeX~ font~ renderer~ to~ \g_xpg_luatex_renderer_str}
+ \xpg_info_msg:n{Setting~ LuaTeX~ font~ renderer~ to~ \g_xpg_luatex_renderer_str}
\exp_args:Ne \defaultfontfeatures{Renderer=\g_xpg_luatex_renderer_str}
}
}
-\bool_if:nF \g_xpg_verbose_bool {
- \gdef\@latex@info#1{\relax} % no latex info
- \gdef\@font@info#1{\relax} % no latex font info
- \gdef\@font@warning#1{\relax} % no latex font warnings
- \gdef\zf@PackageInfo#1{\relax} % no fontspec info
- \gdef\xpg@info#1{\relax} % no polyglossia info
+\bool_if:nF \g_xpg_verbose_bool
+{
+ \cs_gset_nopar:Npn \@latex@info #1 { \relax } % no latex info
+ \cs_gset_nopar:Npn \@font@info #1 { \relax } % no latex font info
+ \cs_gset_nopar:Npn \@font@warning #1 { \relax } % no latex font warnings
+ \msg_redirect_module:nnn { fontspec } { info } { none } % no fontspec info
+ \msg_redirect_module:nnn { polyglossia } { info } { none } % no polyglossia info
}
\bool_if:nT \g_xpg_localmarks_bool {
\__xpg_enable_local_marks:
}
+% common code to initiate babelshordhands in glosses
+\cs_new:Npn \InitializeBabelShorthands
+{
+ \cs_if_exist:cF {initiate@active@char}
+ {
+ \file_input:n {babelsh.def}
+ \initiate@active@char{"}
+ \shorthandoff{"}
+ }
+}
+
% Control shorthand (de-)activation
% This checks that the shorthand char is only deactivated
% if we have activated it ourselves and hence keeps
@@ -6738,21 +6661,22 @@ to track the issues and follow progress.
% Inherit shorthands in other languages
\NewDocumentCommand \inheritbabelshorthands { m m }
{
- \AddToHook{begindocument/before}{
+ \hook_gput_code:nnn {begindocument/before} {.}
+ {
% Load the involved languages if necessary
% Error if they do not exist
\tl_set:Nn \l__xpg_tmpa_lang_tl { \xpg_alias_base_lang:n{#1} }
\clist_if_in:NeF \xpg@loaded {\l__xpg_tmpa_lang_tl}{
\file_if_exist:nTF{gloss-\l__xpg_tmpa_lang_tl .ldf}
{ \setotherlanguage{#1} }
- { \xpg@error{ Source~ language~ #1,~ used~ in~
+ { \xpg_error_msg:n { Source~ language~ #1,~ used~ in~
\string\inheritbabelshorthands,~ does~ not~ exist } }
}
\tl_set:Nn \l__xpg_tmpb_lang_tl { \xpg_alias_base_lang:n{#2} }
\clist_if_in:NeF \xpg@loaded {\l__xpg_tmpb_lang_tl}{
\file_if_exist:nTF{gloss-\l__xpg_tmpb_lang_tl .ldf}
{ \setotherlanguage{#2} }
- { \xpg@error{ Target~ language~ #2,~ used~ in~
+ { \xpg_error_msg:n { Target~ language~ #2,~ used~ in~
\string\inheritbabelshorthands,~ does~ not~ exist } }
}
% Test whether the requested shorthands exist
@@ -6764,7 +6688,7 @@ to track the issues and follow progress.
{ \bool_set_true:N \l__xpg_no_shorthands_bool }
\bool_if:nT { \l__xpg_no_shorthands_bool }
{
- \xpg@error{ No~ babel~ shorthands~ exist~ for~ language~ #1 }
+ \xpg_error_msg:n { No~ babel~ shorthands~ exist~ for~ language~ #1 }
}
% If so, apply:
\bool_if:nF { \l__xpg_no_shorthands_bool }
@@ -6789,7 +6713,7 @@ to track the issues and follow progress.
\iflanguageloaded{\l__xpg_tmpa_lang_tl}{
\use:c{\l__xpg_tmpa_lang_tl @shorthands}
}{
- \xpg@error{ Language~ #1,~ requested~ in~
+ \xpg_error_msg:n { Language~ #1,~ requested~ in~
\string\startbabelshorthands,~ is~ not~ loaded }
}
}
@@ -7090,7 +7014,7 @@ to track the issues and follow progress.
\ifnum#1<5000
\Hebrewnumeral{#1}%
\else
- \ifnum#1<6000 % current millenium, print without thousands
+ \ifnum#1<6000 % current millennium, print without thousands
\@tempcnta=#1\relax
\if@xpg@hebrew@fullyear\else\advance\@tempcnta by -5000\fi
\Hebrewnumeral{\@tempcnta}%
@@ -7419,7 +7343,7 @@ l3calc. Please update expl3!
\@ifundefined{@Remainder}{\input{cal-util.def}}{}
%% The following functions are straightforward implementation
-%% of Reingold & Dershowitz, Calendrical Calculations, The Millenium Edition
+%% of Reingold & Dershowitz, Calendrical Calculations, The Millennium Edition
%%
\def\@FixedFromHijri#1#2#3#4{% year,month,day,counter
@@ -7494,82 +7418,15 @@ Shawwāl\or Dhū ’l-Qaʿda\or Dhū ’l-Ḥijja\fi}
% \end{macrocode}
% \iffalse
%</hijrical.sty>
-%<*polyglossia-french.lua>
+%<*polyglossia-cjk-spacing.lua>
% \fi
% \clearpage
%
-% \subsection{polyglossia-french.lua}
+% \subsection{polyglossia-cjk-spacing.lua}
% \begin{macrocode}
--
--- polyglossia-punct.lua
--- part of polyglossia v2.1 -- 2024/03/07
---
-
-require('polyglossia-punct')
-
-local function set_left_space(lang, char, kern, rubber)
- polyglossia.add_left_spaced_character(lang, char, kern, "space", rubber)
-end
-
-local function set_right_space(lang, char, kern, rubber)
- polyglossia.add_right_spaced_character(lang, char, kern, "space", rubber)
-end
-
-local function activate_french_punct(thincolonspace, autospaceguillemets)
- -- We need different language tags here to make switching of options possible
- -- within a paragraph.
- local lang = "french"
- if thincolonspace then
- lang = lang.."-thincolon"
- end
- if autospaceguillemets then
- lang = lang.."-autospace"
- end
-
- polyglossia.activate_punct(lang)
- polyglossia.clear_spaced_characters(lang)
-
- if thincolonspace then
- set_left_space(lang, ':', 0.5)
- else
- set_left_space(lang, ':', 1, true) -- stretchable and shrinkable space
- end
-
- set_left_space(lang, '!', 0.5)
- set_left_space(lang, '?', 0.5)
- set_left_space(lang, ';', 0.5)
- set_left_space(lang, '‼', 0.5)
- set_left_space(lang, '⁇', 0.5)
- set_left_space(lang, '⁈', 0.5)
- set_left_space(lang, '⁉', 0.5)
- set_left_space(lang, '‽', 0.5) -- U+203D (interrobang)
-
- if autospaceguillemets then
- set_left_space(lang, '»', 0.5)
- set_left_space(lang, '›', 0.5)
- set_right_space(lang, '«', 0.5)
- set_right_space(lang, '‹', 0.5)
- end
-end
-
-local function deactivate_french_punct()
- polyglossia.deactivate_punct()
-end
-
-polyglossia.activate_french_punct = activate_french_punct
-polyglossia.deactivate_french_punct = deactivate_french_punct
-% \end{macrocode}
-% \iffalse
-%</polyglossia-french.lua>
-%<*polyglossia-korean.lua>
-% \fi
-% \clearpage
-%
-% \subsection{polyglossia-korean.lua}
-% \begin{macrocode}
---
--- polyglossia-korean.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- polyglossia-cjk-spacing.lua
+-- part of polyglossia v2.2 -- 2024/07/15
--
local glyph_id = node.id"glyph"
@@ -7577,13 +7434,17 @@ local hbox_id = node.id"hlist"
local vbox_id = node.id"vlist"
local glue_id = node.id"glue"
local penalty_id = node.id"penalty"
-local disc_id = node.id"disc"
+local whatsit_id = node.id"whatsit"
+local math_id = node.id"math"
--
--- attr_korean: variant = plain (0), classic (1), modern (2)
+-- attr_cjk: variant = plain: 0, JP/classic: 1, KR/modern: 2, SC: 3, TC: 4
+--
+local attr_cjk = luatexbase.attributes["xpg@attr@cjkspacing"]
+--
+-- attr_josa: ONLY For Korean. DO NOT declare \newattribute for other langs
--
-local attr_korean = luatexbase.attributes["xpg@attr@korean"]
-local attr_josa = luatexbase.attributes["xpg@attr@autojosa"]
+local attr_josa = luatexbase.attributes["xpg@attr@autojosa"]
--
-- characters after which linebreak is not allowed
@@ -7632,9 +7493,9 @@ local nobr_after = {
-- characters before which linebreak is not allowed
-- (currently, not much differences among the followings)
-- 1: normal chars
--- 2: hangul jamo vowels and trailing consonants
+-- 2: hangul jamo vowels and trailing consonants plus combinings
-- 3: kana small letters
--- 0: dashes (supress visible spacing)
+-- 0: dashes (suppress visible spacing after this char)
--
local nobr_before = setmetatable({
[0x21] = 1, -- ! EXCLAMATION MARK
@@ -7645,7 +7506,7 @@ local nobr_before = setmetatable({
[0x2D] = 0, -- - HYPHEN-MINUS
[0x2E] = 1, -- . FULL STOP
[0x2F] = 0, -- / SOLIDUS
- [0x3A] = 0, -- : COLON
+ [0x3A] = 1, -- : COLON
[0x3B] = 1, -- ; SEMICOLON
[0x3E] = 1, -- > GREATER-THAN SIGN
[0x3F] = 1, -- ? QUESTION MARK
@@ -7657,11 +7518,11 @@ local nobr_before = setmetatable({
[0xBB] = 1, -- » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
[0x2013] = 0, -- – EN DASH
[0x2014] = 0, -- — EM DASH
- [0x2015] = 1, -- ― HORIZONTAL BAR
+ [0x2015] = 0, -- ― HORIZONTAL BAR
[0x2019] = 1, -- ’ RIGHT SINGLE QUOTATION MARK
[0x201D] = 1, -- ” RIGHT DOUBLE QUOTATION MARK
- [0x2025] = 1, -- ‥ TWO DOT LEADER
- [0x2026] = 1, -- … HORIZONTAL ELLIPSIS
+ [0x2025] = 0, -- ‥ TWO DOT LEADER
+ [0x2026] = 0, -- … HORIZONTAL ELLIPSIS
[0x232A] = 1, -- 〉 RIGHT-POINTING ANGLE BRACKET
[0x3001] = 1, -- 、 IDEOGRAPHIC COMMA
[0x3002] = 1, -- 。 IDEOGRAPHIC FULL STOP
@@ -7693,10 +7554,10 @@ local nobr_before = setmetatable({
[0x308E] = 3, -- ゎ HIRAGANA LETTER SMALL WA
[0x3095] = 3, -- ゕ HIRAGANA LETTER SMALL KA
[0x3096] = 3, -- ゖ HIRAGANA LETTER SMALL KE
- [0x3099] = 1, -- COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
- [0x309A] = 1, -- COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
- [0x309B] = 1, -- ゛ KATAKANA-HIRAGANA VOICED SOUND MARK
- [0x309C] = 1, -- ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ [0x3099] = 2, -- COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
+ [0x309A] = 2, -- COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ [0x309B] = 2, -- ゛ KATAKANA-HIRAGANA VOICED SOUND MARK
+ [0x309C] = 2, -- ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
[0x309D] = 1, -- ゝ HIRAGANA ITERATION MARK
[0x309E] = 1, -- ゞ HIRAGANA VOICED ITERATION MARK
[0x30A0] = 1, -- ゠ KATAKANA-HIRAGANA DOUBLE HYPHEN
@@ -7716,9 +7577,9 @@ local nobr_before = setmetatable({
[0x30FC] = 1, -- ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
[0x30FD] = 1, -- ヽ KATAKANA ITERATION MARK
[0x30FE] = 1, -- ヾ KATAKANA VOICED ITERATION MARK
- [0xFE30] = 1, -- ︰ PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
- [0xFE31] = 1, -- ︱ PRESENTATION FORM FOR VERTICAL EM DASH
- [0xFE32] = 1, -- ︲ PRESENTATION FORM FOR VERTICAL EN DASH
+ [0xFE30] = 0, -- ︰ PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+ [0xFE31] = 0, -- ︱ PRESENTATION FORM FOR VERTICAL EM DASH
+ [0xFE32] = 0, -- ︲ PRESENTATION FORM FOR VERTICAL EN DASH
[0xFE36] = 1, -- ︶ PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
[0xFE38] = 1, -- ︸ PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
[0xFE3A] = 1, -- ︺ PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
@@ -7745,18 +7606,18 @@ local nobr_before = setmetatable({
[0xFF63] = 1, -- 」 HALFWIDTH RIGHT CORNER BRACKET
[0xFF64] = 1, -- 、 HALFWIDTH IDEOGRAPHIC COMMA
[0xFF65] = 1, -- ・ HALFWIDTH KATAKANA MIDDLE DOT
- [0xFF9E] = 1, -- ゙ HALFWIDTH KATAKANA VOICED SOUND MARK
- [0xFF9F] = 1, -- ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+ [0xFF9E] = 2, -- ゙ HALFWIDTH KATAKANA VOICED SOUND MARK
+ [0xFF9F] = 2, -- ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
}, { __index = function(_,c)
if c >= 0x1160 and c <= 0x11FF then return 2 end
if c >= 0xD7B0 and c <= 0xD7FF then return 2 end
- if c >= 0x302A and c <= 0x302F then return 1 end
+ if c >= 0x302A and c <= 0x302F then return 2 end -- tone marks
if c >= 0x31F0 and c <= 0x31FF then return 3 end
if c >= 0xFF67 and c <= 0xFF70 then return 3 end
- if c >= 0xFE00 and c <= 0xFE0F then return 1 end
+ if c >= 0xFE00 and c <= 0xFE0F then return 2 end -- variation selectors
if c >= 0xFE10 and c <= 0xFE19 and not (c == 0xFE17) then return 1 end
if c >= 0xFE50 and c <= 0xFE58 then return 1 end
- if c >= 0xE0100 and c <= 0xE01EF then return 1 end
+ if c >= 0xE0100 and c <= 0xE01EF then return 2 end -- variation selecters
end
})
@@ -7774,6 +7635,7 @@ local function is_cjk (c)
or c >= 0xFF00 and c <= 0xFFEF
or c >= 0x1F100 and c <= 0x1F2FF
or c >= 0x20000 and c <= 0x2FA1F
+ or c >= 0x30000 and c <= 0x323AF
or nobr_after[c] and c > 0x2014
or nobr_before[c] and c > 0x2014
end
@@ -7813,8 +7675,28 @@ local charclass = setmetatable({
}, { __index = function() return 0 end })
--
+-- get character class
+-- var : variant = plain, JP/classic, KR/modern, SC, TC
+-- c : codepoint
+--
+local function get_charclass (var, c)
+ if var < 3 then
+ return charclass[c]
+ elseif var == 3 then
+ -- SC : these are left aligned
+ return (c == 0xFF01 or c == 0xFF1F) and 4 -- FULLWIDTH EXCLAMATION/QUESTION MARK
+ or (c == 0xFF1A or c == 0xFF1B) and 2 -- FULLWIDTH COLON/SEMICOLON
+ or charclass[c]
+ end
+ -- TC : these are center aligned
+ return (c == 0x3001 or c == 0xFF0C) and 3 -- IDEOGRAPHIC/FULLWIDTH COMMA
+ or (c == 0x3002 or c == 0xFF0E) and 3 -- IDEOGRAPHIC/FULLWIDTH FULL STOP -- 5 ?
+ or charclass[c]
+end
+
+--
-- table for spacing between char classes
--- 1 stands for 0.5*fontsize when variant=classic
+-- 1 stands for 0.5*fontsize when variant = JP/classic or SC or TC
--
local intercharclass = { [0] =
{ [0] = nil, {1,1}, nil, {.5,.5} },
@@ -7846,7 +7728,7 @@ end
--
-- return 0.5*fontsize of given fontid
--- space: true if variant=modern; then 0.5*interword_space
+-- space: true if variant=KR/modern; then 0.5*interword_space
--
local function get_font_size (fid, space)
local size = font.getparameters(fid)
@@ -7860,7 +7742,7 @@ end
--
-- charclass 1 thru 4 will be packed in \hbox to 0.5em{\hss? curr \hss?}
--- when variant=classic/modern
+-- when variant ~= plain
--
local function glyph_to_box (head, curr, class)
local g, h = curr
@@ -7889,7 +7771,7 @@ end
--
-- insert spacing defined as charclass[a][b] between a and b
-- f: fontid
--- var: variant = plain, classic, modern
+-- var: variant = plain, JP/classic, KR/modern, SC, TC
-- cc: charclass of current char
-- nc: charclass of next char
-- nobr: linebreak is not allowed
@@ -7908,12 +7790,16 @@ end
--
-- insert inter-character spacing in other normal cases
--- f: fontid
--- var: variant = plain, classic, modern
--- x: true between cjk and non-cjk (a little more spacing)
+-- f: fontid
+-- var: variant = plain, JP/classic, KR/modern, SC, TC
+-- nobr: no linebreak
+-- x: true between cjk and non-cjk (a little more spacing)
--
-local function insert_penalty_glue (head, curr, f, var, x)
- if var ~= 1 then
+local function insert_penalty_glue (head, curr, f, var, nobr, x)
+ if nobr then
+ local penalty = get_new_penalty(10000)
+ head, curr = node.insert_after(head, curr, penalty)
+ elseif var == 0 or var == 2 then
local penalty = get_new_penalty(50)
head, curr = node.insert_after(head, curr, penalty)
end
@@ -7929,53 +7815,64 @@ end
--
-- main process for linebreak and inter-character spacing
--- lb: true if pre_linebreak_filter
--
-local function korean_break (head, lb)
+local function cjk_break (head)
local curr = head
while curr do
- if curr.id == glyph_id then
- local var = node.has_attribute(curr, attr_korean)
+ if attr_cjk and (curr.id == glyph_id or curr.id == math_id and curr.subtype == 1) then
+ local var = node.has_attribute(curr, attr_cjk)
if var then
- local c, f = curr.char or 0, curr.font or 0
- local cc, cjkc = charclass[c], is_cjk(c)
+ local c, f = curr.char or 0, curr.font
+ local cc, cjkc = get_charclass(var, c), is_cjk(c)
-- compress cjk punctuations when charclass is 1 thru 4
if var > 0 and cc > 0 and cc < 5 then
head, curr = glyph_to_box(head, curr, cc)
end
- local next = curr.next
- if next and next.id == glyph_id then
+ local next = node.getnext(curr)
+ while next and next.id == whatsit_id do -- skip whatsit nodes
+ curr, next = next, node.getnext(next)
+ end
+
+ if next and (next.id == glyph_id or next.id == math_id and next.subtype == 0) then
local n = next.char or 0
- local nc = charclass[n]
+ f = f or next.font or 0 -- in case of curr == math_off
+
+ -- skip combining. or dash+dash case to suppress stretching
+ if nobr_before[n] == 2 or (nobr_before[c] == 0 and nobr_before[n] == 0) then
+ goto skip_combining
+ end
+
+ local nc = get_charclass(var, n)
local nobr = nobr_before[n] or nobr_after[c]
-- insert spacing as of intercharclass
if var > 0 and intercharclass[cc][nc] then
head, curr = insert_cjk_penalty_glue(head, curr, f, var, cc, nc, nobr)
- -- or insert spacing when linebreak is allowed
- elseif not nobr then
+ else
local cjkn = is_cjk(n)
-- if curr or next is cjk char
if cjkc or cjkn then
- -- if between cjk and non-cjk
- if var > 0 and not (cjkc and cjkn) and nobr_before[c] ~= 0 then
- head, curr = insert_penalty_glue(head, curr, f, var, true)
+ -- plain variant / cjk+cjk / nobr cjk+noncjk / after dash
+ -- : insert a 0pt glue
+ if var == 0 or (cjkc and cjkn) or nobr or nobr_before[c] == 0 then
+ head, curr = insert_penalty_glue(head, curr, f, var, nobr)
- -- or under pre_linebreak_filter
- elseif lb then
- head, curr = insert_penalty_glue(head, curr, f, var)
+ -- other cases: insert a small glue
+ else
+ head, curr = insert_penalty_glue(head, curr, f, var, nobr, true)
end
end
end
end
end
end
- curr = curr.next
+ ::skip_combining::
+ curr = node.getnext(curr)
end
return head
end
@@ -7989,7 +7886,7 @@ end
local function reorder_tm (head)
local curr, tone = node.slide(head)
while curr do
- if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then
+ if curr.id == glyph_id and node.has_attribute(curr, attr_cjk) then
local f = font.getfont(curr.font) or font.fonts[curr.font]
if f and f.hb then -- harfbuzz do the right thing
tone = nil
@@ -8005,7 +7902,7 @@ local function reorder_tm (head)
end
end
end
- curr = curr.prev
+ curr = node.getprev(curr)
end
return head
end
@@ -8092,7 +7989,7 @@ local function get_prev_char (p)
local pc = get_prev_char(node.slide(p.head))
if pc then return pc end
end
- p = p.prev
+ p = node.getprev(p)
end
end
@@ -8107,10 +8004,10 @@ local function auto_josa (head)
if josa then
local cc = curr.char or 0
if josa == 0 then
- josa = josa_code[get_prev_char(curr.prev) or 0x30]
+ josa = josa_code[get_prev_char(node.getprev(curr)) or 0x30]
end
if cc == 0xC774 then
- local n = curr.next
+ local n = node.getnext(curr)
if n and n.char and n.char >= 0xAC00 and n.char <= 0xD7A3 then
else
cc = 0xAC00
@@ -8129,7 +8026,7 @@ local function auto_josa (head)
node.unset_attribute(curr, attr_josa)
end
end
- curr = curr.next
+ curr = node.getnext(curr)
end
for _,v in ipairs(tofree) do node.free(v) end
return head
@@ -8140,45 +8037,86 @@ end
-- As char value of glyphs can be changed by opentype GSUB process,
-- we have to occupy the first position among callback functions.
--
-local prepend_to_callback
-if luatexbase.base_add_to_callback then
- prepend_to_callback = function(name, func, desc)
- luatexbase.add_to_callback(name, func, desc, 1)
+luatexbase.add_to_callback( "pre_shaping_filter",
+function(head)
+ if attr_josa then head = auto_josa(head) end
+ head = cjk_break(head)
+ if attr_josa then head = reorder_tm(head) end
+ return head
+end,
+"polyglossia.lang_cjk_spacing")
+
+-- vim:ft=lua:tw=0:sw=4:ts=4:expandtab
+% \end{macrocode}
+% \iffalse
+%</polyglossia-cjk-spacing.lua>
+%<*polyglossia-french.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-french.lua}
+% \begin{macrocode}
+--
+-- polyglossia-punct.lua
+-- part of polyglossia v2.2 -- 2024/07/15
+--
+
+require('polyglossia-punct')
+
+local function set_left_space(lang, char, kern, rubber)
+ polyglossia.add_left_spaced_character(lang, char, kern, "space", rubber)
+end
+
+local function set_right_space(lang, char, kern, rubber)
+ polyglossia.add_right_spaced_character(lang, char, kern, "space", rubber)
+end
+
+local function activate_french_punct(thincolonspace, autospaceguillemets)
+ -- We need different language tags here to make switching of options possible
+ -- within a paragraph.
+ local lang = "french"
+ if thincolonspace then
+ lang = lang.."-thincolon"
end
-else
- prepend_to_callback = function(name, func, desc)
- local t = { {func, desc} }
- for _,v in ipairs(luatexbase.callback_descriptions(name)) do
- table.insert(t, {luatexbase.remove_from_callback(name, v)})
- end
- for _,v in ipairs(t) do
- luatexbase.add_to_callback(name, v[1], v[2])
- end
+ if autospaceguillemets then
+ lang = lang.."-autospace"
+ end
+
+ polyglossia.activate_punct(lang)
+ polyglossia.clear_spaced_characters(lang)
+
+ if thincolonspace then
+ set_left_space(lang, ':', 0.5)
+ else
+ set_left_space(lang, ':', 1, true) -- stretchable and shrinkable space
+ end
+
+ set_left_space(lang, '!', 0.5)
+ set_left_space(lang, '?', 0.5)
+ set_left_space(lang, ';', 0.5)
+ set_left_space(lang, '‼', 0.5)
+ set_left_space(lang, '⁇', 0.5)
+ set_left_space(lang, '⁈', 0.5)
+ set_left_space(lang, '⁉', 0.5)
+ set_left_space(lang, '‽', 0.5) -- U+203D (interrobang)
+
+ if autospaceguillemets then
+ set_left_space(lang, '»', 0.5)
+ set_left_space(lang, '›', 0.5)
+ set_right_space(lang, '«', 0.5)
+ set_right_space(lang, '‹', 0.5)
end
end
-prepend_to_callback ("pre_linebreak_filter",
- function(head)
- head = auto_josa(head)
- head = korean_break(head, true)
- head = reorder_tm(head)
- return head
- end,
- "polyglossia.lang_korean")
-
-prepend_to_callback ("hpack_filter",
- function(head)
- head = auto_josa(head)
- head = korean_break(head)
- head = reorder_tm(head)
- return head
- end,
- "polyglossia.lang_korean")
+local function deactivate_french_punct()
+ polyglossia.deactivate_punct()
+end
--- vim:ft=lua:tw=0:sw=4:ts=4:expandtab
+polyglossia.activate_french_punct = activate_french_punct
+polyglossia.deactivate_french_punct = deactivate_french_punct
% \end{macrocode}
% \iffalse
-%</polyglossia-korean.lua>
+%</polyglossia-french.lua>
%<*polyglossia-latin.lua>
% \fi
% \clearpage
@@ -8187,7 +8125,7 @@ prepend_to_callback ("hpack_filter",
% \begin{macrocode}
--
-- polyglossia-latin.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia-punct')
@@ -8242,14 +8180,13 @@ polyglossia.deactivate_latin_punct = deactivate_latin_punct
% \begin{macrocode}
--
-- polyglossia-punct.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia') -- just in case...
local add_to_callback = luatexbase.add_to_callback
-local remove_from_callback = luatexbase.remove_from_callback
-local priority_in_callback = luatexbase.priority_in_callback
+local declare_callback_rule = luatexbase.declare_callback_rule
local new_attribute = luatexbase.new_attribute
local node = node
@@ -8573,13 +8510,16 @@ local function activate(lang)
-- important to be able to intermix languages with different spacings
-- in one paragraph.
tex.setattribute(punct_attr, id)
- for _, callback_name in ipairs{ "pre_linebreak_filter", "hpack_filter" } do
- if not priority_in_callback(callback_name, "polyglossia-punct.process") then
- add_to_callback(callback_name, process, "polyglossia-punct.process", 1)
- end
- end
end
+add_to_callback("pre_linebreak_filter",process,"polyglossia-punct.process")
+add_to_callback("hpack_filter",process,"polyglossia-punct.process")
+declare_callback_rule("pre_linebreak_filter",
+ "polyglossia-punct.process", "before", "luaotfload.node_processor")
+declare_callback_rule("hpack_filter",
+ "polyglossia-punct.process", "before", "luaotfload.node_processor")
+
+
local function deactivate()
tex.setattribute(punct_attr, -0x7FFFFFFF) -- this value means "unset"
-- Though it would make compilation slightly faster, it is not possible to
@@ -8610,7 +8550,7 @@ polyglossia.clear_spaced_characters = clear_spaced_characters
% \begin{macrocode}
--
-- polyglossia-sanskrit.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia-punct')
@@ -8660,31 +8600,29 @@ polyglossia.deactivate_sanskrit_punct = deactivate_sanskrit_punct
% \begin{macrocode}
--
-- polyglossia-tibt.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia') -- just in case...
local add_to_callback = luatexbase.add_to_callback
local remove_from_callback = luatexbase.remove_from_callback
+local declare_callback_rule = luatexbase.declare_callback_rule
local priority_in_callback = luatexbase.priority_in_callback
local next, type = next, type
-
-local nodes, fonts, node = nodes, fonts, node
-
-local nodecodes = nodes.nodecodes --- <= preloaded node.types()
+local node = node
local insert_node_before = node.insert_before
local insert_node_after = node.insert_after
-local remove_node = nodes.remove
+local remove_node = node.remove
local copy_node = node.copy
local has_attribute = node.has_attribute
local end_of_math = node.end_of_math
if not end_of_math then -- luatex < .76
local traverse_nodes = node.traverse_id
- local math_code = nodecodes.math
+ local math_code = node.id('math_char')
local end_of_math = function (n)
for n in traverse_nodes(math_code, n.next) do
return n
@@ -8692,10 +8630,10 @@ if not end_of_math then -- luatex < .76
end
end
--- node types as of April 2013
-local glyph_code = nodecodes.glyph
-local penalty_code = nodecodes.penalty
-local kern_code = nodecodes.kern
+-- node types as of April 2024
+local glyph_code = node.id('glyph')
+local penalty_code = node.id('penalty')
+local kern_code = node.id('kern')
-- we make a new node, so that we can copy it later on
local penalty_node = node.new(penalty_code)
@@ -8726,7 +8664,6 @@ local function process(head)
end
end
elseif id == math_code then
- -- warning: this is a feature of luatex > 0.76
start = end_of_math(start) -- weird, can return nil .. no math end?
end
if start then
@@ -8739,15 +8676,13 @@ end
local callback_name = "pre_linebreak_filter"
local function activate()
- if not priority_in_callback (callback_name, "polyglossia-tibt.process") then
- add_to_callback(callback_name, process, "polyglossia-tibt.process", 1)
- end
+ add_to_callback(callback_name, process, "polyglossia-tibt.process")
+ declare_callback_rule(callback_name,
+ "polyglossia-tibt.process", "before", "luaotfload.node_processor")
end
local function desactivate()
- if priority_in_callback (callback_name, "polyglossia-tibt.process") then
- remove_from_callback(callback_name, "polyglossia-tibt.process")
- end
+ remove_from_callback(callback_name, "polyglossia-tibt.process")
end
polyglossia.activate_tibt_eol = activate
@@ -8763,7 +8698,7 @@ polyglossia.desactivate_tibt_eol = desactivate
% \begin{macrocode}
--
-- polyglossia.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
local module_name = "polyglossia"
@@ -8839,7 +8774,7 @@ local function newloader(langentry)
end
-- language info will be written into the .log file
- local s = { "Language data for " .. langentry }
+ local s = { }
for k, v in pairs(langdata) do
if type(v) == 'table' then -- for 'synonyms'
s[#s+1] = k .. "\t" .. table.concat(v,',')
@@ -8847,7 +8782,10 @@ local function newloader(langentry)
s[#s+1] = k .. "\t" .. tostring(v)
end
end
- log_info(table.concat(s,"\n"))
+ local a = {}
+ for _,n in pairs(s) do table.insert(a, n) end
+ table.sort(a)
+ log_info("Language data for " .. langentry .. "\n" .. table.concat(a,"\n"))
--
-- LaTeX's \newlanguage increases language register (count19),
@@ -8857,7 +8795,7 @@ local function newloader(langentry)
-- this possible situation, our newloader() function will
-- unfortunately overwrite the language \lang@xyz.
--
- -- Threfore here we will compare LaTeX's \newlanguage number with
+ -- Therefore here we will compare LaTeX's \newlanguage number with
-- LuaTeX's lang.new() id and select the bigger one for our new
-- language object. Also we will update LaTeX's language register
-- by this new id, so that another possible \newlanguage should not
@@ -8872,7 +8810,7 @@ local function newloader(langentry)
local newlangid = math.max(langcnt, langid)
-- set language register for possible \newlanguage
tex.setcount('global', lang_register, newlangid)
- -- get new lang object if needeed
+ -- get new lang object if needed
if langid ~= newlangid then
langobject = lang.new(newlangid)
end
@@ -9716,7 +9654,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%% This is an algorithm from Reingold & Dershowitz,
-%% Calendrical Calculations, The Millenium Edition
+%% Calendrical Calculations, The Millennium Edition
%%
\def\@FixedFromGregorian#1#2#3#4{%
\setcounter{tmpA}{(#1-1)*365}%
@@ -10069,36 +10007,36 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \end{macrocode}
% \iffalse
%</xgreek-fixes.def>
-%<*gloss-acadien.ldf>
+%<*gloss-acadian.ldf>
% \fi
% \clearpage
%
-% \subsection{gloss-acadien.ldf}
+% \subsection{gloss-acadian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-acadien.ldf}[polyglossia: module for Canadian (Acadian) French]
% We provide this as a babel alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
-%</gloss-acadien.ldf>
+%</gloss-acadian.ldf>
%<*gloss-aeb.ldf>
% \fi
% \clearpage
%
% \subsection{gloss-aeb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-aeb.ldf}[polyglossia: module for aeb (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -10109,13 +10047,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-af.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-af.ldf}[polyglossia: module for af (Afrikaans)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{afrikaans}
+\InheritGlossFile{afrikaans}
% \end{macrocode}
% \iffalse
@@ -10126,13 +10064,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-afb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-afb.ldf}[polyglossia: module for afb (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -10143,7 +10081,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-afrikaans.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-afrikaans.ldf}[polyglossia: module for Afrikaans]
@@ -10161,22 +10099,21 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{afrikaans}{af}
-\define@boolkey{afrikaans}[afrikaans@]{babelshorthands}[true]{}
-
+\DeclareKeys[polyglossia/gloss/afrikaans]
+ {
+ babelshorthands.if = afrikaans@babelshorthands,
+ babelshorthands.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{afrikaans}{babelshorthands=false}
+\InitializeGlossOptions{afrikaans}{babelshorthands=false}
\ifsystem@babelshorthands
- \setkeys{afrikaans}{babelshorthands=true}
+ \SetGlossOptions{afrikaans}{babelshorthands=true}
\else
- \setkeys{afrikaans}{babelshorthands=false}
+ \SetGlossOptions{afrikaans}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\afrikaans@shorthands{%
\xpg@activate@shorthands%
@@ -10248,7 +10185,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-albanian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-albanian.ldf}[polyglossia: module for Albanian]
@@ -10305,13 +10242,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-am.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-am.ldf}[polyglossia: module for am (Amharic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{amharic}
+\InheritGlossFile{amharic}
% \end{macrocode}
% \iffalse
@@ -10322,13 +10259,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-american.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-american.ldf}[polyglossia: module for American English]
% We provide this as a babel alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -10339,7 +10276,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-amharic.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-amharic.ldf}[polyglossia: module for Amharic]
\PolyglossiaSetup{amharic}{
@@ -10559,13 +10496,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-apd.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-apd.ldf}[polyglossia: module for apd (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -10576,13 +10513,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-IQ.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-IQ.ldf}[polyglossia: module for ar-IQ (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-IQ,bcp47-language=ar,bcp47-region=IQ}%
@@ -10595,13 +10532,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-JO.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-JO.ldf}[polyglossia: module for ar-JO (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-JO,bcp47-language=ar,bcp47-region=JO}%
@@ -10614,13 +10551,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-LB.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-LB.ldf}[polyglossia: module for ar-LB (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-LB,bcp47-language=ar,bcp47-region=LB}%
@@ -10633,13 +10570,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-MR.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-MR.ldf}[polyglossia: module for ar-MR (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-MR,bcp47-language=ar,bcp47-region=MR}%
@@ -10652,13 +10589,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-PS.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-PS.ldf}[polyglossia: module for ar-PS (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-PS,bcp47-language=ar,bcp47-region=PS}%
@@ -10671,13 +10608,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-SY.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-SY.ldf}[polyglossia: module for ar-SY (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-SY,bcp47-language=ar,bcp47-region=SY}%
@@ -10690,13 +10627,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar-YE.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar-YE.ldf}[polyglossia: module for ar-YE (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
\SetLanguageKeys{arabic}{bcp47=ar-YE,bcp47-language=ar,bcp47-region=YE}%
@@ -10709,13 +10646,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ar.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ar.ldf}[polyglossia: module for ar (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -10726,7 +10663,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-arabic.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-arabic.ldf}[polyglossia: module for Arabic]
\RequireBidi
@@ -10766,104 +10703,112 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*[locale=default]{arabic}{apd}
\setlanguagealias*[locale=mashriq]{arabic}{ar-PS}
-\define@boolkey{arabic}[arabic@]{abjadalph}[true]{}
-
\newif\ifeastern@numerals
-\define@choicekey*+{arabic}{numerals}[\xpg@val\xpg@nr]{mashriq,maghrib,eastern,western}[mashriq]{%
- \ifcase\xpg@nr\relax
- % mashriq:
- \eastern@numeralstrue%
- \or
- % maghrib:
- \eastern@numeralsfalse
- \or
- % eastern:
- \eastern@numeralstrue%
- \or
- % western:
- \eastern@numeralsfalse
- \fi
- \xpg@info{Option: Arabic, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Arabic numerals option `#1'}}
-
-%this is needed for \abjad in arabicnumbers.sty
-\define@boolkey{arabic}[arabic@]{abjadjimnotail}[true]{%
- \ifarabic@abjadjimnotail
- \abjad@jim@notailtrue%
- \else
- \abjad@jim@notailfalse
- \fi}
-
-\define@choicekey*+{arabic}{locale}[\xpg@val\xpg@nr]{default,mashriq,libya,algeria,tunisia,morocco,mauritania}[default]{%
- \ifcase\xpg@nr\relax
- % default:
- \eastern@numeralstrue%
- \SetLanguageKeys{arabic}{bcp47=ar-YE,bcp47-language=ar}%
- \xpg@info{Option: arabic, locale=default}%
- \or
- % mashriq:
- \eastern@numeralstrue%
- \SetLanguageKeys{arabic}{bcp47=ar-IQ,bcp47-language=ar}%
- \xpg@info{Option: arabic, locale=mashriq}%
- \or
- % libya:
- \eastern@numeralstrue%
- \SetLanguageKeys{arabic}{bcp47=ayl,bcp47-language=ar,bcp47-region=LY}%
- \xpg@info{Option: arabic, locale=libya}%
- \or
- % algeria:
- \eastern@numeralsfalse%
- \SetLanguageKeys{arabic}{bcp47=arq,bcp47-language=ar,bcp47-region=DZ,bcp47-extension-u=nu-latn}%
- \xpg@info{Option: arabic, locale=algeria}%
- \or
- % tunisia:
- \eastern@numeralsfalse%
- \SetLanguageKeys{arabic}{bcp47=aeb,bcp47-language=ar,bcp47-region=TN,bcp47-extension-u=nu-latn}%
- \xpg@info{Option: arabic, locale=tunisia}%
- \or
- % morocco:
- \eastern@numeralsfalse%
- \SetLanguageKeys{arabic}{bcp47=ary,bcp47-language=ar,bcp47-region=MA,bcp47-extension-u=nu-latn}%
- \xpg@info{Option: arabic, locale=morocco}%
- \or
- % mauritania:
- \eastern@numeralstrue%
- \SetLanguageKeys{arabic}{bcp47=ar-MR,bcp47-language=ar,bcp47-region=MR}%
- \xpg@info{Option: arabic, locale=mauritania}%
- \fi
- \gdef\@@arabic@month{\@arabic@month{#1}}
- }{\xpg@warning{Unknown Arabic locale `#1'}}
-
\newif\if@hijrical
-\define@choicekey*+{arabic}{calendar}[\xpg@val\xpg@nr]{gregorian,hijri,islamic}[gregorian]{%
- \ifcase\xpg@nr\relax
- % gregorian:
- \@hijricalfalse
- \or
- % hijri:
- \@hijricaltrue
- \or
- % islamic:
- \@hijricaltrue
- \fi
- \xpg@info{Option: Arabic, calendar=\xpg@val}%
-}{\xpg@warning{Unknown Arabic calendar option `#1'}}
-
-
-\define@key{arabic}{hijricorrection}[0]{%
- \gdef\arabic@hijri@correction{#1}}%
-
\newif\ifarabic@customsep\arabic@customsepfalse
-\def\xpg@sepmark{}
-\define@key{arabic}{sectionsep}[.]{%
- \arabic@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
+
+\DeclareKeys[polyglossia/gloss/arabic]
+ {
+ hijricorrection.code = \gdef\arabic@hijri@correction{#1},
+ hijricorrection.default:n = 0,
+ sectionsep.code = \gdef\xpg@sepmark{#1}\arabic@customseptrue,
+ sectionsep.default:n = .,
+ abjadalph.if = arabic@abjadalph,
+ abjadalph.default:n = true,
+ abjadjimnotail.if = abjad@jim@notail,
+ abjadjimnotail.default:n = true,
+ numerals.choice:,
+ numerals / mashriq.code =
+ {%
+ \eastern@numeralstrue
+ },
+ numerals / maghrib.code =
+ {%
+ \eastern@numeralsfalse
+ },
+ numerals / eastern.code =
+ {%
+ \eastern@numeralstrue
+ },
+ numerals / western.code =
+ {%
+ \eastern@numeralsfalse
+ },
+ numerals.default:n = mashriq,
+ numerals/unknown.code = \xpg@warning{Unknown Arabic numerals option `#1'},
+ locale.choice:,
+ locale / default.code =
+ {%
+ \eastern@numeralstrue
+ \def\abjad@one{ا}%
+ \SetLanguageKeys{arabic}{bcp47=ar-YE,bcp47-language=ar}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale / mashriq.code =
+ {%
+ \eastern@numeralstrue
+ \def\abjad@one{ا}%
+ \SetLanguageKeys{arabic}{bcp47=ar-IQ,bcp47-language=ar}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale / libya.code =
+ {%
+ \eastern@numeralstrue
+ \def\abjad@one{ا}%
+ \SetLanguageKeys{arabic}{bcp47=ayl,bcp47-language=ar,bcp47-region=LY}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale / algeria.code =
+ {%
+ \eastern@numeralsfalse
+ \def\abjad@one{أ}%
+ \SetLanguageKeys{arabic}{bcp47=arq,bcp47-language=ar,bcp47-region=DZ,bcp47-extension-u=nu-latn}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale / tunisia.code =
+ {%
+ \eastern@numeralsfalse
+ \def\abjad@one{أ}%
+ \SetLanguageKeys{arabic}{bcp47=aeb,bcp47-language=ar,bcp47-region=TN,bcp47-extension-u=nu-latn}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale / morocco.code =
+ {%
+ \eastern@numeralsfalse
+ \def\abjad@one{أ}%
+ \SetLanguageKeys{arabic}{bcp47=ary,bcp47-language=ar,bcp47-region=MA,bcp47-extension-u=nu-latn}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale / mauritania.code =
+ {%
+ \eastern@numeralstrue
+ \def\abjad@one{ا}%
+ \SetLanguageKeys{arabic}{bcp47=ar-MR,bcp47-language=ar,bcp47-region=MR}%
+ \gdef\@@arabic@month{\@arabic@month{#1}}%
+ },
+ locale.default:n = default,
+ locale/unknown.code = \xpg@warning{Unknown Arabic locale `#1'},
+ calendar.choice:,
+ calendar / gregorian.code =
+ {%
+ \@hijricalfalse
+ },
+ calendar / hijri.code =
+ {%
+ \@hijricaltrue
+ },
+ calendar / islamic.code =
+ {%
+ \@hijricaltrue
+ },
+ calendar.default:n = gregorian,
+ calendar/unknown.code = \xpg@warning{Unknown Arabic calendar option `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{arabic}{locale=default,calendar=gregorian,numerals=mashriq,hijricorrection=0,abjadjimnotail=false}
+\InitializeGlossOptions{arabic}{locale=default,calendar=gregorian,numerals=mashriq,hijricorrection=0,abjadjimnotail=false}
% Register alias options
-\xpg@set@alias@values{arabic}{calendar}{islamic}{hijri}
+\SetLanguageAliasValues{arabic}{calendar}{islamic,hijri}
\def\arabicgregmonth@default#1{\ifcase#1%
% Egypt, Sudan, Yemen and Golf states
@@ -10883,9 +10828,12 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\arabicgregmonth@mauritania#1{\ifcase#1%
\or يناير\or فبراير\or مارس\or إبريل\or مايو\or يونيو\or يوليو\or أغشت\or شتمبر\or أكتوبر\or نوفمبر\or دجمبر\fi}
-\def\@arabic@month#1{\ifcsdef{arabicgregmonth@#1}{\expandafter\csname arabicgregmonth@#1\endcsname}%
-{\xpg@warning{Option `locale=#1' is not defined for Arabic: using `default' instead}%
-\arabicgregmonth@default}}
+\def\@arabic@month#1{%
+ \@ifundefined{arabicgregmonth@#1}%
+ {\xpg@warning{Option `locale=#1' is not defined for Arabic: using `default' instead}%
+ \arabicgregmonth@default}%
+ {\expandafter\csname arabicgregmonth@#1\endcsname}%
+}
%\Hijritoday is now locale-aware and will format the date with this macro:
\DefineFormatHijriDate{arabic}{\@ensure@RTL{\arabicnumber{\value{Hijriday}}%
@@ -10917,18 +10865,18 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\datearabic{%
\def\today{%
- \if@hijrical%
+ \if@hijrical
\Hijritoday[\arabic@hijri@correction]%
\else%
- \if@RTL%
+ \if@RTL
\arabicnumber\day\space\@@arabic@month{\month}%
\space\arabicnumber\year%
\else% in LR environment we format the gregorian date within \textenglish
- \ifcsdef{english@loaded}{\textenglish{\today}}%else US format
- {\normalfontlatin\ifcase\month\or January\or February\or March\or April\or May\or June\or%
- July\or August\or September\or October\or November\or December\fi%
+ \iflanguageloaded{english}{\textenglish{\today}}%else US format
+ {\normalfontlatin\ifcase\month\or January\or February\or March\or April\or May\or June\or
+ July\or August\or September\or October\or November\or December\fi
\space\number\day,\space\number\year}%
- \fi%
+ \fi
\fi}}
% Use \providecommand here as the ldf file might
@@ -10954,10 +10902,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\or ح\or ط\or ي\or ك\or ل\or م\or ن%
\or س\or ع\or ف\or ص\or ق\or ر\or ش%
\or ت\or ث\or خ\or ذ\or ض\or ظ\or غ%
- \else\xpg@ill@value{#1}{arabic@abjad@alph}\fi%
+ \else\xpg@ill@value{#1}{arabic@abjad@alph}\fi
}
-
\def\abjadmaghribi#1{%
\ifnum#1>1999\xpg@ill@value{#1}{abjad}%
\else
@@ -10980,111 +10927,111 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%maghribi س -> ص ص -> ض ش -> س ض -> ظ ظ -> غ غ -> ش
\def\abj@maghribi@num@ii#1{%
- \ifcase#1\or ي\or ك\or ل\or م\or ن%
+ \ifcase#1\abjad@zero\or ي\or ك\or ل\or م\or ن%
\or ص\or ع\or ف\or ض\fi
- \ifnum#1=\z@\abjad@zero\fi\abj@num@i}
+ \abj@num@i}
\def\abj@maghribi@num@iii#1{%
\ifcase#1\or ق\or ر\or س\or ت\or ث%
\or خ\or ذ\or ظ\or غ\fi
- \ifnum#1=\z@\fi\abj@maghribi@num@ii}
+ \abj@maghribi@num@ii}
\def\abj@maghribi@num@iv#1{%
\ifcase#1\or ش\fi
- \ifnum#1=\z@\fi\abj@maghribi@num@iii}
+ \abj@maghribi@num@iii}
\def\arabic@numbers{%
\ifarabic@abjadalph
- \let\@alph\abjadalph%
- \let\@Alph\abjadalph%
+ \let\@alph\abjadalph
+ \let\@Alph\abjadalph
\else
- \let\@alph\abjad%
- \let\@Alph\abjad%
+ \let\@alph\abjad
+ \let\@Alph\abjad
\fi
}
\def\noarabic@numbers{%
- \let\@alph\latin@alph%
- \let\@Alph\latin@Alph%
+ \let\@alph\latin@alph
+ \let\@Alph\latin@Alph
}
% Store original definition
\let\xpg@save@arabic\@arabic
\def\arabic@globalnumbers{%
- \let\@arabic\arabicnumber%
+ \let\@arabic\arabicnumber
\renewcommand\thefootnote{\localnumeral*{footnote}}%
\renewcommand\theequation{\localnumeral*{equation}}%
}
\def\noarabic@globalnumbers{%
- \let\@arabic\xpg@save@arabic%
+ \let\@arabic\xpg@save@arabic
}
\def\arabic@xetex@capsformat{%
- \let\xpg@save@sepmark\@SepMark%
+ \let\xpg@save@sepmark\@SepMark
\SepMark{\xpg@sepmark}
}
\def\noarabic@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi
}
\def\arabic@luatex@capsformat{%
%
% change chapter and part headings
\ifarabic@customsep
- \ifcsdef{chapter}{%
- \let\xpg@save@thesection\thesection%
+ \ifcsname chapter\endcsname
+ \let\xpg@save@thesection\thesection
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
- \let\xpg@save@theequation\theequation%
+ \let\xpg@save@theequation\theequation
\renewcommand*\theequation{%
\ifnum \c@chapter>\z@ \thechapter\xpg@sepmark\fi\@arabic\c@equation}
- \let\xpg@save@thefigure\thefigure%
+ \let\xpg@save@thefigure\thefigure
\renewcommand*\thefigure{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@figure}
- \let\xpg@save@thetable\thetable%
+ \let\xpg@save@thetable\thetable
\renewcommand*\thetable{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@table}
- }{}
- \let\xpg@save@thesubsection\thesubsection%
+ \fi
+ \let\xpg@save@thesubsection\thesubsection
\renewcommand\thesubsection
{\thesection\xpg@sepmark\@arabic\c@subsection}
- \let\xpg@save@thesubsubsection\thesubsubsection%
+ \let\xpg@save@thesubsubsection\thesubsubsection
\renewcommand\thesubsubsection{\thesubsection\xpg@sepmark\@arabic\c@subsubsection}
- \let\xpg@save@theparagraph\theparagraph%
+ \let\xpg@save@theparagraph\theparagraph
\renewcommand\theparagraph
{\thesubsubsection\xpg@sepmark\@arabic\c@paragraph}
- \let\xpg@save@thesubparagraph\thesubparagraph%
+ \let\xpg@save@thesubparagraph\thesubparagraph
\renewcommand\thesubparagraph{\theparagraph\xpg@sepmark\@arabic\c@subparagraph}
- \fi% (end \ifarabic@customsep)
+ \fi % (end \ifarabic@customsep)
}
\def\noarabic@luatex@capsformat{%
- \ifcsdef{xpg@save@thesection}{%
- \let\thesection\xpg@save@thesection%
- }{}%
- \ifcsdef{xpg@save@theequation}{%
- \let\theequation\xpg@save@theequation%
- }{}%
- \ifcsdef{xpg@save@thefigure}{%
- \let\thefigure\xpg@save@thefigure%
- }{}%
- \ifcsdef{xpg@save@thetable}{%
- \let\thetable\xpg@save@thetable%
- }{}%
- \ifcsdef{xpg@save@thesubsection}{%
- \let\thesubsection\xpg@save@thesubsection%
- \ifcsdef{xpg@save@thesubsubsection}{%
- \let\thesubsubsection\xpg@save@thesubsubsection%
- }{}%
- }{}%
- \ifcsdef{xpg@save@theparagraph}{%
- \let\theparagraph\xpg@save@theparagraph%
- }{}%
- \ifcsdef{xpg@save@thesubparagraph}{%
- \let\thesubparagraph\xpg@save@thesubparagraph%
- }{}%
+ \ifcsname xpg@save@thesection\endcsname
+ \let\thesection\xpg@save@thesection
+ \fi
+ \ifcsname xpg@save@theequation\endcsname
+ \let\theequation\xpg@save@theequation
+ \fi
+ \ifcsname xpg@save@thefigure\endcsname
+ \let\thefigure\xpg@save@thefigure
+ \fi
+ \ifcsname xpg@save@thetable\endcsname
+ \let\thetable\xpg@save@thetable
+ \fi
+ \ifcsname xpg@save@thesubsection\endcsname
+ \let\thesubsection\xpg@save@thesubsection
+ \ifcsname xpg@save@thesubsubsection\endcsname
+ \let\thesubsubsection\xpg@save@thesubsubsection
+ \fi
+ \fi
+ \ifcsname xpg@save@theparagraph\endcsname
+ \let\theparagraph\xpg@save@theparagraph
+ \fi
+ \ifcsname xpg@save@thesubparagraph\endcsname
+ \let\thesubparagraph\xpg@save@thesubparagraph
+ \fi
}
\def\blockextras@arabic{%
@@ -11096,7 +11043,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\fi
\fi
}
-%
+
\def\noextras@arabic{%
\ifarabic@customsep
\ifxetex
@@ -11116,7 +11063,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-armenian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-armenian.ldf}[polyglossia: module for Armenian]
@@ -11139,43 +11086,49 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@eastern@armenian
\@eastern@armenianfalse
-\define@choicekey*+{armenian}{variant}[\xpg@val\xpg@nr]{western,eastern}[western]{%
- \ifcase\xpg@nr\relax
- % western:
- \@eastern@armenianfalse%
- \or
- % eastern:
- \@eastern@armeniantrue%
- \fi
- \xpg@info{Option: Armenian, variant=\xpg@val}%
-}{\xpg@warning{Unknown Armenian variant `#1'}}
\newif\if@armenian@numerals
\@armenian@numeralsfalse
-\define@key{armenian}{numerals}[armenian]{%
- \ifstrequal{#1}{arabic}{%
- \@armenian@numeralsfalse%
- \SetLanguageKeys{armenian}{bcp47-extension-u=nu-latn}%
- }{%
- \@armenian@numeralstrue%
- \SetLanguageKeys{armenian}{bcp47-extension-u={}}%
- }%
-}
-\define@boolkey{armenian}[armenian@]{capitalyiwn}[true]{%
- \ifarmenian@capitalyiwn
- % MakeUppercase capitalizes the ligature of letters ech and yiwn (U+0587)
- % to capital ech and yiwn (also the output if Armenian is not selected at all)
- \SetLanguageKeys{armenian}{bcp47-casing=hy-x-yiwn,bcp47-extension-x=yiwn}
- \else
- % Capitalize ech and yiwn ligature to capital ech and vew,
- % following Armenian spelling reform
- \SetLanguageKeys{armenian}{bcp47-casing=hy,bcp47-extension-x={}}
- \fi
-}
+\DeclareKeys[polyglossia/gloss/armenian]
+ {
+ variant.choice:,
+ variant / western.code =
+ {%
+ \@eastern@armenianfalse
+ },
+ variant / eastern.code =
+ {%
+ \@eastern@armeniantrue
+ },
+ variant.default:n = western,
+ variant/unknown.code = \xpg@warning{Unknown Armenian variant `#1'},
+ numerals.choice:,
+ numerals / armenian.code =
+ {%
+ \@armenian@numeralstrue
+ \SetLanguageKeys{armenian}{bcp47-extension-u={}}%
+ },
+ numerals / arabic.code =
+ {%
+ \@armenian@numeralsfalse
+ \SetLanguageKeys{armenian}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = armenian,
+ capitalyiwn.choice:,
+ capitalyiwn / true.code =
+ {%
+ \SetLanguageKeys{armenian}{bcp47-casing=hy-x-yiwn,bcp47-extension-x=yiwn}%
+ },
+ capitalyiwn / false.code =
+ {%
+ \SetLanguageKeys{armenian}{bcp47-casing=hy,bcp47-extension-x={}}%
+ },
+ capitalyiwn.default:n = true
+ }
% Register default options
-\xpg@initialize@gloss@options{armenian}{numerals=armenian,variant=western}
+\InitializeGlossOptions{armenian}{numerals=armenian,variant=western}
% Taken from ArmTeX. Audit!
\def\captionsarmenian{%
@@ -11324,13 +11277,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-arq.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-arq.ldf}[polyglossia: module for arq (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -11341,13 +11294,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ary.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ary.ldf}[polyglossia: module for ary (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -11358,13 +11311,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-arz.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-arz.ldf}[polyglossia: module for arz (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -11375,13 +11328,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ast.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ast.ldf}[polyglossia: module for ast (Asturian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{asturian}
+\InheritGlossFile{asturian}
% \end{macrocode}
% \iffalse
@@ -11392,7 +11345,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-asturian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% Translated by Xuacu <xuacusk8 at gmail dot com>
% Contributed by Kevin Godby <godbyk at gmail dot com>
@@ -11452,13 +11405,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-australian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-australian.ldf}[polyglossia: module for Australian English]
% We provide this as a babel alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -11469,13 +11422,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-austrian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-austrian.ldf}[polyglossia: module for Austrian German (old spelling)]
% We provide this as a babel alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -11486,13 +11439,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ayl.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ayl.ldf}[polyglossia: module for ayl (Arabic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{arabic}
+\InheritGlossFile{arabic}
% \end{macrocode}
% \iffalse
@@ -11503,13 +11456,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bahasa.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bahasa.ldf}[polyglossia: module for Bahasa Indonesia]
% We provide this as a babel alias
-\xpg@load@master@language{malay}
+\InheritGlossFile{malay}
% \end{macrocode}
% \iffalse
@@ -11520,14 +11473,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bahasai.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bahasai.ldf}[polyglossia: module for Bahasa Indonesia]
% We only provide this gloss for babel compatibility. Since bahasai is
% a malay variety, we use 'malay' with variant 'indonesian' now.
-\xpg@load@master@language{malay}
+\InheritGlossFile{malay}
% \end{macrocode}
% \iffalse
@@ -11538,14 +11491,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bahasam.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bahasam.ldf}[polyglossia: module for Bahasa Melayu]
% We only provide this gloss for babel compatibility. Since bahasam is
% a malay variety, we use 'malay' with variant 'malaysian' now.
-\xpg@load@master@language{malay}
+\InheritGlossFile{malay}
% \end{macrocode}
% \iffalse
@@ -11556,7 +11509,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-basque.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-basque.ldf}[polyglossia: module for Basque]
\PolyglossiaSetup{basque}{
@@ -11614,13 +11567,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-be-tarask.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-be-tarask.ldf}[polyglossia: module for be-tarask (Belarusian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{belarusian}
+\InheritGlossFile{belarusian}
% \end{macrocode}
% \iffalse
@@ -11631,13 +11584,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-be.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-be.ldf}[polyglossia: module for be (Belarusian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{belarusian}
+\InheritGlossFile{belarusian}
% \end{macrocode}
% \iffalse
@@ -11648,7 +11601,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-belarusian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-belarusian.ldf}[polyglossia: module for Belarusian]
@@ -11676,63 +11629,68 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*{belarusian}{be}
\def\belarusian@spelling{modern}
-\define@choicekey*+{belarusian}{spelling}[\xpg@val\xpg@nr]{modern,classic,tarask}[modern]{%
- \ifcase\xpg@nr\relax
- % modern:
- \def\belarusian@spelling{modern}%
- \SetLanguageKeys{belarusian}{bcp47=be,bcp47-variant=1959acad}%
- \or
- % classic:
- \def\belarusian@spelling{tarask}%
- \SetLanguageKeys{belarusian}{bcp47=be-tarask,bcp47-variant=tarask}%
- \or
- % tarask:
- \def\belarusian@spelling{tarask}%
- \SetLanguageKeys{belarusian}{bcp47=be-tarask,bcp47-variant=tarask}%
- \fi
-}{\xpg@warning{Unknown Belarusian spelling `#1'}}
-
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{belarusian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\xpg@nr\relax
- % arabic:
- \cyrillic@numeralsfalse%
- \cyrillic@asbuk@numeralsfalse%
- \or
- % cyrillic:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \or
- % cyrillic-trad:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \or
- % cyrillic-alph:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralstrue%
- \fi
- \xpg@info{Option: Belarusian, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Belarusian numerals value `#1'}}
-\define@boolkey{belarusian}[belarusian@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/belarusian]
+ {
+ babelshorthands.if = belarusian@babelshorthands,
+ babelshorthands.default:n = true,
+ spelling.choice:,
+ spelling / modern.code =
+ {%
+ \def\belarusian@spelling{modern}%
+ \SetLanguageKeys{belarusian}{bcp47=be,bcp47-variant=1959acad}%
+ },
+ spelling / classic.code =
+ {%
+ \def\belarusian@spelling{tarask}%
+ \SetLanguageKeys{belarusian}{bcp47=be-tarask,bcp47-variant=tarask}%
+ },
+ spelling / tarask.code =
+ {%
+ \def\belarusian@spelling{tarask}%
+ \SetLanguageKeys{belarusian}{bcp47=be-tarask,bcp47-variant=tarask}%
+ },
+ spelling.default:n = modern,
+ spelling/unknown.code = \xpg@warning{Unknown Belarusian spelling `#1'},
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \cyrillic@numeralsfalse
+ \cyrillic@asbuk@numeralsfalse
+ },
+ numerals / cyrillic.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ },
+ numerals / cyrillic-trad.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ },
+ numerals / cyrillic-alph.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralstrue
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Belarusian numerals value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{belarusian}{babelshorthands=false,numerals=arabic,spelling=modern}
+\InitializeGlossOptions{belarusian}{babelshorthands=false,numerals=arabic,spelling=modern}
% Register alias options
-\xpg@set@alias@values{belarusian}{spelling}{classic}{tarask}
+\SetLanguageAliasValues{belarusian}{spelling}{classic,tarask}
\ifsystem@babelshorthands
- \setkeys{belarusian}{babelshorthands=true}
+ \SetGlossOptions{belarusian}{babelshorthands=true}
\else
- \setkeys{belarusian}{babelshorthands=false}
+ \SetGlossOptions{belarusian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\belarusian@shorthands{%
\xpg@activate@shorthands%
@@ -11976,7 +11934,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bengali.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% Translations provided by সাজেদুর রহিম জোয়ারদার <toshazed@gmail.com>
% TODO implement Bengali calendar
@@ -12005,30 +11963,36 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\ifbengali@devanagari@numerals
\newif\ifbengali@bengali@numerals
-\define@choicekey*+{bengali}{numerals}[\xpg@val\xpg@nr]{Devanagari,Bengali,Western}[Devanagari]{%
- \ifcase\xpg@nr\relax
- % Devanagari:
- \bengali@bengali@numeralsfalse%
- \bengali@devanagari@numeralstrue%
- \or
- % Bengali:
- \bengali@bengali@numeralstrue%
- \bengali@devanagari@numeralsfalse%
- \or
- % Western:
- \bengali@bengali@numeralsfalse%
- \bengali@devanagari@numeralsfalse%
- \fi
- \xpg@info{Option: Bengali, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Bengali numeral `#1'}}
\def\extras@bengali{}
\def\noextras@bengali{}
-\define@boolkey{bengali}[bengali@]{changecounternumbering}[true]{}
+\DeclareKeys[polyglossia/gloss/bengali]
+ {
+ changecounternumbering.if = bengali@changecounternumbering,
+ changecounternumbering.default:n = true,
+ numerals.choice:,
+ numerals / devanagari.code =
+ {%
+ \bengali@bengali@numeralsfalse
+ \bengali@devanagari@numeralstrue
+ },
+ numerals / bengali.code =
+ {%
+ \bengali@bengali@numeralstrue
+ \bengali@devanagari@numeralsfalse
+ },
+ numerals / western.code =
+ {%
+ \bengali@bengali@numeralsfalse
+ \bengali@devanagari@numeralsfalse
+ },
+ numerals.default:n = devanagari,
+ numerals/unknown.code = \xpg@warning{Unknown Bengali numeral `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{bengali}{changecounternumbering=false,numerals=Devanagari}
+\InitializeGlossOptions{bengali}{changecounternumbering=false,numerals=Devanagari}
\def\captionsbengali{%
\def\refname{তথ্যসূত্রসমূহ}%
@@ -12117,13 +12081,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bg.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bg.ldf}[polyglossia: module for bg (Bulgarian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{bulgarian}
+\InheritGlossFile{bulgarian}
% \end{macrocode}
% \iffalse
@@ -12134,13 +12098,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bn.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bn.ldf}[polyglossia: module for bn (Bengali)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{bengali}
+\InheritGlossFile{bengali}
% \end{macrocode}
% \iffalse
@@ -12151,13 +12115,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bo.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bo.ldf}[polyglossia: module for bo (Tibetan)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{tibetan}
+\InheritGlossFile{tibetan}
% \end{macrocode}
% \iffalse
@@ -12168,7 +12132,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bosnian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bosnian.ldf}[polyglossia: module for Bosnian]
@@ -12232,13 +12196,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-br.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-br.ldf}[polyglossia: module for br (Breton)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{breton}
+\InheritGlossFile{breton}
% \end{macrocode}
% \iffalse
@@ -12249,7 +12213,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-brazil.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-brazil.ldf}[polyglossia: module for Brazilian Portuguese]
@@ -12257,7 +12221,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% 'brazil' was selected in accordance with babel.
% Since brazil is a variety of portuguese, we use 'portuguese' now.
-\xpg@load@master@language{portuguese}
+\InheritGlossFile{portuguese}
% \end{macrocode}
% \iffalse
@@ -12268,7 +12232,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-breton.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-breton.ldf}[polyglossia: module for Breton]
\PolyglossiaSetup{breton}{
@@ -12376,13 +12340,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-british.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-british.ldf}[polyglossia: module for British English]
% We provide this as a babel alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -12393,13 +12357,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bs.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bs.ldf}[polyglossia: module for bs (Bosnian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{bosnian}
+\InheritGlossFile{bosnian}
% \end{macrocode}
% \iffalse
@@ -12410,7 +12374,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-bulgarian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-bulgarian.ldf}[polyglossia: module for Bulgarian]
\PolyglossiaSetup{bulgarian}{
@@ -12473,15 +12437,15 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\figurename{Фигура}%
\def\tablename{Таблица}%
%\def\thepart{}%
- %\def\partname{}%
+ \def\partname{Част}%
\def\pagename{Стр.}%
\def\seename{вж.}%
\def\alsoname{вж.\ също и}%
\def\enclname{Приложения}%
\def\ccname{копия}%
- %\def\headtoname{}%
- \def\proofname{Proof}%
- \def\glossaryname{Glossary}%
+ \def\headtoname{За}%
+ \def\proofname{Доказателство}%
+ \def\glossaryname{Притурка}%
}
\def\datebulgarian{%
@@ -12512,13 +12476,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ca.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ca.ldf}[polyglossia: module for ca (Catalan)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{catalan}
+\InheritGlossFile{catalan}
% \end{macrocode}
% \iffalse
@@ -12529,13 +12493,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-canadian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-canadian.ldf}[polyglossia: module for Canadian English]
% We provide this as a babel alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -12546,13 +12510,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-canadien.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-canadien.ldf}[polyglossia: module for Canadian French]
% We provide this as a babel alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
@@ -12563,7 +12527,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-catalan.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for Catalan]
\PolyglossiaSetup{catalan}{
@@ -12581,21 +12545,21 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{catalan}{ca}
-\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/catalan]
+ {
+ babelshorthands.if = catalan@babelshorthands,
+ babelshorthands.default:n = true,
+ }
\ifsystem@babelshorthands
- \setkeys{catalan}{babelshorthands=true}
+ \SetGlossOptions{catalan}{babelshorthands=true}
\else
- \setkeys{catalan}{babelshorthands=false}
+ \SetGlossOptions{catalan}{babelshorthands=false}
\fi
% Register default options
-\xpg@initialize@gloss@options{catalan}{babelshorthands=false}
+\InitializeGlossOptions{catalan}{babelshorthands=false}
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
%%% adapted from Babel's catalan.ldf
\newdimen\leftllkern \newdimen\rightllkern \newdimen\raiselldim
@@ -12732,7 +12696,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-chinese.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-chinese.ldf}[polyglossia: module for Chinese]
@@ -12756,51 +12720,60 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*[variant=simplified]{chinese}{zh-CN}
\setlanguagealias*[variant=traditional]{chinese}{zh-TW}
-\providebool{chinese@traditional}
+\@ifundefined{ifchinese@traditional}%
+ {\newif\ifchinese@traditional}{}
-\def\chinese@variant{chinese}
-
-\newif\ifchinese@numerals
-\define@key{chinese}{numerals}[arabic]{%
- \ifstrequal{#1}{chinese}%
- {\chinese@numeralstrue%
- \SetLanguageKeys{chinese}{bcp47-extension-u=nu-hant}%
- }{\chinese@numeralsfalse%
- \SetLanguageKeys{chinese}{bcp47-extension-u=nu-latn}%
- }%
-}
+\@ifundefined{ifchinese@numerals}%
+ {\newif\ifchinese@numerals}{}
+\def\chinese@variant{chinese}
-\define@choicekey*+{chinese}{variant}[\xpg@val\xpg@nr]{cn,simplified,tw,traditional}[cn]{%
- \ifcase\xpg@nr\relax
- % cn:
- \chinese@traditionalfalse
- \SetLanguageKeys{chinese}{language={Chinese Simplified},langtag=ZHS,bcp47=zh-CN,bcp47-language=zh,bcp47-region=CN,bcp47-script=Hans}%
- \xpg@info{Option: Chinese, variant=simplified}%
- \or
- % simplified:
- \chinese@traditionalfalse
- \SetLanguageKeys{chinese}{language={Chinese Simplified},langtag=ZHS,bcp47=zh-CN,bcp47-language=zh,bcp47-region=CN,bcp47-script=Hans}%
- \xpg@info{Option: Chinese, variant=simplified}%
- \or
- % tw:
- \chinese@traditionaltrue
- \SetLanguageKeys{chinese}{language={Chinese Traditional},langtag=ZHT,bcp47=zh-TW,bcp47-language=zh,bcp47-region=TW,bcp47-script=Hant}%
- \xpg@info{Option: Chinese, variant=traditional}%
- \or
- % traditional:
- \chinese@traditionaltrue
- \SetLanguageKeys{chinese}{language={Chinese Traditional},langtag=ZHT,bcp47=zh-TW,bcp47-language=zh,bcp47-region=TW,bcp47-script=Hant}%
- \xpg@info{Option: Chinese, variant=traditional}%
- \fi
-}{\xpg@warning{Unknown Chinese variant `#1'}}
+\DeclareKeys[polyglossia/gloss/chinese]
+ {
+ variant.choice:,
+ variant / cn.code =
+ {%
+ \chinese@traditionalfalse
+ \SetLanguageKeys{chinese}{language={Chinese Simplified},langtag=ZHS,bcp47=zh-CN,bcp47-language=zh,bcp47-region=CN,bcp47-script=Hans}%
+ },
+ variant / simplified.code =
+ {%
+ \chinese@traditionalfalse
+ \SetLanguageKeys{chinese}{language={Chinese Simplified},langtag=ZHS,bcp47=zh-CN,bcp47-language=zh,bcp47-region=CN,bcp47-script=Hans}%
+ },
+ variant / tw.code =
+ {%
+ \chinese@traditionaltrue
+ \SetLanguageKeys{chinese}{language={Chinese Traditional},langtag=ZHT,bcp47=zh-TW,bcp47-language=zh,bcp47-region=TW,bcp47-script=Hant}%
+ },
+ variant / traditional.code =
+ {%
+ \chinese@traditionaltrue
+ \SetLanguageKeys{chinese}{language={Chinese Traditional},langtag=ZHT,bcp47=zh-TW,bcp47-language=zh,bcp47-region=TW,bcp47-script=Hant}%
+ },
+ variant.default:n = cn,
+ variant/unknown.code = \xpg@warning{Unknown Chinese variant `#1'},
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \chinese@numeralsfalse
+ \SetLanguageKeys{chinese}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / chinese.code =
+ {%
+ \chinese@numeralstrue
+ \SetLanguageKeys{chinese}{bcp47-extension-u=nu-hant}%
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Chinese numerals value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{chinese}{variant=cn,numerals=arabic}
-%\xpg@initialize@gloss@options{chinese}{variant=tw,numerals=arabic}
+\InitializeGlossOptions{chinese}{variant=cn,numerals=arabic}
+%\InitializeGlossOptions{chinese}{variant=tw,numerals=arabic}
% Register alias options
-\xpg@set@alias@values{chinese}{variant}{cn}{simplified}
-\xpg@set@alias@values{chinese}{variant}{tw}{traditional}
+\SetLanguageAliasValues{chinese}{variant}{cn,simplified}
+\SetLanguageAliasValues{chinese}{variant}{tw,traditional}
\def\chinese@capsformat{%
@@ -12852,7 +12825,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\enclname{附件}%
\def\ccname{抄送}%
\def\headtoname{收件人}%
- \def\\glossaryname{詞彙表}%
+ \def\glossaryname{詞彙表}%
}
\def\captions@chinese@simplified{%
\def\contentsname{目录}%
@@ -12875,7 +12848,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\enclname{附件}%
\def\ccname{抄送}%
\def\headtoname{收件人}%
- \def\\glossaryname{词汇表}%
+ \def\glossaryname{词汇表}%
}
\newcount\c@TempJNum%
@@ -13023,13 +12996,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ckb-Arab.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ckb-Arab.ldf}[polyglossia: module for ckb-Arab (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -13040,13 +13013,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ckb-Latn.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ckb-Latn.ldf}[polyglossia: module for ckb-Latn (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -13057,30 +13030,47 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ckb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ckb.ldf}[polyglossia: module for ckb (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
%</gloss-ckb.ldf>
+%<*gloss-classiclatin.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-classiclatin.ldf}
+% \begin{macrocode}
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
+%
+\ProvidesFile{gloss-classiclatin.ldf}[polyglossia: module for classic Latin]
+
+% We provide this as a babel alias
+
+\InheritGlossFile{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-classiclatin.ldf>
%<*gloss-cop.ldf>
% \fi
% \clearpage
%
% \subsection{gloss-cop.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-cop.ldf}[polyglossia: module for cop (Coptic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{coptic}
+\InheritGlossFile{coptic}
% \end{macrocode}
% \iffalse
@@ -13091,7 +13081,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-coptic.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-coptic.ldf}[polyglossia: module for Coptic]
\PolyglossiaSetup{coptic}{
@@ -13147,7 +13137,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-croatian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-croatian.ldf}[polyglossia: module for Croatian]
\PolyglossiaSetup{croatian}{
@@ -13169,40 +13159,40 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\RequirePackage{luavlna}
\fi
-\define@boolkey{croatian}[croatian@]{babelshorthands}[true]{}
-
-\define@boolkey{croatian}[croatian@]{disabledigraphs}[true]{}
-
-% Alias kept for backwards compatibility. Please do not remove
-\define@boolkey{croatian}[croatian@]{disableligatures}[true]{%
- \xpg@warning{The option disableligatures is deprected.\MessageBreak
- Please use disabledigraphs instead}%
- \ifcroatian@disableligatures
- \croatian@disabledigraphstrue
- \else
- \croatian@disabledigraphsfalse
- \fi
-}
-
-\define@boolkey{croatian}[croatian@]{splithyphens}[true]{}
-
-\define@boolkey{croatian}[croatian@]{localalph}[true]{}
+\DeclareKeys[polyglossia/gloss/croatian]
+ {
+ babelshorthands.if = croatian@babelshorthands,
+ babelshorthands.default:n = true,
+ disabledigraphs.if = croatian@disabledigraphs,
+ disabledigraphs.default:n = true,
+ splithyphens.if = croatian@splithyphens,
+ splithyphens.default:n = true,
+ localalph.if = croatian@localalph,
+ localalph.default:n = true,
+ disableligatures.choices:nn = { true, false }
+ {%
+ \xpg@warning{The option disableligatures is deprecated.\MessageBreak
+ Please use disabledigraphs instead}%
+ \ifcase\UseName{l_keys_choice_int}\or
+ \croatian@disabledigraphstrue
+ \or
+ \croatian@disabledigraphsfalse
+ \fi
+ },
+ disableligatures.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{croatian}{babelshorthands=false,disabledigraphs=false,
+\InitializeGlossOptions{croatian}{babelshorthands=false,disabledigraphs=false,
splithyphens=true,localalph=true}
\ifsystem@babelshorthands
- \setkeys{croatian}{babelshorthands=true}
+ \SetGlossOptions{croatian}{babelshorthands=true}
\else
- \setkeys{croatian}{babelshorthands=false}
+ \SetGlossOptions{croatian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\let\xpg@hyphen@char-
\def\croatian@@splhyphen#1{%
@@ -13423,13 +13413,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-cy.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-cy.ldf}[polyglossia: module for cy (Welsh)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{welsh}
+\InheritGlossFile{welsh}
% \end{macrocode}
% \iffalse
@@ -13440,13 +13430,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-cz.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-cz.ldf}[polyglossia: module for cz (Czech)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{czech}
+\InheritGlossFile{czech}
% \end{macrocode}
% \iffalse
@@ -13457,7 +13447,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-czech.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-czech.ldf}[polyglossia: module for Czech]
@@ -13480,26 +13470,26 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\RequirePackage{luavlna}
\fi
-\define@boolkey{czech}[czech@]{babelshorthands}[true]{}
-
-\define@boolkey{czech}[czech@]{splithyphens}[true]{}
-
-\define@boolkey{czech}[czech@]{vlna}[true]{}
+\DeclareKeys[polyglossia/gloss/czech]
+ {
+ babelshorthands.if = czech@babelshorthands,
+ babelshorthands.default:n = true,
+ splithyphens.if = czech@splithyphens,
+ splithyphens.default:n = true,
+ vlna.if = czech@vlna,
+ vlna.default:n = true
+ }
% Register default options
-\xpg@initialize@gloss@options{czech}{babelshorthands=false,splithyphens=true,vlna=true}
+\InitializeGlossOptions{czech}{babelshorthands=false,splithyphens=true,vlna=true}
\ifsystem@babelshorthands
- \setkeys{czech}{babelshorthands=true}
+ \SetGlossOptions{czech}{babelshorthands=true}
\else
- \setkeys{czech}{babelshorthands=false}
+ \SetGlossOptions{czech}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\czech@@splithyphen#1{%
\def\czech@sh@tmp{%
@@ -13716,13 +13706,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-da.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-da.ldf}[polyglossia: module for da (Danish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{danish}
+\InheritGlossFile{danish}
% \end{macrocode}
% \iffalse
@@ -13733,7 +13723,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-danish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-danish.ldf}[polyglossia: module for Danish]
\PolyglossiaSetup{danish}{
@@ -13790,13 +13780,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-AT-1901.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-AT-1901.ldf}[polyglossia: module for de-AT-1901 (Austrian German, old spelling)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13807,13 +13797,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-AT-1996.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-AT-1996.ldf}[polyglossia: module for de-AT-1996 (Austrian German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13824,13 +13814,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-AT.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-AT.ldf}[polyglossia: module for de-AT (Austrian German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13841,13 +13831,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-CH-1901.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-CH-1901.ldf}[polyglossia: module for de-CH-1901 (Swiss German, old spelling)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13858,13 +13848,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-CH-1996.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-CH-1996.ldf}[polyglossia: module for de-CH-1996 (Swiss German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13875,13 +13865,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-CH.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-CH.ldf}[polyglossia: module for de-CH (Swiss German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13892,13 +13882,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-DE-1901.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-DE-1901.ldf}[polyglossia: module for de-DE-1901 (Germany's German, old spelling)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13909,13 +13899,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-DE-1996.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-DE-1996.ldf}[polyglossia: module for de-DE-1996 (Germany's German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13926,13 +13916,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-DE.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-DE.ldf}[polyglossia: module for de-DE (Germany's German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13943,13 +13933,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-AT-1901.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-AT-1901-Latf.ldf}[polyglossia: module for de-AT-1901-Latf (Austrian German, old spelling)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13960,13 +13950,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-AT-1996.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-AT-1996-Latf.ldf}[polyglossia: module for de-AT-1996-Latf (Austrian German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13977,13 +13967,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-AT.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-AT-Latf.ldf}[polyglossia: module for de-AT-Latf (Austrian German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -13994,13 +13984,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-CH-1901.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-CH-1901-Latf.ldf}[polyglossia: module for de-CH-1901-Latf (Swiss German, old spelling)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14011,13 +14001,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-CH-1996.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-CH-1996-Latf.ldf}[polyglossia: module for de-CH-1996-Latf (Swiss German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14028,13 +14018,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-CH.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-CH-Latf.ldf}[polyglossia: module for de-CH-Latf (Swiss German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14045,13 +14035,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-DE-1901.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-DE-1901-Latf.ldf}[polyglossia: module for de-DE-1901-Latf (Germany's German, old spelling)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14062,13 +14052,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-DE-1996.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-DE-1996-Latf.ldf}[polyglossia: module for de-DE-1996-Latf (Germany's German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14079,13 +14069,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf-DE.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-DE-Latf.ldf}[polyglossia: module for de-DE-Latf (Germany's German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14096,13 +14086,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de-Latf.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de-Latf.ldf}[polyglossia: module for de-Latf (German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14113,13 +14103,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-de.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-de.ldf}[polyglossia: module for de (German)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -14130,7 +14120,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-divehi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-divehi.ldf}[polyglossia: module for Divehi]
@@ -14185,13 +14175,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-dsb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-dsb.ldf}[polyglossia: module for dsb (Sorbian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{sorbian}
+\InheritGlossFile{sorbian}
% \end{macrocode}
% \iffalse
@@ -14202,7 +14192,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-dutch.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-dutch.ldf}[polyglossia: module for Dutch]
\PolyglossiaSetup{dutch}{
@@ -14219,24 +14209,24 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{dutch}{nl}
-\define@boolkey{dutch}[dutch@]{babelshorthands}[true]{}
-
-\define@boolkey{dutch}[dutch@]{tremahyphenation}[true]{}
+\DeclareKeys[polyglossia/gloss/dutch]
+ {
+ babelshorthands.if = dutch@babelshorthands,
+ babelshorthands.default:n = true,
+ tremahyphenation.if = dutch@tremahyphenation,
+ tremahyphenation.default:n = true
+ }
% Register default options
-\xpg@initialize@gloss@options{dutch}{babelshorthands=false,tremahyphenation=true}
+\InitializeGlossOptions{dutch}{babelshorthands=false,tremahyphenation=true}
\ifsystem@babelshorthands
- \setkeys{dutch}{babelshorthands=true}
+ \SetGlossOptions{dutch}{babelshorthands=true}
\else
- \setkeys{dutch}{babelshorthands=false}
+ \SetGlossOptions{dutch}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\xpg@trema#1{\allowhyphens\discretionary{-}{#1}{\"{#1}}\allowhyphens}
@@ -14412,30 +14402,47 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-dv.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-dv.ldf}[polyglossia: module for dv (Divehi)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{divehi}
+\InheritGlossFile{divehi}
% \end{macrocode}
% \iffalse
%</gloss-dv.ldf>
+%<*gloss-ecclesiasticlatin.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-ecclesiasticlatin.ldf}
+% \begin{macrocode}
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
+%
+\ProvidesFile{gloss-ecclesiasticlatin.ldf}[polyglossia: module for ecclesiastic Latin]
+
+% We provide this as a babel alias
+
+\InheritGlossFile{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-ecclesiasticlatin.ldf>
%<*gloss-el-monoton.ldf>
% \fi
% \clearpage
%
% \subsection{gloss-el-monoton.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-el-monoton.ldf}[polyglossia: module for el-monoton (Greek)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{greek}
+\InheritGlossFile{greek}
% \end{macrocode}
% \iffalse
@@ -14446,13 +14453,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-el-polyton.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-el-polyton.ldf}[polyglossia: module for el-polyton (Greek)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{greek}
+\InheritGlossFile{greek}
% \end{macrocode}
% \iffalse
@@ -14463,13 +14470,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-el.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-el.ldf}[polyglossia: module for el (Greek)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{greek}
+\InheritGlossFile{greek}
% \end{macrocode}
% \iffalse
@@ -14480,13 +14487,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-en-AU.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-en-AU.ldf}[polyglossia: module for en-AU (Australian English)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -14497,13 +14504,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-en-CA.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
-\ProvidesFile{gloss-en-CA.ldf}[polyglossia: module for en-CA (Canadan English)]
+\ProvidesFile{gloss-en-CA.ldf}[polyglossia: module for en-CA (Canadian English)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -14514,13 +14521,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-en-GB.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-en-GB.ldf}[polyglossia: module for en-GB (British English)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -14531,13 +14538,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-en-NZ.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-en-NZ.ldf}[polyglossia: module for en-NZ (Newzealand English)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -14548,13 +14555,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-en-US.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-en-US.ldf}[polyglossia: module for en-US (American English)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -14565,13 +14572,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-en.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-en.ldf}[polyglossia: module for en (English)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -14582,7 +14589,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-english.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-english.ldf}[polyglossia: module for English]
@@ -14614,9 +14621,12 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias[variant=canadian]{english}{canadian}
\setlanguagealias[variant=newzealand]{english}{newzealand}
-\providebool{british@hyphen}
-\providebool{english@ordinalmonthday}
-\providebool{british@dateformat}
+\@ifundefined{ifbritish@hyphen}%
+ {\newif\ifbritish@hyphen}{}
+\@ifundefined{ifenglish@ordinalmonthday}%
+ {\newif\ifenglish@ordinalmonthday}{}
+\@ifundefined{ifbritish@dateformat}%
+ {\newif\ifbritish@dateformat}{}
% US English (\l@english) is default
% Initialize its settings
@@ -14625,49 +14635,46 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\english@ordinalmonthdayfalse
\british@dateformatfalse
-% Option ordinalmonthday
-\define@boolkey{english}[english@]{ordinalmonthday}[true]{}
-
-\define@choicekey*+{english}{variant}[\xpg@val\xpg@nr]{uk,british,us,american,usmax,australian,newzealand,canadian}[us]{%
- \ifcase\xpg@nr\relax
+\DeclareKeys[polyglossia/gloss/english]
+ {
+ ordinalmonthday.if = english@ordinalmonthday,
+ ordinalmonthday.default:n = true,
+ variant.choices:nn = { uk, british, us, american, usmax, australian, newzealand, canadian }
+ {%
+ \ifcase\UseName{l_keys_choice_int}\or
% uk:
\british@hyphentrue
\british@dateformattrue
\english@ordinalmonthdaytrue
\SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}%
- \xpg@info{Option: English, variant=british}%
\or
% british:
\british@hyphentrue
\british@dateformattrue
\english@ordinalmonthdaytrue
\SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}%
- \xpg@info{Option: english variant=british}%
\or
% us:
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
\SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}%
- \xpg@info{Option: English, variant=american}%
\or
% american:
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
\SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}%
- \xpg@info{Option: English, variant=american}%
\or
% usmax:
\british@hyphenfalse
\british@dateformatfalse
\english@ordinalmonthdayfalse
\SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}%
- \xpg@info{Option: english variant=american (with additional patterns)}%
- \xpg@ifdefined{usenglishmax}{}%
+ \IfLanguageDefinedF{usenglishmax}%
{\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak
I will use the standard patterns for US English instead}%
- \adddialect\l@usenglishmax\l@english\relax%
+ \adddialect\l@usenglishmax\l@english
}%
\def\english@variant{usenglishmax}%
\or
@@ -14678,8 +14685,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\british@dateformattrue
\english@ordinalmonthdayfalse
\SetLanguageKeys{english}{babelname=australian,bcp47=en-AU,bcp47-language=en,bcp47-region=AU}%
- \xpg@info{Option: English, variant=australian}%
- \adddialect\l@australian\l@english%
+ \adddialect\l@australian\l@english
\or
% newzealand:
% These use the british hyphenation patterns
@@ -14688,8 +14694,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\british@dateformattrue
\english@ordinalmonthdayfalse
\SetLanguageKeys{english}{babelname=newzealand,bcp47=en-NZ,bcp47-language=en,bcp47-region=NZ}%
- \xpg@info{Option: English, variant=newzealand}%
- \adddialect\l@newzealand\l@english%
+ \adddialect\l@newzealand\l@english
\or
% canadian:
% This is currently equivalent to usenglish (as in babel)
@@ -14697,45 +14702,35 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\british@dateformatfalse
\english@ordinalmonthdayfalse
\SetLanguageKeys{english}{babelname=canadian,bcp47=en-CA,bcp47-language=en,bcp47-region=CA}%
- \xpg@info{Option: English, variant=american}%
- \adddialect\l@canadian\l@english%
+ \adddialect\l@canadian\l@english
\fi
\ifbritish@hyphen
- \xpg@ifdefined{ukenglish}{}%
+ \IfLanguageDefinedF{ukenglish}%
{\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak
I will use the patterns for US English instead}%
- \adddialect\l@ukenglish\l@english\relax%
+ \adddialect\l@ukenglish\l@english
}%
\def\english@variant{ukenglish}%
\fi
-}{\xpg@warning{Unknown English variant `#1'}}
+ },
+ variant.default:n = us,
+ variant/unknown.code = \xpg@warning{Unknown English variant `#1'},
+ }
% Register default options
-\xpg@initialize@gloss@options{english}{variant=us,ordinalmonthday=false}
+\InitializeGlossOptions{english}{variant=us,ordinalmonthday=false}
% Register alias options
-\xpg@set@alias@values{english}{variant}{us}{american}
-\xpg@set@alias@values{english}{variant}{uk}{british}
+\SetLanguageAliasValues{english}{variant}{us,american}
+\SetLanguageAliasValues{english}{variant}{uk,british}
\ifxetex
% Check if \l@english is defined. If not, try to set it to some variety
- % (specific order as in the csv list below), or null language if everything fails
- \xpg@ifdefined{english}{}{%
- \def\do##1{%
- \xpg@ifdefined{#1}%
- {\csletcs{l@english}{l@#1}\listbreak}%
- {%
- \xpg@warning{No hyphenation patterns for English found"\MessageBreak
- I will use the 'null' language instead}%
- \adddialect\l@english0
- }%
- }%
- \docsvlist{british, american, usenglishmax, australian, newzealand}
- \xpg@ifdefined{english}{}{}
- }%
+ % (specific order as in the csv list), or null language if everything fails
+ \TryPatternWithFallback{english}{british, american, usenglishmax, australian, newzealand}
\fi
\def\english@language{%
- \polyglossia@setup@language@patterns{\english@variant}%
+ \SetupPolyglossiaLangPatterns{\english@variant}%
}%
\def\captionsenglish{%
@@ -14793,13 +14788,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-eo.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-eo.ldf}[polyglossia: module for eo (Esperanto)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{esperanto}
+\InheritGlossFile{esperanto}
% \end{macrocode}
% \iffalse
@@ -14810,13 +14805,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-es-ES.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-es-ES.ldf}[polyglossia: module for es-ES (Spain's Spanish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{spanish}
+\InheritGlossFile{spanish}
% \end{macrocode}
% \iffalse
@@ -14827,13 +14822,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-es-MX.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-es-MX.ldf}[polyglossia: module for es-MX (Mexican Spanish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{spanish}
+\InheritGlossFile{spanish}
% \end{macrocode}
% \iffalse
@@ -14844,13 +14839,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-es.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-es.ldf}[polyglossia: module for es (Spanish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{spanish}
+\InheritGlossFile{spanish}
% \end{macrocode}
% \iffalse
@@ -14861,7 +14856,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-esperanto.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-esperanto.ldf}[polyglossia: module for Esperanto]
\PolyglossiaSetup{esperanto}{
@@ -14892,10 +14887,10 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\figurename{Figuro}%
\def\tablename{Tabelo}%
%\def\thepart{}%
- %\def\partname{}%
+ \def\partname{Parto}%
\def\pagename{Paĝo}%
\def\seename{vidu}%
- \def\alsoname{Parto}%
+ \def\alsoname{vidu ankaŭ}%
\def\enclname{Aldono(j)}%
\def\ccname{Kopie al}%
\def\headtoname{Al}%
@@ -14941,7 +14936,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-estonian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-estonian.ldf}[polyglossia: module for Estonian]
\PolyglossiaSetup{estonian}{
@@ -14981,7 +14976,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\ccname{Koopia(d)}%
%\def\headtoname{}%
\def\proofname{Korrektuur}%
- \def\glossaryname{Glossary}% <-- need translation
+ \def\glossaryname{Sõnastik}%
}
\def\dateestonian{%
\def\today{\number\day.\space\ifcase\month\or
@@ -14998,13 +14993,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-et.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-et.ldf}[polyglossia: module for et (Estonian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{estonian}
+\InheritGlossFile{estonian}
% \end{macrocode}
% \iffalse
@@ -15015,13 +15010,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-eu.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-eu.ldf}[polyglossia: module for eu (Basque)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{basque}
+\InheritGlossFile{basque}
% \end{macrocode}
% \iffalse
@@ -15032,13 +15027,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fa.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fa.ldf}[polyglossia: module for fa (Persian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{persian}
+\InheritGlossFile{persian}
% \end{macrocode}
% \iffalse
@@ -15049,14 +15044,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-farsi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-farsi.ldf}[polyglossia: module for Farsi]
% We only provide this gloss for babel compatibility.
% The proper English language name is Persian.
-\xpg@load@master@language{persian}
+\InheritGlossFile{persian}
% \end{macrocode}
% \iffalse
@@ -15067,13 +15062,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fi.ldf}[polyglossia: module for fi (Finnish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{finnish}
+\InheritGlossFile{finnish}
% \end{macrocode}
% \iffalse
@@ -15084,7 +15079,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-finnish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-finnish.ldf}[polyglossia: module for Finnish]
\PolyglossiaSetup{finnish}{
@@ -15102,51 +15097,54 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{finnish}{fi}
-\define@boolkey{finnish}[finnish@]{babelshorthands}[true]{}
-
\newif\if@finnish@schoolhyphens
\newif\if@finnish@babelhyphens
-\define@choicekey*+{finnish}{hyphens}[\xpg@val\xpg@nr]{default,school,babel}[default]{%
- \ifcase\xpg@nr\relax
- % default:
- \@finnish@schoolhyphensfalse
- \@finnish@babelhyphensfalse
- \or
- % school:
- \@finnish@schoolhyphenstrue
- \@finnish@babelhyphensfalse
- \or
- % babel:
- \@finnish@schoolhyphensfalse
- \@finnish@babelhyphenstrue
- \fi
- \xpg@info{Option: Finnish, hyphens=\xpg@val}%
-}{\xpg@warning{Unknown Finnish hyphens `#1'}}
-
-% backwards compatibility
-\define@boolkey{finnish}[finnish@]{schoolhyphens}[true]{%
- \iffinnish@schoolhyphens
- \@finnish@schoolhyphenstrue
- \@finnish@babelhyphensfalse
- \else
- \@finnish@schoolhyphensfalse
- \fi
-}
+
+\DeclareKeys[polyglossia/gloss/finnish]
+ {
+ babelshorthands.if = finnish@babelshorthands,
+ babelshorthands.default:n = true,
+ hyphens.choice:,
+ hyphens / default.code =
+ {%
+ \@finnish@schoolhyphensfalse
+ \@finnish@babelhyphensfalse
+ },
+ hyphens / school.code =
+ {%
+ \@finnish@schoolhyphenstrue
+ \@finnish@babelhyphensfalse
+ },
+ hyphens / babel.code =
+ {%
+ \@finnish@schoolhyphensfalse
+ \@finnish@babelhyphenstrue
+ },
+ hyphens.default:n = default,
+ hyphens/unknown.code = \xpg@warning{Unknown Finnish hyphens `#1'},
+ schoolhyphens.choice:,
+ schoolhyphens / true.code =
+ {%
+ \@finnish@schoolhyphenstrue
+ \@finnish@babelhyphensfalse
+ },
+ schoolhyphens / false.code =
+ {%
+ \@finnish@schoolhyphensfalse
+ },
+ schoolhyphens.default:n = true
+ }
% Register default options
-\xpg@initialize@gloss@options{finnish}{babelshorthands=false,hyphens=default}
+\InitializeGlossOptions{finnish}{babelshorthands=false,hyphens=default}
\ifsystem@babelshorthands
- \setkeys{finnish}{babelshorthands=true}
+ \SetGlossOptions{finnish}{babelshorthands=true}
\else
- \setkeys{finnish}{babelshorthands=false}
+ \SetGlossOptions{finnish}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\finnish@shorthands{%
\xpg@activate@shorthands%
@@ -15191,15 +15189,15 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\finnish@language{%
\if@finnish@schoolhyphens
- \xpg@ifdefined{schoolfinnish}{%
- \polyglossia@setup@language@patterns{schoolfinnish}%
+ \IfLanguageDefinedTF{schoolfinnish}{%
+ \SetupPolyglossiaLangPatterns{schoolfinnish}%
}{%
\xpg@warning{Finnish 'School' hyphenation patterns (schoolfinnish) not available.\MessageBreak
I will use the standard patterns for Finnish instead}%
- \polyglossia@setup@language@patterns{finnish}%
+ \SetupPolyglossiaLangPatterns{finnish}%
}%
\else
- \polyglossia@setup@language@patterns{finnish}%
+ \SetupPolyglossiaLangPatterns{finnish}%
\fi
}
@@ -15253,13 +15251,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fr-CA-u-sd-canb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fr-CA-u-sd-canb.ldf}[polyglossia: module for fr-CA-u-sd-canb (Canadian French, Acadian subvariety)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
@@ -15270,13 +15268,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fr-CA.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fr-CA.ldf}[polyglossia: module for fr-CA (Canadian French)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
@@ -15287,13 +15285,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fr-CH.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fr-CH.ldf}[polyglossia: module for fr-CH (Swiss French)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
@@ -15304,13 +15302,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fr-FR.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fr-FR.ldf}[polyglossia: module for fr-FR (France's French)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
@@ -15321,13 +15319,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fr.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fr.ldf}[polyglossia: module for fr (French)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{french}
+\InheritGlossFile{french}
% \end{macrocode}
% \iffalse
@@ -15338,7 +15336,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-french.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-french.ldf}[polyglossia: module for French]
@@ -15368,43 +15366,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias[variant=canadian]{french}{canadien}
\def\french@variant{french}
-\define@choicekey*+{french}{variant}[\xpg@val\xpg@nr]{french,canadian,acadian,swiss}[french]{%
- \ifcase\xpg@nr\relax
- % french:
- \def\french@variant{french}%
- \SetLanguageKeys{french}{babelname=french,bcp47=fr-FR,bcp47-language=fr,bcp47-region=FR}%
- \french@thincolonspacefalse
- \or
- % canadian:
- \def\french@variant{canadien}%
- \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA,bcp47-language=fr,bcp47-region=CA,bcp47-extension-u=sd-caqc}%
- \xpg@ifdefined{canadien}{}%
- {\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak
- I will use the standard patterns for French instead}%
- \adddialect\l@canadien\l@french\relax}%
- \french@thincolonspacefalse
- \or
- % acadian:
- \def\french@variant{acadian}%
- \SetLanguageKeys{french}{babelname=acadian,bcp47=fr-CA-u-sd-canb,bcp47-language=fr,bcp47-region=CA,bcp47-extension-u=sd-canb}%
- \xpg@ifdefined{acadian}{}%
- {\xpg@warning{No hyphenation patterns were loaded for "French (Canada, Acadian)"\MessageBreak
- I will use the standard patterns for French instead}%
- \adddialect\l@acadian\l@french\relax}%
- \french@thincolonspacefalse
- \or
- % swiss:
- \def\french@variant{swissfrench}%
- \SetLanguageKeys{french}{babelname=french,bcp47=fr-CH,bcp47-language=fr,bcp47-region=CH}%
- \adddialect\l@swissfrench\l@french\relax%
- \french@thincolonspacetrue
- \fi
- \xpg@info{Option: French, variant=\xpg@val}%
-}{\xpg@warning{Unknown French variant `#1'}}
-
\def\french@language{%
- \polyglossia@setup@language@patterns{\french@variant}%
+ \SetupPolyglossiaLangPatterns{\french@variant}%
}%
\ifluatex
@@ -15424,91 +15388,103 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% Save original footnote definition
% Do this at the end of the preamble to catch other
% packages' footnote changes (#391)
-\AtEndPreamble{%
+\AddToHook{begindocument/before}{%
\let\xpg@orig@makefntext\@makefntext
}
-\define@boolkey{french}[french@]{frenchfootnote}[true]{}
-
-\define@boolkey{french}[french@]{autospacing}[true]{}
-\french@autospacingtrue
-
-\define@boolkey{french}[french@]{frenchpart}[true]{}
-\french@frenchparttrue
-
-\newif\iffrench@autospaceguillemets
-\define@boolkey{french}[french@]{autospaceguillemets}[true]{}
-\french@autospaceguillemetstrue
-
-\newif\iffrench@thincolonspace
-\define@boolkey{french}[french@]{thincolonspace}[true]{}
-\french@thincolonspacefalse
-
-% Backwards compatibility
-\define@boolkey{french}[french@]{automaticspacesaroundguillemets}[true]{%
- \iffrench@automaticspacesaroundguillemets
- \setkeys{french}{autospaceguillemets=true}%
- \else
- \setkeys{french}{autospaceguillemets=false}%
- \fi
-}
-
% name is for compatibility with babel
\let\french@ttfamilyORI\ttfamily
\DeclareRobustCommand\french@ttfamilyFB{\nofrench@punctuation\french@ttfamilyORI}
-% Allow to switch on autospacing in ttfamily context
-\define@boolkey{french}[french@]{autospacetypewriter}[true]{}
-\french@autospacetypewriterfalse
-
-% This is how babel-french has it
-\define@boolkey{french}[french@]{OriginalTypewriter}[true]{%
- \iffrench@OriginalTypewriter
- \setkeys{french}{autospacetypewriter=false}%
- \else
- \setkeys{french}{autospacetypewriter=true}%
- \fi
-}
-
% Configuration of item labels
\def\french@itemi{\textemdash}
\def\french@itemii{\textemdash}
\def\french@itemiii{\textemdash}
\def\french@itemiv{\textemdash}
-\define@key{french}{itemlabels}[\textemdash]{%
- \def\french@itemi{#1}
- \def\french@itemii{#1}
- \def\french@itemiii{#1}
- \def\french@itemiv{#1}
-}
-
-\define@key{french}{itemlabeli}[\textemdash]{%
- \def\french@itemi{#1}
-}
-
-\define@key{french}{itemlabelii}[\textemdash]{%
- \def\french@itemii{#1}
-}
-
-\define@key{french}{itemlabeliii}[\textemdash]{%
- \def\french@itemiii{#1}
-}
-
-\define@key{french}{itemlabeliv}[\textemdash]{%
- \def\french@itemiv{#1}
-}
+\newif\iffrench@autospacetypewriter
+\french@autospacetypewriterfalse
+\newif\iffrench@autospacing
+\french@autospacingtrue
+\newif\iffrench@frenchpart
+\french@frenchparttrue
+\newif\iffrench@autospaceguillemets
+\french@autospaceguillemetstrue
-\define@boolkey{french}[french@]{frenchitemlabels}[true]{}
+\DeclareKeys[polyglossia/gloss/french]
+ {
+ variant.choice:,
+ variant / french.code =
+ {%
+ \def\french@variant{french}%
+ \SetLanguageKeys{french}{babelname=french,bcp47=fr-FR,bcp47-language=fr,bcp47-region=FR}%
+ \french@thincolonspacefalse
+ },
+ variant / canadian.code =
+ {%
+ \def\french@variant{canadien}%
+ \SetLanguageKeys{french}{babelname=canadien,bcp47=fr-CA,bcp47-language=fr,bcp47-region=CA,bcp47-extension-u=sd-caqc}%
+ \IfLanguageDefinedF{canadien}%
+ {\xpg@warning{No hyphenation patterns were loaded for "French (Canada)"\MessageBreak
+ I will use the standard patterns for French instead}%
+ \adddialect\l@canadien\l@french\relax}%
+ \french@thincolonspacefalse
+ },
+ variant / acadian.code =
+ {%
+ \def\french@variant{acadian}%
+ \SetLanguageKeys{french}{babelname=acadian,bcp47=fr-CA-u-sd-canb,bcp47-language=fr,bcp47-region=CA,bcp47-extension-u=sd-canb}%
+ \IfLanguageDefinedF{acadian}%
+ {\xpg@warning{No hyphenation patterns were loaded for "French (Canada, Acadian)"\MessageBreak
+ I will use the standard patterns for French instead}%
+ \adddialect\l@acadian\l@french\relax}%
+ \french@thincolonspacefalse
+ },
+ variant / swiss.code =
+ {%
+ \def\french@variant{swissfrench}%
+ \SetLanguageKeys{french}{babelname=french,bcp47=fr-CH,bcp47-language=fr,bcp47-region=CH}%
+ \adddialect\l@swissfrench\l@french\relax%
+ \french@thincolonspacetrue
+ },
+ variant.default:n = french,
+ variant/unknown.code = \xpg@warning{Unknown French variant `#1'},
+ frenchfootnote.if = french@frenchfootnote,
+ frenchfootnote.default:n = true,
+ autospacing.if = french@autospacing,
+ autospacing.default:n = true,
+ frenchpart.if = french@frenchpart,
+ frenchpart.default:n = true,
+ autospaceguillemets.if = french@autospaceguillemets,
+ autospaceguillemets.default:n = true,
+ thincolonspace.if = french@thincolonspace,
+ thincolonspace.default:n = true,
+ automaticspacesaroundguillemets.meta:n = {autospaceguillemets=#1},
+ autospacetypewriter.if = french@autospacetypewriter,
+ autospacetypewriter.default:n = true,
+ originaltypewriter.meta:n = {autospacetypewriter=#1},
+ itemlabeli.store = \french@itemi,
+ itemlabelii.store = \french@itemii,
+ itemlabeliii.store = \french@itemiii,
+ itemlabeliv.store = \french@itemiv,
+ frenchitemlabels.if = french@frenchitemlabels,
+ frenchitemlabels.default:n = true,
+ itemlabels.code =
+ \def\french@itemi{#1}%
+ \def\french@itemii{#1}%
+ \def\french@itemiii{#1}%
+ \def\french@itemiv{#1},
+ itemlabels.default:n = \textemdash
+ }
% Register default options
-\xpg@initialize@gloss@options{french}{variant=french,autospacing=true,thincolonspace=false,
+\InitializeGlossOptions{french}{variant=french,autospacing=true,thincolonspace=false,
autospaceguillemets=true,autospacetypewriter=false,
frenchfootnote=false,frenchitemlabels=false,
itemlabels=\textemdash,itemlabeli=\textemdash,itemlabelii=\textemdash,
itemlabeliii=\textemdash,itemlabeliv=\textemdash}
% Register alias options
-\xpg@set@alias@values{french}{variant}{canadian}{acadian}
+\SetLanguageAliasValues{french}{variant}{canadian,acadian}
\def\french@fontsetup{%
@@ -15679,100 +15655,100 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\french@capsformat{%
% Change part heading
% With titlesec
- \ifcsdef{titleformat}{%
- \ifcsdef{NR@part}{% Hyperref (nameref)
- \let\xpg@save@part@format\NR@part%
- \patchcmd{\NR@part}%
- {\partname\nobreakspace\thepart}%
- {\xpg@french@part\nobreakspace\partname}%
- {}%
- {\xpg@warning{Failed to patch part for French}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
+ \@ifundefined{titleformat}{%
+ % With KOMA
+ \@ifundefined{sectionformat}{%
+ % With memoir
+ \@ifundefined{@memptsize}{% (not \ifdefined\@memptsize)
+ % With standard classes
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\xpg@french@part\nobreakspace\partname}%
+ {}%
+ {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for French}}}%
+ }% (end \ifdefined \@part)
+ }{% Hyperref
+ \let\xpg@save@part@format\NR@part%
+ \patchcmd{\NR@part}%
{\partname\nobreakspace\thepart}%
{\xpg@french@part\nobreakspace\partname}%
{}%
{\xpg@warning{Failed to patch part for French}}%
- }{}%
- }%
- }{% (not \ifdefined\titleformat)
- % With KOMA
- \ifcsdef{sectionformat}{%
- \ifcsdef{partformat}{%
- \let\xpg@save@part@format\partformat%
- \renewcommand{\partformat}{\xpg@french@part~\partname}%
- }{}%
- }{% (not \ifdefined\sectionformat)
- % With memoir
- \ifcsdef{@memptsize}{%
- \ifcsdef{NR@part}{% Hyperref (nameref)
- \let\xpg@save@part@format\NR@part%
- \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}%
- {\partnamefont\xpg@french@part\partnamenum\printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for French}}%
- }{% not hyperref
- \ifcsdef{@part}{%
+ }% (end \ifdefined\NR@part)
+ }{%
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
\let\xpg@save@part@format\@part%
\patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
{\partnamefont\xpg@french@part\partnamenum\printpartname}%
{}%
{\xpg@warning{Failed to patch part for French}}%
- }{}%
- }%
- }{% (not \ifdefined\@memptsize)
- % With standard classes
- \ifcsdef{NR@part}{% Hyperref
+ }%
+ }{% Hyperref (nameref)
\let\xpg@save@part@format\NR@part%
- \patchcmd{\NR@part}%
+ \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}%
+ {\partnamefont\xpg@french@part\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for French}}%
+ }%
+ }% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\sectionformat)
+ \@ifundefined{partformat}{}{%
+ \let\xpg@save@part@format\partformat%
+ \renewcommand{\partformat}{\xpg@french@part~\partname}%
+ }%
+ }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
{\partname\nobreakspace\thepart}%
{\xpg@french@part\nobreakspace\partname}%
{}%
{\xpg@warning{Failed to patch part for French}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\xpg@french@part\nobreakspace\partname}%
- {}%
- {\ifcsdef{part}{\xpg@warning{Failed to patch part for French}}{}}%
- }{}% (end \ifdefined \NR@part)
- }% (end \ifdefined\@part)
- }% (end \ifdefined\@memptsize)
- }% (end \ifdefined\sectionformat)
+ }%
+ }{% Hyperref (nameref)
+ \let\xpg@save@part@format\NR@part%
+ \patchcmd{\NR@part}%
+ {\partname\nobreakspace\thepart}%
+ {\xpg@french@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for French}}%
+ }%
}% (end \ifdefined\titleformat)
}
\def\nofrench@capsformat{%
% Reset chapter and part heading
- \ifcsdef{titleformat}{%
- % With titlesec
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{NR@part}{%
- \let\NR@part\xpg@save@part@format%
- }{%
- \let\@part\xpg@save@part@format%
- }%
- }{}%
- }{% (not \ifdefined\titleformat)
- \ifcsdef{sectionformat}{%
- % With KOMA
- \ifcsdef{xpg@save@part@format}{%
- \let\partformat\xpg@save@part@format
- }{}%
- }{%
+ \@ifundefined{titleformat}{%
+ \@ifundefined{sectionformat}{%
% With memoir and standard classes
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{NR@part}{%
- \let\NR@part\xpg@save@part@format%
- }{%
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{NR@part}{%
\let\@part\xpg@save@part@format%
+ }{%
+ \let\NR@part\xpg@save@part@format%
}%
- }{}%
+ }%
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@part@format}{}{%
+ \let\partformat\xpg@save@part@format
+ }%
}% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
+ % With titlesec
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{NR@part}{%
+ \let\@part\xpg@save@part@format%
+ }{%
+ \let\NR@part\xpg@save@part@format%
+ }%
+ }%
}% (end \ifdefined\titleformat)
}
@@ -15783,7 +15759,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\if@xpg@french@footnote@set%
\else%
\iffrench@frenchfootnote%
- \ifdefstring{\xpg@main@language}{french}{%
+ \IfMainLanguageTF{french}{%
\ifx\@makefntext\undefined\else%
\long\def\french@makefntext##1{%
\parindent1em \noindent\quad%
@@ -15807,7 +15783,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\if@xpg@french@itemlabels@set%
\else%
\iffrench@frenchitemlabels
- \ifdefstring{\xpg@main@language}{french}{%
+ \IfMainLanguageTF{french}{%
\renewcommand{\labelitemi}{\french@itemi}%
\renewcommand{\labelitemii}{\french@itemii}%
\renewcommand{\labelitemiii}{\french@itemiii}%
@@ -15882,13 +15858,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-friulan.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-friulan.ldf}[polyglossia: module for Friulian]
% We only provide this gloss for babel compatibility.
-\xpg@load@master@language{friulian}
+\InheritGlossFile{friulian}
% \end{macrocode}
% \iffalse
@@ -15899,7 +15875,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-friulian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-friulian.ldf}[polyglossia: module for Friulian]
@@ -15953,7 +15929,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
Lui\or Avost\or Setembar\or Otobar\or Novembar\or Dicembar%
\fi\space dal\space\number\year}}
-\AtEndPreamble{% the user or the class might define different values
+\AddToHook{begindocument/before}{% the user or the class might define different values
\edef\xpgfu@savedvalues{%
\clubpenalty=\the\clubpenalty\space
\@clubpenalty=\the\@clubpenalty\space
@@ -15985,13 +15961,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-fur.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-fur.ldf}[polyglossia: module for fur (Friulian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{friulian}
+\InheritGlossFile{friulian}
% \end{macrocode}
% \iffalse
@@ -16002,13 +15978,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ga.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ga.ldf}[polyglossia: module for ga (Gaelic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{gaelic}
+\InheritGlossFile{gaelic}
% \end{macrocode}
% \iffalse
@@ -16019,7 +15995,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-gaelic.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-gaelic.ldf}[polyglossia: module for Gaelic]
@@ -16043,23 +16019,28 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias[variant=scottish]{gaelic}{scottish}
\def\gaelic@variant{irish}
-\define@choicekey*+{gaelic}{variant}[\xpg@val\xpg@nr]{irish,scottish}[irish]{%
- \ifcase\xpg@nr\relax
- % irish:
- \gdef\gaelic@variant{irish}%
- \SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish,bcp47=ga,bcp47-language=ga}%
- \xpg@fontsetup@latin{gaelic}%
- \or
- % scottish:
- \gdef\gaelic@variant{scottish}%
- \SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish,bcp47=gd,bcp47-language=gd}%
- \xpg@fontsetup@latin{gaelic}%
- \fi
- \xpg@info{Option: gaelic, variant=\xpg@val}%
-}{\xpg@warning{Unknown gaelic variant `#1'}}
+
+\DeclareKeys[polyglossia/gloss/gaelic]
+ {
+ variant.choice:,
+ variant / irish.code =
+ {%
+ \gdef\gaelic@variant{irish}%
+ \SetLanguageKeys{gaelic}{language=Irish,langtag=IRI,babelname=irish,bcp47=ga,bcp47-language=ga}%
+ \SetupLatinPolyglossiaFont{gaelic}%
+ },
+ variant / scottish.code =
+ {%
+ \gdef\gaelic@variant{scottish}%
+ \SetLanguageKeys{gaelic}{language=Gaelic,langtag=GAE,babelname=scottish,bcp47=gd,bcp47-language=gd}%
+ \SetupLatinPolyglossiaFont{gaelic}%
+ },
+ variant.default:n = irish,
+ variant/unknown.code = \xpg@warning{Unknown gaelic variant `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{gaelic}{variant=irish}
+\InitializeGlossOptions{gaelic}{variant=irish}
\def\captionsgaelic@irish{%
\def\refname{Tagairtí}%
@@ -16149,7 +16130,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-galician.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-galician.ldf}[polyglossia: module for Galician]
\PolyglossiaSetup{galician}{
@@ -16206,13 +16187,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-gd.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-gd.ldf}[polyglossia: module for gd (Gaelic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{gaelic}
+\InheritGlossFile{gaelic}
% \end{macrocode}
% \iffalse
@@ -16223,7 +16204,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-georgian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-georgian.ldf}[polyglossia: module for Georgian]
@@ -16243,34 +16224,37 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*{georgian}{ka}
\newif\ifgeorgian@numerals
-\define@key{georgian}{numerals}[arabic]{%
- \ifstrequal{#1}{georgian}%
- {\georgian@numeralstrue%
- \SetLanguageKeys{georgian}{bcp47-extension-u=nu-geor}%
- }%
- {\georgian@numeralsfalse%
- \SetLanguageKeys{georgian}{bcp47-extension-u=nu-latn}%
- }%
-}
-
-\define@boolkey{georgian}[georgian@]{babelshorthands}[true]{}
-\define@boolkey{georgian}[georgian@]{oldmonthnames}[true]{}
+\DeclareKeys[polyglossia/gloss/georgian]
+ {
+ babelshorthands.if = georgian@babelshorthands,
+ babelshorthands.default:n = true,
+ oldmonthnames.if = georgian@oldmonthnames,
+ oldmonthnames.default:n = true,
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \georgian@numeralsfalse
+ \SetLanguageKeys{georgian}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / georgian.code =
+ {%
+ \georgian@numeralstrue
+ \SetLanguageKeys{georgian}{bcp47-extension-u=nu-geor}%
+ },
+ numerals.default:n = arabic
+ }
% Register default options
-\xpg@initialize@gloss@options{georgian}{babelshorthands=false,oldmonthnames=false,numerals=arabic}
+\InitializeGlossOptions{georgian}{babelshorthands=false,oldmonthnames=false,numerals=arabic}
\ifsystem@babelshorthands
- \setkeys{georgian}{babelshorthands=true}
+ \SetGlossOptions{georgian}{babelshorthands=true}
\else
- \setkeys{georgian}{babelshorthands=false}
+ \SetGlossOptions{georgian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\georgian@shorthands{%
\xpg@activate@shorthands%
@@ -16471,7 +16455,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-german.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-german.ldf}[polyglossia: module for German]
@@ -16520,51 +16504,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@german@oldspelling
\@german@oldspellingfalse
-\define@choicekey*+{german}{spelling}[\xpg@val\xpg@nr]{new,old,1901,1996}[new]{%
- \ifcase\xpg@nr\relax
- % new:
- \@german@oldspellingfalse
- \or
- % old:
- \@german@oldspellingtrue
- \or
- % 1901:
- \@german@oldspellingtrue
- \or
- % 1996:
- \@german@oldspellingfalse
- \fi
- \german@set@babelname%
- \xpg@info{Option: German, spelling=\xpg@val}%
-}{\xpg@warning{Unknown German spelling `#1'}}
\newif\if@austrian@locale
\@austrian@localefalse
\newif\if@swiss@locale
\@swiss@localefalse
-\define@choicekey*+{german}{variant}[\xpg@val\xpg@nr]{german,austrian,swiss}[german]{%
- \ifcase\xpg@nr\relax
- % german:
- \@swiss@localefalse%
- \@austrian@localefalse%
- \or
- % austrian:
- \@austrian@localetrue%
- \@swiss@localefalse%
- \or
- % swiss:
- \@swiss@localetrue%
- \@austrian@localefalse%
- \xpg@ifdefined{swissgerman}{}%
- {%
- \xpg@warning{No hyphenation patterns were loaded for "Swiss German (Old Spelling)"\MessageBreak
- I will use the standard patterns for German (old spelling) instead}%
- \adddialect\l@swissgerman\l@german\relax%
- }%
- \fi
- \german@set@babelname%
- \xpg@info{Option: German, variant=\xpg@val}%
-}{\xpg@warning{Unknown German variant `#1'}}
\def\german@set@babelname{%
\if@german@oldspelling
@@ -16613,58 +16557,110 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\newif\if@german@blackletter
-\define@choicekey*+{german}{script}[\xpg@val\xpg@nr]{latin,blackletter,fraktur}[latin]{%
- \ifcase\xpg@nr\relax
- % latin:
- \@german@blackletterfalse%
- \or
- % blackletter:
- \@german@blacklettertrue%
- \or
- % fraktur:
- \@german@blacklettertrue%
- \fi
- \german@set@babelname%
- \xpg@info{Option: German, script=\xpg@val}%
-}{\xpg@warning{Unknown German script `#1'}}
-
-\define@boolkey{german}[german@]{capitaleszett}[true]{%
- \ifgerman@capitaleszett
- % MakeUppercase capitalizes the eszett (U+00DF) with U+1E9E
- \SetLanguageKeys{german}{bcp47-casing=de-x-eszett,bcp47-extension-x=eszett}
- \else
- % Capitalize eszett as <SS>
- \SetLanguageKeys{german}{bcp47-casing=de,bcp47-extension-x={}}
- \fi
-}
-
-
-% Option defunc'ed, as both XeTeX and LuaTeX meanwhile
-% use the experimental German hyphenation patterns by default.
-\define@boolkey{german}[german@]{latesthyphen}[true]{}
-\define@boolkey{german}[german@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/german]
+ {
+ babelshorthands.if = german@babelshorthands,
+ babelshorthands.default:n = true,
+ latesthyphen.if = german@latesthyphen,
+ latesthyphen.default:n = true,
+ capitaleszett.choice:,
+ capitaleszett / true.code =
+ {% MakeUppercase capitalizes the eszett (U+00DF) with U+1E9E
+ \SetLanguageKeys{german}{bcp47-casing=de-x-eszett,bcp47-extension-x=eszett}%
+ },
+ capitaleszett / false.code =
+ {% Capitalize eszett as <SS>
+ \SetLanguageKeys{german}{bcp47-casing=de,bcp47-extension-x={}}%
+ },
+ capitaleszett.default:n = true,
+ script.choice:,
+ script / latin.code =
+ {%
+ \@german@blackletterfalse
+ \german@set@babelname
+ },
+ script / blackletter.code =
+ {%
+ \@german@blacklettertrue
+ \german@set@babelname
+ },
+ script / fraktur.code =
+ {%
+ \@german@blacklettertrue
+ \german@set@babelname
+ },
+ script.default:n = latin,
+ script/unknown.code = \xpg@warning{Unknown German script `#1'},
+ spelling.choice:,
+ spelling / new.code =
+ {%
+ \@german@oldspellingfalse
+ \german@set@babelname
+ },
+ spelling / old.code =
+ {%
+ \@german@oldspellingtrue
+ \german@set@babelname
+ },
+ spelling / 1901.code =
+ {%
+ \@german@oldspellingtrue
+ \german@set@babelname
+ },
+ spelling / 1996.code =
+ {%
+ \@german@oldspellingfalse
+ \german@set@babelname
+ },
+ spelling.default:n = new,
+ spelling/unknown.code = \xpg@warning{Unknown German spelling `#1'},
+ variant.choice:,
+ variant / german.code =
+ {%
+ \@swiss@localefalse
+ \@austrian@localefalse
+ \german@set@babelname
+ },
+ variant / austrian.code =
+ {%
+ \@austrian@localetrue
+ \@swiss@localefalse
+ \german@set@babelname
+ },
+ variant / swiss.code =
+ {%
+ \@swiss@localetrue
+ \@austrian@localefalse
+ \IfLanguageDefinedF{swissgerman}
+ {%
+ \xpg@warning{No hyphenation patterns were loaded for "Swiss German (Old Spelling)"\MessageBreak
+ I will use the standard patterns for German (old spelling) instead}%
+ \adddialect\l@swissgerman\l@german\relax
+ }%
+ \german@set@babelname
+ },
+ variant.default:n = german,
+ variant/unknown.code = \xpg@warning{Unknown German variant `#1'}
+ }
+
-\setkeys{german}{spelling,script,variant}
+\SetGlossOptions{german}{spelling,script,variant}
% Register default options
-\xpg@initialize@gloss@options{german}{variant=german,spelling=new,script=latin,babelshorthands=false}
+\InitializeGlossOptions{german}{variant=german,spelling=new,script=latin,babelshorthands=false}
% Register alias options
-\xpg@set@alias@values{german}{spelling}{new}{1996}
-\xpg@set@alias@values{german}{spelling}{old}{1901}
-\xpg@set@alias@values{german}{script}{blackletter}{fraktur}
+\SetLanguageAliasValues{german}{spelling}{new,1996}
+\SetLanguageAliasValues{german}{spelling}{old,1901}
+\SetLanguageAliasValues{german}{script}{blackletter,fraktur}
\ifsystem@babelshorthands
- \setkeys{german}{babelshorthands=true}
+ \SetGlossOptions{german}{babelshorthands=true}
\else
- \setkeys{german}{babelshorthands=false}
+ \SetGlossOptions{german}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\german@shorthands{%
\xpg@activate@shorthands%
@@ -16786,15 +16782,15 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\german@language{%
\if@german@oldspelling
\if@swiss@locale
- \polyglossia@setup@language@patterns{swissgerman}%
+ \SetupPolyglossiaLangPatterns{swissgerman}%
\else
- \polyglossia@setup@language@patterns{german}%
+ \SetupPolyglossiaLangPatterns{german}%
\fi
\if@austrian@locale
\adddialect\l@austrian\l@german%
\fi
\else
- \polyglossia@setup@language@patterns{ngerman}%
+ \SetupPolyglossiaLangPatterns{ngerman}%
\if@austrian@locale
\adddialect\l@naustrian\l@ngerman%
\fi
@@ -16825,13 +16821,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-germanb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-germanb.ldf}[polyglossia: module for German (old spelling)]
% We provide this as a babel alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -16842,13 +16838,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-gl.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-gl.ldf}[polyglossia: module for gl (Galician)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{galician}
+\InheritGlossFile{galician}
% \end{macrocode}
% \iffalse
@@ -16859,13 +16855,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-grc.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-grc.ldf}[polyglossia: module for grc (Greek)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{greek}
+\InheritGlossFile{greek}
% \end{macrocode}
% \iffalse
@@ -16876,7 +16872,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-greek.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-greek.ldf}[polyglossia: module for Greek]
@@ -16900,7 +16896,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*[variant=ancient]{greek}{grc}
-\setlanguagealias*[varant=polytonic]{greek}{el-polyton}
+\setlanguagealias*[variant=polytonic]{greek}{el-polyton}
\setlanguagealias*[variant=monotonic]{greek}{el-monoton}
\setlanguagealias*{greek}{el}
@@ -16920,44 +16916,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@greek@ancient\@greek@ancientfalse
\newif\if@greek@poly\@greek@polyfalse
-\define@choicekey*+{greek}{variant}[\xpg@val\xpg@nr]{monotonic,mono,polytonic,poly,ancient,ancientgreek}[monotonic]{%
- \xpg@ifdefined{greek}{}{%
- \xpg@nopatterns{greek}%
- \adddialect\l@greek\l@nohyphenation
- }%
- \ifcase\xpg@nr\relax
- % monotonic:
- \@greek@polyfalse
- \@greek@ancientfalse
- \or
- % mono:
- \@greek@polyfalse
- \@greek@ancientfalse
- \or
- % polytonic:
- \@greek@polytrue
- \@greek@ancientfalse
- \or
- % poly:
- \@greek@polytrue
- \@greek@ancientfalse
- \or
- % ancient:
- \@greek@polyfalse
- \@greek@ancienttrue
- \or
- % ancientgreek:
- \@greek@polyfalse
- \@greek@ancienttrue
- \fi
- \greek@set@langdata
- \xpg@info{Option: Greek, variant=\xpg@val}%
-}{\xpg@warning{Unknown Greek variant `#1'}}
-
-
\def\greek@set@langdata{%
\if@greek@ancient
- \xpg@ifdefined{ancientgreek}{}%
+ \IfLanguageDefinedF{ancientgreek}%
{\xpg@warning{No hyphenation patterns were loaded for Ancient Greek\MessageBreak
I will use the patterns loaded for \string\l@greek\space instead}%
\adddialect\l@ancientgreek\l@greek\relax}%
@@ -16967,7 +16928,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\SetLanguageKeys{greek}{babelname=greek,bcp47=grc,bcp47-language=grc,bcp47-variant={}}%
\else
\if@greek@poly
- \xpg@ifdefined{polygreek}{}%
+ \IfLanguageDefinedF{polygreek}%
{\xpg@warning{No hyphenation patterns were loaded for Polytonic Greek\MessageBreak
I will use the patterns loaded for \string\l@greek\space instead}%
\adddialect\l@polygreek\l@greek\relax}%
@@ -16976,7 +16937,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\dategreek{\datepolygreek}%
\SetLanguageKeys{greek}{babelname=polutonikogreek,bcp47=el-polyton,bcp47-language=el,bcp47-variant=polyton}%
\else% monotonic greek
- \xpg@ifdefined{monogreek}{}%
+ \IfLanguageDefinedF{monogreek}%
{\xpg@warning{No hyphenation patterns were loaded for Monotonic Greek\MessageBreak
I will use the patterns loaded for \string\l@greek\space instead}%
\adddialect\l@monogreek\l@greek\relax}%
@@ -16990,42 +16951,85 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\greek@language{%
- \polyglossia@setup@language@patterns{\greek@variant}%
+ \SetupPolyglossiaLangPatterns{\greek@variant}%
}
\newif\if@greek@numerals
-\define@choicekey*+{greek}{numerals}[\xpg@val\xpg@nr]{greek,arabic}[greek]{%
- \ifcase\xpg@nr\relax
- % greek:
- \@greek@numeralstrue%
- \SetLanguageKeys{greek}{bcp47-extension-u=nu-grek}%
- \or
- % arabic:
- \@greek@numeralsfalse%
- \SetLanguageKeys{greek}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Greek, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Greek numerals value `#1'}}
-
-\define@boolkey{greek}[greek@]{capitaliota}[true]{%
- \ifgreek@capitaliota
- % \MakeUppercase converts the ypogegrammeni (subscript muted iota) to capital iota
- \SetLanguageKeys{greek}{bcp47-casing=el-x-iota,bcp47-extension-x=iota}
- \else
- % \MakeUppercase retains the subscript versions (default)
- \SetLanguageKeys{greek}{bcp47-casing=el,bcp47-extension-x={}}
- \fi
-}
-
-\define@boolkey{greek}{attic}[true]{\xpg@warning{Greek option `attic' is no longer required.}}
+\DeclareKeys[polyglossia/gloss/greek]
+ {
+ variant.choices:nn = { monotonic, mono,polytonic, poly,ancient, ancientgreek }
+ {%
+ \CheckHyphenationPatterns{greek}%
+ \ifcase\UseName{l_keys_choice_int}\or
+ % monotonic:
+ \@greek@polyfalse
+ \@greek@ancientfalse
+ \or
+ % mono:
+ \@greek@polyfalse
+ \@greek@ancientfalse
+ \or
+ % polytonic:
+ \@greek@polytrue
+ \@greek@ancientfalse
+ \or
+ % poly:
+ \@greek@polytrue
+ \@greek@ancientfalse
+ \or
+ % ancient:
+ \@greek@polyfalse
+ \@greek@ancienttrue
+ \or
+ % ancientgreek:
+ \@greek@polyfalse
+ \@greek@ancienttrue
+ \fi
+ \greek@set@langdata
+ },
+ variant.default:n = monotonic,
+ variant/unknown.code = \xpg@warning{Unknown Greek variant `#1'},
+ numerals.choice:,
+ numerals / greek.code =
+ {%
+ \@greek@numeralstrue
+ \SetLanguageKeys{greek}{bcp47-extension-u=nu-grek}%
+ },
+ numerals / arabic.code =
+ {%
+ \@greek@numeralsfalse
+ \SetLanguageKeys{greek}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = greek,
+ numerals/unknown.code = \xpg@warning{Unknown Greek numerals value `#1'},
+ capitaliota.choice:,
+ capitaliota / true.code =
+ {%
+ \@greek@capitaliotatrue
+ % \MakeUppercase converts the ypogegrammeni (subscript muted iota) to capital iota
+ \SetLanguageKeys{greek}{bcp47-casing=el-x-iota,bcp47-extension-x=iota}%
+ },
+ capitaliota / false.code =
+ {%
+ \@greek@capitaliotafalse
+ % \MakeUppercase retains the subscript versions (default)
+ \SetLanguageKeys{greek}{bcp47-casing=el,bcp47-extension-x={}}%
+ },
+ capitaliota.default:n = true,
+ attic.choices:nn = { true, false }
+ {%
+ \xpg@warning{Greek option `attic' is no longer required.}
+ },
+ capitaliota.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{greek}{variant=monotonic,numerals=greek}
+\InitializeGlossOptions{greek}{variant=monotonic,numerals=greek}
% Register alias options
-\xpg@set@alias@values{greek}{variant}{monotonic}{mono}
-\xpg@set@alias@values{greek}{variant}{polytonic}{poly}
+\SetLanguageAliasValues{greek}{variant}{monotonic,mono}
+\SetLanguageAliasValues{greek}{variant}{polytonic,poly}
\def\monogreekcaptions{%
\def\refname{Αναφορές}%
@@ -17344,13 +17348,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-he.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-he.ldf}[polyglossia: module for he (Hebrew)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{hebrew}
+\InheritGlossFile{hebrew}
% \end{macrocode}
% \iffalse
@@ -17361,7 +17365,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hebrew.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hebrew.ldf}[polyglossia: module for Hebrew]
@@ -17387,41 +17391,48 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{hebrew}{he}
-% hebrewcal options
-\define@key{hebrew}{marcheshvan}[true]{\setkeys{hebrewcal}{marcheshvan=#1}}
-\define@key{hebrew}{transliteration}[alt]{\setkeys{hebrewcal}{transliteration=#1}}
-\define@key{hebrew}{fullyear}[true]{\setkeys{hebrewcal}{fullyear=#1}}
-
\newif\if@calendar@hebrew
-\define@choicekey*+{hebrew}{calendar}[\xpg@val\xpg@nr]{hebrew,gregorian}[gregorian]{%
- \ifcase\xpg@nr\relax
- % hebrew:
- \@calendar@hebrewtrue
- \or
- % gregorian:
- \@calendar@hebrewfalse
- \fi
- \xpg@info{Option: Hebrew, calendar=\xpg@val}%
-}{\xpg@warning{Unknown Hebrew calendar `#1'}}
-
\newif\if@hebrew@numerals
-\define@choicekey*+{hebrew}{numerals}[\xpg@val\xpg@nr]{hebrew,arabic}[arabic]{%
- \ifcase\xpg@nr\relax
- % hebrew:
- \@hebrew@numeralstrue
- \SetLanguageKeys{hebrew}{bcp47-extension-u=nu-hebr}%
- \or
- % arabic:
- \@hebrew@numeralsfalse
- \SetLanguageKeys{hebrew}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Hebrew, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Hebrew numerals value `#1'}}
-\setkeys{hebrew}{numerals}
+\DeclareKeys[polyglossia/gloss/hebrew]
+ {
+ marcheshvan.code = \setkeys{hebrewcal}{marcheshvan=#1},
+ marcheshvan.default:n = true,
+ transliteration.code = \setkeys{hebrewcal}{transliteration=#1},
+ transliteration.default:n = alt,
+ fullyear.code = \setkeys{hebrewcal}{fullyear=#1},
+ fullyear.default:n = true,
+ calendar.choice:,
+ calendar / hebrew.code =
+ {%
+ \@calendar@hebrewtrue
+ },
+ calendar / gregorian.code =
+ {%
+ \@calendar@hebrewfalse
+ },
+ calendar.default:n = gregorian,
+ calendar/unknown.code = \xpg@warning{Unknown Hebrew calendar `#1'},
+ numerals.choice:,
+ numerals / hebrew.code =
+ {%
+ \@hebrew@numeralstrue
+ \SetLanguageKeys{hebrew}{bcp47-extension-u=nu-hebr}%
+ },
+ numerals / arabic.code =
+ {%
+ \@hebrew@numeralsfalse
+ \SetLanguageKeys{hebrew}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Hebrew numerals value `#1'}
+ }
+
+
+\SetGlossOptions{hebrew}{numerals}
% Register default options
-\xpg@initialize@gloss@options{hebrew}{numerals=arabic,calendar=gregorian,marcheshvan=false,fullyear=false}
+\InitializeGlossOptions{hebrew}{numerals=arabic,calendar=gregorian,marcheshvan=false,fullyear=false}
\def\captionshebrew{%
\def\prefacename{מבוא}%
@@ -17535,13 +17546,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hi.ldf}[polyglossia: module for hi (Hindi)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{hindi}
+\InheritGlossFile{hindi}
% \end{macrocode}
% \iffalse
@@ -17552,7 +17563,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hindi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% UTF-8 strings kindly provided by Zdenĕk Wagner, 10-03-2008
% with corrections and additional contributions by Anshuman Pandey
@@ -17579,8 +17590,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ifx\l@hindi\@undefined%
\ifx\l@sanskrit\@undefined%
- \xpg@nopatterns{Hindi}%
- \adddialect\l@hindi\l@nohyphenation%
+ \XPGNoPatternsFallback{hindi}%
\else
\xpg@warning{No hyphenation patterns were loaded for Hindi\MessageBreak
I will use the patterns for Sanskrit instead}
@@ -17589,26 +17599,31 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\fi
\def\hindi@language{%
- \polyglossia@setup@language@patterns{hindi}%
+ \SetupPolyglossiaLangPatterns{hindi}%
}
\newif\ifhindi@devanagari@numerals
\hindi@devanagari@numeralstrue
-\define@choicekey*+{hindi}{numerals}[\xpg@val\xpg@nr]{Devanagari,Western}[Devanagari]{%
- \ifcase\xpg@nr\relax
- % Devanagari:
- \hindi@devanagari@numeralstrue%
- \SetLanguageKeys{hindi}{bcp47-extension-u=nu-deva}%
- \or
- % Western:
- \hindi@devanagari@numeralsfalse%
- \SetLanguageKeys{hindi}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Hindi, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Hindi numeral `#1'}}
+
+\DeclareKeys[polyglossia/gloss/hindi]
+ {
+ numerals.choice:,
+ numerals / devanagari.code =
+ {%
+ \hindi@devanagari@numeralstrue
+ \SetLanguageKeys{hindi}{bcp47-extension-u=nu-deva}%
+ },
+ numerals / western.code =
+ {%
+ \hindi@devanagari@numeralsfalse
+ \SetLanguageKeys{hindi}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = devanagari,
+ numerals/unknown.code = \xpg@warning{Unknown Hindi numeral `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{hindi}{numerals=devanagari}
+\InitializeGlossOptions{hindi}{numerals=devanagari}
\newcommand{\hindinumerals}[2]{\hindinumber{#2}}
@@ -17628,6 +17643,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\contentsname{विषय सूची}%
\def\enclname{}%
\def\figurename{चित्र}% रेखाचित्र
+ \def\glossaryname{शब्दार्थ सूची}%
\def\headpagename{पृष्ठ}%
\def\headtoname{}%
\def\indexname{सूची}%
@@ -17639,6 +17655,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\pagename{पृष्ठ}%
\def\partname{खण्ड}%
\def\prefacename{प्रस्तावना}% प्राक्कथन
+ \def\proofname{प्रमाण}%
\def\refname{हवाले}%
\def\tablename{तालिका}%
\def\seename{देखिए}%
@@ -17671,13 +17688,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hr.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hr.ldf}[polyglossia: module for hr (Croatian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{croatian}
+\InheritGlossFile{croatian}
% \end{macrocode}
% \iffalse
@@ -17688,13 +17705,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hsb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hsb.ldf}[polyglossia: module for hsb (Higher Sorbian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{sorbian}
+\InheritGlossFile{sorbian}
% \end{macrocode}
% \iffalse
@@ -17705,13 +17722,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hu.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hu.ldf}[polyglossia: module for hu (Hungarian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{hungarian}
+\InheritGlossFile{hungarian}
% \end{macrocode}
% \iffalse
@@ -17722,7 +17739,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hungarian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hungarian.ldf}[polyglossia: module for Hungarian]
@@ -17749,53 +17766,61 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@hungarian@swapcaptions
\newif\if@hungarian@swapheadings
\newif\if@hungarian@swapheaders
-\define@choicekey*+{hungarian}{swapstrings}[\xpg@val\xpg@nr]{all,captions,headings,headers,hheaders,none}[all]{%
- \ifcase\xpg@nr\relax
- % all:
- \@hungarian@swapcaptionstrue%
- \@hungarian@swapheadingstrue%
- \@hungarian@swapheaderstrue%
- \or
- % captions:
- \@hungarian@swapcaptionstrue%
- \@hungarian@swapheadingsfalse%
- \@hungarian@swapheadersfalse%
- \or
- % headings:
- \@hungarian@swapcaptionsfalse%
- \@hungarian@swapheadingstrue%
- \@hungarian@swapheadersfalse%
- \or
- % headers:
- \@hungarian@swapcaptionsfalse%
- \@hungarian@swapheadingsfalse%
- \@hungarian@swapheaderstrue%
- \or
- % hheaders:
- \@hungarian@swapcaptionsfalse%
- \@hungarian@swapheadingstrue%
- \@hungarian@swapheaderstrue%
- \or
- % none:
- \@hungarian@swapcaptionsfalse%
- \@hungarian@swapheadingsfalse%
- \@hungarian@swapheadersfalse%
- \fi
- \xpg@info{Option: Hungarian, swapstrings=\xpg@val}%
-}{\xpg@warning{Unknown Hungarian swapstrings value `#1'}}
-% Force punctuation: 1) after section type counters; 2) after @chapapp in the running head
-\define@boolkey{hungarian}[hungarian@]{forceheadingpunctuation}[true]{}
+\DeclareKeys[polyglossia/gloss/hungarian]
+ {
+ forceheadingpunctuation.if = hungarian@forceheadingpunctuation,
+ forceheadingpunctuation.default:n = true,
+ swapstrings.choice:,
+ swapstrings / all.code =
+ {%
+ \@hungarian@swapcaptionstrue
+ \@hungarian@swapheadingstrue
+ \@hungarian@swapheaderstrue
+ },
+ swapstrings / captions.code =
+ {%
+ \@hungarian@swapcaptionstrue
+ \@hungarian@swapheadingsfalse
+ \@hungarian@swapheadersfalse
+ },
+ swapstrings / headings.code =
+ {%
+ \@hungarian@swapcaptionsfalse
+ \@hungarian@swapheadingstrue
+ \@hungarian@swapheadersfalse
+ },
+ swapstrings / headers.code =
+ {%
+ \@hungarian@swapcaptionsfalse
+ \@hungarian@swapheadingsfalse
+ \@hungarian@swapheaderstrue
+ },
+ swapstrings / hheaders.code =
+ {%
+ \@hungarian@swapcaptionsfalse
+ \@hungarian@swapheadingstrue
+ \@hungarian@swapheaderstrue
+ },
+ swapstrings / none.code =
+ {%
+ \@hungarian@swapcaptionsfalse
+ \@hungarian@swapheadingsfalse
+ \@hungarian@swapheadersfalse
+ },
+ swapstrings.default:n = all,
+ swapstrings/unknown.code = \xpg@warning{Unknown Hungarian swapstrings value `#1'}
+ }
% Register default options
% forceheadinpunctuatin is recommended, but the default value is false for compatibility reasons
-\xpg@initialize@gloss@options{hungarian}{swapstrings=all,
+\InitializeGlossOptions{hungarian}{swapstrings=all,
forceheadingpunctuation=false}
\def\hungarian@language{%
- \polyglossia@setup@language@patterns{hungarian}%
- \xpg@ifdefined{hungarian}{\adddialect\l@magyar\l@hungarian}{}%
+ \SetupPolyglossiaLangPatterns{hungarian}%
+ \IfLanguageDefinedT{hungarian}{\adddialect\l@magyar\l@hungarian}%
}%
\def\captionshungarian{%
@@ -17867,120 +17892,104 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% change chapter and part headings
\if@hungarian@swapheadings
% With titlesec
- \ifcsdef{titleformat}{%
- \ifcsdef{NR@part}{% Hyperref (nameref)
- \let\xpg@save@part@format\NR@part%
- \patchcmd{\NR@part}%
- {\partname\nobreakspace\thepart}%
- {\thepart.\nobreakspace\partname}%
- {}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\thepart.\nobreakspace\partname}%
- {}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{}%
- }
- \ifcsdef{chapter}{%
- \titleformat\chapter[display]%
- {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
- {\thechapter.\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- }{}%
- }{% (not \ifdefined\titleformat)
+ \@ifundefined{titleformat}{%
% With KOMA
- \ifcsdef{sectionformat}{%
- \ifcsdef{partformat}{%
- \let\xpg@save@part@format\partformat%
- \renewcommand{\partformat}{\thepart.~\partname}%
- }{}%
- \ifcsdef{chapterformat}{%
- \let\xpg@save@chap@format\chapterformat%
- \renewcommand{\chapterformat}{\mbox{\thechapter\autodot%
- \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
- }{}%
- }{% (not \ifdefined\sectionformat)
- % With memoir
- \ifcsdef{@memptsize}{%
- \ifcsdef{@makechapterhead}{%
- \let\xpg@save@chap@format\@makechapterhead%
- \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
- {\printchapternum.\chapternamenum\printchaptername}%
- {}%
- {\xpg@warning{Failed to patch chapter for Hungarian}}%
- }{}%
- \ifcsdef{NR@part}{% Hyperref (nameref)
- \let\xpg@save@part@format\NR@part%
- \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}%
- {\printpartnum.\partnamenum\printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
- {\printpartnum.\partnamenum\printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for Hungarian}}%
- }{}%
- }%
- }{% (not \ifdefined\@memptsize)
+ \@ifundefined{sectionformat}{%
+ % Memoir?
+ \@ifundefined{@memptsize}{%
% With standard classes
- \ifcsdef{@makechapterhead}{%
+ \@ifundefined{@makechapterhead}{}{%
\let\xpg@save@chap@format\@makechapterhead%
\patchcmd{\@makechapterhead}%
{\@chapapp\space \thechapter}%
{\thechapter.\space \@chapapp}%
{}%
{\xpg@warning{Failed to patch chapter for Hungarian}}%
- }{}%
- \ifcsdef{NR@part}{% Hyperref (nameref)
+ }%
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\thepart.\nobreakspace\partname}%
+ {}%
+ {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for Hungarian}}}%
+ }% (end \ifdefined\@part)
+ }{% Hyperref (nameref)
\let\xpg@save@part@format\NR@part%
\patchcmd{\NR@part}%
{\partname\nobreakspace\thepart}%
{\thepart.\nobreakspace\partname}%
{}%
{\xpg@warning{Failed to patch part for Hungarian}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\thepart.\nobreakspace\partname}%
- {}%
- {\ifcsdef{part}{\xpg@warning{Failed to patch part for Hungarian}}{}}%
- }{}% (end \ifdefined\@part)
}% (end not hyperref)
- }% (end \ifdefined\@memptsize)
- }% (end \ifdefined\sectionformat)
+ }{% with memoir (\ifdefined\@memptsize)
+ \@ifundefined{@makechapterhead}{}{%
+ \let\xpg@save@chap@format\@makechapterhead%
+ \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
+ {\printchapternum.\chapternamenum\printchaptername}%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Hungarian}}%
+ }%
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+ {\printpartnum.\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }%
+ }{% Hyperref (nameref)
+ \let\xpg@save@part@format\NR@part%
+ \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}%
+ {\printpartnum.\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }%
+ }% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\sectionformat)
+ \@ifundefined{partformat}{}{%
+ \let\xpg@save@part@format\partformat%
+ \renewcommand{\partformat}{\thepart.~\partname}%
+ }%
+ \@ifundefined{chapterformat}{}{%
+ \let\xpg@save@chap@format\chapterformat%
+ \renewcommand{\chapterformat}{\mbox{\thechapter\autodot%
+ \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
+ }%
+ }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\thepart.\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }%
+ }{% Hyperref (nameref)
+ \let\xpg@save@part@format\NR@part%
+ \patchcmd{\NR@part}%
+ {\partname\nobreakspace\thepart}%
+ {\thepart.\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Hungarian}}%
+ }%
+ \@ifundefined{chapter}{}{%
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
+ {\thechapter.\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
+ }%
}% (end \ifdefined\titleformat)
\fi% (end \if@hungarian@swapheadings)
%
% Change running headers
\if@hungarian@swapheaders
- \ifcsdef{chapterformat}{%
- % With KOMA
- \let\xpg@save@chaptermark@format\chaptermarkformat%
- \renewcommand*\chaptermarkformat{%
- \thechapter\autodot\ \IfChapterUsesPrefixLine{\chapapp\@hungarian@forced@dot\enskip}{}}
- }{% (not \ifdefined\chapterformat)
- \ifcsdef{@memptsize}{%
- % With memoir
- \let\xpg@save@chaptermark@format\chaptermark%
- \renewcommand*\chaptermark[1]{%
- \markboth{\memUChead{%
- \ifnum \c@secnumdepth >\m@ne
- \ifbool{@mainmatter}{%
- \thechapter.\ \@chapapp\@hungarian@forced@dot\ %
- }{}%
- \fi
- ##1}}{}}%
- }{% (not \ifdefined\@memptsize)
+ \@ifundefined{chapterformat}{%
+ \@ifundefined{@memptsize}{%
% With standard classes
- \ifcsdef{chaptermark}{%
+ \@ifundefined{chaptermark}{}{%
\ifpatchable{\chaptermark}%
{\@chapapp\ \thechapter.}%
{\let\xpg@save@chaptermark@format\chaptermark%
@@ -17990,8 +17999,24 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{}%
{\xpg@warning{Failed to patch chaptermark for Hungarian}}}%
{}%
- }{}% (end \ifdefined\chaptermark)
+ }% (end \ifdefined\chaptermark)
+ }{% (\ifdefined\@memptsize)
+ % With memoir
+ \let\xpg@save@chaptermark@format\chaptermark%
+ \renewcommand*\chaptermark[1]{%
+ \markboth{\memUChead{%
+ \ifnum \c@secnumdepth >\m@ne
+ \ifbool{@mainmatter}{%
+ \thechapter.\ \@chapapp\@hungarian@forced@dot\ %
+ }{}%
+ \fi
+ ##1}}{}}%
}% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\chapterformat)
+ % With KOMA
+ \let\xpg@save@chaptermark@format\chaptermarkformat%
+ \renewcommand*\chaptermarkformat{%
+ \thechapter\autodot\ \IfChapterUsesPrefixLine{\chapapp\@hungarian@forced@dot\enskip}{}}
}% (end \ifdefined\chapterformat)
\fi% (end \if@hungarian@swapheaders)
}
@@ -18003,58 +18028,58 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\fnum@figure\xpg@save@fnum@figure%
%
% Reset chapter and part heading
- \ifcsdef{titleformat}{%
+ \@ifundefined{titleformat}{%
+ \@ifundefined{sectionformat}{%
+ % With memoir and standard classes
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{NR@part}{%
+ \let\@part\xpg@save@part@format%
+ }{%
+ \let\NR@part\xpg@save@part@format%
+ }%
+ }%
+ \@ifundefined{xpg@save@chap@format}{}{%
+ \let\@makechapterhead\xpg@save@chap@format
+ }%
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@part@format}{}{%
+ \let\partformat\xpg@save@part@format
+ }%
+ \@ifundefined{xpg@save@chap@format}{}{%
+ \let\chapterformat\xpg@save@chap@format
+ }%
+ }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
% With titlesec
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{NR@part}{%
- \let\NR@part\xpg@save@part@format%
- }{%
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{NR@part}{%
\let\@part\xpg@save@part@format%
+ }{%
+ \let\NR@part\xpg@save@part@format%
}%
- }{}%
- \ifcsdef{chapter}{%
+ }%
+ \@ifundefined{chapter}{}{%
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
{\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- }{}%
- }{% (not \ifdefined\titleformat)
- \ifcsdef{sectionformat}{%
- % With KOMA
- \ifcsdef{xpg@save@part@format}{%
- \let\partformat\xpg@save@part@format
- }{}%
- \ifcsdef{xpg@save@chap@format}{%
- \let\chapterformat\xpg@save@chap@format
- }{}%
- }{%
- % With memoir and standard classes
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{NR@part}{%
- \let\NR@part\xpg@save@part@format%
- }{%
- \let\@part\xpg@save@part@format%
- }%
- }{}%
- \ifcsdef{xpg@save@chap@format}{%
- \let\@makechapterhead\xpg@save@chap@format
- }{}%
- }% (end \ifdefined\sectionformat)
+ }%
}% (end \ifdefined\titleformat)
%
% Reset headers
- \ifcsdef{chaptermarkformat}{%
- % With KOMA
- \ifcsdef{xpg@save@chaptermark@format}{%
- \let\chaptermarkformat\xpg@save@chaptermark@format%
- }{}%
- }{%
- \ifcsdef{chaptermark}{%
+ \@ifundefined{chaptermarkformat}{%
+ \@ifundefined{chaptermark}{}{%
% With memoir and standard classes
- \ifcsdef{xpg@save@chaptermark@format}{%
+ \@ifundefined{xpg@save@chaptermark@format}{}{%
\let\chaptermark\xpg@save@chaptermark@format%
- }{}%
- }{}% (end \ifdefined\chaptermark)
- }% (end \ifdefined\chapterformat)
+ }%
+ }% (end \ifdefined\chaptermark)
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@chaptermark@format}{}{%
+ \let\chaptermarkformat\xpg@save@chaptermark@format%
+ }%
+ }% (end \ifdefined\chaptermarkformat)
}
% Hungarian needs 1) trailing dots in chapter headings; 2) trailing dot in section, subsection, etc, counters
\def\@hungarian@forced@dot{}
@@ -18121,13 +18146,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-hy.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-hy.ldf}[polyglossia: module for hy (Armenian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{armenian}
+\InheritGlossFile{armenian}
% \end{macrocode}
% \iffalse
@@ -18138,13 +18163,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ia.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ia.ldf}[polyglossia: module for ia (Interlingua)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{interlingua}
+\InheritGlossFile{interlingua}
% \end{macrocode}
% \iffalse
@@ -18155,7 +18180,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-icelandic.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-icelandic.ldf}[polyglossia: module for Icelandic]
\PolyglossiaSetup{icelandic}{
@@ -18213,13 +18238,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-id.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-id.ldf}[polyglossia: module for id (Malay)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{malay}
+\InheritGlossFile{malay}
% \end{macrocode}
% \iffalse
@@ -18230,7 +18255,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-interlingua.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-interlingua.ldf}[polyglossia: module for Interlingua]
\PolyglossiaSetup{interlingua}{
@@ -18288,14 +18313,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-irish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-irish.ldf}[polyglossia: module for Irish]
% We only provide this gloss for babel compatibility. Since irish is
% a gaelic variety, we use 'gaelic' with variant 'irish' now.
-\xpg@load@master@language{gaelic}
+\InheritGlossFile{gaelic}
% \end{macrocode}
% \iffalse
@@ -18306,13 +18331,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-is.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-is.ldf}[polyglossia: module for is (Icelandic)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{icelandic}
+\InheritGlossFile{icelandic}
% \end{macrocode}
% \iffalse
@@ -18323,13 +18348,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-it.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-it.ldf}[polyglossia: module for it (Italian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{italian}
+\InheritGlossFile{italian}
% \end{macrocode}
% \iffalse
@@ -18341,7 +18366,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \subsection{gloss-italian.ldf}
% \begin{macrocode}
% !TEX encoding = UTF-8 Unicode
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-italian.ldf}[polyglossia: module for Italian]
\PolyglossiaSetup{italian}{
@@ -18360,24 +18385,22 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{italian}{it}
-
-%%% CHANGES START %%% by Enrico Gregorio
-\define@boolkey{italian}[italian@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/italian]
+ {
+ babelshorthands.if = italian@babelshorthands,
+ babelshorthands.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{italian}{babelshorthands=false}
+\InitializeGlossOptions{italian}{babelshorthands=false}
\ifsystem@babelshorthands
- \setkeys{italian}{babelshorthands=true}
+ \SetGlossOptions{italian}{babelshorthands=true}
\else
- \setkeys{italian}{babelshorthands=false}
+ \SetGlossOptions{italian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\italian@shorthands{%
\xpg@activate@shorthands%
@@ -18457,7 +18480,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%%% CHANGES START %%% by Enrico Gregorio
\let\xpgit@savedvalues\empty
-\AtEndPreamble{% the user or the class might define different values
+\AddToHook{begindocument/before}{% the user or the class might define different values
\edef\xpgit@savedvalues{%
\clubpenalty=\the\clubpenalty\space
\@clubpenalty=\the\@clubpenalty\space
@@ -18493,13 +18516,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ja.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ja.ldf}[polyglossia: module for ja (Japanese)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{japanese}
+\InheritGlossFile{japanese}
% \end{macrocode}
% \iffalse
@@ -18510,7 +18533,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-japanese.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-japanese.ldf}[polyglossia: module for Japanese]
@@ -18749,13 +18772,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ka.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ka.ldf}[polyglossia: module for ka (Georgian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{georgian}
+\InheritGlossFile{georgian}
% \end{macrocode}
% \iffalse
@@ -18767,7 +18790,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \subsection{gloss-kannada.ldf}
% \begin{macrocode}
%% gloss-kannada.ldf
-%% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+%% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%%
%% Copyright 2011 Aravinda VK <hallimanearavind AT gmail.com>,
%% Shankar Prasad <prasad.mvs AT gmail.com>,
@@ -18821,12 +18844,20 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\tmp@western{Western}
\newif\ifkannada@numerals
\kannada@numeralstrue
-
-\define@key{kannada}{numerals}[Kannada]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@western
- \kannada@numeralsfalse
- \fi}
+
+\DeclareKeys[polyglossia/gloss/kannada]
+ {
+ numerals.choice:,
+ numerals / kannada.code =
+ {%
+ \kannada@numeralstrue
+ },
+ numerals / western.code =
+ {%
+ \kannada@numeralsfalse
+ },
+ numerals.default:n = kannada
+ }
\def\captionskannada{%
@@ -18890,7 +18921,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-khmer.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-khmer.ldf}[polyglossia: module for Khmer]
\PolyglossiaSetup{khmer}{
@@ -18911,18 +18942,24 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@khmer@numerals
\def\tmp@khmer{khmer}
-\define@key{khmer}{numerals}[arabic]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@khmer%
- \@khmer@numeralstrue%
- \SetLanguageKeys{khmer}{bcp47-extension-u=nu-khmr}%
- \else%
- \@khmer@numeralsfalse%
- \SetLanguageKeys{khmer}{bcp47-extension-u=nu-latn}%
- \fi%
-}
-\setkeys{khmer}{numerals}
+\DeclareKeys[polyglossia/gloss/khmer]
+ {
+ numerals.choice:,
+ numerals / khmer.code =
+ {%
+ \@khmer@numeralstrue
+ \SetLanguageKeys{khmer}{bcp47-extension-u=nu-khmr}%
+ },
+ numerals / arabic.code =
+ {%
+ \@khmer@numeralsfalse
+ \SetLanguageKeys{khmer}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = arabic
+ }
+
+\SetGlossOptions{khmer}{numerals}
\def\captionskhmer{%
\def\prefacename{អារម្ភកថា}%
@@ -19073,13 +19110,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-km.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-km.ldf}[polyglossia: module for km (Khmer)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{khmer}
+\InheritGlossFile{khmer}
% \end{macrocode}
% \iffalse
@@ -19090,13 +19127,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-kmr-Arab.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-kmr-Arab.ldf}[polyglossia: module for kmr-Arab (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -19107,13 +19144,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-kmr-Latn.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-kmr-Latn.ldf}[polyglossia: module for kmr-Latn (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -19124,13 +19161,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-kmr.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-kmr.ldf}[polyglossia: module for kmr (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -19141,13 +19178,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-kn.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-kn.ldf}[polyglossia: module for kn (Kannada)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kannada}
+\InheritGlossFile{kannada}
% \end{macrocode}
% \iffalse
@@ -19158,13 +19195,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ko.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ko.ldf}[polyglossia: module for ko (Korean)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{korean}
+\InheritGlossFile{korean}
% \end{macrocode}
% \iffalse
@@ -19175,7 +19212,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-korean.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean]
@@ -19195,40 +19232,48 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{korean}{ko}
-% variant : plain (0), classic (1), or modern (2)
-\define@choicekey{korean}{variant}[\xpg@val\xpg@nr]{plain,classic,modern}[plain]{%
- \let\xpg@korean@variant\xpg@nr
-}
-% captions : hangul (0) or hanja (1)
-\define@choicekey{korean}{captions}[\xpg@val\xpg@nr]{hangul,hanja}[hangul]{%
- \let\xpg@korean@captions\xpg@nr
-}
-% swapstrings: all (0), headings (1), headers (2), or none (3)
\newif\if@korean@swapheadings
\newif\if@korean@swapheaders
-\define@choicekey*+{korean}{swapstrings}[\xpg@val\xpg@nr]{all,headings,headers,none}[all]{%
- \ifcase\xpg@nr\relax
- % all:
- \@korean@swapheadingstrue%
- \@korean@swapheaderstrue%
- \or
- % headings:
- \@korean@swapheadingstrue%
- \@korean@swapheadersfalse%
- \or
- % headers:
- \@korean@swapheadingsfalse%
- \@korean@swapheaderstrue%
- \or
- % none:
- \@korean@swapheadingsfalse%
- \@korean@swapheadersfalse%
- \fi
- \xpg@info{Option: Korean, swapstrings=\xpg@val}%
-}{\xpg@warning{Unknown Korean swapstrings value `#1'}}
+
+\DeclareKeys[polyglossia/gloss/korean]
+ {
+ variant.choices:nn = { plain, classic, modern }
+ {%
+ \edef\xpg@korean@variant{\the\numexpr\UseName{l_keys_choice_int}-1\relax}
+ },
+ variant.default:n = plain,
+ captions.choices:nn = { hangul, hanja }
+ {%
+ \edef\xpg@korean@captions{\the\numexpr\UseName{l_keys_choice_int}-1\relax}
+ },
+ captions.default:n = hangul,
+ swapstrings.choice:,
+ swapstrings / all.code =
+ {%
+ \@korean@swapheadingstrue
+ \@korean@swapheaderstrue
+ },
+ swapstrings / headings.code =
+ {%
+ \@korean@swapheadingstrue
+ \@korean@swapheadersfalse
+ },
+ swapstrings / headers.code =
+ {%
+ \@korean@swapheadingsfalse
+ \@korean@swapheaderstrue
+ },
+ swapstrings / none.code =
+ {%
+ \@korean@swapheadingsfalse
+ \@korean@swapheadersfalse
+ },
+ swapstrings.default:n = all,
+ swapstrings/unknown.code = \xpg@warning{Unknown Korean swapstrings value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{korean}{variant=plain,swapstrings=all,captions=hangul}
+\InitializeGlossOptions{korean}{variant=plain,swapstrings=all,captions=hangul}
\def\captionskorean{%
\ifcase\xpg@korean@captions\relax
@@ -19290,60 +19335,48 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% change chapter and part headings
\if@korean@swapheadings
% With titlesec
- \ifcsdef{titleformat}{%
- \ifcsdef{NR@part}{% Hyperref (nameref)
- \let\xpg@save@part@format\NR@part
- \patchcmd{\NR@part}%
- {\partname\nobreakspace\thepart}%
- {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
- {}%
- {\xpg@warning{Failed to patch part for Korean}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part
- \patchcmd{\@part}%
+ \@ifundefined{titleformat}{%
+ % With KOMA
+ \@ifundefined{sectionformat}{%
+ % With memoir
+ \@ifundefined{@memptsize}{%
+ % With standard classes
+ \@ifundefined{@makechapterhead}{}{%
+ \let\xpg@save@chap@format\@makechapterhead
+ \patchcmd{\@makechapterhead}%
+ {\@chapapp\space \thechapter}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\space \thechapter
+ \else
+ \koreanTHEname\space \thechapter\space \@chapapp
+ \fi
+ }%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Korean}}%
+ }%
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \ifpatchable{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\let\xpg@save@part@format\@part
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
+ {}%
+ {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for Korean}}}}%
+ {}%
+ }% (end \ifdefined\@part)
+ }{% Hyperref (nameref)
+ \let\xpg@save@part@format\NR@part
+ \patchcmd{\NR@part}%
{\partname\nobreakspace\thepart}%
{\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
{}%
{\xpg@warning{Failed to patch part for Korean}}%
- }{}%
- }
- \ifcsdef{chapter}{%
- \titleformat\chapter[display]%
- {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}%
- {%
- \ifx\@chapapp\korean@appendix@chapapp
- \appendixname\space \thechapter
- \else
- \koreanTHEname\space \thechapter\space \@chapapp
- \fi
- }{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}%
- }{}%
- }{% (not \ifdefined\titleformat)
- % With KOMA
- \ifcsdef{sectionformat}{%
- \ifcsdef{partformat}{%
- \let\xpg@save@part@format\partformat
- \renewcommand*{\partformat}{\koreanTHEname~\thepart~\partname}%
- }{}%
- \ifcsdef{chapterformat}{%
- \let\xpg@save@chap@format\chapterformat
- \renewcommand*{\chapterformat}{\mbox{%
- \IfChapterUsesPrefixLine
- {%
- \ifx\@chapapp\korean@appendix@chapapp
- \chapapp\nobreakspace \thechapter\autodot
- \else
- \koreanTHEname\nobreakspace \thechapter\nobreakspace \chapapp\autodot
- \fi
- }%
- {\thechapter\autodot\enskip}%
- }}%
- }{}%
- }{% (not \ifdefined\sectionformat)
- % With memoir
- \ifcsdef{@memptsize}{%
- \ifcsdef{@makechapterhead}{%
+ }% (end not hyperref)
+ }{% (\ifdefined\@memptsize)
+ \@ifundefined{@makechapterhead}{}{%
\let\xpg@save@chap@format\@makechapterhead
\patchcmd{\@makechapterhead}%
{\printchaptername \chapternamenum \printchapternum}%
@@ -19361,19 +19394,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ifpatchable\printchaptername\@chapapp
{\chapnamefont\koreanTHEname\chapternamenum}{}}%
\fi
- }{}%
- \ifcsdef{NR@part}{% Hyperref (nameref)
- \let\xpg@save@part@format\NR@part
- \patchcmd{\NR@part}%
- {\printpartname \partnamenum \printpartnum}%
- {\printkoreanpartthe \printpartnum\partnamenum \printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for Korean}}%
- \ifdefined\printkoreanpartthe\else
- \def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}%
- \fi
- }{% not hyperref
- \ifcsdef{@part}{%
+ }%
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
\let\xpg@save@part@format\@part
\patchcmd{\@part}%
{\printpartname \partnamenum \printpartnum}%
@@ -19383,84 +19406,77 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ifdefined\printkoreanpartthe\else
\def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}%
\fi
- }{}%
- }%
- }{% (not \ifdefined\@memptsize)
- % With standard classes
- \ifcsdef{@makechapterhead}{%
- \let\xpg@save@chap@format\@makechapterhead
- \patchcmd{\@makechapterhead}%
- {\@chapapp\space \thechapter}%
- {%
- \ifx\@chapapp\korean@appendix@chapapp
- \appendixname\space \thechapter
- \else
- \koreanTHEname\space \thechapter\space \@chapapp
- \fi
- }%
- {}%
- {\xpg@warning{Failed to patch chapter for Korean}}%
- }{}%
- \ifcsdef{NR@part}{% Hyperref (nameref)
+ }%
+ }{% Hyperref (nameref)
\let\xpg@save@part@format\NR@part
\patchcmd{\NR@part}%
- {\partname\nobreakspace\thepart}%
- {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
+ {\printpartname \partnamenum \printpartnum}%
+ {\printkoreanpartthe \printpartnum\partnamenum \printpartname}%
{}%
{\xpg@warning{Failed to patch part for Korean}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \ifpatchable{\@part}%
- {\partname\nobreakspace\thepart}%
- {\let\xpg@save@part@format\@part
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
- {}%
- {\ifcsdef{part}{\xpg@warning{Failed to patch part for Korean}}{}}}%
- {}%
- }{}% (end \ifdefined\@part)
- }% (end not hyperref)
+ \ifdefined\printkoreanpartthe\else
+ \def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}%
+ \fi
+ }%
}% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\sectionformat)
+ \@ifundefined{partformat}{}{%
+ \let\xpg@save@part@format\partformat
+ \renewcommand*{\partformat}{\koreanTHEname~\thepart~\partname}%
+ }%
+ \@ifundefined{chapterformat}{}{%
+ \let\xpg@save@chap@format\chapterformat
+ \renewcommand*{\chapterformat}{\mbox{%
+ \IfChapterUsesPrefixLine
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \chapapp\nobreakspace \thechapter\autodot
+ \else
+ \koreanTHEname\nobreakspace \thechapter\nobreakspace \chapapp\autodot
+ \fi
+ }%
+ {\thechapter\autodot\enskip}%
+ }}%
+ }%
}% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
+ \@ifundefined{NR@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Korean}}%
+ }%
+ }{% Hyperref (nameref)
+ \let\xpg@save@part@format\NR@part
+ \patchcmd{\NR@part}%
+ {\partname\nobreakspace\thepart}%
+ {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Korean}}%
+ }%
+ \@ifundefined{chapter}{}{%
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\space \thechapter
+ \else
+ \koreanTHEname\space \thechapter\space \@chapapp
+ \fi
+ }{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}%
+ }%
}% (end \ifdefined\titleformat)
\fi % (end \if@korean@swapheadings)
%
% Change running headers
\if@korean@swapheaders
- \ifcsdef{chapterformat}{%
- % With KOMA
- \let\xpg@save@chaptermark@format\chaptermarkformat
- \renewcommand*\chaptermarkformat{%
- \IfChapterUsesPrefixLine
- {%
- \ifx\@chapapp\korean@appendix@chapapp
- \chapapp\ \thechapter\autodot
- \else
- \koreanTHEname\ \thechapter\ \chapapp\autodot
- \fi
- }%
- {\thechapter\autodot}%
- \enskip
- }%
- }{% (not \ifdefined\chapterformat)
- \ifcsdef{@memptsize}{%
- % With memoir
- \let\xpg@save@chaptermark@format\chaptermark
- \patchcmd{\chaptermark}%
- {\@chapapp\ \@nameuse{thechapter}}%
- {%
- \ifx\@chapapp\korean@appendix@chapapp
- \appendixname\ \@nameuse{thechapter}%
- \else
- \koreanTHEname\ \@nameuse{thechapter}\ \@chapapp
- \fi
- }%
- {}%
- {\xpg@warning{Failed to patch chaptermark for Korean}}%
- }{% (not \ifdefined\@memptsize)
+ \@ifundefined{chapterformat}{%
+ \@ifundefined{@memptsize}{%
% With standard classes
- \ifcsdef{chaptermark}{%
+ \@ifundefined{chaptermark}{}{%
\ifpatchable{\chaptermark}%
{\@chapapp\ \thechapter}%
{\let\xpg@save@chaptermark@format\chaptermark
@@ -19476,65 +19492,94 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{}%
{\xpg@warning{Failed to patch chaptermark for Korean}}}%
{}%
- }{}% (end \ifdefined\chaptermark)
+ }% (end \ifdefined\chaptermark)
+ }{% (\ifdefined\@memptsize)
+ % With memoir
+ \let\xpg@save@chaptermark@format\chaptermark
+ \patchcmd{\chaptermark}%
+ {\@chapapp\ \@nameuse{thechapter}}%
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \appendixname\ \@nameuse{thechapter}%
+ \else
+ \koreanTHEname\ \@nameuse{thechapter}\ \@chapapp
+ \fi
+ }%
+ {}%
+ {\xpg@warning{Failed to patch chaptermark for Korean}}%
}% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\chapterformat)
+ % With KOMA
+ \let\xpg@save@chaptermark@format\chaptermarkformat
+ \renewcommand*\chaptermarkformat{%
+ \IfChapterUsesPrefixLine
+ {%
+ \ifx\@chapapp\korean@appendix@chapapp
+ \chapapp\ \thechapter\autodot
+ \else
+ \koreanTHEname\ \thechapter\ \chapapp\autodot
+ \fi
+ }%
+ {\thechapter\autodot}%
+ \enskip
+ }%
}% (end \ifdefined\chapterformat)
\fi % (end \if@korean@swapheaders)
}
\def\nokorean@headingsformat{%
% Reset chapter and part heading
- \ifcsdef{titleformat}{%
+ \@ifundefined{titleformat}{%
+ \@ifundefined{sectionformat}{%
+ % With memoir and standard classes
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{NR@part}{%
+ \let\@part\xpg@save@part@format
+ }{%
+ \let\NR@part\xpg@save@part@format
+ }%
+ }%
+ \@ifundefined{xpg@save@chap@format}{}{%
+ \let\@makechapterhead\xpg@save@chap@format
+ }%
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@part@format}{}{%
+ \let\partformat\xpg@save@part@format
+ }%
+ \@ifundefined{xpg@save@chap@format}{}{%
+ \let\chapterformat\xpg@save@chap@format
+ }%
+ }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
% With titlesec
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{NR@part}{%
- \let\NR@part\xpg@save@part@format
- }{%
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{NR@part}{%
\let\@part\xpg@save@part@format
+ }{%
+ \let\NR@part\xpg@save@part@format
}%
- }{}%
- \ifcsdef{chapter}{%
+ }%
+ \@ifundefined{chapter}{}{%
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}%
{\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}%
- }{}%
- }{% (not \ifdefined\titleformat)
- \ifcsdef{sectionformat}{%
- % With KOMA
- \ifcsdef{xpg@save@part@format}{%
- \let\partformat\xpg@save@part@format
- }{}%
- \ifcsdef{xpg@save@chap@format}{%
- \let\chapterformat\xpg@save@chap@format
- }{}%
- }{%
- % With memoir and standard classes
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{NR@part}{%
- \let\NR@part\xpg@save@part@format
- }{%
- \let\@part\xpg@save@part@format
- }%
- }{}%
- \ifcsdef{xpg@save@chap@format}{%
- \let\@makechapterhead\xpg@save@chap@format
- }{}%
- }% (end \ifdefined\sectionformat)
+ }%
}% (end \ifdefined\titleformat)
%
% Reset headers
- \ifcsdef{chaptermarkformat}{%
- % With KOMA
- \ifcsdef{xpg@save@chaptermark@format}{%
- \let\chaptermarkformat\xpg@save@chaptermark@format
- }{}%
- }{%
- \ifcsdef{chaptermark}{%
+ \@ifundefined{chaptermarkformat}{%
+ \@ifundefined{chaptermark}{}{%
% With memoir and standard classes
- \ifcsdef{xpg@save@chaptermark@format}{%
+ \@ifundefined{xpg@save@chaptermark@format}{}{%
\let\chaptermark\xpg@save@chaptermark@format
- }{}%
- }{}% (end \ifdefined\chaptermark)
+ }%
+ }% (end \ifdefined\chaptermark)
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@chaptermark@format}{}{%
+ \let\chaptermarkformat\xpg@save@chaptermark@format
+ }%
}% (end \ifdefined\chapterformat)
}
@@ -19598,13 +19643,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\XeTeXinterchartokenstate\z@
\XeTeXlinebreakpenalty\z@
\XeTeXlinebreakskip\z@skip
- \XeTeXlinebreaklocale "en"
+ \XeTeXlinebreaklocale ""
\noextras@korean@common
}
\else % luatex
- \def\inlineextras@korean{\xpg@attr@korean\xpg@korean@variant\relax}
+ \def\inlineextras@korean{\xpg@attr@cjkspacing\xpg@korean@variant\relax}
\def\noextras@korean{%
- \unsetattribute\xpg@attr@korean
+ \unsetattribute\xpg@attr@cjkspacing
\noextras@korean@common
}
\fi
@@ -19624,7 +19669,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\newattribute\newluatexattribute
\let\unsetattribute\unsetluatexattribute
\fi
-\newattribute\xpg@attr@korean
+\newattribute\xpg@attr@cjkspacing
\newattribute\xpg@attr@autojosa
% user commands for Josa
% Josa : particles in Korean grammar that immediately follow a noun or pronoun.
@@ -19645,7 +19690,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\protected\def\로{\으 로}
\def\xpg@reset@josa {\global\let\xpg@josa@zwang\z@}\xpg@reset@josa
% load lua file for korean
-\directlua{ require "polyglossia-korean" }
+\directlua{ require "polyglossia-cjk-spacing" }
% \end{macrocode}
% \iffalse
%</gloss-korean.ldf>
@@ -19655,13 +19700,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ku-Arab.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ku-Arab.ldf}[polyglossia: module for ku-Arab (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -19672,13 +19717,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ku-Latn.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ku-Latn.ldf}[polyglossia: module for ku-Latn (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -19689,13 +19734,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ku.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ku.ldf}[polyglossia: module for ku (Kurdish)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -19706,7 +19751,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-kurdish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% Created on September 1, 2019
% Last updated on May 17, 2020
@@ -19749,36 +19794,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@kurdish@kurmanji
\def\kurdish@variant{sorani}
-\define@choicekey*+{kurdish}{variant}[\xpg@val\xpg@nr]{sorani,kurmanji}[sorani]{%
- \ifcase\xpg@nr\relax
- % sorani:
- \def\kurdish@variant{sorani}%
- \@kurdish@kurmanjifalse%
- \or
- % kurmanji:
- \def\kurdish@variant{kurmanji}%
- \@kurdish@kurmanjitrue%
- \fi
- \kurdish@set@variety%
- \xpg@info{Option: kurdish, variant=\xpg@val}%
-}{\xpg@warning{Unknown Kurdish variant `#1'}}
\newif\if@kurdish@latin
\newif\if@kurdish@arabic
-\define@choicekey*+{kurdish}{script}[\xpg@val\xpg@nr]{arabic,latin}{%
- \ifcase\xpg@nr\relax
- % arabic:
- \@kurdish@latinfalse%
- \@kurdish@arabictrue%
- \or
- % latin:
- \@kurdish@latintrue%
- \@kurdish@arabicfalse%
- \fi
- \kurdish@set@variety%
- \xpg@info{Option: kurdish, script=\xpg@val}%
-}{\xpg@warning{Unknown Kurdish script `#1'}}
-
\newif\if@western@numerals
\newif\if@force@western@numerals
@@ -19795,7 +19813,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurdish,bcp47=ckb-Arab,bcp47-language=ckb,bcp47-script=Arab,bcp47-casing=ckb-Arab}%
\fi
\def\kurdish@script{latin}
- \xpg@fontsetup@latin{kurdish}%
+ \SetupLatinPolyglossiaFont{kurdish}%
\else
\if@kurdish@arabic% arabic explicitly set
\if@kurdish@kurmanji
@@ -19805,61 +19823,84 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\else
\SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish,bcp47=ckb-Arab,bcp47-language=ckb,bcp47-script=Arab,bcp47-casing=ckb-Arab}%
\fi
- \xpg@fontsetup@nonlatin{kurdish}%
+ \SetupNonLatinPolyglossiaFont{kurdish}%
\else% sorani=arabic, kurmanji=latin
\if@kurdish@kurmanji
\@western@numeralstrue%
\SetLanguageKeys{kurdish}{script=Latin,direction=LR,scripttag=latn,babelname=kurmanji,bcp47=kmr-Latn,bcp47-language=kmr,bcp47-script=Latn,bcp47-casing=kmr-Latn}%
- \xpg@fontsetup@latin{kurdish}%
+ \SetupLatinPolyglossiaFont{kurdish}%
\def\kurdish@script{latin}
\else
\SetLanguageKeys{kurdish}{script=Arabic,direction=RL,scripttag=arab,babelname=kurdish,bcp47=ckb-Arab,bcp47-language=ckb,bcp47-script=Arab,bcp47-casing=ckb-Arab}%
- \xpg@fontsetup@nonlatin{kurdish}%
+ \SetupNonLatinPolyglossiaFont{kurdish}%
\fi
\fi
\fi
}
\newif\if@western@numerals
-\define@choicekey*+{kurdish}{numerals}[\xpg@val\xpg@nr]{eastern,western}[eastern]{%
- \ifcase\xpg@nr\relax
- % eastern:
- \@western@numeralsfalse%
- \or
- % western:
- \@western@numeralstrue%
- \@force@western@numeralstrue%
- \fi
- \xpg@info{Option: Kurdish, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Kurdish numerals option `#1'}}
\newif\ifkurdish@customsep\kurdish@customsepfalse
\def\xpg@sepmark{}
-\define@key{kurdish}{sectionsep}[.]{%
- \kurdish@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
-
-%this is needed for \abjad in arabicnumbers.sty
-\define@boolkey{kurdish}[kurdish@]{abjadjimnotail}[true]{%
- \ifkurdish@abjadjimnotail
- \abjad@jim@notailtrue%
- \else
- \abjad@jim@notailfalse
- \fi%
-}
-
-% NOT YET USED
-\define@key{kurdish}{locale}[default]{%
- \def\@kurdish@locale{#1}}
%TODO add option for CALENDAR
+\DeclareKeys[polyglossia/gloss/kurdish]
+ {
+ variant.choice:,
+ variant / sorani.code =
+ {%
+ \def\kurdish@variant{sorani}%
+ \@kurdish@kurmanjifalse
+ \kurdish@set@variety
+ },
+ variant / kurmanji.code =
+ {%
+ \def\kurdish@variant{kurmanji}%
+ \@kurdish@kurmanjitrue
+ \kurdish@set@variety
+ },
+ variant.default:n = sorani,
+ variant/unknown.code = \xpg@warning{Unknown Kurdish variant `#1'},
+ script.choice:,
+ script / arabic.code =
+ {%
+ \@kurdish@latinfalse
+ \@kurdish@arabictrue
+ \kurdish@set@variety
+ },
+ script / latin.code =
+ {%
+ \@kurdish@latintrue
+ \@kurdish@arabicfalse
+ \kurdish@set@variety
+ },
+ script.default:n = sorani,
+ script/unknown.code = \xpg@warning{Unknown Kurdish script `#1'},
+ numerals.choice:,
+ numerals / eastern.code =
+ {%
+ \@western@numeralsfalse
+ },
+ numerals / western.code =
+ {%
+ \@western@numeralstrue
+ \@force@western@numeralstrue
+ },
+ numerals.default:n = eastern,
+ numerals/unknown.code = \xpg@warning{Unknown Kurdish numerals value `#1'},
+ sectionsep.code = \gdef\xpg@sepmark{#1}\kurdish@customseptrue,
+ sectionsep.default:n = .,
+ abjadjimnotail.if = abjad@jim@notail,
+ abjadjimnotail.default:n = true,
+ locale.store = \@kurdish@locale
+ }
+
% Register default options
-\xpg@initialize@gloss@options{kurdish}{variant=sorani,locale=default,script=arabic,abjadjimnotail=false,numerals=eastern}
+\InitializeGlossOptions{kurdish}{variant=sorani,locale=default,script=arabic,abjadjimnotail=false,numerals=eastern}
\def\kurdish@language{%
- \polyglossia@setup@language@patterns{\kurdish@pattern}%
+ \SetupPolyglossiaLangPatterns{\kurdish@pattern}%
}%
\def\kurdishNativemonth#1{\ifcase#1%
@@ -20112,16 +20153,16 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nokurdish@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname%
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi%
}
\def\kurdish@luatex@capsformat{%
%
% change chapter and part headings
\ifkurdish@customsep
- \ifcsdef{chapter}{%
+ \ifcsname chapter\endcsname%
\let\xpg@save@thesection\thesection%
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
\let\xpg@save@theequation\theequation%
@@ -20133,7 +20174,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\xpg@save@thetable\thetable%
\renewcommand*\thetable{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@table}
- }{}
+ \fi%
\let\xpg@save@thesubsection\thesubsection%
\renewcommand\thesubsection
{\thesection\xpg@sepmark\@arabic\c@subsection}
@@ -20148,30 +20189,30 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nokurdish@luatex@capsformat{%
- \ifcsdef{xpg@save@thesection}{%
+ \ifcsname xpg@save@thesection\endcsname%
\let\thesection\xpg@save@thesection%
- }{}%
- \ifcsdef{xpg@save@theequation}{%
+ \fi%
+ \ifcsname xpg@save@theequation\endcsname%
\let\theequation\xpg@save@theequation%
- }{}%
- \ifcsdef{xpg@save@thefigure}{%
+ \fi%
+ \ifcsname xpg@save@thefigure\endcsname%
\let\thefigure\xpg@save@thefigure%
- }{}%
- \ifcsdef{xpg@save@thetable}{%
+ \fi%
+ \ifcsname xpg@save@thetable\endcsname%
\let\thetable\xpg@save@thetable%
- }{}%
- \ifcsdef{xpg@save@thesubsection}{%
+ \fi%
+ \ifcsname xpg@save@thesubsection\endcsname%
\let\thesubsection\xpg@save@thesubsection%
- \ifcsdef{xpg@save@thesubsubsection}{%
+ \ifcsname xpg@save@thesubsubsection\endcsname%
\let\thesubsubsection\xpg@save@thesubsubsection%
- }{}%
- }{}%
- \ifcsdef{xpg@save@theparagraph}{%
+ \fi%
+ \fi%
+ \ifcsname xpg@save@theparagraph\endcsname%
\let\theparagraph\xpg@save@theparagraph%
- }{}%
- \ifcsdef{xpg@save@thesubparagraph}{%
+ \fi%
+ \ifcsname xpg@save@thesubparagraph\endcsname%
\let\thesubparagraph\xpg@save@thesubparagraph%
- }{}%
+ \fi%
}
\def\blockextras@kurdish{%
@@ -20203,13 +20244,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-kurmanji.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-kurmanji.ldf}[polyglossia: module for Kurmanji Kurdish]
% We provide this gloss for babel compatibility.
-\xpg@load@master@language{kurdish}
+\InheritGlossFile{kurdish}
% \end{macrocode}
% \iffalse
@@ -20220,13 +20261,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-la-x-classic.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-la-xclassic.ldf}[polyglossia: module for la-xclassic (Latin)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{latin}
+\InheritGlossFile{latin}
% \end{macrocode}
% \iffalse
@@ -20237,13 +20278,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-la-x-ecclesia.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-la-xecclesiastic.ldf}[polyglossia: module for la-xecclesiastic (Latin)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{latin}
+\InheritGlossFile{latin}
% \end{macrocode}
% \iffalse
@@ -20254,13 +20295,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-la-x-medieval.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-la-xmedieval.ldf}[polyglossia: module for la-xmedieval (Latin)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{latin}
+\InheritGlossFile{latin}
% \end{macrocode}
% \iffalse
@@ -20271,13 +20312,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-la.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-la.ldf}[polyglossia: module for la (Latin)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{latin}
+\InheritGlossFile{latin}
% \end{macrocode}
% \iffalse
@@ -20288,7 +20329,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lao.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-lao.ldf}[polyglossia: module for Lao]
@@ -20312,14 +20353,23 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@lao@numerals
\def\tmp@lao{lao}
-\define@key{lao}{numerals}[arabic]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@lao\@lao@numeralstrue\else
- \@lao@numeralsfalse\fi
-}
+
+\DeclareKeys[polyglossia/gloss/lao]
+ {
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \@lao@numeralsfalse
+ },
+ numerals / lao.code =
+ {%
+ \@lao@numeralstrue
+ },
+ numerals.default:n = arabic
+ }
% Register default options
-\xpg@initialize@gloss@options{lao}{numerals=arabic}
+\InitializeGlossOptions{lao}{numerals=arabic}
% Translations provided by Brian Wilson <bountonw at gmail.com>
\def\captionslao{%
@@ -20399,7 +20449,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-latex.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-latex.ldf}[polyglossia: module for default language]
@@ -20449,7 +20499,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-latin.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-latin.ldf}[polyglossia: module for Latin]
@@ -20484,6 +20534,9 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\bool_new:N \l_polyglossia_latin_use_v_bool
\bool_new:N \l_polyglossia_latin_use_ligatures_bool
\bool_new:N \l_polyglossia_latin_capitalize_month_bool
+\bool_new:N \l_polyglossia_latin_babelshorthands_bool
+\bool_new:N \l_polyglossia_latin_prosodic_shorthands_bool
+\bool_new:N \l_polyglossia_latin_ecclesiastic_footnotes_bool
\cs_new:Npn \polyglossia_latin_classical_character_codes:
{
@@ -20519,11 +20572,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\cs_new:Npn \polyglossia_latin_use_modern_patterns:
{
- \xpg@ifdefined {latin}
+ \IfLanguageDefinedTF {latin}
{
\def \latin@language
{
- \polyglossia@setup@language@patterns {latin}
+ \SetupPolyglossiaLangPatterns {latin}
\str_case:Vn \l_polyglossia_latin_variant_str
{
{classic} { \adddialect \l@classiclatin \l@latin }
@@ -20547,11 +20600,11 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\cs_new:Npn \polyglossia_latin_set_patterns:n #1
% #1 may be "classiclatin" or "liturgicallatin"
{
- \xpg@ifdefined {#1}
+ \IfLanguageDefinedTF {#1}
{
\def \latin@language
{
- \polyglossia@setup@language@patterns {#1}
+ \SetupPolyglossiaLangPatterns {#1}
\str_case:Vn \l_polyglossia_latin_variant_str
{
{classic} {
@@ -20767,7 +20820,8 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% Save original footnote definition
% Do this at the end of the preamble to catch other
% packages' footnote changes (#391)
-\AtEndPreamble{%
+\hook_gput_code:nnn { begindocument / before } {.}
+{
\cs_if_exist:NT \@makefntext
{
\cs_set_eq:NN \polyglossia_latin_original_footnote:n \@makefntext
@@ -20791,40 +20845,27 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\cs_new:Npn \polyglossia_latin_apply_footnote_option:
{
- \str_if_eq:VnTF \xpg@main@language {latin}
+ \IfMainLanguageTF {latin}
{
\cs_if_exist:NT \@makefntext
{
- \iflatin@ecclesiasticfootnotes
+ \bool_if:NTF \l_polyglossia_latin_ecclesiastic_footnotes_bool
+ {
\let \@makefntext \polyglossia_latin_variant_footnote:n
- \else
+ }
+ {
\let \@makefntext \polyglossia_latin_original_footnote:n
- \fi
+ }
}
}
{
- \iflatin@ecclesiasticfootnotes
- \msg_warning:nn {polyglossia} {latin / ineffective footnote option}
- \fi
- }
- }
-
-\define@boolkey {latin} [latin@] {ecclesiasticfootnotes} [true]
- {
- \token_if_eq_meaning:NNTF \@onlypreamble \@notprerr
- {
- % within the document
- \polyglossia_latin_apply_footnote_option:
- }
- {
- % within the preamble
- % The application of the option has to be postponed as the main
- % language may be undefined when the option is called.
- \AtBeginDocument { \polyglossia_latin_apply_footnote_option: }
+ \bool_if:NT \l_polyglossia_latin_ecclesiastic_footnotes_bool
+ {
+ \msg_warning:nn {polyglossia} {latin / ineffective footnote option}
+ }
}
}
-
%%%%% Language variants: classic, medieval, modern, and ecclesiastic
\str_new:N \l_polyglossia_latin_variant_str
@@ -20887,58 +20928,6 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\polyglossia_latin_use_modern_patterns:
}
-\define@key{latin}{variant}
- {
- \str_case:nnF {#1}
- {
- {classic}
- {
- \msg_info:nnn {polyglossia} {latin / language variant} {classic}
- \polyglossia_latin_classic_settings:
- }
- {medieval}
- {
- \msg_info:nnn {polyglossia} {latin / language variant} {medieval}
- \polyglossia_latin_medieval_settings:
- }
- {modern}
- {
- \msg_info:nnn {polyglossia} {latin / language variant} {modern}
- \polyglossia_latin_modern_settings:
- }
- {ecclesiastic}
- {
- \msg_info:nnn {polyglossia} {latin / language variant} {ecclesiastic}
- \polyglossia_latin_ecclesiastic_settings:
- }
- }
- {
- \msg_warning:nnn {polyglossia} {latin / illegal language variant} {#1}
- }
- }
-
-
-%%%%% Boolean options concerning spelling
-
-\define@boolkey{latin}[latin@]{usej}[true]
- {
- \iflatin@usej
- \bool_set_true:N \l_polyglossia_latin_use_j_bool
- \else
- \bool_set_false:N \l_polyglossia_latin_use_j_bool
- \fi
- }
-
-\define@boolkey{latin}[latin@]{capitalizemonth}[true]
- {
- \iflatin@capitalizemonth
- \bool_set_true:N \l_polyglossia_latin_capitalize_month_bool
- \else
- \bool_set_false:N \l_polyglossia_latin_capitalize_month_bool
- \fi
- }
-
-
%%%%% Hyphenation variants: classic, liturgical, and modern
\msg_new:nnn {polyglossia} {latin / hyphenation variant}
@@ -20951,23 +20940,6 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
The~Latin~hyphenation~variant~"#1"~is~undefined~\msg_line_context:.
}
-\define@key {latin} {hyphenation}
- {
- \str_case:nnTF {#1}
- {
- {classic} { \polyglossia_latin_set_patterns:n {classiclatin} }
- {liturgical} { \polyglossia_latin_set_patterns:n {liturgicallatin} }
- {modern} { \polyglossia_latin_use_modern_patterns: }
- }
- {
- \msg_info:nnn {polyglossia} {latin / hyphenation variant} {#1}
- }
- {
- \msg_warning:nnn {polyglossia} {latin / illegal hyphenation variant} {#1}
- }
- }
-
-
%%%%% Latin captions and date
\def \captionslatin
@@ -21039,30 +21011,89 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
}
-
-%%%%% Latin shorthands
-
-\define@boolkey{latin}[latin@]{babelshorthands}[true]
- {
- }
-
-\define@boolkey{latin}[latin@]{prosodicshorthands}[true]
+\DeclareKeys[polyglossia/gloss/latin]
{
+ babelshorthands.bool_set:N = \l_polyglossia_latin_babelshorthands_bool,
+ babelshorthands.default:n = true,
+ prosodicshorthands.bool_set:N = \l_polyglossia_latin_prosodic_shorthands_bool,
+ prosodicshorthands.default:n = true,
+ usej.bool_set:N = \l_polyglossia_latin_use_j_bool,
+ capitalizemonth.bool_set:N = \l_polyglossia_latin_capitalize_month_bool,
+ hyphenation.code =
+ \str_case:nnTF {#1}
+ {
+ {classic} { \polyglossia_latin_set_patterns:n {classiclatin} }
+ {liturgical} { \polyglossia_latin_set_patterns:n {liturgicallatin} }
+ {modern} { \polyglossia_latin_use_modern_patterns: }
+ }
+ {
+ \msg_info:nnn {polyglossia} {latin / hyphenation variant} {#1}
+ }
+ {
+ \msg_warning:nnn {polyglossia} {latin / illegal hyphenation variant} {#1}
+ },
+ variant.code =
+ \str_case:nnF {#1}
+ {
+ {classic}
+ {
+ \msg_info:nnn {polyglossia} {latin / language variant} {classic}
+ \polyglossia_latin_classic_settings:
+ }
+ {medieval}
+ {
+ \msg_info:nnn {polyglossia} {latin / language variant} {medieval}
+ \polyglossia_latin_medieval_settings:
+ }
+ {modern}
+ {
+ \msg_info:nnn {polyglossia} {latin / language variant} {modern}
+ \polyglossia_latin_modern_settings:
+ }
+ {ecclesiastic}
+ {
+ \msg_info:nnn {polyglossia} {latin / language variant} {ecclesiastic}
+ \polyglossia_latin_ecclesiastic_settings:
+ }
+ }
+ {
+ \msg_warning:nnn {polyglossia} {latin / illegal language variant} {#1}
+ },
+ ecclesiasticfootnotes.choices:nn = { true, false }
+ {
+ \ifcase\UseName{l_keys_choice_int}\or
+ \bool_set_true:N \l_polyglossia_latin_ecclesiastic_footnotes_bool
+ \else
+ \bool_set_false:N \l_polyglossia_latin_ecclesiastic_footnotes_bool
+ \fi
+ \xpg_if_in_preamble:TF
+ {
+ % within the preamble
+ % The application of the option has to be postponed as the main
+ % language may be undefined when the option is called.
+ \AtBeginDocument { \polyglossia_latin_apply_footnote_option: }
+ }
+ {
+ % within the document
+ \polyglossia_latin_apply_footnote_option:
+ }
+ },
+ ecclesiasticfootnotes.default:n = true
}
% Register default options
-\xpg@initialize@gloss@options{latin}{variant=modern,hyphenation=modern,babelshorthands=false,
+\InitializeGlossOptions{latin}{variant=modern,hyphenation=modern,babelshorthands=false,
prosodicshorthands=false,ecclesiasticfootnotes=false,
usej=false,capitalizemonth=true}
\ifsystem@babelshorthands
- \setkeys{latin}{babelshorthands=true}
+ \SetGlossOptions{latin}{babelshorthands=true}
\else
- \setkeys{latin}{babelshorthands=false}
+ \SetGlossOptions{latin}{babelshorthands=false}
\fi
\ExplSyntaxOff % babelsh.def does not support expl3 syntax
-\ifcsundef{initiate@active@char}{\input{babelsh.def}}{}
+\@ifundefined{initiate@active@char}{\input{babelsh.def}}{}
\ExplSyntaxOn
\initiate@active@char {"}
@@ -21094,13 +21125,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\AtBeginDocument
{
- \str_if_eq:VnTF \xpg@main@language {latin}
+ \IfMainLanguageTF {latin}
{
- \iflatin@prosodicshorthands
- \else
+ \bool_if:NF \l_polyglossia_latin_prosodic_shorthands_bool
+ {
\shorthandoff {=}
\shorthandoff* {^}
- \fi
+ }
}
{
% The following command should not be called if the main language
@@ -21462,7 +21493,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let \xpgla@savedvalues \empty
-\AtEndPreamble
+\hook_gput_code:nnn { begindocument / before } {.}
{
\edef \xpgla@savedvalues
{
@@ -21475,12 +21506,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def \noextras@latin
{
- \iflatin@babelshorthands
+ \bool_if:NT \l_polyglossia_latin_babelshorthands_bool
+ {
\polyglossia_latin_no_shorthands:
- \fi
- \iflatin@prosodicshorthands
+ }
+ \bool_if:NT \l_polyglossia_latin_prosodic_shorthands_bool
+ {
\polyglossia_latin_no_prosodic_shorthands:
- \fi
+ }
\xpgla@savedvalues
\polyglossia_latin_no_punctuation_spacing:
\polyglossia_latin_modern_character_codes:
@@ -21496,16 +21529,20 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{
\polyglossia_latin_punctuation_spacing:
}
- \iflatin@babelshorthands
+ \bool_if:NTF \l_polyglossia_latin_babelshorthands_bool
+ {
\polyglossia_latin_shorthands:
- \else
+ }
+ {
\polyglossia_latin_no_shorthands:
- \fi
- \iflatin@prosodicshorthands
+ }
+ \bool_if:NTF \l_polyglossia_latin_prosodic_shorthands_bool
+ {
\polyglossia_latin_prosodic_shorthands:
- \else
+ }
+ {
\polyglossia_latin_no_prosodic_shorthands:
- \fi
+ }
}
\def \blockextras@latin
@@ -21558,64 +21595,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \end{macrocode}
% \iffalse
%</gloss-latin.ldf>
-%<*gloss-latinclassic.ldf>
-% \fi
-% \clearpage
-%
-% \subsection{gloss-latinclassic.ldf}
-% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
-%
-\ProvidesFile{gloss-latinclassic.ldf}[polyglossia: module for classic Latin]
-
-% We provide this as a babel alias
-
-\xpg@load@master@language{latin}
-
-% \end{macrocode}
-% \iffalse
-%</gloss-latinclassic.ldf>
-%<*gloss-latinecclesiastic.ldf>
-% \fi
-% \clearpage
-%
-% \subsection{gloss-latinecclesiastic.ldf}
-% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
-%
-\ProvidesFile{gloss-latinecclesiastic.ldf}[polyglossia: module for ecclesiastic Latin]
-
-% We provide this as a babel alias
-
-\xpg@load@master@language{latin}
-
-% \end{macrocode}
-% \iffalse
-%</gloss-latinecclesiastic.ldf>
-%<*gloss-latinmedieval.ldf>
-% \fi
-% \clearpage
-%
-% \subsection{gloss-latinmedieval.ldf}
-% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
-%
-\ProvidesFile{gloss-latinmedieval.ldf}[polyglossia: module for medieval Latin]
-
-% We provide this as a babel alias
-
-\xpg@load@master@language{latin}
-
-% \end{macrocode}
-% \iffalse
-%</gloss-latinmedieval.ldf>
%<*gloss-latvian.ldf>
% \fi
% \clearpage
%
% \subsection{gloss-latvian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-latvian.ldf}[polyglossia: module for Latvian]
\PolyglossiaSetup{latvian}{
@@ -21642,12 +21628,12 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\contentsname{Saturs}%
\def\listfigurename{Attēlu saraksts}%
\def\listtablename{Tabulu saraksts}%
- \def\indexname{Index}%
+ \def\indexname{Priekšmetu rādītājs}%
\def\figurename{Att.}%
\def\tablename{Tabula}%
\def\partname{Daļa}%
- \def\enclname{encl}%
- \def\ccname{cc}%
+ \def\enclname{Pielikumā}%
+ \def\ccname{Kopija(s)}%
\def\headtoname{To}%
\def\pagename{lpp.}%
\def\seename{sk.}%
@@ -21673,7 +21659,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lithuanian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% Translated by Paulius Sladkevičius <komsas@gmail.com>
@@ -21755,13 +21741,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lo.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-lo.ldf}[polyglossia: module for lo (Lao)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{lao}
+\InheritGlossFile{lao}
% \end{macrocode}
% \iffalse
@@ -21772,13 +21758,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lowersorbian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-lowersorbian.ldf}[polyglossia: module for Lower Sorbian]
% We provide this as a babel alias
-\xpg@load@master@language{sorbian}
+\InheritGlossFile{sorbian}
% \end{macrocode}
% \iffalse
@@ -21789,14 +21775,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lsorbian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-lsorbian.ldf}[polyglossia: module for Lower Sorbian]
% We only provide this gloss for babel compatibility. Since lsorbian is
% a sorbian variety, we use 'sorbian' with variant 'lower' now.
-\xpg@load@master@language{sorbian}
+\InheritGlossFile{sorbian}
% \end{macrocode}
% \iffalse
@@ -21807,13 +21793,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lt.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-lt.ldf}[polyglossia: module for lt (Lithuanian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{lithuanian}
+\InheritGlossFile{lithuanian}
% \end{macrocode}
% \iffalse
@@ -21824,13 +21810,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-lv.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-lv.ldf}[polyglossia: module for lv (Latvian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{latvian}
+\InheritGlossFile{latvian}
% \end{macrocode}
% \iffalse
@@ -21841,7 +21827,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-macedonian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-macedonian.ldf}[polyglossia: module for Macedonian]
\PolyglossiaSetup{macedonian}{
@@ -21940,13 +21926,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-magyar.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-magyar.ldf}[polyglossia: module for Hungarian (Magyar)]
% We only provide this gloss for babel compatibility.
-\xpg@load@master@language{hungarian}
+\InheritGlossFile{hungarian}
% \end{macrocode}
% \iffalse
@@ -21957,7 +21943,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-malay.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-malay.ldf}[polyglossia: module for Malay]
@@ -21985,65 +21971,44 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% Backwards compat. alias
\setlanguagealias[variant=malaysian]{malay}{bahasam}
-\providebool{malay@melayu}
+\@ifundefined{ifmalay@melayu}%
+ {\newif\ifmalay@melayu}{}
\malay@melayufalse
\def\malay@variant{malay}
-\define@choicekey*+{malay}{variant}[\xpg@val\xpg@nr]{indonesian,malaysian}[malaysian]{%
- \ifcase\xpg@nr\relax
- % indonesian:
- \def\malay@variant{indonesian}%
- \malay@melayufalse
- \or
- % malaysian:
- \def\malay@variant{malay}%
- \malay@melayutrue
- \fi
- \ifmalay@melayu
- \SetLanguageKeys{malay}{language=Malay,langtag=MLY,babelname=bahasam,bcp47=zsm,bcp47-language=zsm}%
- \xpg@fontsetup@latin{malay}%
- % Check if \l@malay is defined. If not, try to set it to some variety
- % (specific order as in the csv list below), or null language if everything fails
- \xpg@ifdefined{malay}{}{%
- \def\do##1{%
- \xpg@ifdefined{##1}%
- {\csletcs{l@malay}{l@##1}\listbreak}%
- {}%
- }%
- \docsvlist{melayu,bahasam,bahasai,indonesian,indon,bahasa}
- \xpg@ifdefined{malay}{}{%
- \xpg@warning{No hyphenation patterns for Malay (Malaysian) found\MessageBreak
- I will use the 'null' language instead}%
- \adddialect\l@malay0%
- }%
- }%
- \else
- \SetLanguageKeys{malay}{language=Indonesian,langtag=IND,babelname=bahasa,bcp47=id,bcp47-language=id}%
- \xpg@fontsetup@latin{malay}%
- % Check if \l@indonesian is defined. If not, try to set it to some variety
- % (specific order as in the csv list below), or null language if everything fails
- \xpg@ifdefined{indonesian}{}{%
- \def\do##1{%
- \xpg@ifdefined{##1}%
- {\csletcs{l@indonesian}{l@##1}\listbreak}%
- {}%
- }%
- \docsvlist{indon,bahasai,bahasam,malay,melayu,bahasa}
- \xpg@ifdefined{indonesian}{}{%
- \xpg@warning{No hyphenation patterns for Malay (Indonesian) found\MessageBreak
- I will use the 'null' language instead}%
- \adddialect\l@indonesian0
- }%
- }%
- \fi
- \xpg@info{Option: malay, variant=\xpg@val}%
-}{\xpg@warning{Unknown malay variant `#1'}}
+
+\DeclareKeys[polyglossia/gloss/malay]
+ {
+ variant.choice:,
+ variant / indonesian.code =
+ {%
+ \def\malay@variant{indonesian}%
+ \malay@melayufalse
+ \SetLanguageKeys{malay}{language=Indonesian,langtag=IND,babelname=bahasa,bcp47=id,bcp47-language=id}%
+ \SetupLatinPolyglossiaFont{malay}%
+ % Check if \l@indonesian is defined. If not, try to set it to some variety
+ % (specific order as in the csv list), or null language if everything fails
+ \TryPatternWithFallback{indonesian}{indon,bahasai,bahasam,malay,melayu,bahasa}%
+ },
+ variant / malaysian.code =
+ {%
+ \def\malay@variant{malay}%
+ \malay@melayutrue
+ \SetLanguageKeys{malay}{language=Malay,langtag=MLY,babelname=bahasam,bcp47=zsm,bcp47-language=zsm}%
+ \SetupLatinPolyglossiaFont{malay}%
+ % Check if \l@malay is defined. If not, try to set it to some variety
+ % (specific order as in the csv list), or null language if everything fails
+ \TryPatternWithFallback{malay}{melayu,bahasam,bahasai,indonesian,indon,bahasa}%
+ },
+ variant.default:n = malaysian,
+ variant/unknown.code = \xpg@warning{Unknown malay variant `#1'},
+ }
% Register default options
-\xpg@initialize@gloss@options{malay}{variant=malaysian}
+\InitializeGlossOptions{malay}{variant=malaysian}
\def\malay@language{%
- \polyglossia@setup@language@patterns{\malay@variant}%
+ \SetupPolyglossiaLangPatterns{\malay@variant}%
}%
@@ -22156,7 +22121,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-malayalam.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-malayalam.ldf}[polyglossia: module for Malayalam]
@@ -22226,7 +22191,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-marathi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% Translations provided by Abhijit Navale <abhi_navale@live.in>
% Ordinals (1-100) added by Niranjan Tambe <niranjanvikastambe@gmail.com> on 14th December, 2019
@@ -22256,21 +22221,25 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\ifmarathi@devanagari@numerals
\marathi@devanagari@numeralstrue
-\define@choicekey*+{marathi}{numerals}[\xpg@val\xpg@nr]{Western,Devanagari}[Devanagari]{%
- \ifcase\xpg@nr\relax
- % Western:
- \marathi@devanagari@numeralsfalse%
- \SetLanguageKeys{marathi}{bcp47-extension-u=nu-latn}%
- \or
- % Devanagari:
- \marathi@devanagari@numeralstrue%
- \SetLanguageKeys{marathi}{bcp47-extension-u=nu-deva}%
- \fi
- \xpg@info{Option: Marathi, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Marathi numerals value `#1'}}
+\DeclareKeys[polyglossia/gloss/marathi]
+ {
+ numerals.choice:,
+ numerals / western.code =
+ {%
+ \marathi@devanagari@numeralsfalse
+ \SetLanguageKeys{marathi}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / devanagari.code =
+ {%
+ \marathi@devanagari@numeralstrue
+ \SetLanguageKeys{marathi}{bcp47-extension-u=nu-deva}%
+ },
+ numerals.default:n = devanagari,
+ numerals/unknown.code = \xpg@warning{Unknown Marathi numerals value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{marathi}{numerals=Devanagari}
+\InitializeGlossOptions{marathi}{numerals=Devanagari}
\newcommand{\marathinumerals}[2]{\marathinumber{#2}}
@@ -22370,19 +22339,36 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \end{macrocode}
% \iffalse
%</gloss-marathi.ldf>
+%<*gloss-medievallatin.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-medievallatin.ldf}
+% \begin{macrocode}
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
+%
+\ProvidesFile{gloss-medievallatin.ldf}[polyglossia: module for medieval Latin]
+
+% We provide this as a babel alias
+
+\InheritGlossFile{latin}
+
+% \end{macrocode}
+% \iffalse
+%</gloss-medievallatin.ldf>
%<*gloss-mk.ldf>
% \fi
% \clearpage
%
% \subsection{gloss-mk.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-mk.ldf}[polyglossia: module for mk (Macedonian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{macedonian}
+\InheritGlossFile{macedonian}
% \end{macrocode}
% \iffalse
@@ -22393,13 +22379,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ml.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ml.ldf}[polyglossia: module for ml (Malayalam)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{malayalam}
+\InheritGlossFile{malayalam}
% \end{macrocode}
% \iffalse
@@ -22410,13 +22396,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-mn.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-mn.ldf}[polyglossia: module for mn (Mongolian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{mongolian}
+\InheritGlossFile{mongolian}
% \end{macrocode}
% \iffalse
@@ -22427,7 +22413,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-mongolian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-mongolian.ldf}[polyglossia: module for Mongolian]
@@ -22459,43 +22445,46 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{mongolian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\xpg@nr\relax
- % arabic:
- \cyrillic@numeralsfalse%
- \cyrillic@asbuk@numeralsfalse%
- \or
- % cyrillic:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \or
- % cyrillic-trad:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \or
- % cyrillic-alph:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralstrue%
- \fi
- \xpg@info{Option: Mongolian, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Mongolian numerals value `#1'}}
-\define@boolkey{mongolian}[mongolian@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/mongolian]
+ {
+ babelshorthands.if = mongolian@babelshorthands,
+ babelshorthands.default:n = true,
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \cyrillic@numeralsfalse
+ \cyrillic@asbuk@numeralsfalse
+ },
+ numerals / cyrillic.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ },
+ numerals / cyrillic-trad.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ },
+ numerals / cyrillic-alph.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralstrue
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Mongolian numerals value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{mongolian}{babelshorthands=false,numerals=arabic}
+\InitializeGlossOptions{mongolian}{babelshorthands=false,numerals=arabic}
\ifsystem@babelshorthands
- \setkeys{mongolian}{babelshorthands=true}
+ \SetGlossOptions{mongolian}{babelshorthands=true}
\else
- \setkeys{mongolian}{babelshorthands=false}
+ \SetGlossOptions{mongolian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\mongolian@shorthands{%
\xpg@activate@shorthands%
@@ -22548,7 +22537,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\bibname{Номзүй}%
\def\chaptername{Бүлэг}%
\def\appendixname{Хавсралт}%
- \ifcsundef{thechapter}%
+ \@ifundefined{thechapter}%
{\def\contentsname{Агуулга}}%
{\def\contentsname{Гарчиг}}%
\def\listfigurename{Зургийн жагсаалт}%
@@ -22666,13 +22655,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-mr.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-mr.ldf}[polyglossia: module for mr (Marathi)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{marathi}
+\InheritGlossFile{marathi}
% \end{macrocode}
% \iffalse
@@ -22683,13 +22672,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-naustrian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-naustrian.ldf}[polyglossia: module for Austrian German (current spelling)]
% We provide this as a babel alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -22700,13 +22689,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-nb.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-nb.ldf}[polyglossia: module for nb (Norwegian)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{norwegian}
+\InheritGlossFile{norwegian}
% \end{macrocode}
% \iffalse
@@ -22717,13 +22706,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-newzealand.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-newzealand.ldf}[polyglossia: module for Newzealand English]
% We provide this as a babel alias
-\xpg@load@master@language{english}
+\InheritGlossFile{english}
% \end{macrocode}
% \iffalse
@@ -22734,13 +22723,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ngerman.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ngerman.ldf}[polyglossia: module for German (current spelling)]
% We provide this as a babel alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -22751,7 +22740,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-nko.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-nko.ldf}[Polyglossia: module for N’Ko]
\PolyglossiaSetup{nko}{%
@@ -22849,14 +22838,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-norsk.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-norsk.ldf}[polyglossia: module for Norwegian (Bokmal)]
% We only provide this gloss for babel compatibility. Since norsk is
% actually norwegian bokmal, we use 'norwegian' with variant 'bokmal' now.
-\xpg@load@master@language{norwegian}
+\InheritGlossFile{norwegian}
% \end{macrocode}
% \iffalse
@@ -22867,7 +22856,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-norwegian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-norwegian.ldf}[polyglossia: module for Norwegian]
\PolyglossiaSetup{norwegian}{
@@ -22889,28 +22878,32 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias[variant=nynorsk]{norwegian}{nynorsk}
\def\norwegian@variant{nynorsk}
-\define@choicekey*+{norwegian}{variant}[\xpg@val\xpg@nr]{nynorsk,bokmal}[nynorsk]{%
- \ifcase\xpg@nr\relax
- % nynorsk:
- \def\norwegian@variant{nynorsk}%
- \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn,bcp47-language=nn}%
- \xpg@fontsetup@latin{norwegian}%
- \or
- % bokmal:
- \def\norwegian@variant{norsk}%
- \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb,bcp47-language=nb}%
- \xpg@fontsetup@latin{norwegian}%
- \fi
- \xpg@info{Option: norwegian, variant=\xpg@val}%
-}{\xpg@warning{Unknown norwegian variant `#1'}}
+\DeclareKeys[polyglossia/gloss/norwegian]
+ {
+ variant.choice:,
+ variant / nynorsk.code =
+ {%
+ \def\norwegian@variant{nynorsk}%
+ \SetLanguageKeys{norwegian}{langtag=NYN,babelname=nynorsk,bcp47=nn,bcp47-language=nn}%
+ \SetupLatinPolyglossiaFont{norwegian}%
+ },
+ variant / bokmal.code =
+ {%
+ \def\norwegian@variant{norsk}%
+ \SetLanguageKeys{norwegian}{langtag=NOR,babelname=norsk,bcp47=nb,bcp47-language=nb}%
+ \SetupLatinPolyglossiaFont{norwegian}%
+ },
+ variant.default:n = nynorsk,
+ variant/unknown.code = \xpg@warning{Unknown norwegian variant `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{norwegian}{variant=nynorsk}
+\InitializeGlossOptions{norwegian}{variant=nynorsk}
\def\norwegian@language{%
- \polyglossia@setup@language@patterns{\norwegian@variant}%
+ \SetupPolyglossiaLangPatterns{\norwegian@variant}%
}%
\def\captionsnorwegian@nynorsk{%
@@ -22994,13 +22987,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-nswissgerman.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-nswissgerman.ldf}[polyglossia: module for Swiss German (current spelling)]
% We provide this as a babel alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -23011,14 +23004,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-nynorsk.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-nynorsk.ldf}[polyglossia: module for Norwegian (Nynorsk)]
% We only provide this gloss for babel compatibility. Since nynorsk is
% a norwegian variety, we use 'norwegian' with variant 'nynorsk' now.
-\xpg@load@master@language{norwegian}
+\InheritGlossFile{norwegian}
% \end{macrocode}
% \iffalse
@@ -23029,7 +23022,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-occitan.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
%%
%% This is file `gloss-occitan.ldf',
@@ -23065,19 +23058,19 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{occitan}{oc}
-\define@boolkey{occitan}[occitan@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/occitan]
+ {
+ babelshorthands.if = occitan@babelshorthands,
+ babelshorthands.default:n = true
+ }
\ifsystem@babelshorthands
- \setkeys{occitan}{babelshorthands=true}
+ \SetGlossOptions{occitan}{babelshorthands=true}
\else
- \setkeys{occitan}{babelshorthands=false}
+ \SetGlossOptions{occitan}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\occitan@shorthands{%
\xpg@activate@shorthands%
@@ -23169,7 +23162,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\today{\occitanday\space \occitanmonth\space de~\number\year}%
}
\let\xpgoc@savedvalues\empty
-\AtEndPreamble{% the user or the class might define different values
+\AddToHook{begindocument/before}{% the user or the class might define different values
\edef\xpgoc@savedvalues{%
\clubpenalty=\the\clubpenalty\space
\@clubpenalty=\the\@clubpenalty\space
@@ -23210,7 +23203,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-odia.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% Translations provided by ଅଶୋକ ଦାସ୍ <das@pas.rochester.edu> and ଅଭିଷେକ ଜେନା <avisekjena@gmail.com>
% TODO implement Odia calendar
@@ -23242,32 +23235,37 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\ifodia@devanagari@numerals
\newif\ifodia@odia@numerals
-\define@choicekey*+{odia}{numerals}[\xpg@val\xpg@nr]{Devanagari,Odia,Western}[Devanagari]{%
- \ifcase\xpg@nr\relax
- % Devanagari:
- \odia@odia@numeralsfalse%
- \odia@devanagari@numeralstrue%
- \SetLanguageKeys{odia}{bcp47=or,bcp47-language=or,bcp47-extension-u=nu-deva}%
- \or
- % Odia:
- \odia@odia@numeralstrue%
- \odia@devanagari@numeralsfalse%
- \or
- % Western:
- \odia@odia@numeralsfalse%
- \odia@devanagari@numeralsfalse%
- \SetLanguageKeys{odia}{bcp47=or,bcp47-language=or,bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Odia, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Odia numeral `#1'}}
-
\def\extras@odia{}
\def\noextras@odia{}
-\define@boolkey{odia}[odia@]{changecounternumbering}[true]{}
+\DeclareKeys[polyglossia/gloss/odia]
+ {
+ changecounternumbering.if = odia@changecounternumbering,
+ changecounternumbering.default:n = true,
+ numerals.choice:,
+ numerals / devanagari.code =
+ {%
+ \odia@odia@numeralsfalse
+ \odia@devanagari@numeralstrue
+ \SetLanguageKeys{odia}{bcp47=or,bcp47-language=or,bcp47-extension-u=nu-deva}%
+ },
+ numerals / odia.code =
+ {%
+ \odia@odia@numeralstrue
+ \odia@devanagari@numeralsfalse
+ },
+ numerals / western.code =
+ {%
+ \odia@odia@numeralsfalse
+ \odia@devanagari@numeralsfalse
+ \SetLanguageKeys{odia}{bcp47=or,bcp47-language=or,bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = devanagari,
+ numerals/unknown.code = \xpg@warning{Unknown Odia numeral `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{odia}{changecounternumbering=false,numerals=Devanagari}
+\InitializeGlossOptions{odia}{changecounternumbering=false,numerals=Devanagari}
\def\captionsodia{%
\def\refname{ସନ୍ଦର୍ଭ}%
@@ -23370,13 +23368,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-or.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-odia.ldf}[polyglossia: module for or (Odia)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{odia}
+\InheritGlossFile{odia}
% \end{macrocode}
% \iffalse
@@ -23387,13 +23385,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-pa.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-pa.ldf}[polyglossia: module for pa (Punjabi)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{punjabi}
+\InheritGlossFile{punjabi}
% \end{macrocode}
% \iffalse
@@ -23404,7 +23402,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-persian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-persian.ldf}[polyglossia: module for Persian]
@@ -23433,42 +23431,36 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias{persian}{farsi}
\newif\if@western@numerals
-\define@choicekey*+{persian}{numerals}[\xpg@val\xpg@nr]{eastern,western}[eastern]{%
- \ifcase\xpg@nr\relax
- % eastern:
- \@western@numeralsfalse%
- \SetLanguageKeys{persian}{bcp47-extension-u=nu-arab}%
- \or
- % western:
- \@western@numeralstrue%
- \SetLanguageKeys{persian}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Persian, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Persian numerals option `#1'}}
-
\newif\ifpersian@customsep\persian@customsepfalse
\def\xpg@sepmark{}
-\define@key{persian}{sectionsep}[.]{%
- \persian@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
-
-%this is needed for \abjad in arabicnumbers.sty
-\define@boolkey{persian}[persian@]{abjadjimnotail}[true]{%
- \ifpersian@abjadjimnotail
- \abjad@jim@notailtrue%
- \else
- \abjad@jim@notailfalse
- \fi}
-
-% NOT YET USED
-\define@key{persian}{locale}[default]{%
- \def\@persian@locale{#1}}
%TODO add option for CALENDAR
+\DeclareKeys[polyglossia/gloss/persian]
+ {
+ sectionsep.code = \gdef\xpg@sepmark{#1}\persian@customseptrue,
+ sectionsep.default:n = .,
+ abjadjimnotail.if = abjad@jim@notail,
+ abjadjimnotail.default:n = true,
+ locale.store = \@persian@locale,
+ locale.default:n = default,
+ numerals.choice:,
+ numerals / eastern.code =
+ {%
+ \@western@numeralsfalse
+ \SetLanguageKeys{persian}{bcp47-extension-u=nu-arab}%
+ },
+ numerals / western.code =
+ {%
+ \@western@numeralstrue
+ \SetLanguageKeys{persian}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = eastern,
+ numerals/unknown.code = \xpg@warning{Unknown Persian numerals option `#1'}
+ }
+
% Register default options
-\xpg@initialize@gloss@options{persian}{locale=default,numerals=eastern,abjadjimnotail=false}
+\InitializeGlossOptions{persian}{locale=default,numerals=eastern,abjadjimnotail=false}
\def\farsigregmonth#1{\ifcase#1%
\or ژانویه\or فوریه\or مارس\or آوریل\or مه\or ژوئن\or ژوئیه\or اوت\or سپتامبر\or اکتبر\or نوامبر\or دسامبر\fi}
@@ -23553,16 +23545,16 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nopersian@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname%
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi%
}
\def\persian@luatex@capsformat{%
%
% change chapter and part headings
\ifpersian@customsep
- \ifcsdef{chapter}{%
+ \ifcsname chapter\endcsname%
\let\xpg@save@thesection\thesection%
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
\let\xpg@save@theequation\theequation%
@@ -23574,7 +23566,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\xpg@save@thetable\thetable%
\renewcommand*\thetable{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@table}
- }{}
+ \fi%
\let\xpg@save@thesubsection\thesubsection%
\renewcommand\thesubsection
{\thesection\xpg@sepmark\@arabic\c@subsection}
@@ -23589,30 +23581,30 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nopersian@luatex@capsformat{%
- \ifcsdef{xpg@save@thesection}{%
+ \ifcsname xpg@save@thesection\endcsname%
\let\thesection\xpg@save@thesection%
- }{}%
- \ifcsdef{xpg@save@theequation}{%
+ \fi%
+ \ifcsname xpg@save@theequation\endcsname%
\let\theequation\xpg@save@theequation%
- }{}%
- \ifcsdef{xpg@save@thefigure}{%
+ \fi%
+ \ifcsname xpg@save@thefigure\endcsname%
\let\thefigure\xpg@save@thefigure%
- }{}%
- \ifcsdef{xpg@save@thetable}{%
+ \fi%
+ \ifcsname xpg@save@thetable\endcsname%
\let\thetable\xpg@save@thetable%
- }{}%
- \ifcsdef{xpg@save@thesubsection}{%
+ \fi%
+ \ifcsname xpg@save@thesubsection\endcsname%
\let\thesubsection\xpg@save@thesubsection%
- \ifcsdef{xpg@save@thesubsubsection}{%
+ \ifcsname xpg@save@thesubsubsection\endcsname%
\let\thesubsubsection\xpg@save@thesubsubsection%
- }{}%
- }{}%
- \ifcsdef{xpg@save@theparagraph}{%
+ \fi%
+ \fi%
+ \ifcsname xpg@save@theparagraph\endcsname%
\let\theparagraph\xpg@save@theparagraph%
- }{}%
- \ifcsdef{xpg@save@thesubparagraph}{%
+ \fi%
+ \ifcsname xpg@save@thesubparagraph\endcsname%
\let\thesubparagraph\xpg@save@thesubparagraph%
- }{}%
+ \fi%
}
\def\blockextras@persian{%
@@ -23645,7 +23637,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% \subsection{gloss-piedmontese.ldf}
% \begin{macrocode}
% !TEX encoding = UTF-8 Unicode
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-piedmontese.ldf}[2013/02/12 v1.0 polyglossia: module for Piedmontese]
\makeatletter
@@ -23663,19 +23655,19 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{piedmontese}{pms}
-\define@boolkey{piedmontese}[piedmontese@]{babelshorthands}[true]{}
+\DeclareKeys[polyglossia/gloss/piedmontese]
+ {
+ babelshorthands.if = piedmontese@babelshorthands,
+ babelshorthands.default:n = true
+ }
\ifsystem@babelshorthands
- \setkeys{piedmontese}{babelshorthands=true}
+ \SetGlossOptions{piedmontese}{babelshorthands=true}
\else
- \setkeys{piedmontese}{babelshorthands=false}
+ \SetGlossOptions{piedmontese}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\piedmontese@shorthands{%
\xpg@activate@shorthands%
@@ -23739,7 +23731,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
ëd luj\or d'agost\or dë stèmber\or d'otóber\or ëd novèmber\or dë dzèmber%
\fi\space dal\space\number\year}}
-\AtEndPreamble{%
+\AddToHook{begindocument/before}{%
\edef\xpgpms@savedvalues{%
\clubpenalty=\the\clubpenalty\space
\@clubpenalty=\the\@clubpenalty\space
@@ -23775,7 +23767,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-polish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-polish.ldf}[polyglossia: module for Polish]
@@ -23797,26 +23789,26 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\RequirePackage{luavlna}
\fi
-\define@boolkey{polish}[polish@]{babelshorthands}[true]{}
-
-\define@boolkey{polish}[polish@]{splithyphens}[true]{}
-
-\define@boolkey{polish}[polish@]{vlna}[true]{}
+\DeclareKeys[polyglossia/gloss/polish]
+ {
+ babelshorthands.if = polish@babelshorthands,
+ babelshorthands.default:n = true,
+ splithyphens.if = polish@splithyphens,
+ splithyphens.default:n = true,
+ vlna.if = polish@vlna,
+ vlna.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{polish}{babelshorthands=false,splithyphens=true,vlna=true}
+\InitializeGlossOptions{polish}{babelshorthands=false,splithyphens=true,vlna=true}
\ifsystem@babelshorthands
- \setkeys{polish}{babelshorthands=true}
+ \SetGlossOptions{polish}{babelshorthands=true}
\else
- \setkeys{polish}{babelshorthands=false}
+ \SetGlossOptions{polish}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\let\xpg@hyphen@char-
\def\polish@@splhyphen#1{%
@@ -24034,13 +24026,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-polutonikogreek.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-polutonikogreek.ldf}[polyglossia: module for polytonic Greek]
% We provide this as a babel alias
-\xpg@load@master@language{greek}
+\InheritGlossFile{greek}
% \end{macrocode}
% \iffalse
@@ -24051,7 +24043,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-portuges.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-portuges.ldf}[polyglossia: module for Portuguese]
@@ -24060,7 +24052,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% introduced it in 8.3 filename times). Since polyglossia uses full
% English language names, we use 'portuguese' now.
-\xpg@load@master@language{portuguese}
+\InheritGlossFile{portuguese}
% \end{macrocode}
% \iffalse
@@ -24071,7 +24063,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-portuguese.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-portuguese.ldf}[polyglossia: module for Portuguese]
@@ -24101,41 +24093,42 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\fi
\def\portuguese@variant{portuges}
-\define@choicekey*+{portuguese}{variant}[\xpg@val\xpg@nr]{portuguese,brazilian}[portuguese]{%
- \ifcase\xpg@nr\relax
- % portuguese:
- \def\portuguese@variant{portuges}%
- \SetLanguageKeys{portuguese}{babelname=portuges,bcp47=pt-PT,bcp47-language=pt,bcp47-region=PT}%
- \or
- % brazilian:
- \def\portuguese@variant{brazil}%
- \SetLanguageKeys{portuguese}{babelname=brazil,bcp47=pt-BR,bcp47-language=pt,bcp47-region=BR}%
- % There are no specific brazil patterns
- \adddialect\l@brazil\l@portuges\relax%
- \fi
- \xpg@info{Option: portuguese, variant=\xpg@val}%
-}{\xpg@warning{Unknown portuguese variant `#1'}}
-
-\define@boolkey{portuguese}[portuguese@]{babelshorthands}[true]{}
-\define@boolkey{portuguese}[portuguese@]{splithyphens}[true]{}
+\DeclareKeys[polyglossia/gloss/portuguese]
+ {
+ babelshorthands.if = portuguese@babelshorthands,
+ babelshorthands.default:n = true,
+ splithyphens.if = portuguese@splithyphens,
+ splithyphens.default:n = true,
+ variant.choice:,
+ variant / portuguese.code =
+ {%
+ \def\portuguese@variant{portuges}%
+ \SetLanguageKeys{portuguese}{babelname=portuges,bcp47=pt-PT,bcp47-language=pt,bcp47-region=PT}%
+ },
+ variant / brazilian.code =
+ {%
+ \def\portuguese@variant{brazil}%
+ \SetLanguageKeys{portuguese}{babelname=brazil,bcp47=pt-BR,bcp47-language=pt,bcp47-region=BR}%
+ % There are no specific brazil patterns
+ \adddialect\l@brazil\l@portuges\relax
+ },
+ variant.default:n = portuguese,
+ variant/unknown.code = \xpg@warning{Unknown portuguese variant `#1'},
+ }
% Register default options
-\xpg@initialize@gloss@options{portuguese}{variant=portuguese,
+\InitializeGlossOptions{portuguese}{variant=portuguese,
babelshorthands=false,
splithyphens=true}
\ifsystem@babelshorthands
- \setkeys{portuguese}{babelshorthands=true}
+ \SetGlossOptions{portuguese}{babelshorthands=true}
\else
- \setkeys{portuguese}{babelshorthands=false}
+ \SetGlossOptions{portuguese}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\let\xpg@hyphen@char-
\def\portuguese@@splhyphen#1{%
@@ -24204,7 +24197,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\portuguese@language{%
- \polyglossia@setup@language@patterns{\portuguese@variant}%
+ \SetupPolyglossiaLangPatterns{\portuguese@variant}%
}%
\def\captionsportuguese@portuges{%
@@ -24302,7 +24295,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-punjabi.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
% UTF-8 strings kindly provided by
% Arvinder Singh Kang, <17-11-2022>
@@ -24329,26 +24322,31 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\punjabi@language{%
% patterns are spelled panjabi
- \polyglossia@setup@language@patterns{panjabi}%
+ \SetupPolyglossiaLangPatterns{panjabi}%
}
\newif\ifpunjabi@gurmukhi@numerals
\punjabi@gurmukhi@numeralstrue
-\define@choicekey*+{punjabi}{numerals}[\xpg@val\xpg@nr]{Gurmukhi,Western}[Gurmukhi]{%
- \ifcase\xpg@nr\relax
- % Gurmukhi:
- \punjabi@gurmukhi@numeralstrue%
- \SetLanguageKeys{punjabi}{bcp47-extension-u=nu-guru}%
- \or
- % Western:
- \punjabi@gurmukhi@numeralsfalse%
- \SetLanguageKeys{punjabi}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Punjabi, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Punjabi numeral `#1'}}
+
+\DeclareKeys[polyglossia/gloss/punjabi]
+ {
+ numerals.choice:,
+ numerals / gurmukhi.code =
+ {%
+ \punjabi@gurmukhi@numeralstrue
+ \SetLanguageKeys{punjabi}{bcp47-extension-u=nu-guru}%
+ },
+ numerals / western.code =
+ {%
+ \punjabi@gurmukhi@numeralsfalse
+ \SetLanguageKeys{punjabi}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = gurmukhi,
+ numerals/unknown.code = \xpg@warning{Unknown Punjabi numeral `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{punjabi}{numerals=gurmukhi}
+\InitializeGlossOptions{punjabi}{numerals=gurmukhi}
\newcommand{\punjabinumerals}[2]{\punjabinumber{#2}}
@@ -24410,7 +24408,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-romanian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-romanian.ldf}[polyglossia: module for Romanian]
@@ -24469,7 +24467,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-romansh.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-romansh.ldf}[polyglossia: module for Romansh]
\makeatletter
@@ -24527,7 +24525,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-russian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-russian.ldf}[polyglossia: module for Russian]
@@ -24556,11 +24554,6 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*[spelling=old]{russian}{ru-petr1708}
\newif\if@russian@modern
-\define@key{russian}{spelling}[modern]{%
- \ifstrequal{#1}{old}%
- {\@russian@modernfalse\SetLanguageKeys{russian}{bcp47=ru-petr1708,bcp47-variant=petr1708}}%
- {\@russian@moderntrue\SetLanguageKeys{russian}{bcp47=ru,bcp47-variant=luna1918}}%
-}
\def\captionsrussian{%
\if@russian@modern\captionsrussian@modern\else\captionsrussian@old\fi%
@@ -24572,49 +24565,68 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{russian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\xpg@nr\relax
- % arabic:
- \cyrillic@numeralsfalse%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{russian}{bcp47-extension-u=nu-latn}%
- \or
- % cyrillic:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{russian}{bcp47-extension-u=nu-cyrl}%
- \or
- % cyrillic-trad:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{russian}{bcp47-extension-u=nu-cyrl}%
- \or
- % cyrillic-alph:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralstrue%
- \SetLanguageKeys{russian}{bcp47-extension-u=nu-cyrl}%
- \fi
- \xpg@info{Option: Russian, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Russian numerals value `#1'}}
-\define@boolkey{russian}[russian@]{indentfirst}[true]{%
- \ifrussian@indentfirst
- \SetLanguageKeys{russian}{indentfirst=true}%
- \else
- \SetLanguageKeys{russian}{indentfirst=false}%
- \fi%
-}
-
-\define@boolkey{russian}[russian@]{babelshorthands}[true]{}
-
-% Force punctuation after heading number
-\define@boolkey{russian}[russian@]{forceheadingpunctuation}[true]{}
-
-% Define some math functions
-\define@boolkey{russian}[russian@]{mathfunctions}[true]{}
+\DeclareKeys[polyglossia/gloss/russian]
+ {
+ babelshorthands.if = russian@babelshorthands,
+ babelshorthands.default:n = true,
+ forceheadingpunctuation.if = russian@forceheadingpunctuation,
+ forceheadingpunctuation.default:n = true,
+ mathfunctions.if = russian@mathfunctions,
+ mathfunctions.default:n = true,
+ spelling.choice:,
+ spelling / modern.code =
+ {%
+ \@russian@moderntrue
+ \SetLanguageKeys{russian}{bcp47=ru,bcp47-variant=luna1918}%
+ },
+ spelling / old.code =
+ {%
+ \@russian@modernfalse
+ \SetLanguageKeys{russian}{bcp47=ru-petr1708,bcp47-variant=petr1708}%
+ },
+ spelling.default:n = modern,
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \cyrillic@numeralsfalse
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{russian}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / cyrillic.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{russian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals / cyrillic-trad.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{russian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals / cyrillic-alph.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralstrue
+ \SetLanguageKeys{russian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Russian numerals value `#1'},
+ indentfirst.choice:,
+ indentfirst / true.code =
+ {%
+ \SetLanguageKeys{russian}{indentfirst=true}%
+ },
+ indentfirst / false.code =
+ {%
+ \SetLanguageKeys{russian}{indentfirst=false}%
+ },
+ indentfirst.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{russian}{babelshorthands=false,
+\InitializeGlossOptions{russian}{babelshorthands=false,
spelling=modern,
numerals=arabic,
indentfirst=true,
@@ -24623,16 +24635,12 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\ifsystem@babelshorthands
- \setkeys{russian}{babelshorthands=true}
+ \SetGlossOptions{russian}{babelshorthands=true}
\else
- \setkeys{russian}{babelshorthands=false}
+ \SetGlossOptions{russian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\russian@shorthands{%
\xpg@activate@shorthands%
@@ -24684,7 +24692,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\bibname{Литература}%
\def\chaptername{Глава}%
\def\appendixname{Приложение}%
- \ifcsundef{thechapter}%
+ \@ifundefined{thechapter}%
{\def\contentsname{Содержание}}%
{\def\contentsname{Оглавление}}%
\def\listfigurename{Список иллюстраций}%
@@ -24727,7 +24735,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\bibname{Библіографія}%
\def\chaptername{Глава}%
\def\appendixname{Приложеніе}%
- \ifcsundef{thechapter}%
+ \@ifundefined{thechapter}%
{\def\contentsname{Содержаніе}}%
{\def\contentsname{Оглавленіе}}%
\def\listfigurename{Списокъ иллюстрацій}%
@@ -24926,7 +24934,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-sami.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-sami.ldf}[polyglossia: module for Sami]
@@ -24956,19 +24964,19 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% % northern:
% \def\sami@variant{samin}%
% \SetLanguageKeys{sami}{language=Northern Sami,langtag=NSM}%
-% \xpg@fontsetup@latin{sami}%
+% \SetupLatinPolyglossiaFont{sami}%
% \or
% % other:
% \def\sami@variant{}%
% \SetLanguageKeys{sami}{language= Sami,langtag=}%
-% \xpg@fontsetup@latin{sami}%
+% \SetupLatinPolyglossiaFont{sami}%
% \fi
% \xpg@info{Option: sami, variant=\xpg@val}%
%}{\xpg@warning{Unknown sami variant `#1'}}
%\def\sami@language{%
-% \polyglossia@setup@language@patterns{\sami@variant}%
+% \SetupPolyglossiaLangPatterns{\sami@variant}%
%}%
\def\captionssami@northern{%
@@ -25030,14 +25038,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-samin.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-samin.ldf}[polyglossia: module for Northern Sami]
% We only provide this gloss for babel compatibility. Since samin is
% a sami variety, we use 'sami' with variant 'northern' now.
-\xpg@load@master@language{sami}
+\InheritGlossFile{sami}
% \end{macrocode}
% \iffalse
@@ -25048,7 +25056,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-sanskrit.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-sanskrit.ldf}[polyglossia: module for Sanskrit]
@@ -25077,56 +25085,55 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*[script=gujarati]{sanskrit}{sa-Gujr}
\setlanguagealias*[script=latin]{sanskrit}{sa-Latn}
-\define@key{sanskrit}{Script}[devanagari]{%
- \ifcsdef{fontsetup@sanskrit@#1}%
- {\csname fontsetup@sanskrit@#1\endcsname}%
- {\xpg@error{`#1' is not a valid script for Sanskrit}%
- }%
-}
-
-\define@key{sanskrit}{script}[devanagari]{\setkeys{sanskrit}{Script=#1}}
-
\def\fontsetup@sanskrit@devanagari{%
\SetLanguageKeys{sanskrit}{scripttag=deva,script=Devanagari,bcp47=sa-Deva,bcp47-language=sa,bcp47-script=Deva,bcp47-casing=sa-Deva}
- \xpg@fontsetup@nonlatin{sanskrit}}
+ \SetupNonLatinPolyglossiaFont{sanskrit}}
\def\fontsetup@sanskrit@gujarati{%
\SetLanguageKeys{sanskrit}{scripttag=gujr,script=Gujarati,bcp47=sa-Gujr,bcp47-language=sa,bcp47-script=Gujr,bcp47-casing=sa-Gujr}
- \xpg@fontsetup@nonlatin{sanskrit}}
+ \SetupNonLatinPolyglossiaFont{sanskrit}}
\def\fontsetup@sanskrit@malayalam{%
\SetLanguageKeys{sanskrit}{scripttag=mlym,script=Malayalam,bcp47=sa-Mlym,bcp47-language=sa,bcp47-script=Mlym,bcp47-casing=sa-Mlym}
- \xpg@fontsetup@nonlatin{sanskrit}}
+ \SetupNonLatinPolyglossiaFont{sanskrit}}
\def\fontsetup@sanskrit@bengali{%
\SetLanguageKeys{sanskrit}{scripttag=beng,script=Bengali,bcp47=sa-Beng,bcp47-language=sa,bcp47-script=Beng,bcp47-casing=sa-Beng}
- \xpg@fontsetup@nonlatin{sanskrit}}
+ \SetupNonLatinPolyglossiaFont{sanskrit}}
\def\fontsetup@sanskrit@kannada{%
\SetLanguageKeys{sanskrit}{scripttag=knda,script=Kannada,bcp47=sa-Knda,bcp47-language=sa,bcp47-script=Knda,bcp47-casing=sa-Knda}
- \xpg@fontsetup@nonlatin{sanskrit}}
+ \SetupNonLatinPolyglossiaFont{sanskrit}}
\def\fontsetup@sanskrit@telugu{%
\SetLanguageKeys{sanskrit}{scripttag=telu,script=Telugu,bcp47=sa-Relu,bcp47-language=sa,bcp47-script=Relu,bcp47-casing=sa-Relu}
- \xpg@fontsetup@nonlatin{sanskrit}}
+ \SetupNonLatinPolyglossiaFont{sanskrit}}
\def\fontsetup@sanskrit@latin{%
\SetLanguageKeys{sanskrit}{scripttag=latn,script=Latin,bcp47=sa-Latn,bcp47-language=sa,bcp47-script=Latn,bcp47-casing=sa-Latn}
- \xpg@fontsetup@latin{sanskrit}}
+ \SetupLatinPolyglossiaFont{sanskrit}}
\newif\ifsanskrit@devanagari@numerals
\sanskrit@devanagari@numeralstrue
-\define@choicekey*+{sanskrit}{numerals}[\xpg@val\xpg@nr]{devanagari,western}[devanagari]{%
- \ifcase\xpg@nr\relax
- % devanagari:
- \sanskrit@devanagari@numeralstrue%
- \SetLanguageKeys{sanskrit}{bcp47-extension-u=nu-deva}%
- \or
- % western:
- \sanskrit@devanagari@numeralsfalse%
- \SetLanguageKeys{sanskrit}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Sanskrit, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Sanskrit numeral `#1'}}
+\DeclareKeys[polyglossia/gloss/sanskrit]
+ {
+ script.code = \@ifundefined{fontsetup@sanskrit@#1}%
+ {\xpg@error{`#1' is not a valid script for Sanskrit}}%
+ {\csname fontsetup@sanskrit@#1\endcsname},
+ script.default:n = devanagari,
+ numerals.choice:,
+ numerals / devanagari.code =
+ {%
+ \sanskrit@devanagari@numeralstrue
+ \SetLanguageKeys{sanskrit}{bcp47-extension-u=nu-deva}%
+ },
+ numerals / western.code =
+ {%
+ \sanskrit@devanagari@numeralsfalse
+ \SetLanguageKeys{sanskrit}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = devanagari,
+ numerals/unknown.code = \xpg@warning{Unknown Sanskrit numeral `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{sanskrit}{script=devanagari,numerals=devanagari}
+\InitializeGlossOptions{sanskrit}{script=devanagari,numerals=devanagari}
% Use \providecommand here as the ldf file might
% be reloaded via BCP.
@@ -25207,14 +25214,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-scottish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-scottish.ldf}[polyglossia: module for Scottish Gaelic]
% We only provide this gloss for babel compatibility. Since scottish is
% a gaelic variety, we use 'gaelic' with variant 'scottish' now.
-\xpg@load@master@language{gaelic}
+\InheritGlossFile{gaelic}
% \end{macrocode}
% \iffalse
@@ -25225,7 +25232,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-serbian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-serbian.ldf}[polyglossia: module for Serbian]
%TODO split into gloss-serbiancyr.ldf and gloss-serbianlat.ldf
@@ -25266,67 +25273,10 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\fi
\newif\if@serbian@cyr
-\define@choicekey*+{serbian}{Script}[\xpg@val\xpg@nr]{cyrillic,latin}[cyrillic]{%
- \ifcase\xpg@nr\relax
- % cyrillic:
- \@serbian@cyrtrue
- \xpg@fontsetup@nonlatin{serbian}%
- \or
- % latin:
- \@serbian@cyrfalse
- \xpg@fontsetup@latin{serbian}%
- %TODO \def\serbian@language{\language=\l@serbianlat}%
- % or should we use Croatian patterns as a fallback for the time being???
- \fi
- \serbian@set@languagekeys%
- \xpg@info{Option: Serbian, script=\xpg@val}%
-}{\xpg@warning{Unknown Serbian script `#1'}}
-
-\define@key{serbian}{script}[cyrillic]{\setkeys{serbian}{Script=#1}}
-
\newif\if@serbian@ijekavian
-\define@choicekey*+{serbian}{variant}[\xpg@val\xpg@nr]{ekavian,ijekavian}[ekavian]{%
- \ifcase\xpg@nr\relax
- % ekavian:
- \@serbian@ijekavianfalse%
- \or
- % ijekavian:
- \@serbian@ijekaviantrue%
- \fi
- \serbian@set@languagekeys%
- \xpg@info{Option: Serbian, variant=\xpg@val}%
-}{\xpg@warning{Unknown Serbian variant `#1'}}
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{serbian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\xpg@nr\relax
- % arabic:
- \cyrillic@numeralsfalse%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{serbian}{bcp47-extension-u=nu-latn}%
- \or
- % cyrillic:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{serbian}{bcp47-extension-u=nu-cyrl}%
- \or
- % cyrillic-trad:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{serbian}{bcp47-extension-u=nu-cyrl}%
- \or
- % cyrillic-alph:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralstrue%
- \SetLanguageKeys{serbian}{bcp47-extension-u=nu-cyrl}%
- \fi
- \xpg@info{Option: Serbian, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Serbian numerals value `#1'}}
-
-\define@boolkey{serbian}[serbian@]{splithyphens}[true]{}
-
-\define@boolkey{serbian}[serbian@]{datei}[true]{}
\def\serbian@set@languagekeys{%
\if@serbian@cyr
@@ -25344,10 +25294,75 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\fi%
}
-\setkeys{serbian}{Script,numerals}
+\DeclareKeys[polyglossia/gloss/serbian]
+ {
+ splithyphens.if = serbian@splithyphens,
+ splithyphens.default:n = true,
+ datei.if = serbian@datei,
+ datei.default:n = true,
+ variant.choice:,
+ variant / ekavian.code =
+ {%
+ \@serbian@ijekavianfalse
+ \serbian@set@languagekeys
+ },
+ variant / ijekavian.code =
+ {%
+ \@serbian@ijekaviantrue
+ \serbian@set@languagekeys
+ },
+ variant.default:n = ekavian,
+ variant/unknown.code = \xpg@warning{Unknown Serbian variant `#1'},
+ script.choice:,
+ script / cyrillic.code =
+ {%
+ \@serbian@cyrtrue
+ \SetupNonLatinPolyglossiaFont{serbian}%
+ \serbian@set@languagekeys
+ },
+ script / latin.code =
+ {%
+ \@serbian@cyrfalse
+ \SetupLatinPolyglossiaFont{serbian}%
+ %TODO \def\serbian@language{\language=\l@serbianlat}%
+ % or should we use Croatian patterns as a fallback for the time being???
+ \serbian@set@languagekeys
+ },
+ script.default:n = cyrillic,
+ script/unknown.code = \xpg@warning{Unknown Serbian script `#1'},
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \cyrillic@numeralsfalse
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{serbian}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / cyrillic.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{serbian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals / cyrillic-trad.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{serbian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals / cyrillic-alph.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralstrue
+ \SetLanguageKeys{serbian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Serbian numerals value `#1'}
+ }
+
+\SetGlossOptions{serbian}{script,numerals}
% Register default options
-\xpg@initialize@gloss@options{serbian}{script=cyrillic,numerals=arabic,splithyphens=true}
+\InitializeGlossOptions{serbian}{script=cyrillic,numerals=arabic,splithyphens=true}
\def\captionsserbian{%
\if@serbian@cyr\captionsserbian@cyr\else\captionsserbian@lat\fi
@@ -25648,13 +25663,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-serbianc.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-serbianc.ldf}[polyglossia: module for Serbian (cyrillic)]
% We provide this as a babel alias
-\xpg@load@master@language{serbian}
+\InheritGlossFile{serbian}
% \end{macrocode}
% \iffalse
@@ -25665,7 +25680,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-slovak.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-slovak.ldf}[polyglossia: module for Slovak]
@@ -25686,26 +25701,26 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\RequirePackage{luavlna}
\fi
-\define@boolkey{slovak}[slovak@]{babelshorthands}[true]{}
-
-\define@boolkey{slovak}[slovak@]{splithyphens}[true]{}
-
-\define@boolkey{slovak}[slovak@]{vlna}[true]{}
+\DeclareKeys[polyglossia/gloss/slovak]
+ {
+ babelshorthands.if = slovak@babelshorthands,
+ babelshorthands.default:n = true,
+ splithyphens.if = slovak@splithyphens,
+ splithyphens.default:n = true,
+ vlna.if = slovak@vlna,
+ vlna.default:n = true,
+ }
% Register default options
-\xpg@initialize@gloss@options{slovak}{babelshorthands=false,splithyphens=true,vlna=true}
+\InitializeGlossOptions{slovak}{babelshorthands=false,splithyphens=true,vlna=true}
\ifsystem@babelshorthands
- \setkeys{slovak}{babelshorthands=true}
+ \SetGlossOptions{slovak}{babelshorthands=true}
\else
- \setkeys{slovak}{babelshorthands=false}
+ \SetGlossOptions{slovak}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\let\xpg@hyphen@char-
\def\slovak@@splhyphen#1{%
@@ -25881,7 +25896,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\def\contentsname{Obsah}%
\def\listfigurename{Zoznam obrázkov}%
\def\listtablename{Zoznam tabuliek}%
- \def\indexname{Index}%
+ \def\indexname{Register}%
\def\figurename{Obrázok}%
\def\tablename{Tabuľka}%
%\def\thepart{}%
@@ -25932,13 +25947,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-slovene.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-slovene.ldf}[polyglossia: module for Slovenian]
% We provide this as a babel alias
-\xpg@load@master@language{slovenian}
+\InheritGlossFile{slovenian}
% \end{macrocode}
% \iffalse
@@ -25949,7 +25964,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-slovenian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-slovenian.ldf}[polyglossia: module for Slovenian]
@@ -25970,10 +25985,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% Babel aliases
\setlanguagealias{slovenian}{slovene}
-\define@boolkey{slovenian}[slovenian@]{localalph}[true]{}
+\DeclareKeys[polyglossia/gloss/slovenian]
+ {
+ localalph.if = slovenian@localalph,
+ localalph.default:n = true
+ }
% Register default options
-\xpg@initialize@gloss@options{slovenian}{localalph=false}
+\InitializeGlossOptions{slovenian}{localalph=false}
\def\captionsslovenian{%
@@ -26041,7 +26060,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-sorbian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-sorbian.ldf}[polyglossia: module for Sorbian]
@@ -26069,60 +26088,40 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias[variant=upper]{sorbian}{uppersorbian}
\def\sorbian@variant{usorbian}
-\define@choicekey*+{sorbian}{variant}[\xpg@val\xpg@nr]{upper,lower}[upper]{%
- \ifcase\xpg@nr\relax
- % upper:
- \def\sorbian@variant{usorbian}%
- \SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian,bcp47=hsb,bcp47-language=hsb}%
- \xpg@fontsetup@latin{sorbian}%
- % Check if \l@usorbian is defined. If not, try to set it to some variety
- % (specific order as in the csv list below), or null language if everything fails
- \xpg@ifdefined{usorbian}{}{%
- \def\do##1{%
- \xpg@ifdefined{##1}%
- {\csletcs{l@usorbian}{l@##1}\listbreak}%
- {}%
- }%
- \docsvlist{uppersorbian}
- \xpg@ifdefined{usorbian}{}{%
- \xpg@warning{No hyphenation patterns for Upper Sorbian found\MessageBreak
- I will use the 'null' language instead}%
- \adddialect\l@usorbian0%
- }
- }%
- \or
- % lower:
- \def\sorbian@variant{lsorbian}%
- \SetLanguageKeys{sorbian}{language=Lower Sorbian,langtag=LSB,babelname=lowersorbian,bcp47=dsb,bcp47-language=dsb}%
- \xpg@fontsetup@latin{sorbian}%
- % Check if \l@lsorbian is defined. If not, try to set it to some variety
- % (specific order as in the csv list below), or null language if everything fails
- \xpg@ifdefined{lsorbian}{}{%
- \def\do##1{%
- \xpg@ifdefined{##1}%
- {\csletcs{l@lsorbian}{l@##1}\listbreak}%
- {}%
- }%
- \docsvlist{lowersorbian,Lsorbian,usorbian,uppersorbian}
- \xpg@ifdefined{lsorbian}{}{%
- \xpg@warning{No hyphenation patterns for Lower Sorbian found\MessageBreak
- I will use the 'null' language instead}%
- \adddialect\l@lsorbian0%
- }
- }%
- \fi
- \xpg@info{Option: sorbian, variant=\xpg@val}%
-}{\xpg@warning{Unknown sorbian variant `#1'}}
-
-\define@boolkey{sorbian}[sorbian@]{olddate}[true]{}
+\DeclareKeys[polyglossia/gloss/sorbian]
+ {
+ olddate.if = sorbian@olddate,
+ olddate.default:n = true,
+ variant.choice:,
+ variant / upper.code =
+ {%
+ \def\sorbian@variant{usorbian}%
+ \SetLanguageKeys{sorbian}{language=Upper Sorbian,langtag=USB,babelname=uppersorbian,bcp47=hsb,bcp47-language=hsb}%
+ \SetupLatinPolyglossiaFont{sorbian}%
+ % Check if \l@usorbian is defined. If not, try to set it to some variety
+ % (specific order as in the csv list), or null language if everything fails
+ \TryPatternWithFallback{usorbian}{uppersorbian}%
+ },
+ variant / lower.code =
+ {%
+ \def\sorbian@variant{lsorbian}%
+ \SetLanguageKeys{sorbian}{language=Lower Sorbian,langtag=LSB,babelname=lowersorbian,bcp47=dsb,bcp47-language=dsb}%
+ \SetupLatinPolyglossiaFont{sorbian}%
+ % Check if \l@lsorbian is defined. If not, try to set it to some variety
+ % (specific order as in the csv list), or null language if everything fails
+ \TryPatternWithFallback{lsorbian}{lowersorbian,Lsorbian,usorbian,uppersorbian}%
+ },
+ variant.default:n = upper,
+ variant/unknown.code = \xpg@warning{Unknown sorbian variant `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{sorbian}{variant=upper,olddate=false}
+\InitializeGlossOptions{sorbian}{variant=upper,olddate=false}
\def\sorbian@language{%
- \polyglossia@setup@language@patterns{\sorbian@variant}%
+ \SetupPolyglossiaLangPatterns{\sorbian@variant}%
}%
@@ -26232,7 +26231,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-spanish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-spanish.ldf}[polyglossia: module for Spanish]
@@ -26261,52 +26260,58 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@spanish@mexico
\@spanish@mexicofalse
-\define@choicekey*+{spanish}{variant}[\xpg@val\xpg@nr]{spanish,mexican}[spanish]{%
- \ifcase\xpg@nr\relax
- % spanish:
- \@spanish@mexicofalse%
- \SetLanguageKeys{spanish}{babelname=spanish,bcp47=es-ES,bcp47-region=ES}%
- \or
- % mexican:
- \@spanish@mexicotrue%
- \SetLanguageKeys{spanish}{babelname=spanishmx,bcp47=es-MX,bcp47-region=MX}%
- \fi
- \xpg@info{Option: spanish, variant=\xpg@val}%
-}{\xpg@warning{Unknown spanish variant `#1'}}
% Localized math operators à la babel
\newif\ifspanish@accentedoperators
\newif\ifspanish@spacedoperators
\newif\ifspanish@locoperators
-\define@choicekey*+{spanish}{spanishoperators}[\xpg@val\xpg@nr]{all,accented,spaced,none}[all]{%
- \ifcase\xpg@nr\relax
- % all:
- \spanish@locoperatorstrue%
- \spanish@accentedoperatorstrue%
- \spanish@spacedoperatorstrue%
- \or
- % accented:
- \spanish@locoperatorsfalse%
- \spanish@accentedoperatorstrue%
- \spanish@spacedoperatorsfalse%
- \or
- % spaced:
- \spanish@locoperatorsfalse%
- \spanish@accentedoperatorsfalse%
- \spanish@spacedoperatorstrue%
- \or
- % none:
- \spanish@locoperatorsfalse%
- \spanish@accentedoperatorsfalse%
- \spanish@spacedoperatorsfalse%
- \fi
- \xpg@info{Option: Spanish, spanishoperators=\xpg@val}%
-}{\xpg@warning{Unknown spanishoperators value `#1'}}
-
+\DeclareKeys[polyglossia/gloss/spanish]
+ {
+ variant.choice:,
+ variant / spanish.code =
+ {%
+ \@spanish@mexicofalse
+ \SetLanguageKeys{spanish}{babelname=spanish,bcp47=es-ES,bcp47-region=ES}%
+ },
+ variant / mexican.code =
+ {%
+ \@spanish@mexicotrue
+ \SetLanguageKeys{spanish}{babelname=spanishmx,bcp47=es-MX,bcp47-region=MX}%
+ },
+ variant.default:n = spanish,
+ variant/unknown.code = \xpg@warning{Unknown spanish variant `#1'},
+ spanishoperators.choice:,
+ spanishoperators / all.code =
+ {%
+ \spanish@locoperatorstrue
+ \spanish@accentedoperatorstrue
+ \spanish@spacedoperatorstrue
+ },
+ spanishoperators / accented.code =
+ {%
+ \spanish@locoperatorsfalse
+ \spanish@accentedoperatorstrue
+ \spanish@spacedoperatorsfalse
+ },
+ spanishoperators / spaced.code =
+ {%
+ \spanish@locoperatorsfalse
+ \spanish@accentedoperatorsfalse
+ \spanish@spacedoperatorstrue
+ },
+ spanishoperators / none.code =
+ {%
+ \spanish@locoperatorsfalse
+ \spanish@accentedoperatorsfalse
+ \spanish@spacedoperatorsfalse
+ },
+ spanishoperators.default:n = all,
+ spanishoperators/unknown.code = \xpg@warning{Unknown spanishoperators value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{spanish}{variant=spanish,spanishoperators=none}
+\InitializeGlossOptions{spanish}{variant=spanish,spanishoperators=none}
\let\xpg@save@lim\lim
\let\xpg@save@limsup\limsup
@@ -26472,13 +26477,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-spanishmx.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-spanishmx.ldf}[polyglossia: module for Mexican Spanish]
% We provide this as a babel alias
-\xpg@load@master@language{spanish}
+\InheritGlossFile{spanish}
% \end{macrocode}
% \iffalse
@@ -26489,7 +26494,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-swedish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-swedish.ldf}[polyglossia: module for Swedish]
@@ -26554,13 +26559,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-swissgerman.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-swissgerman.ldf}[polyglossia: module for Swiss German (old spelling)]
% We provide this as a babel alias
-\xpg@load@master@language{german}
+\InheritGlossFile{german}
% \end{macrocode}
% \iffalse
@@ -26571,7 +26576,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-syriac.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-syriac.ldf}[polyglossia: module for Syriac]
@@ -26595,34 +26600,37 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{syriac}{syr}
-\def\syriacnumber#1{\@syriacnumber{#1}}%
+\def\syriacnumber#1{\@syriacnumber{#1}}
\newif\if@eastern@numerals
-\define@choicekey*+{syriac}{numerals}[\xpg@val\xpg@nr]{eastern,western,abjad}[eastern]{%
- \ifcase\xpg@nr\relax
- % eastern:
- \@eastern@numeralstrue
- \SetLanguageKeys{syriac}{bcp47-extension-u=nu-syrc}%
- \or
- % western:
- \@eastern@numeralsfalse
- \SetLanguageKeys{syriac}{bcp47-extension-u=nu-latn}%
- \or
- % abjad:
- \let\syriacnumber\abjadsyriac%
- \fi
- \xpg@info{Option: Syriac, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Syriac numerals option `#1'}}
-
\newif\ifsyriac@customsep\syriac@customsepfalse
\def\xpg@sepmark{}
-\define@key{syriac}{sectionsep}[.]{%
- \syriac@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
+
+\DeclareKeys[polyglossia/gloss/syriac]
+ {
+ sectionsep.code = \gdef\xpg@sepmark{#1}\syriac@customseptrue,
+ sectionsep.default:n = .,
+ numerals.choice:,
+ numerals / eastern.code =
+ {%
+ \@eastern@numeralstrue
+ \SetLanguageKeys{syriac}{bcp47-extension-u=nu-syrc}%
+ },
+ numerals / western.code =
+ {%
+ \@eastern@numeralsfalse
+ \SetLanguageKeys{syriac}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / abjad.code =
+ {%
+ \let\syriacnumber\abjadsyriac
+ },
+ numerals.default:n = eastern,
+ numerals/unknown.code = \xpg@warning{Unknown Syriac numerals option `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{syriac}{numerals=western}
+\InitializeGlossOptions{syriac}{numerals=western}
%\define@key{polyglossia}{syriaclocale}[default]{%
% \def\@syriac@locale{#1}}
@@ -26709,13 +26717,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\IfCharIsAvailableTF{0661}%
{\@ensure@LTR{\protect\arabicdigits{\number#1}}}%
{\@ensure@LTR{\arabicdigits{\number#1}}
- \ifcsdef{arabicfont}%
- {\@ensure@LTR{\protect\arabicdigits{\number#1}}%
- \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs:
- I am using \string\arabicfont instead}}%
+ \@ifundefined{arabicfont}%
{\number#1%%% <---changed from \RL{\protect\reset@font\protect\number#1}%
\xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs:
since \string\arabicfont is not defined, we'll use Western numerals instead}}%
+ {\@ensure@LTR{\protect\arabicdigits{\number#1}}%
+ \xpg@warning{You have specified the option numerals=eastern for Syriac, but the Syriac font does not contain the appropriate glyphs:
+ I am using \string\arabicfont instead}}%
}%
\else
%%\RL{\protect\reset@font\number#1}%
@@ -26753,16 +26761,16 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nosyriac@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname%
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi%
}
\def\syriac@luatex@capsformat{%
%
% change chapter and part headings
\ifsyriac@customsep
- \ifcsdef{chapter}{%
+ \ifcsname chapter\endcsname%
\let\xpg@save@thesection\thesection%
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
\let\xpg@save@theequation\theequation%
@@ -26774,7 +26782,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\xpg@save@thetable\thetable%
\renewcommand*\thetable{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@table}
- }{}
+ \fi%
\let\xpg@save@thesubsection\thesubsection%
\renewcommand\thesubsection
{\thesection\xpg@sepmark\@arabic\c@subsection}
@@ -26789,30 +26797,30 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nosyriac@luatex@capsformat{%
- \ifcsdef{xpg@save@thesection}{%
+ \ifcsname xpg@save@thesection\endcsname%
\let\thesection\xpg@save@thesection%
- }{}%
- \ifcsdef{xpg@save@theequation}{%
+ \fi%
+ \ifcsname xpg@save@theequation\endcsname%
\let\theequation\xpg@save@theequation%
- }{}%
- \ifcsdef{xpg@save@thefigure}{%
+ \fi%
+ \ifcsname xpg@save@thefigure\endcsname%
\let\thefigure\xpg@save@thefigure%
- }{}%
- \ifcsdef{xpg@save@thetable}{%
+ \fi%
+ \ifcsname xpg@save@thetable\endcsname%
\let\thetable\xpg@save@thetable%
- }{}%
- \ifcsdef{xpg@save@thesubsection}{%
+ \fi%
+ \ifcsname xpg@save@thesubsection\endcsname%
\let\thesubsection\xpg@save@thesubsection%
- \ifcsdef{xpg@save@thesubsubsection}{%
+ \ifcsname xpg@save@thesubsubsection\endcsname%
\let\thesubsubsection\xpg@save@thesubsubsection%
- }{}%
- }{}%
- \ifcsdef{xpg@save@theparagraph}{%
+ \fi%
+ \fi%
+ \ifcsname xpg@save@theparagraph\endcsname%
\let\theparagraph\xpg@save@theparagraph%
- }{}%
- \ifcsdef{xpg@save@thesubparagraph}{%
+ \fi%
+ \ifcsname xpg@save@thesubparagraph\endcsname%
\let\thesubparagraph\xpg@save@thesubparagraph%
- }{}%
+ \fi%
}
\def\blockextras@syriac{%
@@ -26844,7 +26852,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-tamil.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-tamil.ldf}[polyglossia: module for Tamil]
@@ -26914,7 +26922,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-telugu.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-telugu.ldf}[polyglossia: module for Telugu]
@@ -26987,7 +26995,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-thai.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-thai.ldf}[polyglossia: module for Thai]
%% This is partly based on thai-latex for Babel:
@@ -27018,19 +27026,25 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@thai@numerals
\def\tmp@thai{thai}
-\define@key{thai}{numerals}[arabic]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@thai
- \@thai@numeralstrue%
- \SetLanguageKeys{thai}{bcp47-extension-u=nu-thai}%
- \else
- \@thai@numeralsfalse%
- \SetLanguageKeys{thai}{bcp47-extension-u=nu-latn}%
- \fi
-}
+
+\DeclareKeys[polyglossia/gloss/thai]
+ {
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \@thai@numeralsfalse
+ \SetLanguageKeys{thai}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / thai.code =
+ {%
+ \@thai@numeralstrue
+ \SetLanguageKeys{thai}{bcp47-extension-u=nu-thai}%
+ },
+ numerals.default:n = arabic,
+ }
% Register default options
-\xpg@initialize@gloss@options{thai}{numerals=arabic}
+\InitializeGlossOptions{thai}{numerals=arabic}
\def\captionsthai{%
\def\refname{หนังสืออ้างอิง}%
@@ -27145,7 +27159,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-tibetan.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-tibetan.ldf}[polyglossia: module for Tibetan]
%% Copyright 2013 Elie Roux
@@ -27171,20 +27185,18 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*{tibetan}{bo}
\newif\if@tibetan@numerals
-\def\tmp@tibetan{tibetan}
-\define@key{tibetan}{numerals}[tibetan]{%
- \def\@tmpa{#1}%
- \ifx\@tmpa\tmp@tibetan
- \@tibetan@numeralstrue%
- \SetLanguageKeys{tibetan}{bcp47-extension-u=nu-tibt}%
- \else
- \@tibetan@numeralsfalse%
- \SetLanguageKeys{tibetan}{bcp47-extension-u=nu-latn}%
- \fi%
-}
+\DeclareKeys[polyglossia/gloss/tibetan]
+ {
+ numerals.choice:,
+ numerals/tibetan.code = \@tibetan@numeralstrue
+ \SetLanguageKeys{tibetan}{bcp47-extension-u=nu-tibt},
+ numerals/arabic.code = \@tibetan@numeralsfalse
+ \SetLanguageKeys{tibetan}{bcp47-extension-u=nu-latn},
+ numerals.default:n = tibetan
+ }
\ifluatex
- \newluatexattribute\xpg@tibteol %
+ \newattribute\xpg@tibteol %
\directlua{polyglossia.load_tibt_eol()}%
\fi
@@ -27209,7 +27221,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
% Register default options
-\xpg@initialize@gloss@options{tibetan}{numerals=tibetan}
+\InitializeGlossOptions{tibetan}{numerals=tibetan}
% some are known, but very few
% a few come from "Standardizing Tibetan Terms of Information Technology"
@@ -27371,7 +27383,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-turkish.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-turkish.ldf}[polyglossia: module for Turkish]
\RequirePackage{hijrical}
@@ -27489,7 +27501,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-turkmen.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-turkmen.ldf}[polyglossia: module for Turkmen]
%% Translations provided by Nazar Annagurban <nazartm at gmail dot com>
@@ -27547,12 +27559,12 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ug.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ug.ldf}[polyglossia: module for ug (Uyghur)]
% BCP 47 tag for Uyghur
-\xpg@load@master@language{uyghur}
+\InheritGlossFile{uyghur}
% \end{macrocode}
% \iffalse
@@ -27563,7 +27575,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-ukrainian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-ukrainian.ldf}[polyglossia: module for Ukrainian]
% Strings taken from Babel
@@ -27591,51 +27603,52 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\ifcyrillic@numerals
\newif\ifcyrillic@asbuk@numerals
-\define@choicekey*+{ukrainian}{numerals}[\xpg@val\xpg@nr]{arabic,cyrillic,cyrillic-trad,cyrillic-alph}[arabic]{%
- \ifcase\xpg@nr\relax
- % arabic:
- \cyrillic@numeralsfalse%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-latn}%
- \or
- % cyrillic:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-cyrl}%
- \or
- % cyrillic-trad:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralsfalse%
- \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-cyrl}%
- \or
- % cyrillic-alph:
- \cyrillic@numeralstrue%
- \cyrillic@asbuk@numeralstrue%
- \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-cyrl}%
- \fi
- \xpg@info{Option: Ukrainian, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Ukrainian numerals value `#1'}}
-
-% Define some math functions
-\define@boolkey{ukrainian}[ukrainian@]{mathfunctions}[true]{}
+\DeclareKeys[polyglossia/gloss/ukrainian]
+ {
+ babelshorthands.if = ukrainian@babelshorthands,
+ babelshorthands.default:n = true,
+ mathfunctions.if = ukrainian@mathfunctions,
+ mathfunctions.default:n = true,
+ numerals.choice:,
+ numerals / arabic.code =
+ {%
+ \cyrillic@numeralsfalse
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-latn}%
+ },
+ numerals / cyrillic.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals / cyrillic-trad.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralsfalse
+ \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals / cyrillic-alph.code =
+ {%
+ \cyrillic@numeralstrue
+ \cyrillic@asbuk@numeralstrue
+ \SetLanguageKeys{ukrainian}{bcp47-extension-u=nu-cyrl}%
+ },
+ numerals.default:n = arabic,
+ numerals/unknown.code = \xpg@warning{Unknown Ukrainian numerals value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{ukrainian}{numerals=arabic,mathfunctions=true}
-
-\define@boolkey{ukrainian}[ukrainian@]{babelshorthands}[true]{}
+\InitializeGlossOptions{ukrainian}{numerals=arabic,mathfunctions=true}
\ifsystem@babelshorthands
- \setkeys{ukrainian}{babelshorthands=true}
+ \SetGlossOptions{ukrainian}{babelshorthands=true}
\else
- \setkeys{ukrainian}{babelshorthands=false}
+ \SetGlossOptions{ukrainian}{babelshorthands=false}
\fi
-\ifcsundef{initiate@active@char}{%
- \input{babelsh.def}%
- \initiate@active@char{"}%
- \shorthandoff{"}%
-}{}
+\InitializeBabelShorthands
\def\ukrainian@shorthands{%
\xpg@activate@shorthands%
@@ -27862,13 +27875,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-uppersorbian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-uppersorbian.ldf}[polyglossia: module for Upper Sorbian]
% We provide this as a babel alias
-\xpg@load@master@language{sorbian}
+\InheritGlossFile{sorbian}
% \end{macrocode}
% \iffalse
@@ -27879,7 +27892,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-urdu.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
%%% Adapted from a file contributed by Kamal Abdali
\ProvidesFile{gloss-urdu.ldf}[polyglossia: module for Urdu]
@@ -27906,52 +27919,46 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setlanguagealias*{urdu}{ur}
\newif\if@western@numerals
-\define@choicekey*+{urdu}{numerals}[\xpg@val\xpg@nr]{eastern,western}[eastern]{%
- \ifcase\xpg@nr\relax
- % eastern:
- \@western@numeralsfalse%
- \SetLanguageKeys{urdu}{bcp47-extension-u=nu-arab}%
- \or
- % western:
- \@western@numeralstrue%
- \SetLanguageKeys{urdu}{bcp47-extension-u=nu-latn}%
- \fi
- \xpg@info{Option: Urdu, numerals=\xpg@val}%
-}{\xpg@warning{Unknown Urdu numerals option `#1'}}
-
\newif\ifurdu@customsep\urdu@customsepfalse
\def\xpg@sepmark{}
-\define@key{urdu}{sectionsep}[.]{%
- \urdu@customseptrue%
- \gdef\xpg@sepmark{#1}%
-}
-
-%this is needed for \abjad in arabicnumbers.sty
-\define@boolkey{urdu}[urdu@]{abjadjimnotail}[true]{%
- \ifurdu@abjadjimnotail
- \abjad@jim@notailtrue%
- \else
- \abjad@jim@notailfalse
- \fi%
-}
-
\newif\if@hijrical
-\define@choicekey*+{urdu}{calendar}[\xpg@val\xpg@nr]{gregorian,hijri}[gregorian]{%
- \ifcase\xpg@nr\relax
- % gregorian:
- \@hijricalfalse
- \or
- % hijri:
- \@hijricaltrue
- \fi
- \xpg@info{Option: Urdu, calendar=\xpg@val}%
-}{\xpg@warning{Unknown Urdu calendar option `#1'}}
-\define@key{urdu}{hijricorrection}[0]{%
- \gdef\urdu@hijri@correction{#1}}%
+\DeclareKeys[polyglossia/gloss/urdu]
+ {
+ abjadjimnotail.if = abjad@jim@notail,
+ abjadjimnotail.default:n = true,
+ sectionsep.code = \gdef\xpg@sepmark{#1}\urdu@customseptrue,
+ sectionsep.default:n = .,
+ hijricorrection.code = \gdef\urdu@hijri@correction{#1},
+ hijricorrection.default:n = 0,
+ calendar.choice:,
+ calendar / gregorian.code =
+ {%
+ \@hijricalfalse
+ },
+ calendar / hijri.code =
+ {%
+ \@hijricaltrue
+ },
+ calendar.default:n = gregorian,
+ calendar/unknown.code = \xpg@warning{Unknown Urdu calendar option `#1'},
+ numerals.choice:,
+ numerals / eastern.code =
+ {%
+ \@western@numeralsfalse
+ \SetLanguageKeys{urdu}{bcp47-extension-u=nu-arab}%
+ },
+ numerals / western.code =
+ {%
+ \@western@numeralstrue
+ \SetLanguageKeys{urdu}{bcp47-extension-u=nu-latn}%
+ },
+ numerals.default:n = eastern,
+ numerals/unknown.code = \xpg@warning{Unknown Urdu numerals option `#1'}
+ }
% This should set the defaults
-\setkeys{urdu}{calendar,numerals,hijricorrection}
+\SetGlossOptions{urdu}{calendar,numerals,hijricorrection}
\def\urdugregmonth#1{\ifcase#1%
\or جنوری\or فروری\or مارچ\or اپریل\or مئی\or جون\or جولائی\or اگست\or ستمبر\or اکتوبر\or نومبر\or دسمبر\fi}
@@ -28038,16 +28045,16 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nourdu@xetex@capsformat{%
- \ifcsdef{xpg@save@sepmark}{%
+ \ifcsname xpg@save@sepmark\endcsname%
\SepMark{\xpg@save@sepmark}
- }{}%
+ \fi%
}
\def\urdu@luatex@capsformat{%
%
% change chapter and part headings
\ifurdu@customsep
- \ifcsdef{chapter}{%
+ \ifcsname chapter\endcsname%
\let\xpg@save@thesection\thesection%
\renewcommand*\thesection{\thechapter\xpg@sepmark\@arabic\c@section}
\let\xpg@save@theequation\theequation%
@@ -28059,7 +28066,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\xpg@save@thetable\thetable%
\renewcommand*\thetable{%
\ifnum\c@chapter>\z@\thechapter\xpg@sepmark\fi\@arabic\c@table}
- }{}
+ \fi%
\let\xpg@save@thesubsection\thesubsection%
\renewcommand\thesubsection
{\thesection\xpg@sepmark\@arabic\c@subsection}
@@ -28074,30 +28081,30 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
}
\def\nourdu@luatex@capsformat{%
- \ifcsdef{xpg@save@thesection}{%
+ \ifcsname xpg@save@thesection\endcsname%
\let\thesection\xpg@save@thesection%
- }{}%
- \ifcsdef{xpg@save@theequation}{%
+ \fi%
+ \ifcsname xpg@save@theequation\endcsname%
\let\theequation\xpg@save@theequation%
- }{}%
- \ifcsdef{xpg@save@thefigure}{%
+ \fi%
+ \ifcsname xpg@save@thefigure\endcsname%
\let\thefigure\xpg@save@thefigure%
- }{}%
- \ifcsdef{xpg@save@thetable}{%
+ \fi%
+ \ifcsname xpg@save@thetable\endcsname%
\let\thetable\xpg@save@thetable%
- }{}%
- \ifcsdef{xpg@save@thesubsection}{%
+ \fi%
+ \ifcsname xpg@save@thesubsection\endcsname%
\let\thesubsection\xpg@save@thesubsection%
- \ifcsdef{xpg@save@thesubsubsection}{%
+ \ifcsname xpg@save@thesubsubsection\endcsname%
\let\thesubsubsection\xpg@save@thesubsubsection%
- }{}%
- }{}%
- \ifcsdef{xpg@save@theparagraph}{%
+ \fi%
+ \fi%
+ \ifcsname xpg@save@theparagraph\endcsname%
\let\theparagraph\xpg@save@theparagraph%
- }{}%
- \ifcsdef{xpg@save@thesubparagraph}{%
+ \fi%
+ \ifcsname xpg@save@thesubparagraph\endcsname%
\let\thesubparagraph\xpg@save@thesubparagraph%
- }{}%
+ \fi%
}
\def\blockextras@urdu{%
@@ -28129,14 +28136,14 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-usorbian.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-usorbian.ldf}[polyglossia: module for Upper Sorbian]
% We only provide this gloss for babel compatibility. Since usorbian is
% a sorbian variety, we use 'sorbian' with variant 'upper' now.
-\xpg@load@master@language{sorbian}
+\InheritGlossFile{sorbian}
% \end{macrocode}
% \iffalse
@@ -28147,7 +28154,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-uyghur.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-uyghur.ldf}[polyglossia: module for Uyghur]
%% Translations provided by Osman Tursun (Github Account: neouyghur)
@@ -28171,62 +28178,72 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\newif\if@uyghur@swapcaptions
\newif\if@uyghur@swapheadings
\newif\if@uyghur@swapheaders
-\define@choicekey*+{uyghur}{swapstrings}[\xpg@val\xpg@nr]{all,captions,headings,headers,hheaders,none}[all]{%
- \ifcase\xpg@nr\relax
- % all:
- \@uyghur@swapcaptionstrue%
- \@uyghur@swapheadingstrue%
- \@uyghur@swapheaderstrue%
- \or
- % captions:
- \@uyghur@swapcaptionstrue%
- \@uyghur@swapheadingsfalse%
- \@uyghur@swapheadersfalse%
- \or
- % headings:
- \@uyghur@swapcaptionsfalse%
- \@uyghur@swapheadingstrue%
- \@uyghur@swapheadersfalse%
- \or
- % headers:
- \@uyghur@swapcaptionsfalse%
- \@uyghur@swapheadingsfalse%
- \@uyghur@swapheaderstrue%
- \or
- % hheaders:
- \@uyghur@swapcaptionsfalse%
- \@uyghur@swapheadingstrue%
- \@uyghur@swapheaderstrue%
- \or
- % none:
- \@uyghur@swapcaptionsfalse%
- \@uyghur@swapheadingsfalse%
- \@uyghur@swapheadersfalse%
- \fi
- \xpg@info{Option: Uyghur, swapstrings=\xpg@val}%
-}{\xpg@warning{Unknown Uyghur swapstrings value `#1'}}
-
\newif\if@uyghur@ordchapter
\newif\if@uyghur@romchapter
-\define@choicekey*+{uyghur}{chapterformat}[\xpg@val\xpg@nr]{ordinal,roman,arabic}[ordinal]{%
- \ifcase\xpg@nr\relax
- % ordinal:
- \@uyghur@ordchaptertrue%
- \@uyghur@romchapterfalse%
- \or
- % roman:
- \@uyghur@ordchapterfalse%
- \@uyghur@romchaptertrue%
- \or
- % arabic:
- \@uyghur@ordchapterfalse%
- \@uyghur@romchapterfalse%
- \fi
- \xpg@info{Option: Uyghur, chapterformat=\xpg@val}%
-}{\xpg@warning{Unknown Uyghur chapterformat value `#1'}}
+
+\DeclareKeys[polyglossia/gloss/uyghur]
+ {
+ chapterformat.choice:,
+ chapterformat / ordinal.code =
+ {%
+ \@uyghur@ordchaptertrue
+ \@uyghur@romchapterfalse
+ },
+ chapterformat / roman.code =
+ {%
+ \@uyghur@ordchapterfalse
+ \@uyghur@romchaptertrue
+ },
+ chapterformat / arabic.code =
+ {%
+ \@uyghur@ordchapterfalse
+ \@uyghur@romchapterfalse
+ },
+ chapterformat.default:n = ordinal,
+ chapterformat/unknown.code = \xpg@warning{Unknown Uyghur chapterformat value `#1'},
+ swapstrings.choice:,
+ swapstrings / all.code =
+ {%
+ \@uyghur@swapcaptionstrue
+ \@uyghur@swapheadingstrue
+ \@uyghur@swapheaderstrue
+ },
+ swapstrings / captions.code =
+ {%
+ \@uyghur@swapcaptionstrue
+ \@uyghur@swapheadingsfalse
+ \@uyghur@swapheadersfalse
+ },
+ swapstrings / headings.code =
+ {%
+ \@uyghur@swapcaptionsfalse
+ \@uyghur@swapheadingstrue
+ \@uyghur@swapheadersfalse
+ },
+ swapstrings / headers.code =
+ {%
+ \@uyghur@swapcaptionsfalse
+ \@uyghur@swapheadingsfalse
+ \@uyghur@swapheaderstrue
+ },
+ swapstrings / hheaders.code =
+ {%
+ \@uyghur@swapcaptionsfalse
+ \@uyghur@swapheadingstrue
+ \@uyghur@swapheaderstrue
+ },
+ swapstrings / none.code =
+ {%
+ \@uyghur@swapcaptionsfalse
+ \@uyghur@swapheadingsfalse
+ \@uyghur@swapheadersfalse
+ },
+ swapstrings.default:n = all,
+ swapstrings/unknown.code = \xpg@warning{Unknown Uyghur swapstrings value `#1'}
+ }
% Register default options
-\xpg@initialize@gloss@options{uyghur}{swapstrings=all,chapterformat=ordinal}
+\InitializeGlossOptions{uyghur}{swapstrings=all,chapterformat=ordinal}
\def\captionsuyghur{%
@@ -28274,120 +28291,104 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% change chapter and part headings
\if@uyghur@swapheadings
% With titlesec
- \ifcsdef{titleformat}{%
- \ifcsdef{H@old@part}{% Hyperref
- \let\xpg@save@part@format\H@old@part%
- \patchcmd{\H@old@part}%
- {\partname\nobreakspace\thepart}%
- {\the@uyghur@part\nobreakspace\partname}%
- {}%
- {\xpg@warning{Failed to patch part for Uyghur}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\the@uyghur@part\nobreakspace\partname}%
- {}%
- {\xpg@warning{Failed to patch part for Uyghur}}%
- }{}%
- }
- \ifcsdef{chapter}{%
- \titleformat\chapter[display]%
- {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
- {\the@uyghur@chapter\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- }{}%
- }{% (not \ifdefined\titleformat)
+ \@ifundefined{titleformat}{%
% With KOMA
- \ifcsdef{sectionformat}{%
- \ifcsdef{partformat}{%
- \let\xpg@save@part@format\partformat%
- \renewcommand{\partformat}{\the@uyghur@part~\partname}%
- }{}%
- \ifcsdef{chapterformat}{%
- \let\xpg@save@chap@format\chapterformat%
- \renewcommand{\chapterformat}{\mbox{\the@uyghur@chapter%
- \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
- }{}%
- }{% (not \ifdefined\sectionformat)
+ \@ifundefined{sectionformat}{%
% With memoir
- \ifcsdef{@memptsize}{%
- \ifcsdef{@makechapterhead}{%
- \let\xpg@save@chap@format\@makechapterhead%
- \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
- {\chapnumfont\the@uyghur@chapter\chapternamenum\printchaptername}%
- {}%
- {\xpg@warning{Failed to patch chapter for Uyghur}}%
- }{}%
- \ifcsdef{H@old@part}{% Hyperref
- \let\xpg@save@part@format\H@old@part%
- \patchcmd{\H@old@part}{\printpartname \partnamenum \printpartnum}%
- {\chapnumfont\the@uyghur@part\partnamenum\printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for Uyghur}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
- {\chapnumfont\the@uyghur@part\partnamenum\printpartname}%
- {}%
- {\xpg@warning{Failed to patch part for Uyghur}}%
- }{}%
- }%
- }{% (not \ifdefined\@memptsize)
+ \@ifundefined{@memptsize}{%
% With standard classes
- \ifcsdef{@makechapterhead}{%
+ \@ifundefined{@makechapterhead}{}{%
\let\xpg@save@chap@format\@makechapterhead%
\patchcmd{\@makechapterhead}%
{\@chapapp\space \thechapter}%
{\the@uyghur@chapter\space \@chapapp}%
{}%
{\xpg@warning{Failed to patch chapter for Uyghur}}%
- }{}%
- \ifcsdef{H@old@part}{% Hyperref
+ }%
+ \@ifundefined{H@old@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for Uyghur}}}%
+ }% (end \ifdefined\@part)
+ }{% Hyperref
\let\xpg@save@part@format\H@old@part%
\patchcmd{\H@old@part}%
{\partname\nobreakspace\thepart}%
{\the@uyghur@part\nobreakspace\partname}%
{}%
{\xpg@warning{Failed to patch part for Uyghur}}%
- }{% not hyperref
- \ifcsdef{@part}{%
- \let\xpg@save@part@format\@part%
- \patchcmd{\@part}%
- {\partname\nobreakspace\thepart}%
- {\the@uyghur@part\nobreakspace\partname}%
- {}%
- {\ifcsdef{part}{\xpg@warning{Failed to patch part for Uyghur}}{}}%
- }{}% (end \ifdefined\@part)
}% (end not hyperref)
- }% (end \ifdefined\@memptsize)
- }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\@memptsize)
+ \@ifundefined{@makechapterhead}{}{%
+ \let\xpg@save@chap@format\@makechapterhead%
+ \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}%
+ {\chapnumfont\the@uyghur@chapter\chapternamenum\printchaptername}%
+ {}%
+ {\xpg@warning{Failed to patch chapter for Uyghur}}%
+ }%
+ \@ifundefined{H@old@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}%
+ {\chapnumfont\the@uyghur@part\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }%
+ }{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}{\printpartname \partnamenum \printpartnum}%
+ {\chapnumfont\the@uyghur@part\partnamenum\printpartname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }%
+ }% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\sectionformat)
+ \@ifundefined{partformat}{}{%
+ \let\xpg@save@part@format\partformat%
+ \renewcommand{\partformat}{\the@uyghur@part~\partname}%
+ }%
+ \@ifundefined{chapterformat}{}{%
+ \let\xpg@save@chap@format\chapterformat%
+ \renewcommand{\chapterformat}{\mbox{\the@uyghur@chapter%
+ \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}%
+ }%
+ }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
+ \@ifundefined{H@old@part}{% not hyperref
+ \@ifundefined{@part}{}{%
+ \let\xpg@save@part@format\@part%
+ \patchcmd{\@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }%
+ }{% Hyperref
+ \let\xpg@save@part@format\H@old@part%
+ \patchcmd{\H@old@part}%
+ {\partname\nobreakspace\thepart}%
+ {\the@uyghur@part\nobreakspace\partname}%
+ {}%
+ {\xpg@warning{Failed to patch part for Uyghur}}%
+ }%
+ \@ifundefined{chapter}{}{%
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
+ {\the@uyghur@chapter\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
+ }%
}% (end \ifdefined\titleformat)
\fi% (end \if@uyghur@swapheadings)
%
% Change running headers
\if@uyghur@swapheaders
- \ifcsdef{chapterformat}{%
- % With KOMA
- \let\xpg@save@chaptermark@format\chaptermarkformat%
- \renewcommand*\chaptermarkformat{%
- \the@uyghur@chapter\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}}
- }{% (not \ifdefined\chapterformat)
- \ifcsdef{@memptsize}{%
- % With memoir
- \let\xpg@save@chaptermark@format\chaptermark%
- \renewcommand*\chaptermark[1]{%
- \markboth{\memUChead{%
- \ifnum \c@secnumdepth >\m@ne
- \ifbool{@mainmatter}{%
- \the@uyghur@chapter\ \@chapapp\ %
- }{}%
- \fi
- ##1}}{}}%
- }{% (not \ifdefined\@memptsize)
+ \@ifundefined{chapterformat}{%
+ \@ifundefined{@memptsize}{%
% With standard classes
- \ifcsdef{chaptermark}{%
+ \@ifundefined{chaptermark}{}{%
\ifpatchable{\chaptermark}%
{\@chapapp\ \thechapter.}%
{\let\xpg@save@chaptermark@format\chaptermark%
@@ -28397,21 +28398,38 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
{}%
{\xpg@warning{Failed to patch chaptermark for Uyghur}}}%
{}%
- }{}% (end \ifdefined\sectionmark)
- \ifcsdef{sectionmark}{%
- \ifpatchable{\sectionmark}%
- {\thesection.}%
- {\let\xpg@save@sectionmark@format\sectionmark%
- \patchcmd{\sectionmark}%
- {\thesection.}%
- {\thesection}%
- {}%
- {\xpg@warning{Failed to patch sectionmark for Uyghur}}}%
- {}%
- }{}% (end \ifdefined\chaptermark)
+ }% (end \ifdefined\sectionmark)
+ \@ifundefined{sectionmark}{}{%
+ \ifpatchable{\sectionmark}%
+ {\thesection.}%
+ {\let\xpg@save@sectionmark@format\sectionmark%
+ \patchcmd{\sectionmark}%
+ {\thesection.}%
+ {\thesection}%
+ {}%
+ {\xpg@warning{Failed to patch sectionmark for Uyghur}}%
+ }%
+ {}%
+ }% (end \ifdefined\chaptermark)
+ }{% (\ifdefined\@memptsize)
+ % With memoir
+ \let\xpg@save@chaptermark@format\chaptermark%
+ \renewcommand*\chaptermark[1]{%
+ \markboth{\memUChead{%
+ \ifnum \c@secnumdepth >\m@ne
+ \ifbool{@mainmatter}{%
+ \the@uyghur@chapter\ \@chapapp\ %
+ }{}%
+ \fi
+ ##1}}{}}%
}% (end \ifdefined\@memptsize)
+ }{% (\ifdefined\chapterformat)
+ % With KOMA
+ \let\xpg@save@chaptermark@format\chaptermarkformat%
+ \renewcommand*\chaptermarkformat{%
+ \the@uyghur@chapter\ \IfChapterUsesPrefixLine{\chapapp\enskip}{}}
}% (end \ifdefined\chapterformat)
- \fi% (end \if@uyghur@swapheaders)
+ \fi% (end \if@uyghur@swapheaders)
}
\def\nouyghur@capsformat{%
@@ -28421,62 +28439,62 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\fnum@figure\xpg@save@fnum@figure%
%
% Reset chapter and part heading
- \ifcsdef{titleformat}{%
+ \@ifundefined{titleformat}{%
+ \@ifundefined{sectionformat}{%
+ % With memoir and standard classes
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{H@old@part}{%
+ \let\@part\xpg@save@part@format%
+ }{%
+ \let\H@old@part\xpg@save@part@format%
+ }%
+ }%
+ \@ifundefined{xpg@save@chap@format}{}{%
+ \let\@makechapterhead\xpg@save@chap@format
+ }%
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@part@format}{}{%
+ \let\partformat\xpg@save@part@format
+ }%
+ \@ifundefined{xpg@save@chap@format}{}{%
+ \let\chapterformat\xpg@save@chap@format
+ }%
+ }% (end \ifdefined\sectionformat)
+ }{% (\ifdefined\titleformat)
% With titlesec
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{H@old@part}{%
- \let\H@old@part\xpg@save@part@format%
- }{%
+ \@ifundefined{xpg@save@part@format}{}{%
+ \@ifundefined{H@old@part}{%
\let\@part\xpg@save@part@format%
+ }{%
+ \let\H@old@part\xpg@save@part@format%
}%
- }{}%
- \ifcsdef{chapter}{%
+ }%
+ \@ifundefined{chapter}{}{%
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
{\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- }{}%
- }{% (not \ifdefined\titleformat)
- \ifcsdef{sectionformat}{%
- % With KOMA
- \ifcsdef{xpg@save@part@format}{%
- \let\partformat\xpg@save@part@format
- }{}%
- \ifcsdef{xpg@save@chap@format}{%
- \let\chapterformat\xpg@save@chap@format
- }{}%
- }{%
- % With memoir and standard classes
- \ifcsdef{xpg@save@part@format}{%
- \ifcsdef{H@old@part}{%
- \let\H@old@part\xpg@save@part@format%
- }{%
- \let\@part\xpg@save@part@format%
- }%
- }{}%
- \ifcsdef{xpg@save@chap@format}{%
- \let\@makechapterhead\xpg@save@chap@format
- }{}%
- }% (end \ifdefined\sectionformat)
+ }%
}% (end \ifdefined\titleformat)
%
% Reset headers
- \ifcsdef{chaptermarkformat}{%
- % With KOMA
- \ifcsdef{xpg@save@chaptermark@format}{%
- \let\chaptermarkformat\xpg@save@chaptermark@format%
- }{}%
- }{%
- \ifcsdef{chaptermark}{%
+ \@ifundefined{chaptermarkformat}{%
+ \@ifundefined{chaptermark}{}{%
% With memoir and standard classes
- \ifcsdef{xpg@save@chaptermark@format}{%
+ \@ifundefined{xpg@save@chaptermark@format}{}{%
\let\chaptermark\xpg@save@chaptermark@format%
- }{}%
- }{}% (end \ifdefined\chaptermark)
- \ifcsdef{sectionmark}{%
- \ifcsdef{xpg@save@sectionmark@format}{%
+ }%
+ }% (end \ifdefined\chaptermark)
+ \@ifundefined{sectionmark}{}{%
+ \@ifundefined{xpg@save@sectionmark@format}{}{%
\let\sectionmark\xpg@save@sectionmark@format%
- }{}%
- }{}% (end \ifdefined\sectionmark)
+ }%
+ }% (end \ifdefined\sectionmark)
+ }{%
+ % With KOMA
+ \@ifundefined{xpg@save@chaptermark@format}{}{%
+ \let\chaptermarkformat\xpg@save@chaptermark@format%
+ }%
}% (end \ifdefined\chapterformat)
}
@@ -28512,22 +28530,22 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\let\the@uyghur@chapter\thechapter
\def\uyghur@chapterformat{%
- \ifcsdef{part}{%
+ \@ifundefined{part}{}{%
\if@uyghur@ordchapter%
\renewcommand{\the@uyghur@part}{\uyghurord{part}}%
\fi%
\if@uyghur@romchapter%
\renewcommand{\the@uyghur@part}{\Roman{part}}%
\fi%
- }{}%
- \ifcsdef{chapter}{%
+ }%
+ \@ifundefined{chapter}{}{%
\if@uyghur@ordchapter%
\renewcommand{\the@uyghur@chapter}{\uyghurord{chapter}}%
\fi%
\if@uyghur@romchapter%
\renewcommand{\the@uyghur@chapter}{\Roman{chapter}}%
\fi%
- }{}%
+ }%
}
\def\uyghur@numbers{%
@@ -28588,7 +28606,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-vietnamese.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-vietnamese.ldf}[polyglossia: module for Vietnamese]
%% Strings contributed by Daniel Owens < dhowens . pmbx . net >
@@ -28647,7 +28665,7 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-welsh.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-welsh.ldf}[polyglossia: module for Welsh]
@@ -28664,21 +28682,26 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
% BCP-47 compliant aliases
\setlanguagealias*{welsh}{cy}
-\providebool{welsh@formaldate}
+\@ifundefined{ifwelsh@formaldate}%
+ {\newif\ifwelsh@formaldate}{}
-\define@choicekey*+{welsh}{date}[\xpg@val\xpg@nr]{long,short}[short]{%
- \ifcase\xpg@nr\relax
- % long:
- \welsh@formaldatetrue
- \or
- % accented:
- \welsh@formaldatefalse
- \fi
- \xpg@info{Option: Welsh, date=\xpg@val}%
-}{\xpg@warning{Unknown date value `#1'}}
+\DeclareKeys[polyglossia/gloss/welsh]
+ {
+ date.choice:,
+ date / long.code =
+ {%
+ \welsh@formaldatetrue
+ },
+ date / short.code =
+ {%
+ \welsh@formaldatefalse
+ },
+ date.default:n = short,
+ date/unknown.code = \xpg@warning{Unknown date value `#1'},
+ }
% Register default options
-\xpg@initialize@gloss@options{welsh}{date=short}
+\InitializeGlossOptions{welsh}{date=short}
\def\captionswelsh{%
\def\refname{Cyfeiriadau}%
@@ -28747,13 +28770,13 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-zh-CN.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-zh-CN.ldf}[polyglossia: module for zh-CN (Chinese)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{chinese}
+\InheritGlossFile{chinese}
% \end{macrocode}
% \iffalse
@@ -28764,268 +28787,26 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
%
% \subsection{gloss-zh-TW.ldf}
% \begin{macrocode}
-% Language definition file (part of polyglossia v2.1 -- 2024/03/07)
+% Language definition file (part of polyglossia v2.2 -- 2024/07/15)
%
\ProvidesFile{gloss-zh-TW.ldf}[polyglossia: module for zh-TW (Chinese)]
% We provide this as a bcp47-compliant alias
-\xpg@load@master@language{chinese}
+\InheritGlossFile{chinese}
% \end{macrocode}
% \iffalse
%</gloss-zh-TW.ldf>
-%<*arabicdigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{arabicdigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "ArabicDigits"
-
-pass(Unicode)
-U+0030 <> U+0660 ;
-U+0031 <> U+0661 ;
-U+0032 <> U+0662 ;
-U+0033 <> U+0663 ;
-U+0034 <> U+0664 ;
-U+0035 <> U+0665 ;
-U+0036 <> U+0666 ;
-U+0037 <> U+0667 ;
-U+0038 <> U+0668 ;
-U+0039 <> U+0669 ;
-
-% \end{macrocode}
-% \iffalse
-%</arabicdigits.map>
-%<*bengalidigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{bengalidigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "BengaliDigits"
-
-pass(Unicode)
-U+0030 <> U+09E6 ;
-U+0031 <> U+09E7 ;
-U+0032 <> U+09E8 ;
-U+0033 <> U+09E9 ;
-U+0034 <> U+09EA ;
-U+0035 <> U+09EB ;
-U+0036 <> U+09EC ;
-U+0037 <> U+09ED ;
-U+0038 <> U+09EE ;
-U+0039 <> U+09EF ;
-
-% \end{macrocode}
-% \iffalse
-%</bengalidigits.map>
-%<*devanagaridigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{devanagaridigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "DevanagariDigits"
-
-pass(Unicode)
-U+0030 <> U+0966 ;
-U+0031 <> U+0967 ;
-U+0032 <> U+0968 ;
-U+0033 <> U+0969 ;
-U+0034 <> U+096A ;
-U+0035 <> U+096B ;
-U+0036 <> U+096C ;
-U+0037 <> U+096D ;
-U+0038 <> U+096E ;
-U+0039 <> U+096F ;
-
-% \end{macrocode}
-% \iffalse
-%</devanagaridigits.map>
-%<*farsidigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{farsidigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "FarsiDigits"
-
-pass(Unicode)
-U+0030 <> U+06F0 ;
-U+0031 <> U+06F1 ;
-U+0032 <> U+06F2 ;
-U+0033 <> U+06F3 ;
-U+0034 <> U+06F4 ;
-U+0035 <> U+06F5 ;
-U+0036 <> U+06F6 ;
-U+0037 <> U+06F7 ;
-U+0038 <> U+06F8 ;
-U+0039 <> U+06F9 ;
-
-% \end{macrocode}
-% \iffalse
-%</farsidigits.map>
-%<*gurmukhidigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{gurmukhidigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "GurmukhiDigits"
-
-pass(Unicode)
-U+0030 <> U+0A66 ;
-U+0031 <> U+0A67 ;
-U+0032 <> U+0A68 ;
-U+0033 <> U+0A69 ;
-U+0034 <> U+0A6A ;
-U+0035 <> U+0A6B ;
-U+0036 <> U+0A6C ;
-U+0037 <> U+0A6D ;
-U+0038 <> U+0A6E ;
-U+0039 <> U+0A6F ;
-
-% \end{macrocode}
-% \iffalse
-%</gurmukhidigits.map>
-%<*odiadigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{odiadigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "OdiaDigits"
-
-pass(Unicode)
-U+0030 <> U+0B66 ;
-U+0031 <> U+0B67 ;
-U+0032 <> U+0B68 ;
-U+0033 <> U+0B69 ;
-U+0034 <> U+0B6A ;
-U+0035 <> U+0B6B ;
-U+0036 <> U+0B6C ;
-U+0037 <> U+0B6D ;
-U+0038 <> U+0B6E ;
-U+0039 <> U+0B6F ;
-
-% \end{macrocode}
-% \iffalse
-%</odiadigits.map>
-%<*thaidigits.map>
-% \fi
-% \clearpage
-%
-% \subsection{thaidigits.map}
-% \begin{macrocode}
-; FC ...
-LHSName "Digits"
-RHSName "ThaiDigits"
-
-pass(Unicode)
-U+0030 <> U+0E50 ;
-U+0031 <> U+0E51 ;
-U+0032 <> U+0E52 ;
-U+0033 <> U+0E53 ;
-U+0034 <> U+0E54 ;
-U+0035 <> U+0E55 ;
-U+0036 <> U+0E56 ;
-U+0037 <> U+0E57 ;
-U+0038 <> U+0E58 ;
-U+0039 <> U+0E59 ;
-
-% \end{macrocode}
-% \iffalse
-%</thaidigits.map>
-%<*polyglossia-french.lua>
-% \fi
-% \clearpage
-%
-% \subsection{polyglossia-french.lua}
-% \begin{macrocode}
---
--- polyglossia-punct.lua
--- part of polyglossia v2.1 -- 2024/03/07
---
-
-require('polyglossia-punct')
-
-local function set_left_space(lang, char, kern, rubber)
- polyglossia.add_left_spaced_character(lang, char, kern, "space", rubber)
-end
-
-local function set_right_space(lang, char, kern, rubber)
- polyglossia.add_right_spaced_character(lang, char, kern, "space", rubber)
-end
-
-local function activate_french_punct(thincolonspace, autospaceguillemets)
- -- We need different language tags here to make switching of options possible
- -- within a paragraph.
- local lang = "french"
- if thincolonspace then
- lang = lang.."-thincolon"
- end
- if autospaceguillemets then
- lang = lang.."-autospace"
- end
-
- polyglossia.activate_punct(lang)
- polyglossia.clear_spaced_characters(lang)
-
- if thincolonspace then
- set_left_space(lang, ':', 0.5)
- else
- set_left_space(lang, ':', 1, true) -- stretchable and shrinkable space
- end
-
- set_left_space(lang, '!', 0.5)
- set_left_space(lang, '?', 0.5)
- set_left_space(lang, ';', 0.5)
- set_left_space(lang, '‼', 0.5)
- set_left_space(lang, '⁇', 0.5)
- set_left_space(lang, '⁈', 0.5)
- set_left_space(lang, '⁉', 0.5)
- set_left_space(lang, '‽', 0.5) -- U+203D (interrobang)
-
- if autospaceguillemets then
- set_left_space(lang, '»', 0.5)
- set_left_space(lang, '›', 0.5)
- set_right_space(lang, '«', 0.5)
- set_right_space(lang, '‹', 0.5)
- end
-end
-
-local function deactivate_french_punct()
- polyglossia.deactivate_punct()
-end
-
-polyglossia.activate_french_punct = activate_french_punct
-polyglossia.deactivate_french_punct = deactivate_french_punct
-% \end{macrocode}
-% \iffalse
-%</polyglossia-french.lua>
-%<*polyglossia-korean.lua>
+%<*polyglossia-cjk-spacing.lua>
% \fi
% \clearpage
%
-% \subsection{polyglossia-korean.lua}
+% \subsection{polyglossia-cjk-spacing.lua}
% \begin{macrocode}
--
--- polyglossia-korean.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- polyglossia-cjk-spacing.lua
+-- part of polyglossia v2.2 -- 2024/07/15
--
local glyph_id = node.id"glyph"
@@ -29033,13 +28814,17 @@ local hbox_id = node.id"hlist"
local vbox_id = node.id"vlist"
local glue_id = node.id"glue"
local penalty_id = node.id"penalty"
-local disc_id = node.id"disc"
+local whatsit_id = node.id"whatsit"
+local math_id = node.id"math"
--
--- attr_korean: variant = plain (0), classic (1), modern (2)
+-- attr_cjk: variant = plain: 0, JP/classic: 1, KR/modern: 2, SC: 3, TC: 4
+--
+local attr_cjk = luatexbase.attributes["xpg@attr@cjkspacing"]
+--
+-- attr_josa: ONLY For Korean. DO NOT declare \newattribute for other langs
--
-local attr_korean = luatexbase.attributes["xpg@attr@korean"]
-local attr_josa = luatexbase.attributes["xpg@attr@autojosa"]
+local attr_josa = luatexbase.attributes["xpg@attr@autojosa"]
--
-- characters after which linebreak is not allowed
@@ -29088,9 +28873,9 @@ local nobr_after = {
-- characters before which linebreak is not allowed
-- (currently, not much differences among the followings)
-- 1: normal chars
--- 2: hangul jamo vowels and trailing consonants
+-- 2: hangul jamo vowels and trailing consonants plus combinings
-- 3: kana small letters
--- 0: dashes (supress visible spacing)
+-- 0: dashes (suppress visible spacing after this char)
--
local nobr_before = setmetatable({
[0x21] = 1, -- ! EXCLAMATION MARK
@@ -29101,7 +28886,7 @@ local nobr_before = setmetatable({
[0x2D] = 0, -- - HYPHEN-MINUS
[0x2E] = 1, -- . FULL STOP
[0x2F] = 0, -- / SOLIDUS
- [0x3A] = 0, -- : COLON
+ [0x3A] = 1, -- : COLON
[0x3B] = 1, -- ; SEMICOLON
[0x3E] = 1, -- > GREATER-THAN SIGN
[0x3F] = 1, -- ? QUESTION MARK
@@ -29113,11 +28898,11 @@ local nobr_before = setmetatable({
[0xBB] = 1, -- » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
[0x2013] = 0, -- – EN DASH
[0x2014] = 0, -- — EM DASH
- [0x2015] = 1, -- ― HORIZONTAL BAR
+ [0x2015] = 0, -- ― HORIZONTAL BAR
[0x2019] = 1, -- ’ RIGHT SINGLE QUOTATION MARK
[0x201D] = 1, -- ” RIGHT DOUBLE QUOTATION MARK
- [0x2025] = 1, -- ‥ TWO DOT LEADER
- [0x2026] = 1, -- … HORIZONTAL ELLIPSIS
+ [0x2025] = 0, -- ‥ TWO DOT LEADER
+ [0x2026] = 0, -- … HORIZONTAL ELLIPSIS
[0x232A] = 1, -- 〉 RIGHT-POINTING ANGLE BRACKET
[0x3001] = 1, -- 、 IDEOGRAPHIC COMMA
[0x3002] = 1, -- 。 IDEOGRAPHIC FULL STOP
@@ -29149,10 +28934,10 @@ local nobr_before = setmetatable({
[0x308E] = 3, -- ゎ HIRAGANA LETTER SMALL WA
[0x3095] = 3, -- ゕ HIRAGANA LETTER SMALL KA
[0x3096] = 3, -- ゖ HIRAGANA LETTER SMALL KE
- [0x3099] = 1, -- COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
- [0x309A] = 1, -- COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
- [0x309B] = 1, -- ゛ KATAKANA-HIRAGANA VOICED SOUND MARK
- [0x309C] = 1, -- ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ [0x3099] = 2, -- COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
+ [0x309A] = 2, -- COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
+ [0x309B] = 2, -- ゛ KATAKANA-HIRAGANA VOICED SOUND MARK
+ [0x309C] = 2, -- ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
[0x309D] = 1, -- ゝ HIRAGANA ITERATION MARK
[0x309E] = 1, -- ゞ HIRAGANA VOICED ITERATION MARK
[0x30A0] = 1, -- ゠ KATAKANA-HIRAGANA DOUBLE HYPHEN
@@ -29172,9 +28957,9 @@ local nobr_before = setmetatable({
[0x30FC] = 1, -- ー KATAKANA-HIRAGANA PROLONGED SOUND MARK
[0x30FD] = 1, -- ヽ KATAKANA ITERATION MARK
[0x30FE] = 1, -- ヾ KATAKANA VOICED ITERATION MARK
- [0xFE30] = 1, -- ︰ PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
- [0xFE31] = 1, -- ︱ PRESENTATION FORM FOR VERTICAL EM DASH
- [0xFE32] = 1, -- ︲ PRESENTATION FORM FOR VERTICAL EN DASH
+ [0xFE30] = 0, -- ︰ PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
+ [0xFE31] = 0, -- ︱ PRESENTATION FORM FOR VERTICAL EM DASH
+ [0xFE32] = 0, -- ︲ PRESENTATION FORM FOR VERTICAL EN DASH
[0xFE36] = 1, -- ︶ PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
[0xFE38] = 1, -- ︸ PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
[0xFE3A] = 1, -- ︺ PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
@@ -29201,18 +28986,18 @@ local nobr_before = setmetatable({
[0xFF63] = 1, -- 」 HALFWIDTH RIGHT CORNER BRACKET
[0xFF64] = 1, -- 、 HALFWIDTH IDEOGRAPHIC COMMA
[0xFF65] = 1, -- ・ HALFWIDTH KATAKANA MIDDLE DOT
- [0xFF9E] = 1, -- ゙ HALFWIDTH KATAKANA VOICED SOUND MARK
- [0xFF9F] = 1, -- ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
+ [0xFF9E] = 2, -- ゙ HALFWIDTH KATAKANA VOICED SOUND MARK
+ [0xFF9F] = 2, -- ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
}, { __index = function(_,c)
if c >= 0x1160 and c <= 0x11FF then return 2 end
if c >= 0xD7B0 and c <= 0xD7FF then return 2 end
- if c >= 0x302A and c <= 0x302F then return 1 end
+ if c >= 0x302A and c <= 0x302F then return 2 end -- tone marks
if c >= 0x31F0 and c <= 0x31FF then return 3 end
if c >= 0xFF67 and c <= 0xFF70 then return 3 end
- if c >= 0xFE00 and c <= 0xFE0F then return 1 end
+ if c >= 0xFE00 and c <= 0xFE0F then return 2 end -- variation selectors
if c >= 0xFE10 and c <= 0xFE19 and not (c == 0xFE17) then return 1 end
if c >= 0xFE50 and c <= 0xFE58 then return 1 end
- if c >= 0xE0100 and c <= 0xE01EF then return 1 end
+ if c >= 0xE0100 and c <= 0xE01EF then return 2 end -- variation selecters
end
})
@@ -29230,6 +29015,7 @@ local function is_cjk (c)
or c >= 0xFF00 and c <= 0xFFEF
or c >= 0x1F100 and c <= 0x1F2FF
or c >= 0x20000 and c <= 0x2FA1F
+ or c >= 0x30000 and c <= 0x323AF
or nobr_after[c] and c > 0x2014
or nobr_before[c] and c > 0x2014
end
@@ -29269,8 +29055,28 @@ local charclass = setmetatable({
}, { __index = function() return 0 end })
--
+-- get character class
+-- var : variant = plain, JP/classic, KR/modern, SC, TC
+-- c : codepoint
+--
+local function get_charclass (var, c)
+ if var < 3 then
+ return charclass[c]
+ elseif var == 3 then
+ -- SC : these are left aligned
+ return (c == 0xFF01 or c == 0xFF1F) and 4 -- FULLWIDTH EXCLAMATION/QUESTION MARK
+ or (c == 0xFF1A or c == 0xFF1B) and 2 -- FULLWIDTH COLON/SEMICOLON
+ or charclass[c]
+ end
+ -- TC : these are center aligned
+ return (c == 0x3001 or c == 0xFF0C) and 3 -- IDEOGRAPHIC/FULLWIDTH COMMA
+ or (c == 0x3002 or c == 0xFF0E) and 3 -- IDEOGRAPHIC/FULLWIDTH FULL STOP -- 5 ?
+ or charclass[c]
+end
+
+--
-- table for spacing between char classes
--- 1 stands for 0.5*fontsize when variant=classic
+-- 1 stands for 0.5*fontsize when variant = JP/classic or SC or TC
--
local intercharclass = { [0] =
{ [0] = nil, {1,1}, nil, {.5,.5} },
@@ -29302,7 +29108,7 @@ end
--
-- return 0.5*fontsize of given fontid
--- space: true if variant=modern; then 0.5*interword_space
+-- space: true if variant=KR/modern; then 0.5*interword_space
--
local function get_font_size (fid, space)
local size = font.getparameters(fid)
@@ -29316,7 +29122,7 @@ end
--
-- charclass 1 thru 4 will be packed in \hbox to 0.5em{\hss? curr \hss?}
--- when variant=classic/modern
+-- when variant ~= plain
--
local function glyph_to_box (head, curr, class)
local g, h = curr
@@ -29345,7 +29151,7 @@ end
--
-- insert spacing defined as charclass[a][b] between a and b
-- f: fontid
--- var: variant = plain, classic, modern
+-- var: variant = plain, JP/classic, KR/modern, SC, TC
-- cc: charclass of current char
-- nc: charclass of next char
-- nobr: linebreak is not allowed
@@ -29364,12 +29170,16 @@ end
--
-- insert inter-character spacing in other normal cases
--- f: fontid
--- var: variant = plain, classic, modern
--- x: true between cjk and non-cjk (a little more spacing)
+-- f: fontid
+-- var: variant = plain, JP/classic, KR/modern, SC, TC
+-- nobr: no linebreak
+-- x: true between cjk and non-cjk (a little more spacing)
--
-local function insert_penalty_glue (head, curr, f, var, x)
- if var ~= 1 then
+local function insert_penalty_glue (head, curr, f, var, nobr, x)
+ if nobr then
+ local penalty = get_new_penalty(10000)
+ head, curr = node.insert_after(head, curr, penalty)
+ elseif var == 0 or var == 2 then
local penalty = get_new_penalty(50)
head, curr = node.insert_after(head, curr, penalty)
end
@@ -29385,53 +29195,64 @@ end
--
-- main process for linebreak and inter-character spacing
--- lb: true if pre_linebreak_filter
--
-local function korean_break (head, lb)
+local function cjk_break (head)
local curr = head
while curr do
- if curr.id == glyph_id then
- local var = node.has_attribute(curr, attr_korean)
+ if attr_cjk and (curr.id == glyph_id or curr.id == math_id and curr.subtype == 1) then
+ local var = node.has_attribute(curr, attr_cjk)
if var then
- local c, f = curr.char or 0, curr.font or 0
- local cc, cjkc = charclass[c], is_cjk(c)
+ local c, f = curr.char or 0, curr.font
+ local cc, cjkc = get_charclass(var, c), is_cjk(c)
-- compress cjk punctuations when charclass is 1 thru 4
if var > 0 and cc > 0 and cc < 5 then
head, curr = glyph_to_box(head, curr, cc)
end
- local next = curr.next
- if next and next.id == glyph_id then
+ local next = node.getnext(curr)
+ while next and next.id == whatsit_id do -- skip whatsit nodes
+ curr, next = next, node.getnext(next)
+ end
+
+ if next and (next.id == glyph_id or next.id == math_id and next.subtype == 0) then
local n = next.char or 0
- local nc = charclass[n]
+ f = f or next.font or 0 -- in case of curr == math_off
+
+ -- skip combining. or dash+dash case to suppress stretching
+ if nobr_before[n] == 2 or (nobr_before[c] == 0 and nobr_before[n] == 0) then
+ goto skip_combining
+ end
+
+ local nc = get_charclass(var, n)
local nobr = nobr_before[n] or nobr_after[c]
-- insert spacing as of intercharclass
if var > 0 and intercharclass[cc][nc] then
head, curr = insert_cjk_penalty_glue(head, curr, f, var, cc, nc, nobr)
- -- or insert spacing when linebreak is allowed
- elseif not nobr then
+ else
local cjkn = is_cjk(n)
-- if curr or next is cjk char
if cjkc or cjkn then
- -- if between cjk and non-cjk
- if var > 0 and not (cjkc and cjkn) and nobr_before[c] ~= 0 then
- head, curr = insert_penalty_glue(head, curr, f, var, true)
+ -- plain variant / cjk+cjk / nobr cjk+noncjk / after dash
+ -- : insert a 0pt glue
+ if var == 0 or (cjkc and cjkn) or nobr or nobr_before[c] == 0 then
+ head, curr = insert_penalty_glue(head, curr, f, var, nobr)
- -- or under pre_linebreak_filter
- elseif lb then
- head, curr = insert_penalty_glue(head, curr, f, var)
+ -- other cases: insert a small glue
+ else
+ head, curr = insert_penalty_glue(head, curr, f, var, nobr, true)
end
end
end
end
end
end
- curr = curr.next
+ ::skip_combining::
+ curr = node.getnext(curr)
end
return head
end
@@ -29445,7 +29266,7 @@ end
local function reorder_tm (head)
local curr, tone = node.slide(head)
while curr do
- if curr.id == glyph_id and node.has_attribute(curr, attr_korean) then
+ if curr.id == glyph_id and node.has_attribute(curr, attr_cjk) then
local f = font.getfont(curr.font) or font.fonts[curr.font]
if f and f.hb then -- harfbuzz do the right thing
tone = nil
@@ -29461,7 +29282,7 @@ local function reorder_tm (head)
end
end
end
- curr = curr.prev
+ curr = node.getprev(curr)
end
return head
end
@@ -29548,7 +29369,7 @@ local function get_prev_char (p)
local pc = get_prev_char(node.slide(p.head))
if pc then return pc end
end
- p = p.prev
+ p = node.getprev(p)
end
end
@@ -29563,10 +29384,10 @@ local function auto_josa (head)
if josa then
local cc = curr.char or 0
if josa == 0 then
- josa = josa_code[get_prev_char(curr.prev) or 0x30]
+ josa = josa_code[get_prev_char(node.getprev(curr)) or 0x30]
end
if cc == 0xC774 then
- local n = curr.next
+ local n = node.getnext(curr)
if n and n.char and n.char >= 0xAC00 and n.char <= 0xD7A3 then
else
cc = 0xAC00
@@ -29585,7 +29406,7 @@ local function auto_josa (head)
node.unset_attribute(curr, attr_josa)
end
end
- curr = curr.next
+ curr = node.getnext(curr)
end
for _,v in ipairs(tofree) do node.free(v) end
return head
@@ -29596,45 +29417,86 @@ end
-- As char value of glyphs can be changed by opentype GSUB process,
-- we have to occupy the first position among callback functions.
--
-local prepend_to_callback
-if luatexbase.base_add_to_callback then
- prepend_to_callback = function(name, func, desc)
- luatexbase.add_to_callback(name, func, desc, 1)
+luatexbase.add_to_callback( "pre_shaping_filter",
+function(head)
+ if attr_josa then head = auto_josa(head) end
+ head = cjk_break(head)
+ if attr_josa then head = reorder_tm(head) end
+ return head
+end,
+"polyglossia.lang_cjk_spacing")
+
+-- vim:ft=lua:tw=0:sw=4:ts=4:expandtab
+% \end{macrocode}
+% \iffalse
+%</polyglossia-cjk-spacing.lua>
+%<*polyglossia-french.lua>
+% \fi
+% \clearpage
+%
+% \subsection{polyglossia-french.lua}
+% \begin{macrocode}
+--
+-- polyglossia-punct.lua
+-- part of polyglossia v2.2 -- 2024/07/15
+--
+
+require('polyglossia-punct')
+
+local function set_left_space(lang, char, kern, rubber)
+ polyglossia.add_left_spaced_character(lang, char, kern, "space", rubber)
+end
+
+local function set_right_space(lang, char, kern, rubber)
+ polyglossia.add_right_spaced_character(lang, char, kern, "space", rubber)
+end
+
+local function activate_french_punct(thincolonspace, autospaceguillemets)
+ -- We need different language tags here to make switching of options possible
+ -- within a paragraph.
+ local lang = "french"
+ if thincolonspace then
+ lang = lang.."-thincolon"
end
-else
- prepend_to_callback = function(name, func, desc)
- local t = { {func, desc} }
- for _,v in ipairs(luatexbase.callback_descriptions(name)) do
- table.insert(t, {luatexbase.remove_from_callback(name, v)})
- end
- for _,v in ipairs(t) do
- luatexbase.add_to_callback(name, v[1], v[2])
- end
+ if autospaceguillemets then
+ lang = lang.."-autospace"
+ end
+
+ polyglossia.activate_punct(lang)
+ polyglossia.clear_spaced_characters(lang)
+
+ if thincolonspace then
+ set_left_space(lang, ':', 0.5)
+ else
+ set_left_space(lang, ':', 1, true) -- stretchable and shrinkable space
+ end
+
+ set_left_space(lang, '!', 0.5)
+ set_left_space(lang, '?', 0.5)
+ set_left_space(lang, ';', 0.5)
+ set_left_space(lang, '‼', 0.5)
+ set_left_space(lang, '⁇', 0.5)
+ set_left_space(lang, '⁈', 0.5)
+ set_left_space(lang, '⁉', 0.5)
+ set_left_space(lang, '‽', 0.5) -- U+203D (interrobang)
+
+ if autospaceguillemets then
+ set_left_space(lang, '»', 0.5)
+ set_left_space(lang, '›', 0.5)
+ set_right_space(lang, '«', 0.5)
+ set_right_space(lang, '‹', 0.5)
end
end
-prepend_to_callback ("pre_linebreak_filter",
- function(head)
- head = auto_josa(head)
- head = korean_break(head, true)
- head = reorder_tm(head)
- return head
- end,
- "polyglossia.lang_korean")
-
-prepend_to_callback ("hpack_filter",
- function(head)
- head = auto_josa(head)
- head = korean_break(head)
- head = reorder_tm(head)
- return head
- end,
- "polyglossia.lang_korean")
+local function deactivate_french_punct()
+ polyglossia.deactivate_punct()
+end
--- vim:ft=lua:tw=0:sw=4:ts=4:expandtab
+polyglossia.activate_french_punct = activate_french_punct
+polyglossia.deactivate_french_punct = deactivate_french_punct
% \end{macrocode}
% \iffalse
-%</polyglossia-korean.lua>
+%</polyglossia-french.lua>
%<*polyglossia-latin.lua>
% \fi
% \clearpage
@@ -29643,7 +29505,7 @@ prepend_to_callback ("hpack_filter",
% \begin{macrocode}
--
-- polyglossia-latin.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia-punct')
@@ -29698,14 +29560,13 @@ polyglossia.deactivate_latin_punct = deactivate_latin_punct
% \begin{macrocode}
--
-- polyglossia-punct.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia') -- just in case...
local add_to_callback = luatexbase.add_to_callback
-local remove_from_callback = luatexbase.remove_from_callback
-local priority_in_callback = luatexbase.priority_in_callback
+local declare_callback_rule = luatexbase.declare_callback_rule
local new_attribute = luatexbase.new_attribute
local node = node
@@ -30029,13 +29890,16 @@ local function activate(lang)
-- important to be able to intermix languages with different spacings
-- in one paragraph.
tex.setattribute(punct_attr, id)
- for _, callback_name in ipairs{ "pre_linebreak_filter", "hpack_filter" } do
- if not priority_in_callback(callback_name, "polyglossia-punct.process") then
- add_to_callback(callback_name, process, "polyglossia-punct.process", 1)
- end
- end
end
+add_to_callback("pre_linebreak_filter",process,"polyglossia-punct.process")
+add_to_callback("hpack_filter",process,"polyglossia-punct.process")
+declare_callback_rule("pre_linebreak_filter",
+ "polyglossia-punct.process", "before", "luaotfload.node_processor")
+declare_callback_rule("hpack_filter",
+ "polyglossia-punct.process", "before", "luaotfload.node_processor")
+
+
local function deactivate()
tex.setattribute(punct_attr, -0x7FFFFFFF) -- this value means "unset"
-- Though it would make compilation slightly faster, it is not possible to
@@ -30066,7 +29930,7 @@ polyglossia.clear_spaced_characters = clear_spaced_characters
% \begin{macrocode}
--
-- polyglossia-sanskrit.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia-punct')
@@ -30116,31 +29980,29 @@ polyglossia.deactivate_sanskrit_punct = deactivate_sanskrit_punct
% \begin{macrocode}
--
-- polyglossia-tibt.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
require('polyglossia') -- just in case...
local add_to_callback = luatexbase.add_to_callback
local remove_from_callback = luatexbase.remove_from_callback
+local declare_callback_rule = luatexbase.declare_callback_rule
local priority_in_callback = luatexbase.priority_in_callback
local next, type = next, type
-
-local nodes, fonts, node = nodes, fonts, node
-
-local nodecodes = nodes.nodecodes --- <= preloaded node.types()
+local node = node
local insert_node_before = node.insert_before
local insert_node_after = node.insert_after
-local remove_node = nodes.remove
+local remove_node = node.remove
local copy_node = node.copy
local has_attribute = node.has_attribute
local end_of_math = node.end_of_math
if not end_of_math then -- luatex < .76
local traverse_nodes = node.traverse_id
- local math_code = nodecodes.math
+ local math_code = node.id('math_char')
local end_of_math = function (n)
for n in traverse_nodes(math_code, n.next) do
return n
@@ -30148,10 +30010,10 @@ if not end_of_math then -- luatex < .76
end
end
--- node types as of April 2013
-local glyph_code = nodecodes.glyph
-local penalty_code = nodecodes.penalty
-local kern_code = nodecodes.kern
+-- node types as of April 2024
+local glyph_code = node.id('glyph')
+local penalty_code = node.id('penalty')
+local kern_code = node.id('kern')
-- we make a new node, so that we can copy it later on
local penalty_node = node.new(penalty_code)
@@ -30182,7 +30044,6 @@ local function process(head)
end
end
elseif id == math_code then
- -- warning: this is a feature of luatex > 0.76
start = end_of_math(start) -- weird, can return nil .. no math end?
end
if start then
@@ -30195,15 +30056,13 @@ end
local callback_name = "pre_linebreak_filter"
local function activate()
- if not priority_in_callback (callback_name, "polyglossia-tibt.process") then
- add_to_callback(callback_name, process, "polyglossia-tibt.process", 1)
- end
+ add_to_callback(callback_name, process, "polyglossia-tibt.process")
+ declare_callback_rule(callback_name,
+ "polyglossia-tibt.process", "before", "luaotfload.node_processor")
end
local function desactivate()
- if priority_in_callback (callback_name, "polyglossia-tibt.process") then
- remove_from_callback(callback_name, "polyglossia-tibt.process")
- end
+ remove_from_callback(callback_name, "polyglossia-tibt.process")
end
polyglossia.activate_tibt_eol = activate
@@ -30219,7 +30078,7 @@ polyglossia.desactivate_tibt_eol = desactivate
% \begin{macrocode}
--
-- polyglossia.lua
--- part of polyglossia v2.1 -- 2024/03/07
+-- part of polyglossia v2.2 -- 2024/07/15
--
local module_name = "polyglossia"
@@ -30295,7 +30154,7 @@ local function newloader(langentry)
end
-- language info will be written into the .log file
- local s = { "Language data for " .. langentry }
+ local s = { }
for k, v in pairs(langdata) do
if type(v) == 'table' then -- for 'synonyms'
s[#s+1] = k .. "\t" .. table.concat(v,',')
@@ -30303,7 +30162,10 @@ local function newloader(langentry)
s[#s+1] = k .. "\t" .. tostring(v)
end
end
- log_info(table.concat(s,"\n"))
+ local a = {}
+ for _,n in pairs(s) do table.insert(a, n) end
+ table.sort(a)
+ log_info("Language data for " .. langentry .. "\n" .. table.concat(a,"\n"))
--
-- LaTeX's \newlanguage increases language register (count19),
@@ -30313,7 +30175,7 @@ local function newloader(langentry)
-- this possible situation, our newloader() function will
-- unfortunately overwrite the language \lang@xyz.
--
- -- Threfore here we will compare LaTeX's \newlanguage number with
+ -- Therefore here we will compare LaTeX's \newlanguage number with
-- LuaTeX's lang.new() id and select the bigger one for our new
-- language object. Also we will update LaTeX's language register
-- by this new id, so that another possible \newlanguage should not
@@ -30328,7 +30190,7 @@ local function newloader(langentry)
local newlangid = math.max(langcnt, langid)
-- set language register for possible \newlanguage
tex.setcount('global', lang_register, newlangid)
- -- get new lang object if needeed
+ -- get new lang object if needed
if langid ~= newlangid then
langobject = lang.new(newlangid)
end
@@ -30394,7 +30256,12 @@ polyglossia.newloader_loaded_languages = newloader_loaded_languages
\setmainfont{Linux Libertine O}
\defaultfontfeatures{Scale=MatchLowercase}
\setmonofont{Inconsolata}
-\newfontfamily\arabicfont[Script=Arabic]{Amiri}
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}[%
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ Extension = .ttf,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic]
\newfontfamily\syriacfont[Script=Syriac]{Serto Jerusalem}
\newfontfamily\hebrewfont[Script=Hebrew]{Ezra SIL}
\newfontfamily\sanskritfont[Script=Devanagari]{Sanskrit 2003}
@@ -30530,7 +30397,12 @@ Quamquam sermone nativo fungi desinit, cumque nostris diebus perpauci Latine loq
\usepackage{xltxtra,url,amsmath}
\setmainfont{Linux Libertine O}
\defaultfontfeatures{Scale=MatchLowercase}
-\newfontfamily\arabicfont[Script=Arabic]{Amiri}
+\newfontfamily\arabicfont[Script=Arabic]{Amiri}[%
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ Extension = .ttf,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic]
\newfontfamily\arabicfonttt[Script=Arabic,Scale=.75]{DejaVu Sans Mono}
\newfontfamily\farsifont[Script=Arabic,Scale=1.1,WordSpace=2]{IranNastaliq}
\let\XeTeX\undefined
@@ -30700,7 +30572,7 @@ This is today: \today
% \typeout{* To finish the installation you have to move the following}
% \typeout{* file into a directory searched by TeX:}
% \typeout{*}
-% \typeout{* \space\space all *.sty, *.lua, *.def, *.lde and *.ldf files}
+% \typeout{* \space\space\space all *.sty, *.lua, *.def and *.ldf files}
% \typeout{*}
% \typeout{* You also need to compile the *.map files with teckit_compile}
% \typeout{* and place the resulting *.tec files under}
diff --git a/Master/texmf-dist/source/latex/preview/preview.dtx b/Master/texmf-dist/source/latex/preview/preview.dtx
index f8b72e05220..cafb03636d0 100644
--- a/Master/texmf-dist/source/latex/preview/preview.dtx
+++ b/Master/texmf-dist/source/latex/preview/preview.dtx
@@ -20,7 +20,7 @@
% Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
% Boston, MA 02110-1301 USA
% \fi
-% \CheckSum{1758}
+% \CheckSum{1770}
% \GetFileInfo{preview.sty}
% \date{\filedate}
% \author{David Kastrup\thanks{\texttt{bug-auctex@gnu.org}}}
@@ -437,8 +437,8 @@
%<*style>
%<*!active>
\NeedsTeXFormat{LaTeX2e}
-\def\pr@version{13.3}
-\def\pr@date{2024/01/17}
+\def\pr@version{14.0.6}
+\def\pr@date{2024/06/30}
\ProvidesPackage{preview}[\pr@date\space \pr@version\space (AUCTeX/preview-latex)]
% \end{macrocode}
% \end{macro}
@@ -1427,11 +1427,17 @@ Please complain to your document class author}%
%<auccfg>\PreviewMacro*[?[{@{[]}}{}][#1]\item
%<auccfg>\PreviewMacro*\emph
%<auccfg>\PreviewMacro*\textrm
+%<auccfg>\PreviewMacro*\textbf
%<auccfg>\PreviewMacro*\textit
%<auccfg>\PreviewMacro*\textsc
%<auccfg>\PreviewMacro*\textsf
%<auccfg>\PreviewMacro*\textsl
%<auccfg>\PreviewMacro*\texttt
+%<auccfg>\PreviewMacro*\textulc
+%<auccfg>\PreviewMacro*\textmd
+%<auccfg>\PreviewMacro*\textnormal
+%<auccfg>\PreviewMacro*\textup
+%<auccfg>\PreviewMacro*\textsw
%<auccfg>\PreviewMacro*\textcolor
%<auccfg>\PreviewMacro*\mbox
%<auccfg>\PreviewMacro*[][#1{}]\author
@@ -1891,7 +1897,7 @@ Please complain to your document class author}%
% \Finale{}
% \iffalse
% Local Variables:
-% mode: doctex
+% mode: docTeX
% TeX-master: "preview.drv"
% End:
% \fi
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index 2109ca38b5d..8b43d5b6bef 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -786,7 +786,7 @@
% Briefe}, series {\sc I, III, VII,} being edited by Dr.\ H.\
% Breger\index{Breger, Herbert}, Dr.~N. G\"adeke\index{G\"adeke, Nora} and
% others at the Leibniz-Archiv, Nieders\"achsische Landesbibliothek, Hannover.
-% (see \url{http://www.nlb-hannover.de/Leibniz})}
+% (see \url{https://www.gwlb.de/leibniz/digitale-ressourcen/repositorium-des-leibniz-archivs})}
% Theodosius's\index{Theodosius} {\em Spherics}, the German {\em
% Algorismus} of Sacrobosco,\index{Sacrobosco} the Sanskrit text of the
% {\em K\={a}\'{s}ik\={a}\-v\d{r}tti\/} of V\={a}mana\index{Vamana} and
@@ -3962,7 +3962,7 @@
% & It makes the peas taste funny \\
% & And get my tummy gummy.\edindex{gummy} &
% & But it keeps them on the knife.
-% \end{edtabularr}
+% \end{edtabularl}
% \pend
% \endnumbering
% \end{verbatim}
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index aff1d03da13..1d09e9c4eff 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -354,6 +354,7 @@
% \changes{v2.25.4}{2023/07/04}{Fix bug with \protect\cs{linenumOnlyPagesForColumnsR} and multiple numbered sections}
% \changes{v2.25.5}{2023/07/20}{Fix bug with hyperlink when using \protect\cs{footnoteXnomk}}
% \changes{v2.25.6}{2024/02/26}{Make \protect\cs{doinsidethislinehook} working on right side}
+% \changes{v2.25.7}{2024/07/23}{Fix compatibility with \protect\package{polyglossia} 2.2}
% ^^A PW added following as the definitions are at some unknown elsewhere
%
% \newcommand{\egstart}{%
@@ -1410,7 +1411,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2024/05/11 v2.25.6a reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2024/07/23 v2.25.7 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -5543,17 +5544,6 @@
% To counter this, we have to make sure that the correct language is
% used at the proper times.
%
-% \begin{macro}{\ifl@dusedbabel}
-% \begin{macro}{\l@dusedbabelfalse}
-% \begin{macro}{\l@dusedbabeltrue}
-% A flag for checking if \verb?babel? has been used as a package.
-% \begin{macrocode}
-\newif\ifl@dusedbabel
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
% \changes{v1.8.0}{2014/08/05}{Suppress \protect\cs{ifl@dsamelang} which did not work and was not logical, because both columns could have the same language but not the main language of the document.}
%
% \begin{macro}{\l@dchecklang}
@@ -5598,20 +5588,18 @@
% Now do the \protect\package{babel} or \protect\package{polyglossia} fix or, if necessary.
% \begin{macrocode}
\AtBeginDocument{%
- \@ifundefined{xpg@main@language}{%
+ \@ifpackageloaded{babel}{%
\@ifundefined{bbl@main@language}{%
% \end{macrocode}
% Either \protect\package{babel} has not been used or it has been used with no
% specified language.
% \begin{macrocode}
- \l@dusedbabelfalse
}{%
% \end{macrocode}
% Here we deal with the case where babel has been used. \protect\cs{selectlanguage}
% has to be redefined to use our version of \protect\cs{bbl@set@language} and to
% store the left or right language.
% \begin{macrocode}
- \l@dusedbabeltrue
\let\l@doldselectlanguage\selectlanguage
\let\l@doldbbl@set@language\bbl@set@language
\renewcommand{\selectlanguage}[1]{%
@@ -5635,7 +5623,7 @@
\gdef\theledlanguageL{\bbl@main@language}%
\gdef\theledlanguageR{\bbl@main@language}%
}%
- }
+ }{}%
% \end{macrocode}
% If use \protect\package{polyglossia}
% \changes{v1.8.0}{2014/08/05}{Correct left/right language setting with polyglossia.}
@@ -5643,25 +5631,28 @@
% \changes{v2.22.4}{2019/11/04}{Provide compatibility with the latest version of polyglossia (v1.45).}
% \changes{v2.23.0}{2020/03/08}{Restore compatibility with versions of polyglossia prior to v1.45.}
% \begin{macrocode}
- {%
- \@ifpackagelater{polyglossia}{2022/04/10}{}{\led@err@polyglossiaTooOld}%
- \let\old@otherlanguage\otherlanguage%
- \renewcommand{\otherlanguage}[2][]{%
- \selectlanguage[#1]{#2}%
- \xpg@set@language@only@aux[#1]{#2}%
- \ifledRcol \gdef\theledlanguageR{#2}%
- \else \gdef\theledlanguageL{#2}%
- \fi}%
+ \@ifpackageloaded{polyglossia}{%
+ \@ifpackagelater{polyglossia}{2024/07/15}{}{\led@err@polyglossiaTooOld}%
\renewcommand{\l@duselanguage}[1]{%
\csuse{no\languagename @numbers}%
- \expandafter\@select@language\expandafter{#1}%
+ \selectlanguage*{#1}%
+ }%
+ \AddToHook{env/Leftside/begin}{%
+ \AddToHookNext{cmd/polyglossia@language@switched/after}{%
+ \xdef\theledlanguageL{\languagename}%
+ }%
}%
- \xdef\theledlanguageL{\xpg@main@language}%
- \xdef\theledlanguageR{\xpg@main@language}%
+ \AddToHook{env/Rightside/begin}{%
+ \AddToHookNext{cmd/polyglossia@language@switched/after}{%
+ \xdef\theledlanguageR{\languagename}%
+ }%
+ }%
+ \xdef\theledlanguageL{\mainlanguagename}%
+ \xdef\theledlanguageR{\mainlanguagename}%
% \end{macrocode}
% That is it.
% \begin{macrocode}
- }%
+ }{}%
}%
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/se2thesis/se2colors.dtx b/Master/texmf-dist/source/latex/se2thesis/se2colors.dtx
index dd4b9da06cb..b597e876ffe 100644
--- a/Master/texmf-dist/source/latex/se2thesis/se2colors.dtx
+++ b/Master/texmf-dist/source/latex/se2thesis/se2colors.dtx
@@ -231,7 +231,7 @@
%
% Identify the package and give the overall version information.
% \begin{macrocode}
-\ProvidesExplPackage {se2colors} {2024-06-07} {4.1.0}
+\ProvidesExplPackage {se2colors} {2024-07-31} {4.3.1}
{A colour support package for the se2thesis bundle}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/se2thesis/se2fonts.dtx b/Master/texmf-dist/source/latex/se2thesis/se2fonts.dtx
index 6915bcd2a81..0d33b812286 100644
--- a/Master/texmf-dist/source/latex/se2thesis/se2fonts.dtx
+++ b/Master/texmf-dist/source/latex/se2thesis/se2fonts.dtx
@@ -151,7 +151,7 @@
%
% Identify the package and give the overall version information.
% \begin{macrocode}
-\ProvidesExplPackage {se2fonts} {2024-06-07} {4.1.0}
+\ProvidesExplPackage {se2fonts} {2024-07-31} {4.3.1}
{A font-selection support package for the se2thesis bundle}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/se2thesis/se2packages.dtx b/Master/texmf-dist/source/latex/se2thesis/se2packages.dtx
index 8d3baeed708..ed6cdd7ebf5 100644
--- a/Master/texmf-dist/source/latex/se2thesis/se2packages.dtx
+++ b/Master/texmf-dist/source/latex/se2thesis/se2packages.dtx
@@ -470,7 +470,7 @@
%
% Identify the package and give the overall version information.
% \begin{macrocode}
-\ProvidesExplPackage {se2packages} {2024-06-07} {4.1.0}
+\ProvidesExplPackage {se2packages} {2024-07-31} {4.3.1}
{Supporting packages for the se2thesis bundle}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/se2thesis/se2thesis.dtx b/Master/texmf-dist/source/latex/se2thesis/se2thesis.dtx
index 7764429e06f..d0c787bf2a0 100644
--- a/Master/texmf-dist/source/latex/se2thesis/se2thesis.dtx
+++ b/Master/texmf-dist/source/latex/se2thesis/se2thesis.dtx
@@ -62,7 +62,7 @@
% internet, causing each thesis looking differently.
%
% The author of this package provided a template,
-% which he initially created for his bachelor and master thesis,
+% which he initially created for his bachelor's and master's thesis,
% that was recommended and used by many students.
% The implementation of that template, however, was very hacky and required
% some changes over time.
@@ -74,7 +74,7 @@
% The bundle itself consists of several \LaTeX{} classes and packages
% that also allow reuse of various parts of it.
% Its main class is the \pkg{se2thesis} document class,
-% an extension of the \KOMAScript{} |scrreprt| document class.
+% an extension of the \KOMAScript{} |scrbook| document class.
% The packages \pkg{se2colors} and \pkg{se2fonts} provide necessary
% colour and font settings for the \pkg{se2thesis} class;
% the \pkg{se2packages} allows to load several recommended packages~(see
@@ -186,9 +186,9 @@
% \pkg{expl3}, \pkg{l3keys2e} in case one uses a \LaTeX{} kernel from before
% 2022--06--01, \pkg{graphicx}, \pkg{translations}, \KOMAScript, \pkg{xcolor},
% \pkg{ifthen}, as well as \pkg{fontspec}, \pkg{unicode-math},
-% and \pkg{libertinus-otf} if one uses \LuaTeX{};
+% \pkg{inconsolata-nerd-font} and \pkg{libertinus-otf} if one uses \LuaTeX{};
% for \pdfLaTeX{} we load \pkg{fontenc}, \pkg{libertinus-type1}, and
-% \pkg{AnonymousPro} instead of the latter three.
+% \pkg{inconsolata} instead of the latter three.
% Furthermore, we load \pkg{microtype};
% when using \LuaTeX{}, we also load \pkg{lua-widow-control} and \pkg{selnolig}.
%
@@ -220,6 +220,11 @@
% \emph{Note:} you cannot use \cls{scrartcl} because it does not provide
% the required |chapter| sectioning.
% Default is |scrbook|.
+%
+% Please note that if you want to have the bibliography numbered or use an
+% appendix with alpha-numbering (A, B, \dots), you want to explicitly use
+% |scrreprt| as the base class; for some (currently unknown) reason this does
+% not work with the default |scrbook|.
% \end{function}
% \begin{function}{paper}
% \begin{syntax}
@@ -243,11 +248,11 @@
% \end{syntax}
% Defines the type of the thesis.
% Possible values are:
-% |bachelor| for a bachelor thesis, |bachelorproposal| for a proposal to
-% a bachelor thesis, |master| for a master thesis, |masterproposal| for
-% a proposal to a master thesis, |phdproposal| for a proposal to a PhD thesis,
+% |bachelor| for a bachelor's thesis, |bachelorproposal| for a proposal to
+% a bachelor's thesis, |master| for a master's thesis, |masterproposal| for
+% a proposal to a master's thesis, |phdproposal| for a proposal to a PhD thesis,
% |phd| for a PhD thesis in the natural sciences, |phdeng| for a PhD thesis
-% in engineering, and |phdphil| for a PhD thesis in philosophy.
+% in engineering, and |phdphil| for a PhD thesis in natural philosophy.
% \end{function}
%
% \begin{function}{colormode}
@@ -307,7 +312,7 @@
% \cmd{\matrnumber} \marg{matriculation-number}
% \end{syntax}
% Specify the matriculation number of the student writing the thesis.
-% This is required for Bachelor and Master theses.
+% This is required for bachelor's and master's theses.
% \end{function}
%
% \begin{function}{\supervisor, \cosupervisor}
@@ -437,7 +442,7 @@
% We provide the \env{acknowledgements} environment to typeset acknowledgements
% for your thesis.
% Using this environment is optional.
-% Usually, bachelor and master thesis do not contain such an acknowledgements
+% Usually, bachelor's and master's thesis do not contain such an acknowledgements
% section, however, there is no general rule to this.
% \begin{verbatim}
% \begin{acknowledgements}[language]
@@ -540,6 +545,48 @@
% question;
% however, this can also be arbitrary text.
%
+% \subsection{Language Support and Hyphenation}\label{sec:doct-se2thesis-lang}
+%
+% The study regulations of the University of Passau require students to write
+% their thesis in either German or English. For both cases it is recommended
+% to load a package for the correct hyphenation patters. Usually, one can
+% either choose between the \pkg{babel} and \pkg{polyglossia} package. For a
+% detailed discussion in the differences and which to choose, please use the
+% search engine of your choice.
+%
+% For this documentation we stick with the \pkg{babel} package, which is often
+% considered to be the standard package.
+%
+% If you write your thesis in German, load \pkg{babel} in your preamble like
+% follows
+% \begin{verbatim}
+% \usepackage[ngerman]{babel}
+% \end{verbatim}
+% For a thesis in English, you have to also load the German variant plus the
+% English one as the default (see \cref{sec:doc-se2thesis-authorship} for an
+% explanation)
+% \begin{verbatim}
+% \usepackage[ngerman,main=UKenglish]{babel}
+% \end{verbatim}
+%
+% Note that by default, \LaTeX{} does not provide hyphenation for compound
+% words, which is explained in the \TeX{} Book~\cite[p.~454]{TODO} and a
+% StackExchange post\footnote{\href{https://tex.stackexchange.com/a/63234/14622}{https://tex.stackexchange.com/a/63234/14622}}. The \pkg{babel} package
+% provides a way (called shorthands) for German, which allows to reenable
+% hyphenation for compound words (as they are common on German). These
+% shorthands are by default not available for English, but they can easily be
+% added by adding
+% \begin{verbatim}
+% \useshorthands{"}
+% \addto\extrasUKenglish{\languageshorthands{ngerman}}
+% \end{verbatim}
+% after loading \pkg{babel} with the aforementioned \cmd{\usepackage}
+% macro\footnote{see https://tex.stackexchange.com/a/298844/14622}.
+%
+% \emph{Please note:} loading the \pkg{hyphenat} package is strongly discouraged
+% by the \pkg{se2thesis} maintainer because it conflicts with the \env{hyp}
+% environment provided by \pkg{se2thesis} (see \cref{sec:doc-se2thesis-summaries}).
+%
% \end{documentation}
%
% \clearpage
@@ -607,7 +654,7 @@
%
% Identify the class and give the overall version number.
% \begin{macrocode}
-\ProvidesExplClass {se2thesis} {2024-06-07} {4.1.0}
+\ProvidesExplClass {se2thesis} {2024-07-31} {4.3.1}
{A thesis class for the Chair of Software Engineering II}
% \end{macrocode}
%
@@ -1246,7 +1293,7 @@
% \end{macrocode}
% The next block generates the text that describes the thesis.
% In case of a PhD thesis, this text is predefined to match the requirements.
-% In case of a bachelor or master thesis, or a proposal thereof, we generate
+% In case of a bachelor's or master's thesis, or a proposal thereof, we generate
% a text based on the values of the |thesistype| load-time option and the
% values of the \cmd{\degreeprogramme}, \cmd{\department}, and
% \cmd{\institute} variables.
@@ -1283,7 +1330,7 @@
\tl_if_eq:NnTF \l_@@_thesis_type_tl { phdphil }
{
Dissertation~ zur~ Erlangung~ des~ Doktorgrades\\
- der~ Philosophie~ (Dr.\,phil.)\\
+ der~ Naturphilosophie~ (Dr.\,phil.\,nat.)\\
eingereicht~ an~ der~ Fakultät~ für~ Informatik~ und~ Mathematik\\
der~ Universität~ Passau\\
\rule{\textwidth}{.1pt}\\
@@ -1291,7 +1338,7 @@
the~ Faculty~ of~ Computer~ Science~ and~ Mathematics\\
of~ the~ University~ of~ Passau\\
in~ partial~ fulfillment~ of~ obtaining\\
- the~ degree~ of~ a~ Doctor~ of~ Philosophy
+ the~ degree~ of~ a~ Doctor~ of~ Natural~ Philosophy
} {
\tl_if_eq:NnT \l_@@_thesis_type_tl { bachelor }
{ \GetTranslation{Bachelor-thesis} }
@@ -1678,7 +1725,7 @@
% We provide the following English translations.
%
% \begin{macrocode}
-\ProvideDictionaryFor{English}{se2translations}[2024/06/07]
+\ProvideDictionaryFor{English}{se2translations}[2024/07/31]
\ProvideDictTranslation{abstract}{abstract}
\ProvideDictTranslation{Abstract}{Abstract}
\ProvideDictTranslation{acknowledgement}{acknowledgement}
@@ -1703,10 +1750,10 @@
\ProvideDictTranslation{External}{External Examiner}
\ProvideDictTranslation{degreeprogramme}{programme}
\ProvideDictTranslation{Degreeprogramme}{Programme}
-\ProvideDictTranslation{Bachelor-thesis}{Bachelor Thesis}
-\ProvideDictTranslation{Bachelor-thesis-proposal}{Bachelor Thesis Proposal}
-\ProvideDictTranslation{Master-thesis}{Master Thesis}
-\ProvideDictTranslation{Master-thesis-proposal}{Master Thesis Proposal}
+\ProvideDictTranslation{Bachelor-thesis}{Bachelor's Thesis}
+\ProvideDictTranslation{Bachelor-thesis-proposal}{Bachelor's Thesis Proposal}
+\ProvideDictTranslation{Master-thesis}{Master's Thesis}
+\ProvideDictTranslation{Master-thesis-proposal}{Master's Thesis Proposal}
\ProvideDictTranslation{PhD-thesis}{PhD Thesis}
\ProvideDictTranslation{PhD-thesis-proposal}{PhD Thesis Proposal}
\ProvideDictTranslation{date}{date}
@@ -1729,7 +1776,7 @@
% We provide the following German translations.
%
% \begin{macrocode}
-\ProvideDictionaryFor{German}{se2translations}[2024/06/07]
+\ProvideDictionaryFor{German}{se2translations}[2024/07/31]
\ProvideDictTranslation{abstract}{Zusammenfassung}
\ProvideDictTranslation{Abstract}{Zusammenfassung}
\ProvideDictTranslation{acknowledgement}{Danksagung}
diff --git a/Master/texmf-dist/source/latex/sillypage/sillypage.dtx b/Master/texmf-dist/source/latex/sillypage/sillypage.dtx
index 86982db30db..922d8b6a669 100644
--- a/Master/texmf-dist/source/latex/sillypage/sillypage.dtx
+++ b/Master/texmf-dist/source/latex/sillypage/sillypage.dtx
@@ -19,8 +19,8 @@
% by Phelype Oleinik, Paulo Cereda, samcarter and Ulrike Fischer.
%
%<*package>
-\def\sillypageDate{2023-03-04}
-\def\sillypageVersion{1.6}
+\def\sillypageDate{2024-07-23}
+\def\sillypageVersion{1.7}
%</package>
%<*driver>
\documentclass[a4paper,full]{l3doc}
@@ -261,9 +261,13 @@
\newcommand*\@silly { \@@_step:n }
\cs_new:Npn \@@_step:n #1
{
+ \UseTaggingSocket{@@/begin}{#1}
+ \SuspendTagging{@@}
\@@_step_aux:eN
{ \int_eval:n { \int_mod:nn { #1-1 } { \silly@steps } +1 } }
\c_false_bool
+ \ResumeTagging{@@}
+ \UseTaggingSocket{@@/end}
}
% \end{macrocode}
% \end{macro}
@@ -280,8 +284,12 @@
\newcommand*\@sillynumeral { \@@_numeral:n }
\cs_new:Npn \@@_numeral:n #1
{
+ \UseTaggingSocket{@@/begin}{#1}
+ \SuspendTagging{@@}
\exp_args:Ne \str_map_function:nN
{ \int_to_base:nn {#1} { 12 } } \@@_numeral_aux:n
+ \ResumeTagging{@@}
+ \UseTaggingSocket{@@/end}
}
\cs_new:Npn \@@_numeral_aux:n #1
{ \@@_step_aux:eN { "\char_uppercase:N #1+1 } \c_true_bool }
@@ -289,6 +297,28 @@
% \end{macro}
% \end{macro}
% \end{macro}
+%
+% \subsection{Tagging Support}
+
+% \begin{macrocode}
+\NewSocket{tagsupport/@@/begin}{1}
+\NewSocket{tagsupport/@@/end}{0}
+\NewSocketPlug{tagsupport/@@/begin}{tagged}
+ {
+ \mode_leave_vertical:
+ \tag_mc_end_push:
+ \tag_struct_begin:n {tag=Span}
+ \tag_mc_begin:n {actualtext=#1}
+ }
+\NewSocketPlug{tagsupport/@@/end}{tagged}
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+\AssignSocketPlug{tagsupport/@@/begin}{tagged}
+\AssignSocketPlug{tagsupport/@@/end}{tagged}
+% \end{macrocode}
%
% \subsection{Internals}
%
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx
index b4791ce47bc..03fe45441ed 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx
@@ -364,6 +364,7 @@
\@@_collect_search:NnF #1
{
\unskip { \@@_collect_loop: }
+ \textonly@unskip { \@@_collect_loop: }
\end { \tabularnewline \end }
\relax { \@@_collect_relax:N #1 }
\tabularnewline { \tabularnewline }
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index ca2b7822aa8..bd97dc57500 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2024-06-14} {3.3.18}
+\ProvidesExplPackage {siunitx} {2024-06-24} {3.3.19}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/sjtutex/sjtutex.dtx b/Master/texmf-dist/source/latex/sjtutex/sjtutex.dtx
index ab429d6850d..bcf46b7fbec 100644
--- a/Master/texmf-dist/source/latex/sjtutex/sjtutex.dtx
+++ b/Master/texmf-dist/source/latex/sjtutex/sjtutex.dtx
@@ -216,7 +216,7 @@
Please update your TeX distribution}{}}
%</class>
%<*!(driver|install)>
-%<+!driver>\GetIdInfo$Id: sjtutex.dtx 6d52363 2024-04-05 19:40:30 +0800 Alexara Wu <alexarawu@outlook.com> $
+%<+!driver>\GetIdInfo$Id: sjtutex.dtx 78f11bc 2024-06-29 23:01:32 +0800 Alexara Wu <alexarawu@outlook.com> $
%<class&thesis> {Thesis document class for Shanghai Jiao Tong University (SJTUTeX)}
%<class&thesis>\ProvidesExplClass{sjtuthesis}
%<class&report> {Report document class for Shanghai Jiao Tong University (SJTUTeX)}
@@ -335,7 +335,7 @@
%<font&cjk&founder&zh>\ProvidesExplFile{sjtu-cjk-font-founder-zh.def}
%<font&cjk&founder&ja> {Founder CJK fonts definition for Japanese (SJTUTeX)}
%<font&cjk&founder&ja>\ProvidesExplFile{sjtu-cjk-font-founder-ja.def}
-%<!driver> {\ExplFileDate}{2.1.2}{\ExplFileDescription}
+%<!driver> {\ExplFileDate}{2.1.3}{\ExplFileDescription}
%</!(driver|install)>
%
%<*driver>
@@ -343,7 +343,7 @@
\documentclass{ctxdoc}
\newcommand{\sjtutex}{SJTU\TeX}
\expandafter\def\csname ver@\jobname.dtx\endcsname
- {2024/04/05 v2.1.2 SJTUTeX}
+ {2024/06/29 v2.1.3 SJTUTeX}
\usepackage{float}
\usepackage{multirow}
\usepackage{longtable}
@@ -1638,6 +1638,14 @@
% \urlprefix\url{https://ctan.org/pkg/ctex}
% \urlprefix\CTANurl[文档及源代码:]{language/chinese/ctex/ctex.pdf}
%
+% \bibitem{zhlineskip}
+% 张瑞熹.
+% \newblock \textit{zhlineskip 宏包}\allowbreak[EB/OL].
+% \newblock version 1.0e,
+% \newblock (2019-05-15).
+% \urlprefix\url{https://ctan.org/pkg/zhlineskip}
+% \urlprefix\CTANurl[文档:]{language/chinese/zhlineskip/zhlineskip.pdf}
+%
% \bibitem{fduthesis}
% 曾祥东.
% \newblock \textit{fduthesis: 复旦大学论文模板}\allowbreak[EB/OL].
@@ -4076,6 +4084,11 @@
%<thesis> \exp_not:N \zihao { \g_@@_zihao_tl }
%<!thesis> equation-font .initial:V = \c_empty_tl
}
+% \end{macrocode}
+% \end{macro}
+%
+% 借用 \pkg{zhlineskip} 宏包的代码设置行间公式字体。
+% \begin{macrocode}
\clist_map_inline:nn
{
array, matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix,
@@ -4101,7 +4114,6 @@
\spread@equation
}
% \end{macrocode}
-% \end{macro}
%
% \subsection{数学环境}
%
@@ -5318,23 +5330,24 @@
% \end{macro}
%
% \changes{v2.1.2}{2024/03/31}{改用 \pkg{titletoc} 设置目录格式。}
+% \changes{v2.1.3}{2024/06/28}{更新目录样式。}
% \begin{macrocode}
\tl_set:Nn \SJTU@leaders { \titlerule* [ 4bp ] { . } }
\contentsmargin [ 2.55 em ] { 0 pt }
%<article>\titlecontents { section }
%<!article>\titlecontents { chapter }
[ 0 pt ] { \addvspace { 6 bp } \bfseries }
- { \contentspush { \thecontentslabel \quad } } { }
+ { \contentspush { \thecontentslabel \enskip } } { }
{ \SJTU@leaders \thecontentspage }
%<article>\titlecontents { subsection }
%<!article>\titlecontents { section }
[ 2 em ] { }
- { \contentspush { \thecontentslabel \quad } } { }
+ { \contentspush { \thecontentslabel \enskip } } { }
{ \SJTU@leaders \thecontentspage }
%<article>\titlecontents { subsubsection }
%<!article>\titlecontents { subsection }
[ 4 em ] { }
- { \contentspush { \thecontentslabel \quad } } { }
+ { \contentspush { \thecontentslabel \enskip } } { }
{ \SJTU@leaders \thecontentspage }
% \end{macrocode}
%
@@ -5357,7 +5370,7 @@
{ \SJTU@listof {#4} {#2} }
\titlecontents {#2}
[ 0 pt ] { }
- { \contentspush { #3 \space \thecontentslabel \quad } } { }
+ { \contentspush { #3 \space \thecontentslabel \enskip } } { }
{ \SJTU@leaders \thecontentspage }
\exp_args:Nnv \contentsuse {#2} { ext@ #2 }
}
@@ -6044,7 +6057,7 @@
{ address } { Shanghai,~ P.R.~ China } ,
{ author } { Author } ,
{ supervisor } { Supervisor } ,
- { assoc_supervisor } { Assoc.~ Supervisor } ,
+ { assoc_supervisor } { Assoc.\ Supervisor } ,
{ co_supervisor } { Co-supervisor } ,
{ title_page } { Title~ Page } ,
{ declaration } { Statutory~ Declaration } ,
diff --git a/Master/texmf-dist/source/latex/spelatex/spelatex.dtx b/Master/texmf-dist/source/latex/spelatex/spelatex.dtx
index b906fd628b8..bdedc84d70b 100644
--- a/Master/texmf-dist/source/latex/spelatex/spelatex.dtx
+++ b/Master/texmf-dist/source/latex/spelatex/spelatex.dtx
@@ -1,6 +1,5 @@
% \iffalse meta-comment
%
-%
% Copyright (C) 2024 by Walter Daems <walter.daems@uantwerpen.be>
% and Paul Levrie
%
@@ -34,10 +33,10 @@
\ProvidesFile{spelatex.dtx}
%</driver>
%<*package>
- [2024/06/12 v0.9 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)]
+ [2024/06/21 v0.91 SpeLaTeX - Speech-enabled LaTeX (DMW and LVP)]
%</package>
-\def\fileversion{0.9}
-\def\filedate{2024/06/12}
+\def\fileversion{0.91}
+\def\filedate{2024/06/21}
%<*driver>
\documentclass[10pt]{ltxdoc}
\usepackage{makeidx}
@@ -79,7 +78,11 @@
% Right brace \} Tilde \~}
%
%
-% \changes{v0.9}{2024/06/12}{. Birth}
+% \changes{v0.90}{2024/05/31}{. Birth}
+% \changes{v0.91}{2024/06/21}{. First overhaul:\\
+% - avoided big active link areas\\
+% - sketched bigger picture, leading to
+% the three project phases.}
%
% \GetFileInfo{spelatex.dtx}
%
@@ -104,14 +107,14 @@
% \spelmacad{CPAN}{see-pan}
% \newrobustcmd\POD{POD}
% \spelmacad{POD}{pod}
-% \newrobustcmd\spelwizardmodule{\texttt{SpeL::Wizard}}
-% \spelmacad{spelwizardmodule}{spel double colon wizard}
%
% \maketitle
% \fvset{gobble=2}
%
% \section{Preface}
%
+% \subsection{Background}
+%
% \begin{spelchunk}
% At our institute, the University of Antwerp in Belgium, the number
% of students with reading and/or writing disorders (or at least
@@ -138,46 +141,152 @@
% group of students. Yes, economic laws also govern teaching!
% \end{spelchunk}
%
+% \subsection{State of the art}
+%
+% \subsubsection{In general}
+%
% \begin{spelchunk}
% Therefore, reverting to readily available text-to-speech software
-% os an obvious choice. Nowadays, special software exists that
+% is an obvious choice. Nowadays, special software exists that
% provides the functionality of reading out loud the contents of
-% electronic documents. For nontechnical subjects,
-% this works fine. However, when it comes to technical course
-% syllabi that are loaded with non-trivial mathematics, the standard
-% text-to-speech packages fail to meet our expectations. In
-% addition, they cannot read a sensible textual description of
-% figures or tables.
+% electronic documents, e.g. NVDA \cite{NVDA} or
+% SprintPlus~\cite{SPRINT}. Moreover, more and more standard PDF
+% readers (such
+% as Acrobat Reader~\cite{ADOBEREADER} have the facility of
+% performing text-to-speech). For nontechnical subjects, this works
+% fine. However, when it comes to technical course syllabi that are
+% loaded with non-trivial mathematics, the standard text-to-speech
+% packages fail to meet our expectations. In addition, they cannot
+% read a sensible textual description of figures or tables.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% The issue with reading mathematics will be solved in the future,
+% by enforcing mathematical equations to follow a specific standard
+% that can be parsed and converted, not only into a visual
+% representation, but also into proper text. MathML will be one of
+% the candidates for that format.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% The issue with figures and tables can be solved by using the tag
+% infrastructure of PDF. The format provides a system of tags that
+% allow you to provide extra information about the content of a
+% document, in much the same way as you can specify an 'alt' key for
+% an image in HTML. This tag could contain a proper textual
+% description of the figure or the table.
% \end{spelchunk}
%
+% \subsubsection{For \LaTeX}
+%
+% \begin{spelchunk}
+% Currently, the \LaTeX project is investing in enabling \LaTeX{} to
+% partially automate the tagging of PDFs with the \texttt{tagpdf}
+% package~\cite{TAGPDF}, such that the user only has to do a minimal
+% job (adding tags for figures and tables). The goal is to maximize
+% the accessibility of \LaTeX-produced documents.
+% \end{spelchunk}
+%
% \begin{spelchunk}
-% \LaTeX{} is one of the better choices when it comes to typesetting
-% technical subjects, so why not extend \LaTeX{} to provide
-% mathematics-capable text-to-speech facilities? Our \spelatex{}
-% prototype does exactly that. Admittedly, using it causes a
-% significant overhead in writing your text. Therefore we also
-% provide you the \spelbox{} extension for the Org-mode
+% So all is well? Not quite. Though I'm confident that with enough
+% time the community will solve the issue completely, there are
+% still some gaps:
+% \end{spelchunk}
+% \begin{itemize}
+% \spelitem{The tagpdf package is still not a part of the mainstream
+% \LaTeX{}-kernel.}
+% \spelitem{MathML reading support in PDF readers is still in its
+% infancy.}
+% \spelitem{Many PDF readers do not fully support tags yet.}
+% \end{itemize}
+%
+% \subsection{This package}
+%
+% \begin{spelchunk}
+% This package aims to overcome these problems in the meantime and
+% also to contribute to the longterm goal: making perfectly tagged
+% PDFs that are read by any PDF-reader.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% In the \emph{first phase} of this package (i.e. the version you are
+% looking at right now), this package reads your \LaTeX{} source,
+% converts the text and the formulas to audio files and equips your
+% PDF with hyperlinks to these files, such that with a few clicks
+% you can listen to your document.
+% The audio files are external files that should be packaged with
+% your PDF to allow a reader to use the document with the available
+% audio.
+% How does it read the formulas? It parses your \LaTeX{} constructs and
+% makes the best of it. This will probably be the part that might
+% survive up until the very last phase of this package.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% In a \emph{second phase} of this package, the audio files will be embedded
+% into the PDF. Currently, there are not enough PDF readers that
+% support this feature. Therefore, we decided to keep using the
+% external audio files for now.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% In a \emph{third phase}, the audio files \emph{may be} abandoned
+% alltogether, fully switching to tags. And we do think that this
+% should be the end goal. The reasons why we say
+% \emph{'may be'}, are:
+% \end{spelchunk}
+% \begin{itemize}
+% \spelitem{The voices of the current PDF-readers are still not of the
+% same quality as the ones available online. And quality does matter.}
+% \spelitem{The better voices may require cloud access, and probably
+% will not be free, therefore (me) paying for them at document creation
+% time, makes more sense to me than having my students pay
+% for these voices whenever they read the document.}
+% \spelitem{The industry standard Adobe reader is not easily available
+% on open-source operating systems (like UNIX/BSD/Linux-derived
+% platforms). You might consider using emulation using
+% wine~\cite{WINE}, but in that case you can forget about audio. Free
+% access to software is something we consider to be a must-have,
+% rather than a nice-to-have. In addition, Walter feels miserable when
+% he's forced to use anything else than GNU/Linux, because then he
+% keeps moaning that his productivity is ruined.}
+% \end{itemize}
+%
+% \begin{spelchunk}
+% Admittedly, in this first phase, using the \spelatex{} package
+% causes a significant overhead in writing your text. Therefore we
+% also provide you the \spelbox{} extension for the Org-mode
% \cite{ORGMODE} of \GNU{} Emacs \cite{EMACS}. To satisfy your
% curiosity: \spelbox{} stands for ``Speech-Enabled \LaTeX{} By
% Org-mode eXport''.
% \end{spelchunk}
%
% \begin{spelchunk}
-% Will AI take over the role of this package in the future?
-% Undoubtedly so. But for the time being, and also to avoid wasting
-% the enormous amount of energy AI costs us, we hope that you enjoy
+% Will \spelatex{} become obsolete in the future?
+% Undoubtedly so. But for the time being, it answers our desire to
+% provide our students with good audio support when studying their
+% engineering courses. That is now, not only in five years time.
+% \end{spelchunk}
+
+% \begin{spelchunk}
+% We hope that you enjoy
% using our software, or that --- if you are not pleased with it ---
% it triggers you to give us feedback or to come up with a better
-% solution.
+% solution. We especially would like to thank Ulrike Fischer (of the
+% \LaTeX-project and the maintainer of the tagpdf package) for
+% trying to use this package and reaching out to give us feedback.
+% One of her suggestions (not to use big hyperlink-areas) was almost
+% instantly implemented and has been adopted as the standard way of
+% linking.
% \end{spelchunk}
%
% \begin{spelchunk}
% You are free to use our software but kindly ask you to provide a
% mention ``The audio materials of this text have been prepared with
% \spelatex{}/\spelbox{}'' in the section treating copyrights,
-% bibliographic data or any other spot that is suited. I'd also
+% bibliographic data or any other spot that is suited. We'd also
% welcome a short mail of yours telling that you make use of the
-% package. The pleasure of receiving such an e-mail makes my day.
+% package. The pleasure of receiving such an e-mail makes our day.
% \end{spelchunk}
%
% \begin{spelchunk}
@@ -215,8 +324,8 @@
% \spelatex{}.\footnote{Note that multitasking is not reserved for persons
% without visual impairment. Also visually impaired persons can
% benefit from listening to an audiobook while doing other
-% things.} Personally, I often use \spelatex{} to proofread texts as I
-% hear language errors more easily than I spot them while reading.
+% things.} Personally, we often use \spelatex{} to proofread texts as we
+% hear language errors more easily than we spot them while reading.
% \end{spelchunk}
%
% \subsection{The magic under the hood}
@@ -228,9 +337,9 @@
% ecosystem. It consists of three components:
% \end{spelchunk}
% \begin{itemize}
-% \spelitem{An Org-mode exporter called \texttt{ox-spelatex} \cite{OXSPELATEX}}
+% \spelitem{An Org-mode exporter called \texttt{ox-spel} \cite{OXSPELATEX}}
% \spelitem{This \LaTeX{}-package \spelatex{} \cite{SPEL}}
-% \spelitem{A script embeded in the Perl module \spelwizardmodule~\cite{SPELWIZARD}}
+% \spelitem{A script embeded in the Perl module \texttt{SpeL::Wizard} \cite{SPELWIZARD}}
% \end{itemize}
%
% \subsubsection{The overall picture}
@@ -249,7 +358,7 @@
% \end{spelchunk}
%
% \begin{spelchunk}
-% By loading the |spelatex.sty| package in your source
+% By loading the |spel.sty| package in your source
% document, \LaTeX{} will produce a PDF file that references audio
% files that will be generated later (see below). In
% addition, it generates text chunks (i.e. small portions of
@@ -294,11 +403,11 @@
% tool/.style={rectangle,draw,align=center}]
% \node [doc] (utext) at (0,9) {text.org\\\footnotesize(unprepped
% source)};
-% \node [tool] (instrument) at (0,6) {Org-mode exporter\\\footnotesize(\texttt{ox-spelatex})};
+% \node [tool] (instrument) at (0,6) {Org-mode exporter\\\footnotesize(\spelbox)};
% \node [doc] (text) at (0,3) {text.tex\\\footnotesize(prepped source)};
% \draw[->] (utext) -- (instrument);
% \draw[->] (instrument) -- (text);
-% \node [doc] (R) at (-3,0) {spelatex.sty\\\footnotesize(package)};
+% \node [doc] (R) at (-3,0) {spel.sty\\\footnotesize(package)};
% \node [tool] (latex) at (0,0) {\LaTeX\\\footnotesize(compiler)};
% \node [doc] (pdf) at (0,-3) {text.pdf\\\footnotesize(PDF with\\\footnotesize hyperlinks)};
% \node [doc] (spelidx) at (6,-3) {text.spelidx\\\footnotesize(index file)};
@@ -313,7 +422,7 @@
% \draw[->] (latex) edge[out=10,in=90] (aux);
% \draw[->] (latex) edge[out=-10,in=90] (files);
% \node [tool] (engine) at (6,-6) {\spelpl{}\\
-% \footnotesize(\spelwizardmodule{} engine)};
+% \footnotesize(\spelatex{} engine)};
% \node [tool] (t2s) at (1.5,-6) {text-to-speech\\engine};
% \draw[->] (files) -- (engine);
% \draw[->] (spelidx) -- (engine);
@@ -339,13 +448,13 @@
% unprepped source. Read the Orgmode
% documentation on \LaTeX{} and \spelatex{}-exporting to get to know
% the format. The Orgmode \spelatex{} exporter, creates a fully
-% equipped \LaTeX{} file of your text. We call this the prepped source. You can
+% equiped \LaTeX{} file of your text. We call this the prepped source. You can
% also start by composing this file yourself.
-% If your prepped source file uses the \spelatex{} style file, then
+% If you prepped source file uses the \spelatex{} style file, than
% your compiler will generate a PDF file with hyperlinks, a
% dot aawks-file and a dot spellindex-file together with a directory full of
-% dot tech files containing the text chunks to be processed by
-% \spelpl. This is a perl script that converts the chunks into
+% dot tex files containing the text chunks to be processed by the
+% \spelpl-engine. This is a perl script that converts the chunks into
% plain text readable spel files. The script is called spel dash
% wizard dot pl. It also creates a playlist and audio files using a
% text-to-speech engine. In this case, these are
@@ -363,6 +472,28 @@
% \label{fig:setup}
% \end{figure}
%
+% \begin{spelchunk}
+% You might wonder: where are the links? Well, there are three
+% variants:
+% \end{spelchunk}
+% \begin{itemize}
+% \spelitem{\emph{area links}, which are almost exclusively
+% used for equations, tables or figures. These links make an entire
+% rectangle active, linking to the corresponding audio file.}
+% \spelitem{\emph{group links}, indicated by small right-pointing
+% triangles next to section headers. These cause all blocks in the
+% section to be read one by one.}
+% \spelitem{\emph{hidden links}, wich are, as the name suggests,
+% hidden to avoid visual disturbance of the text; every
+% paragraph, footnote and list is activated by a link on the
+% whitespace before the first line of the chunk. Try it! Once you
+% are aware that these regions are active, you'll find them
+% easily. In addition, not using the full paragraph as an active
+% region, allows existing hyperlinks (like for citations, references
+% or URLs) to still function.}
+% \end{itemize}
+%
+%
% \subsubsection{Implicit spelchunks}
% \spelmacad{usepackage}[1]{the usepackage #1 macro}
% \spelmacad{title}{the title macro}
@@ -390,7 +521,7 @@
% that follows as a first explicit argument, i.e. |\item blabla|
% should be replaced by |\spelitem{blabla}|.
% We call these \LaTeX-fragments \emph{defunct implicit
-% spelchunks}. They should have been implicit, but I could not get
+% spelchunks}. They should have been implicit, but we could not get
% that to work without problems. Therefore you need to mark them
% explicitly as |\spelitem| constructs.
% \end{spelchunk}
@@ -400,7 +531,7 @@
% One would hope that displaymath environments are also implicit
% spelchunks. However, overriding environments in \LaTeX{} is a tricky
% business. In view of this, the \spelatex{} package keeps away from
-% this, and I've chosen to treat displaymath environments (like
+% this, and we've chosen to treat displaymath environments (like
% |equation|, |eqnarray|, |gather|, |align|, |alignat|) the same way
% as tables or figures, i.e. you need to embed the in a |spelchunk|
% environment. The only difference between math environments and
@@ -472,7 +603,7 @@
% This brings us to the two top boxes in the diagram of
% Fig.~\ref{fig:setup}. If you prepare your manuscript in Org-mode,
% and use the Org-mode exporter, you don't have to worry about explicit
-% spelchunks, or defunct implicit spelchunks. Therefore, I encourage
+% spelchunks, or defunct implicit spelchunks. Therefore, we encourage
% you to use Emacs as your editor. The learning
% curve is steep, but the rewards regarding ease-of-use are huge.
% In that way, you can focus on providing textual descriptions for
@@ -485,7 +616,7 @@
% independent of Org-mode. It also shows that if you don't
% want to use Emacs and Org-mode, you will suffer some considerable
% pain in equipping your manuscript with an overload of |spelchunk|
-% environments. I have only one advice: don't use the \spelatex{}
+% environments. We have only one advice: don't use the \spelatex{}
% outside \spelbox{}. Outside a proper boxed confinement,
% spells easily become curses\ldots
% \end{spelchunk}
@@ -518,8 +649,8 @@
% \subsection{Added value}
%
% \begin{spelchunk}
-% Why would it make sense to use \spelatex? I think there are many
-% selling points. I can mention a few:
+% Why would it make sense to use \spelatex? We think there are many
+% selling points. We can mention a few:
% \end{spelchunk}
% \begin{description}
% \spelitem[Minimal overhead]{
@@ -533,7 +664,7 @@
% the effort of preparing your manuscript. There are no license
% costs involved.\\
% You could also consider to use an online paying text-to-speech
-% service. As an example, I incorporated a connection to Amazon's
+% service. As an example, We incorporated a connection to Amazon's
% Polly \cite{AWSPOLLY}.\\
% In addition, if your user has a better-quality (maybe
% commercial) text-to-speech system, he/she can reconvert the text
@@ -553,15 +684,27 @@
% \section{Installation}
%
% \subsection{The \spelatex{} package}
-
% \begin{spelchunk}
-% Most \LaTeX{} distributions use \CTAN{} as their main package source
-% and therefore will include \spelatex.
+% If you are a package manager then you'll know how to
+% prepare an installation package for \spelatex.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% If you are a normal user then you have two options. First,
+% check if there is a package that your favorite \LaTeX{}
+% distributor has prepared for you. Most of the major distributions
+% (like e.g. \TexLive{} or \MikTeX{}) do so.\\
+% Second, grab the TDS package
+% from \CTAN{} \cite{CTAN} (spel.TDS.zip) and unzip it somewhere in your
+% own TDS tree, regenerate your filename database and off you go.
+% In any case, make sure that \LaTeX{} finds the file |spel.sty|.
% \end{spelchunk}
%
-% %\begin{spelchunk}
-% If this is not the case, contact me. I'll be glad to provide you
-% with TDS file that you can unpack in your local TDS tree.
+% \begin{spelchunk}
+% The \spelatex{} package uses a number of auxiliary packages, fetch them
+% from \CTAN{} \cite{CTAN} if your \TeX{} distributor does not provide
+% them. The ones used are: |expl3|, |hyperref|, |ifthen|,
+% |fancyvrb|, |newfile|, |rotating|, |babel|, |kvoptions|.
% \end{spelchunk}
%
% \subsection{The \spelpl{} speech generator}
@@ -576,9 +719,9 @@
% \end{spelchunk}
%
% \begin{spelchunk}
-% The only thing to do is to install the
-% \spelwizardmodule~module. You can do this with the perl pacakge
-% manager for your interpreter.
+% The only thing to do is to install the |SpeL::Wizard|
+% module. You can do this with the perl pacakge manager for your
+% interpreter.
% \end{spelchunk}
%
% \begin{spelchunk}
@@ -588,8 +731,8 @@
%
% \begin{spelchunk}
% On \GNU/Linux and MAC: |$ cpanm SpeL::Wizard|\\
-% When using Strawberry perl: |$ cpan SpeL::Wizard|\\
-% When using ActiveState perl: |$ ppm install SpeL-Wizard|
+% On Strawberry perl: |$ cpan SpeL::Wizard|\\
+% On ActiveState perl: |$ ppm install SpeL-Wizard|
% \end{spelchunk}
%
% \begin{spelchunk}
@@ -600,7 +743,7 @@
% \subsubsection{The configuration file}
% \begin{spelchunk}
% Finally, you need to provide \spelpl{} with an appropriate
-% config-file that sets up the text-to-speech conversion.
+% config-file, named |tts.conf| that sets up the text-to-speech conversion.
% Below you can find a setup for Festival \cite{FESTIVAL}:
% \begin{Verbatim}
% [engine]
@@ -615,6 +758,21 @@
% english=en1_mbrola
% \end{Verbatim}
% \end{spelchunk}
+%
+% \begin{spelchunk}
+% And additionally, for the Microsoft users a setup for Balabolka \cite{BALABOLKA}:
+% \begin{Verbatim}
+% [engine]
+% tts=balabolka
+%
+% [languagetags]
+% english=en-us
+%
+% [voices]
+% english=Zira
+% \end{Verbatim}
+% \end{spelchunk}
+%
% \begin{spelchunk}
% The tts configuration parameter defines the speech engine to use.
% The languagetags section defines how the babel languages are mapped to
@@ -630,20 +788,28 @@
% \end{Verbatim}
% \end{spelchunk}
% \begin{spelchunk}
+% If that variable is not set, the script will look in a subdirectory
+% |.spel_wizard| of your home-folder (or |%userprofile%| in
+% MS-Windows), or it will take the default that came with the
+% |SpeL::Wizard| module.
+% \end{spelchunk}
+%
+% \begin{spelchunk}
% Be aware that you need to install your text-to-speech tool yourself
-% according to the documentation provided by the tool provider. In
+% according to the documentation provided by the tool provider.
+% In addition, make sure it the executable is in your search path. In
% case you are using an online text-to-speech service provider you
% will need to get an account on their cloud platform and setup
% credentials and whatever is needed to get going. Providing
-% assistance for this is beyond the aim of this manual.%
+% assistance for this is beyond the aim of this manual.
% \end{spelchunk}
%
% \subsection{The PDF viewer}
%
% \begin{spelchunk}
% You need to make sure you have a PDF-viewer that supports links
-% containing 'run:' tags. E.g., xpdf does not \cite{XPDF}, evince
-% complains about security risks \cite{EVINCE}, but okular
+% containing 'run' tags. E.g., xpdf \cite{XPDF} does not, evince
+% \cite{EVINCE} complains about security risks, but okular
% \cite{OKULAR} and Adobe Reader \cite{ADOBEREADER} do. So does
% PDF-XChange Viewer \cite{PDFXCHANGE}.
% \end{spelchunk}
@@ -652,13 +818,16 @@
% \begin{spelchunk}
% When clicking a \spelatex-enabled item in your PDF-file, your media
-% player is started to play the |.ogg| or |.m3u|-file. On \GNU/Linux
-% most media players work fine (SoX, totem, vlc, \ldots).\\
-% On windows, I'd recommend using vlc. It works out of the box.
+% player is started to play the |.ogg| or |.m3u|-file. On GNU/Linux
+% most media players work fine (SoX, totem, vlc, \ldots).
+% \end{spelchunk}
+%
+% \begin{spelchunk}
+% On windows, we recommend using vlc. It works out of the box.
% When usign the stock Windows Media Player, you will need to add
% every folder that contains a PDF you'd like to have read, to your
% Media Player library. Search the internet to find instructions on
-% that and be prepared: in line with Microsoft standard practice it
+% that and be prepared: in line with Microsoft's standard practice it
% is well hidden in the interface.
% \end{spelchunk}
%
@@ -691,7 +860,7 @@
% required macros.
% \end{spelchunk}
%
-% \subsubsection{Treating the implicit spelchunks}
+% \subsubsection{Treat the implicit spelchunks}
% \begin{spelchunk}
% The texts of chapter, (sub)section titles, a.s.o. will be formatted
% automatically such that they are hyperlinked to the appropriate
@@ -710,7 +879,7 @@
% \begin{spelchunk}
% Example:
% \begin{Verbatim}
-% I like
+% We like
% \begin{itemize}
% \spelitem{apples,}
% \spelitem{pears, and}
@@ -732,12 +901,15 @@
% boilerplate work.
% \end{spelchunk}
%
-% \subsubsection{Treating the explicit spelchunks}
+% \subsubsection{Treat the explicit spelchunks}
%
% \begin{spelchunk}
% \DescribeEnv{spelchunk}
% Use this environment to embed the chunks of text in that you want
-% to generate audio for.
+% to generate audio for. In case the content is an equation, a
+% figure or a table, we recommend specifying |arealink| as the
+% optional argument to the |spelchunk| environment. It makes the
+% entire equation an active hyperlink.
% \end{spelchunk}
%
% \begin{spelchunk}
@@ -748,10 +920,12 @@
% \begin{Verbatim}
% \begin{spelchunk}
% An orderinary paragraph must be embedded in this environment.
-% The same holds for equations!
+% The same holds for equations! However, then we recommend using
+% the |arealink| option, as that makes the full area of the
+% equation clickable and avoids an empty white line before the
+% equation.
% \end{spelchunk}
-%
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{align}
% E &= m c^2\\
% e^{j\pi} &= -1
@@ -760,7 +934,7 @@
% \end{Verbatim}
%
%
-% \subsubsection{Manually providing text to read when needed}
+% \subsubsection{Manually provide text to read when needed}
% \begin{spelchunk}
% \DescribeEnv{spelchunkad}
% If you want a different text to be used for the previous
@@ -778,7 +952,7 @@
%
% \begin{spelchunk}
% Example:\\
-% {\footnotesize (note: the example below is not \spelatex{}-enabled because it also
+% {\footnotesize (note: the example below is not \spelatex{}-enabled because it
% generates internal package problems)}
% \end{spelchunk}
% \begin{Verbatim}
@@ -802,7 +976,7 @@
% \begin{spelchunk}
% Example:\\
% {\footnotesize (note: the example below is not \spelatex{}-enabled because it
-% generates internal package problems also)}
+% generates internal package problems)}
% \end{spelchunk}
% \begin{Verbatim}
% \begin{spelchunk}
@@ -874,9 +1048,9 @@
% \begin{spelchunk}
% This allows easy specification of an illustration as:
% \begin{Verbatim}
-% \begin{proof}[Illustration]{solving a quadratic equation}
-% blabla
-% \end{proof}
+% \begin{proof}[Illustration]{solving a quadratic equation}
+% blabla
+% \end{proof}
% \end{Verbatim}
% \end{spelchunk}
% \begin{spelchunk}
@@ -943,15 +1117,17 @@
% This macro typesets an enumeration set and makes sure \spelpl{}
% can read it properly.
% \end{spelchunk}
+% \begin{spelchunk}
% \begin{Verbatim}
% \begin{equation}
% P = \setenum{ 2, 3, 5, 7, 11, 13, \ldots }
% \end{equation}
% \end{Verbatim}
+% \end{spelchunk}
%
% \DescribeMacro{\setdesc}
% \begin{spelchunk}
-% This macro typesets a descriptive set and makes sure \spelpl{}
+% This macro typesets an enumeration set and makes sure \spelpl{}
% can read it properly.
% \end{spelchunk}
% \begin{spelchunk}
@@ -1043,8 +1219,7 @@
% Consider the following simple definition of a polynomial function and
% check its spoken version by clicking on it.
% \end{spelchunk}
-%
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 23
% \end{equation}
@@ -1066,7 +1241,7 @@
% equal to $\tan\alpha = -\frac{t}{2}$, the equation of the
% reflected ray is given by
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \[
% y-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
% \]
@@ -1079,9 +1254,9 @@
% voorleesstem de geselecteerde taal zal volgen.
% \end{spelchunk}
%
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \[
-% y-9+\frac{t^2}{4} = -(x-t) \cdot \frac{4t}{4-t^2}
+% y-9+\frac{t^2}{4} = -\frac{4t}{4-t^2} \cdot (x-t)
% \]
% \end{spelchunk}
@@ -1113,7 +1288,7 @@
% \newblock \url{http://www.cpan.org}.
% \newblock online, accessed in August 2021.
%
-% \end{thebibliography}{99}
+% \end{thebibliography}
%
% \end{document}
% \end{VerbatimOut}
@@ -1134,8 +1309,7 @@
% \end{spelchunk}
%
% \subsection{Numbers}
-%
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{align}
% \pi\\
% -31415\\
@@ -1149,7 +1323,7 @@
%
% \subsection{Fractions}
% \subsubsection{A fraction only containg numbers}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{align}
% x &= - \frac{1}{2} \\
% y &= - \sqrt{\frac{\pi}{2}}
@@ -1157,7 +1331,7 @@
% \end{spelchunk}
%
% \subsubsection{A fraction with a little more under the hood}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{align}
% u &= - \frac{x^2+35}{\sqrt{12}} \\
% v &= - \frac{\sqrt{\frac{\pi}{2}}}{-3x^2+3}
@@ -1166,8 +1340,8 @@
%
%
% \subsection{Simple expressions}
-% \subsubsection{A polynomial function}
-% \begin{spelchunk}
+% \subsubsection{A polynomial function}%
+% \begin{spelchunk}[arealink]
% \begin{equation}
% f(x) = x^{5}- x^4 + 7 x^3 + 3 x^2 - 8 x + 23
% \end{equation}
@@ -1177,7 +1351,7 @@
% \begin{spelchunk}
% Here's de Moivre's formula:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% \left(\cos x+j\sin x\right)^n=\cos(nx)+j\sin(nx)
% \end{equation}
@@ -1186,7 +1360,7 @@
% \begin{spelchunk}
% Euler's relationship:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{equation}
% e^{j \phi} = \cos \phi + j \sin \phi
% \end{equation}
@@ -1214,7 +1388,7 @@
% \texttt{\textbackslash{}setenum} and
% \texttt{\textbackslash{}setdesc}:
% \end{spelchunk}
-% \begin{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{align}
% P &= \setenum{ 2, 3, 5, 7, 11, 13, \ldots }\\
% P &= \setdesc{ n \in N \mid n \text{~is prime}}
@@ -1224,6 +1398,8 @@
% \subsection{Matrices}
% \begin{spelchunk}
% How about some linear algebra?
+% \end{spelchunk}
+% \begin{spelchunk}[arealink]
% \begin{align}
% \begin{bmatrix}
% 3 & 4 \\
@@ -1372,7 +1548,7 @@
% \section{Implementation}
% \begin{spelchunk}
% To ease the implementation work and because raw \LaTeX{} code is
-% difficult to read on itself, I took the liberty of not providing
+% difficult to read on itself, We took the liberty of not providing
% this section with speech chunks (except for this introduction
% text).
% \end{spelchunk}
@@ -1425,6 +1601,8 @@
bookmarksopen=true,
urlcolor=black}
\RequirePackage{kvoptions}
+\RequirePackage{xkeyval}
+\RequirePackage{marginnote}
% \end{macrocode}
%
% \subsection{Options}
@@ -1633,9 +1811,6 @@
\spel@registerelement{author}
% \end{macrocode}
%
-% \subsubsection{Boxed material}
-% by redefining the makebox, mbox and usebox commands, we can create
-%
% \subsubsection{Table of contents}
% \begin{macrocode}
\ifspel@disabled\else
@@ -1748,7 +1923,7 @@
\setcounter{spel@chunk}{0}% need this because counter resetting fails
\spel@@sect{#1}{#2}{#3}{#4}{#5}{#6}[#7]{%
\href{run:\audiodir/\spel@@optpart\thesubparagraph.\spel@format}{#8}\hfill%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph.m3u}{\textcolor{black!50}{\triangleright}}}%
+ \href{run:\audiodir/\spel@@optpart\thesubparagraph.m3u}{\textcolor{black!25}{$\triangleright$}}}%
\def\spel@@label{\ifnum #2>\c@secnumdepth\else#1 \csname the#1\endcsname\fi}
\spel@idxwrite{\spel@@label}{\spel@@optpart\thesubparagraph}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph}{#8}%
@@ -1786,8 +1961,9 @@
\let\spel@@fntext\@footnotetext
\long\def\@footnotetext#1{%
\stepcounter{spel@footnote}%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@@fntext{%
- \href{run:\audiodir/footnote-\thespel@footnote.\spel@format}{#1}}
+ \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/footnote-\thespel@footnote.\spel@format}{\usebox\spel@mptbox}#1}%
\spel@idxwrite{footnote}{footnote-\thespel@footnote}%
\spel@chunkwrite{footnote-\thespel@footnote}{#1}%
}
@@ -1825,10 +2001,10 @@
% \begin{macrocode}
\def\spelitem@intone#1{%
\stepcounter{spel@chunk}%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1}%
- \item \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#1}
-}
+ \item \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#1}
% \end{macrocode}
% \end{macro}
%
@@ -1838,10 +2014,10 @@
% \begin{macrocode}
\def\spelitem@inttwo#1#2{%
\stepcounter{spel@chunk}%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
\spel@idxwrite{item}{\spel@@optpart\thesubparagraph-\thespel@chunk}%
\spel@chunkwrite{\spel@@optpart\thesubparagraph-\thespel@chunk}{#1 . #2}%
- \item[#1] \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{#2}
-}
+\item[#1] \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}#2}
% \end{macrocode}
% \end{macro}
%
@@ -1868,6 +2044,11 @@
% \begin{environment}{spelchunk}
% The |spelchunk| environment is used to define explicit speech chunks.
% \begin{macrocode}
+\newlength\spel@mptboxwidth
+\newsavebox\spel@mptbox
+\savebox\spel@mptbox{\textcolor{black!25}{$\qquad$}}
+\newif\ifspel@chunkarealink
+\define@key{spelchunk}{arealink}[]{\spel@chunkarealinktrue}
\ifspel@disabled\def\spelchunk{}\else
\def\spelchunk{%
\catcode`\^^M=\active%
@@ -1879,7 +2060,13 @@
\def\endspelchunk{%
\end{VerbatimOut}%
\catcode`\^^M=5\relax%
- \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}\leavevmode}%
+ \ifspel@chunkarealink%
+ \href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}}%
+ \else%
+ \settowidth\spel@mptboxwidth{\usebox\spel@mptbox}%
+ \hspace*{-\spel@mptboxwidth}\href{run:\audiodir/\spel@@optpart\thesubparagraph-\thespel@chunk.\spel@format}{\usebox\spel@mptbox}\input{./\chunkdir/\spel@@optpart\thesubparagraph-\thespel@chunk}%
+ \fi%
+ \spel@chunkarealinkfalse%
}%
\fi
% \end{macrocode}
@@ -1891,7 +2078,7 @@
% This is macro that deals with the optional arguments of the
% |spelchunk| envronment.
% \begin{macrocode}
-\def\spelchunk@opt[#1]{\fvset{#1}\spelchunk@int}
+\def\spelchunk@opt[#1]{\setkeys{spelchunk}{#1}\spelchunk@int}
% \end{macrocode}
% \end{macro}
%
@@ -1905,7 +2092,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{Provideing an explicit audiodescription for a spelchunk}
+% \subsubsection{Explicit spelchunks}
%
% \begin{environment}{spelchunkad}
% The |spelchunkad| environment is used to override a previous speech
@@ -2052,10 +2239,10 @@
% We immediately provide some standard constructs, which are to be
% ignored:
% \begin{macrocode}
-\spelmacad{spelatex}{spee-laytech}
+\spelmacad{spelatex}{spee-lay-tech}
\spelmacad{spelbox}{spel-box}
\spelmacad{spelpl}{spel wizzard dot pl}
-\spelmacad{LaTeX}{laytech}
+\spelmacad{LaTeX}{lay-tech}
\spelmacad{TeX}{tech}
\spelmacad{textsf}[1]{#1}
\spelmacad{texttt}[1]{#1}
@@ -2107,7 +2294,7 @@
\spelenvad{center}{}{}
% \end{macrocode}
%
-% \subsection{Implementing the extra math commands}
+% \subsection{Extra math commands}
%
% The commands are only loaded if the package option |extramath| is
% provided:
@@ -2145,35 +2332,71 @@
%</package>
% \end{macrocode}
% \fi
-
+%
+% \section{TODO}
+% \begin{spelchunk}[arealink]
+% As long as there are things on my todo list, We have a reason to
+% live.
+% \end{spelchunk}
+% \begin{itemize}
+% \spelitem{provide enable/disable switch to disable certain ranges in
+% text, e.g. the implementation range in this document}
+% \spelitem{enable bibliography and citation stuff}
+% \end{itemize}
%
% \bibliographystyle{alpha}
%
% \begin{thebibliography}{99}
%
-% \bibitem{EMACS}
-% The Emacs An extensible, customizable, free text editor --- and
-% more.
-% \newblock \url{https://www.gnu.org/software/emacs/}.
+% \bibitem{NVDA}
+% NVDA from NV Access, empowering lives through non-visual access to technology
+% \newblock \url{https://www.nvaccess.org}
+% \newblock online, accessed in June 2024.
+%
+% \bibitem{SPRINT}
+% SprintPlus, helping people with dyslexia
+% \newblock \url{https://www.sprintplus.be/en}
+% \newblock online, accessed in June 2024.
+%
+% \bibitem{ADOBEREADER}
+% Adobe Reader, a PDF reader from Adobe.
+% \newblock \url{https://get.adobe.com/}
% \newblock online, accessed in May 2024.
%
+% \bibitem{TAGPDF}
+% TagPDF - Tools for experimenting with tagging using pdfLaTeX and
+% LuaLaTeX.
+% \newblock \url{https://ctan.org/pkg/tagpdf}
+% \newblock online, accessed in June 2024.
+%
+% \bibitem{WINE}
+% Wine - Wine Is Not an Emulator - running windows applications on POSIX-compliant systems.
+% \newblock \url{https://www.winehq.org}
+% \newblock online, accessed in June 2024.
+%
% \bibitem{ORGMODE}
% Org Mode --- your life in plain text.
% \newblock \url{https://orgmode.org/}.
% \newblock online, accessed in May 2024.
%
+% \bibitem{EMACS}
+% The Emacs An extensible, customizable, free text editor --- and
+% more.
+% \newblock \url{https://www.gnu.org/software/emacs/}.
+% \newblock online, accessed in May 2024.
+%
% \bibitem{OXSPELATEX}
% Org Mode SpeLaTeX Exporter --- SpeLaTeX made easy.
% \newblock \url{https://www.melpa.org/#/ox-spelatex}
% \newblock (not yet online)
%
% \bibitem{SPEL}
-% SpeL --- Speech-enabled LaTeX.
+% SpeL --- Speech-enabled \LaTeX.
% \newblock \url{https://ctan.org/pkg/spel}
% \newblock online, accessed in June 2024.
%
% \bibitem{SPELWIZARD}
-% SpeL::Wizard --- Incantating LaTeX into natural lanuage
+% SpeL::Wizard --- Incantating \LaTeX{} into natural lanuage
% \newblock \url{https://metacpan.org/pod/SpeL::Wizard}
% \newblock online, accessed in June 2024.
%
@@ -2222,11 +2445,6 @@
% \newblock \url{https://okular.kde.org}.
% \newblock online, accessed in May 2024.
%
-% \bibitem{ADOBEREADER}
-% Adobe Reader, a PDF reader from Adobe.
-% \newblock \url{https://get.adobe.com/}
-% \newblock online, accessed in May 2024.
-%
% \bibitem{PDFXCHANGE}
% PDF XChange Viewer, a PDF reader from Tracker Software.
% \newblock \url{https://www.pdf-xchange.com/}
diff --git a/Master/texmf-dist/source/latex/subeqn/subeqn.dtx b/Master/texmf-dist/source/latex/subeqn/subeqn.dtx
index cc49b5f0b5a..b9ce8706822 100644
--- a/Master/texmf-dist/source/latex/subeqn/subeqn.dtx
+++ b/Master/texmf-dist/source/latex/subeqn/subeqn.dtx
@@ -1,48 +1,49 @@
% \iffalse meta-comment
%
-% Copyright 1994-2004 Johannes Braams. All rights reserved.
-%
+% Copyright 1999-2024 Johannes L. Braams. All rights reserved.
+%
% This file is part of the subeqn package.
% ----------------------------------------
-%
+%
% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
% This work has the LPPL maintenance status "maintained".
-%
+%
% The Current Maintainer of this work is Johannes Braams.
-%
-% The list of all files belonging to the subeqn package is
-% given in the file `manifest.txt'.
-%
+%
+% The list of all files belonging to the supertabular package is
+% given in the file `MANIFEST.
+%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{76}
+%
+% \CheckSum{84}
% \iffalse
-%% File: `subeqn.dtx'
-%% Copyright (C) 1999-2004
-%% Donald Arsenau (asnd at reg.triumf.ca),
-%% Johannes Braams (TeXniek at braams.cistron.nl)
-%%
+% Copyright (C) 1999-2024
+% Donald Arsenau at reg.triumf.ca,
+% Johannes Braams texniek at texniek.nl
+%
%<*dtx>
\ProvidesFile{subeqn.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}[1998/06/01]
%<package>\ProvidesPackage{subeqn}
-%<sample>\ProvidesFile{subeqn.tex}
+%<sample>\ProvidesFile{subeqn-sample.tex}
%<driver>\ProvidesFile{subeqn.drv}
%\ProvidesFile{subeqn.dtx}
- [2004/04/15 v2.0b subnumbering of equations]
+ [2024/07/21 v2.0c subnumbering of equations]
%<*driver>
\documentclass{ltxdoc}
\begin{document}
+\pagestyle{myheadings}
\providecommand{\Lenv}[1]{\textsf{#1}}
\providecommand{\Lopt}[1]{\textsf{#1}}
\providecommand{\pkg}[1]{\texttt{#1}}
@@ -60,6 +61,10 @@
% \date{\filedate}
% \maketitle
%
+% \markboth
+% {subeqn package version \fileversion\space as of \filedate}
+% {subeqn package version \fileversion\space as of \filedate}
+%
% \section{Introduction}
%
% Sometimes it is necessary to be able to refer to subexpressions
@@ -165,7 +170,7 @@
\global\c@equation\z@
}{%
% \end{macrocode}
-% When the environment is finished we restore the value ot the
+% When the environment is finished we restore the value of the
% \texttt{equation} counter.
% \begin{macrocode}
\global\c@equation\c@mainequation
@@ -220,7 +225,14 @@
\usepackage{subeqn}
\begin{document}
-This is an example ot the use of the \texttt{subeqations} package.
+\title{Sample sub-equations}
+\author{Johannes L. Braams}
+\date{\today}
+\maketitle
+
+\noindent
+This is an example of the use of the \texttt{subeqations}
+package. First we have a normal \textsf{equation} environment.
\begin{equation}
\label{a}
a^2 + b^2 = c^2
@@ -247,6 +259,7 @@ Now we start sub-numbering.
and~\ref{c2}.
\end{subequations}
+\noindent
Now lets start a \textsf{subeqnarray} environment.
\begin{subeqnarray}
\label{d}
diff --git a/Master/texmf-dist/source/latex/subeqn/subeqn.ins b/Master/texmf-dist/source/latex/subeqn/subeqn.ins
index e9e8689856d..b3e295f28c4 100644
--- a/Master/texmf-dist/source/latex/subeqn/subeqn.ins
+++ b/Master/texmf-dist/source/latex/subeqn/subeqn.ins
@@ -3,50 +3,41 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 1989-2004 Johannes L. Braams. All rights reserved.
-%%
-%% This file is part of the subeqn package.
-%% ----------------------------------------
-%%
-%% It 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 version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% The Current Maintainer of this work is Johannes Braams.
-%%
-%% The list of all files belonging to the subeqn package is
-%% given in the file `manifest.txt.
+%%
+%% This file is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
-%% The list of derived (unpacked) files belonging to the distribution
-%% and covered by LPPL is defined by the unpacking scripts (with
-%% extension .ins) which are part of the distribution.
+%% IMPORTANT NOTICE:
+%%
+%% Copyright (C) 1999-2024 Johannes L. Braams. All rights reserved.
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1.3c of the License, or any later version.
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2004/04/15}
\def\batchfile{subeqn.ins}
\input docstrip.tex
+\keepsilent
\preamble
+This is a generated file.
-Copyright (C) 1999-2004 Johannes Braams. All rights reserved.
+Copyright (C) 1999-2024 Johannes Braams. All rights reserved.
This file was generated from file(s) of the subeqn package.
-----------------------------------------------------------
It may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3с
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2003/12/01 or later.
+and version 1.3с or later is part of all distributions of LaTeX
+version 2008 or later.
This work has the LPPL maintenance status "maintained".
@@ -57,7 +48,7 @@ subeqn package. You may however distribute the subeqn package
without such generated files.
The list of all files belonging to the subeqn package is
-given in the file `manifest.txt.
+given in the file `MANIFEST'.
The list of derived (unpacked) files belonging to the distribution
and covered by LPPL is defined by the unpacking scripts (with
@@ -70,7 +61,7 @@ extension .ins) which are part of the distribution.
% The sample file
-\generateFile{subeqn.tex}{t}{\from{subeqn.dtx}{sample}}
+\generateFile{subeqn-sample.tex}{t}{\from{subeqn.dtx}{sample}}
\Msg{***********************************************************}
\Msg{*}
diff --git a/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.dtx b/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.dtx
index 5b3555c3120..d460ccfca32 100644
--- a/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.dtx
+++ b/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.dtx
@@ -1,43 +1,40 @@
% \iffalse meta-comment
%
-% Copyright 1994-2004 Johannes Braams. All rights reserved.
-%
+% Copyright 1998-2024 Johannes L. Braams. All rights reserved.
+%
% This file is part of the subeqnarray package.
% ---------------------------------------------
-%
+%
% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
% This work has the LPPL maintenance status "maintained".
-%
+%
% The Current Maintainer of this work is Johannes Braams.
-%
-% The list of all files belonging to the subeqnarray package is
-% given in the file `manifest.txt'.
-%
+%
+% The list of all files belonging to the supertabular package is
+% given in the file `MANIFEST'.
+%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{259}
-%\iffalse
+%
+% \CheckSum{264}
+%
+% \iffalse
%
% Subeqnarray package to use with LaTeX2e
%
-%% Copyright (C) 1988--2004 by Johannes Braams,
-%% all rights resserved
%%
%% Error reports please to: J. Braams
%% TeXniek
-%% Kooienswater 62
-%% 2715 AJ Zoetermeer
-%% The Netherlands
-%% Email: texniek at braams.cistron.nl
+%% Email: texniek at texniek.nl
%
% \section{Producing the documentation}
%
@@ -48,10 +45,10 @@
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}[1998/06/01]
%<package>\ProvidesPackage{subeqnarray}
-%<sample>\ProvidesFile{subeqnarray.tex}
+%<sample>\ProvidesFile{subeqnarray-sample.tex}
%<driver>\ProvidesFile{subeqnarray.drv}
%\ProvidesFile{subeqnarray.dtx}
- [2004/04/15 v2.1c subeqnarray package]
+ [2024/07/20 v2.1e subeqnarray package]
%<*driver>
\documentclass{ltxdoc}
@@ -82,10 +79,8 @@
%
% \author{Johannes Braams\\
% \TeX niek\\
-% Kersengaarde 33\\
-% 2723 BP Zoetermeer\\
% The Netherlands\\
-% Internet: \texttt{TeXniek at braams.cistron.nl}}
+% Internet: \texttt{texniek at texniek.nl}}
%
% \date{\filedate}
%
@@ -114,8 +109,8 @@
% \changes{2.0}{1993/11/02}{Added support for the leqno option}
% \changes{2.0}{1993/11/02}{Added support for the fleqn option}
% \changes{2.1}{1994/02/09}{Upgrade for LaTeX2e}
-% \changes{2.1b}{1999/03/03}{Changed licensing remarks to use LPPL}
-% \changes{2.1c}{2004/04/15}{Updated address information}
+% \changes{v2.1b}{1999/03/03}{Changed licensing remarks to use LPPL}
+% \changes{v2.1e}{2024/07/20}{Updated contact info}
%
% \section{Initial Code}
%
@@ -129,8 +124,8 @@
% \end{macro}
%
% \begin{macro}{\thesubequation}
-% The representation o the counter \texttt{subequation} includes
-% the \texttt{equation} counter
+% The representation of the counter \texttt{subequation} includes
+% the \texttt{equation} counter.
% \begin{macrocode}
\def\thesubequation{\theequation\alph{subequation}}
% \end{macrocode}
@@ -197,7 +192,7 @@
\ExecuteOptions{reqno,deqn}
% \end{macrocode}
%
-% Now see if the use specified any options.
+% Now see if the user specified any options.
% \begin{macrocode}
\ProcessOptions
% \end{macrocode}
@@ -206,9 +201,9 @@
%
% \begin{macro}{\slabel}
% A new label command to refer to subequations. It works
-% like the |\label| command and was taken from \texttt{latex.tex}.
+% like the |\label| command and was taken from \texttt{latex.ltx}.
%
-% |\slabel{FOO}| writes the following on file |\@auxout|
+% |\slabel{FOO}| writes the following on file |\@auxout|:
%
% |\newlabel{FOO}{{eval(\@currentlabel)}{eval(\thepage)}}|
%
@@ -285,7 +280,7 @@
% \end{macro}
%
% \begin{macro}{\@@subeqncr}
-% Ceck the number of columns, and insert extra |&| if needed. If
+% Check the number of columns, and insert extra |&| if needed. If
% there appear to be more than 3 columns an error is signalled.
% \begin{macrocode}
\def\@@subeqncr{\let\@tempa\relax
@@ -314,7 +309,6 @@
% \begin{macrocode}
\let\@ssubeqncr\@subeqncr
%</package>
-%<*sample>
% \end{macrocode}
% \end{macro}
%
@@ -328,6 +322,11 @@
\documentclass[fleqn]{article}
\usepackage{subeqnarray}
\begin{document}
+\title{Sample subeqnarray}
+\author{Johannes L. Braams}
+\date{\today}
+\maketitle
+
This document shows an example of the use of the \emph{subeqnarray}
environment. Here is one:
\begin{subeqnarray}
@@ -360,20 +359,4 @@ These are equations~\ref{eq10},~\ref{eq11} and~\ref{eq12}.
%
% \Finale
\endinput
-%
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-%%
+% \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.ins b/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.ins
index efa2d4da606..f28eb4717a2 100644
--- a/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.ins
+++ b/Master/texmf-dist/source/latex/subeqnarray/subeqnarray.ins
@@ -1,53 +1,49 @@
-%%
+%
%% 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 1989-2004 Johannes L. Braams. All rights reserved.
-%%
-%% This file is part of the subeqnarray package.
-%% ---------------------------------------------
-%%
+%% Copyright (C) 1999-2024 Johannes L. Braams. All rights reserved.
+%%
+%% This file is part of the eqnarray distribution.
+%% -----------------------------------------------
+%%
%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
+%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 2003/12/01 or later.
-%%
-%% This work has the LPPL maintenance status "maintained".
-%%
-%% The Current Maintainer of this work is Johannes Braams.
-%%
-%% The list of all files belonging to the subeqnarray package is
-%% given in the file `manifest.txt.
-%%
-%% The list of derived (unpacked) files belonging to the distribution
-%% and covered by LPPL is defined by the unpacking scripts (with
-%% extension .ins) which are part of the distribution.
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
%%
%% --------------- start of docstrip commands ------------------
%%
-% ignored commands
-\def\filedate{2004/04/15}
-\def\batchfile{subeqnarray.ins}
+
\input docstrip.tex
\preamble
-Copyright (C) 1999-2004 Johannes Braams. All rights reserved.
+Copyright (C) 1999-2024 Johannes Braams. All rights reserved.
This file was generated from file(s) of the subeqnarray package.
----------------------------------------------------------------
It may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
+conditions of the LaTeX Project Public License, either version 1.3c
of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2003/12/01 or later.
+and version 1.3c or later is part of all distributions of LaTeX
+version 2008 or later.
This work has the LPPL maintenance status "maintained".
@@ -71,7 +67,7 @@ extension .ins) which are part of the distribution.
% The sample file
-\generateFile{subeqnarray.tex}{t}{\from{subeqnarray.dtx}{sample}}
+\generateFile{subeqnarray-sample.tex}{t}{\from{subeqnarray.dtx}{sample}}
\Msg{***********************************************************}
\Msg{*}
@@ -89,4 +85,4 @@ extension .ins) which are part of the distribution.
\Msg{* Happy TeXing}
\Msg{***********************************************************}
-\endinput
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/supertabular/supertabular.dtx b/Master/texmf-dist/source/latex/supertabular/supertabular.dtx
index be31a2d113d..6bde17bbfa6 100644
--- a/Master/texmf-dist/source/latex/supertabular/supertabular.dtx
+++ b/Master/texmf-dist/source/latex/supertabular/supertabular.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1989-2020 Johannes L. Braams. All rights reserved.
+% Copyright 1989-2021 Johannes L. Braams. All rights reserved.
%
% This file is part of the supertabular package.
% ---------------------------------------------
@@ -25,14 +25,13 @@
% extension .ins) which are part of the distribution.
% \fi
%
-% \CheckSum{1132}
+% \CheckSum{1188}
% \iffalse
%% Sourcefile `supertabular.dtx'.
%%
%% Copyright (C) 1988 by Theo Jurriens
-%% Copyright (C) 1990-2020 by Johannes Braams texniek at braams.xs4all.nl
-%% Kersengaarde 33
-%% 2723 BP Zoetermeer NL
+%% Copyright (C) 1990-2024 by Johannes Braams texniek at texniek.nl
+%% The Netherlands
%% all rights reserved.
%%
%%
@@ -43,11 +42,11 @@
%<package>\ProvidesPackage{supertabular}
%<driver>\ProvidesFile{supertabular.drv}
%\ProvidesFile{supertabular.dtx}
- [2020/02/02 v4.1g the supertabular environment]
+ [2024/07/20 v4.2c the supertabular environment]
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage[debugshow]{supertabular}
+\usepackage[debugshow,calculate]{supertabular}
\newcommand{\tbsp}{\rule{0pt}{18pt}}
\begin{document}
\providecommand{\Lenv}[1]{\textsf{#1}}
@@ -59,17 +58,19 @@
%</driver>
% \fi
%
-% \changes{v4.0a}{1996/11/28}{Cleanup of the code, now a \file{.dtx}
-% source file}
-% \changes{v4.0c}{1997/02/20}{Replace \cs{tableformat} by
-% \cs{ST@tableformat} to prevent a clash with the \pkg{KOMA}
-% pacakage}
-% \changes{v4.0f}{1997/04/10}{Repaired a few typos in the
-% documentation}
-% \changes{v4.1a}{1997/09/18}{Repaired a number of typos and added
-% contributed mpsupertabular environemnts}
-% \changes{v4.1b}{1997/10/08}{Renamed \cs{@@tabularcr} to
-% \cs{org@tabularcr}}
+% \changes{v4.0a}{1996/11/28}{Cleanup of the code, now a \file{.dtx}
+% source file}
+% \changes{v4.0c}{1997/02/20}{Replace \cs{tableformat} by
+% \cs{ST@tableformat} to prevent a clash with the \pkg{KOMA}
+% pacakage}
+% \changes{v4.0f}{1997/04/10}{Repaired a few typos in the
+% documentation}
+% \changes{v4.1a}{1997/09/18}{Repaired a number of typos and added
+% contributed mpsupertabular environemnts}
+% \changes{v4.1b}{1997/10/08}{Renamed \cs{@@tabularcr} to
+% \cs{org@tabularcr}}
+% \changes{v4.2a}{2020-06-27}{renamed \cs{ST@lineht} to \cs{ST@rowht}}
+% \changes{v4.2c}{2024/07/20}{A few documentation changes}
%
% \GetFileInfo{supertabular.dtx}
% \title{The \texttt{supertabular} environment\thanks{This file
@@ -110,7 +111,13 @@
% and why \pkg{supertabular} decides to break the tabular
% environment in order to produce a new page.
% \item The option \textsf{debugshow} also adds information about
-% each line that is added to the tabular.
+% each row that is added to the tabular.
+% \item The option \textsf{estimate} (the default) has the package
+% use the old estimation-based algortihm to establish the height
+% of individual rows.
+% \item The option \textsf{calculate} has the package use the new
+% calculation-based algortihm to establish the height
+% of individual rows.
% \end{enumerate}
%
% Below is a description of the new commands and environments that
@@ -172,15 +179,15 @@
%
% \begin{itemize}
% \item When the material of a normal entry (not a p-arg) becomes
-% larger than the estimated |\ST@lineht|, overfull |\vbox|es
-% will be produced at all.
+% larger than the estimated |\ST@rowht|, overfull |\vbox|es
+% will be produced.
% \item When the last p-arg on a page gets more than 4 lines
% (probably even more than 3 lines) it will result in an overfull
% |\vbox|. Also some combinations of |\baselinestretch|
-% |\arraystretch| and a large font may lead to one line too much.
-% \item if accidentally the last line of the tabular produces a
+% |\arraystretch| and a large font may lead to one row too much.
+% \item if accidentally the last row of the tabular produces a
% newpage, on the next page the tabletail will be written
-% immediately after the tablehead. Depending on the contents this
+% immediately after the tablehead. Depending on the contents, this
% may result in an error message regarding misplaced |\noalign|.
%
% A quick but not very elegant solution: shrink the allowed height
@@ -431,6 +438,36 @@
\DeclareOption{errorshow}{\c@tracingst\z@}
\DeclareOption{pageshow}{\c@tracingst\thr@@}
\DeclareOption{debugshow}{\c@tracingst5\relax}
+% \end{macrocode}
+% In version 4.1g a new way of determining the height of the
+% average row was introduced. Instead of using an estimation, based
+% on the value of |\baselineskip| a computation was introduced,
+% based on the size of the |\strutbox|. The effect of this new
+% method was that the parial tabulars fill the page better, so less
+% \texttt{underfull vbox} message would appear. Unfortunately this
+% had a negative effect on existing documents (that don;t come out
+% like they used to) and especially when a very small font
+% (|\tiny| or |\scriptsize| was chosen for the tabular and the
+% cells contain subscripts or superscripts. It turned out that the
+% heigth and depth of a formula like $5^5_5$ exceeds the size of
+% |\strutbox|. The result is that the rows have more height (and/or
+% depth) thatn what the algorithm computed. Hence, when more rows
+% are added to the partial tabular than fit on the page. Especially
+% on the first part thisis a probem as the partial tabular becomes
+% too high and doesn't fit in the avialbale space. \TeX\ then
+% decides to move it to the next page, resulting in two
+% consecutive pages that have a lot of white space on them.
+% \changes{v4.2a}{2020-06-27}{Two new options to choose the
+% computation algorithhm}
+% \begin{macrocode}
+\DeclareOption{calculate}{\def\ST@calculate@rowht{\ST@compute@rowht}}
+\DeclareOption{estimate}{\def\ST@calculate@rowht{\ST@estimate@rowht}}
+%\def\ST@calculate@rowht{\ST@estimate@rowht}
+% \end{macrocode}
+% The default for the options is to only show errors and use the
+% old estmation algorithm (so as not to break old documents).
+% \begin{macrocode}
+\ExecuteOptions{errorshow,estimate}
\ProcessOptions
% \end{macrocode}
%
@@ -510,7 +547,7 @@
% yet be visible in the amount of space occupoed on the page
% sofar. Therefore we include the possibility to reduce the height
% of the first part of the supertabular. In order to this we need a
-% macro that indicates a aption has been put in front of the
+% macro that indicates a caption has been put in front of the
% table. We do this to reduce the risk that the first part of the
% table is too high after all and is pushed onto the next page due
% to an overfull |\vbox| condition.
@@ -523,7 +560,7 @@
% \begin{macro}{\ST@caption}
% This is a redefinition of LaTeX's |\@caption|, |\@makecaption| is
% called within a group so as not to return to |\normalsize|
-% globally. also a fix is made for the `feature' of the
+% globally. Also a fix is made for the `feature' of the
% |\@makecaption| of the document class \cls{article} and friends
% that a caption \textbf{always} gets a |\vskip 10pt| at the top
% and \textbf{none} at the bottom. If a user wants to precede his
@@ -554,14 +591,19 @@
% to \cs{@tabularcr}}
% \changes{v4.1b}{1997/10/08}{Not \cs{@tabularcr} but
% \cs{org@tabularcr}}
+% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal
+% macro \cs{@tablehead} needs to be empty as well.}
% \begin{macrocode}
\newcommand\tablehead[1]{%
- \gdef\@tablehead{%
- \noalign{%
- \global\let\@savcr=\\
- \global\let\\=\org@tabularcr}%
- #1%
- \noalign{\global\let\\=\@savcr}}}
+ \def\@ST@arg{#1}%
+ \ifx\@ST@arg\@empty\gdef\@tablehead{}\else
+ \gdef\@tablehead{%
+ \noalign{%
+ \global\let\@savcr=\\
+ \global\let\\=\org@tabularcr}%
+ #1%
+ \noalign{\global\let\\=\@savcr}}%
+ \fi}
\tablehead{}
% \end{macrocode}
% It's possible to specify a different tablehead for the first
@@ -571,17 +613,22 @@
% document.
% \changes{v4.1f}{2019/01/12}{\cs{\@table@first@head} needs the same
% definition as \cs{\@tablehead} (found by FMi)}
+% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal
+% macro \cs{@table@first@head} needs to be empty as well.}
% \begin{macrocode}
\newcommand\tablefirsthead[1]{%
- \gdef\@table@first@head{%
- \noalign{%
- \global\let\@savcr=\\
- \global\let\\=\org@tabularcr}%
- #1%
- \noalign{%
- \global\let\\=\@savcr
- \global\let\@table@first@head\undefined
- }}}
+ \def\@ST@arg{#1}%
+ \ifx\@ST@arg\@empty\gdef\@table@first@head{}\else
+ \gdef\@table@first@head{%
+ \noalign{%
+ \global\let\@savcr=\\
+ \global\let\\=\org@tabularcr}%
+ #1%
+ \noalign{%
+ \global\let\\=\@savcr
+ \global\let\@table@first@head\undefined
+ }}%
+ \fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -598,14 +645,19 @@
% to \cs{@tabularcr}}
% \changes{v4.1b}{1997/10/08}{Not \cs{@tabularcr} but
% \cs{org@tabularcr}}
+% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal
+% macro \cs{@tabletail} needs to be empty as well.}
% \begin{macrocode}
\newcommand\tabletail[1]{%
- \gdef\@tabletail{%
- \noalign{%
- \global\let\@savcr=\\
- \global\let\\=\org@tabularcr}%
- #1%
- \noalign{\global\let\\=\@savcr}}}
+ \def\@ST@arg{#1}%
+ \ifx\@ST@arg\@empty\gdef\@tabletail{}\else
+ \gdef\@tabletail{%
+ \noalign{%
+ \global\let\@savcr=\\
+ \global\let\\=\org@tabularcr}%
+ #1%
+ \noalign{\global\let\\=\@savcr}}%
+ \fi}
\tabletail{}
% \end{macrocode}
% It's possible to specify a different tabletail for the last
@@ -615,17 +667,22 @@
% document.
% \changes{v4.1f}{2019/01/12}{\cs{\@table@last@tail} needs the same
% definition as \cs{\@tabletail}}
+% \changes{v4.2b}{2021-02-14}{When the argument is empty the internal
+% macro \cs{@tabletail} needs to be empty as well.}
% \begin{macrocode}
\newcommand\tablelasttail[1]{%
- \gdef\@table@last@tail{%
- \noalign{%
- \global\let\@savcr=\\
- \global\let\\=\org@tabularcr}%
- #1%
- \noalign{%
- \global\let\\=\@savcr
- \global\let\@table@last@tail\undefined
- }}}
+ \def\@ST@arg{#1}%
+ \ifx\@ST@arg\@empty\gdef\@table@last@tail{}\else
+ \gdef\@table@last@tail{%
+ \noalign{%
+ \global\let\@savcr=\\
+ \global\let\\=\org@tabularcr}%
+ #1%
+ \noalign{%
+ \global\let\\=\@savcr
+ \global\let\@table@last@tail\undefined
+ }}%
+ \fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -660,7 +717,7 @@
%
% \begin{macro}{\ST@trace@cr}
% A variant of |\ST@trace| that can be called from within |\\| as
-% that command is looking for an optional argument will end up
+% that command is looking for an optional argument and will end up
% scanning the next line.
% \begin{macro}{\ST@save@lineno}
% \changes{v4.1f}{2019/01/18}{Added a macro to save the current input
@@ -752,25 +809,22 @@
% \changes{v4.0b}{1997/02/04}{Removed the use of \cs{ST@pboxcorr},
% correction seems to be no longer necessary}
%
-% \begin{macro}{\ST@lineht}
+% \begin{macro}{\ST@rowht}
% \begin{macro}{\ST@stretchht}
% \changes{v4.0g}{1997/04/12}{Dimension register added}
% \begin{macro}{\ST@prevht}
% \changes{v4.0g}{1997/04/12}{Dimension register added}
-% The estimated height of a normal line is stored in
-% |\ST@lineht|. The dimension register |\ST@stretchht| is used to
-% store the difference between the `normal' line height and the
-% line height when |\arraystretch| has a non-standard value. This
-% is used in the case where p-box entries are added to the
-% tabular. The dimension register |\ST@prevht| is use to store the
-% height of the previous line to use it as an estimate for the
-% height of the next line. This is needed for a better estimate of
+% The estimated height of a normal row is stored in
+% |\ST@rowht|. The dimension register |\ST@stretchht| was used to
+% store the difference between the `normal' row height and the
+% row height when |\arraystretch| has a non-standard value. This
+% was used in the case where p-box entries are added to the
+% tabular. The dimension register |\ST@prevht| is used to store the
+% height of the previous row, to use it as an estimate for the
+% height of the next row. This is needed for a better estimate of
% when to break the tabular.
-% \changes{v4.1g}{2020/02/02}{\cs{ST@stretchht} is no longer needed,
-% will be removed in a future release}
% \begin{macrocode}
-\newdimen\ST@lineht
-%\newdimen\ST@stretchht
+\newdimen\ST@rowht
\newdimen\ST@prevht
% \end{macrocode}
% \end{macro}
@@ -907,10 +961,12 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\ST@compute@lineht}
-% \changes{v4.1g}{2020/02/02}{New macro \cs{ST@compute@lineht} to
-% replacte \cs{estimate@lineht}}
-% The height of a line in an array environemnt can be computed as:
+% \begin{macro}{\ST@compute@rowht}
+% \changes{v4.1g}{2020/02/02}{New macro \cs{ST@compute@rowht} to
+% replace \cs{ST@estimate@rowht}}
+% \changes{v4.2a}{2020-06-27}{Make sure that \cs{ST@rowht} is large
+% enough to take subscripts and superscripts into account}
+% The height of a row in an array environemnt can be computed as:
% \begin{itemize}
% \item the height of the strutbox |\ht\strutbox| (plus
% |\extrarowheight| when the \pkg{array} package is loaded),
@@ -919,34 +975,60 @@
% by |\arraystretch|.
% \end{itemize}
% \begin{macrocode}
-\def\ST@compute@lineht{%
- \ST@lineht=\ht\strutbox
+\def\ST@compute@rowht{%
+% \end{macrocode}
+% Temporarily store a formula with superscript and subscript in a
+% box in order to be able to measure its height and depth.
+% \begin{macrocode}
+ \setbox\@tempboxa=\vbox{\@arrayparboxrestore $5^5_5$}
+% \end{macrocode}
+% Use the largest height of either |\@tempboxa| or |\strutbox|.
+% \begin{macrocode}
+ \ifnum\ht\@tempboxa>\ht\strutbox
+ \ST@rowht=\ht\@tempboxa
+ \else
+ \ST@rowht=\ht\strutbox
+ \fi
+% \end{macrocode}
+% If the \textsf{array} pacakge is used we need to add the
+% value of |\extrarowheight|.
+% \begin{macrocode}
\ifx\extrarowheight\undefined\else
- \advance \ST@lineht by \extrarowheight
+ \advance \ST@rowht by \extrarowheight
+ \fi
+% \end{macrocode}
+% Also use the largest depth of either |\@tempboxa| or |\strutbox|.
+% \begin{macrocode}
+ \ifnum\dp\@tempboxa>\dp\strutbox
+ \advance\ST@rowht \dp\@tempboxa
+ \else
+ \advance\ST@rowht \dp\strutbox
\fi
- \ST@lineht = \arraystretch\ST@lineht
- \advance\ST@lineht \arraystretch\dp\strutbox
- \ST@trace\tw@{Normal Line height: \the\ST@lineht}%
+% \end{macrocode}
+% And finally multiply by |\arraystretch|.
+% \begin{macrocode}
+ \ST@rowht = \arraystretch\ST@rowht
+% \end{macrocode}
+% \begin{macrocode}
+ \ST@trace\tw@{Normal Row height: \the\ST@rowht}%
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\estimate@lineht}
+% \begin{macro}{\ST@estimate@rowht}
% Estimates the height of normal line taking |\arraystretch| into
% account. Also computes the difference between a normal line and a
% `stretched' one.
% \changes{v4.0b}{1997/02/04}{Removed use of \cs{ST@pboxcorr}}
% \changes{v4.0g}{1997/04/12}{Added the computation of
% \cs{ST@stretchht}}
-% This macro will be removed in a future release.
+% \changes{v4.2a}{2020-06-27}{removed the computation of
+% \cs{ST@stretchht} as it is no longer used}
% \begin{macrocode}
-\def\estimate@lineht{%
- \ST@lineht=\arraystretch \baslineskp
- \global\advance\ST@lineht by 1\p@
- \ST@stretchht\ST@lineht\advance\ST@stretchht-\baslineskp
- \ifdim\ST@stretchht<\z@\ST@stretchht\z@\fi
- \ST@trace\tw@{Average line height: \the\ST@lineht}%
- \ST@trace\tw@{Stretched line height: \the\ST@stretchht}%
+\def\ST@estimate@rowht{%
+ \ST@rowht=\arraystretch \baslineskp
+ \global\advance\ST@rowht by 1\p@
+ \ST@trace\tw@{Average Row height: \the\ST@rowht}%
}
% \end{macrocode}
% \end{macro}
@@ -1071,23 +1153,23 @@
\ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxa
\fi
% \end{macrocode}
-% We add the average height of a line to this because when we
+% We add the average height of a row to this because when we
% decide to continue the tabular we need to have enough space left
-% for one line and the tail.
+% for one row \emph{and} the tail.
% \begin{macrocode}
- \advance\ST@tailht by \ST@lineht
+ \advance\ST@tailht by \ST@rowht
\ST@trace\tw@{Height of tail: \the\ST@tailht}%
\ST@trace\tw@{Maximum height of tabular: \the\ST@pageleft}%
\@tempdima\ST@headht
% \end{macrocode}
% \changes{v4.0b}{1997/02/04}{Base the decision whether to start on a
-% new page on the total of headheight, tailht and lineht}
+% new page on the total of headheight, tailht and rowht}
% Now we decide whether we can continue on the current page or
% whether we need to start on a new page. We assume that the
% minimum height of a tabular is the height of the head, the tail
-% and one line of data. If that doesn't fit a new page is started.
+% and one row of data. If that doesn't fit a new page is started.
% \begin{macrocode}
- \advance\@tempdima\ST@lineht
+ \advance\@tempdima\ST@rowht
\advance\@tempdima\ST@tailht
\ST@trace\tw@{Minimum height of tabular: \the\@tempdima}%
\ifnum\@tempdima>\ST@pageleft
@@ -1164,7 +1246,7 @@
\global\let\@oldcr=\\
% \end{macrocode}
% Save the current value of |\baselineskip|, as we need it in the
-% calculation of the average height of a line.
+% calculation of the average height of a row.
% \begin{macrocode}
\def\baslineskp{\baselineskip}%
% \end{macrocode}
@@ -1174,9 +1256,9 @@
\ifx\undefined\@classix
% \end{macrocode}
% Save old |\@tabularcr| and insert the definition of
+% |\ST@tabularcr|.
% \changes{v4.1c}{1997/11/07}{For standard \LaTeX\ we need to change
% \cs{@@startpbox}, \emph{not} \cs{@startpbox}}
-% |\ST@tabularcr|.
% \begin{macrocode}
\let\org@tabularcr\@tabularcr
\let\@tabularcr\ST@tabularcr
@@ -1210,20 +1292,20 @@
\fi
% \end{macrocode}
% The first part of a supertabular may be moved on to the next page
-% if it doesn't fit on the current page afterall. Subsequent parts
+% if it doesn't fit on the current page after all. Subsequent parts
% can not be moved; therefor we will have to switch the definition
-% of |\ST@skippart| around.
+% of |\ST@skippage| around.
% \changes{v4.0e}{1997/04/09}{Make sure that only the first part of a
% supertabular can be moved to the next page.}
% \begin{macrocode}
\let\ST@skippage\ST@skipfirstpart
% \end{macrocode}
-% Now we can estimate the average line height and the height of the
+% Now we can estimate the average row height and the height of the
% first page of the \Lenv{supertabular}.
% \changes{v4.0i}{1997/09/18}{Added \cs{noindent}}
-% \changes{v4.1g}{2020/02/02}{Now call \cs{ST@compute@lineht}}
+% \changes{v4.1g}{2020/02/02}{Now call \cs{ST@calculate@rowht}}
% \begin{macrocode}
- \ST@compute@lineht
+ \ST@calculate@rowht
\@calfirstpageht
\noindent
}
@@ -1544,20 +1626,20 @@
% \begin{macrocode}
\def\ST@cr{%
\noalign{%
- \ifnum\ST@pboxht<\ST@lineht
+ \ifnum\ST@pboxht<\ST@rowht
% \end{macrocode}
-% If there is a non-empty line, but an empty parbox, then
-% |\ST@pboxht| might be non-zero, but too small thereby breaking
-% the algorithm. Therefor we estimate the height of the line to be
-% |\ST@lineht| in this case.
+% If there is a non-empty row, but an empty parbox, then
+% |\ST@pboxht| might be non-zero, but too small, thereby breaking
+% the algorithm. Therefor we estimate the height of the row to be
+% |\ST@rowht| in this case.
% \begin{macrocode}
- \global\advance\ST@pageleft -\ST@lineht
+ \global\advance\ST@pageleft -\ST@rowht
% \end{macrocode}
% And we store that fact in |\ST@prevht|.
-% \changes{v4.0g}{1997/04/12}{store the height of the previous line in
+% \changes{v4.0g}{1997/04/12}{store the height of the previous row in
% \cs{ST@prevht}}
% \begin{macrocode}
- \global\ST@prevht\ST@lineht
+ \global\ST@prevht\ST@rowht
\else
% \end{macrocode}
% When the parbox was not empty we take into account its height
@@ -1605,11 +1687,11 @@
\else
% \end{macrocode}
% When there is not enough space left on the current page, we start
-% a new page. To compute the amount of space need we use the
-% height of the previous line (|\ST@prevht|) as an estimation of
-% the height of the next line. If we are processing a
+% a new page. To compute the amount of space needed we use the
+% height of the previous row (|\ST@prevht|) as an estimation of
+% the height of the next row. If we are processing a
% \Lenv{mpsupertabular} we need to take the height of the footnotes
-% into account.
+% into account as well.
% \changes{v4.0g}{1997/04/12}{Leave room for both \cs{ST@tailht}
% \emph{and} \cs{ST@prevht}}
% \changes{v4.1a}{1997/09/19}{Take care of space needed for
@@ -1659,10 +1741,19 @@
% \begin{macrocode}
\global\advance\ST@pageleft\pagetotal
% \end{macrocode}
-% Then we can set |\ST@pagesofar| to $0$ and start the new page.
+% Then we can set |\ST@pagesofar| to $0$...
% \begin{macrocode}
\global\ST@pagesofar\z@
- \newpage
+% \end{macrocode}
+% ... and start the new page, but in this special case we need to
+% trigger the output routine directly by issuing a |\penalty|
+% rather than calling |\newpage| as that macro effectively issues a
+% |\vskip-\maxdepth| which makes the first two rows of the tabular
+% overlap.
+% \changes{v4.2b}{2021-02-14}{Issue a \cs{penalty} instead of
+% \cs{newpage} to trigger the output routine.}
+% \begin{macrocode}
+ \penalty -\@M
% \end{macrocode}
%
% Finally we make sure that this macro can only be executed once
diff --git a/Master/texmf-dist/source/latex/synthslant/Makefile b/Master/texmf-dist/source/latex/synthslant/Makefile
index d8de419230a..8ef77a6982b 100644
--- a/Master/texmf-dist/source/latex/synthslant/Makefile
+++ b/Master/texmf-dist/source/latex/synthslant/Makefile
@@ -19,8 +19,9 @@ DVIPS := dvips
DVIPS_FLAGS := -d1 # debug \special{}
-LATEX := /usr/bin/env max_print_line=2147483647 pdflatex
-LATEX_FLAGS := -file-line-error -halt-on-error -interaction=nonstopmode
+LATEX_PROPER := pdflatex
+LATEX := /usr/bin/env max_print_line=2147483647 $(LATEX_PROPER)
+LATEX_FLAGS := -file-line-error -halt-on-error -interaction=nonstopmode -output-directory=.
LATEX_RERUN_TRIGGER := '^Package rerunfilecheck Warning: File [^ ]* has changed'
LATEX_WARNING := '^LaTeX (|[A-Za-z0-9_]* )Warning:'
@@ -33,18 +34,9 @@ METAPOST := mpost
METAPOST_FLAGS := -file-line-error -interaction=nonstopmode -tex=latex
-SPELLCHECK := aspell
-SPELLCHECK_FLAGS := \
- --add-tex-command='citenum p' --add-tex-command='code p' \
- --add-tex-command='Cref p' --add-tex-command='cref p' \
- --add-tex-command='cs p' \
- --add-tex-command='DescribeEnv p' --add-tex-command='DescribeMacro p' \
- --add-tex-command='marg p' --add-tex-command='meta p' \
- --add-tex-command='oarg p' \
- --lang=en_US --mode=tex
-
-
-SOURCE_FILES := LICENSE Makefile synthslant.dtx synthslant.ins
+PROJECT_NAME := synthslant
+SOURCE_FILES := LICENSE Makefile README.md synthslant.dtx synthslant.ins
+DOCUMENTATION_FILES := synthslant-gauge.pdf synthslant.pdf
@@ -57,7 +49,7 @@ sty: synthslant.sty
.PHONY: pdf
-pdf: doc gauge
+pdf: doc gauge test
.PHONY: doc
@@ -68,19 +60,42 @@ doc: synthslant.pdf
gauge: synthslant-gauge.pdf
-.PHONY: cpio
-cpio:
- cd ..; \
- echo $(addprefix synthslant/,$(SOURCE_FILES)) | \
- cpio -o | \
- gzip > "synthslant-$$(date +%Y-%m-%d).cpio.gz"
+.PHONY: test
+test: synthslant-minimal-test.pdf
+
+
+export TEMPORARY_DIRECTORY
+
+
+.PHONY: dist
+dist:
+ $(eval TEMPORARY_DIRECTORY := $(shell mktemp -d))
+ trap '$(RM) -r $(TEMPORARY_DIRECTORY); exit 1' HUP INT QUIT TERM; $(MAKE) __dist
+ $(RM) -r $(TEMPORARY_DIRECTORY)
+
+
+.PHONY: __dist
+__dist: LATEX_FLAGS += -interaction=batchmode
+__dist: $(DOCUMENTATION_FILES)
+ test -d '$(TEMPORARY_DIRECTORY)'
+ test -w '$(TEMPORARY_DIRECTORY)'
+ mkdir $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)
+ cp $(SOURCE_FILES) $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)
+ mkdir $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)/docs
+ cp $(DOCUMENTATION_FILES) $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)/docs
+ tar czf $(PROJECT_NAME).tar.gz -C $(TEMPORARY_DIRECTORY) $(PROJECT_NAME)
-.PHONY: tar
-tar:
- cd ..; \
- tar czf "synthslant-$$(date +%Y-%m-%d).tar.gz" \
- $(addprefix synthslant/,$(SOURCE_FILES))
+.PHONY: distcheck
+distcheck: LATEX_FLAGS += -interaction=batchmode
+distcheck: dist
+ $(eval TEMPORARY_DIRECTORY := $(shell mktemp -d))
+ test -d '$(TEMPORARY_DIRECTORY)'
+ test -w '$(TEMPORARY_DIRECTORY)'
+ tar xzf $(PROJECT_NAME).tar.gz -C $(TEMPORARY_DIRECTORY)
+ $(MAKE) --directory=$(TEMPORARY_DIRECTORY)/$(PROJECT_NAME) LATEX_FLAGS='$(LATEX_FLAGS)' all
+ $(RM) -r $(TEMPORARY_DIRECTORY)
+ @printf '\n\ndistcheck passed.\n'
.PHONY: clean
@@ -91,6 +106,7 @@ clean:
$(RM) mptextmp.* mpxerr.tex
$(RM) README README.html RELEASE-HOWTO RELEASE-HOWTO.html
$(RM) compare-with-the-gimp.eps compare-with-the-gimp.png
+ $(RM) $(PROJECT_NAME).tar.gz
.PHONY: mostlyclean
@@ -99,35 +115,27 @@ mostlyclean: clean
.PHONY: maintainer-clean
maintainer-clean: mostlyclean
- $(RM) ./*.base64 ./*.ist ./*.mp ./*.sty ./*.tex
+ $(RM) ./*.base64 ./*.gst ./*.ist ./*.mp ./*.sty ./*.tex
.PHONY: perf
perf: synthslant-gauge.tex synthslant.sty
- perf stat --repeat=10 -- $(LATEX) $(LATEX_FLAGS) -interaction batchmode -draftmode $<
+ perf stat --repeat=10 -- $(LATEX) $(LATEX_FLAGS) -interaction=batchmode -draftmode $<
.PHONY: tool-check
tool-check:
- @printf '*** LATEX = "%s"\n' '$(LATEX)'
- $(LATEX) --version
+ @printf '*** LATEX_PROPER = "%s"\n' '$(LATEX_PROPER)'
+ $(LATEX_PROPER) --version
+ @printf '\n\n*** BibTeX\n'
+ bibtex --version
@printf '\n\n*** MAKEINDEX = "%s"\n' '$(MAKEINDEX)'
- $(MAKEINDEX) < /dev/null
+ $(MAKEINDEX) < /dev/null
@printf '\n\n*** METAPOST = "%s"\n' '$(METAPOST)'
$(METAPOST) --version
@printf '\n*** BASE64 = "%s"\n' '$(BASE64)'
$(BASE64) --version
- @printf '\n\nTool check passed.\n'
-
-
-.PHONY: spell-check
-spell-check:
- @sed -e '\#<DISABLE-SPELL-CHECK/>#d' \
- -e '\#<DISABLE-SPELL-CHECK>#,\#</DISABLE-SPELL-CHECK>#d' < synthslant.dtx | \
- sed -e 's/^ *%%*//' | \
- sed -e 's/\\-//g' -e 's/|[^|]*|/ /g' | \
- $(SPELLCHECK) $(SPELLCHECK_FLAGS) list | \
- sort | uniq | fmt | sed -e 's/ / /g'
+ @printf '\n\ntool check passed.\n'
.PHONY: update-docs
@@ -142,8 +150,12 @@ all: Make everything there is to make. This is the .DEFAULT_GOAL.
clean: Remove some products.
-cpio: In the parent directory create a cpio(1) archive of the
- project source files whose name is time-stamped.
+dist: Create a tar file of the project source files and the PDF
+ documentation files. The archive is in the form and has a
+ name that CTAN prefers.
+
+distcheck: Create a tar file of the project source files, unpack it in
+ a different location and build all targets.
doc: Build "synthslant.pdf" the Syntslant documentation.
@@ -160,15 +172,22 @@ pdf: Build doc: and gauge:.
sty: Only extract "synthslant.sty" from "synthslant.dtx". This
operation requires LaTeX (-> $(LATEX)) and nothing else.
-tar: In the parent directory create a tar(1) file of the project
- source files whose name is time-stamped.
+test: Run some tests. Currently only compiles a minimal document
+ to check whether "synthslant.sty" contains all the necessary
+ \RequirePackage directives.
tool-check: Check whether some of the required tools to build the
project are available.
+update-docs: Copy the documentation files into the "docs"
+ sub-directory.
+
Selected Implicit Rules
-----------------------
+%: %.html
+ Convert HTML to plain text. Requires w3m(1).
+
%.dvi %.pdf: %.dtx
Run LaTeX or pdfLaTeX (-> $(LATEX)) on dtx source until a
fix-point is reached.
@@ -177,6 +196,9 @@ Selected Implicit Rules
Run LaTeX or pdfLaTeX (-> $(LATEX)) on tex file until a
fix-point is reached.
+%.html: %.md
+ Convert markdown to HTML. Requires markdown(1).
+
%.mx.pdf: %.dvi
Convert dvi to pdf via dvipdfmx (-> $(DVIPDFMX)).
@@ -187,9 +209,9 @@ Selected Implicit Rules
Some Explicit Rules
-------------------
README.html:
- Convert "README.md" to html. Requires markdown(1).
+ Convert "README.md" to html.
-README: Convert "README.html" to plain text. Requires w3m(1).
+README: Convert "README.html" to plain text.
endef
@@ -205,8 +227,8 @@ help:
define MAKE_INDEX_AND_GLOSSARY
sed -e '/@/d' < $*.idx > ,$*.idx; mv ,$*.idx $*.idx; \
-$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s synthslant.ist -t $*.ilg -o $*.ind $*.idx; \
-$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s gglo.ist -t $*.glg -o $*.gls $*.glo
+$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s $*.ist -t $*.ilg -o $*.ind $*.idx; \
+$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s $*.gst -t $*.glg -o $*.gls $*.glo
endef
define GREP_LATEX_WARNINGS
@@ -250,7 +272,13 @@ endef
%.mps: %.mp
- $(METAPOST) -s 'outputtemplate="%j.mps"' $(METAPOST_FLAGS) $<
+ $(METAPOST) -s 'outputtemplate="%j.mps"' $(METAPOST_FLAGS) $< || { \
+ printf '=== $*.log ===\n'; \
+ cat $*.log; \
+ printf '\n\n=== mpxerr.log ===\n'; \
+ cat mpxerr.log; \
+ false; \
+ } 1>&2
%.eps: %.png
@@ -265,7 +293,8 @@ endef
-synthslant.sty synthslant.ist synthslant-gauge.tex \
+synthslant.sty synthslant.ist \
+synthslant-gauge.tex synthslant-minimal-test.tex \
compare-with-the-gimp.png.base64 shear-transform.mp title.mp: \
synthslant.ins synthslant.dtx
$(LATEX) $(LATEX_FLAGS) $<
diff --git a/Master/texmf-dist/source/latex/synthslant/synthslant.dtx b/Master/texmf-dist/source/latex/synthslant/synthslant.dtx
index f5424cf7fa1..6c052c64a7f 100644
--- a/Master/texmf-dist/source/latex/synthslant/synthslant.dtx
+++ b/Master/texmf-dist/source/latex/synthslant/synthslant.dtx
@@ -3,11 +3,11 @@
% Copyright (C) 2024 by Ch. L. Spiel
%
% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3 of this
+% of the LaTeX Project Public License, either version 1.3c of this
% license or (at your option) any later version. The latest version
% of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
+% httpc://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% \fi
@@ -26,7 +26,6 @@
\PassOptionsToClass{a4paper}{article}
\PassOptionsToPackage{hyperfootnotes=false}{hyperref}
-\PassOptionsToPackage{charter, scale=1.06}{newtxmath}
\PassOptionsToPackage{dvipsnames}{xcolor}
\usepackage{amsmath}
@@ -52,6 +51,7 @@
\newcommand*{\textls}[2][]{#2}
\fi
\usepackage{needspace}
+\usepackage[section]{placeins}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage[slant=.18, negslant=-.16]{synthslant}
@@ -65,7 +65,7 @@
\usepackage[default, lining, proportional, regular, semibold]{sourceserifpro}
\usepackage[lining, proportional, regular, semibold]{sourcesanspro}
\usepackage[lining, regular]{sourcecodepro}
-\usepackage[xcharter]{newtxmath}
+\usepackage[scaled=1.08, uprightscript, xcharter]{newtxmath}
\setstretch{1.04166}% \baselineskip: 12.5pt
@@ -74,15 +74,15 @@
\newcommand*{\fontclan}{\expandafter\@get@fontclan\f@family\relax}
\makeatother
-\newcommand*{\proportionalliningfigures}{\fontfamily{\fontclan-LF}\selectfont}
-\newcommand*{\proportionaloldstylefigures}{\fontfamily{\fontclan-OsF}\selectfont}
-\newcommand*{\tabularliningfigures}{\fontfamily{\fontclan-TLF}\selectfont}
-\newcommand*{\tabularoldstylefigures}{\fontfamily{\fontclan-TOsF}\selectfont}
+\DeclareRobustCommand{\proportionalliningfigures}{\fontfamily{\fontclan-LF}\selectfont}
+\DeclareRobustCommand{\proportionaloldstylefigures}{\fontfamily{\fontclan-OsF}\selectfont}
+\DeclareRobustCommand{\tabularliningfigures}{\fontfamily{\fontclan-TLF}\selectfont}
+\DeclareRobustCommand{\tabularoldstylefigures}{\fontfamily{\fontclan-TOsF}\selectfont}
-\newcommand*{\textdenominator}[1]{{\fontfamily{\fontclan-Dnom}\selectfont #1}}
-\newcommand*{\textinferior}[1]{{\fontfamily{\fontclan-Inf}\selectfont #1}}
-\newcommand*{\textnumerator}[1]{{\fontfamily{\fontclan-Numr}\selectfont #1}}
-\newcommand*{\textsuperior}[1]{{\fontfamily{\fontclan-Sup}\selectfont #1}}
+\DeclareRobustCommand{\textdenominator}[1]{{\fontfamily{\fontclan-Dnom}\selectfont #1}}
+\DeclareRobustCommand{\textinferior}[1]{{\fontfamily{\fontclan-Inf}\selectfont #1}}
+\DeclareRobustCommand{\textnumerator}[1]{{\fontfamily{\fontclan-Numr}\selectfont #1}}
+\DeclareRobustCommand{\textsuperior}[1]{{\fontfamily{\fontclan-Sup}\selectfont #1}}
\newcommand*{\nativetextfraction}[2]
{\mbox{\textnumerator{#1}\textfractionsolidus\textdenominator{#2}}}
@@ -92,21 +92,23 @@
\newenvironment*{tabfigures}
{\edef\rmdefault{\fontclan-T\sourceserifpro@figurestyle}\rm\ignorespaces}
{\ignorespacesafterend}
-
-\newcommand*{\elseries}{\def\mdseries@rm{el}\def\mdseries@sf{el}\def\mdseries@tt{el}}
-\newcommand*{\textel}[1]{{\elseries\textmd{#1}}}
-\newcommand*{\lseries}{\def\mdseries@rm{l}\def\mdseries@sf{l}\def\mdseries@tt{l}}
-\newcommand*{\textl}[1]{{\lseries\textmd{#1}}}
-%%--\newcommand*{\mdseries}{\def\mdseries@rm{m}\def\mdseries@sf{m}\def\mdseries@tt{m}}
-%%--\newcommand*{\textmd}[1]{{\mdseries\textmd{#1}}}
-\newcommand*{\sbseries}{\def\bfseries@rm{sb}\def\bfseries@sf{sb}\def\bfseries@tt{sb}}
-\newcommand*{\textsb}[1]{{\sbseries\textbf{#1}}}
-\newcommand*{\bseries}{\def\bfseries@rm{b}\def\bfseries@sf{b}\def\bfseries@tt{b}}
-\newcommand*{\textb}[1]{{\bseries\textbf{#1}}}
-\newcommand*{\ebseries}{\def\bfseries@rm{k}\def\bfseries@sf{eb}\def\bfseries@tt{k}}
-\newcommand*{\texteb}[1]{{\ebseries\textbf{#1}}}
\makeatother
+\DeclareRobustCommand{\elseries}{\fontseries{el}\selectfont}
+\DeclareTextFontCommand{\textel}{\elseries}
+\DeclareRobustCommand{\lseries}{\fontseries{l}\selectfont}
+\DeclareTextFontCommand{\textl}{\lseries}
+%%--\DeclareRobustCommand{\mdseries}{\fontseries{m}\selectfont}
+%%--\DeclareTextFontCommand{\textmd}{\mdseries}
+\DeclareRobustCommand{\sbseries}{\fontseries{sb}\selectfont}
+\DeclareTextFontCommand{\textsb}{\sbseries}
+\DeclareRobustCommand{\bseries}{\fontseries{b}\selectfont}
+\DeclareTextFontCommand{\textb}{\bseries}
+\DeclareRobustCommand{\ebseries}{\fontseries{eb}\selectfont}
+\DeclareTextFontCommand{\texteb}{\ebseries}
+\DeclareRobustCommand{\ubseries}{\fontseries{k}\selectfont}
+\DeclareTextFontCommand{\textub}{\ubseries}
+
\usepackage{cleveref}
@@ -119,7 +121,7 @@
citecolor = blue,
colorlinks = true,
linkcolor = blue,
- linktocpage = false,
+ linktocpage = true,
pdfauthor={Dr. Christoph L. Spiel},
pdfcreationdate={\pdffiledate},
pdfkeywords={LaTeX, font, italic, oblique, slant, upright},
@@ -131,9 +133,94 @@
}
+\SetExtraKerning[context=drop-left-sidebearing, name=source-code-normal, unit=space]
+ {font={T1/SourceCodePro-LF/m/n/44, T1/SourceCodePro-TLF/m/n/44}}
+ {
+ 1={-150,},
+ 2={-120,},
+ 3={-120,},
+ 4={-40,},
+ A={-100,},
+ B={-170,}
+ }
+
+\newlength{\sectiontocindent}
+\newlength{\sectionnumberwidth}
+\newlength{\subsectiontocindent}
+\newlength{\subsectionnumberwidth}
+\newlength{\subsubsectiontocindent}
+\newlength{\subsubsectionnumberwidth}
+
+\setlength{\sectiontocindent}{0pt}
+\setlength{\sectionnumberwidth}{40pt}
+\setlength{\subsectiontocindent}{40pt}
+\setlength{\subsectionnumberwidth}{25pt}
+\setlength{\subsubsectiontocindent}{65pt}
+\setlength{\subsubsectionnumberwidth}{30pt}
+
\makeatletter
-\renewcommand*{\@dotsep}{10000} % suppress leaders
-\patchcmd{\@dottedtocline}{\normalfont}{\bfseries}{\relax}{\PatchingFailed}
+\renewcommand*{\l@section}[2]
+ {\ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
+ \setlength{\@tempdima}{\sectionnumberwidth}%
+ \begingroup
+ \def\numberline##1{\hb@xt@\@tempdima{%
+ \tt\lseries
+ \fontsize{44}{0}\selectfont
+ \microtypecontext{kerning=drop-left-sidebearing}%
+ \iffalse\raisebox{-30pt}[0pt][0pt]{\rule{0.1pt}{40pt}}\fi
+ \textcolor{customred3}{##1}%
+ \hfil}}%
+ \parindent \z@
+ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ \bfseries
+ \iffalse
+ \nobreak\hfil
+ \nobreak\hb@xt@\@pnumwidth{\hss #2\kern-\p@\kern\p@}%
+ \else
+ {\sffamily\large #1}\quad
+ {#2}\hfil\hbox{}
+ \fi
+ \par
+ \endgroup
+ \fi}
+
+\renewcommand*{\@dottedtocline}[5]
+ {\ifnum #1>\c@tocdepth
+ \else
+ \vskip \z@ \@plus.2\p@
+ \begingroup
+ \leftskip #2\relax
+ \rightskip \@tocrmarg
+ \parfillskip -\rightskip
+ \parindent #2\relax\@afterindenttrue
+ \interlinepenalty\@M
+ \leavevmode
+ \@tempdima #3\relax
+ \advance\leftskip \@tempdima
+ \null\nobreak
+ \hskip -\leftskip
+ {#4}\nobreak
+ \iffalse
+ \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
+ \nobreak\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5\kern-\p@\kern\p@}%
+ \else
+ \hbox{\quad\normalfont\bfseries #5}\nobreak\hfill\hbox{}%
+ \fi
+ \par
+ \endgroup
+ \fi}
+
+\renewcommand*{\l@subsection}{\@dottedtocline{2}{\subsectiontocindent}{\subsectionnumberwidth}}
+\renewcommand*{\l@subsubsection}{\@dottedtocline{3}{\subsubsectiontocindent}{\subsubsectionnumberwidth}}
+\newrobustcmd*{\tocsquashedsubsections}
+ {\def\l@subsection{\@dottedtocline{2}{0pt}{\subsubsectionnumberwidth}}%
+ \def\l@subsubsection{\@dottedtocline{3}{0pt}{\subsubsectionnumberwidth}}}
\makeatother
@@ -156,8 +243,10 @@
\newcommand*{\floatcaptionwidth}{.79\textwidth}
-\captionsetup[figure]{font=small, justification=centerlast, labelfont=sc, width=\floatcaptionwidth}
-\captionsetup[table]{font=small, justification=centerlast, labelfont=sc, width=\floatcaptionwidth}
+\captionsetup[figure]{font=small, justification=centerlast,
+ labelfont=sc, width=\floatcaptionwidth}
+\captionsetup[table]{font=small, justification=centerlast,
+ labelfont=sc, width=\floatcaptionwidth}
\newsavebox{\listlabelbox}
@@ -188,13 +277,15 @@
\fancypagestyle{pagenumberonly}{
+ \fancyhf{}
\fancyhead[L]{}
\fancyhead[R]{\thepage}
}
-\pagestyle{fancy}
-\fancyhf{}
-\fancyhead[L]{\rightmark}
-\fancyhead[R]{\textsf{\thepage}}
+\fancypagestyle{fancy}{
+ \fancyhf{}
+ \fancyhead[L]{\rightmark}
+ \fancyhead[R]{\thepage}
+}
\newcommand*{\resetfancyhead}
{\fancyhead[L]{\textsf{\textsc{\textls[20]{\nouppercase\rightmark}}}}}
@@ -236,12 +327,9 @@
\pretocmd{\DescribeMacro}{\needspace{25pt}}{\relax}{\PrependingFailed}
-\setcounter{IndexColumns}{2}
-
-
\setlength{\columnsep}{20pt}
\setlength{\skip\footins}{25pt}
-\setlength{\overfullrule}{3pt}
+\setlength{\overfullrule}{0pt}
@@ -273,15 +361,19 @@
\newcommand*{\citenum}[1]{\@nameuse{b@#1}}
\makeatother
-\def\code#1{\texttt{#1}}
+\renewcommand*{\code}[1]{\texttt{#1}}
+
+\newcommand*{\codelineindicator}{\mbox{\small$\mathscr{l}$}}
\newrobustcmd*{\command}[1]{\mbox{\textbf{#1}}}
\newcommand*{\degree}{{}^\circ}
+\newcommand*{\detoxindex}[1]{\index{\detokenize{#1}}}
+
\newcommand*{\doublequotes}[1]{\guillemetright\kern-.03333em #1\guillemetleft}
-\newcommand*{\dumpmacro}[1]{\texttt{\detokenize\expandafter{#1}}}
+\newcommand*{\dumpmacro}[1]{\texttt{\detokenize\expandafter{#1}\unskip}}
\newcommand*{\filesystem}[1]{\mbox{\textit{#1\/}}}
@@ -295,12 +387,48 @@
\renewcommand*{\fps@table}{htbp}
\makeatother
+\apptocmd{\GlossaryParms}
+ {\RaggedRight\normalsize}
+ {\relax}
+ {\AppendingFailed}
+
+\let\oldhdclindex=\hdclindex
+\renewcommand*{\hdclindex}[2]
+ {\ifstrequal{#2}{code}
+ {\oldhdclindex{#1}{codeidx}}
+ {\oldhdclindex{#1}{#2}}}
+
+\let\oldhdpindex=\hdpindex
+\renewcommand*{\hdpindex}[2]{\textbf{\oldhdpindex{#1}{#2}}}
+
\newcommand*{\hollowrectangle}[2]
{\setlength{\fboxrule}{.5pt}%
\setlength{\fboxsep}{0pt}%
\framebox{\rule{#1}{0pt}\rule{0pt}{#2}}}
\newcommand*{\hollowsquare}[1]{\hollowrectangle{#1}{#1}}
+\apptocmd{\IndexParms}
+ {\RaggedRight\small}
+ {\relax}
+ {\AppendingFailed}
+
+\makeatletter
+\ExplSyntaxOn
+\apptocmd{\index@prologue}
+ {\legacy_if:nTF {codeline@index}
+ {We\space prefix\space all\space references\space
+ to\space code\space lines\space with~\singlequotes{\codelineindicator}.}
+ {}}
+ {\relax}
+ {\AppendingFailed}
+
+\newcommand*{\linenumberdecoration}
+ {\legacy_if:nTF {codeline@index}
+ {\codelineindicator}
+ {}}
+\ExplSyntaxOff
+\makeatother
+
\newcommand*{\logmacro}[1]
{\ifdef{#1}
{\message{^^JDump of macro \string#1 follows.^^J}
@@ -314,6 +442,24 @@
\begin{fullwidth}}
{\end{fullwidth}}
+
+\let\originalmulticols=\multicols
+\let\endoriginalmulticols=\endmulticols
+\RenewDocumentEnvironment{multicols}{m o o}
+ {\ifnum #1=1
+ \IfNoValueTF{#2}{\relax}{#2}%
+ \else
+ \IfNoValueTF{#2}
+ {\originalmulticols{#1}}
+ {\originalmulticols{#1}[#2]}%
+ \fi}
+ {\ifnum #1=1
+ \relax
+ \else
+ \endoriginalmulticols
+ \fi}
+
+
\newenvironment*{multilinecodeexample}
{\begin{quote}\tt
\def\indent{\mbox{}\hspace{25pt}}%
@@ -409,7 +555,7 @@
\newenvironment*{specialcodesection}[1]
{\Needspace{4\baselineskip}%
\begin{tcolorbox}[colback=white, colframe=\markercolor,
- bottomrule=0pt, leftrule=5pt, rightrule=0pt, toprule=0pt]
+ bottomrule=.5pt, leftrule=5pt, rightrule=.5pt, toprule=.5pt]
\sffamily
\begin{list}
{\specialcodesectionheading{#1}}
@@ -464,6 +610,12 @@
\newcommand*{\tikzlogo}{\textrm{Ti\textit{k\/}Z}}
+\newcommand*{\toccontinuesonnextpage}
+ {\addtocontents{toc}{\par
+ \bigskip
+ \hfill\textit{Table of Contents continued on next page.}\par
+ \clearpage}}
+
\newcommand*{\topstrut}{\rule{0pt}{1.3em}}
\newcommand*{\transpose}[1]{{#1}^{\text{T}}}
@@ -477,6 +629,12 @@
\copy0\kern\ttellipsisgap
\box0\kern\ttellipsisgap}
+\newcommand*{\unmarkedfntext}[1]
+ {{\def\thefootnote{}\footnote{#1}%
+ \addtocounter{footnote}{-1}}}
+
+\newcommand*{\userman}[1]{\textbf{\hyperpage{#1}}}
+
\newcommand*{\visualpar}{\textcolor{\markercolor}{\P}\linebreak[1]\enspace}
\newenvironment*{widecodeexample}
@@ -491,6 +649,15 @@
\hyphenation{% https://hyphenateit.com/en-us
+ neg-slant-context
+ neg-slant-environment
+ slant-context
+ slant-environment
+ synth-neg-slant
+ synth-slant
+ synth-slant-box
+ text-synth-slant
+ text-synth-upright-italic
}
@@ -515,12 +682,33 @@
%</driver>
%<*index-style>
actual '='
+delim_0 "\\nobreak\\enspace"
+delim_1 "\\nobreak\\enspace"
+delim_2 "\\nobreak\\enspace"
heading_prefix "\\pagebreak[3]\\smallskip\n\n{\\sffamily\\bfseries\\large "
heading_suffix "}\\nopagebreak\n"
headings_flag 1
level '>'
+line_max 65536
quote '!'
%</index-style>
+%<*changes-style>
+actual '='
+delim_0 "\\nobreak\\enspace"
+delim_1 "\\nobreak\\enspace"
+delim_2 "\\nobreak\\enspace"
+heading_prefix "\\pagebreak[3]\\smallskip\n\n{\\sffamily\\bfseries\\large "
+heading_suffix "}\\nopagebreak\n"
+headings_flag 0
+item_x1 "\\efill\n\\subitem "
+item_x2 "\\ "
+keyword "\\glossaryentry"
+level '>'
+line_max 65536
+postamble "\n\\end{theglossary}\n"
+preamble "\\begin{theglossary}\n \\makeatletter\\scan@allowedfalse"
+quote '!'
+%</changes-style>
% \fi
%
%
@@ -530,7 +718,7 @@ quote '!'
% \DoNotIndex{\edef,\else}
% \DoNotIndex{\endgroup,\endmicrotypecontext,\endnegslantenvironment,\endslantenvironment}
% \DoNotIndex{\expandafter,\ExplSyntaxOff,\ExplSyntaxOn}
-% \DoNotIndex{\fi,\font,\fontdimen,\fontspec,\fp}
+% \DoNotIndex{\fi,\font,\fontdimen,\fontspec,\fp,\fpeval}
% \DoNotIndex{\hbox,\hskip}
% \DoNotIndex{\ifcase,\ifcsdef,\ifdefined,\ifluatex,\ifmmode,\ifnum,\ifpdftex,\ifx,\itshape}
% \DoNotIndex{\kern}
@@ -540,16 +728,17 @@ quote '!'
% \DoNotIndex{\newbox,\newcommand,\NewDocumentCommand,\NewDocumentEnvironment,\newenvironment,\newrobustcmd}
% \DoNotIndex{\node,\nolinebreak}
% \DoNotIndex{\or}
-% \DoNotIndex{\PackageInfo,\PackageWarning,\ProcessOptionsX,\providecommand,\ProvidesPackage}
+% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\ProcessOptionsX,\providecommand,\ProvidesPackage}
% \DoNotIndex{\pdfoutput,\pdfrestore,\pdfsave,\pdfsetmatrix,\pstilt}
% \DoNotIndex{\relax,\RequirePackage}
-% \DoNotIndex{\sbox,\skip,\space}
+% \DoNotIndex{\sbox,\skip,\space,\string}
% \DoNotIndex{\tikz}
% \DoNotIndex{\upshape,\usebox}
% \DoNotIndex{\wd}
+% \DoNotIndex{\xdef}
%
%
-% \changes{v0.1}{2024-2-12}{Initial version}
+% \changes{v0.1}{2024-2-12}{Initial version.}
%
%
% \pagenumbering{roman}
@@ -636,39 +825,83 @@ end
% \footnotesize
% \noindent
% This package is copyright \textcopyright~2024 Ch.~L.~Spiel. It may be distributed and/or
-% modified under the conditions of the \LaTeX{} Project Public License \acronym{(LPPL)},
-% either version~1.3c of this license or --~at your option~-- any later version. This work
-% has the \acronym{LPPL} maintenance status \doublequotes{author-maintained}.\par
+% modified under the conditions of the \href{https://www.latex-project.org/lppl.txt}{\LaTeX{}
+% Project Public License} \acronym{(LPPL)}, either version~1.3c of this license or --~at your
+% option~-- any later version. This work has the \acronym{LPPL} maintenance status
+% \doublequotes{author-maintained}.\par
% \endgroup
%
%
% \clearpage
-% \thispagestyle{pagenumberonly}
-% \tableofcontents
+% \pagestyle{pagenumberonly}
%
-% \vspace{\fill}
-%
-% \begingroup
-% \footnotesize
-% \singlespacing
-% \noindent
-% The font samples~\singlequotes{fga} on the title page
-% were generated with the help of \MP{} using \doublequotes{\acronym{URW} Palladio~L}
-% in styles~\singlequotes{roman} and~\singlequotes{italic}.
-% The affine transformations were \code{slanted .2} for the slanted roman and
-% \code{slanted -.2} for the upright italics.\par
-% \endgroup
+% \unmarkedfntext{The font samples~\singlequotes{fga} on the title page were generated with the
+% help of \MP{} using \doublequotes{\acronym{URW} Palladio} in styles~\singlequotes{roman}
+% and~\singlequotes{italic}. The affine transformations were\enspace \code{slanted
+% .2}\enspace for the slanted roman and\enspace \code{slanted -.2}\enspace for the upright
+% italics.}
+% \tableofcontents
%
%
% \clearpage
-% \thispagestyle{pagenumberonly}
% \listoftables
% \bigskip
% \listoffigures
%
%
% \clearpage
+% \phantomsection
+% \addcontentsline{toc}{section}{\numberline{}Quick Reference}
+% \addtocontents{toc}{\medskip}
+% \section*{Quick Reference}
+%
+% Alphabetically sorted list of all user macros and environments defined by
+% package~\packagename{synthslant}. The list of all package options can be found on
+% \cpageref{sec:package-options} and \pageref{secend:package-options}. The
+% \hyperref[sec:index]{Index} on pages~\pageref{sec:index} to~\pageref{secend:index} may
+% provide some more detailed insights.
+%
+% \begin{list}{}{\itemindent=-\leftmargin \itemsep=4.5pt plus 2pt minus 1pt}
+% \NewDocumentCommand{\qritem}{m m O{}}
+% {\item
+% \hyperref[#1]{#2}#3\relax
+% \def\qrref{\cpageref{#1}}\par\ignorespaces}
+% \qritem{syn:negslantcontext}{\cs{negslantcontext}}
+% Name of the \packagename{microtype} context used when typesetting backward slanted
+% text~(\qrref)
+%
+% \qritem{syn:negslantenvironment}{\code{negslantenvironment}}
+% Wrapper around \cs{synthslantbox} when slanting backward with
+% \cs{textsynthuprightitalic}~(\qrref)
+%
+% \qritem{syn:slantcontext}{\cs{slantcontext}}
+% Name of the \packagename{microtype} context used when typesetting forward slanted
+% text~(\cpageref{syn:slantcontext})
+%
+% \qritem{syn:slantenvironment}{\code{slantenvironment}}
+% Wrapper around \cs{synthslantbox} when slanting forward with
+% \cs{textsynthslant}~(\qrref)
+%
+% \qritem{syn:synthnegslant}{\cs{synthnegslant}}
+% Slant value used by \cs{textsynthuprightitalic}~(\qrref)
+%
+% \qritem{syn:synthslantbox}{\cs{synthslantbox}}[\marg{slant}\marg{text}]
+% Slant \meta{text} (forward or backward) with \meta{slant}~(\qrref)
+%
+% \qritem{syn:synthslant}{\cs{synthslant}}
+% Slant value used by \cs{textsynthslant}~(\qrref)
+%
+% \qritem{syn:textsynthslant}{\cs{textsynthslant}}[\marg{text}]
+% Forward slant upright glyphs~(\qrref)
+%
+% \qritem{syn:textsynthuprightitalic}{\cs{textsynthuprightitalic}}[\marg{text}]
+% Backward slant italics or oblique glyphs~(\qrref)
+% \end{list}
+%
+%
+% \clearpage
% \pagenumbering{arabic}
+% \pagestyle{fancy}
% \section{Introduction}\label{sec:introduction}
%
% The \packagename{synthslant} package provides a translator (e.\,g.~\LaTeX, \pdfLaTeX, or
@@ -688,8 +921,8 @@ end
%
% \subsection{Appeal for Artificially Slanted Type}\label{sec:appleal-for-artificially-slanted}
%
-% Artificially slanted type have a bad reputation. Whenever there is an order to round up the
-% usual font suspects synthetically slanted, bolded\footnote{Package~\packagename{amsbsy}
+% Artificially slanted type have a lousy reputation. Whenever there is an order to round up
+% the usual font suspects synthetically slanted, bolded\footnote{Package~\packagename{amsbsy}
% defines a \doublequotes{Poor Man's Bold} macro~\cs{pmb} that works by
% \singlequotes{overprinting}. The authors of \packagename{amsbsy} recommend to prefer
% package~\packagename{bm} for bold mathematical symbols, though.}, and condensed type along
@@ -699,8 +932,9 @@ end
% condescension for synthetic bold and condensed variants. They spoil the glyphs' outline
% because they do not (and cannot) conserve the necessary proportions. For small-caps the
% problems are somewhat minor and I wonder how far one could get with an
-% \propername{OpenType}~font that supports a \code{size}~axis\index{font>axis>size=\code{size}}
-% as well as an \code{opsz}~axis\index{font>axis>opsz=\code{opsz}} in the necessary ranges to
+% \propername{OpenType}~font that supports a
+% \code{size}~axis\index{font>axis>size=\code{size}|userman} as well as an
+% \code{opsz}~axis\index{font>axis>opsz=\code{opsz}|userman} in the necessary ranges to
% construct convincing small-caps out of the multiple-master font.
%
% In my view artificial slanting keeps much of the font's character intact. In fact one
@@ -741,13 +975,14 @@ end
%
% Some fonts in current \LaTeX{} distributions offer slanted series right out of the box.
% \foreignphrase{Eureka!} In particular the oldest (and once upon a time the only) font family
-% shipping with \TeX, \href{https://tug.org/FontCatalogue/cmrfonts.html}{Computer Modern
-% Roman}\index{font>Computer Modern Roman} --~nowadays member of the \acronym{CM}-Super
-% family~-- is available in a deluge of almost thirty shapes. It covers not just slanted roman
-% or slanted smallcaps but also slanted typewriter and somewhat surprisingly upright italics.
-% Furthermore, the \LaTeXe{} font selection scheme provisions \singlequotes{\code{sl}} for
-% slanted shapes and \singlequotes{\code{ui}} for upright italics~\cite{fntguide}. The former
-% is accompanied by the macros~\cs{slshape} and~\cs{textsl}.
+% shipping with \TeX, \href{https://tug.org/FontCatalogue/cmrfonts.html}{\acronym{CM}
+% Roman}\index{font>typeface>CM Roman=\acronym{CM} Roman|userman} --~nowadays member of the
+% \acronym{CM}-Super family~-- is available in a deluge of almost thirty shapes. It covers not
+% just slanted roman or slanted smallcaps but also slanted typewriter and somewhat surprisingly
+% upright italics. Furthermore, the \LaTeXe{} font selection scheme provisions
+% \singlequotes{\code{sl}} for slanted shapes and \singlequotes{\code{ui}} for upright
+% italics~\cite{fntguide}. The former is accompanied by the macros~\cs{slshape}
+% and~\cs{textsl}.
%
% \begin{wraptable}{r}{.382\textwidth}
% \renewcommand*{\floatcaptionwidth}{\textwidth}
@@ -759,15 +994,15 @@ end
%
% \begin{tabular}{@{}l@{}}
% \toprule
-% Font Name \\
+% Font \\
% \midrule
-% Cairo\index{font>Cairo} \\
-% Commissioner\index{font>Commissioner} \\
-% Geologica\index{font>Geologica} \\
-% Gluten\index{font>Gluten} \\
-% Inter\index{font>Inter} \\
-% Recursive\index{font>Recursive} \\
-% Roboto Flex\index{font>Roboto Flex} \\
+% Cairo\index{font>typeface>Cairo|userman} \\
+% Commissioner\index{font>typeface>Commissioner|userman} \\
+% Geologica\index{font>typeface>Geologica|userman} \\
+% Gluten\index{font>typeface>Gluten|userman} \\
+% Inter\index{font>typeface>Inter|userman} \\
+% Recursive\index{font>typeface>Recursive|userman} \\
+% Roboto Flex\index{font>typeface>Roboto Flex|userman} \\
% \bottomrule
% \end{tabular}
% \end{wraptable}
@@ -781,8 +1016,9 @@ end
% \code{slnt}-axis} or fonts with an \href{https://v-fonts.com/tags/C5}{unusual variation} at
% \href{https://v-fonts.com/}{Variable Fonts}.} that offer a slant-axis\footnote{The
% registered axis is called \code{slnt} and it is not to be confused with the
-% \code{ital}~axis.}\index{font>axis>slant=\code{slant}}\index{font>axis>ital=\code{ital}} that
-% can be controlled with \packagename{fontspec}'s\index{package>\packagename{fontspec}}
+% \code{ital}~axis.}\index{font>axis>slant=\code{slant}|userman}\index{font>axis>ital=\code{ital}|userman}
+% that can be controlled with
+% \packagename{fontspec}'s\index{package>fontspec=\packagename{fontspec}|userman}
% \code{Slant}\footnote{Since \packagename{fontspec} version~2.9a as of 2024/2/13.}~key and
% \cref{tab:slanted-series-fonts} for a rather incomplete list of fonts that are shipped with
% slanted shapes. For these fonts \packagename{synthslant} is largely superfluous unless
@@ -801,35 +1037,35 @@ end
%
% \begin{tabular}[t]{@{}p{12em}@{}}
% \toprule
-% Font Name \\
+% Font \\
% \midrule
-% Arvo\index{font>Arvo} \\
-% Computer Modern Roman\index{font>Computer Modern Roman} \\
-% Domitian\index{font>Domitian} \\
-% Droid Serif\index{font>Droid Serif} \\
-% Erewhon\index{font>Erewhon} \\
-% Extended Charter\index{font>Extended Charter} \\
-% \acronym{GFS} Artemisia\index{font>GFS Artemisia=\acronym{GFS} Artemisia} \\
-% \acronym{GFS} Bodoni\index{font>GFS Bodoni=\acronym{GFS} Bodoni} \\
-% \acronym{GFS} Didot\index{font>GFSDidot=\acronym{GFS} Didot} \\
+% Arvo\index{font>typeface>Arvo|userman} \\
+% \acronym{CM} Roman\index{font>typeface>CM Roman=\acronym{CM} Roman|userman} \\
+% Domitian\index{font>typeface>Domitian|userman} \\
+% Droid Serif\index{font>typeface>Droid Serif|userman} \\
+% Erewhon\index{font>typeface>Erewhon|userman} \\
+% Extended Charter\index{font>typeface>Extended Charter|userman} \\
+% \acronym{GFS} Artemisia\index{font>typeface>GFS Artemisia=\acronym{GFS} Artemisia|userman} \\
+% \acronym{GFS} Bodoni\index{font>typeface>GFS Bodoni=\acronym{GFS} Bodoni|userman} \\
+% \acronym{GFS} Didot\index{font>typeface>GFS Didot=\acronym{GFS} Didot|userman} \\
% \\
% \bottomrule
% \end{tabular}
% \qquad
% \begin{tabular}[t]{@{}p{12em}@{}}
% \toprule
-% Font Name \\
+% Font \\
% \midrule
-% Cabin\index{font>Cabin} \\
-% Clear Sans\index{font>Clear Sans} \\
-% Cuprum\index{font>Cuprum} \\
-% Fira Sans\index{font>Fira Sans} \\
-% Gandhi Sans\index{font>Gandhi Sans} \\
-% \acronym{Inria} Sans\index{font>Inria Sans=\acronym{Inria} Sans} \\
-% Lato\index{font>Lato}\itshapemark \\
-% Montserrat\index{font>Montserrat} \\
-% \acronym{PT} Sans\index{font>PT Sans=\acronym{PT} Sans} \\
-% Source Sans Pro\index{font>Source Sans Pro} \\
+% Cabin\index{font>typeface>Cabin|userman} \\
+% Clear Sans\index{font>typeface>Clear Sans|userman} \\
+% Cuprum\index{font>typeface>Cuprum|userman} \\
+% Fira Sans\index{font>typeface>Fira Sans|userman} \\
+% Gandhi Sans\index{font>typeface>Gandhi Sans|userman} \\
+% \acronym{Inria} Sans\index{font>typeface>Inria Sans=\acronym{Inria} Sans|userman} \\
+% Lato\itshapemark\index{font>typeface>Lato|userman} \\
+% Montserrat\index{font>typeface>Montserrat|userman} \\
+% \acronym{PT} Sans\index{font>typeface>PT Sans=\acronym{PT} Sans|userman} \\
+% Source Sans Pro\index{font>typeface>Source Sans Pro|userman} \\
% \bottomrule
% \end{tabular}
%
@@ -852,15 +1088,16 @@ end
% \pdfTeX~version~1.40.0~\cite{schroeder:2007}.} With the help of the latter affine
% transformations of arbitrary content can be coded directly by setting the transformation
% matrix. A slight variant of his code is used in this package for the \acronym{PDF}- and
-% \packagename{l3draw}\index{package>\packagename{l3draw}}-slant~engines. The implementations
-% for \pstrickslogo, \tikzlogo{}, and \packagename{fontspec}\packagename{fontspec} are trivial
-% as they build upon shear~functions supplied by the respective packages.
+% \packagename{l3draw}\index{package>l3draw=\packagename{l3draw}|userman}-slant~engines. The
+% implementations for \pstrickslogo, \tikzlogo{}, and
+% \packagename{fontspec}\packagename{fontspec} are trivial as they build upon shear~functions
+% supplied by the respective packages.
%
%
% \subsection{Shear Transformation, Slant, and Angle}\label{sec:shear-transformation}
%
-% \index{slant>operation}
-% \index{shear>transformation}
+% \index{slant>operation|userman}
+% \index{shear>transformation|userman}
% Mathematically the slant operation is a shear transformation, which can be expressed with the
% equation
% \begin{equation}\label{equ:shear-transformation}
@@ -1018,7 +1255,7 @@ end
% For \(\alpha = 0\) the shear matrix becomes the identity matrix. Throughout of
% \packagename{synthslant} we work with the \meta{slant} which is \(\sin \alpha\) in
% \cref{equ:shear-transformation} and avoid converting back and forth to the
-% \index{shear>angle}shear angle~\(\alpha\).\footnote{At least one slant engine currently
+% \index{shear>angle|userman}shear angle~\(\alpha\).\footnote{At least one slant engine currently
% requires such a conversion, namely~\pstrickslogo. The math is hidden from the user, though.}
% Some values for orientation: \mbox{\(\sin 5.74\degree \approx .1\)}, \mbox{\(\sin 11.5\degree
% \approx .2\)}, and \mbox{\(\sin 17.5\degree \approx .3\)}.\footnote{For small
@@ -1038,8 +1275,8 @@ end
% \begin{enumerate}
% \item\label{it:no-italics}
% Generate a slanted serif in the unfortunate situation when a serif font comes without
-% italics such as \singlequotes{\acronym{URW}~Antiqua}\index{font>URW Antiqua=\acronym{URW}
-% Antiqua}.
+% italics such as
+% \singlequotes{\acronym{URW}~Antiqua}\index{font>typeface>URW Antiqua=\acronym{URW} Antiqua|userman}.
%
% Here, the user is relatively free to choose a \meta{slant}, for there are no italics whose
% angle must be matched. \packagename{Synthslant}'s default of~.2 should be a good starting
@@ -1053,8 +1290,8 @@ end
%
% \item\label{it:correct-italics-angle}
% An italics shape that has an excessive slant angle, as
-% e.\,g.~\singlequotes{Libre~Caslon}\index{font>Libre Caslon} may be corrected, i.\,e.,
-% partially un-slanted.
+% e.\,g.~\singlequotes{Libre~Caslon}\index{font>typeface>Libre Caslon|userman} may be corrected,
+% i.\,e., partially un-slanted.
%
% In this case, and generally if a font as a whole needs to be corrected, an alternative
% approach like the one sketched in \cref{sec:alternative} on \cpageref{sec:alternative} may
@@ -1062,16 +1299,16 @@ end
%
% \item\label{it:generate-sole-obliques}
% Generate an oblique sans-serif if a sans-serif font comes without an oblique shape as,
-% e.\,g., \singlequotes{\acronym{URW}~Grotesk}.\index{font>URW Grotesk=\acronym{URW} Grotesk}
+% e.\,g., \singlequotes{\acronym{URW}~Grotesk}.\index{font>typeface>URW Grotesk=\acronym{URW} Grotesk|userman}
%
% \item\label{it:generate-extra-obliques}
% Supply a slanted sans-serif shape for sans-serif fonts with designed, this is \emph{true}
-% obliques as e.\,g.~\singlequotes{Open Sans}.\index{font>Open Sans}
+% obliques as e.\,g.~\singlequotes{Open Sans}.\index{font>typeface>Open Sans|userman}
%
% \item\label{it:slant-typewriter}
% Fixed-width --~also called \singlequotes{typewriter} or \singlequotes{teletype}~-- fonts
-% without obliques (Yes, I am looking at you, Inconsolata!)\index{font>Inconsolata} finally
-% get an oblique shape.
+% without obliques (Yes, I am looking at you, Inconsolata!)\index{font>typeface>Inconsolata|userman}
+% finally get an oblique shape.
%
% \item\label{it:slanted-small-caps}
% Small caps without accompanying italics can be slanted, too.
@@ -1109,7 +1346,9 @@ end
%
% \begingroup
% \newcommand*{\indexpackageoption}[1]
-% {\index{package option>#1=\code{#1}}\index{#1=\code{#1}~(option)}\ignorespaces}
+% {\detoxindex{package option>#1=\code{#1}|userman}%
+% \detoxindex{#1=\code{#1}~(option)|userman}%
+% \ignorespaces}
% \begin{description}
% [before={\let\oldmakelabel=\makelabel
% \renewcommand{\makelabel}[1]
@@ -1130,13 +1369,14 @@ end
%
% \item[|fontspec|]\label{item:fontspec}
% \indexpackageoption{fontspec}
-% Use \packagename{fontspec}\index{package>\packagename{fontspec}} as slanting
-% back-end.\footnote{Requires \filesystem{fontspec.sty.}}
+% Use \packagename{fontspec}\index{package>fontspec=\packagename{fontspec}|userman} as
+% slanting back-end.\footnote{Requires \filesystem{fontspec.sty.}}
%
% \item[|l3draw|]\label{item:l3draw}
% \indexpackageoption{l3draw}
-% Select the \singlequotes{draw} layer\index{package>\packagename{l3draw}} of \LaTeXIII{} as
-% base for the slanting engine.\footnote{This option requires \filesystem{l3draw.sty.}}
+% Select the \singlequotes{draw} layer\index{package>l3draw=\packagename{l3draw}|userman} of
+% \LaTeXIII{} as base for the slanting engine.\footnote{This option requires
+% \filesystem{l3draw.sty.}}
%
% \begin{caution}
% This engine is experimental and the \singlequotes{draw} layer of \LaTeXIII{} itself is
@@ -1148,7 +1388,7 @@ end
% \indexpackageoption{negslant}
% Set the default value for \hyperref[syn:synthnegslant]{\cs{synthnegslant}} \emph{only.}
% The argument \meta{slant-expr} is a floating-point expression. Note that for this option
-% \meta{slant-expr} must evaluate to a non-positive value.
+% \meta{slant-expr} must evaluate to a nonpositive value.
%
% \item[|PDF|, |pdf|]\label{item:pdf}
% \indexpackageoption{pdf}
@@ -1159,14 +1399,14 @@ end
% \indexpackageoption{posslant}
% Set the default value for \hyperref[syn:synthslant]{\cs{synthslant}} \emph{only.} The
% argument \meta{slant-expr} is a floating-point expression. Note that for this option
-% \meta{slant-expr} must evaluate to a non-negative value.
+% \meta{slant-expr} must evaluate to a nonnegative value.
%
% \item[|PS|, |ps|]\label{item:postscript}
-% \index{ps}
-% Use \pstrickslogo\index{package>\packagename{pstricks}} to delegate slanting to the
-% PostScript\index{PostScript} interpreter. Obviously requires \pstrickslogo\footnote{The
-% package actually required is \filesystem{pst-3d.sty.}} and \acronym{DVI}-to-PostScript
-% translation.
+% \index{ps|userman}
+% Use \pstrickslogo\index{package>pstricks=\packagename{pstricks}|userman} to delegate
+% slanting to the PostScript\index{PostScript|userman} interpreter. Obviously requires
+% \pstrickslogo\footnote{The package actually required is \filesystem{pst-3d.sty.}} and
+% \acronym{DVI}-to-PostScript translation.
%
% \begin{caution}
% This engine is still experimental and produces low-quality output! See
@@ -1176,7 +1416,7 @@ end
% \item[|slant=|\meta{slant-expr}]\label{item:slant}
% \indexpackageoption{slant}
% Set the default values for both \hyperref[syn:synthslant]{\cs{synthslant}} and
-% \hyperref[syn:synthnegslant]{\cs{synthnegslant}}, this is, behave as if the two package
+% \hyperref[syn:synthnegslant]{\cs{synthnegslant}}, this is, act as if the two package
% options \(\code{posslant} = \meta{slant-expr}\) and \(\code{negslant} =
% -(\meta{slant-expr})\) have been given. The argument \meta{slant-expr} is a floating-point
% expression.
@@ -1185,8 +1425,8 @@ end
%
% \item[|TikZ|, |tikz|]\label{item:tikz}
% \indexpackageoption{tikz}
-% Use \packagename{TikZ}\index{package>\packagename{TikZ}} for slanting.\footnote{Requires
-% \filesystem{tikz.sty.}}
+% Use \packagename{TikZ}\index{package>tikz=\packagename{tikz}|userman} for
+% slanting.\footnote{Requires \filesystem{tikz.sty.}}
%
% \begin{caution}
% This engine is still experimental and produces low-quality output! See
@@ -1199,7 +1439,7 @@ end
% floating-point \emph{expressions} as their arguments not just plain floating-point literals.
% See Ref.~\citenum{latex3-interfaces}, Ch.~29, \doublequotes{The \textsf{l3fp}~module~--
% Floating points} for a description of the floating-point expression syntax and the available
-% functions.
+% functions.\label{secend:package-options}
%
%
% \clearpage
@@ -1218,7 +1458,7 @@ end
%
% \DescribeMacro{\synthslant}
% Control the slant applied by \hyperref[syn:textsynthslant]{\cs{textsynthslant}}.
-% This value is non-negative.
+% This value is nonnegative.
%
% \begin{synopsis}\label{syn:synthslant}
% \cs{synthslant}
@@ -1248,43 +1488,43 @@ end
% \begin{tabfigures}
% \begin{tabular}[t]{@{}p{9.5em}l@{}}
% \toprule
-% Font Name & Slant \\
+% Font & Slant \\
% \midrule
-% \acronym{ADF} Accanthis\index{font>ADF Accanthis=\acronym{ADF} Accanthis} & .26 \\
-% \acronym{ADF} Baskervald\index{font>ADF Baskervald=\acronym{ADF} Baskervald} & .32 \\
-% \acronym{ADF} Berenis\index{font>ADF Berenis=\acronym{ADF} Berenis} & .2 \\
-% \acronym{ADF} Venturis\index{font>ADF Venturis=\acronym{ADF} Venturis} & .2 \\
-% Alegreya\index{font>Alegreya} & .2 \\
-% Arvo\index{font>Arvo} & .2 \\
-% BaskervilleF\index{font>BaskervilleF} & .2 \\
-% Bera Serif\index{font>Bera Serif} & .2 \\
-% Bitter\index{font>Bitter} & .16 \\
-% Caladea\index{font>Caladea} & .14 \\
-% Clara\index{font>Clara} & .24 \\
-% Cochineal\index{font>Cochineal} & .2 \\
-% Coelacanth\index{font>Coelacanth} & .2 \\
-% Crimson Pro\index{font>Crimson Pro} & .2 \\
-% Crimson Text\index{font>Crimson Text} & .2 \\
+% \acronym{ADF} Accanthis\index{font>typeface>ADF Accanthis=\acronym{ADF} Accanthis|userman} & .26 \\
+% \acronym{ADF} Baskervald\index{font>typeface>ADF Baskervald=\acronym{ADF} Baskervald|userman} & .32 \\
+% \acronym{ADF} Berenis\index{font>typeface>ADF Berenis=\acronym{ADF} Berenis|userman} & .2 \\
+% \acronym{ADF} Venturis\index{font>typeface>ADF Venturis=\acronym{ADF} Venturis|userman} & .2 \\
+% Alegreya\index{font>typeface>Alegreya|userman} & .2 \\
+% Arvo\index{font>typeface>Arvo|userman} & .2 \\
+% BaskervilleF\index{font>typeface>BaskervilleF|userman} & .2 \\
+% Bera Serif\index{font>typeface>Bera Serif|userman} & .2 \\
+% Bitter\index{font>typeface>Bitter|userman} & .16 \\
+% Caladea\index{font>typeface>Caladea|userman} & .14 \\
+% Clara\index{font>typeface>Clara|userman} & .24 \\
+% Cochineal\index{font>typeface>Cochineal|userman} & .2 \\
+% Coelacanth\index{font>typeface>Coelacanth|userman} & .2 \\
+% Crimson Pro\index{font>typeface>Crimson Pro|userman} & .2 \\
+% Crimson Text\index{font>typeface>Crimson Text|userman} & .2 \\
% \bottomrule
% \end{tabular}%
% \qquad
% \begin{tabular}[t]{@{}p{9.5em}l@{}}
% \toprule
-% Font Name & Slant \\
+% Font & Slant \\
% \midrule
-% Day Roman\index{font>Day Roman} & .2 \\
-% \acronym{EB} Garamond\index{font>EB Garamond=\acronym{EB} Garamond} & .3 \\
-% etbb\index{font>etbb} & .2 \\
-% fbb\index{font>fbb} & .2 \\
-% Garamond Expert\index{font>Garamond Expert} & .2 \\
-% Gandhi Serif\index{font>Gandhi Serif} & .2 \\
-% Gentium\index{font>Gentium} & .2 \\
-% Ibarra Real Nova\index{font>Ibarra Real Nova} & .2 \\
-% \acronym{IBM} Plex Serif\index{font>IBM Plex Serif=\acronym{IBM} Plex Serif} & .24 \\
-% \acronym{Inria} Serif\index{font>Inria Serif=\acronym{Inria} Serif} & .2 \\
-% Libertinus Serif\index{font>Libertinus Serif} & .2 \\
-% Libre Baskerville\index{font>Libre Baskerville} & .3 \\
-% Libre Caslon\index{font>Libre Caslon} & .38 \\
+% Day Roman\index{font>typeface>Day Roman|userman} & .2 \\
+% \acronym{EB} Garamond\index{font>typeface>EB Garamond=\acronym{EB} Garamond|userman} & .3 \\
+% etbb\index{font>typeface>etbb|userman} & .2 \\
+% fbb\index{font>typeface>fbb|userman} & .2 \\
+% Garamond Expert\index{font>typeface>Garamond Expert|userman} & .2 \\
+% Gandhi Serif\index{font>typeface>Gandhi Serif|userman} & .2 \\
+% Gentium\index{font>typeface>Gentium|userman} & .2 \\
+% Ibarra Real Nova\index{font>typeface>Ibarra Real Nova|userman} & .2 \\
+% \acronym{IBM} Plex Serif\index{font>typeface>IBM Plex Serif=\acronym{IBM} Plex Serif|userman} & .24 \\
+% \acronym{Inria} Serif\index{font>typeface>Inria Serif=\acronym{Inria} Serif|userman} & .2 \\
+% Libertinus Serif\index{font>typeface>Libertinus Serif|userman} & .2 \\
+% Libre Baskerville\index{font>typeface>Libre Baskerville|userman} & .3 \\
+% Libre Caslon\index{font>typeface>Libre Caslon|userman} & .38 \\
% & \\
% & \\
% \bottomrule
@@ -1292,22 +1532,22 @@ end
% \qquad
% \begin{tabular}[t]{@{}p{9.5em}l@{}}
% \toprule
-% Font Name & Slant \\
+% Font & Slant \\
% \midrule
-% Merriweather\index{font>Merriweather} & .14 \\
-% MLModern\index{font>MLModern} & .23 \\
-% Noto Serif\index{font>Noto Serif} & .22 \\
-% \acronym{PT} Serif\index{font>PT Serif=\acronym{PT} Serif} & .2 \\
-% Roboto Slab\index{font>Roboto Slab} & .2 \\
-% Quattrocento\index{font>Quattrocento} & .2 \\
-% Source Serif Pro\index{font>Source Serif Pro} & .18 \\
-% Spectral\index{font>Spectral} & .18 \\
-% \acronym{STIX}\index{font>STIX=\acronym{STIX}} & .2 \\
-% \TeX{} Gyre Pagella\index{font>TeX Gyre Pagella=\TeX{} Gyre Pagella} & .16 \\
-% \acronym{TX} Fonts Serif\index{font>TX Fonts Serif=\acronym{TX} Fonts Serif} & .2 \\
-% \acronym{URW} Antiqua\index{font>URW Antiqua=\acronym{URW} Antiqua} & .2 \\
-% \acronym{URW} Nimbus Roman\index{font>URW Nimbus Roman=\acronym{URW} Nimbus Roman} & .2 \\
-% Utopia\index{font>Utopia} & .2 \\
+% Merriweather\index{font>typeface>Merriweather|userman} & .14 \\
+% \acronym{ML} Modern\index{font>typeface>ML Modern=\acronym{ML} Modern|userman} & .23 \\
+% Noto Serif\index{font>typeface>Noto Serif|userman} & .22 \\
+% \acronym{PT} Serif\index{font>typeface>PT Serif=\acronym{PT} Serif|userman} & .2 \\
+% Roboto Slab\index{font>typeface>Roboto Slab|userman} & .2 \\
+% Quattrocento\index{font>typeface>Quattrocento|userman} & .2 \\
+% Source Serif Pro\index{font>typeface>Source Serif Pro|userman} & .18 \\
+% Spectral\index{font>typeface>Spectral|userman} & .18 \\
+% \acronym{STIX}\index{font>typeface>STIX=\acronym{STIX}|userman} & .2 \\
+% \TeX{} Gyre Pagella\index{font>typeface>TeX Gyre Pagella=\TeX{} Gyre Pagella|userman} & .16 \\
+% \acronym{TX} Fonts Serif\index{font>typeface>TX Fonts Serif=\acronym{TX} Fonts Serif|userman} & .2 \\
+% \acronym{URW} Antiqua\index{font>typeface>URW Antiqua=\acronym{URW} Antiqua|userman} & .2 \\
+% \acronym{URW} Nimbus Roman\index{font>typeface>URW Nimbus Roman=\acronym{URW} Nimbus Roman|userman} & .2 \\
+% Utopia\index{font>typeface>Utopia|userman} & .2 \\
% & \\
% \bottomrule
% \end{tabular}
@@ -1319,7 +1559,7 @@ end
% \DescribeMacro{\synthnegslant}
% Control the slant applied by
% \hyperref[syn:textsynthuprightitalic]{\cs{textsynthuprightitalic}}. This value is
-% non-positive.
+% nonpositive.
%
% \begin{synopsis}\label{syn:synthnegslant}
% \cs{synthnegslant}
@@ -1332,9 +1572,9 @@ end
% more flexible and powerful interface, see~\cref{sec:advanced-interface}.
%
% \begin{note}
-% The following restrictions and workarounds to get line-breaking and automatic hyphenation
-% working again do \emph{not} apply to the
-% \packagename{fontspec}\index{package>\packagename{fontspec}} back-end.
+% The following restrictions and workarounds to get line-breaking and \TeX's automatic
+% hyphenation working again do \emph{not} apply to the
+% \packagename{fontspec}\index{package>fontspec=\packagename{fontspec}|userman} back-end.
% \end{note}
%
% \noindent
@@ -1344,7 +1584,7 @@ end
% provisions to re-enable at least some breakability.
%
% \begin{enumerate}
-% \item Spaces introduce breakpoint,\index{breakpoint at space} e.\,g.
+% \item Spaces introduce breakpoint,\index{breakpoint at space|userman} e.\,g.
% \begin{codeexample}
% \cs{textsynthslant}\{topological dual space\}
% \end{codeexample}
@@ -1352,8 +1592,8 @@ end
% second word (producing another horizontal box). \TeX{} sees two (unbreakable) boxes and a
% discardable space when it comes to linebreaking.
%
-% \item Discretionary hyphens\index{discretionary hyphen} in the form of \singlequotes{\cs{-}}
-% get propagated. So, we could improve on our above example by saying
+% \item Discretionary hyphens\index{discretionary hyphen|userman} in the form of
+% \singlequotes{\cs{-}} get propagated. So, we could improve on our above example by saying
% \begin{codeexample}
% \cs{textsynthslant}\{topo\cs{-}log\cs{-}i\cs{-}cal dual space\}
% \end{codeexample}
@@ -1374,7 +1614,7 @@ end
%
% In horizontal mode switch to an upright shape, slant \meta{text} with the slant value stored
% in \hyperref[syn:synthslant]{\cs{synthslant}} and apply \doublequotes{slant
-% correction}\index{slant>correction} --~the equivalent of italics correction~-- at the
+% correction}\index{slant>correction|userman} --~the equivalent of italics correction~-- at the
% right-hand side of~\meta{text}.
%
% In math mode just slant \meta{text} with the slant value stored in
@@ -1391,7 +1631,7 @@ end
%
% \noindent
% where we show the font modification in conjunction with the
-% \packagename{babel}~macro\index{package>\packagename{babel}}
+% \packagename{babel}~macro\index{package>babel=\packagename{babel}|userman}
% \cs{foreignlanguage}~\cite{package:babel}.~\visualpar
%
% In math-mode you cannot have enough fonts, symbols, and most of the gizmos over there! I
@@ -1485,7 +1725,7 @@ end
% \end{synopsis}
%
% Switch to an upright font shape and --~if
-% package~\packagename{microtype}~\cite{package:microtype}\index{package>\packagename{microtype}}
+% package~\packagename{microtype}~\cite{package:microtype}\index{package>microtype=\packagename{microtype}|userman}
% has been loaded~-- enter the Microtype-context defined by
% macro~\hyperref[syn:slantcontext]{\cs{slantcontext}}. At the end add some slant correction,
% which is the equivalent of italics correction.
@@ -1511,7 +1751,7 @@ end
% Microtype-context defined by macro~\hyperref[syn:negslantcontext]{\cs{negslantcontext}}.
%
% \DescribeMacro{\slantcontext}
-% Microtype context used when typesetting slanted text.
+% Name of the \packagename{microtype} context used when typesetting slanted text.
%
% \begin{synopsis}\label{syn:slantcontext}
% \cs{slantcontext}
@@ -1530,7 +1770,7 @@ end
% \end{note}
%
% \DescribeMacro{\negslantcontext}
-% Microtype context used when typesetting un-slanted text.
+% Name of the \packagename{microtype} context used when typesetting backward slanted text.
%
% \begin{synopsis}\label{syn:negslantcontext}
% \cs{negslantcontext}
@@ -1667,13 +1907,13 @@ end
% and --~after recompiling with the appropriate \LaTeX-engine~-- used to examine the details of
% the slant operations.
%
-% Page~2, Sec.~3.1, \singlequotes{Copy}, shows wild mixes of different font shapes, native al
-% well as synthesized ones. Here, the slanted glyphs as well as the upright italics should
-% blend well with the native italics/obliques and the normal font, respectively.
+% Page~2, Sec.~3.1, \singlequotes{Copy}, shows wild mixes of different font shapes, native and
+% synthesized ones. Here, the slanted glyphs as well as the upright italics should blend well
+% with the native italics/obliques and with the normal font, respectively.
%
-% Page~3, Sec.~3.2 and following sub-sections, examines the coupling of
-% \packagename{synthslant} with the \TeX-system and some of its extensions. If a slant engine
-% malfunctions, it will become evident on this page.
+% Page~3, Sec.~3.2 and following sub-sections, examine the coupling of \packagename{synthslant}
+% with the \TeX-system and some of its extensions. If a slant engine malfunctions, it will
+% become evident on this page.
%
%
% \clearpage
@@ -1687,7 +1927,7 @@ end
% \packagename{Syntslant}~manipulations may not survive
% (pre-)\discretionary{}{}{}processing by \MP.
%
-% \item[\packagename{l3draw} engine.]\index{package>\packagename{l3draw}}\mbox{}
+% \item[\packagename{l3draw} engine.]\index{package>l3draw=\packagename{l3draw}|userman}\mbox{}
% \begin{itemize}
% \item Depending of the shear direction the \packagename{l3draw} engine may generate some
% extra positive or negative space at the ends of the text.
@@ -1697,10 +1937,10 @@ end
% \item Markedly slower than the \acronym{PDF}-implementation!
% \end{itemize}
%
-% \item[\pstrickslogo{} engine.]\index{package>\packagename{pstricks}}
+% \item[\pstrickslogo{} engine.]\index{package>pstricks=\packagename{pstricks}|userman}
% The \pstrickslogo{} engine produces some extra space at the ends of the text.
%
-% \item[\tikzlogo{} engine.]\index{package>\packagename{tikz}}
+% \item[\tikzlogo{} engine.]\index{package>tikz=\packagename{tikz}|userman}
% The \tikzlogo{} engine produces some extra space at the ends of the text.
% \end{description}
%
@@ -1753,7 +1993,7 @@ end
%
% I want to elaborate the example given in \cref{sec:usage-ideas},
% \cref{it:correct-italics-angle} and generate less-angled italics for
-% Libre~Caslon.\index{font>Libre Caslon} Here is a suitable map line taken from
+% Libre~Caslon.\index{font>typeface>Libre Caslon|userman} Here is a suitable map line taken from
% \filesystem{pdftex.map} on my system:
%
% \begin{multilinecodeexample}
@@ -1824,7 +2064,8 @@ end
% \end{example}
%
%
-% \subsection{Combining \LaTeX{} and \command{dvipdfmx}}\label{sec:alternative-latex}
+% \subsection{Combining \LaTeX{} and
+% \texorpdfstring{\command{dvipdfmx}}{dvipdfmx}}\label{sec:alternative-latex}
%
% The alternative when using \LaTeX{} is similar the one elaborated in the previous section.
% The font mapline gets modified by \cs{special} primitive
@@ -1872,14 +2113,20 @@ end
%
% \MaybeStop{
% \clearpage
-% \phantomsection
-% \resetfancyhead
-% \addcontentsline{toc}{section}{Change History}
-% \PrintChanges
+% \begingroup
+% \setcounter{GlossaryColumns}{1}
+% \phantomsection
+% \label{sec:changes}
+% \resetfancyhead
+% \addtocontents{toc}{\bigskip}
+% \addcontentsline{toc}{section}{\numberline{}Change History}
+% \PrintChanges
+% \endgroup
%
% \clearpage
% \phantomsection
-% \addcontentsline{toc}{section}{References}
+% \addtocontents{toc}{\medskip}
+% \addcontentsline{toc}{section}{\numberline{}References}
% \begin{RaggedRight}
% \begin{thebibliography}{88}
% \bibitem{package:relsize}
@@ -1986,20 +2233,31 @@ end
%
%
% \clearpage
-% \begin{RaggedRight}
+% \begingroup
% \setcounter{IndexColumns}{2}
% \setlength{\columnsep}{30pt}
-% \label{sec:index}
% \phantomsection
-% \addcontentsline{toc}{section}{Index}
+% \label{sec:index}
+% \addtocontents{toc}{\medskip}
+% \addcontentsline{toc}{section}{\numberline{}Index}
+% \raggedcolumns
+% \def\codeidx##1{\linenumberdecoration\textbf{##1}}
+% \def\main##1{\linenumberdecoration\underbar{\textbf{##1}}}
+% \def\usage##1{\textit{\textbf{##1}}}
% \PrintIndex
-% \end{RaggedRight}
+% \label{secend:index}
+% \endgroup
% }
%
%
% \clearpage
+% \toccontinuesonnextpage
% \section{Package Code}\label{sec:package-code}
-% \addtocontents{toc}{\begingroup\small}
+% \addtocontents{toc}{\protect\begin{list}{}{\leftmargin=\subsectiontocindent\parsep=0pt}}
+% \addtocontents{toc}{\protect\item}
+% \addtocontents{toc}{\RaggedRight}
+% \addtocontents{toc}{\small}
+% \addtocontents{toc}{\tocsquashedsubsections}
% \addtocontents{toc}{\protect\begin{multicols}{2}}
% \addtocontents{toc}{\protect\raggedcolumns}
%
@@ -2008,12 +2266,15 @@ end
% and explain its implementation details.
%
%
+% \changes{v0.1a}{2024-6-2}{Add missing dependency on \packagename{etoolbox}.
+% Fix suggested by \code{mbertucci47}.}
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{synthslant}
- [2024/05/07 v0.1 Synthetically Slant glyphs]
+ [2024/07/08 v0.1a Synthetically Slant glyphs]
+\RequirePackage{etoolbox}
\RequirePackage{iftex}
\RequirePackage{xkeyval}
@@ -2094,12 +2355,16 @@ end
% \begin{macrocode}
\ExplSyntaxOn
\fp_compare:nNnTF {\synthslant} < {.0}
- {\PackageError{synthslant}{\string\synthslant\space <\space 0}
- {Pass\space a\space value\space that\space is\space non-negative.}}
+ {\PackageError{synthslant}
+ {\string\synthslant\space <\space 0}
+ {Pass\space a\space value\space that\space
+ is\space nonnegative.}}
{}
\fp_compare:nNnTF {\synthnegslant} > {.0}
- {\PackageError{synthslant}{\string\synthnegslant\space >\space 0}
- {Pass\space a\space value\space that\space is\space non-positive.}}
+ {\PackageError{synthslant}
+ {\string\synthnegslant\space >\space 0}
+ {Pass\space a\space value\space that\space
+ is\space nonpositive.}}
{}
\ExplSyntaxOff
@@ -2176,7 +2441,7 @@ end
% \end{macro}
%
%
-% \subsubsection{\acronym{PDF} Slant Engine}
+% \subsubsection{\texorpdfstring{\acronym{PDF}}{PDF} Slant Engine}
%
% The \acronym{PDF}-engine works well and it is the best tested alternative.
%
@@ -2251,13 +2516,15 @@ end
% \begin{macrocode}
\fp_compare:nNnTF {#1} >= {.0}
{
- \box_set_wd:Nn \l_tmpa_box {\l_tmpa_dim - #1\l_tmpb_dim}
+ \box_set_wd:Nn \l_tmpa_box
+ {\l_tmpa_dim - #1\l_tmpb_dim}
}
{
\draw_suspend_begin:
\kern#1\l_tmpb_dim
\draw_suspend_end:
- \box_set_wd:Nn \l_tmpa_box {\l_tmpa_dim + #1\l_tmpb_dim}
+ \box_set_wd:Nn \l_tmpa_box
+ {\l_tmpa_dim + #1\l_tmpb_dim}
}
% \end{macrocode}
%
@@ -2348,7 +2615,8 @@ end
% \begin{macrocode}
\newcommand*{\synthslantbox@fontspect@shear@box}[2]{
\begingroup
- \expandafter\fontspec[FakeSlant = #1]{\l_fontspec_family_tl}
+ \expandafter
+ \fontspec[FakeSlant=#1]{\l_fontspec_family_tl}
#2
\endgroup
}
@@ -2473,8 +2741,12 @@ end
% \begin{macrocode}
\ifnum\synthslant@engine=4% fontspec
\newrobustcmd*{\synthslantbox}[2]{%
- \edef\synthslant@slant@value{#1}% definition for compatibility of both branches
- \synthslantbox@fontspect@shear@box{\synthslant@slant@value}{#2}%
+% \end{macrocode}
+% The following (expanding) definition is only here for the compatibility of both branches.
+% \begin{macrocode}
+ \edef\synthslant@slant@value{#1}
+ \synthslantbox@fontspect@shear@box{\synthslant@slant@value}
+ {#2}%
}
% \end{macrocode}
%
@@ -2530,7 +2802,8 @@ end
\NewDocumentEnvironment{slantenvironment}{}
{\upshape
\ifcsdef{microtypecontext}
- {\expandafter\microtypecontext\expandafter{\slantcontext}}
+ {\expandafter\microtypecontext
+ \expandafter{\slantcontext}}
{}}
{\ifcsdef{endmicrotypecontext}
{\endmicrotypecontext}
@@ -2557,8 +2830,8 @@ end
% \end{macro}
%
% \begin{macro}{\synthslantbox@right@negslant@correction}
-% We could play the same trick here as in \cs{synthslantbox@right@slant@correction} and use
-% \cs{synthnegslant} instead of \cs{synthslant}. But my experiments show no need for a
+% We could play the same trick here as in \cs{synthslantbox@\-right@\-slant@\-correction} and
+% use \cs{synthnegslant} instead of \cs{synthslant}. But my experiments show no need for a
% correction. Anyhow, this macro may be convenient to override someday.
%
% \begin{macrocode}
@@ -2588,7 +2861,8 @@ end
\NewDocumentEnvironment{negslantenvironment}{}
{\itshape
\ifcsdef{microtypecontext}
- {\expandafter\microtypecontext\expandafter{\negslantcontext}}
+ {\expandafter\microtypecontext
+ \expandafter{\negslantcontext}}
{}}
{\ifcsdef{endmicrotypecontext}
{\endmicrotypecontext}
@@ -2622,7 +2896,7 @@ end
%
%
% \addtocontents{toc}{\protect\end{multicols}}
-% \addtocontents{toc}{\endgroup}
+% \addtocontents{toc}{\protect\end{list}}
%
%
% \Finale
@@ -4889,7 +5163,7 @@ KJ8AAAAASUVORK5CYII=
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
-\setlength{\overfullrule}{3pt}
+\setlength{\overfullrule}{0pt}
\pagestyle{plain}
@@ -5254,6 +5528,20 @@ right: \code{\cs{textsynthslant}\{Show line-break\cs{-}ing in a sen\cs{-}tence.\
%
%
%
+% \iffalse
+%<*minimal-test>
+\documentclass{minimal}
+
+\usepackage{synthslant}
+
+\begin{document}
+\textsynthslant{abc}
+\end{document}
+%</minimal-test>
+% \fi
+%
+%
+%
\endinput
%
%
diff --git a/Master/texmf-dist/source/latex/synthslant/synthslant.ins b/Master/texmf-dist/source/latex/synthslant/synthslant.ins
index 845b4378b19..f7027fe6f5e 100644
--- a/Master/texmf-dist/source/latex/synthslant/synthslant.ins
+++ b/Master/texmf-dist/source/latex/synthslant/synthslant.ins
@@ -1,11 +1,11 @@
%% Copyright (C) 2024 by Ch. L. Spiel
%%
%% This work may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3 of this
+%% of the LaTeX Project Public License, either version 1.3c of this
%% license or (at your option) any later version. The latest version
%% of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
@@ -23,11 +23,11 @@ This is a generated file.
Copyright (C) 2024 by Ch. L. Spiel
This work may be distributed and/or modified under the conditions
-of the LaTeX Project Public License, either version 1.3 of this
+of the LaTeX Project Public License, either version 1.3c of this
license or (at your option) any later version. The latest version
of this license is in
- http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
version 2003/12/01 or later.
This work has the LPPL maintenance status `maintained'.
@@ -46,12 +46,15 @@ shear-transform.mp, and title.mp.
\generate{\file{synthslant.sty}{\from{\source}{package}}
\file{synthslant-gauge.tex}{\from{\source}{gauge}}
- \file{synthslant.ist}{\from{\source}{index-style}}}
+ \file{synthslant-minimal-test.tex}{\from{\source}{minimal-test}}}
\nopostamble
-\generate{\file{title.mp}{\from{\source}{title}}}
-\generate{\file{shear-transform.mp}{\from{\source}{shear-transform}}}
+\generate{\file{shear-transform.mp}{\from{\source}{shear-transform}}
+ \file{synthslant.gst}{\from{\source}{changes-style}}
+ \file{synthslant.ist}{\from{\source}{index-style}}
+ \file{title.mp}{\from{\source}{title}}}
+
\nopreamble
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index 0f388b2542e..7e19e1e90f7 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2024-04-12} {0.99b}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-06-20} {0.99c}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -164,8 +164,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.99b", --TAGVERSION
- date = "2024-04-12", --TAGDATE
+ version = "0.99c", --TAGVERSION
+ date = "2024-06-20", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -196,8 +196,8 @@ ltx.@@.page will contain page data
ltx.@@.tables contains also data from mc and struct (from older code). This needs cleaning up.
There are certainly dublettes, but I don't dare yet ...
ltx.@@.func will contain (public) functions.
-ltx.@@.trace will contain tracing/loging functions.
-local funktions starts with __
+ltx.@@.trace will contain tracing/logging functions.
+local functions starts with __
functions meant for users will be in ltx.tag
functions
@@ -210,7 +210,7 @@ functions
ltx.@@.func.store_mc_kid (mcnum,kid,page): stores the mc-kids of mcnum on page page
ltx.@@.func.store_mc_in_page(mcnum,mcpagecnt,page): stores in the page table the number of mcnum on this page
ltx.@@.func.store_struct_mcabs (structnum,mcnum): stores relations structnum<->mcnum (abs)
- ltx.@@.func.mc_insert_kids (mcnum): inserts the /K entries for mcnum by wandering throught the [kids] table
+ ltx.@@.func.mc_insert_kids (mcnum): inserts the /K entries for mcnum by wandering through the [kids] table
ltx.@@.func.mark_page_elements(box,mcpagecnt,mccntprev,mcopen,name,mctypeprev) : the main function
ltx.@@.func.mark_shipout (): a wrapper around the core function which inserts the last EMC
ltx.@@.func.fill_parent_tree_line (page): outputs the entries of the parenttree for this page
@@ -827,7 +827,7 @@ end
% @@_activate_mark_space,
% ltx.@@.func.markspaceoff
% }
-% Theses functions add/remove the function which marks the spaces to the callbacks
+% These functions add/remove the function which marks the spaces to the callbacks
% |pre_linebreak_filter| and |hpack_filter|
% \begin{macrocode}
local function @@_activate_mark_space ()
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
index f786ede6156..345b2e35bad 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -74,7 +74,7 @@
% It relies currently on that the code, that saved the box, correctly sets
% the command \verb+\l_tag_box_\int_use:N #1_tl+ to a positive value.
% The LaTeX commands will do that automatically
-% at some time but it is in the responsability of the user to
+% at some time but it is in the responsibility of the user to
% ensure that when using low-level code.
% If the internal command doesn't exist the box is assumed to be untagged.
% \end{function}
@@ -331,7 +331,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-checks-code} {2024-06-20} {0.99c}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -639,7 +639,7 @@
% It relies on that the code that saved the box correctly set
% \verb+\l_tag_box_<box number>_tl+ to a positive value.
% The LaTeX commands will do that automatically
-% at some time but it is in the responsability of the user to
+% at some time but it is in the responsibility of the user to
% ensure that when using low-level code.
% If the internal command doesn't exist the box is assumed to be untagged.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
index d8cba421420..f07e5db3edc 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -58,10 +58,10 @@
% \section{The LaTeX namespace}
% This is the main new namespace. It is bound to change a lot!
% It lists the new tag, the rolemap and the namespace of the rolemap.
-% latex-lab has also a namespace module, which takes precendence!
+% latex-lab has also a namespace module, which takes precedence!
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-06-20} {0.99c}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -93,7 +93,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-06-20} {0.99c}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -107,7 +107,7 @@ subparagraph, H6,pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-06-20} {0.99c}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -175,7 +175,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-06-20} {0.99c}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
@@ -232,7 +232,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-06-20} {0.99c}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -430,7 +430,7 @@ xor,xor,mathml,
% \section{Rule naming}
% \begin{macro}{\c_@@_role_rules_prop}
% These two properties map the rule strings to numbers and back.
-% There are in tagpdf-data.dtx near the csv files for easier maintainance.
+% There are in tagpdf-data.dtx near the csv files for easier maintenance.
% \begin{macrocode}
%<*package>
\prop_const_from_keyval:Nn \c_@@_role_rules_prop
@@ -467,7 +467,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-06-20} {0.99c}
,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
@@ -522,7 +522,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-06-20} {0.99c}
,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
index b1ce874db69..0cef27fd3b8 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-06-20} {0.99c}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-06-20} {0.99c}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -393,12 +393,12 @@
% \end{macro}
% \begin{macro}{\@@_add_missing_mcs_to_stream:Nn}
-% This is the main command to add mc to the stream. It is therefor
+% This is the main command to add mc to the stream. It is therefore
% guarded by the mc-boolean.
%
% If we aren't in the main stream then processing is a bit more
% complicated because to get at the marks in the box we need to
-% artifically split it and then look at the split marks.
+% artificially split it and then look at the split marks.
%
% First argument is the box to update and the second is the \enquote{stream}.
% In lua mode the command is a no-op.
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
index 9db6cc95fa1..7dd309c5f53 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,10 +46,10 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{implementation}
-% The code is splitted into three parts: code shared by all engines,
+% The code is split into three parts: code shared by all engines,
% code specific to luamode and code not used by luamode.
%
% \section{Marked content code -- luamode code}
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-06-20} {0.99c}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-06-20} {0.99c}
{part of tagpdf - debugging code related to marking chunks - lua mode}
%</debug>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
index aeadb889d46..c96fd8c4c81 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -175,13 +175,13 @@
% \end{function}
% \end{documentation}
% \begin{implementation}
-% The code is splitted into three parts: code shared by all engines,
+% The code is split into three parts: code shared by all engines,
% code specific to luamode and code not used by luamode.
% \section{Marked content code -- shared}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-06-20} {0.99c}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
index de239c2db79..80f9da0f6bd 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
@@ -33,7 +33,7 @@
%</driver>
% \fi
% \title{^^A
-% The \pkg{tagpdf-roles} module\\ Tags, roles and namesspace code ^^A
+% The \pkg{tagpdf-roles} module\\ Tags, roles and namespace code ^^A
% \\ Part of the tagpdf package
% }
%
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-roles-code} {2024-06-20} {0.99c}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
@@ -190,7 +190,7 @@
% \end{variable}
%
% \begin{variable}{\g_@@_role_tags_class_prop}
-% With pdf 2.0 we store the class in the NS dependant props.
+% With pdf 2.0 we store the class in the NS dependent props.
% With pdf <2.0 we store for now the type(s) of a tag in a common
% prop.
% Tags that are rolemapped should get the type from
@@ -750,19 +750,31 @@
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
- \cs_if_exist:NT \chapter
- {
- \prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
- {
- \@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
- }
- }
+ \bool_lazy_and:nnT
+ {
+ \cs_if_exist_p:N \chapter
+ }
+ {
+ \cs_if_exist_p:N \c@chapter
+ }
+ {
+ \prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
+ {
+ \@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
+ }
+ }
}
}
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
- \cs_if_exist:NT \chapter
+ \bool_lazy_and:nnT
+ {
+ \cs_if_exist_p:N \chapter
+ }
+ {
+ \cs_if_exist_p:N \c@chapter
+ }
{
\prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
{
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
index 62c9fd1ecab..a29c8f0fb3d 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \begin{function}{activate/space (setup-key),interwordspace (deprecated)}
@@ -58,7 +58,7 @@
% This key is deprecated. Use |debug/show=spaces| instead.
% This key works only with luatex and shows with small red
% bars where spaces have been inserted. This is only for debugging and
-% is not completly reliable (and change affect other literals and tagging), so it
+% is not completely reliable (and change affect other literals and tagging), so it
% should be used with care.
% \end{function}
% \end{documentation}
@@ -66,12 +66,12 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-space-code} {2024-06-20} {0.99c}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
% \section{Code for interword spaces}
-% The code is engine/backend dependant. Basically only pdftex and luatex
+% The code is engine/backend dependent. Basically only pdftex and luatex
% support real space chars. Most of the code for luatex which uses attributes
% is in the lua code, here are only the keys.
%
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
index 04ffa900cc3..963852b1fca 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -95,7 +95,7 @@
% This inserts an annotation in the structure. \meta{object reference}
% is there reference to the annotation. \meta{struct parent number}
% should be the same number as had been inserted with \cs{tag_struct_parent_int:}
-% as |StructParent| value to the dictionary of the annotion.
+% as |StructParent| value to the dictionary of the annotation.
% The command will increase the value of the counter
% used by \cs{tag_struct_parent_int:}.
% \end{function}
@@ -147,7 +147,7 @@
% needed as you can only use structures already defined), and by the
% |ref| key (which can refer to future structures).
% Internally the label name will start with \texttt{tagpdfstruct-} and it stores
-% the two attributs |tagstruct| (the structure number) and |tagstructobj| (the
+% the two attributes |tagstruct| (the structure number) and |tagstructobj| (the
% object reference).
% \end{function}
% \begin{function}{parent (struct-key)}
@@ -285,7 +285,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-struct-code} {2024-06-20} {0.99c}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -323,7 +323,7 @@
% in generic mode it can happen after
% a page break that we have to inject into a structure
% sequence an additional mc after. We will store this additional
-% info in a property. The key is the absolut mc num, the value the pdf directory.
+% info in a property. The key is the absolute mc num, the value the pdf directory.
% \begin{macrocode}
\@@_prop_new:N \g_@@_struct_cont_mc_prop
% \end{macrocode}
@@ -419,7 +419,7 @@
T, %title, value in () or <>
Lang, %language
Alt, % value in () or <>
- E, % abreviation
+ E, % abbreviation
ActualText,
AF, %pdf 2.0, array of dict, associated files
NS, %pdf 2.0, dict, namespace
@@ -523,7 +523,7 @@
{ g_@@_struct_#1_prop }{#2}{#3}
%<debug>\prop_gput:cnn { g_@@_struct_debug_#1_prop } {#2} {#3}
}
-\cs_generate_variant:Nn \@@_struct_prop_gput:nnn {nne,nee,nno}
+\cs_generate_variant:Nn \@@_struct_prop_gput:nnn {onn,nne,nee,nno}
%</package|debug>
% \end{macrocode}
% \end{macro}
@@ -902,7 +902,7 @@
% Basically it does what |\pdfdict_use:n| does.
% This is used a lot so should be rather fast.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_get_dict_content:nN #1 #2 %#1: stucture num
+\cs_new_protected:Npn \@@_struct_get_dict_content:nN #1 #2 %#1: structure num
{
\tl_clear:N #2
\prop_map_inline:cn { g_@@_struct_#1_prop }
@@ -1270,7 +1270,7 @@
% extension.
% AF/AFref is an array and can be used more than once, so we store it in a tl.
% which is expanded.
-% AFinline currently uses the fix extention txt.
+% AFinline currently uses the fix extension txt.
% texsource is a special variant which creates a tex-file, it expects a
% tl-var as value (e.g. from math grabbing)
%
@@ -1579,6 +1579,7 @@
{ g_@@_struct_ \l_@@_struct_stack_parent_tmpa_tl _prop}
{S}
\l_@@_tmpa_tl
+ \quark_if_no_value:NT\l_@@_tmpa_tl{\tl_set:Nn \l_@@_tmpa_tl{UNKNOWN}}
\msg_warning:nneee
{ tag }
{role-parent-child}
@@ -1936,7 +1937,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-attr-code} {2024-06-20} {0.99c}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
@@ -1962,7 +1963,7 @@
\tl_new:N \l_@@_attr_value_tl
\prop_new:N \g_@@_attr_objref_prop %will contain obj num of used attributes
% \end{macrocode}
-% This seq is currently kept for compability with the table code.
+% This seq is currently kept for compatibility with the table code.
% \begin{macrocode}
\seq_new:N\g_@@_attr_class_used_seq
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
index 63192505236..04b9309597f 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-tree-code} {2024-06-20} {0.99c}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
@@ -275,6 +275,10 @@
{
\l_@@_tmpa_tl
}
+% \end{macrocode}
+% Better put S back, see https://github.com/latex3/tagging-project/issues/86
+% \begin{macrocode}
+ \prop_gput:cnn { g_@@_struct_1_prop } {S}{ /StructTreeRoot }
}
% \end{macrocode}
% \end{macro}
@@ -506,7 +510,7 @@
{
\tl_clear:N \l_@@_tmpa_tl
% \end{macrocode}
-% We process the older sec for compability with the table code.
+% We process the older sec for compatibility with the table code.
% TODO: check if still needed
% \begin{macrocode}
\seq_map_inline:Nn \g_@@_attr_class_used_seq
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
index 099cd95299f..916ff041d01 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99c, released 2024-06-20}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -309,7 +309,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-user} {2024-06-20} {0.99c}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -848,7 +848,7 @@
}
% \end{macrocode}
% \end{macro}
-% TEMPORARLY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
+% TEMPORARY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
% \begin{macrocode}
\AddToHook{package/latex-lab-testphase-sec/after}
{
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index 064490c2c4d..e58570340e5 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
@@ -87,7 +87,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf} {2024-06-20} {0.99c}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -113,7 +113,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-debug} {2024-06-20} {0.99c}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -136,7 +136,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-base} {2024-06-20} {0.99c}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -171,15 +171,16 @@
% possible, so we define a command which a special in the relevant backends:
% \begin{macrocode}
%<*base>
+\cs_new_protected:Npn \@@_whatsits: {}
\AddToHook{begindocument}
{
\str_case:VnF \c_sys_backend_str
{
- { luatex } { \cs_new_protected:Npn \@@_whatsits: {} }
- { dvisvgm } { \cs_new_protected:Npn \@@_whatsits: {} }
+ { luatex } { \cs_set_protected:Npn \@@_whatsits: {} }
+ { dvisvgm } { \cs_set_protected:Npn \@@_whatsits: {} }
}
{
- \cs_new_protected:Npn \@@_whatsits: {\tex_special:D {} }
+ \cs_set_protected:Npn \@@_whatsits: {\tex_special:D {} }
}
}
%</base>
diff --git a/Master/texmf-dist/source/latex/oberdiek/telprint.dtx b/Master/texmf-dist/source/latex/telprint/telprint.dtx
index 57152c66517..74bb22ea8af 100644
--- a/Master/texmf-dist/source/latex/oberdiek/telprint.dtx
+++ b/Master/texmf-dist/source/latex/telprint/telprint.dtx
@@ -1,13 +1,13 @@
% \iffalse meta-comment
%
% File: telprint.dtx
-% Version: 2016/05/16 v1.11
+% Version: 2024-07-26 v1.12
% Info: Format German phone numbers
%
% Copyright (C)
% 1996, 1997, 2004-2008 Heiko Oberdiek
-% 2016-2019 Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% 2016-2024 Oberdiek Package Support Group
+% https://github.com/ho-tex/telprint/issues
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -23,7 +23,7 @@
%
% The Current Maintainers of this work are
% Heiko Oberdiek and the Oberdiek Package Support Group
-% https://github.com/ho-tex/oberdiek/issues
+% https://github.com/ho-tex/telprint/issues
%
% The Base Interpreter refers to any `TeX-Format',
% because some files are installed in TDS:tex/generic//.
@@ -34,8 +34,8 @@
% telprint-test1.tex.
%
% Distribution:
-% CTAN:macros/latex/contrib/oberdiek/telprint.dtx
-% CTAN:macros/latex/contrib/oberdiek/telprint.pdf
+% CTAN:macros/latex/contrib/telprint/telprint.dtx
+% CTAN:macros/latex/contrib/telprint/telprint.pdf
%
% Unpacking:
% (a) If telprint.ins is present:
@@ -56,7 +56,7 @@
% use A4 as paper format:
% \PassOptionsToClass{a4paper}{article}
%
-% Programm calls to get the documentation (example):
+% Program calls to get the documentation (example):
% pdflatex telprint.dtx
% makeindex -s gind.ist telprint.idx
% pdflatex telprint.dtx
@@ -64,9 +64,9 @@
% pdflatex telprint.dtx
%
% Installation:
-% TDS:tex/generic/oberdiek/telprint.sty
-% TDS:doc/latex/oberdiek/telprint.pdf
-% TDS:source/latex/oberdiek/telprint.dtx
+% TDS:tex/generic/telprint/telprint.sty
+% TDS:doc/latex/telprint/telprint.pdf
+% TDS:source/latex/telprint/telprint.dtx
%
%<*ignore>
\begingroup
@@ -83,7 +83,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: telprint 2016/05/16 v1.11 Format German phone numbers (HO)}
+\Msg{* Package: telprint 2024-07-26 v1.12 Format German phone numbers (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -95,11 +95,11 @@
This is a generated file.
Project: telprint
-Version: 2016/05/16 v1.11
+Version: 2024-07-26 v1.12
Copyright (C)
1996, 1997, 2004-2008 Heiko Oberdiek
- 2016-2019 Oberdiek Package Support Group
+ 2016-2024 Oberdiek Package Support Group
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -115,7 +115,7 @@ This work has the LPPL maintenance status "maintained".
The Current Maintainers of this work are
Heiko Oberdiek and the Oberdiek Package Support Group
-https://github.com/ho-tex/oberdiek/issues
+https://github.com/ho-tex/telprint/issues
The Base Interpreter refers to any `TeX-Format',
@@ -132,9 +132,9 @@ and the derived files
\generate{%
\file{telprint.ins}{\from{telprint.dtx}{install}}%
\file{telprint.drv}{\from{telprint.dtx}{driver}}%
- \usedir{tex/generic/oberdiek}%
+ \usedir{tex/generic/telprint}%
\file{telprint.sty}{\from{telprint.dtx}{package}}%
-% \usedir{doc/latex/oberdiek/test}%
+% \usedir{doc/latex/telprint/test}%
% \file{telprint-test1.tex}{\from{telprint.dtx}{test1}}%
}
@@ -162,7 +162,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{telprint.drv}%
- [2016/05/16 v1.11 Format German phone numbers (HO)]%
+ [2024-07-26 v1.12 Format German phone numbers (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2011/11/22]
\usepackage[ngerman,english]{babel}
@@ -177,9 +177,9 @@ and the derived files
% \GetFileInfo{telprint.drv}
%
% \title{The \xpackage{telprint} package}
-% \date{2016/05/16 v1.11}
+% \date{2024-07-26 v1.12}
% \author{Heiko Oberdiek\thanks
-% {Please report any issues at \url{https://github.com/ho-tex/oberdiek/issues}}}
+% {Please report any issues at \url{https://github.com/ho-tex/telprint/issues}}}
%
% \maketitle
%
@@ -397,7 +397,7 @@ and the derived files
\fi
\expandafter\x\csname ver@telprint.sty\endcsname
\ProvidesPackage{telprint}%
- [2016/05/16 v1.11 Format German phone numbers (HO)]%
+ [2024-07-26 v1.12 Format German phone numbers (HO)]%
% \end{macrocode}
%
% \subsection{Catcodes}
@@ -467,7 +467,11 @@ and the derived files
% \begin{macro}{\telspace}
% \begin{macrocode}
\DeclareRobustCommand*{\telspace}[1]{\def\TELspace{#1}}
-\telspace{{}$\,${}}
+\ifcsname LaTeXReleaseInfo\endcsname
+ \telspace{\,}
+\else
+ \telspace{{}$\,${}}
+\fi
% \end{macrocode}
% \end{macro}
% \begin{macro}{\telhyphen}
@@ -615,30 +619,10 @@ and the derived files
% \paragraph{Package.} This package is available on
% CTAN\footnote{\CTANpkg{telprint}}:
% \begin{description}
-% \item[\CTAN{macros/latex/contrib/oberdiek/telprint.dtx}] The source file.
-% \item[\CTAN{macros/latex/contrib/oberdiek/telprint.pdf}] Documentation.
-% \end{description}
-%
-%
-% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
-% are also available in a TDS compliant ZIP archive. There
-% the packages are already unpacked and the documentation files
-% are generated. The files and directories obey the TDS standard.
-% \begin{description}
-% \item[\CTANinstall{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \item[\CTAN{macros/latex/contrib/telprint/telprint.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/telprint/telprint.pdf}] Documentation.
% \end{description}
-% \emph{TDS} refers to the standard ``A Directory Structure
-% for \TeX\ Files'' (\CTANpkg{tds}). Directories
-% with \xfile{texmf} in their name are usually organized this way.
%
-% \subsection{Bundle installation}
-%
-% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
-% TDS tree (also known as \xfile{texmf} tree) of your choice.
-% Example (linux):
-% \begin{quote}
-% |unzip oberdiek.tds.zip -d ~/texmf|
-% \end{quote}
%
% \subsection{Package installation}
%
@@ -655,9 +639,9 @@ and the derived files
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
-% telprint.sty & tex/generic/oberdiek/telprint.sty\\
-% telprint.pdf & doc/latex/oberdiek/telprint.pdf\\
-% telprint.dtx & source/latex/oberdiek/telprint.dtx\\
+% telprint.sty & tex/generic/telprint/telprint.sty\\
+% telprint.pdf & doc/latex/telprint/telprint.pdf\\
+% telprint.dtx & source/latex/telprint/telprint.dtx\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
@@ -836,6 +820,9 @@ and the derived files
% \item
% Documentation updates.
% \end{Version}
+% \begin{Version}{2024-07-26 v1.12}
+% \item Avoid math in \cs{telspace} for better tagging support.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/texvc/Makefile b/Master/texmf-dist/source/latex/texvc/Makefile
new file mode 100644
index 00000000000..d32d473d3bd
--- /dev/null
+++ b/Master/texmf-dist/source/latex/texvc/Makefile
@@ -0,0 +1,17 @@
+PACKAGE = texvc
+all: $(PACKAGE).pdf
+
+$(PACKAGE).sty: $(PACKAGE).dtx $(PACKAGE).ins
+ pdflatex $(PACKAGE).ins
+
+$(PACKAGE).idx: $(PACKAGE).dtx $(PACKAGE).sty
+ pdflatex $(PACKAGE).dtx
+
+$(PACKAGE).ind: $(PACKAGE).idx $(PACKAGE).sty
+ makeindex -s gind.ist $(PACKAGE).idx
+
+$(PACKAGE).gls: $(PACKAGE).idx $(PACKAGE).sty
+ makeindex -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo
+
+$(PACKAGE).pdf: $(PACKAGE).dtx $(PACKAGE).sty $(PACKAGE).ind $(PACKAGE).gls
+ pdflatex $(PACKAGE).dtx
diff --git a/Master/texmf-dist/source/latex/texvc/texvc.dtx b/Master/texmf-dist/source/latex/texvc/texvc.dtx
index 429a1a5e6e1..7309d0266f7 100644
--- a/Master/texmf-dist/source/latex/texvc/texvc.dtx
+++ b/Master/texmf-dist/source/latex/texvc/texvc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2015 by Moritz Schubotz
+% Copyright (C) 2015-2018 by Moritz Schubotz
% -----------------------------------
%
% This file may be distributed and/or modified under the
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{texvc}
%<*package>
-[2018/03/04 v1.1 Bugfixes]
+[2020/02/09 v1.2 Document deprecations]
%</package>
%<package>
%<package>\RequirePackage{amsmath}
@@ -42,7 +42,7 @@
%<package>
%<*driver>
\documentclass{ltxdoc}
-\usepackage{texvc}[2018/03/04]
+\usepackage{texvc}[2020/02/09]
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -75,19 +75,21 @@
%
% \changes{v1.0}{2015/11/09}{Initial version}
% \changes{v1.1}{2018/03/04}{Fix bug with varcoppa, document usage of or}
+% \changes{v1.2}{2020/02/09}{Document deprecations}
% \GetFileInfo{texvc.sty}
-%
+% \newcommand{\deprecated}{\emph{This command is deprecated.}}
% \DoNotIndex{\newcommand,\newenvironment}
%
% \title{The \textsf{texvc} package\thanks{This document
% corresponds to \textsf{texvc}~\fileversion,
% dated \filedate.}}
-% \author{Moritz Schubotz \\ \texttt{moritz.schubotz@uni-konstanz.de}}
-%
+% \author{Moritz Schubotz \\ \texttt{moritz.schubotz@fiz-karlsruhe.de}}
+% \date{\filedate}
+%
% \maketitle
%
% \begin{abstract}
-% This package provides all\footnote{The command \texttt{\textbackslash or} is only availible if custom code is copied into your \LaTeX-file. See page \pageref{cmd.or} for details.} LaTeX command availible in MediaWiki.
+% This package provides all\footnote{The command \texttt{\textbackslash or} is only available if custom code is copied into your \LaTeX-file. See page \pageref{cmd.or} for details.} LaTeX command available in MediaWiki.
% This includes several packages like amsmath, and adds some specific
% commands such as \texttt{\textbackslash Reals}.
% \end{abstract}
@@ -95,7 +97,7 @@
% \section{Provided Macros}
%
% \subsection{Arrows}
-% The first group of MediaWiki coustom command (other\_delimiters2) defines short hand notations for some arrorws.
+% The first group of MediaWiki custom command (other\_delimiters2) defines short hand notations for some arrows.
%
% \DescribeMacro{\darr} Short hand notation for arrow $\downarrow.$
%
@@ -122,12 +124,12 @@
%
% \subsection{Literals}
%
-% The second group of MediaWiki coustom commands (other\_litereals3) defines short hand notations for some literals.
+% The second group of MediaWiki custom commands (other\_litereals3) defines short hand notations for some literals.
%
-% \DescribeMacro{\C} Short hand notation for literal $\mathbb{C}.$
+% \DescribeMacro{\C} Short hand notation for literal $\mathbb{C}.$ \deprecated
%
%
-% \DescribeMacro{\H} Short hand notation for literal $\mathbb{H}.$
+% \DescribeMacro{\H} Short hand notation for literal $\mathbb{H}.$ \deprecated
%
%
% \DescribeMacro{\N} Short hand notation for literal $\mathbb{N}.$
@@ -151,10 +153,10 @@
% \DescribeMacro{\Alpha} Short hand notation for literal $\mathrm{A}.$
%
%
-% \DescribeMacro{\and} Short hand notation for literal $\land.$
+% \DescribeMacro{\and} Short hand notation for literal $\land.$ \deprecated
%
%
-% \DescribeMacro{\ang} Short hand notation for literal $\angle.$
+% \DescribeMacro{\ang} Short hand notation for literal $\angle.$ \deprecated
%
%
% \DescribeMacro{\Beta} Short hand notation for literal $\mathrm{B}.$
@@ -277,10 +279,10 @@
% \DescribeMacro{\Omicron} Short hand notation for literal $\mathrm{O}.$
%
%
-% \DescribeMacro{\or} Short hand notation for literal $\lor.$
+% \DescribeMacro{\or} Short hand notation for literal $\lor.$ \deprecated
%
%
-% \DescribeMacro{\part} Short hand notation for literal $\partial.$
+% \DescribeMacro{\part} Short hand notation for literal $\partial.$ \deprecated
%
%
% \DescribeMacro{\plusmn} Short hand notation for literal $\pm.$
@@ -342,7 +344,21 @@
%
% \DescribeMacro{\Zeta} Short hand notation for literal $\mathrm{Z}.$
%
-%
+% \section{Deprecations}
+% According to the decision of \emph{Wikimedia Community User Group Math}\footnote{\url{https://meta.wikimedia.org/w/index.php?oldid=19705444}} the following macros have been deprecated\footnote{See \url{https://phabricator.wikimedia.org/T197842} for the discussion.}:
+% \begin{enumerate}
+% \item \verb|$|
+% \item \verb|%|
+% \item \verb|\and|
+% \item \verb|\or|
+% \item \verb|\part|
+% \item \verb|\ang|
+% \item \verb|\C|
+% \item \verb|\H|
+% \item \verb|\bold|
+% \item \verb|\Bbb|
+% \end{enumerate}
+% The commands 1,2,4,9,10 have never been part of this package, but were available from within Wikipedia.
% \StopEventually{}
%
% \section{Implementation}
diff --git a/Master/texmf-dist/source/latex/texvc/texvc.ins b/Master/texmf-dist/source/latex/texvc/texvc.ins
index 5343a6a94fb..0c12dd61eb8 100644
--- a/Master/texmf-dist/source/latex/texvc/texvc.ins
+++ b/Master/texmf-dist/source/latex/texvc/texvc.ins
@@ -1,42 +1,42 @@
-%%
-%% Copyright (C) 2015 by Moritz Schubotz
-%%
-%% 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
-%% version. The latest version of this license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% and version 1.3 or later is part of all distributions of
-%% LaTeX version 2005/12/01 or later.
-%%
-\input docstrip.tex
-\keepsilent
-\usedir{tex/latex/texvc}
-\askforoverwritefalse
-\preamble
-This is a generated file.
-Copyright (C) 2015 by Moritz Schubotz
-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
-version. The latest version of this license is in:
-http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of
-LaTeX version 2005/12/01 or later.
-\endpreamble
-\generate{\file{texvc.sty}{\from{texvc.dtx}{package}}}
-\Msg{*********************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the}
-\Msg{* following file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* \space\space texvc.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file texvc.dtx}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*********************************************************}
-\endbatchfile
+%%
+%% Copyright (C) 2015-2018 by Moritz Schubotz
+%%
+%% 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
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+\input docstrip.tex
+\keepsilent
+\usedir{tex/latex/texvc}
+\askforoverwritefalse
+\preamble
+This is a generated file.
+Copyright (C) 2015-2018 by Moritz Schubotz
+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
+version. The latest version of this license is in:
+http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+\endpreamble
+\generate{\file{texvc.sty}{\from{texvc.dtx}{package}}}
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space texvc.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file texvc.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
index ea4ac03f229..e6f3e46ad82 100644
--- a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
+++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
@@ -14,7 +14,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2024/05/20 7.5.1 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2024/07/01 7.5.2 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -251,7 +251,7 @@
% $ bibtex thuthesis-example.aux # 生成 bbl 文件
% $ bibtex thuthesis-example-appendix-a.aux # 附录 A 的的参考文献
% $ bibtex thuthesis-example-appendix-b.aux # 附录 B 的的参考文献……
-% $ bibtex thuthesis-example-index.aux # 本科生的书面翻译对应的原文索引
+% $ bibtex thuthesis-example-index-1.aux # 本科生的书面翻译对应的原文索引
% $ xelatex thuthesis-example.tex # 解决引用
% $ xelatex thuthesis-example.tex # 生成论文 PDF
%
@@ -813,7 +813,7 @@
% }
% \end{latex}
%
-% 用户也可以逐项修改数学样式。
+% 用户也可以逐项修改数学样式,包括:
% \newcommand\dif{\mathop{}\!\mathrm{d}}
% \begin{enumerate}
% \item \DescribeOption{uppercase-greek}
@@ -885,12 +885,16 @@
% 模板作了处理,用户可以直接使用这些宏包的命令,如 \cs{bm}、\cs{mathscr}、
% \cs{uppi}。
%
-% 另外,模板还为 `math-font` 提供了传统的 Type 1 字体 \option{newtx}。
+% 另外,模板还为 |math-font| 提供了传统的 Type 1 字体 \option{newtx}。
% 该选项会调用 \pkg{newtxmath} 宏包。
% 但是,如果西文字体已经使用了 OpenType 的 Times New Roman,
% 混用 Type 1 字体可能会导致问题,尤其是使用 \pkg{siunitx} 宏包时。
% 该选项还处于测试阶段,需要谨慎使用。
%
+% \DescribeOption{eqn-paren-style}
+% 控制中文论文中,数学公式编号两边的括号样式。可选项包括:\option{full}(全角,默认) / \option{half}(半角)。
+% 在语言为英语(|language = english|)时,此选项无效,仅使用半角括号。
+%
% \subsubsection{定理环境}
% \label{sec:theorem}
% \thuthesis{} 定义了常用的数学环境:
@@ -1269,7 +1273,7 @@
% \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{thuthesis}
-%<cls>[2024/05/20 7.5.1 Tsinghua University Thesis Template]
+%<cls>[2024/07/01 7.5.2 Tsinghua University Thesis Template]
% \end{macrocode}
%
% 报错
@@ -1330,7 +1334,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{7.5.1}
+\def\version{7.5.2}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -1658,6 +1662,17 @@
},
default = print,
},
+% \end{macrocode}
+%
+% 数学公式编号的括号使用全角还是半角。
+% \begin{macrocode}
+ eqn-paren-style = {
+ name = eqn@paren@style,
+ choices = {
+ full,
+ half,
+ }
+ },
}
\newif\ifthu@degree@graduate
\newcommand\thu@set@graduate{%
@@ -3511,10 +3526,23 @@
% 中文模板的公式编号使用中文括号。需要修改 \pkg{amsmath} 的 \cs{tagform@}。
% 这里中文的 \cs{unskip} 是为了“|式~\eqref|”这样的写法不产生额外的空格。
% \begin{macrocode}
+\newcommand\thu@eqn@left@paren{(}
+\newcommand\thu@eqn@right@paren{)}
+\newcommand\thu@set@eqn@paren@style{%
+ \ifthu@eqn@paren@style@full
+ \renewcommand\thu@eqn@left@paren{(}%
+ \renewcommand\thu@eqn@right@paren{)}%
+ \else
+ \renewcommand\thu@eqn@left@paren{(}%
+ \renewcommand\thu@eqn@right@paren{)}%
+ \fi
+}
+\thu@set@eqn@paren@style
+\thu@option@hook{eqn-paren-style}{\thu@set@eqn@paren@style}
\newcommand\thu@put@parentheses[1]{%
\ifthu@language@chinese
\unskip
- (#1)%
+ \thu@eqn@left@paren#1\thu@eqn@right@paren
\else
(#1)%
\fi
@@ -6347,9 +6375,11 @@
% \begin{macrocode}
\newenvironment{translation-index}{}{}
\AtEndOfPackageFile*{bibunits}{
+ \newcounter{thu@translation@index}%
\renewenvironment{translation-index}{%
+ \global\advance\c@thu@translation@index\@ne
\begin{bibunit}%
- \renewcommand\@bibunitname{\jobname-index}%
+ \renewcommand\@bibunitname{\jobname-index-\arabic{thu@translation@index}}%
\renewcommand\bibname{书面翻译对应的原文索引}%
\thu@set@survey@bibheading
}{%
diff --git a/Master/texmf-dist/source/latex/typog/Makefile b/Master/texmf-dist/source/latex/typog/Makefile
index bb3c83ab24b..1b7e0b21a39 100644
--- a/Master/texmf-dist/source/latex/typog/Makefile
+++ b/Master/texmf-dist/source/latex/typog/Makefile
@@ -7,8 +7,9 @@
SHELL := /bin/sh
-LATEX := /usr/bin/env max_print_line=2147483647 pdflatex
-LATEX_FLAGS := -file-line-error -halt-on-error -interaction=nonstopmode
+LATEX_PROPER := pdflatex
+LATEX := /usr/bin/env max_print_line=2147483647 $(LATEX_PROPER)
+LATEX_FLAGS := -file-line-error -halt-on-error -interaction=nonstopmode -output-directory=.
LATEX_RERUN_TRIGGER := '^Package rerunfilecheck Warning: File [^ ]* has changed'
LATEX_WARNING := '^LaTeX (|[A-Za-z0-9_]* )Warning:'
@@ -16,6 +17,10 @@ MAKEINDEX := makeindex
MAKEINDEX_FLAGS := -q
+MAKEINFO := makeinfo
+MAKEINFO_FLAGS := --no-split
+
+
METAPOST := mpost
METAPOST_FLAGS := -file-line-error -interaction=nonstopmode -tex=latex
@@ -24,8 +29,12 @@ PODCHECKER := podchecker
PODCHECKER_FLAGS := -warnings
+define SED_VERSION_REGEXP
+^\( *\|\\ProvidesPackage{[^}]*} *\)\[\([0-9][0-9]*/[0-9][0-9]*/[0-9][0-9]*\) *v\([^ ]*\) *\([^]]*\)].*$$
+endef
+
POD2MAN := pod2man
-POD2MAN_FLAGS := $$(sed -ne 's,\\ProvidesPackage{typog}\[\([0-9][0-9]*/[0-9][0-9]*/[0-9][0-9]*\) *v\([^ ]*\) .*$$,--date=\1 --release=\2,p' < typog.sty)
+POD2MAN_FLAGS := $$(sed -ne 's,$(SED_VERSION_REGEXP),--date=\2 --release=\3,p' < typog.sty)
POD2TEXI := pod2texi
@@ -33,31 +42,32 @@ POD2TEXI_FLAGS :=
GROFF := groff
-## Codes of serif fonts that work for PDF output
+## Codes of fonts that work for PDF output as by the contents
+## of "/usr/share/groff/current/font/devpdf".
+##
+## Serif
## BM: URW Bookman L
## N: URW Century Schoolbook L
## P: URW Palladio L
## T: URW Nimbus Roman No9 L
+##
+## Sans Serif
+## A: Avantgarde
+## H: Helvetica
+##
+## Monospace
+## C: Courier
GROFF_FLAGS := -Tpdf -dpaper=a4 -fP -man -wall
-SPELLCHECK := aspell
-SPELLCHECK_FLAGS := \
- --add-tex-command='citenum p' --add-tex-command='code p' \
- --add-tex-command='Cref p' --add-tex-command='cref p' \
- --add-tex-command='cs p' \
- --add-tex-command='DescribeEnv p' --add-tex-command='DescribeMacro p' \
- --add-tex-command='marg p' --add-tex-command='meta p' \
- --add-tex-command='oarg p' \
- --lang=en_US --mode=tex
-
-
-SOURCE_FILES := LICENSE Makefile typog.dtx typog.ins
+PROJECT_NAME := typog
+SOURCE_FILES := LICENSE Makefile README.md typog.dtx typog.ins
+DOCUMENTATION_FILES := typog-example.pdf typog-grep.1.pdf typog.pdf
.PHONY: all
-all: sty pdf man
+all: sty pdf bin man
.PHONY: sty
@@ -65,7 +75,7 @@ sty: typog.sty
.PHONY: pdf
-pdf: doc ex nomt
+pdf: doc ex test
.PHONY: doc
@@ -76,69 +86,88 @@ doc: typog.pdf
ex: typog-example.pdf
-.PHONY: nomt
-nomt: typog-nomt.pdf
+.PHONY: test
+test: typog-minimal-test.pdf typog-without-microtype-test.pdf
+
+
+.PHONY: bin
+bin: typog-grep
.PHONY: man
man: typog-grep.1
-.PHONY: cpio
-cpio:
- cd ..; \
- echo $(addprefix typog/,$(SOURCE_FILES)) | \
- cpio -o | \
- gzip > "typog-$$(date +%Y-%m-%d).cpio.gz"
+export TEMPORARY_DIRECTORY
+
+
+.PHONY: dist
+dist:
+ $(eval TEMPORARY_DIRECTORY := $(shell mktemp -d))
+ trap '$(RM) -r $(TEMPORARY_DIRECTORY); exit 1' HUP INT QUIT TERM; $(MAKE) __dist
+ $(RM) -r $(TEMPORARY_DIRECTORY)
+
+
+.PHONY: __dist
+__dist: LATEX_FLAGS += -interaction=batchmode
+__dist: $(DOCUMENTATION_FILES)
+ test -d '$(TEMPORARY_DIRECTORY)'
+ test -w '$(TEMPORARY_DIRECTORY)'
+ mkdir $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)
+ cp $(SOURCE_FILES) $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)
+ mkdir $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)/docs
+ cp $(DOCUMENTATION_FILES) $(TEMPORARY_DIRECTORY)/$(PROJECT_NAME)/docs
+ tar czf $(PROJECT_NAME).tar.gz -C $(TEMPORARY_DIRECTORY) $(PROJECT_NAME)
-.PHONY: tar
-tar:
- cd ..; \
- tar czf "typog-$$(date +%Y-%m-%d).tar.gz" $(addprefix typog/,$(SOURCE_FILES))
+.PHONY: distcheck
+distcheck: LATEX_FLAGS += -interaction=batchmode
+distcheck: dist
+ $(eval TEMPORARY_DIRECTORY := $(shell mktemp -d))
+ test -d '$(TEMPORARY_DIRECTORY)'
+ test -w '$(TEMPORARY_DIRECTORY)'
+ tar xzf $(PROJECT_NAME).tar.gz -C $(TEMPORARY_DIRECTORY)
+ $(MAKE) --directory=$(TEMPORARY_DIRECTORY)/$(PROJECT_NAME) LATEX_FLAGS='$(LATEX_FLAGS)' all
+ $(RM) -r $(TEMPORARY_DIRECTORY)
+ @printf '\n\ndistcheck passed.\n'
.PHONY: clean
clean:
- $(RM) ./*.1 ./*.aux ./*.brf ./*.glg ./*.glo ./*.gls
- $(RM) ./*.hd ./*.idx ./*.ilg ./*.ind ./*.loe ./*.lof ./*.log ./*.lot
- $(RM) ./*.mps ./*.mpx ./*.out ./*.pdf ./*.toc
+ $(RM) ./*.1 ./*.aux ./*.brf ./*.dvi ./*.glg ./*.glo ./*.gls
+ $(RM) ./*.hd ./*.idx ./*.ilg ./*.ind ./*.info ./*.loe ./*.lof ./*.log ./*.lot
+ $(RM) ./*.mps ./*.mpx ./*.out ./*.pdf ./*.pl.in ./*.toc
$(RM) mptextmp.* mpxerr.tex
$(RM) README README.html RELEASE-HOWTO RELEASE-HOWTO.html
+ $(RM) typog-grep typog-grep.version.sed
+ $(RM) $(PROJECT_NAME).tar.gz
.PHONY: mostlyclean
mostlyclean: clean
+ $(RM) ./*.texi
.PHONY: maintainer-clean
maintainer-clean: mostlyclean
- $(RM) ./*.ist ./*.mp ./*.pl ./*.pod ./*.sed ./*.sty ./*.tex
+ $(RM) ./*.gst ./*.ist ./*.mp ./*.pl ./*.pod ./*.sed ./*.sty ./*.tex
.PHONY: tool-check
tool-check:
- @printf '*** LATEX = "%s"\n' '$(LATEX)'
- $(LATEX) --version
+ @printf '*** LATEX_PROPER = "%s"\n' '$(LATEX_PROPER)'
+ $(LATEX_PROPER) --version
+ @printf '\n\n*** BibTeX\n'
+ bibtex --version
@printf '\n\n*** MAKEINDEX = "%s"\n' '$(MAKEINDEX)'
- $(MAKEINDEX) < /dev/null
+ $(MAKEINDEX) < /dev/null
@printf '\n\n*** METAPOST = "%s"\n' '$(METAPOST)'
$(METAPOST) --version
@printf '\n*** POD2MAN = "%s"\n' '$(POD2MAN)'
$(POD2MAN) --help > /dev/null
@printf '\n\n*** POD2TEXI = "%s"\n' '$(POD2TEXI)'
$(POD2TEXI) --version
- @printf '\n\nTool check passed.\n'
-
-
-.PHONY: spell-check
-spell-check:
- @sed -e '\#<DISABLE-SPELL-CHECK/>#d' \
- -e '\#<DISABLE-SPELL-CHECK>#,\#</DISABLE-SPELL-CHECK>#d' < typog.dtx | \
- sed -e 's/^ *%%*//' | \
- sed -e 's/\\-//g' -e 's/|[^|]*|/ /g' | \
- $(SPELLCHECK) $(SPELLCHECK_FLAGS) list | \
- sort | uniq | fmt | sed -e 's/ / /g'
+ @printf '\n\ntool check passed.\n'
.PHONY: update-docs
@@ -151,10 +180,16 @@ Selected Phony Targets
----------------------
all: Make everything there is to make. This is the .DEFAULT_GOAL.
+bin: Build typog-grep (which is not a binary, but executable).
+
clean: Remove some products.
-cpio: In the parent directory create a cpio(1) archive of the
- project source files whose name is time-stamped.
+dist: Create a tar file of the project source files and the PDF
+ documentation files. The archive is in the form and has a
+ name that CTAN prefers.
+
+distcheck: Create a tar file of the project source files, unpack it in
+ a different location and build all targets.
doc: Build "typog.pdf" the Typog documentation.
@@ -170,12 +205,14 @@ pdf: Build doc: and gauge:.
sty: Only extract "typog.sty" from "typog.dtx". This
operation requires LaTeX (-> $(LATEX)) and nothing else.
-tar: In the parent directory create a tar(1) file of the project
- source files whose name is time-stamped.
+test: Run some tests.
tool-check: Check whether some of the required tools to build the
project are available.
+update-docs: Copy the documentation files into the "docs"
+ sub-directory.
+
Selected Implicit Rules
-----------------------
@@ -206,6 +243,7 @@ README: Convert "README.html" to plain text. Requires w3m(1).
endef
+
.PHONY: help
help:
$(info $(HELP_SCREEN))
@@ -217,10 +255,10 @@ help:
define MAKE_INDEX_AND_GLOSSARY
-sed -e '/@/d' -e 's/{\\ttfamily /{\\ttfamily\\hskip0pt\\relax /' < $*.idx > ,$*.idx; \
+sed -e '/@/d' -e 's/{\\ttfamily /{\\ttfamily\\hskip0pt\\relax /' < $*.idx > ,$*.idx; \
mv ,$*.idx $*.idx; \
-$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s typog.ist -t $*.ilg -o $*.ind $*.idx; \
-$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s gglo.ist -t $*.glg -o $*.gls $*.glo
+$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s $*.ist -t $*.ilg -o $*.ind $*.idx; \
+$(MAKEINDEX) $(MAKEINDEX_FLAGS) -s $*.gst -t $*.glg -o $*.gls $*.glo
endef
define GREP_LATEX_WARNINGS
@@ -253,7 +291,13 @@ endef
%-1.mps %-2.mps %-3.mps %-4.mps: %.mp
- $(METAPOST) -s 'outputtemplate="%j-%c.mps"' $(METAPOST_FLAGS) $<
+ $(METAPOST) -s 'outputtemplate="%j-%c.mps"' $(METAPOST_FLAGS) $< || { \
+ printf '=== $*.log ===\n'; \
+ cat $*.log; \
+ printf '\n\n=== mpxerr.log ===\n'; \
+ cat mpxerr.log; \
+ false; \
+ } 1>&2
%.1: %.pod
@@ -263,6 +307,15 @@ endef
%.1.pdf: %.1
$(GROFF) $(GROFF_FLAGS) ./$< > $@
+%.texi: %.pod
+ $(POD2TEXI) $(POD2TEXI_FLAGS) --output=$@ ./$<
+
+%.info: %.texi
+ $(MAKEINFO) $(MAKEINFO_FLAGS) --output=$@ $<
+
+%.info.pdf: %.texi
+ $(MAKEINFO) $(MAKEINFO_FLAGS) --pdf --output=$@ $<
+
%.tex: %.pod | teximan2latex.sed
$(POD2TEXI) $(POD2TEXI_FLAGS) ./$< | sed -f teximan2latex.sed > $@
@@ -276,12 +329,11 @@ endef
crooked-paragraphs.mp slant-angle.mp smooth-parshapes.mp title.mp \
teximan2latex.sed \
-typog-grep.pl typog-grep typog-grep.pod \
-typog.sty typog.ist typog-example.tex typog-nomt.tex: \
+typog-grep.pl.in typog-grep.pod \
+typog.sty typog.ist typog-example.tex \
+typog-minimal-test.tex typog-without-microtype-test.tex: \
typog.ins typog.dtx
$(LATEX) $(LATEX_FLAGS) $<
- chmod 755 typog-grep.pl
- ln -sf typog-grep.pl typog-grep
crooked-paragraphs-1.mps crooked-paragraphs-2.mps \
@@ -300,3 +352,14 @@ typog.pdf: typog.dtx \
smooth-parshapes-1.mps smooth-parshapes-2.mps smooth-parshapes-3.mps \
typog-grep.tex \
| typog.sty
+
+
+typog-grep.pl: typog-grep.pl.in typog.sty
+ sed -ne 's,$(SED_VERSION_REGEXP),s#@DATE@#\2#g\ns#@RELEASE@#\3#g\ns#@TITLE@#\4#g,p' \
+ < typog.sty \
+ > typog-grep.version.sed
+ sed -f typog-grep.version.sed < $< > $@
+ chmod 755 $@
+
+typog-grep: typog-grep.pl
+ ln -sf $< $@
diff --git a/Master/texmf-dist/source/latex/typog/typog.dtx b/Master/texmf-dist/source/latex/typog/typog.dtx
index 0f2176206a2..3037f502fad 100644
--- a/Master/texmf-dist/source/latex/typog/typog.dtx
+++ b/Master/texmf-dist/source/latex/typog/typog.dtx
@@ -3,11 +3,11 @@
% Copyright (C) 2024 by Ch. L. Spiel
%
% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3 of this
+% of the LaTeX Project Public License, either version 1.3c of this
% license or (at your option) any later version. The latest version
% of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% \fi
@@ -26,7 +26,6 @@
\PassOptionsToClass{a4paper}{article}
\PassOptionsToPackage{hyperfootnotes=false}{hyperref}
-\PassOptionsToPackage{charter, scale=1.06}{newtxmath}
\PassOptionsToPackage{dvipsnames}{xcolor}
\usepackage{amsmath}
@@ -42,40 +41,43 @@
\usepackage{fullwidth}
\usepackage{hypdoc}
\usepackage{hyphenat}
-\usepackage[shrink=10, stretch=10]{microtype}
+\usepackage[kerning=true, shrink=10, stretch=10, verbose=true]{microtype}
\usepackage{multirow}
\usepackage{needspace}
-\usepackage{placeins}
+\usepackage[section]{placeins}
\usepackage{ragged2e}
\usepackage{setspace}
\usepackage{sidecap}
\usepackage{tabularx}
\usepackage{tcolorbox}
\usepackage{titlesec}\renewcommand*{\bottomtitlespace}{.15\textheight}%nobottomtitles*
-\usepackage[debug, raise*=.05em]{typog}
+\usepackage[debug, raise*=.05em,
+ uppercaselabelitemadjustments={.0125em, .075em, -.1em, .0125em},
+ lowercaselabelitemadjustments={-.075em, 0pt, -.2em, -.075em}]{typog}
\usepackage{xcolor}
\usepackage[default, lining, proportional, regular, semibold]{sourceserifpro}
\usepackage[lining, proportional, regular, semibold]{sourcesanspro}
\usepackage[lining, regular]{sourcecodepro}
-\usepackage[xcharter]{newtxmath}
+\usepackage[scaled=1.08, uprightscript, xcharter]{newtxmath}
\setbaselineskip{12.5pt}
+
\makeatletter
\def\@get@fontclan#1-#2\relax{#1}
\newcommand*{\fontclan}{\expandafter\@get@fontclan\f@family\relax}
\makeatother
-\newcommand*{\proportionalliningfigures}{\fontfamily{\fontclan-LF}\selectfont}
-\newcommand*{\proportionaloldstylefigures}{\fontfamily{\fontclan-OsF}\selectfont}
-\newcommand*{\tabularliningfigures}{\fontfamily{\fontclan-TLF}\selectfont}
-\newcommand*{\tabularoldstylefigures}{\fontfamily{\fontclan-TOsF}\selectfont}
+\DeclareRobustCommand{\proportionalliningfigures}{\fontfamily{\fontclan-LF}\selectfont}
+\DeclareRobustCommand{\proportionaloldstylefigures}{\fontfamily{\fontclan-OsF}\selectfont}
+\DeclareRobustCommand{\tabularliningfigures}{\fontfamily{\fontclan-TLF}\selectfont}
+\DeclareRobustCommand{\tabularoldstylefigures}{\fontfamily{\fontclan-TOsF}\selectfont}
-\newcommand*{\textdenominator}[1]{{\fontfamily{\fontclan-Dnom}\selectfont #1}}
-\newcommand*{\textinferior}[1]{{\fontfamily{\fontclan-Inf}\selectfont #1}}
-\newcommand*{\textnumerator}[1]{{\fontfamily{\fontclan-Numr}\selectfont #1}}
-\newcommand*{\textsuperior}[1]{{\fontfamily{\fontclan-Sup}\selectfont #1}}
+\DeclareRobustCommand{\textdenominator}[1]{{\fontfamily{\fontclan-Dnom}\selectfont #1}}
+\DeclareRobustCommand{\textinferior}[1]{{\fontfamily{\fontclan-Inf}\selectfont #1}}
+\DeclareRobustCommand{\textnumerator}[1]{{\fontfamily{\fontclan-Numr}\selectfont #1}}
+\DeclareRobustCommand{\textsuperior}[1]{{\fontfamily{\fontclan-Sup}\selectfont #1}}
\newcommand*{\nativetextfraction}[2]
{\mbox{\textnumerator{#1}\textfractionsolidus\textdenominator{#2}}}
@@ -85,21 +87,23 @@
\newenvironment*{tabfigures}
{\edef\rmdefault{\fontclan-T\sourceserifpro@figurestyle}\rm\ignorespaces}
{\ignorespacesafterend}
-
-\newcommand*{\elseries}{\def\mdseries@rm{el}\def\mdseries@sf{el}\def\mdseries@tt{el}}
-\newcommand*{\textel}[1]{{\elseries\textmd{#1}}}
-\newcommand*{\lseries}{\def\mdseries@rm{l}\def\mdseries@sf{l}\def\mdseries@tt{l}}
-\newcommand*{\textl}[1]{{\lseries\textmd{#1}}}
-%%--\newcommand*{\mdseries}{\def\mdseries@rm{m}\def\mdseries@sf{m}\def\mdseries@tt{m}}
-%%--\newcommand*{\textmd}[1]{{\mdseries\textmd{#1}}}
-\newcommand*{\sbseries}{\def\bfseries@rm{sb}\def\bfseries@sf{sb}\def\bfseries@tt{sb}}
-\newcommand*{\textsb}[1]{{\sbseries\textbf{#1}}}
-\newcommand*{\bseries}{\def\bfseries@rm{b}\def\bfseries@sf{b}\def\bfseries@tt{b}}
-\newcommand*{\textb}[1]{{\bseries\textbf{#1}}}
-\newcommand*{\ebseries}{\def\bfseries@rm{k}\def\bfseries@sf{eb}\def\bfseries@tt{k}}
-\newcommand*{\texteb}[1]{{\ebseries\textbf{#1}}}
\makeatother
+\DeclareRobustCommand{\elseries}{\fontseries{el}\selectfont}
+\DeclareTextFontCommand{\textel}{\elseries}
+\DeclareRobustCommand{\lseries}{\fontseries{l}\selectfont}
+\DeclareTextFontCommand{\textl}{\lseries}
+%%--\DeclareRobustCommand{\mdseries}{\fontseries{m}\selectfont}
+%%--\DeclareTextFontCommand{\textmd}{\mdseries}
+\DeclareRobustCommand{\sbseries}{\fontseries{sb}\selectfont}
+\DeclareTextFontCommand{\textsb}{\sbseries}
+\DeclareRobustCommand{\bseries}{\fontseries{b}\selectfont}
+\DeclareTextFontCommand{\textb}{\bseries}
+\DeclareRobustCommand{\ebseries}{\fontseries{eb}\selectfont}
+\DeclareTextFontCommand{\texteb}{\ebseries}
+\DeclareRobustCommand{\ubseries}{\fontseries{k}\selectfont}
+\DeclareTextFontCommand{\textub}{\ubseries}
+
\usepackage{cleveref}
@@ -112,7 +116,7 @@
citecolor = blue,
colorlinks = true,
linkcolor = blue,
- linktocpage = false,
+ linktocpage = true,
pdfauthor={Dr. Christoph L. Spiel},
pdfcreationdate={\pdffiledate},
pdfkeywords={LaTeX, typography, ligature, italic-correction, paragraph justification, baselineskip, sloppy, ragged},
@@ -124,9 +128,94 @@
}
+\SetExtraKerning[context=drop-left-sidebearing, name=source-code-normal, unit=space]
+ {font={T1/SourceCodePro-LF/m/n/44, T1/SourceCodePro-TLF/m/n/44}}
+ {
+ 1={-150,},
+ 2={-120,},
+ 3={-120,},
+ 4={-40,},
+ A={-100,},
+ B={-170,}
+ }
+
+\newlength{\sectiontocindent}
+\newlength{\sectionnumberwidth}
+\newlength{\subsectiontocindent}
+\newlength{\subsectionnumberwidth}
+\newlength{\subsubsectiontocindent}
+\newlength{\subsubsectionnumberwidth}
+
+\setlength{\sectiontocindent}{0pt}
+\setlength{\sectionnumberwidth}{40pt}
+\setlength{\subsectiontocindent}{40pt}
+\setlength{\subsectionnumberwidth}{25pt}
+\setlength{\subsubsectiontocindent}{65pt}
+\setlength{\subsubsectionnumberwidth}{30pt}
+
\makeatletter
-\renewcommand*{\@dotsep}{10000} % suppress leaders
-\patchcmd{\@dottedtocline}{\normalfont}{\bfseries}{\relax}{\PatchingFailed}
+\renewcommand*{\l@section}[2]
+ {\ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
+ \setlength{\@tempdima}{\sectionnumberwidth}%
+ \begingroup
+ \def\numberline##1{\hb@xt@\@tempdima{%
+ \tt\lseries
+ \fontsize{44}{0}\selectfont
+ \microtypecontext{kerning=drop-left-sidebearing}%
+ \iffalse\raisebox{-30pt}[0pt][0pt]{\rule{0.1pt}{40pt}}\fi
+ \textcolor{customred3}{##1}%
+ \hfil}}%
+ \parindent \z@
+ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ \bfseries
+ \iffalse
+ \nobreak\hfil
+ \nobreak\hb@xt@\@pnumwidth{\hss #2\kern-\p@\kern\p@}%
+ \else
+ {\sffamily\large #1}\quad
+ {#2}\hfil\hbox{}
+ \fi
+ \par
+ \endgroup
+ \fi}
+
+\renewcommand*{\@dottedtocline}[5]
+ {\ifnum #1>\c@tocdepth
+ \else
+ \vskip \z@ \@plus.2\p@
+ \begingroup
+ \leftskip #2\relax
+ \rightskip \@tocrmarg
+ \parfillskip -\rightskip
+ \parindent #2\relax\@afterindenttrue
+ \interlinepenalty\@M
+ \leavevmode
+ \@tempdima #3\relax
+ \advance\leftskip \@tempdima
+ \null\nobreak
+ \hskip -\leftskip
+ {#4}\nobreak
+ \iffalse
+ \leaders\hbox{$\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill
+ \nobreak\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5\kern-\p@\kern\p@}%
+ \else
+ \hbox{\quad\normalfont\bfseries #5}\nobreak\hfill\hbox{}%
+ \fi
+ \par
+ \endgroup
+ \fi}
+
+\renewcommand*{\l@subsection}{\@dottedtocline{2}{\subsectiontocindent}{\subsectionnumberwidth}}
+\renewcommand*{\l@subsubsection}{\@dottedtocline{3}{\subsubsectiontocindent}{\subsubsectionnumberwidth}}
+\newrobustcmd*{\tocsquashedsubsections}
+ {\def\l@subsection{\@dottedtocline{2}{0pt}{\subsectionnumberwidth}}%
+ \def\l@subsubsection{\@dottedtocline{3}{0pt}{\subsubsectionnumberwidth}}}
\makeatother
@@ -171,7 +260,6 @@
leftmargin=!
}
-
\SetEnumitemKey{nestedinspecialsection}{
leftmargin=10pt
}
@@ -191,13 +279,15 @@
\fancypagestyle{pagenumberonly}{
+ \fancyhf{}
\fancyhead[L]{}
\fancyhead[R]{\thepage}
}
-\pagestyle{fancy}
-\fancyhf{}
-\fancyhead[L]{\rightmark}
-\fancyhead[R]{\thepage}
+\fancypagestyle{fancy}{
+ \fancyhf{}
+ \fancyhead[L]{\rightmark}
+ \fancyhead[R]{\thepage}
+}
\newcommand*{\resetfancyhead}
{\fancyhead[L]{\textsf{\textsc{\textls[20]{\nouppercase\rightmark}}}}}
@@ -239,8 +329,8 @@
\setlength{\skip\footins}{25pt}
-\setlength{\overfullrule}{3pt}
-\renewcommand*{\sidecaptionsep}{16pt}
+\setlength{\overfullrule}{0pt}
+\renewcommand*{\sidecaptionsep}{25pt}
@@ -272,13 +362,17 @@
\newcommand*{\citenum}[1]{\@nameuse{b@#1}}
\makeatother
-\def\code#1{\texttt{#1}}
+\renewcommand*{\code}[1]{\texttt{#1}}
+
+\newcommand*{\codelineindicator}{\mbox{\small$\mathscr{l}$}}
\newrobustcmd*{\command}[1]{\mbox{\textbf{#1}}}
+\newcommand*{\detoxindex}[1]{\index{\detokenize{#1}}}
+
\newcommand*{\doublequotes}[1]{\doubleguillemetright\kern-.03333em #1\doubleguillemetleft}
-\newcommand*{\dumpmacro}[1]{\texttt{\detokenize\expandafter{#1}}}
+\newcommand*{\dumpmacro}[1]{\texttt{\detokenize\expandafter{#1}\unskip}}
\newcommand*{\filesystem}[1]{\mbox{\textit{#1\/}}}
@@ -287,6 +381,12 @@
\newcommand*{\foreignphrase}[1]{\textsl{#1}}
+\makeatletter
+\newcommand*{\formatdimen}{\@ifstar{\@typog@rem@pt}{\@typog@strip@pt}}
+\newcommand*{\@typog@rem@pt}[1]{\dimen0=\dimexpr#1\relax\strip@pt\dimen0\,pt}
+\newcommand*{\@typog@strip@pt}[1]{\expandafter\strip@pt#1\relax\,pt}
+\makeatother
+
\newcommand*{\formatskip}[3]{#1\genfrac{}{}{0pt}{}{{+}#2}{{-}#3}}
\makeatletter
@@ -294,19 +394,46 @@
\renewcommand*{\fps@table}{htbp}
\makeatother
+\apptocmd{\GlossaryParms}
+ {\RaggedRight\normalsize}
+ {\relax}
+ {\AppendingFailed}
+
+\let\oldhdpindex=\hdpindex
+\renewcommand*{\hdpindex}[2]{\textbf{\oldhdpindex{#1}{#2}}}
+
+\let\oldhdclindex=\hdclindex
+\renewcommand*{\hdclindex}[2]
+ {\ifstrequal{#2}{code}
+ {\oldhdclindex{#1}{codeidx}}
+ {\oldhdclindex{#1}{#2}}}
+
\newcommand*{\hollowrectangle}[2]
{\setlength{\fboxrule}{.5pt}%
\setlength{\fboxsep}{0pt}%
\framebox{\rule{#1}{0pt}\rule{0pt}{#2}}}
\newcommand*{\hollowsquare}[1]{\hollowrectangle{#1}{#1}}
+\apptocmd{\IndexParms}
+ {\RaggedRight\small}
+ {\relax}
+ {\AppendingFailed}
\makeatletter
+\ExplSyntaxOn
\apptocmd{\index@prologue}
- {\marginnote{In the Index page ranges are stuck together with
- \hyperref[syn:figuredash]{\cs{figuredash*}}.}}
+ {\legacy_if:nTF {codeline@index}
+ {We\space prefix\space all\space references\space
+ to\space code\space lines\space with~\singlequotes{\codelineindicator}.}
+ {}}
{\relax}
{\AppendingFailed}
+
+\newcommand*{\linenumberdecoration}
+ {\legacy_if:nTF {codeline@index}
+ {\codelineindicator}
+ {}}
+\ExplSyntaxOff
\makeatother
\newcommand*{\logmacro}[1]
@@ -348,11 +475,27 @@
\AtBeginDocument{\setlength{\emreference}{\fontdimen6\font}}
\newrobustcmd*{\milliem}[1]
{\ifdim #1=0pt
- #1%
+ 0\,pt%
\else
\nativetextfraction{\the\numexpr\dimexpr (#1) * 1000 / \emreference}{1000}\:em%
\fi}
+\let\originalmulticols=\multicols
+\let\endoriginalmulticols=\endmulticols
+\RenewDocumentEnvironment{multicols}{m o o}
+ {\ifnum #1=1
+ \IfNoValueTF{#2}{\relax}{#2}%
+ \else
+ \IfNoValueTF{#2}
+ {\originalmulticols{#1}}
+ {\originalmulticols{#1}[#2]}%
+ \fi}
+ {\ifnum #1=1
+ \relax
+ \else
+ \endoriginalmulticols
+ \fi}
+
\newcommand*{\needtocspace}[1][3]
{\addtocontents{toc}{\protect\needspace{#1\baselineskip}}}
@@ -455,7 +598,7 @@
\newenvironment*{specialcodesection}[1]
{\Needspace{4\baselineskip}%
\begin{tcolorbox}[colback=white, colframe=\markercolor,
- bottomrule=0pt, leftrule=5pt, rightrule=0pt, toprule=0pt]
+ bottomrule=.5pt, leftrule=5pt, rightrule=.5pt, toprule=.5pt]
\sf\typogsetupsf
\begin{list}
{\specialcodesectionheading{#1}}
@@ -498,11 +641,37 @@
\begin{minipage}{\floatcaptionwidth}}
{\end{minipage}}
\newcommand*{\tablenotemark}[1]{\smash{\textsuperscript{#1}}}
+\newcommand*{\tablenotesymbol}[1]{% Bringhurst's "traditional order" (p69) from 1 to 6
+ \ifcase#1\relax
+ #1% 0
+ \or \textasteriskcentered% 1
+ \or \textdagger% 2
+ \or \textdaggerdbl% 3
+ \or \textsection% 4
+ \or \textbardbl% 5
+ \or \textsection% 6
+ \or \textasteriskcentered\textasteriskcentered%7
+ \or \textdagger\textdagger%8
+ \or \textdaggerdbl\textdaggerdbl%9
+ \else
+ #1
+ \fi
+}
\newcommand*{\termparbox}[1]{\parbox[t]{\linewidth}{#1\bottomstrut}}
\newcommand*{\thousandsseparator}{\mbox{,}}
+\ExplSyntaxOn
+\newcommand*{\titlecase}[1]{\text_titlecase:n {#1}}
+\ExplSyntaxOff
+
+\newcommand*{\toccontinuesonnextpage}
+ {\addtocontents{toc}{\par
+ \bigskip
+ \hfill\textit{Table of Contents continued on next page.}\par
+ \protect\clearpage}}
+
\newcommand*{\topstrut}{\rule{0pt}{1.3em}}
\newcommand*{\typogsetuprm}
@@ -514,11 +683,16 @@
{\typogsetup{raise*=.06667em,
raiseguillemets=.05em}}
+\newcommand*{\unmarkedfntext}[1]
+ {{\def\thefootnote{}\footnote{#1}%
+ \addtocounter{footnote}{-1}}}
+
+\newcommand*{\userman}[1]{\textbf{\hyperpage{#1}}}%%-- https://github.com/ho-tex/hypdoc/issues/11
+
\newcommand*{\visualpar}{\textcolor{\markercolor}{\P}\linebreak[1]\enspace}
\newenvironment*{whittyquote}
{\begin{flushright}
- \renewcommand*{\propername}[1]{\mbox{##1}}%
\sf\typogsetupsf}
{\end{flushright}}
@@ -532,7 +706,6 @@
\end{minipage}
\end{maxipage}}
-
\NewDocElement[macrolike = true,
idxtype = dim.,
idxgroup = dimensions,
@@ -547,6 +720,20 @@
{EnumItemKey}{enumitemkey}
\pretocmd{\DescribeEnumItemKey}{\needspace{25pt}}{\relax}{\PrependingFailed}
+\NewDocElement[macrolike = true,
+ idxtype = skip,
+ idxgroup = \LaTeX{} length (skip),
+ printtype = \textit{skip}]
+ {LaTeXSkip}{lskip}
+\pretocmd{\DescribeLaTeXSkip}{\needspace{25pt}}{\relax}{\PrependingFailed}
+
+\NewDocElement[macrolike = true,
+ idxtype = counter,
+ idxgroup = \protect\TeX{} counters,
+ printtype = \textit{counter}]
+ {TeXCounter}{tcounter}
+\pretocmd{\DescribeTeXCounter}{\needspace{25pt}}{\relax}{\PrependingFailed}
+
\hyphenation{% https://hyphenateit.com/en-us
Double-guillemet-left
@@ -585,6 +772,8 @@
line-width
loose-ness
loose-spacing
+ lower-case-adjust-label-items
+ lower-case-label-item-adjustments
make-at-letter
make-at-other
mar-gin-al
@@ -612,6 +801,7 @@
set-leading
set-leading-percentage
short-inter-text
+ shrink-limits
single-guillemet-left
single-guillemet-right
single-quotes
@@ -625,6 +815,7 @@
smooth-ragged-right-shape-septuplet
smooth-ragged-right-shape-triplet
space-skip
+ stretch-limits
text-italics-correction
tight-spacing
tracing-boxes
@@ -632,6 +823,8 @@
tracking-tt-spacing
typog-get
typog-setup
+ upper-case-adjust-label-items
+ upper-case-label-item-adjustments
vtie-bot
vtie-bot-disp
vtie-bot-disp-par
@@ -648,29 +841,52 @@
\begin{document}
\typogsetuprm
+ \uppercaseadjustlabelitems{*}
\DocInput{typog.dtx}
\end{document}
%</driver>
%<*index-style>
actual '='
+delim_0 "\\nobreak\\enspace"
+delim_1 "\\nobreak\\enspace"
+delim_2 "\\nobreak\\enspace"
delim_r "\\figuredash*"
heading_prefix "\\pagebreak[3]\\smallskip\n\n{\\sffamily\\bfseries\\large "
heading_suffix "}\\nopagebreak\n"
headings_flag 1
level '>'
+line_max 65536
quote '!'
%</index-style>
+%<*changes-style>
+actual '='
+delim_0 "\\nobreak\\enspace"
+delim_1 "\\nobreak\\enspace"
+delim_2 "\\nobreak\\enspace"
+heading_prefix "\\pagebreak[3]\\smallskip\n\n{\\sffamily\\bfseries\\large "
+heading_suffix "}\\nopagebreak\n"
+headings_flag 0
+item_x1 "\\efill\n\\subitem "
+item_x2 "\\ "
+keyword "\\glossaryentry"
+level '>'
+line_max 65536
+postamble "\n\\end{theglossary}\n"
+preamble "\\begin{theglossary}\n \\makeatletter\\scan@allowedfalse"
+quote '!'
+%</changes-style>
% \fi
%
%
% \DoNotIndex{\,}
-% \DoNotIndex{\addtolength,\advance,\aftergroup,\allowdisplaybreaks,\arabic}
-% \DoNotIndex{\AtBeginDocument,\autotransfer}
-% \DoNotIndex{\baselineskip}
-% \DoNotIndex{\c,\char,\clubpenalties,\clubpenalty,\count,\cs,\csname}
+% \DoNotIndex{\\}
+% \DoNotIndex{\addtocounter,\addtolength,\advance,\aftergroup,\allowdisplaybreaks,\arabic,\arraystretch}
+% \DoNotIndex{\AfterEndPreamble,\AfterPreamble,\AtBeginDocument,\autotransfer}
+% \DoNotIndex{\baselineskip,\begin,\begingroup,\booltrue,\box}
+% \DoNotIndex{\c,\char,\clist,\clubpenalties,\clubpenalty,\count,\cs,\csname}
% \DoNotIndex{\DeclareRobustCommand,\def,\define@choicekey,\define@key,\detokenize}
% \DoNotIndex{\dim,\dimen,\dimexpr,\discretionary,\displaywidowpenalties,\displaywidowpenalty}
-% \DoNotIndex{\edef,\else,\emergencystretch,\empty,\endcsname}
+% \DoNotIndex{\edef,\else,\emergencystretch,\empty,\end,\endcsname,\endgroup}
% \DoNotIndex{\endlastlineflushrightpar}
% \DoNotIndex{\endlastlineraggedleftpar}
% \DoNotIndex{\endnofontexpand,\endnofontexpansion}
@@ -679,33 +895,37 @@ quote '!'
% \DoNotIndex{\endsmoothraggedrightshapetriplet}
% \DoNotIndex{\endtypoginspect}
% \DoNotIndex{\exhyphenpenalty,\expandafter,\ExplSyntaxOff,\ExplSyntaxOn}
-% \DoNotIndex{\fi,\finalhyphendemerits,\font,\fontdimen,\fp,\fussy,\futurelet}
+% \DoNotIndex{\fi,\finalhyphendemerits,\font,\fontdimen,\forcsvlist,\fp,\fpeval,\fussy,\futurelet}
% \DoNotIndex{\gdef,\global,\glueexpr,\@gobble}
% \DoNotIndex{\guillemotleft,\guillemotright,\guilsinglleft,\guilsinglright}
-% \DoNotIndex{\hbadness,\hfuzz,\hskip,\hspace}
+% \DoNotIndex{\hbadness,\hbox,\hfuzz,\hskip,\hspace,\ht}
% \DoNotIndex{\ignorespaces,\ignorespacesafterend}
-% \DoNotIndex{\if,\IfBooleanT,\IfBooleanTF,\ifcase,\ifdefined,\ifdim,\iffalse,\ifmmode,\ifMT@expansion}
-% \DoNotIndex{\@ifnextchar,\IfNoValueF,\IfNoValueTF,\ifnum}
+% \DoNotIndex{\if,\ifblank,\ifbool,\IfBooleanT,\IfBooleanTF,\ifcase,\ifdefined,\ifdim,\iffalse,\ifmmode}
+% \DoNotIndex{\ifMT@expansion,\@ifnextchar,\IfNoValueF,\IfNoValueTF,\ifnum,\ifodd,\ifstrequal}
% \DoNotIndex{\iftypog@microtype@loadedfalse}
% \DoNotIndex{\iftypog@microtype@preloadedfalse}
-% \DoNotIndex{\ifvmode,\ifx,\ignorespaces,\inputlineno,\int,\interlinepenalty}
+% \DoNotIndex{\ifvmode,\ifx,\ignorespaces,\inputlineno,\int,\interlinepenalty,\itemize}
% \DoNotIndex{\jobname}
% \DoNotIndex{\kern}
-% \DoNotIndex{\l,\lastlinefit,\lastlineflushrightpar,\lastlineraggedleftpar,\leftmargin,\leftskip,\let}
-% \DoNotIndex{\linepenalty,\linewidth,\@listdepth,\looseness,\lsstyle}
-% \DoNotIndex{\@M,\m@th,\mathbin,\mathord,\maxdimen,\message,\microtypecontext,\microtypesetup}
+% \DoNotIndex{\l,\labelitemi,\labelitemii,\labelitemiii,\labelitemiv}
+% \DoNotIndex{\lastlinefit,\lastlineflushrightpar,\lastlineraggedleftpar}
+% \DoNotIndex{\lefthyphenmin,\leftmargin,\leftskip,\let,\letcs}
+% \DoNotIndex{\linepenalty,\linewidth,\@listdepth,\loop,\looseness,\lsstyle}
+% \DoNotIndex{\@M,\m@th,\mathbin,\mathord,\maxdimen,\mbox,\message,\microtypecontext,\microtypesetup}
% \DoNotIndex{\@minus,\mkern,\m@ne,\mspace,\MT@letterspace@,\MT@MT,\muexpr}
-% \DoNotIndex{\@ne,\NeedsTeXFormat,\NewDocumentCommand,\NewDocumentEnvironment,\newcommand,\newenvironment}
-% \DoNotIndex{\newcounter,\newdimen,\newif,\newlength,\newmuskip}
+% \DoNotIndex{\@ne,\NeedsTeXFormat,\newbool,\NewDocumentCommand,\NewDocumentEnvironment}
+% \DoNotIndex{\newcommand,\newenvironment}
+% \DoNotIndex{\newcounter,\newdimen,\newif,\newlength,\newline,\newmuskip}
% \DoNotIndex{\nobreak,\nofontexpand,\nofontexpansion,\nr,\numexpr}
% \DoNotIndex{\or,\optarg}
% \DoNotIndex{\p@,\PackageError,\PackageWarning}
-% \DoNotIndex{\par,\parfillskip,\parindent,\parshape,\pdf@strcmp}
+% \DoNotIndex{\par,\parfillskip,\parindent,\parshape,\patchcmd,\pdf@strcmp}
% \DoNotIndex{\pdfstringdefDisableCommands}
% \DoNotIndex{\penalty,\@plus,\PopPostHook,\postdisplaypenalty,\predisplaypenalty,\prg}
% \DoNotIndex{\pretolerance,\protected,\ProvidesPackage,\PushPostHook}
-% \DoNotIndex{\raisebox,\refstepcounter,\relax,\RenewExpandableDocumentCommand,\RequirePackage,\rightskip}
-% \DoNotIndex{\setcounter,\SetEnumitemKey,\SetExpansion,\setkeys,\setlength,\setstretch}
+% \DoNotIndex{\raisebox,\refstepcounter,\relax,\RenewExpandableDocumentCommand,\repeat,\RequirePackage}
+% \DoNotIndex{\righthyphenmin,\rightskip,\rlap,\romannumeral,\rule}
+% \DoNotIndex{\setbox,\setcounter,\SetEnumitemKey,\SetExpansion,\setkeys,\setlength,\setstretch}
% \DoNotIndex{\showboxbreadth,\showboxdepth,\skip,\sloppy}
% \DoNotIndex{\smoothraggedrightpar}
% \DoNotIndex{\smoothraggedrightshapequintuplet}
@@ -715,9 +935,9 @@ quote '!'
% \DoNotIndex{\textemdash,\textendash,\textsf,\textsl,\texttimes,\textwidth,\the,\times,\tl,\tolerance}
% \DoNotIndex{\tracingnone,\tracingpages,\tracingparagraphs}
% \DoNotIndex{\typeout,\typoginspect,\typoglogo}
-% \DoNotIndex{\unless}
+% \DoNotIndex{\unhbox,\unless}
% \DoNotIndex{\val,\value,\vbadness,\vfuzz}
-% \DoNotIndex{\widowpenalties,\widowpenalty}
+% \DoNotIndex{\wd,\widowpenalties,\widowpenalty}
% \DoNotIndex{\z@,\z@skip}
%
%
@@ -828,7 +1048,8 @@ end
% \footnotesize
% \noindent
% This package is copyright \textcopyright~2024 Ch.~L.~Spiel. It may be distributed
-% and\kernedslash*or modified under the conditions of the \LaTeX{} Project Public License
+% and\kernedslash*or modified under the conditions of the
+% \href{https://www.latex-project.org/lppl.txt}{\LaTeX{} Project Public License}
% \acronym{(LPPL)}, either version~1.3c of this license or --~at your option~-- any later
% version. This work has the \acronym{LPPL} maintenance status
% \doublequotes{author-maintained}.
@@ -836,30 +1057,36 @@ end
%
%
% \clearpage
-% \thispagestyle{pagenumberonly}
-% \tableofcontents
-% \vspace{\fill}
+% \pagestyle{pagenumberonly}
%
+% \unmarkedfntext{The font sample on the title page was generated with the help of \MP{} using
+% \doublequotes{\acronym{URW}~Palladio}%
+% \detoxindex{font>typeface>URW Palladio=\acronym{URW} Palladio|userman}.}
%
-% \thispagestyle{pagenumberonly}
-% \listoftables
-% \phantomsection
-% \addcontentsline{toc}{subsection}{List of Tables}
-% \vspace{\fill}
+% \begin{nofontexpansion}
+% \begin{nocharprotrusion}
+% \tableofcontents
+% \end{nocharprotrusion}
+% \end{nofontexpansion}
%
+% \addtocontents{toc}{%
+% \protect\begin{whittyquote}
+% Hoffentlich wird es nicht so schlimm, wie es schon ist! \\
+% \capitalemdash*~\propername{Karl Valentin}
+% \protect\end{whittyquote}\par}
%
-% \begingroup
-% \footnotesize
-% \singlespacing
-% \noindent
-% The font sample on the title page was generated with the help of \MP{} using
-% \doublequotes{\acronym{URW} Palladio~L}\index{font>URW Palladio L=\acronym{URW} Palladio
-% L}.
-% \endgroup
+% \vspace{\fill}
+%
+% \begin{nofontexpansion}
+% \begin{nocharprotrusion}
+% \listoftables
+% \end{nocharprotrusion}
+% \end{nofontexpansion}
%
%
% \clearpage
% \pagenumbering{arabic}
+% \pagestyle{fancy}
% \section{Introduction}\label{sec:introduction}
%
% \begin{whittyquote}
@@ -892,7 +1119,10 @@ end
% \Cref{sec:latex-hyphenation} expands the hyphenation facilities of \LaTeX.
%
% \Cref{sec:break-ligatures,sec:manual-italic-correction,sec:extra-kerning,sec:raise-characters}
-% deal with vertically positioning glyphs in a more pleasant way.
+% deal with vertically positioning glyphs in a more pleasant way. Also in the realm of
+% vertical alignments is \cref{sec:adjust-label-items} that explains how to height-adjust the
+% labels in |itemize|~lists to perfection whether the items are followed by uppercase or by
+% lowercase letters.
%
% \Cref{sec:align-last-line,sec:fill-last-line} discuss dearly missed macros for better control
% of the last line of a paragraph.
@@ -950,15 +1180,17 @@ end
% \end{tabbing}
% \end{synopsis}
%
-% \index{package options|(}
-% The package \meta{OPTIONs} serve as configuration \meta{key}s, too. This means they can be
-% set with \hyperref[syn:typogsetup]{\code{typogsetup}} and their values can be retrieved with
-% \hyperref[syn:typogget]{\cs{typogget}}. Options that rely on package~\packagename{microtype}
-% are indicated with \doublequotes{\microtyperequiredmarker}.
+% \index{package options|(userman}
+% The package \meta{OPTIONs} also serve as configuration \meta{key}s (unless noted otherwise).
+% This means they can be set with \hyperref[syn:typogsetup]{\code{typogsetup}} and their values
+% can be retrieved with \hyperref[syn:typogget]{\cs{typogget}}. Options that rely on
+% package~\packagename{microtype} are indicated with \doublequotes{\microtyperequiredmarker}.
%
% \begin{typogsetup}{}
% \newcommand*{\indexpackageoption}[1]
-% {\index{package option>#1=\code{#1}}\index{#1=\code{#1}~(option)}\ignorespaces}
+% {\detoxindex{package option>#1=\code{#1}|userman}%
+% \detoxindex{#1=\code{#1}~(option)|userman}%
+% \ignorespaces}
% \begin{description}
% [before={\let\oldmakelabel=\makelabel
% \renewcommand{\makelabel}[1]
@@ -978,17 +1210,44 @@ end
% \item[|debug|, |nodebug|]\label{item:debug}
% \indexpackageoption{debug}
% \indexpackageoption{nodebug}
-% Write package-specific debug information to the log file. Opposite: |nodebug|. The
-% default is not to log debug information.
+% Write some package-specific debug information to the \filesystem{log}~file. Opposite:
+% |nodebug|. The default is not to record debug information.
+%
+% These two options neither can be used with \hyperref[syn:typogsetup]{\code{typogsetup}}
+% nor with \hyperref[syn:typogget]{\cs{typogget}}.
%
% \item[|ligaturekern=|\meta{dim}]\label{item:ligaturekern}
% \indexpackageoption{ligaturekern}
% Set \meta{dim} of the kern that is inserted to split a ligature in
% macro\hyperref[syn:nolig]{\cs{nolig}}. See
-% \cref{sec:break-ligatures}.\shiftedmarginnote{We access the configuration values with
-% \hyperref[syn:typogget]{\cs{typogget}}.} Default
+% \cref{sec:break-ligatures}.\shiftedmarginnote{We access all the (default) configuration
+% values with \hyperref[syn:typogget]{\cs{typogget}}.} Default
% value:~\milliem{\typogget{ligaturekern}}.
%
+% \item[|lowercaselabelitemadjustments=\{|\meta{dim1}, \meta{dim2}, \meta{dim3}, \meta{dim4}|\}|]%
+% \label{item:lowercaselabelitemadjustments}
+% \indexpackageoption{lowercaselabelitemadjustments}
+% \sinceversion{Since v0.4}
+% Vertical shifts \meta{dimN} to apply to \cs{labelitem}\meta{N}, where \meta{N} is the
+% nesting level of the |itemize|~list starting at one. An empty \meta{dimN} is equivalent
+% to~\formatdimen*{0pt}. The adjustments apply to the lowercase setting
+% (\hyperref[syn:lowercaseadjustlabelitems]{\code{\string\lowercaseadjustlabelitems}}).
+% See \cref{sec:adjust-label-items} (in particular subsection~\singlequotes{Setup} and
+% \cref{tab:labelitemadjustvalues} on \cpageref{tab:labelitemadjustvalues}) and also
+% configuration option
+% \hyperref[item:uppercaselabelitemadjustments]{\code{uppercaseadjustlabelitem}}.
+%
+% All four lengths default to~\formatdimen*{0pt}.
+%
+% \begin{important}
+% \slightlysloppy
+% \noindent
+% Configuring \code{lowercaselabelitemadjustments} (or
+% \code{uppercaselabelitemadjustments}) does \emph{not} activate the correction
+% mechanism. Use one of the macros \code{\string\lowercaseadjustlabelitems} or
+% \code{\string\uppercaseadjustlabelitems} for that purpose.
+% \end{important}
+%
% \item[|mathitalicscorrection=|\meta{dim}]\label{item:mathitalicscorrection}
% \indexpackageoption{mathitalicscorrection}
% Italics correction in math mode. See \cref{sec:manual-italic-correction} and also the
@@ -1000,10 +1259,14 @@ end
% \item[|raise*=|\meta{dim}]\label{item:raise}
% \indexpackageoption{raise*}
% Set the length by which selected characters (dash, hyphen, times, and number dash) are
-% raised. Default value:~0pt.
+% raised. Default value:~\formatdimen*{0pt}.
%
% Only the raise amounts for guillemets are unaffected by this option.
%
+% This option neither can be used with \hyperref[syn:typogsetup]{\code{typogsetup}} nor
+% with \hyperref[syn:typogget]{\cs{typogget}}, however, the specific options influenced by
+% it can.
+%
% \item[|raisecapitaldash=|\meta{dim}]\label{item:raisecapitaldash}
% \indexpackageoption{raisecapitaldash}
% Set the length that the \cs{textendash} is raised in
@@ -1093,6 +1356,30 @@ end
% \emph{not} in the document body.
%
% By default this option is unset.
+%
+% \item[|uppercaselabelitemadjustments=\{|\meta{dim1}, \meta{dim2}, \meta{dim3}, \meta{dim4}|\}|]%
+% \label{item:uppercaselabelitemadjustments}
+% \indexpackageoption{uppercaselabelitemadjustments}
+% \sinceversion{Since v0.4}
+% Vertical shifts \meta{dimN} to apply to \cs{labelitem}\meta{N}, where \meta{N} is the
+% nesting level of the |itemize|~list starting at one. An empty \meta{dimN} is equivalent
+% to~\formatdimen*{0pt}. The adjustments apply to the uppercase setting
+% (\hyperref[syn:uppercaseadjustlabelitems]{\code{\string\uppercaseadjustlabelitems}}).
+% See \cref{sec:adjust-label-items} (in particular subsection~\singlequotes{Setup} and
+% \cref{tab:labelitemadjustvalues} on \cpageref{tab:labelitemadjustvalues}) and also
+% configuration option
+% \hyperref[item:lowercaselabelitemadjustments]{\code{lowercaseadjustlabelitem}}.
+%
+% All four lengths default to~\formatdimen*{0pt}.
+%
+% \begin{important}
+% \slightlysloppy
+% \noindent
+% Configuring \code{uppercaselabelitemadjustments} (or
+% \code{lowercaselabelitemadjustments}) does \emph{not} activate the correction
+% mechanism. Use one of the macros \code{\string\uppercaseadjustlabelitems} or
+% \code{\string\lowercaseadjustlabelitems} for that purpose.
+% \end{important}
% \end{description}
% \end{typogsetup}
% \index{package options|)}
@@ -1116,12 +1403,13 @@ end
% issues a \cs{par} at its end. Environments with different name suffixes never close
% with~\cs{par}.
%
-% \bigskip
%
-% \noindent
+% \subsection{Setup and Reconfiguration}\label{sec:setup}
+%
% \DescribeEnv{typogsetup}
-% Configure\index{configuration}\index{setup} the package with the given \meta{keys}. An empty
-% argument of \code{typogsetup} resets all \meta{keys} to their default values.
+% Configure\index{configuration|userman}\index{setup|userman} the package with the given
+% \meta{keys}. An empty argument of \code{typogsetup} resets all \meta{keys} to their default
+% values.
%
% \begin{synopsis}\label{syn:typogsetup}
% \cs{begin}|{typogsetup}|\marg{keys}
@@ -1129,7 +1417,7 @@ end
% \cs{end}|{typogsetup}|
% \end{synopsis}
%
-% The package can be (re-)configured\index{reconfigure} at any point with
+% The package can be (re-)configured\index{reconfigure|userman} at any point with
% \cs{typogsetup}\marg{keys}, or --~for localized changes~-- as
%
% \begin{codeexample}
@@ -1143,6 +1431,12 @@ end
% where \meta{keys} have the same format as the package options described in
% \cref{sec:package-options}.
%
+% \begin{note}
+% Use \code{\string\PassOptionsToPackage\{\meta{keys}\}\{typog\}} to pass \meta{keys} to
+% \packagename{typog} before loading it and \code{\string\typogsetup\{\meta{keys}\}} after
+% \code{\string\usepackage\{typog\}}.
+% \end{note}
+%
% \begin{usecases}
% \cs{typogsetup} can substitute configuring the package at load-time or serve as an
% addition.~\visualpar Using the |typogsetup|~environment allows to fine-tune the parameters
@@ -1154,9 +1448,9 @@ end
%
% \noindent
% \DescribeMacro{\typogget}
-% Sometimes the user needs to access internal configuration values of
-% package~\packagename{typog}. This can be done in a safe way without resorting to code that
-% is bracketed by \cs{makeatletter}/\cs{makeatother} with the help of the following macro.
+% Sometimes the user needs to access configuration values of package~\packagename{typog}. This
+% can be done in a safe way without resorting to code that is bracketed by \cs{makeatletter}
+% and \cs{makeatother} with the help of the following macro.
%
% \begin{synopsis}\label{syn:typogget}
% \cs{typogget}\marg{key}
@@ -1177,15 +1471,47 @@ end
% \> \{\cs{raisebox}\= \{\cs{typogget}\{raisecapitaldash\}\}\{\cs{cdot}\}\}
% \end{codeexample}
%
-% The latter only is useful inside of an \code{itemize}~environment of course.
+% The latter only is useful inside of an \code{itemize}~environment of course. Compare with
+% the solution in \cref{sec:adjust-label-items} offered by \packagename{typog} since v0.4.
% \end{usecase}
%
+% \DescribeMacro{\typoggetnth}
+% \sinceversion{Since v0.4}
+% If a configuration item is associated with a list as
+% \hyperref[item:lowercaselabelitemadjustments]{\code{lowercaselabelitemadjustments}},
+% \hyperref[item:shrinklimits]{\code{shrinklimits}},
+% \hyperref[item:stretchlimits]{\code{stretchlimits}},
+% \hyperref[item:trackingttspacing]{\code{trackingttspacing}}, and
+% \hyperref[item:uppercaselabelitemadjustments]{\code{uppercaselabelitemadjustments}} are, it
+% may be convenient to fetch a particular list element of it.
+%
+% \begin{synopsis}\label{syn:typoggetnth}
+% \cs{typoggetnth}\marg{csname}\marg{key}\marg{index} \\
+% \cs{typoggetnth}\marg{dimen-register}\marg{key}\marg{index}
+% \end{synopsis}
+%
+% Retrieve the configuration value --~which is a comma-separated list~-- that is associated
+% with~\meta{key} and store the item having position~\meta{index} in \meta{dimen-register} or
+% the parameter-less, global macro~\meta{csname}. The destination \meta{dimen-register} may be
+% predefined like, e.\,g., \cs{dimen0} or user-defined. Dimensions can also be stored in a
+% macro by using the \meta{csname}~form of \cs{typoggetnth} but not \foreignphrase{vice versa}.
+%
+% Index into the list either from left-to-right with positive indices starting at~\(1\) up to
+% the length of the list, or from right-to-left with negative indices starting at~\(-1\) down
+% to the negative length.
+%
+% \begin{note}
+% Macro~\cs{typoggetnth} \emph{only} works with \meta{key}s that are associated with a list
+% of values.
+% \end{note}
+%
%
-% \subsection{Information}\label{sec:information}\index{information}
+% \subsection{Information}\label{sec:information}
+% \index{information|userman}
%
% \begin{whittyquote}
% Never forget: The visual output counts; \\
-% it must always be checked, [\dots]. \\
+% it must always be checked, [\dots\itcorr{-4}]. \\
% \marginnote{The em-dash at then end of the quote is height-adjusted with
% \hyperref[syn:capitalemdash]{\cs{capitalemdash*}}.}%
% \capitalemdash*~\propername{Udo Wermuth}~\cite{wermuth:2017a}
@@ -1196,14 +1522,14 @@ end
%
%
% \subsubsection{Font Information}\label{sec:font-information}
-% \index{font>information}
+% \index{font>information|userman}
%
% \DescribeMacro{\fontsizeinfo}
% Capture the font~size\footnote{We use \cs{fontdimen6}, the em-height as the font
-% size.}\index{font>size} and line~spacing\footnote{The line~spacing simply is
-% \cs{baselineskip}.}\index{line spacing} at the point where \cs{fontsizeinfo} \emph{is called}
-% in macro~\meta{cs-name}. Both dimensions are measured in points~(pt) and the results are
-% rounded to tenths.
+% size.}\index{font>size|userman} and line~spacing\footnote{The line~spacing simply is
+% \cs{baselineskip}.}\index{line spacing|userman} at the point where \cs{fontsizeinfo} \emph{is
+% called} in macro~\meta{cs-name}. Both dimensions are measured in points~(pt) and the results
+% are rounded to tenths.
%
% \begin{synopsis}\label{syn:fontsizeinfo}
% \cs{fontsizeinfo}\marg{cs-name}
@@ -1259,9 +1585,8 @@ end
%
% \begin{caution}
% The end-of-trace marker sometimes gets placed too early and the trace seems truncated.
-% \LaTeX{} reliably logs the requested the trace information, but the write operations for
-% trace data and \cs{immediate}\cs{write} which is used to print the end-tag are not
-% synchronized.
+% \LaTeX{} reliably logs the requested trace information, but the write operations for trace
+% data and \cs{immediate}\cs{write} which is used to print the end-tag are not synchronized.
% \end{caution}
%
%
@@ -1287,7 +1612,8 @@ end
%
% \begin{itemize}[noindent]
% \item Any text tool can be used to ferret out the tags. \propername{Emacs} users will find
-% \mbox{\code{(occur \meta{regexp})}} to be useful.
+% \mbox{\code{(occur \meta{regexp})}} to be useful.\shiftedmarginnote{This \code{itemize}
+% list demonstrates vertically adjusted label items (\cref{sec:adjust-label-items}).}
%
% \item As long as the tags are not nested \programname{sed} or \programname{perl}
% extract the information gathered by~|typoginspect|, for example:
@@ -1338,13 +1664,20 @@ end
%
% \item If more trace information is needed just add \cs{tracing\dots} calls right after
% \code{\string\begin\{typoginspect\}}
-% or~\code{\string\begin\{typoginspectpar\}}.\specialsectionendhere
+% or~\code{\string\begin\{typoginspectpar\}}.
+%
+% \item As the overhead of \cs{typoginspect} is relatively low, hairy parts of a document can
+% permanently be furnished with them, for example, the Index.
+%
+% \item Any labeled part can treat their ids to \meta{id}. Think of \cs{caption}s or any
+% theorem-like environment and their associated, unique \cs{label}s.\specialsectionendhere
% \end{itemize}
% \end{tips}
%
%
% \phantomsection
-% \paragraph{Investigating the badness of a paragraph.}\label{sec:investigating-paragraph-badness}\index{paragraph>badness}
+% \paragraph{Investigating the badness of a paragraph.}\label{sec:investigating-paragraph-badness}
+% \index{paragraph>badness|userman}
%
% It is generally unnecessary to determine the \emph{exact} classification of a paragraph's
% badness~\cite[p.~97n]{knuth:1986}, though the curious user can switch on logging of
@@ -1386,9 +1719,9 @@ end
% \begin{enumerate}[beginpenalty=10000, nosep]
% \item The shortfall~\sample{s} and
% \item glue~\sample{a} or~\sample{g}.\footnote{The author is unaware of any descriptions
-% of \code{s}, \code{a}, or~\code{g}. The interested reader is referred to the source
-% code, e.\,g., \filesystem{pdftex.web}; search for \code{print("\textvisiblespace s=")}.
-% In the weaved documentation the first relevant section is~\S1851.}
+% of \sample{s}, \sample{a}, or~\sample{g} and the interested reader is referred to the
+% source code, e.\,g., \filesystem{pdftex.web}; search for \code{print("\textvisiblespace
+% s=")}. In the weaved documentation the first relevant section is~\S1851.}
% \end{enumerate}
% \item The best\footnote{\singlequotes{Best} means the minimum-demerits path in the graph of
% the feasible breakpoints, which has been constructed for the paragraph.} way to get
@@ -1404,13 +1737,13 @@ end
% as parenthesized values (units are thousandths of the current font's~em) like, e.\,g.,
%
% \begin{codeexample}
-% \textbackslash T1/erewhon-LF/m/n/9/@/@ (-13) \dots
+% \textbackslash T1/erewhon-LF/m/n/9/@/@ (-13) \dots
% \end{codeexample}
%
% or
%
% \begin{codeexample}
-% \textbackslash T1/erewhon-LF/m/n/9/@/@/10ls (+7) \dots
+% \textbackslash T1/erewhon-LF/m/n/9/@/@/10ls (+7) \dots
% \end{codeexample}
%
% An \sample{ls} appended to the font name specification indicates that
@@ -1419,7 +1752,9 @@ end
% \end{note}
%
%
-% \paragraph{Investigating page-breaks.}\index{page break}
+% \phantomsection
+% \paragraph{Investigating page-breaks.}
+% \index{page break|userman}
%
% Use \code{\cs{tracingpages}=1} or the \hyperref[syn:typoginspect]{typoginspect}~environment
% to switch on tracing of \TeX's page-break
@@ -1486,7 +1821,7 @@ end
%
%
% \subsection{Hyphenation}\label{sec:latex-hyphenation}
-% \index{hyphenation}
+% \index{hyphenation|userman}
%
% \TeX's and thus \LaTeX's hyphenation algorithm is highly sophisticated, yet the document
% author sometimes lacks convenient macros to solve seemingly trivial typographic tasks. For
@@ -1500,8 +1835,8 @@ end
% \cs{allowhyphenation}
% \end{synopsis}
%
-% Macro~\cs{allowhyphenation}\index{hyphenation>re-enable automatic} re-enables automatic
-% hyphenation after \TeX{} has turned it off, for example, in the innocuous case of a
+% Macro~\cs{allowhyphenation}\index{hyphenation>re-enable automatic|userman} re-enables
+% automatic hyphenation after \TeX{} has turned it off, for example, in the innocuous case of a
% hyphenated compound.
%
% The admittedly simple rules when \TeX{} auto-hyphenates and when not give rise to so many
@@ -1636,7 +1971,7 @@ end
% Whenever using \cs{-}, the short-hand form of \cs{discretionary\{-\}\{\}\{\}}, authors
% writing in a foreign language should reconsider whether it really beats \cs{hyphenation} or
% \cs{babelhyphenation}\footnote{\cs{babelhyphenation} is the multi-lingual extension of \TeX's
-% \cs{hyphenation} and it is defined in package~\packagename{babel}~\cite{package:babel}}. in
+% \cs{hyphenation} and it is defined in package~\packagename{babel}~\cite{package:babel}.} in
% the particular situation. However, sometimes \cs{-} actually \emph{is} the way to go.
%
% Let us assume we mark up proper names with
@@ -1662,6 +1997,12 @@ end
% which are impossible to encode with \cs{hyphenation} or~\cs{babelhyphenation} as these expect
% only letters and dashes as their arguments with spaces separating the words.
%
+% \index{hyphenation>first word|userman}
+% \index{hyphenation>hskip=\cs{hskip}|userman}
+% \TeX{} never hyphenates the initial word in a paragraph and \cs{allowhyphenation} cannot help
+% in this case. Start the paragraph with \cs{hskip~0pt} to enable hyphenation even for the
+% first word.
+%
% \begin{tip}[Typewriter Fonts]
% Sometimes it is desired to get a hyphenatable typewriter font. \LaTeX{} suppresses any
% hyphenation for fonts in \cs{ttfamily} by un-defining their \cs{hyphenchar}s. If these are
@@ -1686,8 +2027,8 @@ end
% \cs{breakpoint*}
% \end{synopsis}
%
-% The starred form inserts an empty discretionary,\index{hyphenation>empty discretionary} which
-% disables automatic hyphenation. The unstarred form inserts an empty discretionary and
+% The starred form inserts an empty discretionary,\index{hyphenation>empty discretionary|userman}
+% which disables automatic hyphenation. The unstarred form inserts an empty discretionary and
% immediately re-enables automatic hyphenation.
%
% The difference between \cs{breakpoint} and the \LaTeX{} macro~\cs{allowbreak} is not only
@@ -1729,7 +2070,7 @@ end
%
%
% \subsection{Disable\kernedslash Break Ligatures}\label{sec:break-ligatures}
-% \index{ligature}
+% \index{ligature|userman}
%
% \DescribeMacro{\nolig*}
% Break a ligature without introducing a hyphenation opportunity.
@@ -1739,8 +2080,8 @@ end
% \end{synopsis}
%
% Inserting \cs{nolig*} disables a ligature at the given point by a kern. Set the size of the
-% kern\index{kerning>ligature} with \hyperref[item:ligaturekern]{|ligaturekern|} or override
-% this value with \meta{kerning} as thousandths of the current font's~em.
+% kern\index{kerning>ligature|userman} with \hyperref[item:ligaturekern]{\code{ligaturekern}} or
+% override this value with \meta{kerning} as thousandths of the current font's~em.
%
% \begin{usecases}
% \cs{nolig*} can be useful in headings, where additional hyphenation points are
@@ -1762,12 +2103,12 @@ end
% introduces a hyphenation opportunity with
% penalty~\hyperref[item:breakpenalty]{|breakpenalty|}.
%
-% \begin{important}[\packagename{hyperref} bookmarks]\index{hyperref=\packagename{hyperref} (package)}
+% \begin{important}[\packagename{hyperref} bookmarks]\index{hyperref=\packagename{hyperref} (package)|userman}
% If a \cs{nolig} --~whether starred or un-starred~-- occurs in an argument that is processed
% with package~\packagename{hyperref} for inclusion into the document's
-% \acronym{PDF}-bookmarks\index{PDF=\acronym{PDF}}\index{bookmark} an additional argument is
-% necessary to parse the macro. This argument either is \cs{relax} or~the empty
-% group~(\code{\{\}}).
+% \acronym{PDF}-bookmarks\index{PDF=\acronym{PDF}|userman}\index{bookmark|userman} an
+% additional argument is necessary to parse the macro. This argument either is \cs{relax}
+% or~the empty group~(\code{\{\}}).
%
% \begin{synopsis}
% \begin{tabbing}
@@ -1944,14 +2285,14 @@ end
%
%
% \subsection{Apply Extra Kerning}\label{sec:extra-kerning}
-% \index{kerning>extra}
+% \index{kerning>extra|userman}
%
% Package \packagename{typog} supplies two sets of macros to kern some of the punctuation
% symbols. One is for forward slashes the other, more extensive one, for hyphens.
%
%
% \subsubsection{Slash}\label{sec:slash-with-kern}
-% \index{kerning>forward slash}
+% \index{kerning>forward slash|userman}
%
% \DescribeMacro{\kernedslash}
% \DescribeMacro{\kernedslash*}
@@ -1980,7 +2321,7 @@ end
%
%
% \subsubsection{Hyphen}\label{sec:hyphen-with-kern}
-% \index{kerning>hyphen}
+% \index{kerning>hyphen|userman}
%
% \DescribeMacro{\kernedhyphen}
% \DescribeMacro{\kernedhyphen*}
@@ -2027,7 +2368,7 @@ end
%
%
% \subsection{Raise Selected Characters}\label{sec:raise-characters}
-% \index{raised character}
+% \index{raised character|userman}
%
% Usually all hyphens and dashes of a font are designed to join lowercase letters. This holds
% also true for most of our \cs{labelitem}\meta{N} markers, bullets, stars, and even fancy
@@ -2036,10 +2377,10 @@ end
% arises if |itemize|~list markers precede an uppercase letter, a lining numeral, or a big
% mathematical operator.
%
-% We introduce a set of macros for the most common cases that allow typsetting these characters
-% at a user definable, adjusted height above the baseline. Users can base their own
-% definitions of raised characters on their associated dimensions.\footnote{Also compare with
-% Ex.~12 in Ref.~\citenum{wermuth:2023} for an attempt to automate vertical alignment.}
+% We introduce a set of macros for the most common cases that typeset these characters at a
+% user definable, adjusted height above the baseline. Users can base their own definitions of
+% raised characters on their associated dimensions.\footnote{Also compare with Ex.~12 in
+% Ref.~\citenum{wermuth:2023} for an attempt to automate vertical alignment.}
%
% \begin{caution}
% The height adjustment disables a font's built-in kerning.
@@ -2051,7 +2392,7 @@ end
%
%
% \subsubsection{Capital Hyphen}\label{sec:capital-hyphen}
-% \index{raised character>hyphen}
+% \index{raised character>hyphen|userman}
%
% \DescribeMacro{\capitalhyphen}
% \DescribeMacro{\capitalhyphen*}
@@ -2081,7 +2422,7 @@ end
%
%
% \subsubsection{Capital Dash}\label{sec:capital-dash}
-% \index{raised character>en-dash}
+% \index{raised character>en-dash|userman}
%
% \DescribeMacro{\capitalendash}
% \DescribeMacro{\capitalendash*}
@@ -2127,7 +2468,7 @@ end
%
%
% \subsubsection{Number Dash (Figure Dash)}\label{sec:number-dash}
-% \index{raised character>number dash}
+% \index{raised character>number dash|userman}
%
% \DescribeMacro{\figuredash}
% \DescribeMacro{\figuredash*}
@@ -2152,49 +2493,63 @@ end
% The actual amount the en-dash gets raised in \cs{figuredash} is determined by
% \hyperref[item:raisefiguredash]{|raisefiguredash|}.
%
-% Values of .05em to .1em are typical for fonts that need this kind of correction and~.1em is a
-% good starting point. \Cref{tab:raisefiguredash} summarizes some findings.
+% Values of .05\,em to .1\,em are typical for fonts that need this kind of correction
+% and~.1\,em is a good starting point. \Cref{tab:raisefiguredash} summarizes some findings.
%
% \begin{table}
% \centering
% \caption[Suggested raise amounts for \cs{figuredash}]%
-% {Suggested values for raising the en-dash between lining numerals of some selected
-% fonts.}
+% {Suggested values for raising \cs{figuredash}, which actually is an en-dash,
+% between lining numerals of some selected fonts in multiples of~1\,em.}
% \label{tab:raisefiguredash}
%
+% \newcommand*{\fbbmark}{\tablenotemark{\tablenotesymbol{1}}}
+%
% \begin{tabfigures}
-% \begin{tabular}{@{}l>{\RaggedRight}p{20em}@{}}
+% \begin{tabularx}{\linewidth}{@{}>{\RaggedRight}Xl@{}}
% \toprule
-% Raise & Font Name \\
-% em & \\
+% Font & Raise \\
% \midrule
-% 0 & Alegreya\index{font>Alegreya}, Arvo\index{font>Arvo},
-% Bitter\index{font>Bitter}, Clara\index{font>Clara},
-% \acronym{EB}~Garamond\index{font>EB Garamond=\acronym{EB} Garamond},
-% Gentium\index{font>Gentium},
-% Ibarra Real Nova\index{font>Ibarra Real Nova},
-% \acronym{Inria}~Serif\index{font>Inria Serif=\acronym{Inria} Serif},
-% Libertine\index{font>Libertine}, Libertinus\index{font>Libertinus},
-% Merriweather\index{font>Merriweather},
-% \acronym{PT}~Serif\index{font>PT Serif=\acronym{PT} Serif},
-% Roboto Slab\index{font>Roboto Slab}, Spectral\index{font>Spectral},
-% \acronym{STIX}\index{font>STIX=\acronym{STIX}}, and many more \\
-% .05 & fbb\index{font>fbb}, Source Serif Pro\index{font>Source Serif Pro} \\
-% .0667 & Libre Baskerville\index{font>Libre Baskerville},
-% Crimson Pro\index{font>Crimson Pro},
-% Erewhon\index{font>Erewhon}, Droid Serif\index{font>Droid Serif} \\
-% .1 & \acronym{GFS}~Artemisia\index{font>GFS Artemisia=\acronym{GFS} Artemisia},
-% Libre Caslon\index{font>Libre Caslon},
-% Coelacanth\index{font>Coelacanth}, Crimson Pro\index{font>Crimson Pro},
-% Crimson Text\index{font>Crimson Text},
-% \TeX{} Gyre~Pagella\index{font>TeX Gyre Pagella=\TeX{} Gyre Pagella},
-% Quattrocento\index{font>},
-% \acronym{TX}~Fonts\index{font>TX Fonts=\acronym{TX} Fonts},
-% \acronym{ADF}~Venturis\index{font>ADF Venturis=\acronym{ADF} Venturis},
-% and many more \\
+% Alegreya\detoxindex{font>typeface>Alegreya|userman}, Arvo\detoxindex{font>typeface>Arvo|userman},
+% Bitter\detoxindex{font>typeface>Bitter|userman}, Clara\detoxindex{font>typeface>Clara|userman},
+% \acronym{EB}~Garamond\detoxindex{font>typeface>EB Garamond=\acronym{EB} Garamond|userman},
+% Gentium\detoxindex{font>typeface>Gentium|userman},
+% Ibarra Real Nova\detoxindex{font>typeface>Ibarra Real Nova|userman},
+% \acronym{Inria}~Serif\detoxindex{font>typeface>Inria Serif=\acronym{Inria} Serif|userman},
+% Libertine\detoxindex{font>typeface>Libertine|userman},
+% Libertinus\detoxindex{font>typeface>Libertinus Serif|userman},
+% Merriweather\detoxindex{font>typeface>Merriweather|userman},
+% \acronym{PT}~Serif\detoxindex{font>typeface>PT Serif=\acronym{PT} Serif|userman},
+% Roboto Slab\detoxindex{font>typeface>Roboto Slab|userman},
+% Spectral\detoxindex{font>typeface>Spectral|userman},
+% \acronym{STIX}\detoxindex{font>typeface>STIX=\acronym{STIX}|userman}, and many more &
+% .0 \\
+% fbb\fbbmark\detoxindex{font>typeface>fbb|userman},
+% Source Serif Pro\detoxindex{font>typeface>Source Serif Pro|userman} &
+% .05 \\
+% Libre Baskerville\detoxindex{font>typeface>Libre Baskerville|userman},
+% Crimson Pro\detoxindex{font>typeface>Crimson Pro|userman},
+% Erewhon\detoxindex{font>typeface>Erewhon|userman},
+% Droid Serif\detoxindex{font>typeface>Droid Serif|userman} &
+% .0667 \\
+% \acronym{GFS}~Artemisia\detoxindex{font>typeface>GFS Artemisia=\acronym{GFS} Artemisia|userman},
+% Libre Caslon\detoxindex{font>typeface>Libre Caslon|userman},
+% Coelacanth\detoxindex{font>typeface>Coelacanth|userman},
+% Crimson Pro\detoxindex{font>typeface>Crimson Pro|userman},
+% Crimson Text\detoxindex{font>typeface>Crimson Text|userman},
+% \TeX{} Gyre~Pagella\detoxindex{font>typeface>TeX Gyre Pagella=\TeX{} Gyre Pagella|userman},
+% Quattrocento\detoxindex{font>typeface>Quattrocento|userman},
+% \acronym{TX}~Fonts\detoxindex{font>typeface>TX Fonts=\acronym{TX} Fonts|userman},
+% \acronym{ADF}~Venturis\detoxindex{font>typeface>ADF Venturis=\acronym{ADF} Venturis|userman},
+% and many more &
+% .1 \\
% \bottomrule
-% \end{tabular}
+% \end{tabularx}
% \end{tabfigures}
+%
+% \begin{tablenotes}
+% \fbbmark\enspace Free Bembo.
+% \end{tablenotes}
% \end{table}
%
% Other macros may be redefined with \cs{figuredash} for a consistent appearance of the copy,
@@ -2210,7 +2565,7 @@ end
%
% \subsubsection[Multiplication Sign]%
% {Multiplication Sign -- Times~\sample{\texttimes}}\label{sec:mult-sign}
-% \index{raised character>multiplication sign}
+% \index{raised character>multiplication sign|userman}
%
% \DescribeMacro{\capitaltimes}
% The \cs{capitaltimes}~macro is a variation of the
@@ -2232,17 +2587,19 @@ end
%
%
% \subsubsection{Guillemets}\label{sec:guillemets}
-% \index{raised character>guillemets}
+% \index{raised character>guillemets|userman}
%
% Another possible typographic problem this package addresses is that both sets --~single and
% double quotes~-- of guillemets may suffer from a too small distance to the baseline.
%
% For the implementation \packagename{typog} relies on the T1\footnote{Font
-% encoding~T1\index{font>encoding} can be forced via \cs{usepackage}|[T1]\{fontenc\}| in the
-% document preamble.}~font encoding not on package~\packagename{babel}.
+% encoding~T1\detoxindex{font>encoding|userman} can be forced via
+% \cs{usepackage}|[T1]\{fontenc\}| in the document preamble.}~font encoding not on
+% package~\packagename{babel}.
%
%
% \paragraph{Lowercase Versions.}
+%
% \DescribeMacro{\singleguillemetleft}
% \DescribeMacro{\singleguillemetright}
% \DescribeMacro{\doubleguillemetleft}
@@ -2280,33 +2637,34 @@ end
% or lining numerals is \cs{Singleguillemetleft} and \cs{Singleguillemetright} and
% \cs{Doubleguillemetleft} and \cs{doubleguillemetright}. Mnemonic: These macros start with an
% uppercase letter. Their height above the baseline is adjusted with
-% \hyperref[item:raisecapitalguillemets]{|raisecapitalguillemets|}. Values of .025em to .075em
-% are typical for fonts that need this kind of correction. \Cref{tab:raiseguillemets}
+% \hyperref[item:raisecapitalguillemets]{|raisecapitalguillemets|}. Values of .025\,em to
+% .075\,em are typical for fonts that need this kind of correction. \Cref{tab:raiseguillemets}
% summarizes some findings.
%
% \begin{table}
% \centering
% \caption[Suggested raise amounts for guillemets]%
-% {Suggested values for raising guillemets of some selected fonts.}
+% {Suggested values for raising guillemets of some selected fonts in multiples
+% of~1\,em.}
% \label{tab:raiseguillemets}
%
% \begin{tabfigures}
-% \begin{tabular}{@{}cc>{\RaggedRight}p{20em}@{}}
+% \def~{\hphantom{0}}
+% \begin{tabular}{@{}>{\RaggedRight}p{.5\textwidth}cc@{}}
% \toprule
-% \multicolumn{2}{@{}c}{Raise} & Font Name \\
-% Lowercase & Uppercase & \\
-% em & em & \\
+% Font & Uppercase & Lowercase \\
% \midrule
-% 0 & .05\hphantom{00} &
-% \acronym{EB}~Garamond\index{font>EB Garamond=\acronym{EB} Garamond},
-% Libertinus\index{font>Libertinus},
-% Merriweather\index{font>Merriweather}, and many more \\
-% .025 & .05\hphantom{00} & Gentium\index{font>Gentium} \\
-% .04\hphantom{0} & .0667 &
-% \acronym{ADF}~Baskervald\index{font>ADF Baskervald=\acronym{ADF} Baskervald} \\
-% .05\hphantom{0} & .0625 &
-% \acronym{GFS}~Artemisia\index{font>GFS Artemisia=\acronym{GFS} Artemisia},
-% \acronym{GFS}~Didot\index{font>GFS Didot=\acronym{GFS} Didot} \\
+% \acronym{EB} Garamond\detoxindex{font>typeface>EB Garamond=\acronym{EB} Garamond|userman},
+% Libertinus\index{font>typeface>Libertinus Serif|userman},
+% Merriweather\index{font>typeface>Merriweather|userman}, and many more &
+% .05~~ & .0~~ \\
+% Gentium\index{font>typeface>Gentium|userman} &
+% .05~~ & .025 \\
+% \acronym{GFS} Artemisia\detoxindex{font>typeface>GFS Artemisia=\acronym{GFS} Artemisia|userman},
+% \acronym{GFS} Didot\detoxindex{font>typeface>GFS Didot=\acronym{GFS} Didot|userman} &
+% .0625 & .05~ \\
+% \acronym{ADF} Baskervald\index{font>typeface>ADF Baskervald=\acronym{ADF} Baskervald|userman} &
+% .0667 & .04~ \\
% \bottomrule
% \end{tabular}
% \end{tabfigures}
@@ -2322,7 +2680,8 @@ end
% \cs{let}\cs{sq}=\cs{singlequotes}
% \end{codeexample}
%
-% and similar definitions for \cs{Singlequotes}, \cs{doublequotes}, and~\cs{Doublequotes}.
+% \noindent
+% and similar definitions for \cs{Singlequotes}, \cs{doublequotes}, and \cs{Doublequotes}.
%
% Users working according to the French typesetting conventions will want to add extra
% spacing between the guillemets and the macro argument already in these macros.
@@ -2334,7 +2693,7 @@ end
%
%
% \paragraph{Interaction with package~\packagename{csquotes}.}
-% \index{csquotes=\packagename{csquotes} (package)}
+% \index{csquotes=\packagename{csquotes} (package)|userman}
%
% The users of package~\packagename{csquotes}
% can hook up the guillemets as defined by \packagename{typog}
@@ -2367,21 +2726,374 @@ end
% \end{futuredirection}
%
%
+% \subsection[Vertically Adjust Label Items]
+% {Vertically Adjust Label Items of
+% Environment \code{itemize}}\label{sec:adjust-label-items}
+% \index{label items|userman}
+%
+% \begin{whittyquote}
+% Perfection of planned layout \\
+% is archieved only by institutions \\
+% on the point of collapse. \\
+% \capitalemdash*~\propername{Cyril Northcote Parkinson}
+% \end{whittyquote}
+%
+% \noindent
+% The symbols that \LaTeX{} uses to distinguish the items of |itemize|~lists do not always
+% align well in the vertical direction with the following text. Sometimes the label is too
+% low, especially if followed by an uppercase (initial) letter. In rare occasions the label is
+% placed too far above the baseline. If any label has been taken from a math-font vertical
+% alignment with the text font is almost purely accidental.\footnote{The exception being
+% mathematics typeset as text via package~\packagename{mathastext}~\cite{package:mathastext}.}
+%
+% \hangindent=2\parindent
+% \hangafter=-3
+% \noindent
+% \DescribeMacro{\uppercaseadjustlabelitems}
+% \DescribeMacro{\lowercaseadjustlabelitems}
+% \DescribeMacro{\noadjustlabelitems}
+% \sinceversion{All three since v0.4}
+% Package~\packagename{typog} lets the user vertically align the \code{itemize}~labels for
+% subsequent uppercase or lowercase letters, where the designations~\singlequotes{uppercase}
+% and \singlequotes{lowercase} are just names for two four-tuples of lengths (technically:
+% |dimen|s) to shift the labels up or down.
+%
+% \begin{synopsis}
+% \label{syn:lowercaseadjustlabelitems}
+% \label{syn:noadjustlabelitems}
+% \label{syn:uppercaseadjustlabelitems}
+% \cs{uppercaseadjustlabelitems}\marg{levels-to-adjust} \\
+% \cs{lowercaseadjustlabelitems}\marg{levels-to-adjust} \\
+% \cs{noadjustlabelitems}\marg{levels-to-adjust}
+% \end{synopsis}
+%
+% Apply uppercase adjustment, lowercase adjustment or no adjustment to the labels in
+% |itemize|~environments at the \meta{levels-to-adjust}. The adjustment values themselves,
+% this is the vertical shifts are configured with
+% options~\hyperref[item:uppercaselabelitemadjustments]{\code{uppercaselabelitemadjustments}}
+% and~\hyperref[item:lowercaselabelitemadjustments]{\code{lowercaselabelitemadjustments}}.
+% They are doubly font dependent: on the one hand the font where the label itself comes from
+% and on the other hand the font of the copy.
+%
+% The argument \meta{levels-to-adjust} is a --~possibly empty~-- comma separated list of the
+% levels the respective adjustments are to be applied to. The levels themselves are given as
+% \emph{decimal} numbers, this is, 1, 2, 3, 4 or the special value~\sample{*} which stands for
+% all four levels. An empty argument list also has a special meaning. Used within any
+% \code{itemize}~environment it automatically applies the adjustment to exactly this level.
+%
+% \begin{example}
+% \begin{typogsetup}{uppercaselabelitemadjustments={.1em}}
+% With the flexible syntax the following settings are possible.
+%
+% \renewcommand*{\labelitemi}{{\small$\rhd$}}%
+% \begin{itemize}\uppercaseadjustlabelitems{}
+% \item Correct all |itemize| labels for uppercase letters.
+%
+% \begin{codeexample}
+% \cs{uppercaseadjustlabelitems}\{*\}
+% \end{codeexample}
+%
+% \item Adjust nesting levels~1, 2, and~3 for uppercase letters and level~4 for lowercase.
+%
+% \begin{codeexample}
+% \cs{lowercaseadjustlabelitems}\{4\} \\
+% \cs{uppercaseadjustlabelitems}\{2,3,1\}
+% \end{codeexample}
+%
+% \item Within an |itemize|~environment just turn off any correction for this level whatever
+% it may be.
+%
+% \begin{codeexample}
+% \cs{begin}\{itemize\} \\
+% \cs{noadjustlabelitems}\{\} \\
+% \cs{item} \dots \\
+% \cs{end}\{itemize\}
+% \end{codeexample}
+%
+% \item Override \cs{labelitemi} with a right-pointing triangle and adjust its vertical
+% position inside of a \code{typogsetup}~environment.
+%
+% \begin{codeexample}
+% \cs{begin}\=\{typogsetup\} \\
+% \>\{uppercaselabelitemadjustments=\{.1em\}\} \\
+% 12\=34567890 \kill
+% \>\cs{renewcommand*}\{\cs{labelitemi}\}\{\{\cs{small}\$\cs{rhd}\$\}\} \\
+% \>\cs{begin}\{itemize\} \\
+% \>\cs{uppercaseadjustlabelitems}\{\} \\
+% \>\cs{item} \dots \\
+% \>\cs{end}\{itemize\} \\
+% \cs{end}\{typogsetup\}
+% \end{codeexample}
+% \end{itemize}
+%
+% The observant reader will have noticed that the itemized list in this emphasized section
+% uses the code of the last example.
+% \end{typogsetup}
+% \end{example}
+%
+%
+% \paragraph{Setup.}
+%
+% To assist the user in finding the desired adjustments of the labels of \packagename{typog}
+% provides macros that help setting up
+% \hyperref[item:lowercaselabelitemadjustments]{\code{lowercaselabelitemadjustments}} and
+% \hyperref[item:uppercaselabelitemadjustments]{\code{uppercaselabelitemadjustments}}. Their
+% intended uses are in the draft phase of a document or in non-printed sections of the text.
+%
+% The macros assume a \singlequotes{correct} height that they derive from the measured height
+% of a sample text scaled by a user-defined factor, which defaults
+% to~\nativetextfraction{1}{2}.\footnote{The default factor of~.5 hearkens back to
+% \propername{Strizver's} suggestion that \doublequotes{[b]ullets should be centered on either
+% the cap~height or x-height of the neighboring text, \dots.}~\cite[p.~220]{strizver:2014}.}
+% The then correct height gets indicated by a thin horizontal line parallel to the baseline.
+% Thus, at sufficiently high magnifications it is possible to judge whether a label gets
+% typeset too high or too low with respect to this reference line.
+%
+% \begin{note}
+% The macros use the actual height of a given sample~text. So, a lowercase~sample should not
+% contain any letters with ascenders.
+%
+% Swashes whether upper- or lowercase always need special attention.
+% \end{note}
+%
+% \DescribeMacro{\typogadjuststairs}
+% \sinceversion{Since v0.4}
+% To get a quick overview how the four \code{itemize}~labels align vertically
+% \cs{typogadjuststairs} draws them at user-defined steps, typically
+% \nativetextfraction{1}{4}\,pt, \nativetextfraction{1}{3}\,pt, or
+% \nativetextfraction{1}{2}\,pt. It ignores any existing adjustments and in that way can be
+% utilized as a first configuration step or, for a small \meta{step-size} and a high
+% \meta{number-of-steps}, for an easy refinement.
+%
+% \begin{synopsis}
+% \begin{tabbing}
+% \label{syn:typogadjuststairs}
+% \cs{typogadjuststairs}\=[\meta{scale-factor}=.5] \\
+% \>\marg{step-size}\marg{number-of-steps} \\
+% \>\marg{sample}
+% \end{tabbing}
+% \end{synopsis}
+%
+% Generate stairs of \meta{number-of-steps} vertically shifted label items; use the next odd
+% number, if \meta{number-of-steps} is even. Draw a reference hairline at \meta{scale-factor}
+% times the height of \meta{sample}, where \meta{scale-factor} defaults to~.5. The stairs
+% start at a vertical shift of
+% \begin{gather*}
+% -\frac{\text{\meta{number-of-steps}} - 1}{2} \times \text{\meta{step-size}} \\
+% \intertext{and repeat up}
+% \frac{\text{\meta{number-of-steps}} - 1}{2} \times \text{\meta{step-size}}.
+% \end{gather*}
+%
+% \noindent
+% The central step --~which is always surrounded by a bit more space~-- shows the neutral
+% alignment, this is~0\,pt. \cs{typogadjuststairs} never prints the contents of \meta{sample}.
+%
+% \begin{example}
+% Play ball!
+%
+% \begin{center}
+% \typogadjuststairs{.25pt}{9}{ABC}
+% \end{center}
+%
+% This is the result of \code{\string\typogadjuststairs\{.25pt\}\{9\}\{ABC\}} with the
+% document's definitions of \cs{labelitem}\meta{N}. The fifth label~item in each line is the
+% uncorrected one.
+% \end{example}
+%
+% \hangindent=2\parindent
+% \hangafter=-3
+% \noindent
+% \DescribeMacro{\typoguppercaseadjustcheck}
+% \DescribeMacro{\typoglowercaseadjustcheck}
+% \sinceversion{Both since v0.4}
+% For a quick and easy check how the four label items vertically align \emph{as configured} use
+% \code{\string\typoguppercaseadjustcheck} and \code{\string\typoglowercaseadjustcheck}.
+% Experienced users with a keen eye for type can apply these macros even in the initial setup.
+% An accurate determination of \code{uppercaselabelitemadjustments} and
+% \code{lowercaselabelitemadjustments} is preferably done at a high magnification (400\% to
+% 600\% on a 100\,dpi screen) with a representative sample of initial letters.
+%
+% \begin{synopsis}
+% \label{syn:typoguppercaseadjustcheck}
+% \label{syn:typoglowercaseadjustcheck}
+% \cs{typoguppercaseadjustcheck}[\meta{scale-factor}=.5]\marg{sample} \\
+% \cs{typoglowercaseadjustcheck}[\meta{scale-factor}=.5]\marg{sample}
+% \end{synopsis}
+%
+% Typeset all four label items adjusted for uppercase or for lowercase with an indicator line
+% at \meta{scale-factor} times the \meta{sample}'s actual height. The default
+% \meta{scale-factor} is~.5. Both macros refer to the currently configured values for the
+% uppercase or lowercase adjustments but they are independent of any settings done with
+% \cs{uppercaseadjustlabelitems}, \cs{lowercaseadjustlabelitems}, or \cs{noadjustlabelitems}.
+% Again, \meta{sample} does not get printed.
+%
+% \begin{example}
+% Uppercase check with \code{\string\typoguppercaseadjustcheck\{ABCXYZ\}}:
+%
+% \centering
+% ABGH\typoguppercaseadjustcheck{ABCXYZ}QWYZ,\enspace
+% 0123\typoguppercaseadjustcheck{ABCXYZ}4567
+%
+% \justifying
+% \noindent
+% and similarly for lowercase: \code{\string\typoglowercaseadjustcheck\{acexyz\}}:
+%
+% \centering
+% ace\typoglowercaseadjustcheck{acexyz}mno,\enspace
+% bdf\typoglowercaseadjustcheck{acexyz}gjy,\enspace
+% {\proportionaloldstylefigures 0123\typoglowercaseadjustcheck{acexyz}4567,}
+%
+% \justifying
+% \noindent
+% where we have bracketed the macro calls with selected uppercase and lowercase letters, or
+% suitable figures.
+% \end{example}
+%
+% In \Cref{tab:labelitemadjustvalues} on \cpageref{tab:labelitemadjustvalues} we collected some
+% suggestions for adjustment values in the \emph{default} case when the label items are not
+% redefined by the user and expand like
+%
+% \begin{center}
+% \def\arraystretch{1}
+% \begin{tabular}{@{}l@{\enspace\(\vdash\)\enspace}l@{}}
+% \cs{labelitemi} & \dumpmacro{\labelitemi}, \\
+% \cs{labelitemii} & \dumpmacro{\labelitemii}, \\
+% \cs{labelitemiii} & \dumpmacro{\labelitemiii}, and \\
+% \cs{labelitemiv} & \dumpmacro{\labelitemiv}.
+% \end{tabular}
+% \end{center}
+%
+% \noindent
+% They display as \sample{\labelitemi}, \sample{\labelitemii}, \sample{\labelitemiii}, and
+% \sample{\labelitemiv}, respectively.
+%
+% \begin{table}
+% \centering
+% \caption[Label item adjustment suggestions]%
+% {Some suggested values for the vertical adjustments of label items. The table
+% assumes that the default definitions (of class~\packagename{article}) for
+% \cs{labelitem}\meta{N} are in effect. The \code{itemize}-list levels~\code{i},
+% \code{ii}, \code{iii} and~\code{iv} are referred to with \(N = 1, 2, 3, 4\). All
+% lengths are given as printer points~(pt) and refer to a document font size of
+% \formatdimen*{10pt}.}
+% \label{tab:labelitemadjustvalues}
+%
+% \newcommand*{\etbbmark}{\tablenotemark{\tablenotesymbol{1}}}
+% \newcommand*{\xchartermark}{\tablenotemark{\tablenotesymbol{2}}}
+% \newcommand*{\kpmark}{\tablenotemark{\tablenotesymbol{3}}}
+% \newcommand*{\palladiomark}{\tablenotemark{\tablenotesymbol{4}}}
+% \newcommand*{\utopiamark}{\tablenotemark{\tablenotesymbol{5}}}
+%
+% \begin{tabfigures}
+% \def~{\hphantom{0}}
+% \def\mc#1{#1~~~}
+% \noindent
+% \makebox[0pt]{%
+% \begin{tabular}{@{}l*{4}{r}@{\qquad}*{4}{r}@{}}
+% \toprule
+% Font Name &
+% \multicolumn{4}{c}{Uppercase Adjustments} & \multicolumn{4}{c@{}}{Lowercase Adjustments} \\
+% {} &
+% \mc{1} & \mc{2} & \mc{3} & \mc{4} &
+% \mc{1} & \mc{2} & \mc{3} & \mc{4} \\
+% \midrule
+% \acronym{ADF} Accanthis\detoxindex{font>typeface>ADF Venturis=\acronym{ADF} Accanthis|userman} &
+% .5~~ & 1.5~~ & \textminus1.5~~ & 1.125 &
+% \textminus.75~ & .25~ & \textminus2.75~ & \textminus.125 \\
+% \acronym{ADF} Venturis\detoxindex{font>typeface>ADF Venturis=\acronym{ADF} Venturis|userman} &
+% .0~~ & 1.0~~ & .75~ & 1.0~~ &
+% \textminus.75~ & .0~~ & \textminus.25~ & .0~~ \\
+% \acronym{CM} Roman\detoxindex{font>typeface>CM Roman=\acronym{CM} Roman|userman} &
+% 1.0~~ & .75~ & 1.0~~ & 1.0~~ &
+% \textminus.25~ & \textminus.5~~ & \textminus.25~ & \textminus.25~ \\
+% Domitian\detoxindex{font>typeface>Domitian|userman} &
+% .25~ & 1.0~~ & .75~ & 1.0~~ &
+% \textminus1.0~~ & .0~~ & \textminus.325 & \textminus.25~ \\
+% Cochineal\detoxindex{font>typeface>Cochineal|userman} &
+% 1.0~~ & 1.0~~ & 1.0~~ & 1.0~~ &
+% \textminus.125 & \textminus.125 & \textminus.125 & \textminus.125 \\
+% \acronym{EB} Garamond\detoxindex{font>typeface>EB Garamond=\acronym{EB} Garamond|userman} &
+% .0~~ & 1.25~ & \textminus.875 & 1.325 &
+% \textminus1.5~~ & .0~~ & \textminus2.0~~ & 0.125 \\
+% etbb\etbbmark\detoxindex{font>typeface>etbb|userman} &
+% .25~ & 1.0~~ & 1.125 & .5~~ &
+% \textminus1.0~~ & \textminus.0~~ & \textminus.0~~ & \textminus.5~~ \\
+% Extended Charter\xchartermark\detoxindex{font>typeface>Extended Charter|userman} &
+% \textminus.25~ & 1.0~~ & 1.75 & .125 &
+% \textminus1.125 & .0~~ & .875 & \textminus.875 \\
+% Gentium\detoxindex{font>typeface>Gentium|userman} &
+% .0~~ & .75~ & .0~~ & .0~~ &
+% \textminus.5~~ & \textminus.25~ & \textminus.75~ & \textminus1.0~~ \\
+% \acronym{GFS} Bodoni\detoxindex{font>typeface>GFS Bodoni=\acronym{GFS} Bodoni|userman} &
+% \textminus.25~ & .625 & 1.0~~ & 1.125 &
+% \textminus1.25~ & \textminus.625 & \textminus.5~~ & \textminus.25~ \\
+% \acronym{GFS} Didot\detoxindex{font>typeface>GFS Didot=\acronym{GFS} Didot|userman} &
+% \textminus1.5~~ & .75~ & 1.0~~ & 1.25~ &
+% \textminus2.75~ & \textminus.25~ & \textminus.25~ & .25~ \\
+% \acronym{IBM} Plex Serif\detoxindex{font>typeface>IBM Plex Serif=\acronym{IBM} Plex Serif|userman} &
+% .5~~ & .5~~ & \textminus1.325 & .5~~ &
+% \textminus.25~ & \textminus.25~ & \textminus2.25~ & \textminus.25~ \\
+% \acronym{KP} Serif\kpmark\detoxindex{font>typeface>KP Serif=\acronym{KP} Serif|userman} &
+% .0~~ & 1.0~~ & 1.25~ & .75~ &
+% \textminus1.0~~ & .0~~ & .0~~ & \textminus.5~~ \\
+% Libertinus Serif\detoxindex{font>typeface>Libertinus Serif|userman} &
+% 1.0~~ & .75~ & 1.125 & .75~ &
+% .0~~ & \textminus.325 & .0~~ & \textminus.25~ \\
+% \acronym{ML} Modern\detoxindex{font>typeface>ML Modern=\acronym{ML} Modern|userman} &
+% 1.25~ & .75~ & 1.0~~ & .125 &
+% .0~~ & \textminus.5~~ & \textminus.25~ & \textminus.125 \\
+% Source Serif Pro\detoxindex{font>typeface>Source Serif Pro|userman} &
+% .125 & .75~ & \textminus1.0~~ & .125 &
+% \textminus.75~ & .0~~ & \textminus2.0~~ & \textminus.75~ \\
+% Spectral\detoxindex{font>typeface>Spectral|userman} &
+% .625 & .625 & \textminus1.5~~ & .625 &
+% \textminus.25~ & \textminus.25~ & \textminus2.5~~ & \textminus.25~ \\
+% \acronym{STIX}\detoxindex{font>typeface>STIX=\acronym{STIX}|userman} &
+% 1.0~~ & 1.0~~ & .75~ & 1.0~~ &
+% .0~~ & .0~~ & .0~~ & .0~~ \\
+% \acronym{URW} Palladio\palladiomark\detoxindex{font>typeface>URW Palladio=\acronym{URW} Palladio|userman} &
+% .25~ & 1.125 & 1.0~~ & 1.0~~ &
+% \textminus1.0~~ & \textminus.125 & \textminus.125 & \textminus.125 \\
+% Utopia Regular\utopiamark\detoxindex{font>typeface>Utopia Regular|userman} &
+% .0~~ & 1.0~~ & .75~ & 1.0~~ &
+% \textminus.75~ & .0~~ & \textminus.25~ & .0~~ \\
+% \bottomrule
+% \end{tabular}}
+% \end{tabfigures}
+%
+% \begin{tablenotes}
+% \etbbmark\enspace \propername{Edward Tufte}'s Bembo in package~\packagename{ETbb}. Note
+% the two initial capital letters in the filename.
+%
+% \xchartermark\enspace Found in package \packagename{XCharter}. Again note the two
+% initial capitals in the filename.
+%
+% \kpmark\enspace In package \packagename{kpfonts}.
+%
+% \palladiomark\enspace Contained in package~\packagename{mathpazo}.
+%
+% \utopiamark\enspace Utopia is available through package~\packagename{fourier} or
+% package~\packagename{mathdesign}. In the latter case pass option~\code{adobe-utopia} to
+% the package.
+% \end{tablenotes}
+% \end{table}
+%
+%
% \subsection[Align Last Line]
% {Align Last Line of a Paragraph}\label{sec:align-last-line}
-% \index{paragraph>align last line}
+% \index{paragraph>align last line|userman}
%
% The usual algorithms of \LaTeX{} typeset the last line of a paragraph flush with the left
% margin unless |center|, |raggedleft| or |Centering|, |FlushRight|
% (package~\packagename{ragged2e}~\cite{package:ragged2e}) are in effect. For an instructive
% discussion consult Ch.~17, \doublequotes{Paragraph End}, of Ref.~\citenum{eijkhout:2007}.
-% The following environments allow to adjust the last lines of paragraphs in different ways.
+% The following environments adjust the last lines of paragraphs in different ways.
%
% \DescribeEnv{lastlineraggedleftpar}
% \DescribeEnv{lastlineflushrightpar}
-% The environment |lastlineraggedleftpar|\index{paragraph>align last line>flush right} adjusts
-% the various skips such that the last lines of the paragraphs gets typeset flush with the
-% right margin.
+% The environment \code{lastlineraggedleftpar}\index{paragraph>align last line>flush right|userman}
+% adjusts the various skips such that the last lines of the paragraphs gets typeset flush with
+% the right margin.
%
% \begin{synopsis}\label{syn:lastlineraggedleftpar}\label{syn:lastlineflushrightpar}
% \cs{begin}|{lastlineraggedleftpar}| \\
@@ -2393,8 +3105,9 @@ end
% The name |lastlineflushrightpar| is an alias for~\code{lastlineraggedleftpar}.
%
% \DescribeEnv{lastlinecenteredpar}
-% Center\index{paragraph>align last line>centered} the last lines of the paragraphs enclosed by
-% this environment.\footnote{Also compare the approach taken in Ref.~\citenum{wermuth:2018}.}
+% Center\index{paragraph>align last line>centered|userman} the last lines of the paragraphs
+% enclosed by this environment.\footnote{Also compare the approach taken in
+% Ref.~\citenum{wermuth:2018}.}
%
% \begin{synopsis}\label{syn:lastlinecenteredpar}
% \cs{begin}|{lastlinecenteredpar}| \\
@@ -2412,7 +3125,7 @@ end
% \needtocspace
% \subsection[Fill Last Line]
% {Fill Last Line of a Paragraph}\label{sec:fill-last-line}
-% \index{paragraph>fill last line}
+% \index{paragraph>fill last line|userman}
%
% The problem of when and how to \singlequotes{fill} the last line of a paragraph is quite
% intricate. We first define the problem then we proceed to general purpose functions and we
@@ -2421,7 +3134,7 @@ end
%
% \subsubsection{Problem Definition}
%
-% Depending on the value of \cs{parindent}, either zero or nonzero, there may be the desire to
+% Depending on the value of \cs{parindent}, either zero or nonzero, there may be the need to
% control the length of the last line of a paragraph.
%
% \iffalse
@@ -2562,7 +3275,7 @@ end
% \includegraphics{crooked-paragraphs-3.mps}
% \end{center}
% \end{minipage}\footnotetext{Package~\packagename{parskip} defines \cs{parskip}
-% as \mbox{6pt plus 2pt} for a base size of~10pt.}
+% as \mbox{6\,pt plus 2\,pt} for a base size of~10\,pt.}
%
% \medskip
% \begin{minipage}{\linewidth}
@@ -2576,7 +3289,7 @@ end
%
% The suggestions for the gap-width vary from two~em to twice the width of a
% \singlequotes{typical} \cs{parindent}\footnote{% For example, \LaTeX's class
-% \packagename{article} uses a \cs{parindent} of~25pt.} for the gap~\cite{carlisle:1996}.
+% \packagename{article} uses a \cs{parindent} of~25\,pt.} for the gap~\cite{carlisle:1996}.
% \end{enumerate}
%
% \begin{tip}
@@ -2598,9 +3311,10 @@ end
% them should have certain advantageous properties.
%
% \begin{itemize}
-% \item Technically, the paragraphs need to contain enough glue (see
-% e.\,g.~\cref{sec:sloppy-paragraphs}) to achieve a low badness such that the desired
-% paragraph end is deemed feasible by \TeX.
+% \item Technically, the paragraphs need to contain enough glue (see for example
+% \cref{sec:sloppy-paragraphs}) to achieve a low badness such that the desired paragraph
+% end is deemed feasible by \TeX.\shiftedmarginnote{This \code{itemize} list demonstrates
+% vertically adjusted label items (\cref{sec:adjust-label-items}).}
%
% \item Aesthetically, the paragraphs must be long enough to absorb the change in last-line
% fill level otherwise their gray-values visibly deviate from the
@@ -2618,18 +3332,21 @@ end
% \item End-of-paragraph intervention.\label{enum:end-of-paragraph-intervention}
%
% \begin{enumerate}[notopsep]
-% \item Tie~\sample{\texttt{\char126}}\label{enum:tie-last-words}\index{paragraph>fill last line>tie}
+% \item Tie~\sample{\texttt{\char126}}\label{enum:tie-last-words}
+% \index{paragraph>fill last line>tie|userman}
%
% Tie the last words.
%
% The problem with the tie may be a hyphenation of one of the words that participates in
% the tie. The next item avoids this disadvantage.
%
-% \item \cs{mbox}\label{enum:mbox-last-words}\index{paragraph>fill last line>mbox=\cs{mbox}}
+% \item \cs{mbox}\label{enum:mbox-last-words}
+% \index{paragraph>fill last line>mbox=\cs{mbox}|userman}
%
% Join the last words or inline equation at the end of the paragraph with an~\cs{mbox}.
%
-% \item \cs{linebreak}\label{enum:linebreak}\index{paragraph>fill last line>linebreak=\cs{linebreak}}
+% \item \cs{linebreak}\label{enum:linebreak}
+% \index{paragraph>fill last line>linebreak=\cs{linebreak}|userman}
%
% Add a \cs{linebreak} to the back part of the paragraph (approximately where the
% \cs{mbox} of item~\ref{enum:mbox-last-words} would start) in a way that the last line
@@ -2646,7 +3363,8 @@ end
% \item Uniform paragraph change.\label{enum:uniform-paragraph-change}
%
% \begin{enumerate}[notopsep]
-% \item Vary spacing.\label{enum:vary-spacing}\index{font>spacing}
+% \item Vary spacing.\label{enum:vary-spacing}
+% \index{font>spacing|userman}
%
% Modify the inter-word spacing, for example, with the macros introduced in
% \cref{sec:looser-tighter-spacing}.
@@ -2655,13 +3373,15 @@ end
% or~\hyperref[syn:tightspacing]{|tightspacing|}.
% Increase the spacing~\meta{level} until the last line gets the desired length.
%
-% \item Vary font tracking.\label{enum:vary-font-tracking}\index{font>tracking}
+% \item Vary font tracking.\label{enum:vary-font-tracking}
+% \index{font>tracking|userman}
%
% Enclose the paragraph in a \hyperref[syn:setfonttracking]{\code{setfonttracking}}~group.
% See \cref{sec:tracking-control}. Increase or decrease the tracking in steps of
% \nativetextfraction{1}{1000}\,em until the last line looks good.
%
-% \item Vary font expansion.\label{enum:vary-font-expansion}\index{font>expansion}
+% \item Vary font expansion.\label{enum:vary-font-expansion}
+% \index{font>expansion|userman}
%
% Enclose the paragraph in a \hyperref[syn:setfontexpand]{\code{setfontexpand}}~group. See
% \cref{sec:font-expansion-control}.
@@ -2688,15 +3408,17 @@ end
%
% \DescribeEnv{shortenpar}
% \DescribeEnv{prolongpar}
-% The two environments |shortenpar|\index{paragraph>fill last
-% line>shortenpar=\code{shortenpar}} and |prolongpar|\index{paragraph>fill last
-% line>prolongpar=\code{prolongpar}} can be employed in quite general situations when a
+% The two environments
+% \code{shortenpar}\index{paragraph>fill last line>shortenpar=\code{shortenpar}|userman}
+% and \code{prolongpar}\index{paragraph>fill last line>prolongpar=\code{prolongpar}|userman}
+% can be employed in quite general situations when a
% paragraph should be typeset one line longer or shorter, e.\,g., to avoid a
-% widow~line\footnote{The last line of a paragraph becomes a \singlequotes{widow}\index{forlorn
-% line>widow} (ger.~\foreignphrase{Hurenkind}) if it starts the following page or column.} or
-% a club~line\footnote{The first line of a paragraph is called
-% \singlequotes{club}\index{forlorn line>club} or~\singlequotes{orphan}\index{forlorn
-% line>orphan} (ger.~\foreignphrase{Schusterjunge}) if it appears at the bottom of the page or
+% widow~line\footnote{The last line of a paragraph becomes a
+% \singlequotes{widow}\detoxindex{forlorn line>widow|userman} (ger.~\foreignphrase{Hurenkind}) if it
+% starts the following page or column.} or a club~line\footnote{The first line of a paragraph
+% is called \singlequotes{club}\detoxindex{forlorn line>club|userman}
+% or~\singlequotes{orphan}\detoxindex{forlorn line>orphan|userman}
+% (ger.~\foreignphrase{Schusterjunge}) if it appears at the bottom of the page or
% column.}~[\citenum{knuth:1986}, p.~104 and~\citenum{mittelbach:2018c}]. (See also
% \cref{sec:vtie-paragraph} for special functions to avoid clubs or widows.)
% \singlequotes{Accidentally}, they also change the length of the last line of the paragraph.
@@ -2730,7 +3452,8 @@ end
% parameter change.
%
% \DescribeEnv{covernextindentpar}
-% Environment |covernextindentpar|\index{paragraph>fill last line>covernextindentpar=\code{covernextindentpar}}
+% Environment \code{covernextindentpar}%
+% \index{paragraph>fill last line>covernextindentpar=\code{covernextindentpar}|userman}
% can be helpful for \hyperref[item:o1]{case~O1}, i.\,e., a too short last line.
%
% \begin{synopsis}\label{syn:covernextindentpar}
@@ -2747,9 +3470,10 @@ end
% (if \(\cs{parindent} = 0\)), or \meta{dim} if called with an optional argument.
%
% \DescribeEnv{openlastlinepar}
-% The next environment, |openlastlinepar|,\index{paragraph>fill last
-% line>openlastlinepar=\code{openlastlinepar}} takes care of \hyperref[item:o2]{case~O2},
-% i.\,e., a last line in a paragraph that is almost full or completely filled.
+% The next environment, \code{openlastlinepar},%
+% \index{paragraph>fill last line>openlastlinepar=\code{openlastlinepar}|userman}
+% takes care of \hyperref[item:o2]{case~O2}, i.\,e., a last line in a paragraph that is almost
+% full or completely filled.
%
% \begin{synopsis}\label{syn:openlastlinepar}
% \cs{begin}|{openlastlinepar}|\oarg{dim} \\
@@ -2769,13 +3493,15 @@ end
% last line is avoided, but the result may be of \hyperref[item:o1]{type~O1} nonetheless.
%
%
+% \toccontinuesonnextpage
% \needtocspace
% \Needspace{150pt}
-% \subsection{Spacing}\label{sec:spacing-control}\index{font>spacing}
+% \subsection{Spacing}\label{sec:spacing-control}
+% \index{font>spacing|userman}
%
% \begin{whittyquote}
-% 90~\% of design is typography. \\
-% And the other 90~\% is whitespace. \\
+% 90\% of design is typography. \\
+% And the other 90\% is whitespace. \\
% \capitalemdash*~\propername{Jeffrey Zeldman}
% \end{whittyquote}
%
@@ -2785,7 +3511,9 @@ end
% \cref{sec:microtype-frontend}.
%
%
-% \subsubsection[Looser\kernedslash Tighter]{Looser or Tighter Spacing}\label{sec:looser-tighter-spacing}\index{font>spacing>loose}\index{font>spacing>tight}
+% \subsubsection[Looser\kernedslash Tighter]{Looser or Tighter Spacing}\label{sec:looser-tighter-spacing}
+% \index{font>spacing>loose|userman}
+% \index{font>spacing>tight|userman}
%
%
% \begin{whittyquote}
@@ -2822,7 +3550,7 @@ end
%
% \begin{SCtable}[10]
% \caption[Spacing changes made by \code{loosespacing}]%
-% {Adjustments made by environment |loosespacing| to \cs{spaceskip}.
+% {Adjustments made by environment \code{loosespacing} to \cs{spaceskip}.
% The mapping of \meta{level} to the exact skip definitions are
% \(1 \mapsto \formatskip{1.05}{.5}{.1}\),
% \(2 \mapsto \formatskip{1.1}{.5}{.1}\),
@@ -2836,7 +3564,7 @@ end
% \def~{\hphantom{0}}%
% \begin{tabular}{@{}ccl@{}}
% \toprule
-% \meta{level} & Adjustment & Comment \\
+% \meta{level} & Adjustment & Note \\
% {} & \% & \\
% \midrule
% 0 & n/a & neutral \\
@@ -2861,29 +3589,29 @@ end
% \cref{tab:tightspacing}.
%
% \begin{SCtable}[10]
+% \def~{\hphantom{0}}
% \caption[Spacing changes made by \code{tightspacing}]%
-% {Adjustments made by environment |tightspacing| to \cs{spaceskip}.
+% {Adjustments made by environment \code{tightspacing} to \cs{spaceskip}.
% The mapping of \meta{level} to the exact skip definitions are
-% \(1 \mapsto \formatskip{.9875}{.0125}{.5\hphantom{000}}\)\!,
-% \(2 \mapsto \formatskip{.975}{.025}{.5\hphantom{00}}\)\!,
-% \(3 \mapsto \formatskip{.95}{.05}{.5\hphantom{0}}\)\!, and
+% \(1 \mapsto \formatskip{.9875}{.0125}{.5~~~}\)\!,
+% \(2 \mapsto \formatskip{.975}{.025}{.5~~}\)\!,
+% \(3 \mapsto \formatskip{.95}{.05}{.5~}\)\!, and
% \(\ge 4 \mapsto \formatskip{.9}{.1}{.5}\),
% where all factors scale with \cs{dimen2},
% the current font's space-width.}
% \label{tab:tightspacing}
%
% \begin{tabfigures}
-% \def~{\hphantom{0}}%
% \begin{tabular}{@{}ccl@{}}
% \toprule
-% \meta{level} & Adjustment & Comment \\
+% \meta{level} & Adjustment & Note \\
% {} & \% & \\
% \midrule
% 0 & n/a & neutral \\
-% 1 & ~{-}1.25 & default \\
-% 2 & ~{-}2.5~ & \\
-% 3 & ~{-}5\hphantom{.00} & \\
-% \(\ge\)\:4 & -10\hphantom{.00} & \\
+% 1 & ~\textminus 1.25 & default \\
+% 2 & ~\textminus 2.5~ & \\
+% 3 & ~\textminus 5\hphantom{.}~~ & \\
+% \(\ge\)\:4 & \textminus 10\hphantom{.}~~ & \\
% \bottomrule
% \end{tabular}
% \end{tabfigures}
@@ -2902,7 +3630,8 @@ end
% \end{usecases}
%
%
-% \subsubsection{Wide Space}\label{sec:wide-space}\index{wide space}
+% \subsubsection{Wide Space}\label{sec:wide-space}
+% \index{wide space|userman}
%
% The \cs{widespace} macro and its companion \cs{narrowspace} derive their appearances from
% several of the current font's \cs{fontdimen}\meta{number}s. \TeX{} addresses the latter by
@@ -2914,10 +3643,11 @@ end
%
% \begin{SCtable}
% \caption[\cs{fontdimen}\meta{number} parameters]
-% {The first column~\sample{\#} states the index of the \cs{fontdimen} parameter:
-% \meta{number}. Column~2 presents short descriptions of the
-% \cs{fontdimen}\meta{number} parameters. As examples, the values for the current
-% font are shown in column~3; they are normalized to the quad-size.\bottomstrut}
+% {All \TeX{} font parameters normalized to the font's quad-size. The first
+% column~\sample{\#} states the index of the \cs{fontdimen} parameter:
+% \meta{number}. Column~2 presents short descriptions of
+% \cs{fontdimen}\meta{number}. As examples, the values for the current font are
+% shown in column~3.\bottomstrut}
% \label{tab:fontdimen}
%
% \begin{tabfigures}
@@ -2931,7 +3661,6 @@ end
% \begin{tabular}{@{}lll@{}}
% \toprule
% \# & Description & Value \\
-% {} & & \multicolumn{1}{c}{\%} \\
% \midrule
% 1 & Slant per 1\,pt height & ~~\relativefontdimen1\topstrut \\
% 2 & Interword space width & ~\relativefontdimen2 \\
@@ -2990,7 +3719,8 @@ end
% \end{usecase}
%
%
-% \subsubsection{Narrow Space}\label{sec:narrow-space}\index{narrow space}
+% \subsubsection{Narrow Space}\label{sec:narrow-space}
+% \index{narrow space|userman}
%
% \DescribeMacro{\narrowspace}
% \DescribeMacro{\narrowspace*}
@@ -3033,25 +3763,25 @@ end
% \centering
% \caption[Comparison of some space sizes]
% {Exemplary comparison of standard \cs{space} versus \cs{narrowspace} and
-% \cs{widespace}. All values are relative to the size of the current font's quad
-% size. \cs{narrowspace} and \cs{widespace} use the package's defaults.~\visualpar
-% The upper values in the Width-column for \cs{narrowspace}, and \cs{widespace}
-% refer to the \(\cs{fontdimen7} \not= 0\) case and the lower ones to the
-% \(\cs{fontdimen7} = 0\) code-path.}
+% \cs{widespace}. All values are relative to the size of the current font's
+% quad-size and shown as a percentage of it. \cs{narrowspace} and \cs{widespace}
+% use the package's defaults.~\visualpar The upper values in the
+% \singlequotes{Width}~column for \cs{narrowspace} and \cs{widespace} refer to the
+% \(\cs{fontdimen7} \not= 0\) case and the lower ones to the \(\cs{fontdimen7} = 0\)
+% code-path.}
% \label{tab:space-sizes}
%
% \begin{tabfigures}
-% \def~{\hphantom{0}}%
+% \def~{\hphantom{0}}
% \ExplSyntaxOn
% \def\relativedimen#1{\fp_eval:n {round (1000 * (#1) / \the\fontdimen6\font) / 10}}
% \def\relativefontdimen#1{\relativedimen{\the\fontdimen#1\font}}
% \ExplSyntaxOff
% \def\nrows{1.75}
%
-% \begin{tabular}{@{}llll@{}}
+% \begin{tabular}{@{}l*{3}{r}@{}}
% \toprule
-% Name & Width & Stretch & Shrink \\
-% {} & \% & \% & \% \\
+% Macro & Width & Stretch & Shrink \\
% \midrule
% \multirow{\nrows}{*}{\cs{narrowspace}} &
% \relativedimen{\the\fontdimen2\font - \narrowspacestrength * \the\fontdimen7\font} &
@@ -3071,7 +3801,7 @@ end
%
%
% \subsection{\packagename{Microtype} Front\capitalhyphen End}\label{sec:microtype-frontend}
-% \index{microtype=\packagename{microtype} (package)}
+% \index{microtype=\packagename{microtype} (package)|userman}
%
% The functionalities are just front-ends of selected macros in
% package~\packagename{microtype} -- welcome syntactic sugar.
@@ -3091,7 +3821,8 @@ end
% \end{important}
%
%
-% \subsubsection{Tracking}\label{sec:tracking-control}\index{font>tracking}
+% \subsubsection{Tracking}\label{sec:tracking-control}
+% \index{font>tracking|userman}
%
% \begin{caution}
% The tracking changes may interfere with implicit changes of tracking declared with
@@ -3136,7 +3867,7 @@ end
% \end{codeexample}
%
% If the argument of option~\code{trackingttspacing} is omitted the outer spacing defaults to
-% \makeatletter\mbox{\typog@trackingttspacing}\makeatother.
+% \makeatletter\mbox{\typog@config@trackingttspacing}\makeatother.
%
% \begin{usecases}
% Nudge line breaks or hyphenation points.~\visualpar Avoid clashes of descenders and
@@ -3145,7 +3876,8 @@ end
% \end{usecases}
%
%
-% \subsubsection{Font Expansion}\label{sec:font-expansion-control}\index{font>expansion}
+% \subsubsection{Font Expansion}\label{sec:font-expansion-control}
+% \index{font>expansion|userman}
%
% \DescribeEnv{setfontshrink}
% \DescribeEnv{setfontstretch}
@@ -3153,10 +3885,10 @@ end
% component, i.\,e., shrinkability and stretchability, respectively.
%
% \begin{synopsis}\label{syn:setfontshrink}\label{syn:setfontstretch}
-% \cs{begin}|{setfontshrink}|\marg{level}
+% \cs{begin}|{setfontshrink}|\oarg{level}
% \dots{}
% \cs{end}|{setfontshrink}| \\
-% \cs{begin}|{setfontstretch}|\marg{level}
+% \cs{begin}|{setfontstretch}|\oarg{level}
% \dots{}
% \cs{end}|{setfontstretch}|
% \end{synopsis}
@@ -3165,20 +3897,20 @@ end
% summarize the values for |stretch| and |shrink| in these environments.
%
% \begin{SCtable}
-% \caption[Shrink values of \code{setfontshrink}]%
+% \caption[Shrink values of \code{setfontshrink}]
% {\slightlysloppy[2] Preconfigured values for |shrink| inside of
-% environment~\code{setfontshrink}. Note that all |stretch| values are zero, so the fonts
-% only can shrink.}
+% environment~\code{setfontshrink} as \nativetextfraction{1}{1000}\,em. Note that all
+% |stretch| values are zero, so the fonts only can shrink.}
% \label{tab:setfontshrink-values}
%
% \begin{tabfigures}
+% \def~{\hphantom{0}}
% \begin{tabular}{@{}cccl@{}}
% \toprule
-% \meta{level} & |stretch| & |shrink| & Comment \\
-% {} & \nativetextfraction{1}{1000}\,em & \nativetextfraction{1}{1000}\,em & \\
+% \meta{level} & |stretch| & |shrink| & Note \\
% \midrule
% 0 & n/a & n/a & no operation \\
-% 1 & 0 & \hphantom{0}\makeatletter\typog@shrink@i\makeatother & default \\
+% 1 & 0 & ~\makeatletter\typog@shrink@i\makeatother & default \\
% 2 & 0 & \makeatletter\typog@shrink@ii\makeatother & \\
% 3 & 0 & \makeatletter\typog@shrink@iii\makeatother & \\
% \bottomrule
@@ -3188,20 +3920,20 @@ end
%
% \begin{SCtable}
% \centering
-% \caption[Stretch values of \code{setfontstretch}]%
+% \caption[Stretch values of \code{setfontstretch}]
% {\slightlysloppy[2] Preconfigured values for |stretch| inside of
-% environment~\code{setfontstretch}. Note that all |shrink| values are zero, so the fonts
-% only can stretch.}
+% environment~\code{setfontstretch} as \nativetextfraction{1}{1000}\,em. Note that all
+% |shrink| values are zero, so the fonts only can stretch.}
% \label{tab:setfontstretch-values}
%
% \begin{tabfigures}
+% \def~{\hphantom{0}}
% \begin{tabular}{@{}cccl@{}}
% \toprule
% \meta{level} & |stretch| & |shrink| \\
-% {} & \nativetextfraction{1}{1000}\,em & \nativetextfraction{1}{1000}\,em & \\
% \midrule
% 0 & n/a & n/a & no operation \\
-% 1 & \hphantom{0}\makeatletter\typog@stretch@i\makeatother & 0 & default \\
+% 1 & ~\makeatletter\typog@stretch@i\makeatother & 0 & default \\
% 2 & \makeatletter\typog@stretch@ii\makeatother & 0 & \\
% 3 & \makeatletter\typog@stretch@iii\makeatother & 0 & \\
% \bottomrule
@@ -3224,7 +3956,7 @@ end
% Manipulate both, |stretch| and |shrink|~values at the same time.
%
% \begin{synopsis}\label{syn:setfontexpand}
-% \cs{begin}|{setfontexpand}|\marg{level}
+% \cs{begin}|{setfontexpand}|\oarg{level}
% \dots{}
% \cs{end}|{setfontexpand}|
% \end{synopsis}
@@ -3232,20 +3964,20 @@ end
% \Cref{tab:setfontexpand-values} gives an overview of the values associated with \meta{level}.
%
% \begin{SCtable}
-% \caption[Shrink and stretch values of \code{setfontexpand}]%
+% \caption[Shrink and stretch values of \code{setfontexpand}]
% {\slightlysloppy[2] Preconfigured values for |shrink| and |stretch| inside of
-% environment~\code{setfontexpand}. Note that both |shrink| and |stretch| values are
-% nonzero, so the fonts can shrink or expand.}
+% environment~\code{setfontexpand} as \nativetextfraction{1}{1000}\,em. Note that both
+% |shrink| and |stretch| values are nonzero, so the fonts can shrink or expand.}
% \label{tab:setfontexpand-values}
%
% \begin{tabfigures}
+% \def~{\hphantom{0}}
% \begin{tabular}{@{}cccl@{}}
% \toprule
-% \meta{level} & |stretch| & |shrink| & Comment \\
-% {} & \nativetextfraction{1}{1000}\,em & \nativetextfraction{1}{1000}\,em & \\
+% \meta{level} & |stretch| & |shrink| & Note \\
% \midrule
% 0 & n/a & n/a & no operation \\
-% 1 & \hphantom{0}\makeatletter\typog@stretch@i\makeatother & \hphantom{0}\makeatletter\typog@stretch@i\makeatother & default \\
+% 1 & ~\makeatletter\typog@stretch@i\makeatother & ~\makeatletter\typog@stretch@i\makeatother & default \\
% 2 & \makeatletter\typog@stretch@ii\makeatother & \makeatletter\typog@stretch@ii\makeatother & \\
% 3 & \makeatletter\typog@stretch@iii\makeatother & \makeatletter\typog@stretch@iii\makeatother & \\
% \bottomrule
@@ -3302,7 +4034,8 @@ end
% \end{usecases}
%
%
-% \subsubsection{Character Protrusion}\label{sec:protrusion}\index{font>protrusion}
+% \subsubsection{Character Protrusion}\label{sec:protrusion}
+% \index{font>protrusion|userman}
%
% \DescribeEnv{nocharprotrusion}
% Disable the \packagename{microtype} feature~\singlequotes{protrusion} inside of the
@@ -3320,8 +4053,8 @@ end
% \end{usecases}
%
%
-% \FloatBarrier
-% \subsection{Sloppy Paragraphs}\label{sec:sloppy-paragraphs}\index{paragraph>sloppy}
+% \subsection{Sloppy Paragraphs}\label{sec:sloppy-paragraphs}
+% \index{paragraph>sloppy|userman}
%
% Experienced \LaTeX{} users know that \cs{sloppy} is more of a problem by itself and not
% really a viable solution of the \doublequotes{overfull~box} syndrome.
@@ -3357,21 +4090,22 @@ end
%
% \begin{suspendshortverb}
% \begin{tabfigures}
+% \def~{\hphantom{0}}
% \begin{tabular}{@{}ccccl@{}}
% \toprule
-% \meta{sloppiness} & \cs{toler-} & \cs{hfuzz} & \cs{emergency-} & Comment \\
+% \meta{sloppiness} & \cs{toler-} & \cs{hfuzz} & \cs{emergency-} & Note \\
% {} & \code{ance} & \cs{vfuzz} & \code{stretch}~\(G\) & \\
% {} & & pt & em & \\
% \midrule
-% 0 & \hphantom{0}200\hphantom{\tolerancemark} & .1\hphantom{0} & 0\hphantom{.000\scaledmark} & \TeX: \verb+\fussy+ \\
-% 1 & \hphantom{0}330\tolerancemark & .15 & \hphantom{0}.375\scaledmark & default \\
-% 2 & \hphantom{0}530\tolerancemark & .2\hphantom{0} & \hphantom{0}.75\scaledmark\hphantom{0} & \\
-% 3 & \hphantom{0}870\tolerancemark & .25 & 1.125\scaledmark & \\
-% 4 & 1410\tolerancemark & .3\hphantom{0} & 1.5\scaledmark\hphantom{00} & \\
+% 0 & ~200\hphantom{\tolerancemark} & .1~ & 0\hphantom{.000\scaledmark} & \TeX: \verb+\fussy+ \\
+% 1 & ~330\tolerancemark & .15 & ~.375\scaledmark & default \\
+% 2 & ~530\tolerancemark & .2~ & ~.75\scaledmark~ & \\
+% 3 & ~870\tolerancemark & .25 & 1.125\scaledmark & \\
+% 4 & 1410\tolerancemark & .3~ & 1.5\scaledmark~~ & \\
% 5 & 2310\tolerancemark & .35 & 1.875\scaledmark & \\
-% 6 & 3760\tolerancemark & .4\hphantom{0} & 2.25\scaledmark\hphantom{0} & \\
+% 6 & 3760\tolerancemark & .4~ & 2.25\scaledmark~ & \\
% 7 & 6130\tolerancemark & .45 & 2.625\scaledmark & \\
-% \(\ge\)\:8 & 9999\hphantom{\tolerancemark} & .5\hphantom{0} & 3\hphantom{.000\scaledmark} & \TeX: \verb+\sloppy+ \\
+% \(\ge\)\:8 & 9999\hphantom{\tolerancemark} & .5~ & 3\hphantom{.000\scaledmark} & \TeX: \verb+\sloppy+ \\
% \bottomrule
% \end{tabular}
% \end{tabfigures}
@@ -3403,8 +4137,8 @@ end
% \end{usecases}
%
%
-% \FloatBarrier
-% \subsection{Vertically Partially-Tied Paragraphs}\label{sec:vtie-paragraph}\index{paragraph>vertically tied}
+% \subsection{Vertically Partially-Tied Paragraphs}\label{sec:vtie-paragraph}
+% \index{paragraph>vertically tied|userman}
%
% \LaTeX{} provides several macros and environments to tie material vertically~-- most
% prominently |samepage| and |minipage|.\footnote{A valuable complement to these is
@@ -3421,7 +4155,7 @@ end
%
% \DescribeMacro{\vtietop}
% \DescribeEnv{vtietoppar}
-% Avoid a club\index{forlorn line>club} line in each partial paragraph.
+% Avoid a club\index{forlorn line>club|userman} line in each partial paragraph.
%
% \begin{synopsis}\label{syn:vtietop}\label{syn:vtietoppar}
% \cs{vtietop}\oarg{number-of-lines} \\[\smallskipamount]
@@ -3436,16 +4170,17 @@ end
%
% \begin{usecases}
% String together the first paragraph right after a sectioning command.~\visualpar Tie the
-% first line of an itemized, enumerated, or a description list\index{list} with the paragraph
-% following~\cs{item}.
+% first line of an itemized, enumerated, or a description list\index{list|userman} with the
+% paragraph following~\cs{item}.
% \end{usecases}
%
% \noindent
% \DescribeMacro{\splicevtietop}
-% Inside of a \code{list} a one-off solution simply concatenates \cs{item}[\dots]\cs{vtietop}
-% to fuse the line with the \code{item\#}, the representation of the \code{enum\#}, or the
-% description term with the first paragraph. For a systematic use prefer \cs{splicevtietop}
-% and apply it as the first thing in the \code{list}~body.
+% Inside of a \code{list} a one-off solution simply concatenates
+% \cs{item}[\dots\itcorr{-5}]\cs{vtietop} to fuse the line with the \code{item\#}, the
+% representation of the \code{enum\#}, or the description term with the first paragraph. For a
+% systematic use prefer \cs{splicevtietop} and apply it as the first thing in the
+% \code{list}~body.
%
% \begin{synopsis}\label{syn:splicevtietop}
% \cs{splicevtietop}\oarg{number-of-lines}
@@ -3492,7 +4227,7 @@ end
% \noindent
% \DescribeMacro{\vtiebot}
% \DescribeEnv{vtiebotpar}
-% Avoid a widow\index{forlorn line>widow} line in each partial paragraph.
+% Avoid a widow\index{forlorn line>widow|userman} line in each partial paragraph.
%
% \begin{synopsis}\label{syn:vtiebot}\label{syn:vtiebotpar}
% \cs{vtiebot}\oarg{number-of-lines} \\[\smallskipamount]
@@ -3507,7 +4242,8 @@ end
%
% \noindent
% \DescribeEnv{vtiebotdisp}
-% Avoid a display widow\index{forlorn line>display widow} line in each partial paragraph.
+% Avoid a display widow\index{forlorn line>display widow|userman} line in each partial
+% paragraph.
%
% \begin{synopsis}\label{syn:vtiebotdisp}\label{syn:vtiebotdisppar}
% \cs{begin}|vtiebotdisp|\oarg{before-disp-number-of-lines} \\
@@ -3579,15 +4315,16 @@ end
%
% \begin{typoginspectpar}{partial-paragraphs}
% \setlength{\smoothraggedrightragwidth}{8pt}
-% \paragraph{Partial Paragraphs And Counting Lines.} The top-of-paragraph ties, \cs{vtietop}
-% and \code{vtietoppar} count \meta{number\hyp{}of\hyp{}lines} from the beginning of every
-% partial paragraph. Each displayed math in the paragraph resets the count. The
-% bottom-paragraph ties, \cs{vtiebot}, \code{vtiebotpar}, \cs{vtiebotdisp}, and
-% \code{vtiebotdisppar} count backward from the end of each partial paragraph. Again, each
-% displayed math in the paragraph resets the count. According to \TeX's rules, a displayed
-% math formula always is counted as \emph{three} lines no matter its contents.
-% \Cref{tab:partial-paragraph-line-counts} summarizes these rules with the help of an
-% example.
+% \paragraph{Partial Paragraphs And Counting Lines.}
+%
+% The top-of-paragraph ties, \cs{vtietop} and \code{vtietoppar} count
+% \meta{number\hyp{}of\hyp{}lines} from the beginning of every partial paragraph. Each
+% displayed math in the paragraph resets the count. The bottom-paragraph ties, \cs{vtiebot},
+% \code{vtiebotpar}, \cs{vtiebotdisp}, and \code{vtiebotdisppar} count backward from the end
+% of each partial paragraph. Again, each displayed math in the paragraph resets the count.
+% According to \TeX's rules, a displayed math formula always is counted as \emph{three} lines
+% no matter its contents. \Cref{tab:partial-paragraph-line-counts} summarizes these rules
+% with the help of an example.
% \end{typoginspectpar}
%
% \begin{table}
@@ -3655,11 +4392,11 @@ end
% \end{usecases}
%
%
-% \FloatBarrier
-% \subsection{Breakable Displayed Equations}\label{sec:breakable-display}\index{page break}
+% \subsection{Breakable Displayed Equations}\label{sec:breakable-display}
+% \index{page break|userman}
%
% \DescribeEnv{breakabledisplay}
-% Package~\packagename{amsmath}\index{amsmath=\packagename{amsmath} (package)} offers
+% Package~\packagename{amsmath}\index{amsmath=\packagename{amsmath} (package)|userman} offers
% \cs{allowdisplaybreaks} to render displayed equations breakable at each of their lines.
% Environment~\cs{breakabledisplay} is a wrapper around it which limits the macro's influence
% to the environment. Furthermore, the default \meta{level} of \code{breakabledisplay} is~3
@@ -3688,16 +4425,17 @@ end
% \newcommand*{\clubmark}{\tablenotemark{\dag}}
%
% \begin{tabfigures}
+% \def~{\hphantom{0}}
% \begin{tabular}{@{}ccl@{}}
% \toprule
-% \meta{level} & \cs{interdisplay-} & Comment \\
+% \meta{level} & \cs{interdisplay-} & Note \\
% {} & \code{linepenalty} & \\
% \midrule
% 0 & 10000 & no operation \\
-% 1 & \hphantom{0}9999 & \\
-% 2 & \hphantom{0}6999 & \\
-% 3 & \hphantom{0}2999 & default \\
-% 4 & \hphantom{0000}0\rlap{\clubmark} & \\
+% 1 & ~9999 & \\
+% 2 & ~6999 & \\
+% 3 & ~2999 & default \\
+% 4 & ~~~~0\rlap{\clubmark} & \\
% \bottomrule
% \end{tabular}
% \end{tabfigures}
@@ -3738,7 +4476,6 @@ end
% \end{usecases}
%
%
-% \FloatBarrier
% \clearpage
% \subsection{\packagename{Setspace} Front-End}\label{sec:setspace-frontend}
%
@@ -3747,11 +4484,11 @@ end
% interface of \cs{setstretch} though is unintuitive as it asks for an obscure
% factor.\fontsizeinfo{setspacefontsizeinfo}\marginnote{In the copy of this document gets
% typeset with~\setspacefontsizeinfo*.} The \LaTeX{} user however prefers to keep her eyes on
-% the ball and set the line skip\index{baseline skip} directly (e.\,g.~12.5pt) or the lines'
-% leading\index{leading} to a length or percentage of the font's size.\footnote{To find out
-% about the current font's size and the \cs{baselineskip} in printable form check out
-% \cref{sec:font-information} on \cpageref{sec:font-information}.} This is where the following
-% macros go to bat.
+% the ball and set the line skip\index{baseline skip|userman} directly (e.\,g.~12.5\,pt) or the
+% lines' leading\index{leading|userman} to a length or percentage of the font's
+% size.\footnote{To find out about the current font's size and the \cs{baselineskip} in
+% printable form check out \cref{sec:font-information} on \cpageref{sec:font-information}.}
+% This is where the following macros go to bat.
%
% \begin{important}
% All macros that are introduced in this section rely on macro~\cs{setstretch}. So
@@ -3785,24 +4522,25 @@ end
% will be used in the computation.
%
% \begin{example}
-% Let us assume we want to lighten the gray value of the copy a tad with a \cs{baselineskip}
-% increased (from e.g.~12pt) to~12.5pt. To this end we say:
+% \begin{itemize}[notopsep]
+% \item Let us assume we want to lighten the gray value of the copy a tad with the
+% \cs{baselineskip} increased from 12\,pt to~12.5\,pt. To this end we say:
%
% \begin{codeexample}
-% \cs{setbaselineskip}\{12.5pt\}\specialsectionendhere
+% \cs{setbaselineskip}\{12.5\,pt\}
% \end{codeexample}
-% \end{example}
%
-% \begin{tip}
-% To set the \cs{baselineskip} relative to the current value use
+% \item In a generic part of the document, where the actual \cs{baselineskip} is not known,
+% we can refer to its current value and rescale it:
%
% \begin{codeexample}
-% \cs{setbaselineskip}\{\meta{factor}\cs{baselineskip}\}
+% \cs{setbaselineskip}\{\cs{baselineskip} * 12.5 / 12\}
% \end{codeexample}
%
-% \noindent
-% where \meta{factor} is a floating-point number.
-% \end{tip}
+% Care should be taken if code like the above is implicitly or explicitly
+% repeated, because it results in a geometric series.\specialsectionendhere
+% \end{itemize}
+% \end{example}
%
% \DescribeMacro{\resetbaselineskip}
% \sinceversion{Since v0.3}
@@ -3816,6 +4554,9 @@ end
% notion of what is a single-line \cs{baselineskip}.
%
%
+% \hangindent=2\parindent
+% \hangafter=-2
+% \noindent
% \DescribeMacro{\setbaselineskippercentage}
% \sinceversion{Since v0.3}
% Set the \cs{baselineskip} with a relative value calculated as a percentage of the current
@@ -3828,14 +4569,14 @@ end
% Set \cs{baselineskip} to \(\cs{typogfontsize} \times \meta{baselineskip-percentage} / 100\).
%
% \begin{example}
-% We modify the previous example and assume a font design size of 10pt, but now write
+% We modify the previous example and assume a font design size of 10\,pt, but now write
%
% \begin{codeexample}
% \cs{setbaselineskippercentage}\{125\}
% \end{codeexample}
%
% \noindent
-% which sets \cs{baselineskip} to \(10\text{pt} \times 125 / 100 = 12.5\text{pt}\).
+% which sets \cs{baselineskip} to \(10\text{\,pt} \times 125 / 100 = 12.5\text{\,pt}\).
% \end{example}
%
% \DescribeMacro{\setleading}
@@ -3850,7 +4591,7 @@ end
% \meta{leading} can be negative, e.\,g.~to set solid.
%
% \begin{example}
-% Another solution of the previous example, given a font design size of 10pt is to write
+% Another solution of the previous example, given a font design size of 10\,pt is to write
%
% \begin{codeexample}
% \cs{setleading}\{2.5pt\}
@@ -3872,14 +4613,14 @@ end
% Set \cs{baselineskip} to \(\cs{typogfontsize} \times (1 + \meta{leading-percentage} / 100)\).
%
% \begin{example}
-% We modify the previous example and again assume a font design size of 10pt, but now write
+% We modify the previous example and again assume a font design size of 10\,pt, but now write
%
% \begin{codeexample}
% \cs{setleadingpercentage}\{25\}
% \end{codeexample}
%
% \noindent
-% which sets \cs{baselineskip} to \(10\text{pt} \times (1 + 25 / 100) = 12.5\text{pt}\).
+% which sets \cs{baselineskip} to \(10\text{\,pt} \times (1 + 25 / 100) = 12.5\text{\,pt}\).
% \end{example}
%
% \smallskip
@@ -3949,9 +4690,9 @@ end
% \end{tip}
%
%
-% \FloatBarrier
% \clearpage
-% \subsection{Smooth Ragged}\label{sec:smooth-ragged}\index{ragged right}
+% \subsection{Smooth Ragged}\label{sec:smooth-ragged}
+% \index{ragged right|userman}
%
% \begin{whittyquote}
% The attention someone gives \\
@@ -3964,25 +4705,30 @@ end
% \noindent
% Package \packagename{typog} implements a novel approach to typeset ragged paragraphs.
% Instead of setting the glue inside of a paragraph to zero and letting the line-widths vary
-% accordingly~\cite{wermuth:2020} we prescribe the line-widths with the \cs{parshape}~primitive
-% and leave alone the stretchability or shrinkability of the glue.
+% accordingly~\cite{wermuth:2020} we prescribe the line-widths with \TeX's
+% \cs{parshape}~primitive and leave alone the stretchability or shrinkability of the glue.
%
-% \begin{slightlysloppypar}
-% \hangindent=5.5em\hangafter=-5
+% \begin{caution}
+% None of the following environments work inside of lists.
+% \end{caution}
+%
+% \begin{slightlysloppypar}[2]
+% \hangindent=3.5\parindent
+% \hangafter=-6
+% \noindent
% \DescribeEnv{smoothraggedrightshapetriplet}
% \DescribeEnv{smoothraggedrightshapequintuplet}
% \DescribeEnv{smoothraggedrightshapeseptuplet}
-% We introduce three environments that allow for setting three, five, or seven different
-% line-lengths: \code{smoothraggedrightshapetriplet},
-% \code{smoothraggedrightshapequintuplet}, and \code{smoothraggedrightshapeseptuplet}; they
-% work for paragraphs up to
+% We introduce three environments that set three, five, or seven different line-lengths
+% (which \TeX{} of course will repeat for paragraphs longer than three, five, or seven
+% lines): \code{smoothraggedrightshapetriplet}, \code{smoothraggedrightshapequintuplet}, and
+% \code{smoothraggedrightshapeseptuplet}; they work for paragraph lengths up to
% \makeatletter
-% \typog@triplet@max@lines, \typog@quintuplet@max@lines, or \typog@septuplet@max@lines~lines,
+% \typog@triplet@max@lines, \typog@quintuplet@max@lines, and \typog@septuplet@max@lines~lines,
% \makeatother
% respectively.
% \end{slightlysloppypar}
%
-%
% \begin{maxipage}
% \begin{synopsis}\label{syn:smoothraggedrightshapetriplet}\label{syn:smoothraggedrightshapequintuplet}\label{syn:smoothraggedrightshapeseptuplet}
% \cs{begin}|{smoothraggedrightshapetriplet}|\oarg{option\dots}\marg{width1}\marg{width2}\marg{width3} \\
@@ -4224,23 +4970,47 @@ end
% The default generator is |triplet|.
%
% \item[\cs{smoothraggedrightleftskip}=\meta{dim}]
-% Value for |leftskip| to pass to the generator. Default:~0pt.
+% Value for |leftskip| to pass to the generator. Default:~0\,pt.
%
% \item[\cs{smoothraggedrightparindent}=\meta{dim}]
-% Value for |parindent| to pass to the generator. Default:~0pt.
+% Value for |parindent| to pass to the generator. Default:~0\,pt.
%
% \item[\cs{smoothraggedrightragwidth}=\meta{dim}]
-% Value for the width of the ragged right margin. Default:~2em.
+% Value for the width of the ragged right margin. Default:~2\,em.
% \end{description}
%
+% \begin{samepage}
+% \def\smoothraggedrightgenerator{quintuplet}
+% \setlength{\smoothraggedrightragwidth}{7pt}
+% \begin{nocharprotrusion}\fussy
+% \begin{smoothraggedright}
+% Throughout this manual we have demonstrated how \code{smoothraggedright} environments
+% work for very narrow columns namely inside of the document's margins: all maginal notes
+% were typeset inside of \cs{smoothraggedright} environments (quintuplet generator,
+% 1.5\,em rag width, at footnote~size in addition using
+% environments~\code{slightlysloppy} and \code{loosespacing}). Here, we utilize it with
+% the \smoothraggedrightgenerator~generator and a rag-width of only
+% \the\smoothraggedrightragwidth{} in a paragraph that is \the\linewidth~wide and
+% averages around twelve words per line. There is much more glue to adapt to the
+% line-ends and thus the desired rag is archieved far easier. The sloppyness is minimal,
+% this is, \cs{fussy} is in effect and character protrusion into the margins is switched
+% off. A limitation of the current implementation is that it is ineffective inside of lists.
+% Therefore, this paragraph has not been wrapped inside of an \singlequotes{example}, because
+% all examples are coded as lists.
+% \end{smoothraggedright}
+% \end{nocharprotrusion}
+% \end{samepage}
+%
% \begin{usecases}
% Replacement for \cs{RaggedRight}~\cite{package:ragged2e}.~\visualpar Design alternative for
% fully justified paragraphs if used with a small rag-width.
% \end{usecases}
%
-%
-% \addtocontents{toc}{\par\bigskip\hfill\textit{Table of Contents continued on next page.}}
-% \addtocontents{toc}{\clearpage}
+% \begin{futuredirection}
+% Translate the code to \packagename{l3galley} which is part of the
+% \packagename{l3experimental}~package~\cite{package:l3experimental}. Galley~code is
+% supposed to work inside of lists, too.
+% \end{futuredirection}
%
%
% \sectionfinish
@@ -4250,7 +5020,7 @@ end
% Many other packages help with getting better output from \LaTeX. Here is a list --~in
% alphabetical order~-- of the ones the author considers particularly valuable.
%
-% \sbox{\listlabelbox}{\packagename{microtype}}
+% \sbox{\listlabelbox}{\packagename{enumitem}}
% \begin{description}[font=\normalfont, labelsep*=1em, labelwidth=\wd\listlabelbox, leftmargin=!]
% \item[\packagename{enumitem}]
% Flexible and consistent definition of all basic \LaTeX-list types plus inline
@@ -4268,6 +5038,9 @@ end
% Fine control of spacing, tracking, sidebearings, character protrusion into the margins,
% font expansion, and much more~\cite{package:microtype}.
%
+% See \Cref{sec:microtype-frontend} for a front-end to \packagename{microtype} offered by
+% this package.
+%
% See also \propername{Khirevich's} discussion~\cite{khirevich:2013}.
%
% \item[\packagename{ragged2e}]
@@ -4275,8 +5048,11 @@ end
% |center|~\cite{package:ragged2e}.
%
% \item[\packagename{setspace}]
-% Consistently set the document's line-spacing, i.\,e.,
+% Consistently set the line-spacing of a document, i.\,e., control
% \cs{baselineskip}~\cite{package:setspace}.
+%
+% See \Cref{sec:setspace-frontend} for a front-end to \packagename{setspace} offered by this
+% package.
% \end{description}
%
%
@@ -4291,26 +5067,34 @@ end
%
% The companion program \programname{typog-grep} for analyzing the output of
% \hyperref[syn:typoginspect]{\code{typoginspect}} and
-% \hyperref[syn:typoginspect]{\code{typoginspectpar}} has its own manual page. We reproduce
-% it here for completeness of the documentation.
+% \hyperref[syn:typoginspect]{\code{typoginspectpar}} has its own manual page. We
+% reproduce it here for completeness of the documentation.
%
+% \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
% \begin{suspendshortverb}
% \setlength{\parindent}{0pt}
% \setlength{\parskip}{6.0pt plus 2.0pt minus .5pt}
-% \input typog-grep
+% \input{typog-grep.tex}
% \end{suspendshortverb}
+% \addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
%
% \sectionfinish
% \clearpage
-% \phantomsection
-% \resetfancyhead
-% \addcontentsline{toc}{section}{Change History}
-% \PrintChanges
+% \begingroup
+% \setcounter{GlossaryColumns}{1}
+% \phantomsection
+% \label{sec:changes}
+% \resetfancyhead
+% \addtocontents{toc}{\bigskip}
+% \addcontentsline{toc}{section}{\numberline{}Change History}
+% \PrintChanges
+% \endgroup
%
% \sectionfinish
% \clearpage
% \phantomsection
-% \addcontentsline{toc}{section}{References}
+% \addtocontents{toc}{\medskip}
+% \addcontentsline{toc}{section}{\numberline{}References}
% \begin{RaggedRight}
% \begin{thebibliography}{88}
% \bibitem{abrahams:2020}
@@ -4354,6 +5138,12 @@ end
% 1998,
% \biburl{https://mirrors.ctan.org/systems/doc/etex/etex_man.pdf}.
%
+% \bibitem{package:mathastext}
+% \bibauthor{Burnol, Jean-François}.
+% \bibtitle{Package~\packagename{mathastext}}.
+% 2023,
+% \biburl{https://ctan.org/pkg/mathastext}.
+%
% \bibitem{carlisle:1996}
% \bibauthor{Carlisle, David}.
% \bibtitle{Russian Paragraph Shapes}.
@@ -4399,6 +5189,12 @@ end
% Addison Wesley, Reading\kernedslash MA,
% 1986.
%
+% \bibitem{package:l3experimental}
+% \bibauthor{The \LaTeX\ Project}.
+% \bibtitle{Package~\packagename{l3experimental}}.
+% 2024,
+% \biburl{https://ctan.org/pkg/l3experimental}.
+%
% \bibitem{package:layout}
% \bibauthor{McPherson, Kent}.
% \bibtitle{Package~\packagename{layout}}.
@@ -4450,6 +5246,13 @@ end
% TUGboat, 11(1), 69\figuredash85, 1990,
% \biburl{http://www.tug.org/TUGboat/Articles/tb11-1/tb27salomon.pdf}.
%
+% \bibitem{strizver:2014}
+% \bibauthor{Strizver, Ilene}.
+% \bibtitle{Type rules!: the designer's guide to professional typography},
+% 4\textsuperior{th}~ed.
+% John Wiley~\& Sons, Hoboken\kernedslash NJ,
+% 2014.
+%
% \bibitem{package:setspace}
% \bibauthor{Tobin, Geoffrey,} and \bibauthor{Robin Fairbairns}.
% \bibtitle{Package~\packagename{setspace}}.
@@ -4526,23 +5329,35 @@ end
% \end{RaggedRight}
%
% \sectionfinish
+%
+%
% \clearpage
-% \begin{RaggedRight}
+% \begingroup
% \setcounter{IndexColumns}{2}
% \setlength{\columnsep}{30pt}
% \label{sec:index}
% \phantomsection
-% \addcontentsline{toc}{section}{Index}
+% \addtocontents{toc}{\medskip}
+% \addcontentsline{toc}{section}{\numberline{}Index}
+% \raggedcolumns
+% \def\codeidx##1{\linenumberdecoration\textbf{##1}}
+% \def\main##1{\linenumberdecoration\underbar{\textbf{##1}}}
+% \def\usage##1{\textit{\textbf{##1}}}
% \PrintIndex
-% \end{RaggedRight}
+% \endgroup
% }
%
-%
% \sectionfinish
+%
+%
% \clearpage
% \appendix
% \section{Package Code}\label{sec:package-code}
-% \addtocontents{toc}{\begingroup\small}
+% \addtocontents{toc}{\protect\begin{list}{}{\leftmargin=\subsectiontocindent\parsep=0pt}}
+% \addtocontents{toc}{\protect\item}
+% \addtocontents{toc}{\RaggedRight}
+% \addtocontents{toc}{\small}
+% \addtocontents{toc}{\tocsquashedsubsections}
% \addtocontents{toc}{\protect\begin{multicols}{2}}
% \addtocontents{toc}{\protect\raggedcolumns}
%
@@ -4555,7 +5370,7 @@ end
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{typog}
- [2024/05/07 v0.3 TypoGraphic extensions]
+ [2024/07/08 v0.4 TypoGraphic extensions]
\RequirePackage{etoolbox}
\RequirePackage{everyhook}
@@ -4592,17 +5407,34 @@ end
% \end{macro}
%
% \begin{macro}{\typog@typeout}
+% Our information printer.
+% Just adds a prefix so that we can tease apart the \filesystem{log} later.
+%
+% \begin{macrocode}
+\newcommand*{\typog@typeout}[1]{\typeout{typog: #1}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typog@typeout}
% Our debug information printer.
%
% \begin{macrocode}
-\newcommand*{\typog@typeout}[1]
- {\iftypog@debug
- \typeout{typog: #1}%
- \fi}
+\newcommand*{\typog@debug@typeout}[1]{\iftypog@debug\typog@typeout{#1}\fi}
% \end{macrocode}
% \end{macro}
%
+% \begin{tcounter}{typog@@iteration}
+% We want our own counter (currently for keeping track of iterations) that does not get
+% trampled underfoot too easily.
+%
+% \begin{macrocode}
+\newcounter{typog@@iteration}
+
+% \end{macrocode}
+% \end{tcounter}
+%
% \begin{macro}{\typog@trim@spaces}
% Pull \cs{tl\_trim\_spaces} into the \singlequotes{classic} namespace.
%
@@ -4693,69 +5525,149 @@ end
%
% Our own state\dots
%
-% \begin{macro}{\typog@mathitalicscorrection}
+% \begin{macro}{\typog@config@mathitalicscorrection}
% \begin{macrocode}
-\newmuskip\typog@mathitalicscorrection
+\newmuskip\typog@config@mathitalicscorrection
+
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@textitalicscorrection}
+% Actual \cs{labelitem}\meta{N} corrections.
+%
+% \begin{ldimen}{\typog@adjust@labelitemi}
+% \begin{macrocode}
+\newdimen{\typog@adjust@labelitemi}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@labelitemii}
+% \begin{macrocode}
+\newdimen{\typog@adjust@labelitemii}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@labelitemiii}
+% \begin{macrocode}
+\newdimen{\typog@adjust@labelitemiii}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@labelitemiv}
+% \begin{macrocode}
+\newdimen{\typog@adjust@labelitemiv}
+% \end{macrocode}
+% \end{ldimen}
+%
+% Configuration constants for \cs{labelitem}\meta{N} corrections.
+%
+% \begin{ldimen}{\typog@adjust@lowercase@labelitemi}
+% \begin{macrocode}
+\newdimen{\typog@adjust@lowercase@labelitemi}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@lowercase@labelitemii}
+% \begin{macrocode}
+\newdimen{\typog@adjust@lowercase@labelitemii}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@lowercase@labelitemiii}
+% \begin{macrocode}
+\newdimen{\typog@adjust@lowercase@labelitemiii}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@lowercase@labelitemiv}
+% \begin{macrocode}
+\newdimen{\typog@adjust@lowercase@labelitemiv}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@uppercase@labelitemi}
+% \begin{macrocode}
+\newdimen{\typog@adjust@uppercase@labelitemi}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@uppercase@labelitemii}
+% \begin{macrocode}
+\newdimen{\typog@adjust@uppercase@labelitemii}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@uppercase@labelitemiii}
% \begin{macrocode}
-\newlength{\typog@textitalicscorrection}
+\newdimen{\typog@adjust@uppercase@labelitemiii}
+% \end{macrocode}
+% \end{ldimen}
+%
+% \begin{ldimen}{\typog@adjust@uppercase@labelitemiv}
+% \begin{macrocode}
+\newdimen{\typog@adjust@uppercase@labelitemiv}
+
+% \end{macrocode}
+% \end{ldimen}
+%
+% Other lengths\dots
+%
+% \begin{macro}{\typog@config@textitalicscorrection}
+% \begin{macrocode}
+\newlength{\typog@config@textitalicscorrection}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@ligaturekern}
+% \begin{macro}{\typog@config@ligaturekern}
% \begin{macrocode}
-\newlength{\typog@ligaturekern}
+\newlength{\typog@config@ligaturekern}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@raisecapitaldash}
+% \begin{macro}{\typog@config@raisecapitaldash}
% \begin{macrocode}
-\newlength{\typog@raisecapitaldash}
+\newlength{\typog@config@raisecapitaldash}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@raisecapitalguillemets}
+% \begin{macro}{\typog@config@raisecapitalguillemets}
% \begin{macrocode}
-\newlength{\typog@raisecapitalguillemets}
+\newlength{\typog@config@raisecapitalguillemets}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@raisecapitalhyphen}
+% \begin{macro}{\typog@config@raisecapitalhyphen}
% \begin{macrocode}
-\newlength{\typog@raisecapitalhyphen}
+\newlength{\typog@config@raisecapitalhyphen}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@raisecapitaltimes}
+% \begin{macro}{\typog@config@raisecapitaltimes}
% \begin{macrocode}
-\newlength{\typog@raisecapitaltimes}
+\newlength{\typog@config@raisecapitaltimes}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@raiseguillemets}
+% \begin{macro}{\typog@config@raiseguillemets}
% \begin{macrocode}
-\newlength{\typog@raiseguillemets}
+\newlength{\typog@config@raiseguillemets}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@raisefiguredash}
+% \begin{macro}{\typog@config@raisefiguredash}
% \begin{macrocode}
-\newlength{\typog@raisefiguredash}
+\newlength{\typog@config@raisefiguredash}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@slashkern}
+% \begin{macro}{\typog@config@slashkern}
% \begin{macrocode}
-\newlength{\typog@slashkern}
+\newlength{\typog@config@slashkern}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@breakpenalty}
+% \begin{macro}{\typog@config@breakpenalty}
% \begin{macrocode}
-\newcommand*{\typog@breakpenalty}{\exhyphenpenalty}
+\newcommand*{\typog@config@breakpenalty}{\exhyphenpenalty}
% \end{macrocode}
% \end{macro}
%
@@ -4771,9 +5683,9 @@ end
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\typog@trackingttspacing}
+% \begin{macro}{\typog@config@trackingttspacing}
% \begin{macrocode}
-\newcommand*{\typog@trackingttspacing}{300, 90, 60}
+\newcommand*{\typog@config@trackingttspacing}{300, 90, 60}
% \end{macrocode}
% \end{macro}
%
@@ -4871,77 +5783,99 @@ end
\newcommand*{\typog@set@shrink@limits}
{\edef\typog@@star{*}%
- \edef\typog@@limit{\typog@triple@get@i{\typog@shrinklimits}}%
+ \edef\typog@@limit{\typog@triple@get@i{\typog@config@shrinklimits}}%
\unless\ifx\typog@@limit\typog@@star\edef\typog@shrink@i{\number\typog@@limit}\fi
- \edef\typog@@limit{\typog@triple@get@ii{\typog@shrinklimits}}%
+ \edef\typog@@limit{\typog@triple@get@ii{\typog@config@shrinklimits}}%
\unless\ifx\typog@@limit\typog@@star\edef\typog@shrink@ii{\number\typog@@limit}\fi
- \edef\typog@@limit{\typog@triple@get@iii{\typog@shrinklimits}}%
+ \edef\typog@@limit{\typog@triple@get@iii{\typog@config@shrinklimits}}%
\unless\ifx\typog@@limit\typog@@star\edef\typog@shrink@iii{\number\typog@@limit}\fi}
\newcommand*{\typog@set@stretch@limits}
{\edef\typog@@star{*}%
- \edef\typog@@limit{\typog@triple@get@i{\typog@stretchlimits}}%
+ \edef\typog@@limit{\typog@triple@get@i{\typog@config@stretchlimits}}%
\unless\ifx\typog@@limit\typog@@star\edef\typog@stretch@i{\number\typog@@limit}\fi
- \edef\typog@@limit{\typog@triple@get@ii{\typog@stretchlimits}}%
+ \edef\typog@@limit{\typog@triple@get@ii{\typog@config@stretchlimits}}%
\unless\ifx\typog@@limit\typog@@star\edef\typog@stretch@ii{\number\typog@@limit}\fi
- \edef\typog@@limit{\typog@triple@get@iii{\typog@stretchlimits}}%
+ \edef\typog@@limit{\typog@triple@get@iii{\typog@config@stretchlimits}}%
\unless\ifx\typog@@limit\typog@@star\edef\typog@stretch@iii{\number\typog@@limit}\fi}
\DeclareOptionX<typog>{breakpenalty}%
- {\renewcommand*{\typog@breakpenalty}{#1}}
+ {\renewcommand*{\typog@config@breakpenalty}{#1}}
\DeclareOptionX<typog>{debug}{\typog@debugtrue}
\DeclareOptionX<typog>{mathitalicscorrection}[.4mu]%
- {\typog@mathitalicscorrection=#1\relax}%
+ {\typog@config@mathitalicscorrection=#1\relax}%
\DeclareOptionX<typog>{nodebug}{\typog@debugfalse}
\DeclareOptionX<typog>{textitalicscorrection}[.02em]%
- {\setlength{\typog@textitalicscorrection}{#1}}
+ {\setlength{\typog@config@textitalicscorrection}{#1}}
\DeclareOptionX<typog>{ligaturekern}[.033333em]%
- {\setlength{\typog@ligaturekern}{#1}}
+ {\setlength{\typog@config@ligaturekern}{#1}}
+\DeclareOptionX<typog>{lowercaselabelitemadjustments}%
+ {\typog@debug@typeout{lowercaselabelitemadjustments={#1}}
+ \def\typog@@do##1{\addtocounter{typog@@iteration}{1}
+ \global\setlength{\csname typog@adjust@lowercase@labelitem\romannumeral\thetypog@@iteration\endcsname}{##1}}
+ \setcounter{typog@@iteration}{0}
+ \forcsvlist{\typog@@do}{#1}}
+\newcommand*{\typog@config@lowercaselabelitemadjustments}
+ {\the\typog@adjust@lowercase@labelitemi,\space
+ \the\typog@adjust@lowercase@labelitemii,\space
+ \the\typog@adjust@lowercase@labelitemiii,\space
+ \the\typog@adjust@lowercase@labelitemiv}
\DeclareOptionX<typog>{raisecapitaldash}[\z@]%
- {\setlength{\typog@raisecapitaldash}{#1}}
+ {\setlength{\typog@config@raisecapitaldash}{#1}}
\DeclareOptionX<typog>{raisecapitalguillemets}[\z@]%
- {\setlength{\typog@raisecapitalguillemets}{#1}}
+ {\setlength{\typog@config@raisecapitalguillemets}{#1}}
\DeclareOptionX<typog>{raisecapitalhyphen}[\z@]%
- {\setlength{\typog@raisecapitalhyphen}{#1}}
+ {\setlength{\typog@config@raisecapitalhyphen}{#1}}
\DeclareOptionX<typog>{raisecapitaltimes}[\z@]%
- {\setlength{\typog@raisecapitaltimes}{#1}}
+ {\setlength{\typog@config@raisecapitaltimes}{#1}}
\DeclareOptionX<typog>{raiseguillemets}[\z@]%
- {\setlength{\typog@raiseguillemets}{#1}}
+ {\setlength{\typog@config@raiseguillemets}{#1}}
\DeclareOptionX<typog>{raisefiguredash}[\z@]%
- {\setlength{\typog@raisefiguredash}{#1}}
+ {\setlength{\typog@config@raisefiguredash}{#1}}
\DeclareOptionX<typog>{raise*}[\z@]%
- {\setlength{\typog@raisecapitaldash}{#1}%
- \setlength{\typog@raisecapitalhyphen}{#1}%
- \setlength{\typog@raisecapitaltimes}{#1}%
- \setlength{\typog@raisefiguredash}{#1}}
+ {\setlength{\typog@config@raisecapitaldash}{#1}%
+ \setlength{\typog@config@raisecapitalhyphen}{#1}%
+ \setlength{\typog@config@raisecapitaltimes}{#1}%
+ \setlength{\typog@config@raisefiguredash}{#1}}
\DeclareOptionX<typog>{shrinklimits}%
[\typog@default@shrink@i, \typog@default@shrink@ii, \typog@default@shrink@iii]%
{\typog@require@preloaded@microtype
\ifx\@onlypreamble\@notprerr
\PackageWarning{typog}{option `shrinklimits' can only be used in the preamble}%
\else
- \edef\typog@shrinklimits{#1}%
+ \edef\typog@config@shrinklimits{#1}%
\typog@set@shrink@limits
\fi}
\DeclareOptionX<typog>{slashkern}[.05em]%
- {\setlength{\typog@slashkern}{#1}}
+ {\setlength{\typog@config@slashkern}{#1}}
\DeclareOptionX<typog>{stretchlimits}%
[\typog@default@stretch@i, \typog@default@stretch@ii, \typog@default@stretch@iii]%
{\typog@require@preloaded@microtype
\ifx\@onlypreamble\@notprerr
\PackageWarning{typog}{option `stretchlimits' can only be used in the preamble}%
\else
- \edef\typog@stretchlimits{#1}%
+ \edef\typog@config@stretchlimits{#1}%
\typog@set@stretch@limits
\fi}
-\DeclareOptionX<typog>{trackingttspacing}[\typog@trackingttspacing]%
+\DeclareOptionX<typog>{trackingttspacing}[\typog@config@trackingttspacing]%
{\typog@require@preloaded@microtype
\ifx\@onlypreamble\@notprerr
\PackageWarning{typog}{option `trackingttspacing' can only be used in the preamble}%
\else
- \typog@typeout{trackingttspacing=#1}%
+ \typog@debug@typeout{trackingttspacing=#1}%
\SetTracking[outer spacing={#1}]{encoding=*, family=tt*}{0}%
\fi}
+\DeclareOptionX<typog>{uppercaselabelitemadjustments}%
+ {\typog@debug@typeout{uppercaselabelitemadjustments={#1}}
+ \def\typog@@do##1{\addtocounter{typog@@iteration}{1}
+ \setlength{\csname typog@adjust@uppercase@labelitem\romannumeral\thetypog@@iteration\endcsname}{##1}}
+ \setcounter{typog@@iteration}{0}
+ \forcsvlist{\typog@@do}{#1}}
+\newcommand*{\typog@config@uppercaselabelitemadjustments}
+ {\the\typog@adjust@uppercase@labelitemi,\space
+ \the\typog@adjust@uppercase@labelitemii,\space
+ \the\typog@adjust@uppercase@labelitemiii,\space
+ \the\typog@adjust@uppercase@labelitemiv}
\newcommand*{\typog@initialize@options}
{\ExecuteOptionsX<typog>{
@@ -4963,7 +5897,7 @@ end
% \fi
%
%
-% \subsection*{Setup}
+% \subsection{Setup and Reconfiguration}
%
% \begin{environment}{typogsetup}
% An empty argument list resets all initialized values to their defaults.
@@ -4982,8 +5916,42 @@ end
% \end{environment}
%
% \begin{macro}{\typogget}
+% Access the package's configuration (name-)space.
+%
% \begin{macrocode}
-\NewDocumentCommand{\typogget}{m}{\csname typog@#1\endcsname}
+\NewDocumentCommand{\typogget}{m}{\csname typog@config@#1\endcsname}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typoggetnth}
+% \changes{v0.4}{2024-05-15}{New macro.}
+% Access the \(n\)\textsuperscript{th} element of a comma-separated, list-like configuration
+% item's value.
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_generate_variant:Nn \seq_set_split:Nnn {Nne}
+\cs_new:Npn \typog_get_nth_csname:cnn #1#2#3
+ {
+ \seq_set_split:Nne \l_tmpa_seq {,} {\cs:w typog@config@#2 \cs_end:}
+ \cs_gset:cpn {#1} {\seq_item:Nn \l_tmpa_seq {#3}}
+ }
+\cs_new:Npn \typog_get_nth_dimen:nnn #1#2#3
+ {
+ \seq_set_split:Nne \l_tmpa_seq {,} {\cs:w typog@config@#2 \cs_end:}
+ \dim_set:Nn {#1} {\seq_item:Nn \l_tmpa_seq {#3}}
+ }
+\NewDocumentCommand{\typoggetnth}{m m m}{
+ \token_if_dim_register:NTF {#1}
+ {
+ \typog_get_nth_dimen:nnn {#1} {#2} {#3}
+ }
+ {
+ \typog_get_nth_csname:cnn {#1} {#2} {#3}
+ }
+}
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
@@ -5065,6 +6033,7 @@ end
%
% \begin{macrocode}
\newcounter{typog@inspect@count}
+
% \end{macrocode}
% \end{macro}
%
@@ -5085,11 +6054,16 @@ end
\edef\typog@@arg{#2}%
\ifx\typog@@arg\empty
\stepcounter{typog@inspect@count}%
- \edef\typog@@id{\typog@default@inspect@id@prefix\arabic{typog@inspect@count}}%
+ \edef\typog@@id{\typog@default@inspect@id@prefix
+ \arabic{typog@inspect@count}}%
\else
\edef\typog@@id{\typog@trim@spaces{\typog@@arg}}%
\fi
- \typeout{<typog-inspect id="\typog@@id" job="\jobname" line="\the\inputlineno" page="\the\value{page}">}%
+ \typeout{<typog-inspect\space
+ id="\typog@@id"\space
+ job="\jobname"\space
+ line="\the\inputlineno"\space
+ page="\the\value{page}">}%
% \end{macrocode}
%
% Set both badness thresholds to absurdly low values as to activate \TeX's reports.
@@ -5210,7 +6184,7 @@ end
% \begin{macro}{\nolig}
% \begin{macrocode}
\NewDocumentCommand{\nolig}{s o}
- {\dimen0=\IfNoValueTF{#2}{\typog@ligaturekern}{#2\typog@dim@unit}%
+ {\dimen0=\IfNoValueTF{#2}{\typog@config@ligaturekern}{#2\typog@dim@unit}%
\IfBooleanTF{#1}%
{\kern\dimen0\ignorespaces}%
{\discretionary{\typog@hyphen}{}{\kern\dimen0}%
@@ -5249,7 +6223,7 @@ end
%
% \begin{macrocode}
\newcommand*{\typog@itcorr@text@unconditional}[1]
- {\kern#1\typog@textitalicscorrection}
+ {\kern#1\typog@config@textitalicscorrection}
% \end{macrocode}
% \end{macro}
%
@@ -5275,7 +6249,7 @@ end
%
% \begin{macrocode}
\newcommand*{\typog@itcorr@math}[1]
- {\mkern#1\typog@mathitalicscorrection}
+ {\mkern#1\typog@config@mathitalicscorrection}
% \end{macrocode}
% \end{macro}
%
@@ -5326,11 +6300,11 @@ end
%
% \begin{macrocode}
\NewDocumentCommand{\kernedslash}{s}
- {\hspace*{\typog@slashkern}%
+ {\hspace*{\typog@config@slashkern}%
\typog@forwardslash
\IfBooleanTF{#1}%
- {\hspace*{\typog@slashkern}\ignorespaces}%
- {\typog@breakpoint\typog@allowhyphenation\hspace*{\typog@slashkern}}}
+ {\hspace*{\typog@config@slashkern}\ignorespaces}%
+ {\typog@breakpoint\typog@allowhyphenation\hspace*{\typog@config@slashkern}}}
% \end{macrocode}
%
% \acronym{PDF}-substitute definition
@@ -5358,7 +6332,7 @@ end
\def\typog@@optarg{#2}%
\hspace*{#3\typog@dim@unit}%
\raisebox{\ifx\typog@@optarg\typog@@auto
- \typog@raisecapitalhyphen
+ \typog@config@raisecapitalhyphen
\else
\typog@@optarg\typog@dim@unit
\fi}{\typog@hyphen}%
@@ -5428,7 +6402,7 @@ end
%
% \begin{macrocode}
\newcommand*{\typog@breakpoint}
- {\penalty\typog@breakpenalty}
+ {\penalty\typog@config@breakpenalty}
% \end{macrocode}
% \end{macro}
%
@@ -5439,7 +6413,7 @@ end
%
% \begin{macrocode}
\NewDocumentCommand{\capitalhyphen}{s}
- {\raisebox{\typog@raisecapitalhyphen}{\typog@hyphen}%
+ {\raisebox{\typog@config@raisecapitalhyphen}{\typog@hyphen}%
\IfBooleanTF{#1}%
{\ignorespaces}%
{\typog@breakpoint\typog@allowhyphenation}}
@@ -5473,7 +6447,7 @@ end
%
% \begin{macrocode}
\NewDocumentCommand{\capitalendash}{s}
- {\raisebox{\typog@raisecapitaldash}{\textendash}%
+ {\raisebox{\typog@config@raisecapitaldash}{\textendash}%
\IfBooleanTF{#1}%
{\ignorespaces}%
{\typog@breakpoint\typog@allowhyphenation}}
@@ -5503,7 +6477,7 @@ end
%
% \begin{macrocode}
\NewDocumentCommand{\capitalemdash}{s}
- {\raisebox{\typog@raisecapitaldash}{\textemdash}%
+ {\raisebox{\typog@config@raisecapitaldash}{\textemdash}%
\IfBooleanTF{#1}%
{\ignorespaces}%
{\typog@breakpoint\typog@allowhyphenation}}
@@ -5531,7 +6505,7 @@ end
%
% \begin{macrocode}
\NewDocumentCommand{\figuredash}{s}
- {\raisebox{\typog@raisefiguredash}{\textendash}%
+ {\raisebox{\typog@config@raisefiguredash}{\textendash}%
\IfBooleanTF{#1}%
{\ignorespaces}%
{\typog@breakpoint\typog@allowhyphenation}}
@@ -5550,9 +6524,9 @@ end
% \begin{macrocode}
\NewDocumentCommand{\capitaltimes}{}
{\ifmmode
- \mathbin{\raisebox{\typog@raisecapitaltimes}{$\m@th\times$}}%
+ \mathbin{\raisebox{\typog@config@raisecapitaltimes}{$\m@th\times$}}%
\else
- \raisebox{\typog@raisecapitaltimes}{\texttimes}%
+ \raisebox{\typog@config@raisecapitaltimes}{\texttimes}%
\fi}
% \end{macrocode}
%
@@ -5571,7 +6545,7 @@ end
% \begin{macrocode}
\NewDocumentCommand{\singleguillemetleft}{}
{\typog@allowhyphenation
- \raisebox{\typog@raiseguillemets}{\guilsinglleft}}
+ \raisebox{\typog@config@raiseguillemets}{\guilsinglleft}}
% \end{macrocode}
%
% \acronym{PDF}-substitute definition
@@ -5584,7 +6558,7 @@ end
% \begin{macro}{\singleguillemetright}
% \begin{macrocode}
\NewDocumentCommand{\singleguillemetright}{}
- {\raisebox{\typog@raiseguillemets}{\guilsinglright}%
+ {\raisebox{\typog@config@raiseguillemets}{\guilsinglright}%
\typog@allowhyphenation}
% \end{macrocode}
%
@@ -5599,7 +6573,7 @@ end
% \begin{macrocode}
\NewDocumentCommand{\doubleguillemetleft}{}
{\typog@allowhyphenation
- \raisebox{\typog@raiseguillemets}{\guillemotleft}}
+ \raisebox{\typog@config@raiseguillemets}{\guillemotleft}}
% \end{macrocode}
%
% \acronym{PDF}-substitute definition
@@ -5612,7 +6586,7 @@ end
% \begin{macro}{\doubleguillemetright}
% \begin{macrocode}
\NewDocumentCommand{\doubleguillemetright}{}
- {\raisebox{\typog@raiseguillemets}{\guillemotright}%
+ {\raisebox{\typog@config@raiseguillemets}{\guillemotright}%
\typog@allowhyphenation}
% \end{macrocode}
%
@@ -5627,7 +6601,7 @@ end
% \begin{macrocode}
\NewDocumentCommand{\Singleguillemetleft}{}
{\typog@allowhyphenation
- \raisebox{\typog@raisecapitalguillemets}{\guilsinglleft}}
+ \raisebox{\typog@config@raisecapitalguillemets}{\guilsinglleft}}
% \end{macrocode}
%
% \acronym{PDF}-substitute definition
@@ -5640,7 +6614,7 @@ end
% \begin{macro}{\Singleguillemetright}
% \begin{macrocode}
\NewDocumentCommand{\Singleguillemetright}{}
- {\raisebox{\typog@raisecapitalguillemets}{\guilsinglright}%
+ {\raisebox{\typog@config@raisecapitalguillemets}{\guilsinglright}%
\typog@allowhyphenation}
% \end{macrocode}
%
@@ -5655,7 +6629,7 @@ end
% \begin{macrocode}
\NewDocumentCommand{\Doubleguillemetleft}{}
{\typog@allowhyphenation
- \raisebox{\typog@raisecapitalguillemets}{\guillemotleft}}
+ \raisebox{\typog@config@raisecapitalguillemets}{\guillemotleft}}
% \end{macrocode}
%
% \acronym{PDF}-substitute definition
@@ -5668,7 +6642,7 @@ end
% \begin{macro}{\Doubleguillemetright}
% \begin{macrocode}
\NewDocumentCommand{\Doubleguillemetright}{}
- {\raisebox{\typog@raisecapitalguillemets}{\guillemotright}%
+ {\raisebox{\typog@config@raisecapitalguillemets}{\guillemotright}%
\typog@allowhyphenation}
% \end{macrocode}
%
@@ -5681,6 +6655,457 @@ end
% \end{macro}
%
%
+% \subsection{Vert. Adjust Label Items}
+%
+% \begin{macro}{\@typog@uppercase@adjust@labelitem}
+% Handle all possible requests for uppercase label item correction.
+% Patch |itemize|~environments.
+%
+% \begin{macrocode}
+\newcommand*{\@typog@uppercase@adjust@labelitem}[1]
+ {\@typog@maybe@patch@itemize
+ \ifstrequal{#1}{*}
+ {\setlength{\typog@adjust@labelitemi}
+ {\typog@adjust@uppercase@labelitemi}
+ \setlength{\typog@adjust@labelitemii}
+ {\typog@adjust@uppercase@labelitemii}
+ \setlength{\typog@adjust@labelitemiii}
+ {\typog@adjust@uppercase@labelitemiii}
+ \setlength{\typog@adjust@labelitemiv}
+ {\typog@adjust@uppercase@labelitemiv}}
+ {\ifcase #1% 0
+ \relax % outside of any itemize environment
+ \or % 1
+ \setlength{\typog@adjust@labelitemi}
+ {\typog@adjust@uppercase@labelitemi}
+ \or % 2
+ \setlength{\typog@adjust@labelitemii}
+ {\typog@adjust@uppercase@labelitemii}
+ \or % 3
+ \setlength{\typog@adjust@labelitemiii}
+ {\typog@adjust@uppercase@labelitemiii}
+ \or % 4
+ \setlength{\typog@adjust@labelitemiv}
+ {\typog@adjust@uppercase@labelitemiv}
+ \else
+ \PackageError{typog}
+ {Itemize level out of range}
+ {Valid levels are 1, 2, 3, 4, and *}
+ \fi}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@typog@lowercase@adjust@labelitem}
+% Handle all possible requests for lowercase label item correction.
+% Patch |itemize|~environments.
+%
+% \begin{macrocode}
+\newcommand*{\@typog@lowercase@adjust@labelitem}[1]
+ {\@typog@maybe@patch@itemize
+ \ifstrequal{#1}{*}
+ {\setlength{\typog@adjust@labelitemi}
+ {\typog@adjust@lowercase@labelitemi}
+ \setlength{\typog@adjust@labelitemii}
+ {\typog@adjust@lowercase@labelitemii}
+ \setlength{\typog@adjust@labelitemiii}
+ {\typog@adjust@lowercase@labelitemiii}
+ \setlength{\typog@adjust@labelitemiv}
+ {\typog@adjust@lowercase@labelitemiv}}
+ {\ifcase #1% 0
+ \relax % outside of any itemize environment
+ \or % 1
+ \setlength{\typog@adjust@labelitemi}
+ {\typog@adjust@lowercase@labelitemi}
+ \or % 2
+ \setlength{\typog@adjust@labelitemii}
+ {\typog@adjust@lowercase@labelitemii}
+ \or % 3
+ \setlength{\typog@adjust@labelitemiii}
+ {\typog@adjust@lowercase@labelitemiii}
+ \or % 4
+ \setlength{\typog@adjust@labelitemiv}
+ {\typog@adjust@lowercase@labelitemiv}
+ \else
+ \PackageError{typog}
+ {Itemize level out of range}
+ {Valid levels are 1, 2, 3, 4, and *}
+ \fi}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@typog@noadjust@labelitem}
+% Neutralize all label item corrections.
+% This function \emph{does not} request patching any |itemize|~environment!
+%
+% \begin{macrocode}
+\newcommand*{\@typog@noadjust@labelitem}[1]
+ {\ifstrequal{#1}{*}
+ {\setlength{\typog@adjust@labelitemi}{\z@}
+ \setlength{\typog@adjust@labelitemii}{\z@}
+ \setlength{\typog@adjust@labelitemiii}{\z@}
+ \setlength{\typog@adjust@labelitemiv}{\z@}}
+ {\ifcase #1% 0
+ \relax % outside of any itemize environment
+ \or % 1
+ \setlength{\typog@adjust@labelitemi}{\z@}
+ \or % 2
+ \setlength{\typog@adjust@labelitemii}{\z@}
+ \or % 3
+ \setlength{\typog@adjust@labelitemiii}{\z@}
+ \or % 4
+ \setlength{\typog@adjust@labelitemiv}{\z@}
+ \else
+ \PackageError{typog}
+ {Itemize level out of range}
+ {Valid levels are 1, 2, 3, 4, and *}
+ \fi}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\uppercaseadjustlabelitems}
+% \changes{v0.4}{2024-05-14}{New macro.}
+% User macro that handles lists and the treats the empty list specially. We wrap the code
+% into \cs{AfterPreamble} because it may be called in the document's preamble where we don't
+% know whether package~\packagename{enumitem} already has been loaded and we can patch its
+% variant of \code{itemize}.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\uppercaseadjustlabelitems}{m}
+ {\AfterPreamble{%
+ \ifblank{#1}
+ {\@typog@uppercase@adjust@labelitem{\@itemdepth}}
+ {\forcsvlist{\@typog@uppercase@adjust@labelitem}{#1}}%
+ \ignorespaces}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\lowercaseadjustlabelitems}
+% \changes{v0.4}{2024-05-14}{New macro.}
+% User macro that handles lists and the treats the empty list specially.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\lowercaseadjustlabelitems}{m}
+ {\AfterPreamble{%
+ \ifblank{#1}
+ {\@typog@lowercase@adjust@labelitem{\@itemdepth}}
+ {\forcsvlist{\@typog@lowercase@adjust@labelitem}{#1}}%
+ \ignorespaces}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\noadjustlabelitems}
+% \changes{v0.4}{2024-05-14}{New macro.}
+% User macro that handles lists and the treats the empty list specially.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\noadjustlabelitems}{m}
+ {\ifblank{#1}
+ {\@typog@noadjust@labelitem{\@itemdepth}}
+ {\forcsvlist{\@typog@noadjust@labelitem}{#1}}%
+ \ignorespaces}
+
+% \end{macrocode}
+% \end{macro}
+%
+% Now we get to the dirty part. All the above definitions do not get called until we hack the
+% existing |itemize|-environments, either the one of plain~\LaTeX{} or the one modified by
+% package~\packagename{enumitem}.
+%
+% Here comes the result of \code{latexdef -c article -s itemize}, which was used to derive the
+% patch code:
+%
+% \begin{verbatim}
+% \def\itemize{%
+% \ifnum \@itemdepth > \thr@@
+% \@toodeep
+% \else
+% \advance\@itemdepth\@ne
+% \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+% \expandafter
+% \list
+% \csname\@itemitem\endcsname
+% {\def\makelabel##1{\hss\llap{##1}}}%
+% \fi}\end{verbatim}
+%
+% \begin{macro}{\@typog@itemize@patch}
+% This is the additional code we inject into plain \LaTeX's or
+% package~\packagename{enumitem}'s \cs{itemize}.
+%
+% \begin{macrocode}
+\newcommand*{\@typog@itemize@patch}
+% \end{macrocode}
+%
+% Save the original definition of \cs{@itemitem} for chain-calling it later on.
+%
+% \begin{macrocode}
+ {\letcs{\@typog@old@itemitem}{\@itemitem}
+% \end{macrocode}
+%
+% Sneak in our own macro's name.
+%
+% \begin{macrocode}
+ \edef\@itemitem{@typog@labelitem\romannumeral\the\@itemdepth}
+% \end{macrocode}
+%
+% Redefine under the original macro's name so that our code gets called and the old code
+% (\cs{@typog@old@itemitem}) is expanded.
+%
+% \begin{macrocode}
+ \expandafter\def\csname\@itemitem\endcsname
+ {\raisebox{\csname typog@adjust@labelitem\romannumeral\the\@itemdepth\endcsname}
+ {\@typog@old@itemitem}}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% If package~\packagename{enumitem} has been loaded, we use the \emph{same} patch. Here comes
+% the result of \code{latexdef -c article -p enumitem -s enit@itemize@i} that explains, why no
+% change is required:
+%
+% \begin{verbatim}
+% \def\enit@itemize@i#1#2#3#4{%
+% \ifnum #1 > #3 \relax
+% \enit@toodeep
+% \else
+% \enit@prelist\@ne{#1}{#2}%
+% \edef\@itemitem{label#2\romannumeral#1}%
+% \expandafter
+% \enit@list
+% \csname\@itemitem\endcsname
+% {\let\enit@calc\z@
+% \def\makelabel##1{\enit@align{\enit@format{##1}}}%
+% \enit@preset{#2}{#1}{#4}%
+% \enit@calcleft
+% \enit@before
+% \enit@negwidth}%
+% \enit@keyfirst
+% \fi}\end{verbatim}
+%
+% \begin{macro}{\@typog@patch@itemize}
+% Unconditionally apply the patches that are just \emph{single} macro calls to disturb the
+% original macros as little as possible. If we detect \packagename{enumitem} to be present
+% we modify its definition of \code{itemize} otherwise we wrestle \LaTeX's macro.
+%
+% \begin{macrocode}
+\newcommand*{\@typog@patch@itemize}
+ {\ifdefined\enit@itemize@i
+ \patchcmd{\enit@itemize@i}
+ {\expandafter}
+ {\@typog@itemize@patch\expandafter}
+ {\typog@debug@typeout{patching enumitem \string\enit@itemize@i\space succeeded}}
+ {\PackageError{typog}
+ {Patching enumitem macro \string\enit@itemize@i\space failed}
+ {}}
+ \else
+ \patchcmd{\itemize}
+ {\expandafter}
+ {\@typog@itemize@patch\expandafter}
+ {\typog@debug@typeout{patching \string\itemize\space succeeded}}
+ {\PackageError{typog}
+ {Patching plain LaTeX macro \string\itemize\space failed}
+ {}}
+ \fi}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@typog@maybe@patch@itemize}
+% Apply the patches only once.
+%
+% \begin{macrocode}
+\newbool{@typog@itemize@has@been@patched}
+\newcommand*{\@typog@maybe@patch@itemize}
+ {\ifbool{@typog@itemize@has@been@patched}
+ {\relax}
+ {\@typog@patch@itemize
+ \booltrue{@typog@itemize@has@been@patched}}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% Here come our convenience macros to simplify an accurate setup of the label adjustments.
+%
+% \begin{macro}{\typog@hairline@width}
+% Line width of the horizontal reference lines in our convenience macros.
+%
+% \begin{macrocode}
+\newcommand*{\typog@hairline@width}{.125pt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typogadjuststairsfor}
+% The arguments are:
+% \#1: \meta{scale-factor},
+% \#2: \meta{step-size},
+% \#3: \meta{number-of-steps},
+% \#4: \meta{sample}, and
+% \#5: \cs{labelitem}\meta{N}.
+%
+% Generate an ascending stairs of argument~\#5.
+%
+% \begin{macrocode}
+\newcommand*{\typogadjuststairsfor}[5]
+% \end{macrocode}
+%
+% Store (half of) the space between two samples in \cs{dimen0}.
+%
+% \begin{macrocode}
+ {\dimen0=1pt%
+% \end{macrocode}
+%
+% Load the \meta{number-of-steps} and ensure that it is odd.
+%
+% \begin{macrocode}
+ \count0=#3\relax
+ \unless\ifodd\count0
+ \advance\count0 by 1%
+ \fi
+% \end{macrocode}
+%
+% Set the iteration counter.
+%
+% \begin{macrocode}
+ \setcounter{typog@@iteration}{1}%
+% \end{macrocode}
+%
+% Put the \meta{sample} into a box so that we can measure it with \cs{ht}.
+%
+% \begin{macrocode}
+ \setbox0=\hbox{#4}%
+% \end{macrocode}
+%
+% Box~1 is the accumulator for the raised samples.
+%
+% \begin{macrocode}
+ \setbox1=\hbox{}%
+% \end{macrocode}
+%
+% Build the stairs.
+%
+% \begin{macrocode}
+ \loop
+ \ifnum\thetypog@@iteration=\numexpr\count0 / 2\relax
+ \dimen1=2\dimen0
+ \else
+ \dimen1=\dimen0
+ \fi
+ \dimen2=\dimexpr#2 * (\thetypog@@iteration - \count0 / 2)\relax
+ \setbox1=\hbox{\unhbox1\raisebox{\dimen2}{\kern\dimen1 #5\kern\dimen1}}%
+ \addtocounter{typog@@iteration}{1}%
+ \unless\ifnum\thetypog@@iteration>\count0
+ \repeat
+% \end{macrocode}
+%
+% Merge the stairs with a hairline at \#1 times the height of \meta{sample}.
+% Answer just a single box.
+%
+% \begin{macrocode}
+ \mbox{\rlap{\raisebox{\fpeval{#1}\ht0}{\rule{\wd1}{\typog@hairline@width}}}\box1}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typogadjuststairs}
+% \changes{v0.4}{2024-05-14}{New macro.}
+% The arguments are:
+% \#1: \meta{scale-factor},
+% \#2: \meta{step-size},
+% \#3: \meta{number-of-steps}, and
+% \#4: \meta{sample}.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\typogadjuststairs}{O{.5} m m m}
+ {\begingroup
+ \unless\ifdim #2>\z@
+ \PackageError{typog}
+ {\string\typogadjuststairs\space non-positive step-size}
+ {step-size must be a positive dimension}%
+ \fi
+ \ifnum #3<1
+ \PackageError{typog}
+ {\string\typogadjuststairs\space too few number-of-steps}
+ {number-of-steps must at least be 1}%
+ \fi
+ \ifblank{#4}
+ {\PackageError{typog}
+ {sample must not be empty}
+ {supply either some uppercase or some lowercase letters}}
+ {}%
+ \def\arraystretch{1}%
+ \begin{tabular}{@{}c@{}}
+ \typogadjuststairsfor{#1}{#2}{#3}{#4}{\labelitemi} \\
+ \typogadjuststairsfor{#1}{#2}{#3}{#4}{\labelitemii} \\
+ \typogadjuststairsfor{#1}{#2}{#3}{#4}{\labelitemiii} \\
+ \typogadjuststairsfor{#1}{#2}{#3}{#4}{\labelitemiv}
+ \end{tabular}
+ \endgroup}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typog@uppercase@adjusted@labelitems}
+% Return all four labelitems in a horizontal box after they have been adjusted with the
+% uppercase-constants set.
+%
+% \begin{macrocode}
+\newcommand*{\typog@uppercase@adjusted@labelitems}
+ {\hbox{\raisebox{\typog@adjust@uppercase@labelitemi}{\labelitemi}%
+ \raisebox{\typog@adjust@uppercase@labelitemii}{\labelitemii}%
+ \raisebox{\typog@adjust@uppercase@labelitemiii}{\labelitemiii}%
+ \raisebox{\typog@adjust@uppercase@labelitemiv}{\labelitemiv}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typoguppercaseadjustcheck}
+% \changes{v0.4}{2024-05-14}{New macro.}
+% We stuff the user's sample text into a box only to measure its height. We typeset all four
+% labels and draw a hairline at half the height of the sample right through it.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\typoguppercaseadjustcheck}{O{.5} m}
+ {\setbox0=\hbox{#2}%
+ \setbox1=\typog@uppercase@adjusted@labelitems
+ \mbox{\rlap{\raisebox{\fpeval{#1}\ht0}
+ {\rule{\wd1}{\typog@hairline@width}}}%
+ \box1}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typog@lowercase@adjusted@labelitems}
+% Return all four labelitems in a horizontal box after they have been adjusted with the
+% lowercase-constants set.
+%
+% \begin{macrocode}
+\newcommand*{\typog@lowercase@adjusted@labelitems}
+ {\hbox{\raisebox{\typog@adjust@lowercase@labelitemi}{\labelitemi}%
+ \raisebox{\typog@adjust@lowercase@labelitemii}{\labelitemii}%
+ \raisebox{\typog@adjust@lowercase@labelitemiii}{\labelitemiii}%
+ \raisebox{\typog@adjust@lowercase@labelitemiv}{\labelitemiv}}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\typoglowercaseadjustcheck}
+% \changes{v0.4}{2024-05-14}{New macro.}
+% Same code as \cs{typoguppercaseadjustcheck} for lowercase.
+%
+% \begin{macrocode}
+\NewDocumentCommand{\typoglowercaseadjustcheck}{O{.5} m}
+ {\setbox0=\hbox{#2}%
+ \setbox1=\typog@lowercase@adjusted@labelitems
+ \mbox{\rlap{\raisebox{\fpeval{#1}\ht0}
+ {\rule{\wd1}{\typog@hairline@width}}}%
+ \box1}}
+
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection[Align Last Line]{Align Last Line of a Paragraph}
%
% The code of environment |lastlineraggedleftpar|
@@ -5955,7 +7380,7 @@ end
% \end{environment}
%
%
-% \subsection{Microtype Front\capitalhyphen End}
+% \subsection{\packagename{Microtype} Front\capitalhyphen End}
%
% \subsubsection*{Tracking}
%
@@ -6296,7 +7721,7 @@ end
% \item[Initialize.] \code{load("list\_functions")\$}
% \item[\cs{tolerance}:] \code{logspace(log10(200), log10(9999), 9), numer;}
% \item[\cs{emergencystretch}:] \code{linspace(0, 3, 9), numer;}
-% \item[\cs{hfuzz}:] \code{linspace(0.1, 0.5, 9);}
+% \item[\cs{hfuzz}:] \code{linspace(.1, .5, 9);}
% \end{description}
% \end{implementationnote}
%
@@ -6338,7 +7763,7 @@ end
\NewDocumentCommand{\vtietop}{O{3}}
{\setcounter{typog@mean@penalty}
{\typog@geometric@mean{\@M}{\clubpenalty}}%
- \typog@typeout{vtietop: penalties \the\@M--\the\value{typog@mean@penalty}--\the\clubpenalty}%
+ \typog@debug@typeout{vtietop: penalties \the\@M--\the\value{typog@mean@penalty}--\the\clubpenalty}%
\unless\ifnum\clubpenalty<\@M
\PackageWarning{typog}{vtietop: clubpenalty=\the\clubpenalty\space>= 10000}%
\fi
@@ -6426,7 +7851,7 @@ end
\NewDocumentCommand{\vtiebot}{O{3}}
{\setcounter{typog@mean@penalty}
{\typog@geometric@mean{\@M}{\widowpenalty}}%
- \typog@typeout{vtiebot: penalties \the\@M--\the\value{typog@mean@penalty}--\the\widowpenalty}%
+ \typog@debug@typeout{vtiebot: penalties \the\@M--\the\value{typog@mean@penalty}--\the\widowpenalty}%
\unless\ifnum\widowpenalty<\@M
\PackageWarning{typog}{vtiebot: widowpenalty=\the\widowpenalty\space>= 10000}%
\fi
@@ -6494,7 +7919,7 @@ end
\NewDocumentCommand{\typog@vtiebotdisp}{m}
{\setcounter{typog@mean@penalty}
{\typog@geometric@mean{\@M}{\displaywidowpenalty}}%
- \typog@typeout{vtiebotdisp: penalties \the\@M--\the\value{typog@mean@penalty}--\the\displaywidowpenalty}%
+ \typog@debug@typeout{vtiebotdisp: penalties \the\@M--\the\value{typog@mean@penalty}--\the\displaywidowpenalty}%
\unless\ifnum\displaywidowpenalty<\@M
\PackageWarning{typog}{vtiebotdisp: displaywidowpenalty=\the\displaywidowpenalty\space>= 10000}%
\fi
@@ -6588,7 +8013,7 @@ end
% \end{environment}
%
%
-% \subsection{Setspace Front-End}
+% \subsection{\packagename{Setspace} Front-End}
%
% \begin{macro}{\typog@iter@limit}
% The maximum number of iterations we perform before bailing out with an error. Can be
@@ -6631,9 +8056,9 @@ end
% \begin{macrocode}
\dim_set:Nn \l_tmpa_dim {\glueexpr #1}
- \typog@typeout{\string\setbaselineskip:\space
+ \typog@debug@typeout{\string\setbaselineskip:\space
initial\space baselineskip:\space \the\baselineskip}
- \typog@typeout{\string\setbaselineskip:\space
+ \typog@debug@typeout{\string\setbaselineskip:\space
target\space baselineskip:\space \dim_use:N \l_tmpa_dim}
\dim_compare:nNnTF {\baselineskip} > {\c_zero_dim}
@@ -6686,10 +8111,10 @@ end
{}
}
- \typog@typeout{\string\setbaselineskip:\space
+ \typog@debug@typeout{\string\setbaselineskip:\space
final\space \string\setstretch\space argument:\space
\fp_use:N \l_tmpa_fp}
- \typog@typeout{\string\setbaselineskip:\space
+ \typog@debug@typeout{\string\setbaselineskip:\space
final\space baselineskip:\space \the\baselineskip}
}
@@ -6756,7 +8181,7 @@ end
% \begin{macrocode}
\AfterEndPreamble{
\dim_set:Nn \typogfontsize {\fontdimen6\font}
- \typog@typeout{\string\typogfontsize =
+ \typog@debug@typeout{\string\typogfontsize =
\dim_use:N \typogfontsize\space
(at\space begin\space of\space document)}
}
@@ -6892,13 +8317,13 @@ end
\skip1=#2\relax
\skip2=#3\relax
\skip3=#4\relax
- \typog@typeout{smoothraggedrightshapetriplet: skip0=\the\skip0}%
- \typog@typeout{smoothraggedrightshapetriplet: skip1=\the\skip1}%
- \typog@typeout{smoothraggedrightshapetriplet: skip2=\the\skip2}%
- \typog@typeout{smoothraggedrightshapetriplet: skip3=\the\skip3}%
+ \typog@debug@typeout{smoothraggedrightshapetriplet: skip0=\the\skip0}%
+ \typog@debug@typeout{smoothraggedrightshapetriplet: skip1=\the\skip1}%
+ \typog@debug@typeout{smoothraggedrightshapetriplet: skip2=\the\skip2}%
+ \typog@debug@typeout{smoothraggedrightshapetriplet: skip3=\the\skip3}%
\unless\ifnum\typog@mod{\typog@triplet@max@lines}{3}=0
\PackageError{typog}
- {Line number of triplet generator %
+ {Line number of triplet generator\space
(\typog@triplet@max@lines) not divisible by 3}
{}
\fi
@@ -6943,15 +8368,15 @@ end
\skip3=#4\relax
\skip4=#5\relax
\skip5=#6\relax
- \typog@typeout{smoothraggedrightshapequintuplet: skip0=\the\skip0}%
- \typog@typeout{smoothraggedrightshapequintuplet: skip1=\the\skip1}%
- \typog@typeout{smoothraggedrightshapequintuplet: skip2=\the\skip2}%
- \typog@typeout{smoothraggedrightshapequintuplet: skip3=\the\skip3}%
- \typog@typeout{smoothraggedrightshapequintuplet: skip4=\the\skip4}%
- \typog@typeout{smoothraggedrightshapequintuplet: skip5=\the\skip5}%
+ \typog@debug@typeout{smoothraggedrightshapequintuplet: skip0=\the\skip0}%
+ \typog@debug@typeout{smoothraggedrightshapequintuplet: skip1=\the\skip1}%
+ \typog@debug@typeout{smoothraggedrightshapequintuplet: skip2=\the\skip2}%
+ \typog@debug@typeout{smoothraggedrightshapequintuplet: skip3=\the\skip3}%
+ \typog@debug@typeout{smoothraggedrightshapequintuplet: skip4=\the\skip4}%
+ \typog@debug@typeout{smoothraggedrightshapequintuplet: skip5=\the\skip5}%
\unless\ifnum\typog@mod{\typog@quintuplet@max@lines}{5}=0
\PackageError{typog}
- {Line number of quintuplet generator %
+ {Line number of quintuplet generator\space
(\typog@quintuplet@max@lines) not divisible by 5}
{}
\fi
@@ -6998,17 +8423,17 @@ end
\skip5=#6\relax
\skip6=#7\relax
\skip7=#8\relax
- \typog@typeout{smoothraggedrightshapeseptuplet: skip0=\the\skip0}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip1=\the\skip1}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip2=\the\skip2}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip3=\the\skip3}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip4=\the\skip4}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip5=\the\skip5}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip6=\the\skip6}%
- \typog@typeout{smoothraggedrightshapeseptuplet: skip7=\the\skip7}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip0=\the\skip0}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip1=\the\skip1}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip2=\the\skip2}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip3=\the\skip3}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip4=\the\skip4}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip5=\the\skip5}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip6=\the\skip6}%
+ \typog@debug@typeout{smoothraggedrightshapeseptuplet: skip7=\the\skip7}%
\unless\ifnum\typog@mod{\typog@septuplet@max@lines}{7}=0
\PackageError{typog}
- {Line number of septuplet generator %
+ {Line number of septuplet generator\space
(\typog@septuplet@max@lines) not divisible by 7}
{}
\fi
@@ -7115,7 +8540,7 @@ end
% |generator=triplet| produces a \doublequotes{short line -- long line -- middle length line}~sequence.
% \begin{macrocode}
\typog@fuzzwidth=.25\smoothraggedrightragwidth
- \typog@typeout{smoothraggedright: generator=triplet, typog@fuzzwidth=\the\typog@fuzzwidth}%
+ \typog@debug@typeout{smoothraggedright: generator=triplet, typog@fuzzwidth=\the\typog@fuzzwidth}%
\smoothraggedrightshapetriplet[leftskip=\typog@@smoothraggedrightleftskip,
parindent=\glueexpr\smoothraggedrightparindent + \parindent,
#1]%
@@ -7130,7 +8555,7 @@ end
% |generator=quintuplet|.
% \begin{macrocode}
\typog@fuzzwidth=.125\smoothraggedrightragwidth
- \typog@typeout{smoothraggedright: generator=quintuplet, typog@fuzzwidth=\the\typog@fuzzwidth}%
+ \typog@debug@typeout{smoothraggedright: generator=quintuplet, typog@fuzzwidth=\the\typog@fuzzwidth}%
\smoothraggedrightshapequintuplet[leftskip=\typog@@smoothraggedrightleftskip,
parindent=\glueexpr\smoothraggedrightparindent + \parindent,
#1]%
@@ -7153,7 +8578,7 @@ end
%
% \begin{macrocode}
\typog@fuzzwidth=.08333\smoothraggedrightragwidth
- \typog@typeout{smoothraggedright: generator=septuplet, typog@fuzzwidth=\the\typog@fuzzwidth}%
+ \typog@debug@typeout{smoothraggedright: generator=septuplet, typog@fuzzwidth=\the\typog@fuzzwidth}%
\smoothraggedrightshapeseptuplet[leftskip=\typog@@smoothraggedrightleftskip,
parindent=\glueexpr\smoothraggedrightparindent + \parindent,
#1]%
@@ -7198,7 +8623,7 @@ end
%
%
% \addtocontents{toc}{\protect\end{multicols}}
-% \addtocontents{toc}{\endgroup}
+% \addtocontents{toc}{\protect\end{list}}
%
%
% \Finale
@@ -7220,10 +8645,14 @@ end
\usepackage{fullwidth}
\usepackage{hyphenat}
\usepackage{mathtools}
-\usepackage[activate=true, verbose=true]{microtype}
+\usepackage[activate=true, verbose=false]{microtype}
\usepackage{ragged2e}
\usepackage[nobottomtitles*]{titlesec}\renewcommand*{\bottomtitlespace}{.2\textheight}
-\usepackage[debug, trackingttspacing]{typog}
+\usepackage{trace}
+\usepackage[debug,
+ trackingttspacing,
+ uppercaselabelitemadjustments={0pt, .1em, .15em, .1em},
+ lowercaselabelitemadjustments={-.0667em, 0pt, .1em, 0pt}]{typog}
\usepackage{xcolor}
\usepackage[loosest, proportional, scaled=1.064]{erewhon}
@@ -7234,49 +8663,42 @@ end
\def\xsfdefault{\relax}
-{
- \def\examplefont{6}
-
- \ifcase\examplefont % 0 -- document's default sans-serif font (e.g., ecrm1000)
- \gdef\examplefontname{default}
- \global\let\xsf=\sf
- \global\let\xsfdefault=\sfdefault
- \or % 1 -- Nunito
- \gdef\examplefontname{Nunito}
- \usepackage{nunito}
- \xdef\xsfdefault{\rmdefault}
- \gdef\xsf{\let\sfdefault=\xsfdefault\sf}
- \or % 2 -- OpenSans
- \gdef\examplefontname{OpenSans}
- \usepackage[defaultsans]{opensans}
- \xdef\xsfdefault{\sfdefault}
- \gdef\xsf{\let\sfdefault=\xsfdefault\sf}
- \or % 3 -- Noto Sans
- \gdef\examplefontname{OpenSans}
- \usepackage[sfdefault]{noto}
- \xdef\xsfdefault{\sfdefault}
- \gdef\xsf{\let\sfdefault=\xsfdefault\sf}
- \or % 4 -- Roboto
- \gdef\examplefontname{Roboto}
- \usepackage[sfdefault]{roboto}
- \xdef\xsfdefault{\sfdefault}
- \gdef\xsf{\let\sfdefault=\xsfdefault\sf}
- \or % 5 -- Montserrat
- \gdef\examplefontname{Montserrat Alternate}
- \usepackage[alternates]{montserrat}
- \xdef\xsfdefault{\sfdefault}
- \gdef\xsf{\let\sfdefault=\xsfdefault\sf}
- \or % 6 -- Inter
- \gdef\examplefontname{Inter}
- \usepackage[sfdefault]{inter}
- \xdef\xsfdefault{\sfdefault}
- \gdef\xsf{\let\sfdefault=\xsfdefault\sf}
- \else
- \SelectedUnknownExampleFont
- \fi
- \typeout{typog-example: font for examples: `\xsfdefault'}%
-}
+\def\examplefont{6}
+
+\ifcase\examplefont % 0 -- document's default sans-serif font (e.g., ecrm1000)
+ \def\examplefontname{default}
+ \let\xsf=\sf
+ \let\xsfdefault=\sfdefault
+\or % 1 -- Nunito
+ \def\examplefontname{Nunito}
+ \def\xsfdefault{Nunito-TOsF}
+ \def\xsf{\let\sfdefault=\xsfdefault\sf}
+\or % 2 -- OpenSans
+ \def\examplefontname{OpenSans}
+ \def\xsfdefault{opensans-TLF}
+ \def\xsf{\let\sfdefault=\xsfdefault\sf}
+\or % 3 -- Noto Sans
+ \def\examplefontname{Noto Sans}
+ \def\xsfdefault{NotoSans-TLF}
+ \def\xsf{\let\sfdefault=\xsfdefault\sf}
+\or % 4 -- Roboto
+ \def\examplefontname{Roboto}
+ \def\xsfdefault{Roboto-LF}
+ \def\xsf{\let\sfdefault=\xsfdefault\sf}
+\or % 5 -- Montserrat
+ \def\examplefontname{Montserrat Alternates}
+ \def\xsfdefault{MontserratAlternates-LF}
+ \def\xsf{\let\sfdefault=\xsfdefault\sf}
+\or % 6 -- Inter
+ \def\examplefontname{Inter}
+ \def\xsfdefault{Inter-LF}
+ \def\xsf{\let\sfdefault=\xsfdefault\sf}
+\else
+ \SelectedUnknownExampleFont
+\fi
+
+\typeout{typog-example: font for examples: `\xsfdefault'}%
\usepackage{hyperref}
@@ -7388,7 +8810,6 @@ end
concentrate all the badness in one place, making one truly unsightly line instead of
two moderately bad ones, because a single ``write-off'' produces fewest total
demerits according to the rules.}
- %There is a much better way to get the desired effect:~[\dots]
\newcommand*{\texbooktolerancesamplecredits}
{\medskip\noindent
\textsl{The sample text was taken from The~\TeX{}book~\cite[p.~107]{knuth:1986}.}}
@@ -7396,7 +8817,7 @@ end
\newcommand*{\texbookparfillskipsample}
{We still haven't discussed the special trick that allows the final line of a paragraph
to be shorter than the others. Just before \TeX{} begins to choose breakpoints,
- it does two important things: [\dots]}
+ it does two important things: [\dots\itcorr{-4}]}
\newcommand*{\texbooklongparfillskipsample}
{We still haven't discussed the special trick that allows the final line of a paragraph
to be shorter than the others. Just before \TeX{} begins to choose breakpoints,
@@ -7404,7 +8825,7 @@ end
that glue is discarded. (The reason is that a blank space often gets into a token list just
before \code{\char92par} or just before \code{\char36\char36}, and this blank space should not be
part of the paragraph.) (2)~Three or more items are put at the end of the
- current horizontal list~[\dots]}
+ current horizontal list~[\dots\itcorr{-4}]}
\newcommand*{\texbookparfillskipsamplecredits}
{\medskip\noindent
\textsl{The sample text was taken from The~\TeX{}book~\cite[p.~99n]{knuth:1986}.}}
@@ -7458,7 +8879,7 @@ end
\setcounter{tocdepth}{1}
-\setlength{\overfullrule}{3pt}
+\setlength{\overfullrule}{0pt}
\hbadness=-1
@@ -7575,7 +8996,76 @@ in the official documentation of package~\packagename{typog}.
\noindent
Unless otherwise noted the font used in the examples is \singlequotes{\examplefontname}.
-\bigskip
+
+\section{Setup and Reconfiguration}
+
+\noindent
+\code{\char`\\ typogget}
+
+\begin{list}{}{}
+ \newcommand*{\expandsto}{$\mathbin{\mapsto}$}
+\item \code{breakpenalty} \expandsto{} \the\typogget{breakpenalty}
+\item \code{ligaturekern} \expandsto{} \milliem{\typogget{ligaturekern}}
+\item \code{lowercaselabelitemadjustments} \expandsto{} \typogget{lowercaselabelitemadjustments}
+\item \code{mathitalicscorrection} \expandsto{} \the\typogget{mathitalicscorrection}
+\item \code{raisecapitaldash} \expandsto{} \the\typogget{raisecapitaldash}
+\item \code{raisecapitalguillemets} \expandsto{} \the\typogget{raisecapitalguillemets}
+\item \code{raisecapitalhyphen} \expandsto{} \the\typogget{raisecapitalhyphen}
+\item \code{raisecapitaltimes} \expandsto{} \the\typogget{raisecapitaltimes}
+\item \code{raisefiguredash} \expandsto{} \the\typogget{raisefiguredash}
+\item \code{raiseguillemets} \expandsto{} \the\typogget{raiseguillemets}
+\item \code{shrinklimits} \expandsto{} \typogget{shrinklimits}
+\item \code{slashkern} \expandsto{} \the\typogget{slashkern}
+\item \code{stretchlimits} \expandsto{} \typogget{stretchlimits}
+\item \code{textitalicscorrection} \expandsto{} \the\typogget{textitalicscorrection}
+\item \code{trackingttspacing} \expandsto{} \typogget{trackingttspacing}
+\item \code{uppercaselabelitemadjustments} \expandsto{} \typogget{uppercaselabelitemadjustments}
+\end{list}
+
+\begingroup
+ \dimen0=\typogget{raisecapitaldash}%
+ \setbox0=\hbox to \typogget{ligaturekern} {}%
+\endgroup
+
+\noindent
+\code{\char`\\ typoggetnth}
+
+\begin{list}{}{}
+\item
+ Elements of \code{lowercaselabelitemadjustments}:
+ (1)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{1}\the\dimen0,
+ (2)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{2}\the\dimen0,
+ (3)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{3}\the\dimen0, and
+ (4)~\typoggetnth{\dimen0}{lowercaselabelitemadjustments}{4}\the\dimen0.
+
+ Same elements now accessed from the right-hand-side, i.\,e.~with negative indices:
+ (\textminus4)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-4}\nth,
+ (\textminus3)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-3}\nth,
+ (\textminus2)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-2}\nth, and
+ (\textminus1)~\typoggetnth{nth}{lowercaselabelitemadjustments}{-1}\nth.
+
+\item Elements of \code{shrinklimits}:
+ (1)~\typoggetnth{nth}{shrinklimits}{1}\nth,
+ (2)~\typoggetnth{nth}{shrinklimits}{2}\nth, and
+ (3)~\typoggetnth{nth}{shrinklimits}{3}\nth.
+
+\item Elements of \code{stretchlimits}:
+ (1)~\typoggetnth{nth}{stretchlimits}{1}\nth,
+ (2)~\typoggetnth{nth}{stretchlimits}{2}\nth, and
+ (3)~\typoggetnth{nth}{stretchlimits}{3}\nth.
+
+\item Elements of \code{trackingttspacing}:
+ (1)~\typoggetnth{nth}{trackingttspacing}{1}\nth,
+ (2)~\typoggetnth{nth}{trackingttspacing}{2}\nth, and
+ (3)~\typoggetnth{nth}{trackingttspacing}{3}\nth.
+
+\item Elements of \code{uppercaselabelitemadjustments}:
+ (1)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{1}\the\dimen0,
+ (2)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{2}\the\dimen0,
+ (3)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{3}\the\dimen0, and
+ (4)~\typoggetnth{\dimen0}{uppercaselabelitemadjustments}{4}\the\dimen0.
+\end{list}
+
\section{Information}
@@ -8068,6 +9558,82 @@ We again compare the default implementation with the adjusted one.
\end{quote}
+\section{Label Items}
+
+The current configurations for the uppercase and lowercase adjustments are
+\{\typogget{uppercaselabelitemadjustments}\} and \{\typogget{lowercaselabelitemadjustments}\},
+respectively.
+
+\begin{center}
+ \makeatletter
+ \noindent
+ A\raisebox{\typog@adjust@uppercase@labelitemi}{\labelitemi}%
+ B\raisebox{\typog@adjust@uppercase@labelitemii}{\labelitemii}%
+ E\raisebox{\typog@adjust@uppercase@labelitemiii}{\labelitemiii}%
+ G\raisebox{\typog@adjust@uppercase@labelitemiv}{\labelitemiv}H \\
+ a\raisebox{\typog@adjust@lowercase@labelitemi}{\labelitemi}%
+ b\raisebox{\typog@adjust@lowercase@labelitemii}{\labelitemii}%
+ c\raisebox{\typog@adjust@lowercase@labelitemiii}{\labelitemiii}%
+ e\raisebox{\typog@adjust@lowercase@labelitemiv}{\labelitemiv}g
+ \makeatother
+\end{center}
+
+For the following nested lists we adjust levels one and three for uppercase and levels two and
+four for lowercase.
+
+\begingroup
+ \uppercaseadjustlabelitems{1,3}
+ \lowercaseadjustlabelitems{2,4}
+ \setlength{\itemsep}{0pt}
+ \setlength{\parsep}{0pt}
+ \setlength{\topsep}{0pt}
+ \begin{itemize}
+ \item A
+ \item B
+ \item C
+ \begin{itemize}
+ \item d
+ \item e
+ \item f
+ \begin{itemize}
+ \item G
+ \item H
+ \item I
+ \begin{itemize}
+ \item j
+ \item k
+ \item l
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+\endgroup
+\noadjustlabelitems{*}% not necessary, but we want to exercise the macro
+
+The left example shows the result of \code{\string\typogadjuststairs\{.25pt\}\{11\}\{ABC\}} and
+the one on the right hand side just uses the same parameters except for the sample~\sample{ace},
+this is, only lowercase letters.
+
+\begin{center}
+ \begin{minipage}[t]{12em}
+ \centering
+ \typogadjuststairs{.25pt}{11}{ABC}
+ \end{minipage}
+ \begin{minipage}[t]{12em}
+ \centering
+ \typogadjuststairs{.25pt}{11}{ace}
+ \end{minipage}
+\end{center}
+
+For this document the calls
+\code{\string\typoguppercaseadjustcheck\{ABC\-DEF\-GHI\-JKL\-MNO\-PQR\-STU\-VWX\-YZ\}} and
+\code{\string\typoglowercaseadjustcheck\{ace\-gmn\-opq\-rsu\-vwx\-yz\}} yield
+\sample{\typoguppercaseadjustcheck{ABCDEFGHIJKLMNOPQRSTUVWXYZ}} and
+\sample{\typoglowercaseadjustcheck{acegmnopqrsuvwxyz}}, where the adjustments in effect are
+\code{\{\typogget{uppercaselabelitemadjustments}\}} and
+\code{\{\typogget{lowercaselabelitemadjustments}\}}, respectively.
+
+
\clearpage
\section{Align Last Line}
@@ -8292,7 +9858,7 @@ consult \propername{David Carlisle's} excellent post on \propername{StackExchang
\begin{center}
\setlength{\overfullrule}{0pt}
- \newcommand*{\spacesampletext}[1]{some#1text#1with#1spaces\rule{0.1pt}{1em}}
+ \newcommand*{\spacesampletext}[1]{some#1text#1with#1spaces\rule{.1pt}{1em}}
\newsavebox{\narrowspacesample}
\sbox{\narrowspacesample}{\spacesampletext{\narrowspace}}
\newsavebox{\widespacesample}
@@ -8707,7 +10273,7 @@ New settings: \baselinesetsize.
\newcommand*{\relbls}{130}
\paragraph{\code{\string\setbaselineskippercentage\{\relbls\}}}
-\setbaselineskippercentage{1 + 2 + .3333 * 100 + 100 * 0.6667}% float expression
+\setbaselineskippercentage{1 + 2 + .3333 * 100 + 100 * .6667}% float expression
\setbaselineskippercentage{\relbls}
\fontsizeinfo{baselinesetsize}
New settings: \baselinesetsize.
@@ -8840,7 +10406,7 @@ visually: \rule{.1pt}{.8em}\kern\parindent\rule{.1pt}{.8em};
%
%
% \iffalse
-%<*nomicrotype>
+%<*without-microtype>
\documentclass[]{article}
@@ -8853,7 +10419,9 @@ visually: \rule{.1pt}{.8em}\kern\parindent\rule{.1pt}{.8em};
{\singleguillemetright}
{\singleguillemetleft}
-\usepackage[]{typog}
+\usepackage[uppercaselabelitemadjustments={.1em, .075em, .1em, .1em},
+ lowercaselabelitemadjustments={-.025em, -.05em, -.025em, -.025em}]
+ {typog}
\newcommand*{\packagename}[1]{\mbox{\textsf{#1}}}
@@ -8868,7 +10436,9 @@ visually: \rule{.1pt}{.8em}\kern\parindent\rule{.1pt}{.8em};
\bigskip
-\noindent
+
+\section*{No Microtype}
+
This example \LaTeX-document uses package~\packagename{typog}
\emph{without} package~\packagename{microtype}.
@@ -8876,6 +10446,38 @@ We want \packagename{typog} to be as usable as possible even without
the nice features that \packagename{microtype} offers.
After all \packagename{typog} is just a front-end for it.
+
+\section*{No EnumItem}
+
+We intentionally do not load package~\packagename{enumitem}, either.
+So, we can test whether \packagename{typog} correctly patches the
+plain \LaTeX{} definition if environment~\texttt{itemize}.
+
+The vertical alignment of the label items was setup for
+uppercase (ABC\typoguppercaseadjustcheck{ABCXYZ}XYZ) and for
+lowercase (ace\typoglowercaseadjustcheck{acexyz}xyz), though
+this is not necessary for the test.
+
+\uppercaseadjustlabelitems{*}
+\begin{itemize}
+\item Level i
+\item Sublist \dots
+ \begin{itemize}
+ \item Level ii
+ \item Sublist \dots
+ \begin{itemize}
+ \item Level iii
+ \item Sublist \dots
+ \begin{itemize}
+ \item Level iv
+ \end{itemize}
+ \end{itemize}
+ \end{itemize}
+\end{itemize}
+
+
+\section*{CSQuotes}
+
As we are testing a special configuration here anyhow,
we hook up our quotes with package~csquotes
to check whether they interact ok.
@@ -8883,7 +10485,28 @@ to check whether they interact ok.
\enquote{This is the outer part of the phrase
which contains the \enquote{inner part}.}}
\end{document}
-%</nomicrotype>
+%</without-microtype>
+% \fi
+%
+%
+%
+% \iffalse
+%<*minimal-test>
+\documentclass{minimal}
+
+\usepackage{typog}
+
+\newcommand*{\raiseamount}{0.5pt}
+
+\begin{document}
+\begin{typogsetup}{raise*=\raiseamount}
+ Em-dash raised by \the\typogget{raisecapitaldash} (expected: \raiseamount).
+\end{typogsetup}
+
+\fontsizeinfo{typoinfo}
+Document class ``minimal'' sets up font size and line spacing as~\typoinfo.
+\end{document}
+%</minimal-test>
% \fi
%
%
@@ -8902,35 +10525,49 @@ to check whether they interact ok.
/@menu/,/@end menu/d
## Convert sectioning macros to our own hierarchy.
-s/^@chapter \(.*\)$/\\subsection*{\\textls[40]{\1}}/
-s/^@section \(.*\)$/\\subsubsection*{\1}/
+s/^@chapter \(.*\)$/\\subsection{\\titlecase{\1}\\label{\1}}/
+s/^@section \(.*\)$/\\subsubsection{\\titlecase{\1}}\\label{\1}/
## Make `@asis' list resemble the Texinfo format.
s/@table @asis/\\begin{list}{}{\\itemindent=-20pt\\leftmargin=20pt}/
s/@end table/\\end{list}/
+## We substitute our maxipage environment for @display.
+s/@display/\\begin{maxipage}/
+s/@end display/\\end{maxipage}/
+
+## Translate `@example' environments.
+s/@example/\\begin{quote}\\tt\\obeylines/
+s/@end example/\\end{quote}\n\n/
+
## Indenting by four spaces generates a `verbatim' environment.
s/@verbatim/\\begin{verbatim}/
s/@end verbatim/\\end{verbatim}/
-## We substitute @display for our maxipage environment.
-s/@display/\\begin{maxipage}/
-s/@end display/\\end{maxipage}/
-
## The argument format of the URL macro is different.
s/@url{\([^,]*\), \([^}]*\)}/\\href{\1}{\2}/g
## Use our own markup.
s/\.\.\./\\dots{}/g
s/LaTeX/\\LaTeX{}/g
-s/@file/\\textit/g
+s/@file/\\emph/g
s/@strong/\\textbf/g
+s/@var/\\emph/g
s/[w]{/mbox{/g
+## Translate some Texinfo macros.
+s/@backslashchar/\\char`\\\\/g
+s/@lbracechar/\\{/g
+s/@noindent/\\noindent/g
+s/@rbracechar/\\}/g
+
## Quote some special characters.
s/%/\\%/g
s/_/\\_/g
+## Add space around alternative-indicators.
+s/[|]/\\,|\\,/g
+
## Adapt to how a man-page is typeset.
## En-dashes in front of long options really suck!
s/--/-\\nolig*-/g
@@ -8944,7 +10581,7 @@ s/@@/@/g
s/\\jobname/\\textbackslash jobname/g
## Make qualified Perl names breakable.
-s/::/::\\discretionary{}{}{}/g
+s/::/::\\breakpoint*/g
%</teximan2latex>
% \fi
%
@@ -8960,6 +10597,7 @@ use strict;
use warnings;
use Data::Dumper ();
+use Encode ();
use English;
use File::Basename ();
use Getopt::Long;
@@ -9011,32 +10649,32 @@ sub limit_string_length {
## We set all colors to `undef' and fill them later with the values
## of the actual configuration.
my $highlight_patterns = {
- PARTIAL_LINE => {
- FONT_SPEC => [qr#
- \\
- (?: OMS | OMX | OT1 | T1 | TS1 | U )
- (?: /[^/]+ ){5} / \S+ \s
- (?: \([+-]\d+\) )?
- #x, undef],
- MATH => [qr#
- \$
- \\
- (?: LMS | OML )
- (?: /[^/]+ ){5} / \S+ \s
- (?: \([+-]\d+\) )?
- .*?
- \$
- #x, undef]
- },
- WHOLE_LINE => {
- FILL_STATE => [qr#^(?:Under|Over)full \\hbox .*$#, undef],
- FIRST_VBOX => [qr#^%%#, undef],
- HORIZONTAL_BREAKPOINT => [qr#^@@\d+:.*$#, undef],
- HORIZONTAL_BREAK_CANDIDATE => [qr#^@[\\ ].*$#, undef],
- LINE_BREAK_PASS => [qr#^@[a-z]+?pass#, undef],
- TIGHTNESS => [qr#^(?:Loose|Tight) \\hbox .*$#, undef],
- VERTICAL_BREAKPOINT => [qr#^% t=\d+.*$#, undef]
- }
+ PARTIAL_LINE => {
+ FONT_SPEC => [qr#
+ \\
+ (?: OMS | OMX | OT1 | T1 | TS1 | U )
+ (?: /[^/]+ ){5} / \S+ \s
+ (?: \([+-]\d+\) )?
+ #x, undef],
+ MATH => [qr#
+ \$
+ \\
+ (?: LMS | OML )
+ (?: /[^/]+ ){5} / \S+ \s
+ (?: \([+-]\d+\) )?
+ .*?
+ \$
+ #x, undef]
+ },
+ WHOLE_LINE => {
+ FILL_STATE => [qr#^(?:Under|Over)full \\hbox .*$#, undef],
+ FIRST_VBOX => [qr#^%%#, undef],
+ HORIZONTAL_BREAKPOINT => [qr#^@@\d+:.*$#, undef],
+ HORIZONTAL_BREAK_CANDIDATE => [qr#^@[\\ ].*$#, undef],
+ LINE_BREAK_PASS => [qr#^@[a-z]+?pass#, undef],
+ TIGHTNESS => [qr#^(?:Loose|Tight) \\hbox .*$#, undef],
+ VERTICAL_BREAKPOINT => [qr#^% t=\d+.*$#, undef]
+ }
};
@@ -9048,7 +10686,7 @@ sub colorize_line {
return Term::ANSIColor::colored($line, $pattern_color_pair->[1])
if $line =~ $pattern_color_pair->[0];
}
- return $line if $line =~ m#^\.#; # we do not paint box contents yet
+ return $line if $line =~ m#^\.#; # we do not paint box contents yet
$line =~ s#$highlight_patterns->{PARTIAL_LINE}->{MATH}->[0]
#Term::ANSIColor::colored($MATCH, $highlight_patterns->{PARTIAL_LINE}->{MATH}->[1])
@@ -9074,13 +10712,30 @@ my $open_tag_regexp =
>#x;
+sub find_encoder {
+ my $encoding = shift;
+
+ my $encoder;
+
+ if ($encoding) {
+ $encoder = Encode::find_encoding($encoding);
+ if (!$encoder) {
+ issue_warning("encoding @{[quote_literal($encoding)]} unknown; proceeding without decoder");
+ }
+ }
+
+ return $encoder;
+}
+
+
sub grep_log_file {
my ($options, $configuration, $file, $filename, $id_regexp) = @_;
+ my $encoder = find_encoder($options->{ENCODING});
my $job_name;
- my $line_number = 0; # line number in the log file we are inspecting, i.e., $filename
+ my $line_number = 0; # line number in the log file we are inspecting, i.e., $filename
my $match_count = 0;
- my $source_line_number; # line number in TeX file the log refers to, i.e., "$job_name.tex"
+ my $source_line_number; # line number in TeX file the log refers to, i.e., "$job_name.tex"
my $page_number;
my $regexp_modifier = $options->{IGNORE_CASE} ? 'i' : '';
my $id_value;
@@ -9094,6 +10749,8 @@ sub grep_log_file {
chomp $line;
$line_number++;
+ $line = Encode::encode_utf8($encoder->decode($line, Encode::FB_CROAK)) if $encoder;
+
if ($line =~ $close_tag_regexp) {
fail_with_error("$filename: $line_number: mismatched open/close tags") unless @nesting_levels;
pop @nesting_levels;
@@ -9175,19 +10832,25 @@ sub grep_log_file {
}
}
}
+
+ return $match_count;
}
sub show_ids_in_file {
my ($options, $configuration, $file, $filename, $id_regexp) = @_;
+ my $encoder = find_encoder($options->{ENCODING});
my $line_number = 0;
+ my $match_count = 0;
my @nesting_levels;
while (my $line = readline $file) {
chomp $line;
$line_number++;
+ $line = Encode::encode_utf8($encoder->decode($line, Encode::FB_CROAK)) if $encoder;
+
if ($line =~ $close_tag_regexp) {
fail_with_error("$filename: $line_number: mismatched open/close tags") unless @nesting_levels;
pop @nesting_levels;
@@ -9200,6 +10863,7 @@ sub show_ids_in_file {
my $page_number = $+{page_match};
++$MATCH_COUNT;
+ ++$match_count;
push @nesting_levels, 1;
if ($options->{LOG_LINE_NUMBER}) {
@@ -9239,6 +10903,8 @@ sub show_ids_in_file {
print ' ' x $indent, $id_value, "\n";
}
}
+
+ return $match_count;
}
@@ -9256,7 +10922,7 @@ sub open_file_for_reading {
fail_with_error("cannot open @{[quote_filesystem($filename)]}: $OS_ERROR");
}
- $file;
+ return $file;
}
@@ -9272,9 +10938,9 @@ sub grep_or_show {
my ($options, $configuration, $file, $filename, $id_regexp) = @_;
if ($options->{SHOW_ALL_IDS}) {
- show_ids_in_file($options, $configuration, $file, $filename, $id_regexp);
+ return show_ids_in_file($options, $configuration, $file, $filename, $id_regexp);
} else {
- grep_log_file($options, $configuration, $file, $filename, $id_regexp);
+ return grep_log_file($options, $configuration, $file, $filename, $id_regexp);
}
}
@@ -9282,6 +10948,8 @@ sub grep_or_show {
sub scan_files {
my ($options, $configuration, $id_regexp, $log_filenames) = @_;
+ my $match_count = 0;
+
if (@$log_filenames) {
foreach my $log_filename (@$log_filenames) {
$log_filename = 'stdin' if $log_filename eq '-';
@@ -9294,15 +10962,17 @@ sub scan_files {
print $filename_header;
}
my $file = open_file_for_reading($log_filename);
- grep_or_show($options, $configuration, $file, $log_filename, $id_regexp);
+ $match_count += grep_or_show($options, $configuration, $file, $log_filename, $id_regexp);
close_file($file, $log_filename);
}
} else {
my $log_filename = 'stdin';
my $file = open_file_for_reading($log_filename);
- grep_or_show($options, $configuration, $file, $log_filename, $id_regexp);
+ $match_count = grep_or_show($options, $configuration, $file, $log_filename, $id_regexp);
close_file($file, $log_filename);
}
+
+ return $match_count;
}
@@ -9319,10 +10989,12 @@ sub redirect_and_scan_files {
my $stdout = select $pager;
$pager->autoflush;
- scan_files($options, $configuration, $id_regexp, $log_filenames);
+ my $match_count = scan_files($options, $configuration, $id_regexp, $log_filenames);
close $pager or issue_warning "error occurred while closing the pager (pid: $pid) pipe: $OS_ERROR";
select $stdout;
+
+ return $match_count;
}
@@ -9431,6 +11103,7 @@ sub setup_configuation {
my $default_options = {
COLORIZE_MODE => 'auto',
DEBUG => 0,
+ ENCODING => undef,
ID => 0,
IGNORE_CASE => 0,
JOB_NAME => 0,
@@ -9452,6 +11125,7 @@ Options
--colour [WHEN] use color to highlight specific log contents
WHEN is 'always', 'never', or 'auto'
-C, --config KEY=VALUE set configuration KEY to VALUE
+ -E, --encoding ENCODING set character ENCODING of LOG-FILE
-i, --[no-]id print matching id with output lines
-y, --[no-]ignore-case ignore case distinctions in patterns and data
-j, --[no-]job-name print \\jobname with output lines
@@ -9461,10 +11135,12 @@ Options
-P, --[no-]pager redirect output to pager
-w, --[no-]word-regexp match only whole words
- -a, --all, --any show all IDs in LOG-FILE
+ -a, --all, --any discover all IDs in LOG-FILE
+
--debug turn on debug output
-h, --help display this help and exit
--show-config show default configuration and exit
+ --show-encodings show all known encodings and exit
-V, --version show version information and exit
HELP_TEXT
@@ -9473,6 +11149,17 @@ HELP_TEXT
}
+sub show_encodings {
+ my @all_encodings = Encode->encodings(':all');
+
+ foreach my $encoding (@all_encodings) {
+ print "$encoding\n";
+ }
+
+ exit 0;
+}
+
+
sub show_configuration {
my $format_string_value = sub {quote_literal($default_configuration->{$_[0]})};
@@ -9508,10 +11195,10 @@ FIXED_CONFIGURATION_TEXT
sub show_version {
print <<VERSION_TEXT;
-typog-grep 0.1
+typog-grep @RELEASE@
Copyright (C) 2024 by Ch. L. Spiel
-License LPPL: LaTeX Project Public License version 1.3 or later
+License LPPL: LaTeX Project Public License version 1.3c or later
VERSION_TEXT
exit 0;
@@ -9527,6 +11214,7 @@ sub get_options {
'color|colour=s' => \$options->{COLORIZE_MODE},
'C|configuration=s' => sub{setup_configuation($_[1], $configuration)},
'debug+' => \$DEBUG,
+ 'E|encoding=s' => \$options->{ENCODING},
'h|help' => \&show_help,
'i|id!' => \$options->{ID},
'y|ignore-case!' => \$options->{IGNORE_CASE},
@@ -9535,13 +11223,18 @@ sub get_options {
'N|log-line-number!' => \$options->{LOG_LINE_NUMBER},
'p|page-number!' => \$options->{PAGE_NUMBER},
'P|pager!' => \$options->{REQUEST_PAGER},
+ 'show-encodings' => \&show_encodings,
'show-config' => \&show_configuration,
'V|version' => \&show_version,
'w|word-regexp!' => \$options->{WORD_REGEXP}) or
- fail_with_error('problems while parsing options');
+ fail_with_error('problems while parsing options');
- fail_with_error("unknown colorize mode @{[quote_literal($options->{COLORIZE_MODE})]}")
- unless $options->{COLORIZE_MODE} =~ m/^(?:always|auto|never)$/i
+ if ($options->{COLORIZE_MODE}) {
+ fail_with_error("unknown colorize mode @{[quote_literal($options->{COLORIZE_MODE})]}")
+ unless $options->{COLORIZE_MODE} =~ m/^(?:always|auto|never)$/i;
+ } else {
+ $options->{COLORIZE_MODE} = 'auto';
+ }
}
@@ -9565,14 +11258,27 @@ sub do_colorize {
sub main {
$OUTPUT_IS_REDIRECTED = -t STDOUT ? 0 : 1;
- my $options = {%$default_options};
my $configuration = {%$default_configuration};
+ my $options = {%$default_options};
+ debug_print(Data::Dumper::Dumper(['Default Configuration', $configuration]));
+ debug_print(Data::Dumper::Dumper(['Default Options', $options]));
+
+ my $user_options = {};
+ my $user_configuration = {};
+ get_options($user_options, $user_configuration);
+ debug_print(Data::Dumper::Dumper(['User Configuration', $user_configuration]));
+ debug_print(Data::Dumper::Dumper(['User Options', $user_options]));
+ while (my ($key, $value) = each %$user_options) {
+ $options->{$key} = $value if $value;
+ }
+ while (my ($key, $value) = each %$user_configuration) {
+ $configuration->{$key} = $value if $value;
+ }
+ debug_print(Data::Dumper::Dumper(['Final Configuration', $configuration]));
+ debug_print(Data::Dumper::Dumper(['Final Options', $options]));
- get_options($options, $configuration);
$options->{COLORIZE_OUTPUT} = do_colorize($options->{COLORIZE_MODE});
initialize_highlighting_from_configuration($configuration);
- debug_print(Data::Dumper::Dumper($configuration));
- debug_print(Data::Dumper::Dumper($options));
my $id_regexp;
if ($options->{SHOW_ALL_IDS}) {
@@ -9584,17 +11290,18 @@ sub main {
$id_regexp = shift @ARGV;
}
- if ($options->{REQUEST_PAGER} && $OUTPUT_IS_REDIRECTED) {
+ if ($user_options->{REQUEST_PAGER} && $OUTPUT_IS_REDIRECTED) {
issue_warning("option @{[quote_literal('--pager')]} ignored because output is redirected");
}
my $use_pager = $options->{REQUEST_PAGER} && !$OUTPUT_IS_REDIRECTED;
+ my $match_count;
if ($use_pager) {
- redirect_and_scan_files($options, $configuration, $id_regexp, \@ARGV);
+ $match_count = redirect_and_scan_files($options, $configuration, $id_regexp, \@ARGV);
} else {
- scan_files($options, $configuration, $id_regexp, \@ARGV);
+ $match_count = scan_files($options, $configuration, $id_regexp, \@ARGV);
}
- exit ($MATCH_COUNT == 0);
+ exit ($match_count == 0);
}
@@ -9615,7 +11322,7 @@ main();
=head1 NAME
-typog-grep - grep for typog-inspect elements in LaTeX log files
+typog-grep - specialized grep for typog-inspect elements in LaTeX log files
=head1 SYNOPSIS
@@ -9628,9 +11335,70 @@ typog-grep - grep for typog-inspect elements in LaTeX log files
=back
-The first form shows all C<E<lt>typog-inspect id="I<ID>" ...E<gt>> elements in F<LOG-FILE>.
+The first form, ``discovery mode'', shows all I<ID>s of
+
+=begin text
+
+<typog-inspect id="ID" ...>
+
+=end text
+
+=begin man
+
+.RS
+.EX
+<typog-inspect id="\fI\,ID\/\fP" ...>
+.EE
+.RE
+
+=end man
+
+=begin texinfo
+
+@example
+<typog-inspect id="@var{ID}" ...>
+@end example
+@noindent
+
+=end texinfo
+
+Z<>
+elements in F<LOG-FILE>.
+
+The second form shows the contents, I<LOG-DATA>, of the elements
-The second form shows the contents of C<E<lt>typog-inspect id="I<ID>" ...E<gt>> elements
+=begin text
+
+<typog-inspect id="ID" ...>
+LOG-DATA
+</typog-inspect>
+
+=end text
+
+=begin man
+
+.RS
+.EX
+<typog-inspect id="\fI\,ID\/\fP" ...>
+\fILOG-DATA\fP
+</typog-inspect>
+.EE
+.RE
+
+=end man
+
+=begin texinfo
+
+@example
+<typog-inspect id="@var{ID}" ...>
+@var{LOG-DATA}
+</typog-inspect>
+@end example
+@noindent
+
+=end texinfo
+
+Z<>
whose I<ID>s match I<REGEXP> in F<LOG-FILE>.
If no F<LOG-FILE> is given read from F<stdin>.
@@ -9639,57 +11407,101 @@ The S<filename C<->> is synonymous to F<stdin>.
=head1 DESCRIPTION
-B<typog-grep> is a tailored post-processor for LaTeX log files
-and the C<typoginspect> environment as provided by S<package typog>.
+B<typog-grep> is a tailored post-processor for LaTeX S<F<log> files>
+and the C<typoginspect> environment as provided by the S<LaTeX package typog>.
It shares more with the venerable
L<B<sgrep>|https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html>
than with S<POSIX L<B<grep>|https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html>>.
-The LaTeX user brackets her text in
+In the LaTeX source file the user brackets her text or code
+in a C<typoginspect> environment:
+
+=begin text
+
+\begin{typoginspect}{ID}
+ TEXT-OR-CODE-TO-INVESTIGATE
+\end{typoginspect}
+
+=end text
+
+=begin man
+
+.RS
+.EX
+\ebegin{typoginspect}{\fI\,ID\/\fP}
+\fITEXT-OR-CODE-TO-INVESTIGATE\fP
+\eend{typoginspect}
+.EE
+.RE
- \begin{typoginspect}{ID}
- Text and code to investigate
- \end{typoginspect}
+=end man
+
+=begin texinfo
+
+@example
+@backslashchar{}begin@lbracechar{}typoginspect@rbracechar{}@lbracechar{}@var{ID}@rbracechar{}
+@var{TEXT-OR-CODE-TO-INVESTIGATE}
+@backslashchar{}end@lbracechar{}typoginspect@rbracechar{}
+@end example
+@noindent
+
+=end texinfo
+Z<>
where I<ID> is used to identify one or more bracketed snippets.
I<ID> does not have to be unique.
The I<REGEXP> mechanism makes it easy to select groups of related I<ID>s
if they are named accordingly.
-In F<LOG-FILE> the environment shows up, packed with tracing information, as
+In F<LOG-FILE> the result of the environment shows up,
+packed with tracing information, as
-=begin texinfo
+=begin text
-@display
-@relax
+<typog-inspect id="ID" job="JOB-NAME" line="LINE-NUMBER" page="PAGE-NUMBER">
+ LOG-DATA
+</typog-inspect>
-=end texinfo
+=end text
+
+=begin man
- <typog-inspect id="ID" job="JOB-NAME" line="LINE-NUMBER" page="PAGE-NUMBER">
- Trace Data
- </typog-inspect>
+.RS
+.EX
+<typog-inspect id="\fI\,ID\/\fP" job="\fI\,JOB-NAME\/\fP" line="\fI\,LINE-NUMBER\/\fP" page="\fI\,PAGE-NUMBER\/\fP">
+\fILOG-DATA\fP
+</typog-inspect>
+.EE
+.RE
+
+=end man
=begin texinfo
-@end display
-@relax
+@example
+<typog-inspect id="@var{ID}" job="@var{JOB-NAME}" line="@var{LINE-NUMBER}" page="@var{PAGE-NUMBER}">
+@var{LOG-DATA}
+</typog-inspect>
+@end example
+@noindent
=end texinfo
+Z<>
where all the capital-letter sequences are meta-variables
and in particular
I<JOB-NAME> is the expansion of C<\jobname>,
I<LINE-NUMBER> is the LaTeX source file line number
of the beginning of the C<typoginspect> environment,
and I<PAGE-NUMBER> is the page where
-the output of S<C<Text and code to investigate>> occurs.
+the output of S<C<TEXT-OR-CODE-TO-INVESTIGATE>> occurs.
B<typog-grep> reveals the contents of F<LOG-FILE>
between C<E<lt>typog-inspect id="I<ID>" ...E<gt>>
-and C<E<lt>/typog-inspectE<gt>> excluding the XML-tags.
+and C<E<lt>/typog-inspectE<gt>> excluding the XML-tags themselves.
Access the I<JOB-NAME>, I<LINE-NUMBER>, and I<PAGE-NUMBER>
with the commandline options
-B<--job-name>, B<--line-number>, and B<--page-number>, respectively.
+B<--job-name>, B<--line-number>, and B<--page-number>, respectively.
Use B<--id> to show the name of the IDs that matched I<REGEXP>.
C<typoginspect> environments can be nested.
@@ -9707,11 +11519,18 @@ The list of options is sorted by the names of the long options.
=item B<-a>, B<--all>, B<--any>
ID-discovery mode:
-Show all C<typog-inspect> elements independent of any matching patterns.
+Discover all C<typog-inspect> elements independent of any matching patterns
+and print their I<ID>s.
+The results are printed in their order of occurrence in the respective F<LOG-FILE>s.
+Pipe the output into B<sort> to get alphabetically ordered I<ID>s.
+
+Augment with options
+B<--job-name>, B<--line-number>, B<--log-line-number>, or S<B<--page-number>>
+for more information.
=item B<--color>, B<colour> I<WHEN>
-Colorize specific log contents for the matching ids.
+Colorize specific log contents for the matching I<ID>s.
The S<argument I<WHEN>> determines when to apply color:
C<always>, C<never>, S<or C<auto>>.
The setting C<auto> checks whether standard output has been redirected.
@@ -9720,29 +11539,45 @@ This is the default.
=item B<-C>, B<--config> I<KEY>=I<VALUE>[:I<KEY>=I<VALUE>[:...]]
Set one or more configuration I<KEY> to I<VALUE> pairs.
-See S<Sec. CONFIGURATION> below for a description of all available configuration items.
-Use option B<--show-config> to display the default configuration.
+See section L</CONFIGURATION> for a description
+of all available configuration items.
+Use S<option B<--show-config>> to display the default configuration.
=item B<--debug>
Turn on debug output on F<stderr>.
+=item B<-E>, B<--encoding> I<ENCODING>
+
+Set the I<ENCODING> of F<LOG-FILE> for the translation to UTF-8.
+The default is unset.
+
+Use this option to get rid of pesky
+S<"E<lt>I<HEX-DIGITS>E<gt>" escapes> on UTF-8 terminals.
+See S<option B<--show-encodings>> for the known encodings and
+Encode::Supported for a summary of all encodings.
+See also S<section L</Some Common Encodings>>.
+
+Apply L<B<iconv>|https://pubs.opengroup.org/onlinepubs/9699919799/utilities/iconv.html>
+(POSIX) or L<B<recode>|https://github.com/rrthomas/recode/> (GNU) on F<LOG-FILE>
+before this tool to avoid having to use S<option B<--encoding>>.
+
=item B<-h>, B<--help>
Display brief help then exit.
=item B<-i>, B<--[no-]id>
-Print the actual id name that matched I<REGEXP>.
-Control the appearance of the matching id with configuration S<item C<id-heading>>.
+Print the actual ID-name that matched I<REGEXP>.
+Control the appearance of the matching I<ID> with configuration S<item C<id-heading>>.
=item B<-y>, B<--[no-]ignore-case>
-Match ids while ignoring case distinctions in patterns and data.
+Match I<ID>s while ignoring case distinctions in patterns and data.
=item B<-j>, B<--[no-]job-name>
-Print the C<\jobname> that B<tex> associated with the input file.
+Print the C<\jobname> that B<latex> associated with the input file.
=item B<-n>, B<--[no-]line-number>
@@ -9766,6 +11601,10 @@ Redirect output from F<stdout> to the configured pager.
Show the default configuration and exit.
+=item B<--show-encodings>
+
+Show all known encodings and exit.
+
=item B<-V>, B<--version>
Show version information and exit.
@@ -9789,26 +11628,26 @@ S<Default: C<%s:>.>
=item C<id-heading>=C<0>E<verbar>C<1>
-Choose between printing the matching ids with S<option B<--id>>:
+Choose between printing the matching I<ID>s with S<option B<--id>>:
S<Inline (C<0>)> or heading before the matching data (C<1>).
S<Default: C<0>.>
=item C<id-heading-format>=I<FORMAT>
-Control the I<FORMAT> for printing matching ids in heading-mode,
+Control the I<FORMAT> for printing matching I<ID>s in heading-mode,
where I<FORMAT> is passed to Perl's C<printf>.
S<Default: C<--E<gt> %s E<lt>-->.>
=item C<id-indent>=I<INDENT>
Indentation of nested typog-inspect tags.
-Only used in ``discovery'' mode (first form), i.e., if B<--all> is active.
+Only used in ``discovery mode'' (first form), i.e., if S<B<--all>> is active.
S<Default: 8.>
=item C<id-max-length>=I<MAXIMUM-LENGTH>
-Set the maximum length of a matching id for printing.
-It a matching id exceeds this length it will be truncated
+Set the maximum length of a matching I<ID> for printing.
+It a matching I<ID> exceeds this length it will be truncated
and the last three characters (short of I<MAXIMUM-LENGTH>) will be replaced by dots.
S<Default: 40.>
@@ -9874,11 +11713,11 @@ Color of lines with horizontal S<breakpoints C<@@>>.
=item C<id-color>
-Color of matching ids when printed inline.
+Color of matching I<ID>s when printed inline.
=item C<id-heading-color>
-Color of matching ids when printed in heading form.
+Color of matching I<ID>s when printed in heading form.
=item C<line-break-pass-color>
@@ -9947,15 +11786,93 @@ C<bold>, C<dark>, C<italic>, C<underline>, C<reverse>
=back
+=head2 Some Common Encodings
+
+The following list shows some encodings
+that are suitable for S<option B<--encoding>>.
+
+=over 4
+
+=item Latin-1, Western European
+
+C<iso-8859-1>, C<cp850>, C<cp860>, C<cp1252>
+
+=item Latin-2, Central European
+
+C<iso-8859-2>, C<cp852>, C<cp1250>
+
+=item Latin-3, South European (Esperanto, Maltese)
+
+C<iso-8859-3>
+
+=item Latin-4, North European (Baltics)
+
+C<iso-8859-4>
+
+=item Cyrillics
+
+C<iso-8859-5>, C<cp855>, C<cp866> (Ukrainian), C<cp1251>
+
+=item Arabic
+
+C<iso-8859-6>, C<cp864>, C<cp1006> (Farsi), C<cp1256>
+
+=item Greek
+
+C<iso-8859-7>, C<cp737>, C<cp1253>
+
+=item Hebrew
+
+C<iso-8859-8>, C<cp862>, C<cp1255>
+
+=item Turkish
+
+C<iso-8859-9>, C<cp857>, C<cp1254>
+
+=item Nordic
+
+C<iso-8859-10>, C<cp865>, C<cp861> (Icelandic)
+
+=item Thai
+
+C<iso-8859-11>, C<cp874>
+
+=item Baltic
+
+C<iso-8859-13>, C<cp775>, C<cp1257>
+
+=item Celtic
+
+C<iso-8859-14>
+
+=item Latin-9 (sometimes called Latin0)
+
+C<iso-8859-15>
+
+=item Latin-10
+
+C<iso-8859-16>
+
+=back
+
+
=head1 EXIT STATUS
The exit status is 0 if at least one I<ID> matched I<REGEXP>,
1 if no I<ID> matched I<REGEXP>, and 2 if an error occurred.
+=head1 CAVEATS
+
+The end tag C<< </typog-inspect> >> sometimes gets placed too early in the output and the trace
+I<seems> truncated. However, LaTeX reliably logs the requested the trace information, but the
+write operations for trace data and the code which is used to print the S<end tag> are not
+synchronized.
+
+
=head1 SEE ALSO
-B<grep>(1), B<printf>(3), B<Term::ANSIColor>(pm)
+B<grep>(1), B<printf>(3), B<Encode::Supported>(pm), B<Term::ANSIColor>(pm)
=cut
diff --git a/Master/texmf-dist/source/latex/typog/typog.ins b/Master/texmf-dist/source/latex/typog/typog.ins
index 06378d86bbe..23c8b333664 100644
--- a/Master/texmf-dist/source/latex/typog/typog.ins
+++ b/Master/texmf-dist/source/latex/typog/typog.ins
@@ -1,11 +1,11 @@
%% Copyright (C) 2024 by Ch. L. Spiel
%%
%% This work may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3 of this
+%% of the LaTeX Project Public License, either version 1.3c of this
%% license or (at your option) any later version. The latest version
%% of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3 or later is part of all distributions of LaTeX
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
@@ -23,11 +23,11 @@ This is a generated file.
Copyright (C) 2024 by Ch. L. Spiel
This work may be distributed and/or modified under the conditions
-of the LaTeX Project Public License, either version 1.3 of this
+of the LaTeX Project Public License, either version 1.3c of this
license or (at your option) any later version. The latest version
of this license is in
- http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
+ https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
version 2003/12/01 or later.
This work has the LPPL maintenance status `maintained'.
@@ -37,7 +37,9 @@ The Current Maintainer of this work is Ch. L. Spiel.
This work consists of the files typog.dtx and typog.ins
and the derived files typog.sty, slant-angle.mp,
crooked-paragraphs.mp, smooth-parshapes.mp, title.mp,
-typog-example.tex, typog-nomt.tex, typog-grep.pl,
+typog-example.tex, typog-minimal-test.tex,
+typog-without-microtype-test.tex
+typog-grep.pl.in, typog-grep.pl,
typog-grep.pod, and teximan2latex.sed.
@@ -48,20 +50,22 @@ typog-grep.pod, and teximan2latex.sed.
\generate{\file{typog.sty}{\from{\source}{package}}
\file{typog-example.tex}{\from{\source}{example}}
- \file{typog-nomt.tex}{\from{\source}{nomicrotype}}
- \file{typog.ist}{\from{\source}{index-style}}}
+ \file{typog-minimal-test.tex}{\from{\source}{minimal-test}}
+ \file{typog-without-microtype-test.tex}{\from{\source}{without-microtype}}}
\nopostamble
-\generate{\file{title.mp}{\from{\source}{title}}
+\generate{\file{crooked-paragraphs.mp}{\from{\source}{crookedparagraphs}}
\file{slant-angle.mp}{\from{\source}{slantangle}}
- \file{crooked-paragraphs.mp}{\from{\source}{crookedparagraphs}}
- \file{smooth-parshapes.mp}{\from{\source}{smoothparshapes}}}
+ \file{smooth-parshapes.mp}{\from{\source}{smoothparshapes}}
+ \file{title.mp}{\from{\source}{title}}
+ \file{typog.gst}{\from{\source}{changes-style}}
+ \file{typog.ist}{\from{\source}{index-style}}}
\nopreamble
\generate{\file{teximan2latex.sed}{\from{\source}{teximan2latex}}
- \file{typog-grep.pl}{\from{\source}{typog-grep}}
+ \file{typog-grep.pl.in}{\from{\source}{typog-grep}}
\file{typog-grep.pod}{\from{\source}{typog-grep-documentation}}}
diff --git a/Master/texmf-dist/source/latex/uantwerpendocs/uantwerpendocs.dtx b/Master/texmf-dist/source/latex/uantwerpendocs/uantwerpendocs.dtx
index 141b590a991..acddbf252f9 100644
--- a/Master/texmf-dist/source/latex/uantwerpendocs/uantwerpendocs.dtx
+++ b/Master/texmf-dist/source/latex/uantwerpendocs/uantwerpendocs.dtx
@@ -35,11 +35,11 @@
%<le>\ProvidesClass{uantwerpenletter}
%<ex>\ProvidesClass{uantwerpenexam}
%<bmr>\ProvidesPackage{beamerthemeuantwerpen}
-%<cls|ct|bmt|pt|rp|le|ex|bmr> [2024/04/09 v4.6 .dtx skeleton file]
+%<cls|ct|bmt|pt|rp|le|ex|bmr> [2024/06/04 v4.7 .dtx skeleton file]
%<*driver>
\documentclass[a4paper]{ltxdoc}
-\def\fileversion{4.6}
-\def\filedate{2024/04/09}%
+\def\fileversion{4.7}
+\def\filedate{2024/06/24}%
\usepackage{makeidx}
\usepackage{alltt}
\usepackage{longtable}
@@ -127,6 +127,7 @@
% multiple degree programs for exams and course texts, corrected
% disclaimers, replaced 'basic usage' in documentation by heavily
% commented examples}
+% \changes{v4.7}{2024/06/13}{\@ Minor bugfixes}
%
% \DoNotIndex{\newcommand,\newenvironment,\begin,\bfseries,\draw,\clip,\else,\fi,\if,\fill,\filldraw,\ifthenelse,\ifx,\textwidth,\node,\\,\@empty,\@tempdima,\@tempdimb,\@tempswatrue,\{,\},\ ,\bf,\BODY,\break,\Alph,\and,\define@key,\color,\dx,\dy,\g,\gdef,\hbox,\tiny,\scriptsize,\footnotesize,\small,\normalsize,\large,\Large,\LARGE,\huge,\Huge,\l,\LaTeX,\let,\p@,\relax,\renewcommand,\Requirepackage,\textbf,\textsf,\texttt,\textbackslash,\vspace,\hspace,\hfill,\hskip,\vskip,\hline,\vrule,\typeout,\usebox,\end,\paperheight,\paperwidth,\par,\NewDocumentCommand,\seq}
% \setlength{\parindent}{0em}
@@ -1043,6 +1044,7 @@
\@author
\end{center}
]
+
\kant[11]
\kant[12]
@@ -1216,8 +1218,8 @@
\titlepageimage{Images/uantwerpen-keyboard.jpg}
%% some data about your manuscript
-\isbn{987-90-57285-34-7} %% don't specify this if you don't want one
-\depot{D/2024/12.293/03} %% idem
+%% \isbn{987-90-57285-34-7} %% only secify one if you have obtained one!
+%% \depot{D/2024/12.293/03} %% idem
\begin{document}
@@ -1370,8 +1372,8 @@
\titlepageimage{Images/uantwerpen-keyboard.jpg}
%% some data about your manuscript
-\isbn{987-90-57285-34-7} %% don't specify this if you don't want one
-\depot{D/2024/12.293/03} %% idem
+%% \isbn{987-90-57285-34-7} %% only secify one if you have obtained one!
+%% \depot{D/2024/12.293/03} %% idem
\begin{document}
@@ -4654,8 +4656,8 @@ we-nl-ma-wiftw = Master of Science in wiskunde: financiële en toegepaste wiskun
xshift=1pt]
at (3.5cm,\paperheight-6.4cm)
{\sethlcolor{maincolor}%
- \textsf{\textbf{\reversevideo{\@title}}}\\
- \textsf{\reversevideo{\@subtitle}}};
+ \textsf{\textbf{\reversevideo{\@title}}}%
+ \ifx\@subtitle\empty\else\\\textsf{\reversevideo{\@subtitle}}\fi};
\node
[anchor=north west,font=\LARGE,yshift=-1cm,xshift=-1pt]
at (title.south west)
diff --git a/Master/texmf-dist/source/latex/ulthese/ulthese.dtx b/Master/texmf-dist/source/latex/ulthese/ulthese.dtx
index 0d790808812..58da90e888d 100644
--- a/Master/texmf-dist/source/latex/ulthese/ulthese.dtx
+++ b/Master/texmf-dist/source/latex/ulthese/ulthese.dtx
@@ -1,340 +1,490 @@
-% \iffalse meta-comment
+% \iffalse meta-comment -*- mode: doctex -*-
%
-% Copyright (C) 2021 Universite Laval
+% Thesis class for Universite Laval
+%
+% Copyright (C) 2012-2024 Universite Laval
%
% This file may be distributed and/or modified under the conditions
% of the LaTeX Project Public License, either version 1.3c of this
% license or (at your option) any later version. The latest version
% of this license is in:
%
-% http://www.latex-project.org/lppl.txt
-%
-% and version 1.3c or later is part of all distributions of LaTeX
-% version 2006/05/20 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Universite Laval
-% <ulthese-dev@bibl.ulaval.ca>.
-%
-% This work consists of the files ulthese.dtx and ulthese.ins
-% and the derived files listed in the README.md file.
+% https://www.latex-project.org/lppl.txt
%
+% The Current Maintainer of this work is Vincent Goulet for
+% Universite Laval <ulthese-dev@bibl.ulaval.ca>.
% \fi
%
% \iffalse
%<*dtx>
\ProvidesFile{ulthese.dtx}
%</dtx>
-%<class>\NeedsTeXFormat{LaTeX2e}[2009/09/24]
+%<class>\NeedsTeXFormat{LaTeX2e}[2021/06/01]
%<class>\ProvidesClass{ulthese}%
%<*class>
- [2021/08/09 v5.3a Universite Laval thesis and memoir class]
+ [2024/07/02 v6.0 Thesis class for Universite Laval]
%</class>
%<*driver>
-\documentclass[11pt,english,french]{ltxdoc}
- \usepackage[utf8]{inputenc}
- \usepackage[T1]{fontenc}
- \usepackage{natbib}
+\documentclass[article,oneside,11pt,x11names,english,french]{memoir}
\usepackage{babel}
\usepackage[autolanguage]{numprint}
- \usepackage{microtype}
- \usepackage[scaled=0.92]{helvet}
- \usepackage[scaled=1.02]{inconsolata}
- \usepackage[sc]{mathpazo}
- \usepackage{fontawesome}
+ \usepackage[round,semicolon,authoryear,sectionbib]{natbib}
\usepackage{metalogo}
- \usepackage{tabularx,booktabs,caption}
+ \usepackage{enumitem}
+ \usepackage{relsize}
+ \usepackage{awesomebox}
+
+ %% Le chargement de doc.sty cause des conflits avec memoir. Il faut:
+ %%
+ %% - annuler la définition de l'environnement 'glossary' de memoir;
+ %% - remettre en place les définitions standards des commandes pour
+ %% le glossaire sur lesquelles se base doc.sty (nécessaire aussi
+ %% pour l'index, mais il n'est pas utilisé).
+ \let\theglossary\relax % avoid conflict with doc.sty
+ \let\endtheglossary\relax % avoid conflict with doc.sty
+ \makeatletter
+ \def\makeglossary{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo
+ \def\glossary{\@bsphack\begingroup
+ \@sanitize
+ \@wrglossary}\typeout
+ {Writing glossary file \jobname.glo }%
+ \let\makeglossary\@empty
+ }
+ \@onlypreamble\makeglossary
+ \def\@wrglossary#1{%
+ \protected@write\@glossaryfile{}%
+ {\string\glossaryentry{#1}{\thepage}}%
+ \endgroup
+ \@esphack}
+ \def\glossary{\@bsphack\begingroup\@sanitize\@index}
+ \@twosidefalse\@mparswitchfalse % turn off twoside option
+ \makeatother
+ \usepackage{doc}
+ \def\changes#1#2#3{\glossary{#1>#3}} % simplification
\DisableCrossrefs
\CodelineNumbered
\RecordChanges
- \GlossaryPrologue{\section*{Historique des versions}%
- \addcontentsline{toc}{section}{Historique des versions}}
+ %\OnlyDescription
+ \DontCheckModules
+
+ %% Polices de caractères
+ \iftutex
+ \usepackage[babel=true]{microtype}
+ \usepackage{fontspec}
+ \usepackage{unicode-math}
+ \setmainfont{STIXTwoText}
+ [
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-SemiBold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-SemiBoldItalic,
+ Numbers = {Proportional,OldStyle},
+ Scale = 1,
+ Ligatures = TeX
+ ]
+ \setsecheadstyle{\normalfont\Large\sffamily\bfseries\raggedright}
+ \setsubsecheadstyle{\normalfont\large\sffamily\bfseries\raggedright}
+ \setsubsubsecheadstyle{\normalfont\sffamily\bfseries\raggedright}
+ \else
+ \usepackage[babel=true]{microtype}
+ \usepackage[utf8]{inputenc}
+ \usepackage[T1]{fontenc}
+ \usepackage[stix2]{newtxmath}
+ \fi
+ \usepackage[book,medium,proportional,oldstyle,scale=0.92]{FiraSans}
+ \usepackage[medium,lining,scale=0.90]{FiraMono}
%% Couleurs
\usepackage{xcolor}
- \definecolor{link}{rgb}{0,0.4,0.6} % ~RoyalBlue de dvips
- \definecolor{url}{rgb}{0.6,0,0} % rouge foncé
- \definecolor{citation}{rgb}{0,0.5,0} % vert foncé
-
- %% Liste description alignée à gauche
- \usepackage{enumitem}
- \setlist[description]{leftmargin=*,align=left}
-
- %% Environnement pour remarques
- \usepackage{amsthm}
- \theoremstyle{definition}
- \newtheorem*{rem}{Remarque}
+ \definecolor{link}{rgb}{0,0.4,0.6} % liens internes
+ \definecolor{url}{rgb}{0.6,0,0} % liens externes
+ \definecolor{citation}{rgb}{0,0.5,0} % citations
%% Hyperliens
- \usepackage{hyperref}
- \hypersetup{%
- pdfauthor = {Faculté des études supérieures et postdoctorales},
- pdftitle = {Guide de l'utilisateur de la classe ulthese},
- colorlinks = {true},
- linktocpage = {true},
- urlcolor = {url},
- linkcolor = {link},
- citecolor = {citation},
- pdfpagemode = {UseOutlines},
- pdfstartview = {Fit},
- bookmarksopen = {true},
- bookmarksnumbered = {true},
- bookmarksdepth = {subsubsection}}
- \addto\extrasfrench{%
- \def\appendixautorefname{annexe}%
- \def\tableautorefname{tableau}%
- \def\subsectionautorefname{section}%
+ \AtEndPreamble{%
+ \usepackage{bookmark} % charge hyperref
+ \hypersetup{%
+ pdftitle = {Guide d'utilisation de la classe ulthese},
+ pdfauthor = {Faculté des études supérieures et postdoctorales},
+ colorlinks = {true},
+ urlcolor = {url},
+ linkcolor = {link},
+ citecolor = {citation}}
+ \bookmarksetup{%
+ open = true,
+ depth = 3,
+ numbered = true}
+ \addto\extrasfrench{%
+ \def\subsectionautorefname{section}%
+ }
}
%% Paramétrage de babel
- \frenchbsetup{%
- StandardItemizeEnv=true, % listes standards
+ \frenchsetup{%
+ SmallCapsFigTabCaptions=false, % pas de petites capitales
ThinSpaceInFrenchNumbers=true, % espace fine dans les nombres
og=«, fg=» % « et » sont les guillemets
}
- \def\frenchtablename{{\scshape Tab.}}
+ \renewcommand*\frenchtablename{Tab.}
+ \renewcommand*\frenchfigurename{Fig.}
+ \renewcommand*\generalname{Général} % mot clé du glossaire
+
+ %% Désactiver le niveau des chapitres de memoir
+ \let\chapter\relax
+ \counterwithout{section}{chapter}
+
+ %% Utiliser une numérotation des sections à trois niveaux
+ \setsecnumdepth{subsubsection}
+ \maxsecnumdepth{subsubsection}
+
+ % Les annexes sont des sections, ici. Redéfinir la
+ % commande \appendix comme dans la classe article.
+ \makeatletter
+ \renewcommand*\appendix{\par
+ \setcounter{section}{0}
+ \gdef\thesection{\@Alph\c@section}}
+ \makeatother
+
+ %% Aligner à gauche l'environnement description
+ \setlist[description]{leftmargin=*,align=left}
+
+ %% Configurer le glossaire
+ \addto\extrasfrench{%
+ \def\glossaryname{Historique des versions}}
+ \GlossaryPrologue{\section*{\glossaryname}%
+ \addcontentsline{toc}{section}{\glossaryname}}
+ \setcounter{GlossaryColumns}{2}
+ \setlength{\GlossaryMin}{5cm}
- %% Commandes de mise en forme spéciales
- \newcommand{\class}[1]{\textsf{#1}}
- \newcommand{\pkg}[1]{\textbf{#1}}
+ %% Nouvel environnement de type \DescribeMacro pour les options de
+ %% la classe
+ \NewDocElement[envlike,notoplevel,printtype=\emph{option}]{Option}{option}
- %% Commandes pour les liens vers la documentation
- \newcommand{\link}[2]{\href{#1}{#2~\raisebox{-0.2ex}{\faExternalLink}}}
- \newcommand{\doc}[2][documentation]{\link{#2}{#1}}
+ %% Commandes sémantiques additionnelles
+ \let\class\textsf
+ \let\pkg\textbf
+ \makeatletter
+ \renewcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\code@}
+ \def\code@#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
+ \makeatother
+ \newcommand*\ulthesename{ulthese}
+ \newcommand*\ulclass{\class{\ulthesename}}
+ \newcommand*\btx{\textsc{Bib}\TeX}
- %% Francisation d'un mot clé de l'historique des commandes
- \def\generalname{Général}
+ %% Redéfinir \year pour utiliser l'information de \filedate plutôt
+ %% que la date de compilation
+ \def\parsedate#1/#2/#3\relax{\def\year{#1}}
+
+ %% Convertir la date en format ISO
+ \def\isodate#1/#2/#3\relax{#1-#2-#3}
+
+ \MakeShortVerb{\|}
\begin{document}
\DocInput{ulthese.dtx}
\end{document}
%</driver>
% \fi
-% \CheckSum{914}
% \DoNotIndex{\',\^,\`,\ ,\ae}
% \DoNotIndex{\RequirePackage,\ExecuteOptions,\ProcessOptions}
% \DoNotIndex{\newcommand,\newcommand*}
% \DoNotIndex{\setlength}
+% \changes{6.0}{2024-05-22}{Prise en compte des règles de présentation
+% entrées en vigueur à l'automne 2023 qui n'exigent plus une
+% bibliographie par chapitre pour les thèses et mémoire par
+% intégration d'articles.}
+% \changes{6.0}{2024-05-22}{Suppression des options
+% \texttt{bibchapitre} et \texttt{bibsection}.}
+% \changes{6.0}{2024-07-02}{Ajout du grade de maître en travail
+% social.}
+% \changes{6.0}{2024-07-02}{Retrait du grade de maître en
+% physiothérapie.}
+% \changes{6.0}{2024-05-24}{Utilisation du codage de caractères UTF-8
+% par défaut dans la classe. Modification des gabarits en
+% conséquence.}
+% \changes{6.0}{2024-06-17}{Révision exhaustive de la documentation.}
% \changes{4.4}{2017-05-16}{Prise en charge des bibliographies
-% multiples pour les thèses et mémoires par articles.}
+% multiples pour les thèses et mémoires par articles.}
+% \changes{4.4}{2017-05-15}{Ajout de l'option \texttt{bibchapitre}.}
+% \changes{4.4}{2017-05-15}{Ajout de l'option \texttt{bibsection}.}
% \changes{4.4}{2017-05-16}{Documentation révisée, principalement ce
-% qui touche à la préparation de la bibliographie.}
+% qui touche à la préparation de la bibliographie.}
% \changes{4.3}{2017-03-01}{Nouvelles options pour les titres de
-% docteur en musique, maître en architecture, maître en
-% ergothérapie, maître en physiothérapie et maître en
-% psychoéducation.}
-% \changes{4.3}{2017-03-01}{Modifications à la composition des sigles de
-% grades.}
+% docteur en musique, maître en architecture, maître en ergothérapie,
+% maître en physiothérapie et maître en psychoéducation.}
+% \changes{4.3}{2017-03-01}{Modifications à la composition des sigles
+% de grades.}
% \changes{4.3}{2017-03-01}{Vérification de la compatibilité entre le
-% grade et les options multifacultaire, cotutelle, bidiplomation et
-% extension.}
+% grade et les options \texttt{multifacultaire}, \texttt{cotutelle},
+% \texttt{bidiplomation} et \texttt{extension}.}
% \changes{4.3}{2017-03-01}{Améliorations à la documentation.}
-% \changes{4.2}{2016-03-29}{Ajout de l'option «examen».}
+% \changes{4.2}{2016-03-29}{Ajout de l'option \texttt{examen}.}
% \changes{4.1}{2016-02-13}{Paquetage geometry déclaré incompatible
-% avec la classe.}
-% \changes{4.0}{2015-06-12}{Nouvelles règles de présentation matérielle
-% de la FESP: recto seulement, page frontispice.}
-% \changes{3.1}{2014-05-23}{Prise en charge de la maîtrise en bidiplomation.}
+% avec la classe.}
+% \changes{4.0}{2015-06-12}{Nouvelles règles de présentation
+% matérielle de la FESP: recto seulement, page frontispice.}
+% \changes{3.1}{2014-05-23}{Prise en charge de la maîtrise en
+% bidiplomation.}
% \changes{3.0a}{2014-03-24}{Modifications et corrections à la
-% documentation, notamment relativement à la configuration de natbib.}
+% documentation, notamment relativement à la configuration de
+% \textbf{natbib}.}
% \changes{3.0}{2014-01-06}{Déclaration du grade en option de la
-% classe.}
-% \changes{3.0}{2014-01-06}{Moteur XeLaTeX supporté.}
-% \changes{3.0}{2014-01-06}{Ajout de l'option nobabel.}
+% classe.}
+% \changes{3.0}{2014-01-06}{Moteur {\XeLaTeX} supporté.}
+% \changes{3.0}{2014-01-06}{Ajout de l'option \texttt{nobabel}.}
% \changes{2.1}{2013-01-16}{Utilisation transparente de la police
-% Helvetica pour la page de titre.}
+% Helvetica pour la page de titre.}
% \changes{2.0}{2013-01-13}{Traitement automatique des longs titres.}
% \changes{1.0b}{2012-11-11}{Ajouts et corrections mineures dans la
-% documentation.}
+% documentation.}
% \changes{1.0a}{2012-10-17}{Précisions dans la documentation.}
% \changes{1.0}{2012-09-30}{Version initiale.}
% \GetFileInfo{ulthese.dtx}
-% \title{\class{ulthese}: la classe pour les thèses et mémoires de
-% l'Université Laval\thanks{Ce document décrit la classe
-% \class{ulthese}~\fileversion, datée du \filedate.}}
+%
+% \title{Guide d'utilisation de la classe {\ulclass} \\ pour les thèses et
+% mémoires \\ de l'Université Laval}
% \author{Faculté des études supérieures et postdoctorales\thanks{%
% Cette classe et sa documentation ont été rédigées par Vincent
% Goulet~(Faculté des sciences et de génie) avec la collaboration de
% Koassi D'Almeida~(Faculté des études supérieures et postdoctorales) et
-% de Pierre Lasou~(Bibliothèque).}}
-% \date{}
+% Pierre Lasou~(Bibliothèque).}}
+% \date{Version {\fileversion} du {\expandafter\isodate\filedate\relax}}
% \maketitle
%
% \section{Introduction}
%
-% La classe \class{ulthese} permet de composer avec {\LaTeX} ou
-% {\XeLaTeX} des thèses et mémoires immédiatement conformes aux règles
-% générales de présentation matérielle de la Faculté des études
-% supérieures et postdoctorales (FESP) de l'Université Laval. Ces
-% règles définissent principalement la présentation des pages de titre
-% des thèses et mémoires ainsi que la disposition du texte sur la
-% page. La classe en elle-même est donc relativement simple.
-%
-% Cependant, \class{ulthese} est basée sur la classe \class{memoir}
-% \citep{memoir}, une extension de la classe standard \class{book}
-% facilitant à plusieurs égards la préparation de documents d'allure
-% professionnelle dans {\LaTeX}. La classe \class{memoir} incorpore
-% d'office plus de 30 des paquetages les plus populaires\footnote{%
-% Consulter la section~18.24 de la documentation de \class{memoir}
-% pour la liste ou encore le journal de la compilation (\emph{log})
-% d'un document utilisant la classe \class{ulthese}.}. %
-% L'intégralité des fonctionnalités de \class{memoir} se retrouve donc
-% dans \class{ulthese}.
-%
-% La classe \class{memoir} fait partie des distributions {\LaTeX}
-% modernes; elle devrait donc être installée et disponible sur votre
-% système. Elle est livrée avec une %
-% \doc{http://texdoc.net/pkg/memoir} %
-% exhaustive: le guide de l'utilisateur fait près de 600~pages!
-% N'hésitez pas à vous y référer pour réaliser une mise en page
-% particulière.
-%
-% L'autre compagnon naturel de la présente documentation est
-% \doc[Rédaction avec {\LaTeX}]{http://texdoc.net/pkg/formation-latex-ul} ^^A
-% \citep{formation-latex-ul}, la formation {\LaTeX} de l'Université Laval.
-% Vous y trouverez des informations additionnelles sur l'utilisation des
-% classes \class{ulthese} et \class{memoir}.
+% La classe {\ulclass} permet de composer des thèses et mémoires
+% immédiatement conformes aux règles générales et complémentaires de
+% présentation de la Faculté des études supérieures et postdoctorales
+% (FESP) de l'Université Laval. Ces règles définissent principalement
+% la présentation des pages de titre des thèses et mémoires, ainsi que
+% la disposition du texte sur la page.
+%
+% La composition d'un manuscript avec la classe {\ulclass} requiert une
+% distribution {\TeX} récente et à jour. Nous recommandons les
+% distributions %
+% \href{https://tug.org/texlive}{{\TeX}~Live}~---%
+% ou sa variante pour macOS %
+% \href{https://tug.org/mactex}{Mac{\TeX}}~--- %
+% et %
+% \href{https://miktex.org}{MiK{\TeX}}. %
+% Vous pouvez également avoir recours à une plateforme de rédaction en
+% ligne comme %
+% \href{https://overleaf.com}{Overleaf}; %
+% leurs distributions {\TeX} satisfont généralement les conditions
+% ci-dessus.
+%
+% La classe {\ulclass} fait partie des distributions {\TeX} standards via
+% le paquetage %
+% \href{https://ctan.org/pkg/ulthese}{\pkg{ulthese}}. %
+% Dans la mesure où votre distribution est
+% à jour, vous devriez pouvoir l'utiliser sans autre intervention.
+%
+% Le compagnon naturel de la présente documentation est \emph{Rédaction
+% avec {\LaTeX}}, la formation {\LaTeX} de l'Université Laval. Vous y
+% trouverez sans doute une foule d'informations utiles pour la
+% préparation de votre thèse ou de votre mémoire. L'ouvrage fait
+% lui aussi partie des distributions {\TeX} standards, via le
+% paquetage %
+% \href{https://ctan.org/pkg/formation-latex-ul}{\pkg{formation-latex-ul}}. %
%
% \section{Démarrage rapide (pour les impatients)}
% \label{sec:utilisation:rapide}
%
-% La classe est livrée avec les distributions {\TeX}~Live, Mac{\TeX} et
-% MiK{\TeX}. Si vous utilisez l'une ou l'autre de ces distributions et
-% qu'elle est à jour\footnote{%
-% Validez à l'aide de l'assistant de mise à jour de votre
-% distribution.}, %
-% vous devriez pouvoir utiliser \class{ulthese} sans autre
-% intervention.
-%
-% Il est recommandé de segmenter tout document d'une certaine ampleur
-% dans des fichiers |.tex| distincts pour chaque partie ---
-% habituellement un fichier par chapitre. Le document complet est alors
-% composé à l'aide d'un fichier maître qui contient le préambule
-% {\LaTeX} et un ensemble de commandes \cmd{\include} pour réunir les
-% parties dans un tout.
+% La classe {\ulclass} est livrée avec un ensemble de gabarits sur
+% lesquels se baser pour le document maître de divers types de thèses
+% et de mémoires (standard, par articles, en cotutelle, en
+% bidiplomation), ainsi que pour les parties les plus usuelles
+% (résumés français et anglais, remerciements, avant-propos,
+% introduction, chapitres, conclusion, annexe). Les noms des fichiers
+% devraient permettre de facilement identifier leur contenu. Dans la
+% distribution {\TeX}~Live, les gabarits sont classés avec la
+% documentation.
%
-% La classe \class{ulthese} est livrée avec un ensemble de gabarits sur
-% lesquels se baser pour:
-% \begin{itemize}
-% \item le document maître de divers types de thèses et de mémoires
-% (standard, par articles, en cotutelle, en bidiplomation);
-% \item les fichiers des parties les plus usuelles (résumés français
-% et anglais, avant-propos, introduction, chapitres, conclusion,
-% etc.).
-% \end{itemize}
-% Les noms des fichiers devraient permettre de facilement identifier
-% leur contenu (c'est là une bonne pratique: le nom |rappels.tex|
-% parle de lui-même et résiste mieux aux changements à l'ordre des
-% chapitres que |chapitre1.tex|).
+% Pour débuter rapidement la rédaction de votre manuscrit, copiez les
+% gabarits appropriés dans votre dossier de travail et suivez les
+% directives qui s'y trouvent. Nous recommandons de compiler votre
+% manuscript avec {\XeLaTeX}.
%
-% Dans {\TeX}~Live, les gabarits sont classés avec la documentation de
-% la classe. Pour les utiliser, copiez les fichiers appropriés dans votre
-% dossier de travail.
+% La classe utilise le codage de caractères
+% \href{https://fr.wikipedia.org/wiki/UTF-8}{UTF-8}. Vous devez donc
+% obligatoirement utiliser ce type codage quand un fichier contient
+% des caractères non-ASCII (comme des lettres accentuées).
%
-% Pour débuter la rédaction, renommez le gabarit de document maître
-% approprié d'après votre numéro de dossier. Par exemple, l'étudiante
-% dont le numéro de dossier est 111555555 et qui entame la rédaction
-% d'une thèse par articles renommera le fichier
-% \begin{quote}
-% |gabarit-doctorat-articles.tex|
-% \end{quote}
-% en
-% \begin{quote}
-% |111555555.tex|.
-% \end{quote}
+% Le reste de ce guide contient les informations détaillées sur les
+% caractéristiques et fonctionnalités de la classe.
%
-% Les gabarits comportent des commentaires succincts pour vous guider
-% dans la préparation de votre document. La \autoref{sec:gabarits}
-% fournit les informations détaillées.
+% \changes{5.3a}{2021-08-09}{Ajout à la documentation de la
+% disponibilité d'une archive pour les personnes qui ne disposent pas
+% d'une installation de {\TeX} locale.}
+% \tipbox{Si vous n'avez pas accès aux gabarits parce qu'ils ne sont
+% pas inclus dans votre distribution ou parce que vous utilisez une
+% plateforme de rédaction en ligne, poursuivez votre lecture à la
+% \autoref{sec:installation}.}
%
% \section{Installation}
+% \label{sec:installation}
%
-% Cette section explique comment installer la classe \class{ulthese}
+% Cette section explique comment installer la classe {\ulclass}
% si elle n'est pas disponible sur votre système ou si la version
% n'est pas à jour.
%
-% La classe est distribuée sous forme d'une archive |ulthese.zip| via
-% le réseau de sites \emph{Comprehensive {\TeX} Archive Network} (CTAN):
+% La classe {\ulclass} est distribuée dans le paquetage %
+% \href{https://ctan.org/pkg/ulthese}{\pkg{ulthese}} %
+% via le réseau de sites \emph{Comprehensive {\TeX} Archive Network}
+% (CTAN). Celui-ci fait partie des distributions {\TeX} standards telles
+% que {TeX}~Live, Mac{\TeX} et MiK{\TeX}. Nous recommandons fortement
+% d'installer ou de mettre à jour \pkg{ulthese} à l'aide du
+% gestionnaire de paquetages de votre distribution {\TeX}. Par
+% exemple, avec {\TeX}~Live, vous pouvez effectuer ces opérations dans
+% l'assistant graphique, ou encore avec l'une ou l'autre des commandes
+% ci-dessous:
% \begin{quote}
-% \url{https://www.ctan.org/pkg/ulthese}
+% \code{tlmgr install ulthese}
+% \end{quote}
+% ou
+% \begin{quote}
+% \code{tlmgr update ulthese}
% \end{quote}
%
-% L'installation de la classe consiste à créer le fichier
-% |ulthese.cls| et les gabarits |.tex| à partir du code source
-% documenté se trouvant dans le fichier |ulthese.dtx|. Il est
-% recommandé de simplement créer ces fichiers dans le dossier de
-% travail de la thèse ou du mémoire.
-%
-% Pour procéder à l'installation, décompressez l'archive |ulthese.zip|
-% dans votre dossier de travail, puis compilez avec {\LaTeX} le fichier
-% |ulthese.ins| en exécutant la commande suivante depuis une invite
-% de commande:
+% S'il vous est impossible d'installer des paquetages ou de mettre à
+% jour la distribution {\TeX}~--- notamment si vous utilisez une
+% plateforme de rédaction en ligne~--- vous pouvez procéder à une
+% installation simplifiée de la classe dont la portée sera limitée à
+% votre projet. Pour ce faire, téléchargez l'archive %
% \begin{quote}
-% |latex ulthese.ins|
+% \code{ulthese-installation-projet.zip}
% \end{quote}
-% Vous pouvez aussi ouvrir le fichier |ulthese.ins| dans votre éditeur
-% de texte favori et lancer depuis celui-ci la compilation avec
-% {\LaTeX}, pdf{\LaTeX}, {\XeLaTeX} ou un autre moteur {\TeX}.
+% depuis le
+% \href{https://gitlab.com/vigou3/ulthese/-/releases}{dépôt du projet ulthese}
+% et décompressez celle-ci dans le répertoire de votre document. Vous
+% disposerez alors de tous les fichiers essentiels de la classe à
+% l'intérieur de ce projet.
%
-% \changes{5.3a}{2021-08-09}{Ajout à la documentation de la
-% disponibilité d'une archive pour les personnes qui ne disposent
-% pas d'une installation de {\TeX} locale.}
-% \begin{rem}
-% Si vous ne disposez pas d'une version de {\TeX} sur votre poste de
-% travail --- vraisemblablement parce que vous utilisez une
-% plateforme de rédaction en ligne --- téléchargez
-% l'archive |ulthese-sans-tex-local.zip| depuis le
-% \link{https://gitlab.com/vigou3/ulthese/-/releases}{dépôt du
-% projet}. Celle-ci contient tous les fichiers
-% normalement créés lors de l'installation de la classe.
-% \end{rem}
+% Si votre expertise {\TeX} vous pousse à préférer une installation
+% manuelle avec accès à l'intégralité du code source de la classe,
+% consultez les instructions qui se trouvent dans le fichier
+% \code{README.md} du paquetage.
%
% \section{Utilisation}
+% \label{sec:utilisation}
+%
+% La classe {\ulclass} est basée sur la classe %
+% \href{https://ctan.org/pkg/memoir}{\class{memoir}}, %
+% une extension de la classe standard \class{book} facilitant à
+% plusieurs égards la préparation de documents d'allure
+% professionnelle dans {\LaTeX}. L'intégralité des fonctionnalités de
+% \class{memoir} se retrouve donc dans {\ulclass}.
+%
+% La classe \class{memoir} fait partie des distributions {\TeX}
+% récentes; elle devrait donc être installée et disponible sur votre
+% système. La classe est livrée avec une documentation exhaustive: le
+% guide de l'utilisateur fait près de 600~pages! N'hésitez pas à vous
+% y référer pour réaliser une mise en page particulière.
+%
+% La classe {\ulclass} est compatible avec le moteur pdf{\LaTeX}.
+% Cependant, pour faciliter la gestion du codage des fichiers et des
+% polices de caractères, nous recommandons de compiler votre
+% manuscript avec le plus moderne moteur {\XeLaTeX}.
+%
+% \subsection{Gabarits}
+% \label{sec:utilisation:gabarits}
+%
+% La classe est livrée avec un ensemble de gabarits sur lesquels vous
+% baser pour:
+% \begin{itemize}
+% \item le document maître de divers types de thèses et de mémoires
+% (standard, par articles, en cotutelle, en bidiplomation);
+% \item les fichiers des parties les plus usuelles (résumés français
+% et anglais, remerciements, avant-propos, introduction, chapitres,
+% conclusion, annexe).
+% \end{itemize}
+% Vous pourriez devoir combiner les caractéristiques de deux gabarits
+% de document maître, par exemple pour une thèse en cotutelle par
+% articles.
+%
+% Les gabarits vous incitent à adopter le mode d'organisation des
+% fichiers de tout document d'une certaine ampleur, soit: un fichier
+% |.tex| par partie; un fichier maître contenant le préambule {\LaTeX}
+% et un ensemble de commandes \cmdprint{\include} pour réunir les
+% parties dans un tout.
+%
+% Si vous utilisez la version de la classe fournie avec votre
+% distribution {\TeX}, les gabarits peuvent être classés avec la
+% documentation (c'est le cas dans {\TeX}~Live). Si vous avez plutôt
+% effectué une installation locale de la classe, ou si vous l'avez
+% installée manuellement, les gabarits se trouvent dans votre
+% dossier de travail.
%
-% La classe est compatible avec les moteurs {\LaTeX} traditionnels
-% ainsi qu'avec le plus récent moteur {\XeLaTeX}.
+% Nous recommandons fortement de rédiger votre manuscript à partir des
+% gabarits. Il peut aussi s'avérer utile de suivre un gabarit en lisant
+% la présente section.
+%
+% \tipbox{Il n'y a pas de gabarit spécifique pour un examen de
+% doctorat, pour un essai de maîtrise, pour un projet de recherche ou
+% pour un rapport de stage. Utilisez un gabarit de thèse ou de
+% maîtrise avec l'une ou l'autre des options |examen|, |essai|,
+% |projet| ou |stage|.}
+%
+% \changes{6.0}{2024-05-24}{Documentation: nouvelle section sur le
+% codage de caractères du code source.}
+% \subsection{Codage de caractères du code source}
+% \label{sec:utilisation:codage}
+%
+% La classe utilise le codage de caractères
+% \href{https://fr.wikipedia.org/wiki/UTF-8}{UTF-8}
+% tant avec pdf{\LaTeX} qu'avec {\XeLaTeX}. Les fichiers
+% contenant du texte avec des accents ou tout autre symbole non-ASCII
+% doivent donc obligatoirement être enregistrés dans ce codage de
+% caractères\footnote{%
+% L'UTF-8 n'étant pas le codage par défaut sous Windows, portez une
+% attention toute particulière à ce point si vous utilisez ce système
+% d'exploitation.}.
+%
+% \subsection{Déclaration de la classe et options}
+% \label{sec:utilisation:options}
%
% On charge la classe avec la commande
% \begin{quote}
-% |\documentclass|\oarg{options}|{ulthese}|
+% |\documentclass|\oarg{options}|{ulthese}|
% \end{quote}
% Les marges, l'interligne et la numérotation des pages sont adaptées
-% aux règles de présentation matérielle de la FESP. Les sections
-% suivantes décrivent les options et les commandes définies par la
-% classe.
+% aux règles de présentation de la FESP. La classe ne crée pas de page
+% de titre par défaut\footnote{%
+% Depuis la version 5.0 de la classe.}, %
+% sa production étant prise en charge par la FESP pour les thèses et
+% les mémoires. Si vous utilisez la classe pour un document qui
+% nécessite une page de titre, un examen de doctorat, un essai de
+% maitre
%
% \changes{5.0}{2018-04-24}{La classe ne crée plus de page de titre
-% suite à une nouvelle directive de la FESP.}
-% \begin{rem}
-% Depuis la version 5.0, la classe ne crée plus de page de titre
-% par défaut, sa production étant désormais prise en charge par la
-% FESP. Néanmoins, les fonctionnalités de composition d'une page
-% de titre demeurent disponibles dans la classe. Les commandes
-% pertinentes sont regroupées à l'\autoref{sec:pagetitre}.
-% \end{rem}
-%
-% \subsection{Options de la classe}
-% \label{sec:utilisation:options}
+% suite à une nouvelle directive de la FESP.}
+% \tipbox{Les fonctionnalités de composition d'une page de titre
+% demeurent disponibles dans la classe. Si votre document en nécessite
+% une, consultez l'\autoref{sec:pagetitre}.}
%
% Cette section passe en revue les \meta{options} que l'on peut
% spécifier au chargement de la classe. Les commandes mentionnées
% ci-dessous font quant à elles l'objet de la
% \autoref{sec:utilisation:commandes}.
%
-% \begin{DescribeMacro}{PhD,MSc,MA, ...}
-% Identifie le type de grade; consulter le \autoref{tab:grades} pour
-% la liste complète des options et les grades correspondants. La
-% déclaration d'un type de grade est obligatoire, sauf en cas de
-% l'utilisation de l'option |projet| (voir ci-dessous).
-% \end{DescribeMacro}
+% \begin{DescribeOption}{PhD,MSc,MA, ...}
+% Les options telles que |PhD|, |MSc| ou |MA| identifient le type de
+% grade; le \autoref{tab:grades} fournit la liste complète des
+% options et les grades correspondants. La déclaration d'un type de
+% grade est obligatoire, sauf en cas de l'utilisation de l'option
+% |projet| (voir ci-dessous).
+% \end{DescribeOption}
%
% \begin{table}[t]
% \centering
% \caption{Options de la classe pour la déclaration du grade et libellés
% correspondants}
% \label{tab:grades}
-% \begin{tabularx}{0.85\linewidth}{lX}
+% \begin{tabularx}{0.9\linewidth}{l>{\raggedright\arraybackslash}X}
% \toprule
% Option & Nom du grade (sigle) \\
% \midrule
@@ -355,145 +505,138 @@
% |MArch|
% & Maître en architecture
% (M.~Arch.) \\
-% |MA|
-% & Maître ès arts (M.A.) \\
% |LLM|
% & Maître en droit (LL.~M.) \\
% |MErg|
% & Maître en ergothérapie (M.~Erg.) \\
% |MMus|
% & Maître en musique (M.~Mus.) \\
-% |MPht|
-% & Maître en physiothérapie (M.~Pht.) \\
-% |MSc|
-% & Maître ès sciences (M.~Sc.) \\
+% |MPsEd|
+% & Maître en psychoéducation (M.~Ps.~éd.) \\
% |MScGeogr|
% & Maître en sciences géographiques (M.~Sc.~géogr.) \\
% |MServSoc|
% & Maître en service social (M.~Serv.~soc.) \\
-% |MPsEd|
-% & Maître en psychoéducation (M.~Ps.~éd.) \\
+% |MTravSoc|
+% & Maître en travail social (M.~Trav.~soc.) \\
+% |MA|
+% & Maître ès arts (M.A.) \\
+% |MSc|
+% & Maître ès sciences (M.~Sc.) \\
% \bottomrule
% \end{tabularx}
% \end{table}
%
-% \begin{DescribeMacro}{cotutelle}
-% Identifie une thèse effectuée en cotutelle avec une autre
-% université. Valide uniquement avec un grade de doctorat.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{bidiplomation}
-% Identifie un mémoire effectué en bidiplomation avec une autre
-% université. Valide uniquement avec un grade de maîtrise.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{examen}
-% Identifie un examen de doctorat. Cette option permet d'utiliser la
-% classe pour la rédaction d'un examen de doctorat respectant les
-% règles de présentation matérielle de la FESP. Elle a pour effet de
-% changer l'appellation «Thèse» sur la page de titre pour «Examen
-% de doctorat». Elle supprime également la page frontispice.
+% \begin{DescribeOption}{cotutelle}
+% L'option |cotutelle| identifie une thèse effectuée en cotutelle
+% avec une autre université. Valide uniquement avec un grade de
+% doctorat.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{bidiplomation}
+% L'option |bidiplomation| identifie un mémoire effectué en
+% bidiplomation avec une autre université. Valide uniquement avec un
+% grade de maîtrise.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{examen}
+% L'option |examen| identifie un examen de doctorat. Elle permet
+% d'utiliser la classe pour la rédaction d'un examen de doctorat
+% respectant les règles de présentation de la FESP. L'option a pour
+% effet de changer l'appellation «Thèse» sur la page de titre pour
+% «Examen de doctorat». Elle supprime également la page frontispice.
% L'option n'est compatible qu'avec l'une des options de grade de
% doctorat.
-% \end{DescribeMacro}
-%
-% \changes{5.0}{2018-05-09}{Ajout d'une option «essai» pour les
-% maîtrises analogue à «examen» pour les doctorats.}
-% \changes{5.2}{2019-05-06}{L'option «essai» n'empêche plus
-% l'utilisation d'une page frontispice.}
-% \begin{DescribeMacro}{essai}
-% Identifie un essai de maîtrise. Cette option permet d'utiliser la
-% classe pour la rédaction d'un essai de maîtrise respectant les
-% règles de présentation matérielle de la FESP. Elle a pour effet de
-% changer l'appellation «Maîtrise» sur la page de titre pour
-% «Essai». L'option n'est compatible qu'avec l'une des options de
+% \end{DescribeOption}
+%
+% \changes{5.0}{2018-05-09}{Ajout d'une option \texttt{essai} pour les
+% maîtrises analogue à \texttt{examen} pour les doctorats.}
+% \changes{5.2}{2019-05-06}{L'option \texttt{essai} n'empêche plus
+% l'utilisation d'une page frontispice.}
+% \begin{DescribeOption}{essai}
+% L'option |essai| identifie un essai de maîtrise. Elle permet
+% d'utiliser la classe pour la rédaction d'un essai de maîtrise
+% respectant les règles de présentation de la FESP. L'option a pour
+% effet de changer l'appellation «Maîtrise» sur la page de titre
+% pour «Essai». Elle n'est compatible qu'avec l'une des options de
% grade de maîtrise. Pour un essai de maîtrise, l'utilisation
% simultanée de l'option |article| de la classe \class{memoir} peut
% s'avérer tout indiquée.
-% \end{DescribeMacro}
-%
-% \changes{5.2}{2019-05-06}{Ajout d'une option «projet» pour les
-% cours de projet de recherche.}
-% \begin{DescribeMacro}{projet}
-% Identifie un projet de recherche. Cette option permet d'utiliser
-% la classe pour la rédaction d'un rapport de projet de recherche
-% respectant les règles de présentation matérielle de la FESP. Elle
-% a pour effet d'inscrire l'appellation «Projet de recherche» sur la
-% page de titre et de supprimer la mention du grade. L'utilisation
-% de cette option rend d'ailleurs non obligatoire la déclaration de
-% grade qui, si elle est présente, est simplement ignorée. Comme
-% pour un essai de maîtrise, l'utilisation simultanée de l'option
-% |article| de la classe \class{memoir} peut s'avérer tout indiquée
-% avec les cette option.
-% \end{DescribeMacro}
-%
-% \changes{5.3}{2019-11-29}{Ajout d'une option «stage» pour les
-% rapports de stage.}
-% \begin{DescribeMacro}{stage}
-% Identifie un rapport de stage. L'effet de cette option est
-% identique à celui de l'option |projet| à deux exceptions près:
-% l'inscription sur la page de titre est «Rapport de stage» et la
-% page frontispice est supprimée.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{10pt,11pt,12pt}
-% Sélectionne une taille de police de 10, 11 ou 12~points. Par
-% défaut la classe utilise une police de 11~points. Ces options
-% n'ont aucun effet sur la taille des polices des pages de titre.
-% \end{DescribeMacro}
-%
-% \changes{4.4}{2017-05-15}{Ajout de l'option bibchapitre.}
-% \changes{4.4}{2017-05-15}{Ajout de l'option bibsection.}
-% \begin{DescribeMacro}{bibchapitre}
-% \begin{DescribeMacro}{bibsection}
-% Permettent de composer une bibliographie distincte après chaque
-% fichier inséré dans le document avec \cmd{\include},
-% habituellement un chapitre; voir la
-% \autoref{sec:bibliographie:multiples}. Ces options sont
-% principalement utiles pour les thèses et mémoires par articles.
-% La bibliographie se présente sous la forme d'un chapitre non
-% numéroté avec |bibchapitre|, et sous la forme d'une section
-% numérotée avec |bibsection|.
-% \end{DescribeMacro}
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{nonatbib}
-% Empêche le chargement du paquetage \pkg{natbib}. La paquetage est
-% normalement chargé par la classe; voir la
+% \end{DescribeOption}
+%
+% \changes{5.2}{2019-05-06}{Ajout d'une option \texttt{projet} pour
+% les cours de projet de recherche.}
+% \begin{DescribeOption}{projet}
+% L'option |projet| identifie un projet de recherche. Elle permet
+% d'utiliser la classe pour la rédaction d'un rapport de projet de
+% recherche respectant les règles de présentation de la FESP.
+% L'option a pour effet d'inscrire l'appellation «Projet de
+% recherche» sur la page de titre et de supprimer la mention du
+% grade. Son utilisation rend d'ailleurs non obligatoire la
+% déclaration de grade qui, si elle est présente, est simplement
+% ignorée. Comme pour un essai de maîtrise, l'utilisation simultanée
+% de l'option |article| de la classe \class{memoir} peut s'avérer
+% tout indiquée avec cette option.
+% \end{DescribeOption}
+%
+% \changes{5.3}{2019-11-29}{Ajout d'une option \texttt{stage} pour les
+% rapports de stage.}
+% \begin{DescribeOption}{stage}
+% L'option |stage| identifie un rapport de stage. L'effet de cette
+% option est identique à celui de l'option |projet| à deux
+% exceptions près: l'inscription sur la page de titre est «Rapport
+% de stage» et la page frontispice est supprimée.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{10pt,11pt,12pt}
+% Les options |10pt|, |11pt| et |12pt| sélectionnent une taille de
+% police de 10, 11 ou 12~points. Par défaut la classe utilise une
+% police de 11~points. Ces options n'ont aucun effet sur la taille
+% des polices des pages de titre.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{nonatbib}
+% L'option |nonatbib| empêche le chargement du paquetage %
+% \href{https://ctan.org/pkg/natbib}{\pkg{natbib}}. %
+% Celui-ci est normalement chargé par la classe; voir la
% \autoref{sec:bibliographie}. L'option |nonatbib| permet d'empêcher
-% le chargement pour modifier les options du paquetage ou en cas de
-% conflit avec un autre paquetage de mise en forme de la
-% bibliographie.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{nobabel}
-% Empêche le chargement du paquetage \pkg{babel}. La classe utilise
-% par défaut ce paquetage pour le traitement des langues dans le
-% document; voir la \autoref{sec:langues}. L'option |nobabel| permet
-% d'empêcher son chargement si un autre paquetage devait être
-% utilisé --- on pense ici principalement à \pkg{polyglossia} pour
-% un document produit avec le moteur {\XeLaTeX}.
-% \end{DescribeMacro}
-%
-% \changes{5.1}{2018-09-30}{Ajout de l'option nohyperref.}
-% \begin{DescribeMacro}{nohyperref}
-% Empêche le chargement du paquetage \pkg{hyperref}. L'interaction
-% de ce paquetage avec les autres est parfois --- voire souvent ---
-% délicate. La classe se charge de le charger en tout dernier tel
-% que généralement recommandé. L'option |nohyperref| permet
-% d'empêcher son chargement s'il est absolument nécessaire de
+% son chargement pour vous permettre de modifier les options du
+% paquetage ou en cas de conflit avec un autre paquetage de mise en
+% forme de la bibliographie.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{nobabel}
+% L'option |nobabel| empêche le chargement du paquetage %
+% \href{https://ctan.org/pkg/babel}{\pkg{babel}}. %
+% La classe utilise par défaut ce paquetage pour le traitement des
+% langues dans le document; voir la \autoref{sec:langues}. L'option
+% |nobabel| permet d'empêcher son chargement si un autre paquetage
+% devait être utilisé~--- on pense ici principalement à %
+% \href{https://ctan.org/pkg/polyglossia}{\pkg{polyglossia}} %
+% pour un document produit avec le moteur {\XeLaTeX}.
+% \end{DescribeOption}
+%
+% \changes{5.1}{2018-09-30}{Ajout de l'option \texttt{nohyperref}.}
+% \begin{DescribeOption}{nohyperref}
+% L'option |nohyperref| empêche le chargement du paquetage %
+% \href{https://ctan.org/pkg/hyperref}{\pkg{hyperref}}. %
+% L'interaction de ce paquetage avec les autres est parfois~---
+% voire souvent~--- délicate. La classe tâche de le charger en tout
+% dernier, tel que généralement recommandé. L'option |nohyperref|
+% permet d'empêcher son chargement s'il est absolument nécessaire de
% charger d'autres paquetages avant \pkg{hyperref}. Si vous utilisez
% cette option, vous devez obligatoirement charger \pkg{hyperref}
% dans le préambule du document.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{english, french, ...}
-% Déclare les langues utilisées dans le document. Ces options sont
-% transférées au paquetage \pkg{babel} (dans la mesure où |nobabel|
-% n'est pas spécifié, bien entendu). Le libellé des langues devrait
-% donc correspondre aux options de \pkg{babel}. La dernière langue
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{english, french, ...}
+% Les options telles que |english|, |french| ou autres déclarent les
+% langues utilisées dans le document. Ces options sont transférées
+% au paquetage \pkg{babel} (dans la mesure où |nobabel| n'est pas
+% spécifié, bien entendu). Le libellé des langues devrait donc
+% correspondre aux options de \pkg{babel}. La dernière langue
% spécifiée est la langue active par défaut dans le document.
-% \end{DescribeMacro}
+% \end{DescribeOption}
%
% Toute autre option sera passée à la classe \class{memoir} dont,
% entre autres, le format du papier. Le format lettre nord-américain
@@ -505,14 +648,14 @@
% \subsection{Commandes de la classe}
% \label{sec:utilisation:commandes}
%
-% La classe \class{ulthese} définit quelques nouvelles commandes
+% La classe {\ulclass} définit quelques nouvelles commandes
% servant principalement à créer la page frontispice et des éléments
% des pages liminaires. Le sommaire des commandes se trouve dans le
% \autoref{tab:commandes} et les descriptions détaillées, ci-dessous.
%
% \begin{table}[t]
% \centering
-% \caption{Sommaire des commandes de la classe \class{ulthese}.
+% \caption{Sommaire des commandes de la classe {\ulclass}.
% Celles marquées d'une étoile $^\star$ sont obligatoires.}
% \label{tab:commandes}
% \begin{tabularx}{\linewidth}{lX}
@@ -533,12 +676,13 @@
% \end{table}
%
% \begin{DescribeMacro}{\titre}
-% Titre principal de la thèse ou du mémoire. Ne pas utiliser la
-% commande \cmd{\title} de {\LaTeX} pour ce faire.
+% La commande \cmdprint{\titre} sert à spécifier le titre principal
+% du manuscrit. Vous ne devez pas utiliser la commande \cmd{\title}
+% de {\LaTeX} pour ce faire.
%
-% Vous devez couper manuellement avec |\\| ou \cmd{\newline} un
-% titre très long. Par exemple, la déclaration d'un titre d'une
-% seule ligne est:
+% Coupez manuellement avec {\bs\bs} ou \cmd{\newline} un titre très
+% long. Par exemple, la déclaration d'un titre d'une seule ligne
+% est:
% \begin{quote}
% |\titre{Ceci est un titre d'une seule ligne}|
% \end{quote}
@@ -550,48 +694,51 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\soustitre}
-% Sous-titre de la thèse ou du mémoire, le cas échéant. Les remarques
-% sur un long titre principal s'appliquent également au sous-titre.
+% La commande \cmdprint{\soustitre} sert à spécifier le sous-titre
+% du manuscrit, le cas échéant. Les remarques sur un long titre
+% principal s'appliquent également au sous-titre.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\auteur}
-% Nom complet de l'auteur de la thèse ou du mémoire, sous la forme
-% |Prénom Nom| avec seulement des majuscules initiales. Ne pas
-% utiliser la commande \cmd{\author} de {\LaTeX} pour le nom de
-% l'auteur.
+% La commande \cmdprint{\auteur} permet de saisir le nom complet de
+% l'auteur de la thèse ou du mémoire, sous la forme |Prénom Nom|
+% avec seulement des majuscules initiales. N'utilisez pas la
+% commande \cmd{\author} de {\LaTeX} pour le nom de l'auteur.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\programme}
-% Nom complet officiel du programme d'études comme «Doctorat en
-% informatique» ou «Maîtrise en mathématiques». Si le programme
-% comporte une majeure, séparer sa mention de celle du programme
-% principal par un tiret demi-quadratin (obtenu avec |--|).
+% La commande \cmdprint{\programme} sert à spécifier le nom complet
+% officiel du programme d'études comme «Doctorat en informatique» ou
+% «Maîtrise en mathématiques». Si le programme comporte une majeure,
+% séparez sa mention de celle du programme principal par un tiret
+% demi-quadratin (obtenu avec |--|).
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\direction}
-% Nom complet du directeur ou de la directrice de recherche, sous la
-% forme |Prénom Nom| avec seulement des majuscules initiales, suivi
-% d'une virgule et de la mention «directeur de recherche» ou
-% «directrice de recherche».
+% La commande \cmdprint{\direction} sert à spécifier le nom complet
+% du directeur ou de la directrice de recherche, sous la forme
+% |Prénom Nom| avec seulement des majuscules initiales, suivi d'une
+% virgule et de la mention «directeur de recherche» ou «directrice
+% de recherche».
%
% Les thèses en cotutelle comportent un directeur ou une directrice
% de recherche et un directeur ou une directrice de cotutelle.
-% Séparer chaque mention par |\\|, comme ceci:
+% Séparez chaque mention par {\bs\bs}, comme ceci:
% \begin{quote}
% |\direction{Prénom Nom, directrice de recherche \\| \\
% | Prénom Nom, directeur de cotutelle}|
% \end{quote}
%
% De même, les maîtrises en bidiplomation comptent deux directeurs
-% ou directrices de recherche. Séparer chaque mention tel que
+% ou directrices de recherche. Séparez chaque mention tel que
% mentionné ci-dessus.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\codirection}
-% Comme la commande \cmd{\direction}, mais pour le ou les
-% codirecteurs de recherche, s'il y a lieu. Lorsqu'il y a plus d'un
-% codirecteur de recherche, séparer chaque mention par |\\|, comme
-% ceci:
+% La commande \cmdprint{\codirection} joue le même rôle que la
+% commande \cmdprint{\direction}, mais pour le ou les codirecteurs
+% de recherche, s'il y a lieu. Lorsqu'il y a plus d'un codirecteur
+% de recherche, séparez chaque mention par {\bs\bs}, comme ceci:
% \begin{quote}
% |\codirection{Prénom Nom, directrice de recherche \\| \\
% | Prénom Nom, directeur de recherche}|
@@ -599,27 +746,30 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\frontispice}
-% Création de la page frontispice. De toutes les commandes
-% ci-dessus, c'est la seule qui doit se trouver dans le corps du
-% document plutôt que dans le préambule.
+% La commande \cmdprint{\frontispice} crée la page frontispice à
+% l'endroit où elle apparait dans le code source. De toutes les
+% commandes ci-dessus, c'est la seule qui doit se trouver dans le
+% corps du document plutôt que dans le préambule.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\dedicace}
-% Ajout d'une dédicace («À mes parents», «À Camille») à la thèse ou
-% au mémoire. La dédicace est disposée seule sur une page liminaire,
-% à une dizaine de lignes de la marge du haut et alignée à droite.
-% Par défaut, elle est composée en italique.
+% La commande \cmdprint{\dedicace} permet d'insérer une dédicace («À
+% mes parents», «À Camille») à l'endroit où elle apparait dans le
+% code source. La dédicace est disposée seule sur une page
+% liminaire, à une dizaine de lignes de la marge du haut et alignée
+% à droite. Par défaut, elle est composée en italique.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\epigraphe}
-% Ajout d'une épigraphe au début du document. Comme la dédicace,
-% l'épigraphe est disposée seule sur une page liminaire, à une
-% dizaine de lignes de la marge du haut et alignée à droite. La
-% commande accepte deux arguments, soit le texte de la citation et
-% son auteur ou la source, dans l'ordre.
-%
-% Pour ajouter une épigraphe au début d'un ou plusieurs chapitres,
-% utiliser directement la commande \cmd{\epigraph} de
+% La commande \cmdprint{\epigraphe} permet d'insérer une épigraphe
+% au début du document. Comme la dédicace, l'épigraphe est disposée
+% seule sur une page liminaire, à une dizaine de lignes de la marge
+% du haut et alignée à droite. La commande accepte deux arguments,
+% soit le texte de la citation et son auteur ou la source, dans
+% l'ordre.
+%
+% Pour ajouter une épigraphe au début d'un ou de plusieurs
+% chapitres, utilisez directement la commande \cmd{\epigraph} de
% \class{memoir}, sur laquelle \cmd{\dedicace} et \cmd{\epigraphe}
% sont d'ailleurs basées.
% \end{DescribeMacro}
@@ -640,8 +790,8 @@
% L'environnement |quotation|, quant à lui, doit être utilisé pour
% les citations «longues», celles qui peuvent s'étendre sur plus de
% cinq lignes ou, surtout, plus d'un paragraphe. Dans la classe, le
-% texte est alors toujours placé en retrait de 10~mm, mais également
-% à interligne simple. De plus, un espace vertical sépare les
+% texte est alors toujours placé en retrait de 10~mm, mais aussi à
+% interligne simple. De plus, un espace vertical sépare les
% paragraphes, le cas échéant, afin de bien les distinguer les uns
% des autres.
% \end{DescribeEnv}
@@ -658,8 +808,9 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\SingleSpacing}
-% Si ce devait être nécessaire ailleurs dans le document, la
-% commande \cmd{\SingleSpacing} permet de passer à l'interligne simple.
+% Si ce devait être nécessaire ailleurs dans le document, vous
+% pouvez avoir recours à la commande \cmd{\SingleSpacing} pour
+% passer à l'interligne simple.
% \end{DescribeMacro}
%
% \subsection{Hyperliens}
@@ -680,58 +831,44 @@
% \subsection{Autres paquetages chargés}
% \label{sec:paquetages}
%
-% Outre \class{memoir}, la classe \class{ulthese} charge quelques
-% paquetages qui peuvent aussi vous être utiles. Il n'est donc pas
-% nécessaire de charger de nouveau les paquetages suivants:
-% \begin{description}
-% \item[\normalfont\pkg{babel}] \citep{babel} gestion des documents
-% rédigés dans une ou plusieurs langues autres que l'anglais (si
-% l'option |nobabel| de la classe est absente; voir aussi la
-% \autoref{sec:langues});
-% \item[\normalfont\pkg{numprint}] \citep{numprint} requis par la
-% commande \cmd{\nombre} de \pkg{babel}; le paquetage est donc
-% chargé uniquement si \pkg{babel} l'est. Permet de composer
-% automatiquement des nombres avec un séparateur toutes les trois
-% positions (une espace en français);
-% \item[\normalfont\pkg{natbib}] \citep{natbib} gestion de la
-% bibliographie (si l'option |nonatbib| de la classe est absente;
-% voir aussi la \autoref{sec:bibliographie});
-% \item[\normalfont\pkg{chapterbib}] \citep{chapterbib} gestion de
-% bibliographies multiples (si l'une ou l'autre des options
-% |bibchapitre| ou |bibsection| est spécifiée;
-% voir aussi la \autoref{sec:bibliographie:multiples});
-% \item[\normalfont\pkg{hyperref}] \citep{hyperref} permet de
-% transformer toutes les références en hyperliens cliquables lorsque
-% le document est produit avec pdf{\LaTeX} ou {\XeLaTeX} (si
-% l'option |nohyperref| est spécifiée, vous devez obligatoirement
-% charger le paquetage vous-même);
-% \item[\normalfont\pkg{etoolbox}] \citep{etoolbox} outils
-% additionnels pour la conception de classes et de paquetages
-% (utilisé pour le chargement de \pkg{hyperref});
-% \item[\normalfont\pkg{fontspec}] \citep{fontspec} gestion des
-% polices OpenType sous {\XeLaTeX} (chargé avec ce moteur
-% seulement);
-% \item[\normalfont\pkg{graphicx}] \citep{graphicx} insertion et
-% manipulation de graphiques;
-% \item[\normalfont\pkg{xcolor}] \citep{xcolor} gestion des couleurs
-% dans le document, notamment celle des hyperliens;
-% \item[\normalfont\pkg{textcomp}] multitude de symboles spéciaux,
-% dont un beau symbole de copyright, \textcopyright.
-% \end{description}
-% L'\autoref{sec:meo} sur la mise en œuvre de la classe fournit
-% plus de détails sur la liste des paquetages chargés et les raisons
-% pour lesquelles ils sont requis dans la classe.
+% \changes{6.0}{2024-06-17}{Documentation: simplification de la
+% section sur les autres paquetages chargés par la classe.}
+% La classe {\ulclass} charge par défaut les paquetages suivants qui
+% peuvent vous être utiles: %
+% \href{https://ctan.org/pkg/babel}{\pkg{babel}} (voir aussi la \autoref{sec:langues}) %
+% \href{https://ctan.org/pkg/fontspec}{\pkg{fontspec}}, %
+% \href{https://ctan.org/pkg/graphicx}{\pkg{graphicx}}, %
+% \href{https://ctan.org/pkg/hyperref}{\pkg{hyperref}}, %
+% \href{https://ctan.org/pkg/microtype}{\pkg{microtype}}, %
+% \href{https://ctan.org/pkg/natbib}{\pkg{natbib}} (voir aussi la
+% \autoref{sec:bibliographie}), %
+% \href{https://ctan.org/pkg/numprint}{\pkg{numprint}}, %
+% \href{https://ctan.org/pkg/xcolor}{\pkg{xcolor}}. %
+% Tel que mentionné précédemment, la classe est basée sur
+% \class{memoir} qui, elle-même, incorpore d'office une trentaine de
+% paquetages\footnote{%
+% Consultez la section~18.24 de la documentation de \class{memoir}
+% pour la liste, ou encore le journal de la compilation (\emph{log})
+% d'un document utilisant la classe {\ulclass}.}. %
+% L'intégralité des fonctionnalités de \class{memoir} se retrouve donc
+% dans {\ulclass}.
+%
+% L'\autoref{sec:meo} sur la mise en œuvre de la classe fournit la
+% liste détaillée des paquetages chargés et les raisons pour
+% lesquelles ils sont requis dans la classe.
%
% \subsection{Paquetage incompatible}
% \label{sec:incompatible}
%
-% Le paquetage \pkg{geometry} est incompatible avec la classe à cause
-% de sa mauvaise interaction avec \class{memoir}. Son chargement dans
-% le préambule du document cause une erreur lors de la compilation.
+% Le paquetage %
+% \href{https://ctan.org/pkg/geometry}{\pkg{geometry}} %
+% est incompatible avec la classe à cause de sa mauvaise interaction
+% avec \class{memoir}. Son chargement dans le préambule du document
+% cause une erreur lors de la compilation.
%
% \section{Thèses et mémoires par articles}
% \changes{5.0}{2018-06-08}{Ajout d'une section spécifique sur les
-% thèses et mémoires par articles.}
+% thèses et mémoires par articles.}
%
% La rédaction de la thèse ou du mémoire par articles est une pratique
% qui gagne en popularité. Elle consiste à remplacer le corps
@@ -741,167 +878,54 @@
% du mémoire (le cas échéant) y apparaissent sous forme de
% sections numérotées.
%
-% L'autre caractéristique qui distingue la thèse et le mémoire par
-% articles des versions standards, c'est la nécessité d'utiliser une
-% bibliographie distincte pour chacun des chapitres. Les options de la
-% classe |bibchapitre| et |bibsection| permettent de réaliser cette
-% mise en forme particulière. La \autoref{sec:bibliographie:multiples}
-% explique comment en tirer profit.
-%
% Des gabarits de document maître et de chapitre fournissent la
% structure de base pour la thèse et le mémoire par articles. Vous
% pouvez, au besoin, combiner les caractéristiques de ces gabarits à
-% celles de la thèse en cotutelle ou du mémoire en bidiplomation. La
-% \autoref{sec:gabarits} fournit les détails sur les gabarits.
+% celles de la thèse en cotutelle ou du mémoire en bidiplomation.
%
-% \section{Français et autres langues}
-% \label{sec:langues}
-%
-% Une complication additionnelle si vous rédigez dans une langue autre
-% que l'anglais consiste à adapter {\LaTeX} à votre langue, qu'il
-% s'agisse des mots clés, de la typographie ou de la césure des mots.
-% La solution standard à ce problème provient du paquetage
-% \pkg{babel}. Celui-ci permet de combiner plusieurs langues dans un
-% même document et de passer de l'une à l'autre facilement. Il est
-% chargé par défaut par la classe \class{ulthese}.
-%
-% Aucune langue n'est spécifiée dans la classe. Vous aurez sans doute
-% recours à l'anglais et au français, ne serait-ce que pour les deux
-% résumés demandés par la FESP. Vous devez spécifier les langues
-% utilisées dans le document en options à la classe, tel que mentionné
-% à la \autoref{sec:utilisation:options}. La \emph{dernière} langue
-% spécifiée devient par défaut la langue active du document.
-%
-% \begin{DescribeMacro}{\selectlanguage}
-% La commande \cmd{\selectlanguage} de \pkg{babel} permet de passer de
-% la langue courante à la langue spécifiée en argument.
-% \end{DescribeMacro}
-%
-% \begin{DescribeEnv}{otherlanguage}
-% L'environnement |otherlanguage| de \pkg{babel} permet de faire
-% la même chose que la commande \cmd{\selectlanguage}, sauf que le
-% changement de langue est local à l'environnement --- utile pour
-% les brefs changements de langue.
-% \end{DescribeEnv}
-%
-% Si vous n'êtes pas autrement familier avec le paquetage
-% \pkg{babel}, consultez sa %
-% \doc{http://texdoc.net/pkg/babel/}. %
-% Celle-ci est éclatée en un
-% document principal, pour le cœur du paquetage et plusieurs
-% autres pour les fonctionnalités propres à une langue: %
-% \doc[anglais]{http://texdoc.net/pkg/babel-english}, %
-% \doc[français]{http://texdoc.net/pkg/babel-french}, %
-% etc. Consultez au moins les documents consacrés aux
-% langues utilisées dans votre thèse ou mémoire. Le plus simple
-% consiste sans doute à consulter en ligne sur CTAN les
-% \link{https://mirrors.ctan.org/tex-archive/macros/latex/required/babel/contrib/}{%
-% documents spécifiques par langue}.
-% \changes{4.4}{2017-05-14}{Correction d'une url vers la documentation
-% de babel.}
-%
-% \begin{DescribeMacro}{\nombre}
-% Le paquetage \pkg{numprint} étant chargé dans la classe avec
-% \pkg{babel}, vous pouvez utiliser la commande \cmd{\nombre} pour
-% formater automatiquement les nombres. Par exemple, le résultat de
-% |\nombre{123456789}| est \nombre{123456789}.
-% \end{DescribeMacro}
-%
-% Les utilisateurs de {\XeLaTeX} qui souhaiteraient plutôt utiliser le
-% plus récent paquetage \pkg{polyglossia} \citep{polyglossia} peuvent
-% empêcher le chargement de \pkg{babel} avec l'option |nobabel| de la
-% classe. Ils devront toutefois charger et configurer
-% \pkg{polyglossia} eux-mêmes dans l'entête de leur document. Ce
-% paquetage est moins évolué que \pkg{babel} pour la typographie
-% française.
+% \tipbox{À l'automne~2023, la FESP a retiré l'exigence de produire
+% une bibliographie par chapitre pour les thèses et mémoires par
+% articles. La thèse ou le mémoire doit désormais contenir une seule
+% bibliographie regroupant l’ensemble des références du document.}
%
% \section{Bibliographie}
% \label{sec:bibliographie}
+% \changes{6.0}{2024-05-22}{Documentation: suppression de la section
+% sur les bibliographies multiples.}
+% \changes{6.0}{2024-06-19}{Documentation: inversion des sections sur
+% la bibliographie et sur la rédaction en français.}
%
% \begin{DescribeMacro}{\bibliography}
-% Tel qu'expliqué au chapitre~8 de \citet{formation-latex-ul},
-% il est fortement recommandé d'utiliser {\BibTeX} pour la
+% Il est fortement recommandé d'utiliser {\BibTeX} pour la
% préparation de la bibliographie d'un document. Celle-ci est
% insérée dans le document à l'endroit où apparait la commande
% \cmd{\bibliography} dans le code source. Cette commande prend en
-% arguments les noms des bases de données bibliographiques séparés
+% arguments les noms des bases de données bibliographiques, séparés
% par des virgules.
% \end{DescribeMacro}
%
% \subsection{Mise en forme des citations}
% \label{sec:bibliographie:options}
%
-% Dans la classe \class{ulthese}, la mise en forme des citations est
-% confiée au paquetage \pkg{natbib} (à moins que l'option |nonatbib|
-% ne soit spécifiée). Le paquetage est chargé avec les options par
-% défaut, soit |round|, |semicolon| et |authoryear|. Pour spécifier
-% d'autres options, vous avez deux possibilités:
-% \begin{enumerate}
-% \item utiliser l'option |nonatbib| de la classe et ensuite charger
-% explicitement \pkg{natbib} avec ses options;
-% \item
-% \begin{DescribeMacro}{\setcitestyle}
-% utiliser la commande \cmd{\setcitestyle} pour passer de
-% nouvelles options à \pkg{natbib}.
-% \end{DescribeMacro}
-% \end{enumerate}
+% \begin{DescribeMacro}{\setcitestyle}
+% Dans la classe {\ulclass}, la mise en forme des citations est
+% confiée au paquetage %
+% \href{https://ctan.org/pkg/natbib}{\pkg{natbib}} %
+% (à moins que l'option |nonatbib| ne soit spécifiée). Le paquetage
+% est chargé avec les options par défaut, soit |round|, |semicolon|
+% et |authoryear|. Pour spécifier d'autres options utilisez la
+% commande \cmd{\setcitestyle} pour passer de nouvelles options à
+% \pkg{natbib}.
+% \end{DescribeMacro}
%
% Par exemple, pour utiliser un style de citation numérique où le
-% numéro de la référence se trouve entre crochets, vous pouvez
-% procéder de l'une ou l'autre des deux manières suivantes:
-% \begin{quote}
-% |\documentclass[nonatbib]{ulthese}| \\
-% |\usepackage[numbers,square]{natbib}| \\
-% |...| \\
-% |\bibliographystyle{plain-fr}|
-% \end{quote}
-% ou
+% numéro de la référence se trouve entre crochets, insérez la commande
+% suivante dans le préambule:
% \begin{quote}
-% |\documentclass{ulthese}| \\
-% |...| \\
-% |\setcitestyle{numbers,square}| \\
-% |\bibliographystyle{plain-fr}|
+% |\setcitestyle{numbers,square}|
% \end{quote}
%
-% Consultez la %
-% \doc{http://texdoc.net/pkg/natbib/} %
-% de \pkg{natbib} pour les détails.
-%
-% \subsection{Bibliographies multiples}
-% \label{sec:bibliographie:multiples}
-%
-% L'ajout de |bibchapitre| ou de |bibsection| dans les options de la
-% classe permet de générer une bibliographie distincte pour chaque
-% chapitre, une chose particulièrement utile pour les thèses et
-% mémoire par articles.
-%
-% La classe fait appel au paquetage \pkg{chapterbib}
-% \citep{chapterbib} pour composer des bibliographies multiples. La
-% \doc{http://texdoc.net/pkg/chapterbib/} du paquetage
-% explique la procédure à suivre pour obtenir une bibliographie par
-% chapitre avec {\BibTeX}. En résumé:
-% \begin{enumerate}
-% \item chaque chapitre comportant sa propre bibliographie doit
-% absolument être inséré dans le document principal avec la commande
-% \cmd{\include} \citep[section~3.5]{formation-latex-ul};
-% \item chaque fichier visé doit contenir une commande
-% \cmd{\bibliographystyle} (\autoref{sec:bibliographie:style}) et
-% une commande \cmd{\bibliography};
-% \item on obtient les diverses bibliographies en compilant avec
-% {\BibTeX} les fichiers individuels, et non le document maître.
-% \end{enumerate}
-%
-% La plupart des auteurs préféreront sans doute l'effet de l'option
-% |bibsection|, où la bibliographie apparait comme une section normale
-% à la fin d'un chapitre. Lorsque \pkg{babel} est chargé, la section
-% sera numérotée. Pour supprimer la numérotation, insérer dans le
-% préambule du document la commande
-% \begin{quote}
-% |\addto\extras|\meta{langue}|{\renewcommand{\bibsection}{%| \\
-% | \section*{\bibname}\prebibhook}}|
-% \end{quote}
-% où \meta{langue} est la langue par défaut du document
-% (\autoref{sec:langues}).
+% Consultez la documentation de \pkg{natbib} pour plus de détails.
%
% \subsection{Style de la bibliographie}
% \label{sec:bibliographie:style}
@@ -909,423 +933,142 @@
% \begin{DescribeMacro}{\bibliographystyle}
% Le format général de la bibliographie est contrôlé par un
% \emph{style} choisi avec la commande \cmd{\bibliographystyle} dans
-% le préambule du document ou dans les fichiers de chaque chapitre
-% dans une thèse ou un mémoire par articles. Les styles standards de
-% {\LaTeX} sont |plain|, |unsrt|, |alpha| et |abbrv|.
+% le préambule du document. Les styles standards de {\LaTeX} sont
+% |plain|, |unsrt|, |alpha| et |abbrv|.
% \end{DescribeMacro}
%
-% Le paquetage \pkg{natbib} chargé par défaut par la classe supporte
-% le style de citation auteur-année fréquemment employé en sciences
-% naturelles, plusieurs commandes de citation, un grand nombre de
-% styles de bibliographie ainsi que des entrées spécifiques pour les
-% numéros ISBN et les URL. Le paquetage fournit des styles de
-% bibliographie |plainnat|, |unsrtnat| et |abbrvnat| similaires aux
-% styles standards, mais plus complets. Il existe des
-% \link{https://mirrors.ctan.org/biblio/bibtex/contrib/bib-fr/}{versions
-% francisées} de ces styles (et de quelques autres) dans CTAN.
-%
-% Le paquetage \pkg{francais-bst} \citep{francais-bst} fournit une
-% feuille de style compatible avec \pkg{natbib} permettant de composer
-% des bibliographies auteur-année respectant les normes de typographie
-% française proposées dans \cite{Malo:1996}. Pour utiliser ce style,
-% spécifier dans le préambule du document LaTeX
-% \begin{quote}
-% |\bibliographystyle{francais}|
-% \end{quote}
+% Le paquetage \pkg{natbib} prend en charge le style de citation
+% auteur-année fréquemment employé en sciences naturelles, plusieurs
+% commandes de citation, un grand nombre de styles de bibliographie,
+% ainsi que des entrées spécifiques pour les numéros ISBN et les
+% adresses URL. Le paquetage fournit des styles de bibliographie
+% |plainnat|, |unsrtnat| et |abbrvnat| similaires aux styles
+% standards, mais plus complets. Il existe des %
+% \href{https://ctan.org/pkg/bib-fr}{versions francisées} %
+% de ces styles (et de quelques autres) dans CTAN.
+%
+% Les styles \code{francais} et \code{francaissc} du paquetage %
+% \href{https://ctan.org/pkg/francais-bst}{\pkg{francais-bst}} %
+% permettent de composer des bibliographies auteur-année respectant
+% les normes de typographie française. Ils sont compatibles avec
+% \pkg{natbib} et plus modernes que les styles mentionnés ci-dessus.
%
% Autrement, la FESP n'a pas d'exigences particulières quant à la
% présentation de la bibliographie (présentation du titre, des auteurs
% et autres informations bibliographiques).
%
-% \section{Police de caractères du document}
-% \label{sec:police}
-%
-% Les documents {\LaTeX} sont facilement reconnaissables par leur
-% police de caractères par défaut, {\fontfamily{cmr}\selectfont
-% Computer Modern}. Avec toute distribution {\LaTeX} moderne, il est
-% maintenant simple d'utiliser l'une ou l'autre des polices PostScript
-% standards. D'ailleurs la classe \class{ulthese} utilise la police
-% sans empattements \textsf{Helvetica} pour composer les pages de
-% titre.
-%
-% La FESP permet l'utilisation des polices Times, Palatino (la police
-% du présent document) et Lucida~Bright dans les thèse et mémoires.
-% \citet[section~10.2]{formation-latex-ul} explique comment utiliser ces
-% polices dans votre document.
-%
-% \section{Gabarits}
-% \label{sec:gabarits}
-%
-% Afin de vous épauler dans la préparation de votre manuscrit, la
-% classe \class{ulthese} est livrée avec un ensemble de gabarits. Tout
-% d'abord, pour le document maître de différents types de thèses et de
-% mémoires:
-% \begin{itemize}[noitemsep]
-% \item |gabarit-doctorat.tex|;
-% \item |gabarit-doctorat-articles.tex|;
-% \item |gabarit-doctorat-cotutelle.tex|;
-% \item |gabarit-maitrise.tex|;
-% \item |gabarit-maitrise-articles.tex|;
-% \item |gabarit-maitrise-bidiplomation.tex|.
-% \end{itemize}
-% Ensuite, pour quelques parties d'un document:
-% \begin{itemize}[noitemsep]
-% \item |resume.tex|;
-% \item |abstract.tex|;
-% \item |remerciements.tex|;
-% \item |avantpropos.tex|;
-% \item |introduction.tex|;
-% \item |chapitre1.tex|;
-% \item |chapitre1-articles.tex|;
-% \item |chapitre2.tex|;
-% \item |chapitre2-articles.tex|;
-% \item |conclusion.tex|;
-% \item |annexe.tex|.
-% \end{itemize}
-% Vous pourriez devoir combiner les caractéristiques de deux gabarits
-% de document maître comme, par exemple, pour une thèse en cotutelle
-% par articles.
-%
-% Les gabarits comportent des commentaires succincts pour vous guider
-% dans leur utilisation. Les sections suivantes fournissent des
-% détails additionnels, et ce, dans l'ordre où les commandes
-% apparaissent dans les fichiers.
-%
-% \begin{rem}
-% Il n'y a pas de gabarit spécifique pour un examen de doctorat,
-% pour un essai de maîtrise, pour un projet de recherche ou pour un
-% rapport de stage. Utilisez un gabarit de thèse ou de maîtrise et
-% inscrivez l'option |examen|, |essai|, |projet| ou |stage| dans la
-% commande \cmd{\documentclass}.
-% \end{rem}
-%
-% \subsection{Encodage des fichiers}
-%
-% Composer en {\LaTeX} de longs textes dans une langue ayant recours
-% aux signes diacritiques devient rapidement pénible si l'on utilise
-% des commandes telles que |\'e|, |\`a| ou |\"o| pour entrer des lettres
-% accentuées. Afin de pouvoir plutôt entrer directement |é|, |à| ou
-% |ö|, {\LaTeX} doit être configuré pour reconnaître les lettres
-% accentuées. C'est le rôle du paquetage \pkg{inputenc}
-% \citep{inputenc}.
-%
-% Il existe plusieurs manières différentes d'encoder --- ou
-% d'enregistrer --- les lettres accentuées et autres caractères
-% spéciaux (comme, par exemple, le symbole de l'euro) dans un
-% ordinateur. La méthode la plus répandue et celle standard sur les
-% versions récentes des systèmes d'exploitation Linux et macOS est
-% l'UTF-8 de la norme
-% \link{https://fr.wikipedia.org/wiki/Unicode}{Unicode}. Les gabarits
-% sont livrés dans ce type d'encodage.
-%
-% La déclaration
-% \begin{quote}
-% |\usepackage[utf8]{inputenc}|
-% \end{quote}
-% dans le préambule assure que {\LaTeX} traitera correctement des
-% fichiers source encodés en UTF-8.
-%
-% La norme Unicode n'est pas aussi uniformément supportée par Windows.
-% Selon l'éditeur de texte employé et la version du système
-% d'exploitation, il peut être nécessaire d'utiliser les normes
-% d'encodage %
-% \link{https://fr.wikipedia.org/wiki/ISO_8859-1}{ISO~8859-1} %
-% (ou Latin-1; option |latin1| de \pkg{inputenc}), %
-% \link{https://fr.wikipedia.org/wiki/ISO_8859-15}{ISO~8859-15} %
-% (ou Latin-9; option |latin9|) ou %
-% \link{https://fr.wikipedia.org/wiki/Windows-1252}{Windows-1252} %
-% (options |cp1252| ou |ansinew|).
-%
-% La situation est plus simple avec {\XeLaTeX} puisqu'il gère
-% nativement Unicode. Le paquetage \pkg{inputenc} est non seulement
-% inutile, mais incompatible avec {\XeLaTeX}. C'est pourquoi, dans les
-% gabarits, \pkg{inputenc} est chargé seulement lorsque {\XeTeX}
-% n'est pas le moteur employé pour compiler le document.
-%
-% \subsection{Paquetages additionnels}
-%
-% Tel qu'expliqué à la \autoref{sec:paquetages}, la classe charge déjà
-% quelques paquetages. Cependant, il est fort probable que vous devrez
-% en charger d'autres pour composer votre document. Les gabarits
-% prévoient un endroit pour le chargement de paquetages additionnels.
-%
-% Si vous utilisez un paquetage non standard dans les distributions
-% courantes (\TeX~Live, Mac\TeX, MiK\TeX), vous devez le fournir avec
-% le code source de votre document lors du dépôt final.
-%
-% \subsection{Changement de police de caractères}
-%
-% Les gabarits comportent des déclarations types pour utiliser les
-% polices Palatino ou Times sous {\LaTeX} ou, sous {\XeLaTeX}, leurs
-% équivalents Pagella et Termes du projet
-% \link{https://www.gust.org.pl/projects/e-foundry/tex-gyre/}{TeX~Gyre}.
-%
-% \subsection{Options de \pkg{babel}}
-%
-% \begin{DescribeMacro}{\frenchbsetup}
-% La commande \cmd{\frenchbsetup} de \pkg{babel} permet de contrôler
-% certains ajustements typographiques apportés par le paquetage en
-% mode français. Consultez la documentation de \pkg{babel} pour la
-% liste des options de configuration disponibles.
-% \end{DescribeMacro}
-%
-% Les concepteurs de la classe \class{ulthese} proposent trois
-% ajustements dans les gabarits:
-% \begin{enumerate}
-% \item l'option |StandardItemizeEnv=true| évite que le mode français de
-% \pkg{babel} ne diminue l'espacement vertical dans les listes;
-% \item l'option |ThinSpaceInFrenchNumbers=true| fait en sorte qu'une espace fine
-% sera utilisée comme séparateur des milliers dans les nombres plutôt
-% qu'une espace pleine;
-% \item les options |og=«| et |fg=»| déclarent que les caractères « et
-% » utilisés dans le code source représentent les guillemets ouvrant
-% et fermant, respectivement. Cela évite de devoir utiliser les
-% commandes \cmd{\og} et \cmd{\fg} de \pkg{babel} tout en bénéficiant de
-% l'ajutement automatique des espaces autour des symboles.
-% \end{enumerate}
-% Vous devez évidemment désactiver ces ajustements si l'option
-% |nobabel| est spécifiée au chargement de la classe.
+% \section{Français et autres langues}
+% \label{sec:langues}
%
-% \subsection{Style de la bibliographie}
-% \label{sec:bibliographystyle}
-%
-% Tel qu'expliqué à la \autoref{sec:bibliographie:style}, la commande
-% \cmd{\bibliographystyle} permet de définir le mode de citation dans
-% le texte et la présentation des notices bibliographiques. Cette
-% commande devrait figurer dans les fichiers des chapitres
-% individuels dans une thèse ou un mémoire par articles.
-%
-% \subsection{Déclarations de la page frontispice}
-%
-% Les gabarits comportent toutes les déclarations nécessaires pour
-% composer la page frontispice des divers types de thèse ou de
-% mémoires. Vous devez remplacer les éléments se trouvant entre
-% crochets |< >| en respectant la forme indiquée. Assurez-vous de
-% supprimer les caractères |<| et |>| afin qu'ils n'apparaissent pas
-% sur la page frontispice de votre document.
-%
-% \subsection{Pages liminaires}
-%
-% \begin{DescribeMacro}{\frontmatter}
-% La commande \cmd{\frontmatter} déclare que {\LaTeX} doit considérer le
-% matériel qui suit comme des pages liminaires. En pratique, cela
-% résulte essentiellement en une numérotation des pages en chiffres
-% romains.
-% \end{DescribeMacro}
+% Une complication additionnelle si vous rédigez dans une langue autre
+% que l'anglais consiste à adapter {\LaTeX} à votre langue, qu'il
+% s'agisse des mots clés, de la typographie ou de la césure des mots.
+% La solution standard à ce problème provient du paquetage %
+% \href{https://ctan.org/pkg/babel}{\pkg{babel}}. %
+% Celui-ci permet de combiner plusieurs langues dans un même document
+% et de passer de l'une à l'autre facilement. Il est chargé par défaut
+% par la classe {\ulclass}.
%
-% Les normes de présentation de la FESP édictent que les thèses et
-% mémoires devraient comporter les pages liminaires suivantes, dans
-% l'ordre:
-% \begin{enumerate}[noitemsep]
-% \item page frontispice (obligatoire);
-% \item résumé en français (obligatoire);
-% \item résumé en anglais (recommandé, mais non obligatoire);
-% \item table des matières (obligatoire);
-% \item liste des tableaux;
-% \item liste des figures;
-% \item liste des abbréviations et des sigles;
-% \item dédicace;
-% \item épigraphe;
-% \item remerciements;
-% \item avant-propos (obligatoire dans le cas d'une thèse ou d'un
-% mémoire par articles).
-% \end{enumerate}
-%
-% Les commandes
-% \begin{quote}
-% \cmd{\frontispice} \\
-% \cmd{\tableofcontents} \\
-% \cmd{\listoftables} \\
-% \cmd{\listoffigures} \\
-% \cmd{\dedicace}\marg{texte} \\
-% \cmd{\epigraphe}\marg{texte}\marg{auteur}
-% \end{quote}
-% permettent de générer les pages correspondantes. Seules les deux
-% dernières commandes admettent des arguments.
-%
-% \begin{rem}
-% L'examen de doctorat, l'essai de maîtrise, le rapport de projet de
-% recherche et le rapport de stage comportent une page de titre.
-% Vous devez ajouter dans les gabarits les commandes nécessaires
-% pour la production de la page de titre (\autoref{sec:pagetitre})
-% et supprimer les autres pages liminaires. Rappelons que l'option
-% de classe |examen| a pour effet de supprimer la page frontispice.
-% \end{rem}
-%
-% \begin{DescribeMacro}{\chapter*}
-% Les résumés, la liste des abbréviations et des sigles, les
-% remerciements et l'avant-propos sont composés comme des chapitres
-% normaux, mais sans être numérotés. Il faut donc définir ces éléments
-% avec la commande \cmd{\chapter*}.
-% \end{DescribeMacro}
+% Aucune langue n'est spécifiée dans la classe. Vous aurez sans doute
+% recours à l'anglais et au français, ne serait-ce que pour les deux
+% résumés demandés par la FESP. Vous devez spécifier les langues
+% utilisées dans le document en options à la classe, tel que mentionné
+% à la \autoref{sec:utilisation:options}. La \emph{dernière} langue
+% spécifiée devient par défaut la langue active du document.
%
-% \begin{DescribeMacro}{\label}
-% La commande \cmd{\label} permet d'utiliser le système de renvois
-% automatiques de {\LaTeX} \citep[section~3.4]{formation-latex-ul}.
-% Les étiquettes des chapitres non numérotés sont déjà configurées
-% pour l'ajout de ces chapitres dans la table des matières (voir
-% ci-dessous). Nous recommandons fortement de définir vos propres
-% étiquettes pour les chapitres normaux.
+% \begin{DescribeMacro}{\selectlanguage}
+% La commande \cmd{\selectlanguage} de \pkg{babel} permet de passer de
+% la langue courante à la langue spécifiée en argument.
% \end{DescribeMacro}
%
-% \begin{DescribeMacro}{\phantomsection}
-% \begin{DescribeMacro}{\addcontentsline}
-% \begin{DescribeMacro}{\nameref}
-% Les chapitres déclarés avec la commande \cmd{\chapter*}
-% n'apparaissent pas dans la table des matières. Comme les
-% normes de présentation de la FESP exigent que toutes les pages
-% liminaires y figurent, nous faisons suivre les commandes
-% \cmd{\chapter*}\marg{Titre} et \cmd{\label}\marg{nom} des
-% commandes
-% \end{DescribeMacro}
-% \end{DescribeMacro}
-% \end{DescribeMacro}
-% \begin{quote}
-% |\phantomsection\addcontentsline{toc}{chapter}{%| \\
-% | \nameref|\marg{nom}|}|
-% \end{quote}
-% Celles-ci ajoutent à la table des matières (|toc|) une section de
-% niveau |chapter| dont le titre est celui du chapitre auquel
-% correspond l'étiquette \meta{nom}. La commande \cmd{\phantomsection}
-% est rendue nécessaire (ou recommandée) par le paquetage
-% \pkg{hyperref}.
+% \begin{DescribeEnv}{otherlanguage}
+% L'environnement |otherlanguage| de \pkg{babel} permet de faire la
+% même chose que la commande \cmd{\selectlanguage}, sauf que le
+% changement de langue est local à l'environnement, ce qui peut
+% s'avérer utile pour les brefs changements de langue.
+% \end{DescribeEnv}
%
-% \subsection{Corps du document}
+% Si vous n'êtes pas autrement familier avec le paquetage \pkg{babel},
+% consultez sa documentation. Celle-ci est éclatée en un document
+% principal pour le cœur du paquetage et plusieurs autres pour les
+% fonctionnalités propres à une langue. Consultez au moins les
+% documents consacrés aux langues utilisées dans votre thèse ou
+% mémoire. Le plus simple consiste sans doute à consulter en ligne sur
+% CTAN les
+% \href{https://ctan.org/pkg/babel-contrib/}{documents spécifiques par langue}.
+% \changes{4.4}{2017-05-14}{Correction d'une url vers la documentation
+% de \textbf{babel}.}
%
-% \begin{DescribeMacro}{\mainmatter}
-% La commande \cmd{\mainmatter} délimite le début du corps du document. La
-% numérotation des pages passe en chiffres arabes.
+% \begin{DescribeMacro}{\nombre}
+% Le paquetage %
+% \href{https://ctan.org/pkg/numprint}{\pkg{numprint}} %
+% étant chargé dans la classe avec \pkg{babel}, vous pouvez utiliser
+% la commande \cmd{\nombre} pour formater automatiquement les
+% nombres. Par exemple, le résultat de |\nombre{123456789}| est
+% \nombre{123456789}.
% \end{DescribeMacro}
%
-% Le corps du document devrait normalement compter une introduction (non
-% numérotée), un développement divisé en chapitres (numérotés) et une
-% conclusion (non numérotée).
-%
-% \subsection{Annexes}
-%
-% \begin{DescribeMacro}{\appendix}
-% Si la thèse ou le mémoire comporte une ou plusieurs annexes,
-% composer celles-ci comme des chapitres normaux insérés dans le
-% document maître après la commande \cmd{\appendix}. Cette commande a
-% pour effet de passer d'un mode de numération numérique (1, 1.1, 2, 2.1,
-% \dots) à un mode alphanumérique (A, A.1, B, B.1, \dots).
-% \end{DescribeMacro}
+% Si vous souhaitez plutôt utiliser le plus récent paquetage %
+% \href{https://ctan.org/pkg/polyglossia}{\pkg{polyglossia}} %
+% avec {\XeLaTeX}, vous devez empêcher le chargement de \pkg{babel}
+% avec l'option |nobabel| de la classe, puis charger et configurer
+% \pkg{polyglossia} vous-même dans l'entête de votre document. Ce
+% paquetage est moins évolué que \pkg{babel} pour la typographie
+% française.
%
-% \subsection{Bibliographie}
+% \section{Police de caractères du document}
+% \label{sec:police}
+% \changes{6.0}{2024-06-17}{Documentation: révision de la section sur
+% les polices de caractères suite aux modifications apportées aux
+% règles de présentation de la FESP.}
%
-% La bibliographie figure normalement à la toute fin du document, sous
-% forme de chapitre non numéroté. Tel qu'expliqué à la
-% \autoref{sec:bibliographie:multiples}, la commande
-% \cmd{\bibliography} doit plutôt se trouver dans les fichiers des
-% chapitres dans une thèse ou un mémoire par articles.
+% Les documents {\LaTeX} sont facilement reconnaissables par leur
+% police de caractères par défaut: %
+% {\iftutex\fontfamily{lmr}\else\fontfamily{cmr}\fi\selectfont
+% Computer Modern}. %
+% Si vous le souhaitez, il est aujourd'hui assez simple de produire
+% des documents {\LaTeX} utilisant d'autres polices. L'approche
+% recommandée consiste à utiliser une police OpenType ou TrueType
+% présente sur votre système avec le moteur {\XeLaTeX}. Autrement,
+% vous pouvez charger l'une ou l'autre des polices PostScript
+% standards compatibles avec le moteur pdf{\LaTeX} en ayant recours au
+% paquetage %
+% \href{https://ctan.org/pkg/psnfss}{\pkg{psnfss}}. %
+% Dans tous les cas, assurez-vous de respecter les règles de
+% présentation de la FESP en matière de polices de caractères.
+%
+% La Bibliothèque de l’Université Laval détient une licence
+% d’utilisation des polices de très grande qualité %
+% \href{https://tug.org/store/lucida}{Lucida Bright}. %
+% Vous pouvez vous procurer gratuitement une copie des polices en
+% écrivant à %
+% \href{mailto:lucida@bibl.ulaval.ca}{lucida@bibl.ulaval.ca}.
+%
+% À titre indicatif, le présent document est composé avec les polices
+% OpenType %
+% \href{https://ctan.org/pkg/stix2-otf}{STIX~Two} %
+% pour le texte et %
+% \href{https://ctan.org/pkg/fira}{Fira} %
+% pour les éléments décoratifs (notamment \textsf{Fira Sans} pour les
+% titres de sections et \texttt{Fira Mono} pour le code informatique).
+%
+% \changes{6.0}{2024-05-25}{Documentation: suppression de la section
+% portant sur l'explication détaillée des gabarits. En échange,
+% ceux-ci comportent des commentaires additionnels.}
%
% \section{Commentaires, suggestions et aide}
% \changes{5.0}{2018-08-09}{Code source du projet déplacé de GitHub
-% vers GitLab.}
+% vers GitLab.}
+% \changes{6.0}{2024-06-18}{Documentation: retrait du wiki thèse
+% (fermé) et des archives de la liste ulthese-aide (peu utiles).}
%
-% Le \link{https://gitlab.com/vigou3/ulthese/}{dépôt du projet} dans
+% Le \href{https://gitlab.com/vigou3/ulthese/}{dépôt du projet} dans
% GitLab demeure le meilleur endroit pour rapporter des bogues ou pour
-% proposer des améliorations à la classe \class{ulthese}.
-%
-% Pour obtenir de l'aide additionnelle sur l'utilisation de la classe
-% --- et non sur celle de {\LaTeX} en général --- consultez d'abord:
-% \begin{enumerate}
-% \item le \link{http://www.theses.ulaval.ca/wiki/}{WikiThèse} de
-% l'Université Laval, en particulier la
-% \link{http://www.theses.ulaval.ca/wiki/index.php?title=FAQ}{Foire aux questions};
-% \item les
-% \link{http://listes.ulaval.ca/listserv/archives/ulthese-aide.html}{archives}
-% de la liste de distribution \texttt{ulthese-aide}.
-% \end{enumerate}
-% Si la réponse à votre question ne se trouve ni dans le wiki, ni dans
-% les archives, alors écrivez à l'adresse
-% \href{mailto:ulthese-aide@listes.ulaval.ca}{\url{ulthese-aide@listes.ulaval.ca}}.
-%
-% \StopEventually{
-% \begin{thebibliography}{15}
-% \addcontentsline{toc}{section}{Références}
-% \bibitem[{Arseneau(2010)}]{chapterbib}
-% Arseneau, D. 2010,
-% {\selectlanguage{english}\emph{chapterbib. Multiple
-% bibliographies in {\LaTeX}}}.
-% URL~\url{https://www.ctan.org/pkg/chapterbib/}.
-%
-% \bibitem[{Braams et Bezos(2016)}]{babel}
-% Braams, J. et J.~Bezos. 2016,
-% {\selectlanguage{english}\emph{Babel}}.
-% URL~\url{https://www.ctan.org/pkg/babel/}.
-%
-% \bibitem[{Carlisle et {The \LaTeX3\ Project}(2016)}]{graphicx}
-% Carlisle, D. et {The \LaTeX3\ Project}. 2016,
-% {\selectlanguage{english}\emph{Packages in the `graphics'
-% Bundle}}. URL~\url{https://www.ctan.org/pkg/graphics/}.
-%
-% \bibitem[{Charette(2015)}]{polyglossia}
-% Charette, F. 2015, {\selectlanguage{english}\emph{Polyglossia:
-% An Alternative to Babel for {\XeLaTeX} and {\LuaLaTeX}}}.
-% URL~\url{https://www.ctan.org/pkg/polyglossia/}, current
-% maintainer Arthur Reutenauer.
-%
-% \bibitem[{Daly(2010)}]{natbib}
-% Daly, P.~W. 2010, {\selectlanguage{english}\emph{Natural
-% Sciences Citations and References}}.
-% URL~\url{https://www.ctan.org/pkg/natbib/}.
-%
-% \bibitem[{Goulet(2013)}]{francais-bst}
-% Goulet, V. 2013, {\selectlanguage{french}«Paquetage
-% francais-bst»},
-% URL~\url{https://www.ctan.org/pkg/francais-bst/}.
-%
-% \bibitem[{Goulet(2020)}]{formation-latex-ul}
-% Goulet, V. 2020, {\selectlanguage{french}\emph{Rédaction avec
-% {\LaTeX}}}, document libre sous contrat Creative Commons.
-% URL~\url{httpss://ctan.org/pkg/formation-latex-ul}.
-%
-% \bibitem[{Harders(2012)}]{numprint}
-% Harders, H. 2012, {\selectlanguage{english}\emph{The
-% numprint package}}.
-% URL~\url{https://www.ctan.org/pkg/numprint/}.
-%
-% \bibitem[{Jeffrey et Mittelbach(2015)}]{inputenc}
-% Jeffrey, A. et F.~Mittelbach. 2015,
-% {\selectlanguage{english}\emph{inputenc.sty}}.
-% URL~\url{https://www.ctan.org/pkg/inputenc/}.
-%
-% \bibitem[{Kern(2016)}]{xcolor}
-% Kern, D.~U. 2016, {\selectlanguage{english}\emph{Extending
-% {\LaTeX}’s color facilities: the xcolor package}}.
-% URL~\url{https://www.ctan.org/pkg/xcolor/}.
-%
-% \bibitem[{Lehman et Wright(2018)}]{etoolbox}
-% Lehman, P. et J.~Wright. 2018,
-% {\selectlanguage{english}\emph{The etoolbox package}}.
-% URL~\url{https://www.ctan.org/pkg/etoolbox/}.
-%
-% \bibitem[{Malo(1996)}]{Malo:1996}
-% Malo, M. 1996, {\selectlanguage{french}\emph{Guide de la
-% communication écrite au cégep, à l'université et en
-% entreprise}}, Québec Amérique. ISBN~978-2-8903-7875-9.
-%
-% \bibitem[{Rahtz et Oberdiek(2017)}]{hyperref}
-% Rahtz, S. et H.~Oberdiek. 2017,
-% {\selectlanguage{english}\emph{Hypertext marks in {\LaTeX}: a
-% manual for hyperref}}.
-% URL~\url{https://www.ctan.org/pkg/hyperref/}.
-%
-% \bibitem[{Robertson et Hosny(2017)}]{fontspec}
-% Robertson, W. et K.~Hosny. 2017,
-% {\selectlanguage{english}\emph{The fontspec package: Font
-% selection for {\XeLaTeX} and {\LuaLaTeX}}}.
-% URL~\url{https://www.ctan.org/pkg/fontspec/}.
-%
-% \bibitem[{Wilson(2016)}]{memoir}
-% Wilson, P. 2016, {\selectlanguage{english}\emph{The Memoir Class
-% for Configurable Typesetting}}, 8{\ieme} éd., The Herries Press.
-% URL~\url{https://www.ctan.org/pkg/memoir/}, maintained by Lars
-% Madsen.
-% \end{thebibliography}
-% \PrintChanges
-% }
+% proposer des améliorations à la classe {\ulclass}.
+%
+% Pour de l'aide additionnelle sur l'utilisation de la classe~--- et
+% non sur celle de {\LaTeX} en général~--- écrivez à l'adresse %
+% \href{mailto:ulthese-aide@listes.ulaval.ca}{ulthese-aide@listes.ulaval.ca}.
%
% \appendix
%
@@ -1343,44 +1086,47 @@
% la \autoref{sec:utilisation:options} lorsque l'on souhaite créer une
% page de titre.
%
-% \begin{DescribeMacro}{multifacultaire}
-% Identifie une thèse multifacultaire. Valide uniquement avec un
-% grade de doctorat. Cette déclaration requiert ensuite d'utiliser
-% la commande \cmd{\faculteUL}.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{extensionUdeS}
-% Identifie une thèse réalisée en extension à l'Université de
-% Sherbrooke. Valide uniquement avec un grade de doctorat. Cette
-% déclaration requiert ensuite d'utiliser les commandes
-% \cmd{\faculteUL} et \cmd{\faculteUdeS}.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{extensionUQO}
-% Identifie une thèse réalisée en extension à l'Université du
-% Québec en Outaouais (UQO). Valide uniquement avec un grade de doctorat.
-% Cette déclaration requiert ensuite d'utiliser les commandes
-% \cmd{\faculteUL} et \cmd{\faculteUQO}.
-% \end{DescribeMacro}
-%
-% \begin{DescribeMacro}{extensionUQAC}
-% Identifie un mémoire réalisé en extension à l'Université du Québec
-% à Chicoutimi (UQAC). Valide uniquement avec un grade de maîtrise.
-% Cette déclaration requiert ensuite d'utiliser les commandes
-% \cmd{\faculteUL} et \cmd{\faculteUQAC}.
-% \end{DescribeMacro}
+% \begin{DescribeOption}{multifacultaire}
+% L'option |multifacultaire| identifie une thèse
+% multifacultaire. Valide uniquement avec un grade de doctorat.
+% Cette déclaration requiert ensuite d'utiliser la commande
+% \cmd{\faculteUL}.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{extensionUdeS}
+% L'option |extensionUdeS| identifie une thèse réalisée en extension
+% à l'Université de Sherbrooke. Valide uniquement avec un grade de
+% doctorat. Cette déclaration requiert ensuite d'utiliser les
+% commandes \cmd{\faculteUL} et \cmd{\faculteUdeS}.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{extensionUQO}
+% L'option |extensionUQO| identifie une thèse réalisée en extension
+% à l'Université du Québec en Outaouais (UQO). Valide uniquement
+% avec un grade de doctorat. Cette déclaration requiert ensuite
+% d'utiliser les commandes \cmd{\faculteUL} et \cmd{\faculteUQO}.
+% \end{DescribeOption}
+%
+% \begin{DescribeOption}{extensionUQAC}
+% L'option |extensionUQAC| identifie un mémoire réalisé en extension
+% à l'Université du Québec à Chicoutimi (UQAC). Valide uniquement
+% avec un grade de maîtrise. Cette déclaration requiert ensuite
+% d'utiliser les commandes \cmd{\faculteUL} et \cmd{\faculteUQAC}.
+% \end{DescribeOption}
%
% Ensuite, la composition d'une page de titre peut nécessiter
% d'utiliser les commandes ci-dessous en plus de celles de la
% \autoref{sec:utilisation:commandes}.
%
% \begin{DescribeMacro}{\annee}
-% Année du dépôt final de la thèse ou du mémoire.
+% La commande \cmdprint{\annee} spécifie l'année du dépôt final de
+% la thèse ou du mémoire.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\univcotutelle}
-% Nom, ville et pays de l'université de cotutelle, déclarés sous la
-% forme
+% Pour les thèses en cotutelle, la commande
+% \cmdprint{\univcotutelle} permet de saisir le nom, la ville et le
+% pays de l'université de cotutelle, sous la forme
% \begin{quote}
% |\univcotutelle{Nom de l'université \\ Ville, Pays}|
% \end{quote}
@@ -1389,8 +1135,9 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\gradecotutelle}
-% Grade conféré par l'université de cotutelle, déclaré
-% sous la forme
+% Pour les thèses en cotutelle, la commande
+% \cmdprint{\gradecotutelle} spécifie le grade conféré par
+% l'université de cotutelle, sous la forme
% \begin{quote}
% |\gradecotutelle{Nom du grade (sigle)}|
% \end{quote}
@@ -1399,8 +1146,9 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\univbidiplomation}
-% Nom, ville et pays de l'université de bidiplomation, déclarés sous
-% la forme
+% Pour les mémoires en bidiplomation, la commande
+% \cmdprint{\univbidiplomation} permet de saisir le nom, la ville et
+% le pays de l'université de bidiplomation, sous la forme
% \begin{quote}
% |\univbidiplomation{Nom de l'université \\ Ville, Pays}|
% \end{quote}
@@ -1409,8 +1157,9 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\gradebidiplomation}
-% Grade conféré par l'université de bidiplomation, déclaré sous la
-% forme
+% Pour les mémoires en bidiplomation, la commande
+% \cmdprint{\gradebidiplomation} spécifie le grade conféré par
+% l'université de bidiplomation, sous la forme
% \begin{quote}
% |\gradebidiplomation{Nom du grade (sigle)}|
% \end{quote}
@@ -1419,7 +1168,8 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\faculteUL}
-% La commande a deux usages:
+% La commande \cmdprint{\faculteUL} sert à saisir deux types
+% d'informations:
% \begin{enumerate}
% \item noms des facultés pour les thèses et mémoires
% multifacultaires, séparés par des commandes |\\|;
@@ -1433,35 +1183,37 @@
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\faculteUdeS}
-% Nom de la faculté de l'Université de Sherbrooke hébergeant la
-% thèse en extension. Cette commande prend effet seulement lorsque
-% la classe est chargée avec l'option |extensionUdeS|.
+% La commande \cmdprint{\faculteUdeS} spécifie le nom de la faculté
+% de l'Université de Sherbrooke hébergeant la thèse en extension.
+% Cette commande prend effet seulement lorsque la classe est chargée
+% avec l'option |extensionUdeS|.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\faculteUQO}
-% Nom de la faculté de l'Université du Québec en Outaouais
-% hébergeant la thèse en extension. Cette commande prend effet
-% seulement lorsque la classe est chargée avec l'option
-% |extensionUQO|.
+% La commande \cmdprint{\faculteUQO} spécifie le nom de la faculté
+% de l'Université du Québec en Outaouais hébergeant la thèse en
+% extension. Cette commande prend effet seulement lorsque la classe
+% est chargée avec l'option |extensionUQO|.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\faculteUQAC}
-% Nom de la faculté de l'Université du Québec à Chicoutimi
-% hébergeant le mémoire en extension. Cette commande prend effet
-% seulement lorsque la classe est chargée avec l'option
-% |extensionUQAC|.
+% La commande \cmdprint{\faculteUQAC} spécifie le nom de la faculté
+% de l'Université du Québec à Chicoutimi hébergeant le mémoire en
+% extension. Cette commande prend effet seulement lorsque la classe
+% est chargée avec l'option |extensionUQAC|.
% \end{DescribeMacro}
%
% \begin{DescribeMacro}{\pagetitre}
-% Création de la page de titre. Ne pas utiliser la commande
-% \cmd{\pagetitle} de {\LaTeX} pour ce faire. De toutes les
+% La commande \cmdprint{\pagetitre} crée la page de titre à
+% l'endroit où elle apparait dans le code source. N'utilisez pas la
+% commande \cmd{\titlepage} de {\LaTeX} pour ce faire. De toutes les
% commandes ci-dessus, c'est la seule qui doit se trouver dans le
% corps du document plutôt que dans le préambule.
% \end{DescribeMacro}
%
+% \MaybeStop{\PrintChanges}
%
-% ^^A Début du code de la classe
-%
+% ^^A >>>>> Début du code de la classe
% \section{Mise en œuvre}
% \label{sec:meo}
%
@@ -1470,37 +1222,30 @@
% explorer comment la classe est programmée.
%
% \subsection{Tests et valeurs booléennes}
-% \changes{4.4}{2017-06-01}{Tests et valeurs booléennes réalisés sans ifthen.}
+% \changes{4.4}{2017-06-01}{Tests et valeurs booléennes réalisés sans
+% \textbf{ifthen}.}
%
-% Le paquetage \pkg{ifxetex} permet de tester si un document est
-% compilé avec \XeTeX.
-% \begin{macrocode}
-%<*class>
-\RequirePackage{ifxetex}
-% \end{macrocode}
% Nous définissons ici toutes les valeurs booléennes requises par la
% classe.
% \begin{macrocode}
+%<*class>
\newif\ifUL@babel \UL@babeltrue % charger babel?
\newif\ifUL@natbib \UL@natbibtrue % charger natbib?
\newif\ifUL@hyperref \UL@hyperreftrue % charger hyperref?
-\newif\ifUL@chapterbib \UL@chapterbibfalse % charger chapterbib?
-\newif\ifUL@sectionbib \UL@sectionbibfalse % option sectionbib de chapterbib?
-\newif\ifUL@isthesis % programme est une thèse?
-\newif\ifUL@iscotutelle \UL@iscotutellefalse % thèse en cotutelle?
+\newif\ifUL@isthesis % programme est une these?
+\newif\ifUL@iscotutelle \UL@iscotutellefalse % these en cotutelle?
\newif\ifUL@isexam \UL@isexamfalse % examen de doctorat?
-\newif\ifUL@isessay \UL@isessayfalse % essai de maîtrise?
+\newif\ifUL@isessay \UL@isessayfalse % essai de maitrise?
\newif\ifUL@isresearch \UL@isresearchfalse % projet de recherche?
\newif\ifUL@isworkterm \UL@isworktermfalse % rapport de stage?
\newif\ifUL@hassubtitle \UL@hassubtitlefalse % document a un sous-titre?
-\newif\ifUL@hastitlepage \UL@hastitlepagefalse % page titre utilisée?
+\newif\ifUL@hastitlepage \UL@hastitlepagefalse % page titre utilisee?
% \end{macrocode}
%
% \subsection{Options de la classe}
%
% Les grandes catégories d'options propres à la classe sont: la
-% possibilité d'empêcher le chargement du paquetage \pkg{natbib};
-% l'activation des bibliographies par chapitre ou par section; la
+% possibilité d'empêcher le chargement du paquetage \pkg{natbib}; la
% possibilité d'empêcher le chargement du paquetage \pkg{babel}; la
% possibilité d'empêcher le chargement du paquetage \pkg{hyperref}; la
% taille de la police de caractères en points; le type de grade; la
@@ -1516,21 +1261,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{bibchapitre}
-% \begin{macro}{bibsection}
-% L'option |bibchapitre| entraine le chargement du paquetage
-% \pkg{chapterbib} qui permet de composer des bibliographies
-% multiples dans un document, habituellement une par
-% chapitre. Avec l'option |bibsection|, la bibliographie se
-% présente sous la forme d'une section plutôt que d'un chapitre.
-% La seconde option implique la première.
-% \begin{macrocode}
-\DeclareOption{bibchapitre}{\UL@chapterbibtrue}
-\DeclareOption{bibsection}{\UL@chapterbibtrue\UL@sectionbibtrue}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \begin{macro}{nobabel}
% L'option |nobabel| permet d'empêcher la classe de charger le
% paquetage \pkg{babel}. Cette option peut s'avérer utile pour
@@ -1618,10 +1348,6 @@
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
\newcommand*{\UL@degree}{Ma\^itre en architecture (M.~Arch.)}}
-\DeclareOption{MA}{%
- \UL@isthesisfalse
- \renewcommand*{\UL@typenum}{0}
- \newcommand*{\UL@degree}{Ma\^itre \`es arts (M.A.)}}
\DeclareOption{LLM}{%
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
@@ -1634,14 +1360,10 @@
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
\newcommand*{\UL@degree}{Ma\^itre en musique (M.~Mus.)}}
-\DeclareOption{MPht}{%
- \UL@isthesisfalse
- \renewcommand*{\UL@typenum}{0}
- \newcommand*{\UL@degree}{Ma\^itre en physioth\'erapie (M.~Pht.)}}
-\DeclareOption{MSc}{%
+\DeclareOption{MPsEd}{%
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \newcommand*{\UL@degree}{Ma\^itre \`es sciences (M.~Sc.)}}
+ \newcommand*{\UL@degree}{Ma\^itre en psycho\'education (M.~Ps.~\'ed.)}}
\DeclareOption{MScGeogr}{%
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
@@ -1650,10 +1372,18 @@
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
\newcommand*{\UL@degree}{Ma\^itre en service social (M.~Serv.~soc.)}}
-\DeclareOption{MPsEd}{%
+\DeclareOption{MTravSoc}{%
\UL@isthesisfalse
\renewcommand*{\UL@typenum}{0}
- \newcommand*{\UL@degree}{Ma\^itre en psycho\'education (M.~Ps.~\'ed.)}}
+ \newcommand*{\UL@degree}{Ma\^itre en travail social (M.~Trav.~soc.)}}
+\DeclareOption{MA}{%
+ \UL@isthesisfalse
+ \renewcommand*{\UL@typenum}{0}
+ \newcommand*{\UL@degree}{Ma\^itre \`es arts (M.A.)}}
+\DeclareOption{MSc}{%
+ \UL@isthesisfalse
+ \renewcommand*{\UL@typenum}{0}
+ \newcommand*{\UL@degree}{Ma\^itre \`es sciences (M.~Sc.)}}
\DeclareOption{multifacultaire}{%
\ifUL@isthesis
\renewcommand*{\UL@typenum}{1}
@@ -1761,7 +1491,7 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Chargement de la classe \class{memoir}}
+% \subsection{Chargement de la classe \texorpdfstring{\class{memoir}}{memoir}}
%
% Toutes les options de la classe sont passées à \class{memoir}. Le
% format de papier et la taille de police par défaut sont, dans
@@ -1787,51 +1517,50 @@
% \end{macrocode}
%
% \subsection{Paquetages requis}
-% \changes{5.0}{2018-06-10}{Le paquetage unicode-math n'est plus
-% chargé par défaut par la classe.}
-% \changes{5.0}{2018-08-11}{Le paquetage hyperref est désormais chargé
-% dans la classe plutôt que dans les gabarits. Requiert le paquetage
-% etoolbox.}
+% \changes{5.0}{2018-06-10}{Le paquetage \textbf{unicode-math} n'est
+% plus chargé par défaut par la classe.}
+% \changes{5.0}{2018-08-11}{Le paquetage \textbf{hyperref} est
+% désormais chargé dans la classe plutôt que dans les gabarits.
+% Requiert le paquetage etoolbox.}
%
% La classe s'efforce de charger un minimum de paquetages afin d'éviter
% les conflits potentiels.
%
-% {\XeLaTeX} requiert le paquetage \pkg{fontspec} pour le traitement
-% des polices. Sous {\LaTeX}, il est aujourd'hui préférable d'utiliser
-% les polices T1.
+% \changes{6.0}{2024-05-24}{Mise en œuvre: paquetage \textbf{inputenc} ^^A
+% désormais chargé avec l'option \texttt{utf8} lorsque la compilation
+% est effectuée par pdf{\LaTeX}.}
+% Le code source doit obligatoirement être enregistré dans le codage
+% UTF-8. Avec pdf{\LaTeX}, cela requiert le paquetage \pkg{inputenc}.
+%
+% \changes{6.0}{2024-05-24}{Mise en œuvre: paquetage
+% \textbf{microtype} désormais chargé par la classe avec
+% \textbf{fontspec} ou \textbf{fontenc}.}
+% \changes{6.0}{2024-05-24}{Mise en œuvre: option \texttt{Ligatures} ^^A
+% plus définie par défaut pour les polices OpenType.}
+% La classe charge également les paquetages minimalement nécessaires
+% pour la gestion des polices de caractères, soit \pkg{fontspec} avec
+% les moteurs modernes et \pkg{fontenc} avec pdf{\LaTeX}.
% \begin{macrocode}
-\ifxetex
+\iftutex
+ \RequirePackage[babel=true]{microtype}
\RequirePackage{fontspec}
- \defaultfontfeatures{Ligatures=TeX}
\else
+ \RequirePackage[babel=true]{microtype}
+ \RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\fi
% \end{macrocode}
%
-% Les paquetages \pkg{natbib} et \pkg{chapterbib} doivent être chargés
-% avant \pkg{babel} pour bien fonctionner, le cas échéant. Tel que
-% précisé dans la documentation de \pkg{natbib}, l'option |sectionbib|
-% est passée à ce paquetage lorsqu'il est chargé, ou à
-% \pkg{chapterbib} autrement.
+% Le paquetage \pkg{natbib} doit être chargé avant \pkg{babel} pour
+% bien fonctionner, le cas échéant.
% \begin{macrocode}
\ifUL@natbib
- \ifUL@sectionbib
- \PassOptionsToPackage{sectionbib}{natbib}
- \fi
\RequirePackage[round,semicolon,authoryear]{natbib}
\fi
-\ifUL@chapterbib
- \ifUL@sectionbib
- \ifUL@natbib\else
- \PassOptionsToPackage{sectionbib}{chapterbib}
- \fi
- \fi
- \RequirePackage{chapterbib}
-\fi
% \end{macrocode}
%
% Le support pour les langues autres que l'anglais est offert par le
-% paquetage \pkg{babel} --- à moins que l'option |nobabel| n'ait
+% paquetage \pkg{babel}~--- à moins que l'option |nobabel| n'ait
% été spécifiée au chargement de la classe. Les langues sont passées
% en option de la classe, et non du paquetage. Le paquetage
% \pkg{numprint} est requis par \pkg{babel} pour la définition
@@ -1844,14 +1573,16 @@
% \end{macrocode}
%
% Le paquetage obligatoire \pkg{hyperref} est chargé en tout dernier
-% avec la commande \cmd{\AtEndPreamble} du paquetage \pkg{etoolbox}.
-% Si l'option |nohyperref| a été spécifiée, la classe vérifie que le
-% paquetage a été chargé. La configuration de base de la classe fait
-% en sorte que tous les liens sont signalés par la couleur
-% |ULlinkcolor| définie à la \autoref{sec:couleurs}.
+% avec la commande \cmd{\AtEndPreamble} du paquetage \pkg{etoolbox}
+% (chargé par \class{memoir}). Si l'option |nohyperref| a été
+% spécifiée, la classe vérifie que le paquetage a été chargé. La
+% configuration de base de la classe fait en sorte que tous les liens
+% sont signalés par la couleur |ULlinkcolor| définie à la
+% \autoref{sec:couleurs}.
+% \changes{6.0}{2024-06-17}{Mise en œuvre: chargement explicite de
+% \textbf{etoolbox} retiré, car le paquetage est chargé par memoir.}
% \begin{macrocode}
\ifUL@hyperref
- \RequirePackage{etoolbox}
\AtEndPreamble{\RequirePackage{hyperref}}
\else
\AtBeginDocument{%
@@ -1870,11 +1601,8 @@
\RequirePackage{xcolor}
% \end{macrocode}
%
-% La commande \cmd{\textcopyright} utilisée sur la page de titre requiert le
-% paquetage \pkg{textcomp} pour obtenir un beau signe de copyright.
-% \begin{macrocode}
-\RequirePackage{textcomp}
-% \end{macrocode}
+% \changes{6.0}{2024-06-17}{Mise en œuvre: paquetage \textbf{textcomp} ^^A
+% retiré, car non nécessaire.}
%
% \subsection{Paquetage incompatible}
%
@@ -1926,7 +1654,7 @@
% \subsection{Interligne}
%
% L'espacement entre les lignes est d'un interligne et demi.
-% L'espacement «double» entre les paragraphes est fixé à
+% L'espacement double entre les paragraphes est fixé à
% |0.5\baselineskip| afin d'en arriver à une disposition agréable à
% l'œil. Le retrait de première ligne est supprimé puisque plus
% nécessaire suite à l'ajout de l'espacement entre les paragraphes.
@@ -1968,11 +1696,15 @@
% utilisées dans la classe sont toutes quelques points inférieures à
% celles des gabarits Word.}%
% et les graisses présentées au \autoref{tab:polices}. La
-% déclaration |\fontencoding{T1}| est nécessaire avec {\XeLaTeX} pour
-% explicitement charger la même police que sous {\LaTeX}.
+% déclaration |\fontencoding{T1}| est nécessaire avec les moteurs
+% modernes pour explicitement charger la même police qu'avec
+% pdf{\LaTeX}.
%
% \begin{table}
% \centering
+% \caption{Tailles et graisses de la police Helvetica des éléments
+% de la page de titre}
+% \label{tab:polices}
% \begin{tabular}{ll}
% \toprule
% Élément & Police \\
@@ -1984,9 +1716,6 @@
% Autres éléments & 12~points normal \\
% \bottomrule
% \end{tabular}
-% \caption{Tailles et graisses de la police Helvetica des éléments
-% de la page de titre}
-% \label{tab:polices}
% \end{table}
%
% \begin{macrocode}
@@ -2435,22 +2164,30 @@
\setsecnumdepth{subsection}
%</class>
% \end{macrocode}
-% ^^A Fin du code de la classe
+% ^^A <<<<< Fin du code de la classe
%
-% ^^A Il faut placer ces notes de changement relatives aux gabarits
+% ^^A Les notes de versions relatives aux gabarits doivent se trouver
% ^^A avant \Finale
% \changes{5.0}{2018-06-08}{Gabarits: meilleure indication du texte à
-% remplacer.}
+% remplacer.}
% \changes{5.0}{2018-06-08}{Gabarits: bonification de la structure
-% d'un chapitre de thèse ou de mémoire par articles.}
+% d'un chapitre de thèse ou de mémoire par articles.}
% \changes{5.0}{2018-04-25}{Gabarits: ajout d'étiquettes et de renvois
-% dans les gabarits des parties du document.}
+% dans les gabarits des parties du document.}
% \changes{5.0}{2018-04-25}{Gabarits: automatisation de l'ajout
-% d'entrées dans la table des matières à l'aide d'étiquettes et de
-% renvois.}
+% d'entrées dans la table des matières à l'aide d'étiquettes et de
+% renvois.}
% \changes{4.4}{2017-05-16}{Gabarits: nouveau gabarit pour une thèse
-% par articles.}
+% par articles.}
% \changes{4.2}{2016-03-29}{Gabarits: nouvelles options de babel.}
+% \changes{6.0}{2024-05-22}{Gabarits: gabarits pour une thèse par
+% articles révisés suite aux changements aux règles de présentation.}
+% \changes{6.0}{2024-05-22}{Gabarits: meilleure sélection automatique
+% des paquetages pour les polices et pour le codage selon le moteur
+% {\TeX}.}
+% \changes{6.0}{2024-06-20}{Gabarits: seul l'exemple de changement
+% pour les polices STIX Two est maintenant fourni, et ce, dans une
+% version qui fonctionne avec les polices livrées avec TeX Live.}
%
% \Finale
%
@@ -2473,60 +2210,57 @@
%% description détaillée de la classe, de ce gabarit et des options
%% disponibles.
%%
+%% Vous devez obligatoirement enregistrer tout fichier contenant des
+%% caractères non-ASCII (comme des lettres accentuées) dans le codage
+%% de caractères UTF-8.
+%%
%% [Ne pas hésiter à supprimer les commentaires après les avoir lus.]
%%
%% Déclaration de la classe avec le type de grade
%<phd>%% [l'un de LLD, DMus, DPsy, DThP, PhD]
-%<m>%% [l'un de MATDR, MArch, MA, LLM, MErg, MMus, MPht, MSc, MScGeogr,
-%<m>%% MServSoc, MPsEd]
+%<m>%% [l'un de MATDR, MArch, LLM, MErg, MMus, MPsEd, MScGeogr,
+%<m>%% MServSoc, MTravSoc, MA, MSc]
%% et les langues les plus courantes. Le français sera la langue par
-%<!articles>%% défaut du document.
-%<articles>%% défaut du document. L'option 'bibsection' permet de créer des
-%<articles>%% bibliographies par chapitre présentées sous forme de section
-%<articles>%% numérotée.
-%<phd&standard>\documentclass[PhD,english,french]{ulthese}
-%<phd&articles>\documentclass[PhD,bibsection,english,french]{ulthese}
+%% défaut du document.
+%<phd&(standard|articles)>\documentclass[PhD,english,french]{ulthese}
%<phd&cotutelle>\documentclass[PhD,cotutelle,english,french]{ulthese}
-%<m&standard>\documentclass[MSc,english,french]{ulthese}
-%<m&articles>\documentclass[MSc,bibsection,english,french]{ulthese}
+%<m&(standard|articles)>\documentclass[MSc,english,french]{ulthese}
%<m&bidiplomation>\documentclass[MA,bidiplomation,english,french]{ulthese}
- %% Encodage utilisé pour les caractères accentués dans les fichiers
- %% source du document. Les gabarits sont encodés en UTF-8. Inutile
- %% avec XeLaTeX, qui gère Unicode nativement.
- \ifxetex\else \usepackage[utf8]{inputenc} \fi
-
%% Charger ici les autres paquetages nécessaires pour le document.
%% Quelques exemples; décommenter au besoin.
%\usepackage{amsmath} % recommandé pour les mathématiques
%\usepackage{icomma} % gestion de la virgule dans les nombres
- %% Utilisation d'une autre police de caractères pour le document.
- %% - Sous LaTeX
- %\usepackage{mathpazo} % texte et mathématiques en Palatino
- %\usepackage{mathptmx} % texte et mathématiques en Times
- %% - Sous XeLaTeX
- %\setmainfont{TeX Gyre Pagella} % texte en Pagella (Palatino)
- %\setmathfont{TeX Gyre Pagella Math} % mathématiques en Pagella (Palatino)
- %\setmainfont{TeX Gyre Termes} % texte en Termes (Times)
- %\setmathfont{TeX Gyre Termes Math} % mathématiques en Termes (Times)
+ %% Utilisation d'une autre police de caractères pour le document
+ %% (exemple pour les polices STIX Two incluses dans TeX Live).
+ %% - Avec pdfLaTeX
+ %\usepackage{stix2}
+ %% - Avec XeLaTeX
+ %\setmainfont{STIXTwoText}
+ %[
+ % Extension = .otf,
+ % UprightFont = *-Regular,
+ % BoldFont = *-SemiBold,
+ % ItalicFont = *-Italic,
+ % BoldItalicFont = *-SemiBoldItalic,
+ %]
+ %\setmathfont{STIXTwoMath-Regular}
+ %[
+ % Extension = .otf,
+ %]
%% Options de mise en forme du mode français de babel. Consulter la
- %% documentation du paquetage babel pour les options disponibles.
- %% Désactiver (effacer ou mettre en commentaire) si l'option
- %% 'nobabel' est spécifiée au chargement de la classe.
- \frenchbsetup{%
+ %% documentation du paquetage babel-french pour les options
+ %% disponibles. Désactiver (effacer ou mettre en commentaire) si
+ %% l'option 'nobabel' est spécifiée au chargement de la classe.
+ \frenchsetup{%
StandardItemizeEnv=true, % format standard des listes
ThinSpaceInFrenchNumbers=true, % espace fine dans les nombres
og=«, fg=» % caractères « et » sont les guillemets
}
-%<!articles> %% Style de la bibliographie.
-%<!articles> \bibliographystyle{}
-%<articles> %% Suppression du numéro de section de la bibliographie. Utilisation
-%<articles> %% de \extrasfrench parce que c'est la dernière langue déclarée dans
-%<articles> %% \documentclass, ci-dessus.
-%<articles> %\addto\extrasfrench{%
-%<articles> % \renewcommand{\bibsection}{\section*{\bibname}\prebibhook}}
+ %% Style de la bibliographie.
+ \bibliographystyle{}
%% Composition de la page frontispice. Remplacer les éléments entre < >.
%% Supprimer les caractères < >. Couper un long titre ou un long
@@ -2561,19 +2295,19 @@
\frontmatter % pages liminaires
-\frontispice % production de la page frontispice
+\frontispice % page frontispice (obligatoire)
-\include{resume} % résumé français
-\include{abstract} % résumé anglais
+\include{resume} % résumé français (obligatoire)
+\include{abstract} % résumé anglais (optionnel)
\cleardoublepage
-\tableofcontents % production de la TdM
+\tableofcontents % table des matières (obligatoire)
\cleardoublepage
-\listoftables % production de la liste des tableaux
+\listoftables % liste des tableaux
\cleardoublepage
-\listoffigures % production de la liste des figures
+\listoffigures % liste des figures
\cleardoublepage
\dedicace{<Dédicace si désiré>}
@@ -2583,7 +2317,8 @@
\cleardoublepage
\include{remerciements} % remerciements
-\include{avantpropos} % avant-propos
+%<!articles>\include{avantpropos} % avant-propos (optionnel)
+%<articles>\include{avantpropos} % avant-propos (obligatoire)
\mainmatter % corps du document
@@ -2598,8 +2333,7 @@
\include{annexe} % annexe A
-%<!articles>\bibliography{} % production de la bibliographie
-%<!articles>
+\bibliography{} % production de la bibliographie
\end{document}
%</gabarit>
%
@@ -2637,8 +2371,8 @@
\label{chap-avantpropos} % étiquette pour renvois
\phantomsection\addcontentsline{toc}{chapter}{\nameref{chap-avantpropos}} % inclure dans TdM
-<Texte de l'avant-propos. Obligatoire dans une thèse ou un mémoire par
-articles.>
+<Texte de l'avant-propos. Obligatoire seulement pour une thèse ou un
+mémoire par intégration d'articles.>
%</avantpropos>
%
%<*introduction>
@@ -2669,8 +2403,6 @@ normal, sauf qu'elle n'est pas numérotée.>
%<articles>
<Texte du chapitre ou de l'article.>
%<articles>
-%<articles>\bibliographystyle{} % style de la bibliographie
-%<articles>\bibliography{} % production de la bibliographie
%</chapitre>
%
%<*conclusion>
diff --git a/Master/texmf-dist/source/latex/ulthese/ulthese.ins b/Master/texmf-dist/source/latex/ulthese/ulthese.ins
index 7987a0f368c..59e03576625 100644
--- a/Master/texmf-dist/source/latex/ulthese/ulthese.ins
+++ b/Master/texmf-dist/source/latex/ulthese/ulthese.ins
@@ -1,44 +1,34 @@
-%%
-%% Copyright (C) 2017 Universite Laval
-%%
-%% This file may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3c of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2006/05/20 or later.
-%%
+%% Procédure d'installation de la classe ulthese.cls et des gabarits à
+%% partir de ulthese.dtx
\input docstrip.tex
\keepsilent
\askforoverwritefalse
+\nopostamble
\preamble
This is a generated file.
-Copyright (C) 2017 Universite Laval
+Copyright (C) 2012-2024 Universite Laval
This file may be distributed and/or modified under the conditions
of the LaTeX Project Public License, either version 1.3c of this
license or (at your option) any later version. The latest version
of this license is in:
- http://www.latex-project.org/lppl.txt
+ https://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of LaTeX
version 2006/05/20 or later.
This work has the LPPL maintenance status `maintained'.
-The Current Maintainer of this work is Universite Laval
-<ulthese-dev@bibl.ulaval.ca>.
+The Current Maintainer of this work is Vincent Goulet for
+Universite Laval <ulthese-dev@bibl.ulaval.ca>.
-This work consists of the files ulthese.dtx and ulthese.ins and the
-derived files listed in the README.md file.
+This work consists of the files ulthese.dtx, ulthese.ins, and the
+derived files listed in the file README.md.
\endpreamble
@@ -83,17 +73,18 @@ derived files listed in the README.md file.
\obeyspaces
\Msg{*************************************************************}
\Msg{* *}
-\Msg{* La classe ulthese est maintenant prete a l'emploi. *}
+\Msg{* La classe ulthese est maintenant prête à l'emploi! *}
\Msg{* *}
-\Msg{* Utiliser un gabarit comme base pour votre fichier maitre. *}
-\Msg{* Vous pouvez effacer les gabarits inutiles. Composer le *}
-\Msg{* document dans des fichiers .tex distincts; quelques *}
-\Msg{* gabarits sont fournis avec la classe. *}
+\Msg{* Utilisez un des gabarits fournis avec la classe comme *}
+\Msg{* base pour votre fichier maitre. Vous pouvez effacer les *}
+\Msg{* gabarits inutiles. Composez le document dans des fichiers *}
+\Msg{* .tex distincts; quelques gabarits sont aussi fournis avec *}
+\Msg{* la classe. *}
\Msg{* *}
\Msg{* Pour produire la documentation de la classe, compiler le *}
-\Msg{* fichier ulthese.dtx avec LaTeX. *}
+\Msg{* fichier ulthese.dtx avec XeLaTeX. *}
\Msg{* *}
-\Msg{* Bonne redaction! *}
+\Msg{* Bonne rédaction! *}
\Msg{* *}
\Msg{*************************************************************}
diff --git a/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx b/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx
index 873f0bd2c59..9d6a7041485 100644
--- a/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx
+++ b/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.dtx
@@ -5,7 +5,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{ut-thesis}
%<*class>
-[2023/02/08 v3.1.7 University of Toronto thesis class]
+[2024/07/26 v3.1.8 University of Toronto thesis class]
%</class>
%
%<*driver>
@@ -33,15 +33,15 @@
% \GetFileInfo{ut-thesis.dtx}
%
% \title{The \textit{ut-thesis} class
-% \thanks{\fileversion~[\filedate] CTAN repository:
-% \href{https://ctan.org/pkg/ut-thesis}
-% {\texttt{https://ctan.org/pkg/ut-thesis}}}}
+% \thanks{\fileversion~[\filedate]\hfill
+% \href{https://ctan.org/pkg/ut-thesis}{\texttt{https://ctan.org/pkg/ut-thesis}}\hfill
+% \href{https://github.com/jessexknight/ut-thesis}{\texttt{github.com/jessexknight/ut-thesis}}}}
% \author{
% Francois Pitt,
% Jesse Knight
% \thanks{maintainer, contact:
-% \href{mailto:jesse.knight@mail.utoronto.ca}
-% {\texttt{jesse.knight@mail.utoronto.ca}}}
+% \href{mailto:jesse.x.knight@protonmail.com}
+% {\texttt{jesse.x.knight@protonmail.com}}}
% }
%
% \maketitle
@@ -79,7 +79,7 @@
%
% The default options produce a final copy, ready for submission to
% the University of Toronto School of Graduate Studies (SGS).
-% Some examples are available on
+% There is some example code on
% \href{https://github.com/jessexknight/ut-thesis/tree/master/test}{GitHub}.
%
% \subsection{Options}\label{use:opt}
@@ -616,4 +616,4 @@
\setlength\belowcaptionskip{1ex}
% \end{macrocode}
%
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.ins b/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.ins
index db350551150..80df67d81ee 100644
--- a/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.ins
+++ b/Master/texmf-dist/source/latex/ut-thesis/ut-thesis.ins
@@ -11,8 +11,8 @@ as of Fall 2020:
[https://www.sgs.utoronto.ca/academic-progress/program-completion/formatting]
Copyright (c) 1998-2013 Francois Pitt <fpitt@cs.utoronto.ca>,
- 2020-2021 Jesse Knight <jesse.knight@mail.utoronto.ca>
-last updated at 23:30 (EST) on Tue 20 July 2021
+ 2020-2024 Jesse Knight <jesse.x.knight@protonmail.com>
+last updated at 09:00 (BST) on Fri 26 July 2024
This work may be distributed and/or modified under the conditions of
the LaTeX Project Public Licence, either version 1.3c of this licence
@@ -28,7 +28,7 @@ and is not covered by the licence.
This work has the LPPL maintenance status "maintained".
The Current Maintainer of this work is
-Jesse Knight <jesse.knight@mail.utoronto.ca>.
+Jesse Knight <jesse.x.knight@protonmail.com>.
This work consists of the files:
- README
@@ -37,12 +37,13 @@ This work consists of the files:
- ut-thesis.pdf (derived user manual)
- ut-thesis.cls (derived class file)
-To generate ut-thesis.cls (class file), run: pdflatex ut-thesis.ins
-To generate ut-thesis.pdf (documentation), run: pdflatex ut-thesis.dtx
-To use the class, make ut-thesis.cls visible to your LaTeX distribution,
-by placing ut-thesis.cls either in your working directory,
-or in your texmf tree, perhaps: $texmf/tex/latex/ut-thesis/ut-thesis.cls
-and the documentation: $texmf/doc/latex/ut-thesis/ut-thesis.pdf
+Install ut-thesis from your favourite LaTeX distribution.
+Alternatively, or to use the latest version:
+- generate ut-thesis.cls (class file) using: pdflatex ut-thesis.ins
+ and copy to: $texmf/tex/latex/ut-thesis/ut-thesis.cls
+- generate ut-thesis.pdf (documentation) using: pdflatex ut-thesis.dtx
+ and copy to: $texmf/doc/latex/ut-thesis/ut-thesis.pdf
+or simply copy ut-thesis.cls to your working directory.
See version history on GitHub:
[https://github.com/jessexknight/ut-thesis]
@@ -51,4 +52,4 @@ See version history on GitHub:
\generate{\file{ut-thesis.cls}{\from{ut-thesis.dtx}{class}}}
-\endbatchfile \ No newline at end of file
+\endbatchfile