summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/babel-contrib/lithuanian/README.md9
-rw-r--r--macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.dtx282
-rw-r--r--macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.ins134
-rw-r--r--macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.pdfbin0 -> 212798 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/README.md8
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer-Sidebar.pdfbin50805 -> 50847 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer.pdfbin40924 -> 40858 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHFactsheet.pdfbin50347 -> 50392 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHLetter.pdfbin13731 -> 13805 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHProjektProposal.pdfbin57404 -> 57404 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHPub.pdfbin92253 -> 92276 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHSciPoster.pdfbin46595 -> 46637 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/doc/DEMO-BFHThesis.pdfbin41660 -> 41534 bytes
-rw-r--r--macros/latex/contrib/bfh-ci/example/DEMO-BFHSciPoster.tex10
-rw-r--r--macros/latex/contrib/bfh-ci/tex/beamercolorthemeBFH.sty8
-rw-r--r--macros/latex/contrib/bfh-ci/tex/beamerfontthemeBFH.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/beamerinnerthemeBFH.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH-sidebar.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/beamerthemeBFH.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a0paper.clo6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a1paper.clo6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a2paper.clo6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a3paper.clo6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a4paper.clo6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a5paper.clo6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-a6paper.clo4
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-beamerarticle.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-factsheet.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-layout-boxes.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-layout-listings.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-layout-tabular.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-projectproposal.cfg10
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhbeamer.cls6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhcolors.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhfonts.sty7
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhlayout.sty7
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhletter.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhlettersize9.5pt.clo4
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhmodule.sty6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhpub.cls6
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhsciposter.cls17
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfhthesis.cls6
-rw-r--r--macros/latex/contrib/colorist/colorart.cls2
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls2
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty5
-rw-r--r--macros/latex/contrib/colorist/colorist.sty2
-rw-r--r--macros/latex/contrib/lastpage/README68
-rw-r--r--macros/latex/contrib/lastpage/lastpage-example.pdfbin118155 -> 129481 bytes
-rw-r--r--macros/latex/contrib/lastpage/lastpage.dtx1457
-rw-r--r--macros/latex/contrib/lastpage/lastpage.pdfbin436318 -> 440770 bytes
-rw-r--r--macros/latex/contrib/microtype/README.md4
-rw-r--r--macros/latex/contrib/microtype/microtype-code.pdfbin2172322 -> 2138452 bytes
-rw-r--r--macros/latex/contrib/microtype/microtype-utf.dtx4
-rw-r--r--macros/latex/contrib/microtype/microtype.dtx673
-rw-r--r--macros/latex/contrib/microtype/microtype.ins2
-rw-r--r--macros/latex/contrib/microtype/microtype.pdfbin670022 -> 670263 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-classical.sty233
-rw-r--r--macros/latex/contrib/minimalist/minimalist-flow.sty240
-rw-r--r--macros/latex/contrib/minimalist/minimalist-plain.sty256
-rw-r--r--macros/latex/contrib/minimalist/minimalist-stream.sty170
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty22
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls2
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls2
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin533310 -> 545421 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex420
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx549
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin1341260 -> 1356332 bytes
-rw-r--r--macros/latex/contrib/pythonimmediate/README5
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate.pdfbin432126 -> 431593 bytes
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate.sty56
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate.tex17
-rw-r--r--macros/latex/contrib/pythonimmediate/pythonimmediate_helper.lua20
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx8
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx28
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1514352 -> 1544550 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx24
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx26
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx67
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx21
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin858479 -> 1001257 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex272
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty131
-rw-r--r--macros/luatex/latex/linebreaker/README.md4
-rw-r--r--macros/luatex/latex/linebreaker/linebreaker-doc.pdfbin51966 -> 49887 bytes
-rw-r--r--macros/luatex/latex/linebreaker/linebreaker-doc.tex11
-rw-r--r--macros/luatex/latex/linebreaker/linebreaker.lua72
-rw-r--r--macros/luatex/latex/linebreaker/linebreaker.sty9
97 files changed, 3846 insertions, 1712 deletions
diff --git a/macros/latex/contrib/babel-contrib/lithuanian/README.md b/macros/latex/contrib/babel-contrib/lithuanian/README.md
new file mode 100644
index 0000000000..3003e62ef3
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/lithuanian/README.md
@@ -0,0 +1,9 @@
+# Babel support for Lithuanian v1.0#
+
+This is the babel style for Lithuanian.
+
+Released under the LaTeX Project Public License v1.3 or later.
+See <http://www.latex-project.org/lppl.txt>
+
+2023-03-07
+
diff --git a/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.dtx b/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.dtx
new file mode 100644
index 0000000000..202276fe05
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.dtx
@@ -0,0 +1,282 @@
+% \iffalse meta-comment
+%
+% Copyright 2023 Sigitas Tolušis, and any
+% individual authors listed elsewhere in this file. All rights
+% reserved.
+%
+% This file is part of the Babel system.
+% --------------------------------------
+%
+% 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 Sigitas Tolušis.
+%
+% 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
+% \iffalse
+% Tell the \LaTeX\ system who we are and write an entry on the
+% transcript.
+%<*dtx>
+\ProvidesFile{babel-lithuanian.dtx}
+%</dtx>
+%<code>
+%<code>\ProvidesLanguage{lithuanian}
+%<code> [2023/03/07 v1.0 Lithuanian support from the babel system]
+% \fi
+% \iffalse
+%<*filedriver>
+\documentclass{ltxdoc}
+\usepackage[utf8]{inputenc}
+\usepackage[L7x,T1]{fontenc}
+\title{The Lithuanian style for babel, v1.0}
+\author{Sigitas Tolušis}
+\newcommand*\babel{\textsf{babel}}
+\begin{document}
+ \maketitle
+ \DocInput{babel-lithuanian.dtx}
+\end{document}
+%</filedriver>
+%\fi
+%
+% \section{The Lithuanian Language}
+%
+% The file \textsf{lithuanian.ldf} defines the language definition
+% macros for the Lithuanian language.
+%
+% Since the |T1| encoding doesn't contain all the characters required
+% for Lithuanian, you should use |L7x| instead for 8-bit fonts.
+% In this case best choice is to use \textsf{tex-gyre} fonts collection.
+% As alternative you can use Open Type fonts with \textsf{luatex} or
+% \textsf{xetex}.
+%
+% A complete example is:
+%\begin{verbatim}
+%\documentclass{article}
+% %
+% %% 8-bit fonts
+%\usepackage[utf8x]{inputenc}
+% %%\usepackage[utf8x]{luainputenc} %% in case using lualatex with 8-bit fonts
+%\usepackage[L7x]{fontenc}
+%\usepackage{tgtermes} %% or tgpagella, tgbonum, tgschola, etc.
+% %
+% %% Open Type fonts
+% %\usepackage{fontspec}
+% %\setmainfont{texgyrebonum-regular.otf}
+% %%
+%\usepackage[lithuanian]{babel}
+%\usepackage[pdftex,unicode]{hyperref}
+%
+%\begin{document}
+%
+%\section*{Abėcėlė}
+%Lietuvių kalbos abėcėlę sudaro 32 raidės:
+%\par\medskip
+% Aa Ąą Bb Cc Čč Dd Ee Ęę Ėė Ff Gg Hh Ii Įį Yy Jj
+% Kk Ll Mm Nn Oo Pp Rr Ss Šš Tt Uu Ųų Ūū Vv Zz Žž
+%
+%\subsection*{Didžiosios raidės}
+%\MakeUppercase{Aa Ąą Bb Cc Čč Dd Ee Ęę Ėė Ff Gg Hh Ii Įį Yy Jj
+% Kk Ll Mm Nn Oo Pp Rr Ss Šš Tt Uu Ųų Ūū Vv Zz Žž}
+%
+%\subsection*{Mažosios raidės}
+%\MakeLowercase{Aa Ąą Bb Cc Čč Dd Ee Ęę Ėė Ff Gg Hh Ii Įį Yy Jj
+% Kk Ll Mm Nn Oo Pp Rr Ss Šš Tt Uu Ųų Ūū Vv Zz Žž}
+%
+%\end{document}
+%\end{verbatim}
+%
+% \StopEventually{}
+%
+% \subsection*{The code}
+%
+% \begin{macrocode}
+%<*code>
+\LdfInit{lithuanian}\captionslithuanian
+\ifx\undefined\l@lithuanian
+ \@nopatterns{Lithuanian}
+ \adddialect\l@lithuanian0
+\fi
+% \end{macrocode}
+%
+% \subsubsection*{Hyphenmins}
+%
+% \begin{macrocode}
+
+\providehyphenmins{lithuanian}{\tw@\tw@}
+% \end{macrocode}
+%
+% \subsubsection*{Captions and date}
+%
+% \begin{macrocode}
+
+\StartBabelCommands*{lithuanian}{captions}
+ [unicode, charset=utf8, fontenc=TU EU1 EU2]
+
+ \SetString\prefacename{Pratarmė}
+ \SetString\refname{Literatūra}
+ \SetString\abstractname{Santrauka}
+ \SetString\bibname{Literatūra}
+ \SetString\chaptername{skyrius}
+ \SetString\appendixname{Priedas}
+ \SetString\contentsname{Turinys}
+ \SetString\listfigurename{Iliustracijų sąrašas}
+ \SetString\listtablename{Lentelių sąrašas}
+ \SetString\indexname{Rodyklė}
+ \SetString\figurename{pav.}
+ \SetString\tablename{lentelė}
+ \SetString\partname{Dalis}
+ \SetString\enclname{Įdėta}
+ \SetString\ccname{Kopijos}
+ \SetString\headtoname{Kam}
+ \SetString\pagename{puslapis}
+ \SetString\seename{žiūrėk}%% žr.
+ \SetString\alsoname{taip pat}%% ten pat, tas pat
+ \SetString\proofname{Įrodymas}
+ \SetString\glossaryname{Terminų žodynas}
+
+\StartBabelCommands*{lithuanian}{captions}
+
+ \SetString\prefacename{Pratarm\.e}
+ \SetString\refname{Literat\=ura}
+ \SetString\abstractname{Santrauka}
+ \SetString\bibname{Literat\=ura}
+ \SetString\chaptername{skyrius}
+ \SetString\appendixname{Priedas}
+ \SetString\contentsname{Turinys}
+ \SetString\listfigurename{Iliustracij\k{u} s\k{a}ra\v{s}as}
+ \SetString\listtablename{Lenteli\k{u} s\k{a}ra\v{s}as}
+ \SetString\indexname{Rodykl\.e}
+ \SetString\figurename{pav.}
+ \SetString\tablename{lentel\.e}
+ \SetString\partname{Dalis}
+ \SetString\enclname{\k{I}d\.eta}
+ \SetString\ccname{Kopijos}
+ \SetString\headtoname{Kam}
+ \SetString\pagename{puslapis}
+ \SetString\seename{\v{z}i\=ur\.ek}%% \v{z}.r.
+ \SetString\alsoname{taip pat}%% ten pat, tas pat
+ \SetString\proofname{\k{I}rodymas}
+ \SetString\glossaryname{Termin\k{u} \v{z}odynas}%
+
+\StartBabelCommands*{lithuanian}{date}
+ [unicode, charset=utf8, fontenc=TU EU1 EU2]
+
+ \SetStringLoop{month#1lithuanian}{%
+ sausio,vasario,kovo,balandžio,gegužės,birželio,%
+ liepos,rugpjūčio,rugsėjo,spalio,lapkričio,gruodžio%
+ }
+
+\StartBabelCommands*{lithuanian}{date}
+
+ \SetStringLoop{month#1lithuanian}{%
+ sausio,vasario,kovo,baland\v{z}io,gegu\v{z}\.es,bir\v{z}elio,%
+ liepos,rugpj\=u\v{c}io,rugs\.ejo,spalio,lapkri\v{c}io,gruod\v{z}io%
+ }
+
+\SetString\today{%
+ \number\year~m.%
+ ~\csname month\romannumeral\month lithuanian\endcsname
+ ~\number\day~d.%
+ }
+% \end{macrocode}
+%
+% \subsubsection*{Extra chars cases}
+%
+% \begin{macrocode}
+
+\StartBabelCommands{lithuanian}{}[l7xenc, fontenc=L7x]
+
+ \SetCase{%
+ \uccode"E0="C0\relax % ąĄ
+ \uccode"E8="C8\relax % čČ
+ \uccode"E6="C6\relax % ęĘ
+ \uccode"EB="CB\relax % ėĖ
+ \uccode"E1="C1\relax % įĮ
+ \uccode"F0="D0\relax % šŠ
+ \uccode"F8="D8\relax % ųŲ
+ \uccode"FB="DB\relax % ūŪ
+ \uccode"FE="DE\relax % žŽ
+ }{%
+ \lccode"C0="E0\relax % Ąą
+ \lccode"C8="E8\relax % Čč
+ \lccode"C6="E6\relax % Ęę
+ \lccode"CB="EB\relax % Ėė
+ \lccode"C1="E1\relax % Įį
+ \lccode"D0="F0\relax % Šš
+ \lccode"D8="F8\relax % Ųų
+ \lccode"DB="FB\relax % Ūū
+ \lccode"DE="FE\relax % Žž
+ }
+
+\StartBabelCommands{lithuanian}{}[unicode, fontenc=TU EU1 EU2, charset=utf8]
+
+ \SetCase{%
+ \uccode`ą=`Ą\relax
+ \uccode`č=`Č\relax
+ \uccode`ę=`Ę\relax
+ \uccode`ė=`Ė\relax
+ \uccode`į=`Į\relax
+ \uccode`š=`Š\relax
+ \uccode`ų=`Ų\relax
+ \uccode`ū=`Ū\relax
+ \uccode`ž=`Ž\relax
+ }{%
+ \lccode`Ą=`ą\relax
+ \lccode`Č=`č\relax
+ \lccode`Ę=`ę\relax
+ \lccode`Ė=`ė\relax
+ \lccode`Į=`į\relax
+ \lccode`Š=`š\relax
+ \lccode`Ų=`ų\relax
+ \lccode`Ū=`ū\relax
+ \lccode`Ž=`ž\relax
+ }
+
+\EndBabelCommands
+% \end{macrocode}
+%
+% \subsubsection*{Extras macros}
+%
+% \begin{macrocode}
+
+\addto\extraslithuanian{%
+ \babel@save\fnum@figure
+ \def\fnum@figure{\thefigure\nobreakspace\figurename}%
+ \babel@save\fnum@table
+ \def\fnum@table{\thetable\nobreakspace\tablename}%
+ }
+\addto\noextraslithuanian{}
+
+\ldf@finish{lithuanian}
+
+%</code>
+% \end{macrocode}
+%
+% \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 \~}
+%%
diff --git a/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.ins b/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.ins
new file mode 100644
index 0000000000..c2212dfc61
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.ins
@@ -0,0 +1,134 @@
+%%
+%% 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 2023 Javier Bezos and any individual authors
+%% listed elsewhere in this file. All rights reserved.
+%%
+%% This file is part of the Babel system.
+%% --------------------------------------
+%%
+%% 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 Javier Bezos.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.bbl. See also `legal.bbl' for additional
+%% information.
+%%
+%% 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.
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\def\filedate{2023/03/07}
+\def\batchfile{babel-lithuanian.ins}
+\input docstrip.tex
+
+{\ifx\generate\undefined
+\Msg{**********************************************}
+\Msg{*}
+\Msg{* This installation requires docstrip}
+\Msg{* version 2.3c or later.}
+\Msg{*}
+\Msg{* An older version of docstrip has been input}
+\Msg{*}
+\Msg{**********************************************}
+\errhelp{Move or rename old docstrip.tex.}
+\errmessage{Old docstrip in input path}
+\batchmode
+\csname @@end\endcsname
+\fi}
+
+\declarepreamble\mainpreamble
+This is a generated file.
+
+Copyright 2023 Sigitas Tolušis and any individual authors
+listed elsewhere in this file. All rights reserved.
+
+This file is intended to be used with the Babel system.
+------------------------------------------------------
+
+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 Sigitas Tolušis.
+
+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
+
+\declarepreamble\fdpreamble
+This is a generated file.
+
+Copyright 2023 Sigitas Tolušis and any individual authors
+listed elsewhere in this file. All rights reserved.
+
+This file is intended to be used with the Babel system.
+------------------------------------------------------
+
+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 Sigitas Tolušis.
+
+In particular, permission is granted to customize the declarations in
+this file to serve the needs of your installation.
+
+However, NO PERMISSION is granted to distribute a modified version
+of this file under its original name.
+
+\endpreamble
+
+\keepsilent
+
+\askforoverwritefalse
+
+\usedir{tex/generic/babel}
+
+\usepreamble\mainpreamble
+\generate{\file{lithuanian.ldf}{\from{babel-lithuanian.dtx}{code}}
+ }
+\usepreamble\fdpreamble
+
+\ifToplevel{
+\Msg{***********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space All *.def, *.fd, *.ldf, *.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the files ending with}
+\Msg{* '.dtx' and `.fdd' through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing}
+\Msg{***********************************************************}
+}
+
+\endinput
diff --git a/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.pdf b/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.pdf
new file mode 100644
index 0000000000..a9c7dae9fc
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/lithuanian/babel-lithuanian.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/README.md b/macros/latex/contrib/bfh-ci/README.md
index 5bdec4fd98..eb24c321a4 100644
--- a/macros/latex/contrib/bfh-ci/README.md
+++ b/macros/latex/contrib/bfh-ci/README.md
@@ -1,8 +1,8 @@
# BFH-CI – Corporate Design LaTeX Templates for Bern University of Applied Sciences
-Copyright (C) Marei Peischl <marei@peitex.de> & Andreas Habegger <andreas.habegger@bfh.ch>, 2021–2022
+Copyright (C) Marei Peischl <marei@peitex.de> & Andreas Habegger <andreas.habegger@bfh.ch>, 2021–2023
-bfh 2022/11/15 v2.1.4
+bfh 2023/13/07 v2.1.5
***************************************************************************
@@ -98,4 +98,6 @@ BFH-CI uses the translations package to provide translations for specific elemen
* v2.1.3 (2022/03/20)
- Fix partnerlogo alignment for titlepage=false in bfhlayout
* v2.1.4 (2022/11/15)
- - Fix french translations \ No newline at end of file
+ - Fix french translations
+* v2.1.5 (2023/03/07)
+ - Small layout adjustments in project proposals \ No newline at end of file
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer-Sidebar.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer-Sidebar.pdf
index 604a003e66..8d6e5bbf79 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer-Sidebar.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer-Sidebar.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer.pdf
index a87ee33d39..0bb9e0cfc5 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHBeamer.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHFactsheet.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHFactsheet.pdf
index 19b46eaa8d..f69cd18e14 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHFactsheet.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHFactsheet.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHLetter.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHLetter.pdf
index 81e01811b0..f18748c58c 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHLetter.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHLetter.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHProjektProposal.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHProjektProposal.pdf
index 112b5616ac..fb126c2d0d 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHProjektProposal.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHProjektProposal.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHPub.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHPub.pdf
index 5c4571a198..b3969bc66e 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHPub.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHPub.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHSciPoster.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHSciPoster.pdf
index 6982ff0783..ca21c15947 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHSciPoster.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHSciPoster.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHThesis.pdf b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHThesis.pdf
index bab5f6efb3..1cf95b2ff4 100644
--- a/macros/latex/contrib/bfh-ci/doc/DEMO-BFHThesis.pdf
+++ b/macros/latex/contrib/bfh-ci/doc/DEMO-BFHThesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/bfh-ci/example/DEMO-BFHSciPoster.tex b/macros/latex/contrib/bfh-ci/example/DEMO-BFHSciPoster.tex
index 4713ff94dc..d322428f4b 100644
--- a/macros/latex/contrib/bfh-ci/example/DEMO-BFHSciPoster.tex
+++ b/macros/latex/contrib/bfh-ci/example/DEMO-BFHSciPoster.tex
@@ -54,7 +54,7 @@
\begin{posterboxenv}[,BFH-abstract,title=Zusammenfassung]{name=intro,column=1,row=1,span=4}
Die \cls{bfhsciposter}-Klasse basiert auf dem \pck{tcolorbox} Paket von Thomas F. Sturm.
- Sie versucht einen einfachen Weg zu bieten, wissenschaftliche Poster im Stil des Vorporate Design der Berner Fachhochschule zu erstellen. Dieses Dokument dient zur Dokumentation und als Verwendungsbeispiel.
+ Sie versucht einen einfachen Weg zu bieten, wissenschaftliche Poster im Stil des Corporate Design der Berner Fachhochschule zu erstellen. Dieses Dokument dient zur Dokumentation und als Verwendungsbeispiel.
Dieses Dokument verwendet unterschiedliche Boxentypen. Dies ist selbstverständlich für die praktische Verwendung nicht empfehlenswert. Dieser Modus dient lediglich Demonstrationszwecken.
\end{posterboxenv}
@@ -114,14 +114,14 @@
Ein Beispiel für den Stil \code{framed} ohne einen eigenen Titel.
\end{posterboxenv}
- Box mit Verweis
+% Box mit Verweis
\begin{posterboxenv}[title=Box mit Verweis,BFH-framed]{name=verweis,column=4, above=row6}
Beispielbox mit Pfeil, um zwei Boxen miteinander zu verknüpfen oder Leseabzweigungen zu generieren.
\end{posterboxenv}
-Zwischen den Boxen kann direkt TikZ-Code eingegeben werden. Das Namensschema der Boxen als Koordinaten lautet
- TCBPOSTER@<boxname>.ankerpunkt
- Für genauere Erläuterungen zur Syntax, bietet die tikz-Anleitung genauere Angaben, weitere benannte Koordinaten finden sich in der tcolorbox-Dokumentation
+%Zwischen den Boxen kann direkt TikZ-Code eingegeben werden. Das Namensschema der Boxen als Koordinaten lautet
+% TCBPOSTER@<boxname>.ankerpunkt
+% Für genauere Erläuterungen zur Syntax, bietet die tikz-Anleitung genauere Angaben, weitere benannte Koordinaten finden sich in der tcolorbox-Dokumentation
\draw[BFH-Orange,line width=4pt,->] ([yshift=-1cm]TCBPOSTER@verweis.east) -| ([xshift=1cm]TCBPOSTER@colored.east) -- (TCBPOSTER@colored.east);
% Relative Positionierung
diff --git a/macros/latex/contrib/bfh-ci/tex/beamercolorthemeBFH.sty b/macros/latex/contrib/bfh-ci/tex/beamercolorthemeBFH.sty
index 510ae8dafa..b07c382d07 100644
--- a/macros/latex/contrib/bfh-ci/tex/beamercolorthemeBFH.sty
+++ b/macros/latex/contrib/bfh-ci/tex/beamercolorthemeBFH.sty
@@ -1,9 +1,9 @@
-%% This is file `beamercolorthemeBFH.sty' version 2.1.4 (2022/11/15),
+%% This is file `beamercolorthemeBFH.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesPackage{beamercolorthemeBFH}[2022/03/01 v2.1.2 BFH-CI beamer color theme, CI of Bern University of Applied Sciences]
+\ProvidesPackage{beamercolorthemeBFH}[2023/03/07 v2.1.5 BFH-CI beamer color theme, CI of Bern University of Applied Sciences]
% ====================
% Dependencies
@@ -107,4 +107,4 @@
\mode<all>
-\endinput \ No newline at end of file
+\endinput
diff --git a/macros/latex/contrib/bfh-ci/tex/beamerfontthemeBFH.sty b/macros/latex/contrib/bfh-ci/tex/beamerfontthemeBFH.sty
index 5b8e75d962..5ee5c10952 100644
--- a/macros/latex/contrib/bfh-ci/tex/beamerfontthemeBFH.sty
+++ b/macros/latex/contrib/bfh-ci/tex/beamerfontthemeBFH.sty
@@ -1,9 +1,9 @@
-%% This is file `beamerfontthemeBFH.sty' version 2.1.4 (2022/11/15),
+%% This is file `beamerfontthemeBFH.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesPackage{beamerfontthemeBFH}[2022/03/01 v2.1.2 BFH-CI beamer font theme, CI of Bern University of Applied Sciences]
+\ProvidesPackage{beamerfontthemeBFH}[2023/03/07 v2.1.5 BFH-CI beamer font theme, CI of Bern University of Applied Sciences]
% ====================
% Dependencies
diff --git a/macros/latex/contrib/bfh-ci/tex/beamerinnerthemeBFH.sty b/macros/latex/contrib/bfh-ci/tex/beamerinnerthemeBFH.sty
index d11d039072..7d31e0de6f 100644
--- a/macros/latex/contrib/bfh-ci/tex/beamerinnerthemeBFH.sty
+++ b/macros/latex/contrib/bfh-ci/tex/beamerinnerthemeBFH.sty
@@ -1,9 +1,9 @@
-%% This is file `beamerinnerthemeBFH.sty' version 2.1.4 (2022/11/15),
+%% This is file `beamerinnerthemeBFH.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplPackage{beamerinnerthemeBFH}{2022/03/01}{2.1.2}{BFH-CI beamer inner theme, CI of Bern University of Applied Sciences}
+\ProvidesExplPackage{beamerinnerthemeBFH}{2023/03/07}{2.1.5}{BFH-CI beamer inner theme, CI of Bern University of Applied Sciences}
\RequirePackage{l3keys2e}
diff --git a/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH-sidebar.sty b/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH-sidebar.sty
index 09342651a6..7b79a10200 100644
--- a/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH-sidebar.sty
+++ b/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH-sidebar.sty
@@ -1,9 +1,9 @@
-%% This is file `beamerouterthemeBFH-sidebar.sty' version 2.1.4 (2022/11/15),
+%% This is file `beamerouterthemeBFH-sidebar.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesPackage{beamerouterthemeBFH-sidebar}[2022/03/01 v2.1.2 BFH-CI beamer outer theme sidebar variant, CI of Bern University of Applied Sciences]
+\ProvidesPackage{beamerouterthemeBFH-sidebar}[2023/03/07 v2.1.5 BFH-CI beamer outer theme sidebar variant, CI of Bern University of Applied Sciences]
\mode<presentation>
\useoutertheme{BFH}
diff --git a/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH.sty b/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH.sty
index 6f93f07ac3..ca985f7786 100644
--- a/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH.sty
+++ b/macros/latex/contrib/bfh-ci/tex/beamerouterthemeBFH.sty
@@ -1,9 +1,9 @@
-%% This is file `beamerouterthemeBFH.sty' version 2.1.4 (2022/11/15),
+%% This is file `beamerouterthemeBFH.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesPackage{beamerouterthemeBFH}[2022/03/01 v2.1.2 BFH-CI beamer outer theme, CI of Bern University of Applied Sciences]
+\ProvidesPackage{beamerouterthemeBFH}[2023/03/07 v2.1.5 BFH-CI beamer outer theme, CI of Bern University of Applied Sciences]
\RequirePackage{l3keys2e}
diff --git a/macros/latex/contrib/bfh-ci/tex/beamerthemeBFH.sty b/macros/latex/contrib/bfh-ci/tex/beamerthemeBFH.sty
index 9952272cd1..e31e9cfc6e 100644
--- a/macros/latex/contrib/bfh-ci/tex/beamerthemeBFH.sty
+++ b/macros/latex/contrib/bfh-ci/tex/beamerthemeBFH.sty
@@ -1,9 +1,9 @@
-%% This is file `beamerthemeBFH.sty' version 2.1.4 (2022/11/15),
+%% This is file `beamerthemeBFH.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesPackage{beamerthemeBFH}[2022/03/01 v2.1.2 BFH-CI beamer theme, CI of Bern University of Applied Sciences]
+\ProvidesPackage{beamerthemeBFH}[2023/03/07 v2.1.5 BFH-CI beamer theme, CI of Bern University of Applied Sciences]
% ====================
% Dependencies
% ====================
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a0paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a0paper.clo
index 925333a997..7f4cbdfcba 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a0paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a0paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a0paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a0paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-a0paper.clo}{2022/03/01}{2.1.2}{bfh-ci~size~adjustments~for~a0paper}
+\ProvidesExplFile{bfh-a0paper.clo}{2023/03/07}{2.1.5}{bfh-ci~size~adjustments~for~a0paper}
\cs_set:Nn \ptxcd_setup_title_sizes: {
\cs_set:Nn \ptxcd_title_fontsize: {{126bp}{165bp}}
\cs_set:Nn \ptxcd_subtitle_fontsize: {{38bp}{55bp}}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a1paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a1paper.clo
index e1227d53c0..49ddb4701c 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a1paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a1paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a1paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a1paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-a1paper.clo}{2022/03/01}{2.1.2}{bfh-ci~size~adjustments~for~a1paper}
+\ProvidesExplFile{bfh-a1paper.clo}{2023/03/07}{2.1.5}{bfh-ci~size~adjustments~for~a1paper}
\cs_set:Nn \ptxcd_setup_title_sizes: {
\cs_set:Nn \ptxcd_title_fontsize: {{90bp}{108bp}}
\cs_set:Nn \ptxcd_subtitle_fontsize: {{27bp}{32.5bp}}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a2paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a2paper.clo
index 546ecb4d01..5e6f3031fb 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a2paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a2paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a2paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a2paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-a2paper.clo}{2022/03/01}{2.1.2}{bfh-ci~size~adjustments~for~a2paper}
+\ProvidesExplFile{bfh-a2paper.clo}{2023/03/07}{2.1.5}{bfh-ci~size~adjustments~for~a2paper}
\cs_set:Nn \ptxcd_setup_title_sizes: {
\cs_set:Nn \ptxcd_title_fontsize: {{64bp}{77bp}}
\cs_set:Nn \ptxcd_subtitle_fontsize: {{19.5bp}{23.4bp}}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a3paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a3paper.clo
index d49c0b434c..3ddcfbbf5d 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a3paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a3paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a3paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a3paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-a0paper.clo}{2022/03/01}{2.1.2}{bfh-ci~size~adjustments~for~a1paper}
+\ProvidesExplFile{bfh-a0paper.clo}{2023/03/07}{2.1.5}{bfh-ci~size~adjustments~for~a1paper}
\cs_set:Nn \ptxcd_setup_title_sizes: {
\cs_set:Nn \ptxcd_title_fontsize: {{46bp}{55.2bp}}
\cs_set:Nn \ptxcd_subtitle_fontsize: {{19.5bp}{23.4bp}}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a4paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a4paper.clo
index 7aff59fd89..7f6386bf99 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a4paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a4paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a4paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a4paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-a0paper.clo}{2022/03/01}{2.1.2}{bfh-ci~size~adjustments~for~a4paper}
+\ProvidesExplFile{bfh-a0paper.clo}{2023/03/07}{2.1.5}{bfh-ci~size~adjustments~for~a4paper}
\cs_set:Nn \ptxcd_setup_base_sizes: {
\dim_gset:Nn \g_ptxcd_rule_height_dim {2.5mm}
\dim_gset:Nn \g_ptxcd_rule_arc_dim {.5mm}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a5paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a5paper.clo
index ee80d4a2ce..6ed16667ec 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a5paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a5paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a5paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a5paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-a5paper.clo}{2022/03/01}{2.1.2}{bfh-ci~size~adjustments~for~a5paper}
+\ProvidesExplFile{bfh-a5paper.clo}{2023/03/07}{2.1.5}{bfh-ci~size~adjustments~for~a5paper}
\cs_set:Nn \ptxcd_setup_base_sizes: {
\dim_gset:Nn \g_ptxcd_rule_height_dim {2.5mm}
\dim_gset:Nn \g_ptxcd_rule_arc_dim {.5mm}%
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-a6paper.clo b/macros/latex/contrib/bfh-ci/tex/bfh-a6paper.clo
index 01200be80e..47c9b59884 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-a6paper.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-a6paper.clo
@@ -1,9 +1,9 @@
-%% This is file `bfh-a6paper.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfh-a6paper.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-beamerarticle.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-beamerarticle.cfg
index 241723c9b8..0bf8db6b9d 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-beamerarticle.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-beamerarticle.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-beamerarticle.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-beamerarticle.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesFile{bfh-beamerarticle.cfg} [2022/03/01 v2.1.2 beamerarticle configuration for bfhlayout]
+\ProvidesFile{bfh-beamerarticle.cfg} [2023/03/07 v2.1.5 beamerarticle configuration for bfhlayout]
\let\orig@titlegraphic\titlegraphic
\let\titlegraphic\@undefined
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-factsheet.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-factsheet.cfg
index e12b3eff68..b2a75c2c6e 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-factsheet.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-factsheet.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-factsheet.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-factsheet.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesFile{bfh-factsheet.cfg}[2022/03/01 v2.1.2 factsheet configuration for bfhlayout]
+\ProvidesFile{bfh-factsheet.cfg}[2023/03/07 v2.1.5 factsheet configuration for bfhlayout]
\KOMAoptions{headsepline=false}
\clearpairofpagestyles
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-boxes.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-boxes.cfg
index 296979578b..4e3a9e5fd9 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-layout-boxes.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-boxes.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-layout-boxes.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-layout-boxes.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,7 +29,7 @@
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{bfh-layout-boxes.cfg}[2022/03/01 v2.1.2 boxes configuration for bfhlayout]
+\ProvidesFile{bfh-layout-boxes.cfg}[2023/03/07 v2.1.5 boxes configuration for bfhlayout]
\RequirePackage{bfhcolors}
\RequirePackage{fontawesome}
\PassOptionsToPackage{most}{tcolorbox}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-listings.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-listings.cfg
index 87f87a8148..68fd2df114 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-layout-listings.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-listings.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-layout-listings.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-layout-listings.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesFile{bfh-layout-listings.cfg}[2022/03/01 v2.1.2 listings configuration for bfhlayout]
+\ProvidesFile{bfh-layout-listings.cfg}[2023/03/07 v2.1.5 listings configuration for bfhlayout]
\RequirePackage{bfhcolors}
%% Hack to fix issue with float env used in listings package
%% ref. : https://tex.stackexchange.com/questions/51867/koma-warning-about-toc
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg
index f1f8a879d1..8b8f5a242b 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-rules.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-layout-rules.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-layout-rules.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-layout-rules.cfg}{2022/03/01}{2.1.2}{rules configuration for bfhlayout}
+\ProvidesExplFile{bfh-layout-rules.cfg}{2023/03/07}{2.1.5}{rules configuration for bfhlayout}
\int_if_exist:NF \g_ptxcd_paper_int {
\int_new:N \g_ptxcd_paper_int
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-tabular.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-tabular.cfg
index d6b3f01b43..6fbc317383 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-layout-tabular.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-tabular.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-layout-tabular.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-layout-tabular.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesExplFile{bfh-layout-tabular.cfg}{2022/03/01}{2.1.2}{tabular and tabularray configuration for bfhlayout}
+\ProvidesExplFile{bfh-layout-tabular.cfg}{2023/03/07}{2.1.5}{tabular and tabularray configuration for bfhlayout}
\colorlet{BFH-table}{BFH-LightGreen!10}
\colorlet{BFH-tablehead}{BFH-LightGreen!50}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg
index 537cbf4521..f208ea1d67 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-layout-tabular.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-layout-tabular.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,7 +29,7 @@
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{bfh-layout-terminal.cfg}[2022/03/01 v2.1.2 terminal configuration for bfhlayout]
+\ProvidesFile{bfh-layout-terminal.cfg}[2023/03/07 v2.1.5 terminal configuration for bfhlayout]
\RequirePackage{bfhcolors}
\RequirePackage{tcolorbox}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-projectproposal.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-projectproposal.cfg
index 46be5e1644..3dc924f0c1 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfh-projectproposal.cfg
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-projectproposal.cfg
@@ -1,9 +1,9 @@
-%% This is file `bfh-projectproposal.cfg' version 2.1.4 (2022/11/15),
+%% This is file `bfh-projectproposal.cfg' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesFile{bfh-projectproposal.cfg}[2022/03/01 v2.1.2 projectproposal configuration for bfhlayout]
+\ProvidesFile{bfh-projectproposal.cfg}[2023/03/07 v2.1.5 projectproposal configuration for bfhlayout]
\KOMAoptions{headsepline=false}
\clearpairofpagestyles
@@ -93,7 +93,7 @@
\cs_new:Nn \ptxcd_title_data_field:n {
\tl_if_empty:cF {@#1} {
- \use:c {#1name} & \use:c {@#1}\\
+ \raggedright \use:c {#1name} &\raggedright \use:c {@#1}\tabularnewline
}
}
@@ -115,7 +115,7 @@
{\bool_set_false:N \l__ptxcd_title_dates_bool}
{\bool_set_true:N \l__ptxcd_title_dates_bool}
- \begin{tabular}{@{}p{0.2\linewidth}p{\dimexpr.3\linewidth-2\tabcolsep-.5\columnsep}@{}}%
+ \begin{tabular}{@{}p{0.2\linewidth}>{\raggedright\arraybackslash}p{\dimexpr.3\linewidth-2\tabcolsep-.5\columnsep}@{}}%
\ptxcd_title_data_field:n {advisor}
\ptxcd_title_data_field:n {coadvisor}
\bool_if:NT \l__ptxcd_title_dates_bool
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhbeamer.cls b/macros/latex/contrib/bfh-ci/tex/bfhbeamer.cls
index c9f4a11dfa..96329c1410 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhbeamer.cls
+++ b/macros/latex/contrib/bfh-ci/tex/bfhbeamer.cls
@@ -1,9 +1,9 @@
-%% This is file `bfhbeamer.cls' version 2.1.4 (2022/11/15),
+%% This is file `bfhbeamer.cls' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,7 +29,7 @@
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{bfhbeamer}[2022/03/01 v2.1.2 BFH-CI beamer layout, CI of Bern University of Applied Sciences]
+\ProvidesClass{bfhbeamer}[2023/03/07 v2.1.5 BFH-CI beamer layout, CI of Bern University of Applied Sciences]
\RequirePackage{l3keys2e}
\PassOptionsToPackage{table}{xcolor}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhcolors.sty b/macros/latex/contrib/bfh-ci/tex/bfhcolors.sty
index f5720ea29b..97321471a6 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhcolors.sty
+++ b/macros/latex/contrib/bfh-ci/tex/bfhcolors.sty
@@ -1,9 +1,9 @@
-%% This is file `bfhcolors.sty' version 2.1.4 (2022/11/15),
+%% This is file `bfhcolors.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,7 +29,7 @@
%% ============================================================================
%%
\RequirePackage{expl3}
-\ProvidesExplPackage{bfhcolors}{2022/03/01}{2.1.2}{color setup for BFH-CI, CI of Bern Universitry of Applied Sciences}
+\ProvidesExplPackage{bfhcolors}{2023/03/07}{2.1.5}{color setup for BFH-CI, CI of Bern Universitry of Applied Sciences}
\RequirePackage{l3keys2e}
\tl_new:N \g__ptxcd_colormode_tl
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhfonts.sty b/macros/latex/contrib/bfh-ci/tex/bfhfonts.sty
index 309fdeea54..a6ee8000a7 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhfonts.sty
+++ b/macros/latex/contrib/bfh-ci/tex/bfhfonts.sty
@@ -1,9 +1,9 @@
-%% This is file `bfhfonts.sty' version 2.1.4 (2022/11/15),
+%% This is file `bfhfonts.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,10 +29,11 @@
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bfhfonts}[2022/03/01 v2.1.2 BFH-CI (fonts Module)]
+\ProvidesPackage{bfhfonts}[2023/03/07 v2.1.5 BFH-CI (fonts Module)]
\RequirePackage{iftex}
\RequirePackage{anyfontsize}
+\RequirePackage{amssymb}
\ifPDFTeX
\RequirePackage{nunito}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhlayout.sty b/macros/latex/contrib/bfh-ci/tex/bfhlayout.sty
index e7d4849524..8764fa6d19 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhlayout.sty
+++ b/macros/latex/contrib/bfh-ci/tex/bfhlayout.sty
@@ -1,9 +1,9 @@
-%% This is file `bfhlayout.sty' version 2.1.4 (2022/11/15),
+%% This is file `bfhlayout.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,7 +29,7 @@
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bfhlayout}[2022/03/01 v2.1.2 BFH style package (layout)]
+\ProvidesPackage{bfhlayout}[2023/03/07 v2.1.5 BFH style package (layout)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Process Options created for bfharticle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -182,7 +182,6 @@
\RequirePackage{scrlayer-scrpage}
\RequirePackage{amsmath}
-\RequirePackage{amssymb}
\RequirePackage{bfhfonts}
\RequirePackage{graphicx}
%%
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhletter.sty b/macros/latex/contrib/bfh-ci/tex/bfhletter.sty
index 03df3d202f..8ded1fc173 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhletter.sty
+++ b/macros/latex/contrib/bfh-ci/tex/bfhletter.sty
@@ -1,9 +1,9 @@
-%% This is file `bfhletter.sty' version 2.1.4 (2022/11/15),
+%% This is file `bfhletter.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -28,7 +28,7 @@
%%
%% ============================================================================
%%
-\ProvidesPackage{bfhletter}[2022/03/01 v2.1.2 letter layouts for BFH-CI, CI of Bern University of Applied Sciences]
+\ProvidesPackage{bfhletter}[2023/03/07 v2.1.5 letter layouts for BFH-CI, CI of Bern University of Applied Sciences]
\PassOptionsToPackage{fromlogo=true,refline=false,addrfield=topaligned,pagenumber=botright}{scrletter}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhlettersize9.5pt.clo b/macros/latex/contrib/bfh-ci/tex/bfhlettersize9.5pt.clo
index d16103befe..c994878dc8 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhlettersize9.5pt.clo
+++ b/macros/latex/contrib/bfh-ci/tex/bfhlettersize9.5pt.clo
@@ -1,9 +1,9 @@
-%% This is file `bfhlettersize9.5pt.clo' version 2.1.4 (2022/11/15),
+%% This is file `bfhlettersize9.5pt.clo' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhmodule.sty b/macros/latex/contrib/bfh-ci/tex/bfhmodule.sty
index cdc79c4568..a81178e728 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhmodule.sty
+++ b/macros/latex/contrib/bfh-ci/tex/bfhmodule.sty
@@ -1,9 +1,9 @@
-%% This is file `bfhmodule.sty' version 2.1.4 (2022/11/15),
+%% This is file `bfhmodule.sty' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -29,7 +29,7 @@
%% ============================================================================
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{bfhmodule}{2022/03/01}{2.1.2}{BFH module package -- modular extensions for bfh-ci}
+\ProvidesExplPackage{bfhmodule}{2023/03/07}{2.1.5}{BFH module package -- modular extensions for bfh-ci}
\msg_new:nnn {bfhmodule} {module-not-found} {
You~tried~to~load~the~BFH~layout~module~#1.\\
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhpub.cls b/macros/latex/contrib/bfh-ci/tex/bfhpub.cls
index 977cda3394..f645991142 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhpub.cls
+++ b/macros/latex/contrib/bfh-ci/tex/bfhpub.cls
@@ -1,9 +1,9 @@
-%% This is file `bfhpub.cls' version 2.1.4 (2022/11/15),
+%% This is file `bfhpub.cls' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -31,7 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\ProvidesExplClass{bfhpub}
-{2022/03/01}{2.1.2}{Publications using Corporate Design of BFH (BFH-CI)}
+{2023/03/07}{2.1.5}{Publications using Corporate Design of BFH (BFH-CI)}
\RequirePackage{l3keys2e}
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhsciposter.cls b/macros/latex/contrib/bfh-ci/tex/bfhsciposter.cls
index e00f4733ab..328b45ca07 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhsciposter.cls
+++ b/macros/latex/contrib/bfh-ci/tex/bfhsciposter.cls
@@ -1,9 +1,9 @@
-%% This is file `bfhsciposter.cls' version 2.1.4 (2022/11/15),
+%% This is file `bfhsciposter.cls' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -30,7 +30,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{bfhsciposter}{2022/03/01}{2.1.2}{Scientific poster layout of BFH}
+\ProvidesExplPackage{bfhsciposter}{2023/03/07}{2.1.5}{Scientific poster layout of BFH}
\RequirePackage{l3keys2e}
\prop_new:N \g_ptxcd_clsopts_prop
@@ -561,8 +561,19 @@
\RequirePackage{bfhmodule}
\LoadBFHModule{tabular}
+
\ExplSyntaxOn% because \LoadBFHModule is required to switch it off
+%itemize
+\AtBeginDocument{
+ \cs_if_exist:NT \frenchsetup {\frenchsetup{StandardItemLabels=true}}
+}
+
+\@ifundefined {scr@fnt@labelitemi}{\newkomafont{labelitemi}{}}{}
+\setkomafont{labelitemi}{\color{BFH-Orange}}
+\cs_new:Nn \__ptxcd_itemlabel: {{\ifvmode\leavevmode\fi\usekomafont{labelitemi}\raise1.25pt\hbox{$\blacktriangleright$}}}
+\renewcommand*{\labelitemi}{\__ptxcd_itemlabel:}
+
\file_if_exist_input:n {bfh\g_ptxcd_department_str.cfg}
\endinput
diff --git a/macros/latex/contrib/bfh-ci/tex/bfhthesis.cls b/macros/latex/contrib/bfh-ci/tex/bfhthesis.cls
index ab21b6eb43..a42fef48a5 100644
--- a/macros/latex/contrib/bfh-ci/tex/bfhthesis.cls
+++ b/macros/latex/contrib/bfh-ci/tex/bfhthesis.cls
@@ -1,9 +1,9 @@
-%% This is file `bfhthesis.cls' version 2.1.4 (2022/11/15),
+%% This is file `bfhthesis.cls' version 2.1.5 (2023/03/07),
%% it is part of
%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
%% ----------------------------------------------------------------------------
%%
-%% Copyright (C) 2021–2022 by
+%% Copyright (C) 2021-2023 by
%% Marei Peischl <marei@peitex.de>
%% Andreas Habegger <andreas.habegger@bfh.ch>
%%
@@ -30,7 +30,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplClass{bfhthesis}{2022/03/01}{2.1.2}{Theses using Corporate Design of BFH (BFH-CI), CI of Bern University of Applied Sciences}
+\ProvidesExplClass{bfhthesis}{2023/03/07}{2.1.5}{Theses using Corporate Design of BFH (BFH-CI), CI of Bern University of Applied Sciences}
\RequirePackage{l3keys2e}
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 16858b67a9..6ef63c0179 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorart}
- {2023/01/08} {}
+ {2023/03/07} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 913e17590d..6b19466127 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorbook}
- {2023/01/08} {}
+ {2023/03/07} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty
index 0d620fed42..0afe2b971d 100644
--- a/macros/latex/contrib/colorist/colorist-fancy.sty
+++ b/macros/latex/contrib/colorist/colorist-fancy.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist-fancy}
- {2023/01/08} {}
+ {2023/03/07} {}
{The fancy style of colorist}
\IfPackageLoadedTF { colorist } {}
@@ -492,6 +492,7 @@
%%================================
%% Lists
%%================================
+\PassOptionsToPackage { inline } { enumitem }
\RequirePackage { enumitem }
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
@@ -691,7 +692,7 @@ heading_suffix "}\n"
\RequirePackage { mathtools }
\RequirePackage { amsthm }
-\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+\def\tagform@#1{\maketag@@@{\textcolor{.!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
\PassOptionsToPackage { nopatch = eqnum } { microtype }
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 551a9add41..083a67f51c 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist}
- {2023/01/08} {}
+ {2023/03/07} {}
{A colorful style for articles and books}
\keys_define:nn { colorist }
diff --git a/macros/latex/contrib/lastpage/README b/macros/latex/contrib/lastpage/README
index 322cfbb6de..6135895020 100644
--- a/macros/latex/contrib/lastpage/README
+++ b/macros/latex/contrib/lastpage/README
@@ -1,4 +1,4 @@
-README for lastpage package, 2021/09/03, v1.2n
+README for lastpage package, 2023-03-07, v2.0a
TABLE OF CONTENTS
@@ -17,7 +17,7 @@ TABLE OF CONTENTS
1 INTRODUCTION
==============
-This LaTeX package puts the label LastPage (\AtEndDocument)
+This LaTeX package puts the label LastPage at the end of the document
into the .aux file, allowing the user to refer to the last page
of a document. This might be particularly useful in places
like headers or footers. -
@@ -26,47 +26,46 @@ fnsymbol page numbering scheme is used, or another package
has output after this package, or the number of pages
instead of the last page's name is needed, or the page
numbers exeed a certain range, there might be problems,
-which can be solved by using the pageslts package instead.
+which can be solved by using the pageslts package instead
+[which needs updating to current LaTeX-format and therefore might fail].
This material is published under the LPPL 1.3c: 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. This version of this license is in
+Public License, either version 1.3c of this license or (at your option)
+any later version. This version of this license is in
https://www.latex-project.org/lppl/lppl-1-3c.txt
and 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
-2005/12/01 or later.
+and version 1.3c or later is part of all distributions of
+LaTeX version 2005-12-01 or later.
2 DOWNLOAD
==========
-`lastpage' is available on CTAN:
-https://www.ctan.org/pkg/lastpage
+"lastpage" is available on CTAN:
+https://ctan.org/pkg/lastpage
Also a ZIP file is provided that contains the files:
the manual (lastpage.pdf), the example (lastpage-example.tex),
the compiled example (lastpage-example.pdf),
driver (lastpage.drv), lastpage.dtx,
installation file (lastpage.ins),
-the style files (lastpage.sty, lastpage209.sty),
+the style files (lastpage.sty, lastpage209.sty, lastpage23.sty,
+lastpageclassic.sty, lastpagemodern.sty),
and this README, already sorted in a TDS tree:
-https://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
+https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
3 INSTALLATION
==============
-First, please make sure that there is no old version of
-lastpage at some obsolete place in your system.
-
Installation with ZIP file in TDS format
----------------------------------------
-The ZIP file `lastpage.tds.zip' contains the files
+The ZIP file "lastpage.tds.zip" contains the files
sorted in a TDS tree. Thus you can directly unpack the
ZIP file inside a TDS tree.
-See https://www.ctan.org/TDS-guidelines for an explanation
+See https://ctan.org/TDS-guidelines for an explanation
of TDS.
Example:
cd /...somewhere.../texmf
@@ -82,18 +81,22 @@ a) Download the lastpage files from CTAN.
If necessary, unpack them.
b) Generate the package and driver files:
tex lastpage.dtx
-c) Install the file `*.sty' in your TDS tree:
- cp *.sty TDS:tex/latex/lastpage/
- Replace `TDS:' by the prefix of your TDS tree
+c) Install the files "*.sty" in your TDS tree:
+ cp lastpage.sty TDS:tex/latex/lastpage/
+ cp lastpage209.sty TDS:tex/latex/lastpage/
+ cp lastpage23.sty TDS:tex/latex/lastpage/
+ cp lastpageclassic.sty TDS:tex/latex/lastpage/
+ cp lastpagemodern.sty TDS:tex/latex/lastpage/
+ Replace "TDS:" by the prefix of your TDS tree
(texmf directory).
d) Create the documentation, if necessary, e.g.
pdflatex lastpage.dtx
makeindex -s gind.ist lastpage.idx
- pdflatex undolabl.dtx
+ pdflatex lastpage.dtx
makeindex -s gind.ist lastpage.idx
pdflatex lastpage.dtx
-e) Update the databases, if necessary, e.g. for teTeX:
- mktexlsr .../texmf
+e) Update the databases if necessary, e.g. for TeXLive
+ texhash or mktexlsr.
f) Create the lastpage-example.pdf, if necessary, e.g.
pdflatex lastpage-example.tex
pdflatex lastpage-example.tex
@@ -110,19 +113,18 @@ g) Copy the documentation files to
The lastpage package does not depend on other packages,
but the lastpage.dtx does (for unpacking and constructing
the documentation), see "7.1 Downloads" in the manual
-https://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
+https://mirror.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf
5 PACKAGE COMPATIBILITY
=======================
-lastpage is not compatible with the very old version 2.0
+lastpage is not compatible with the ancient version 2.0
(and earlier) of the endfloat package. The recent version of
-endfloat is available at
-https://www.ctan.org/pkg/endfloat
+endfloat is available at https://ctan.org/pkg/endfloat
6 AUTHORS/MAINTAINER
-=====================
+====================
* Author of the original main code:
Jeffrey P. Goldberg (Thanks!)
@@ -131,19 +133,19 @@ https://www.ctan.org/pkg/endfloat
7 BUG REPORTS
-==============
+=============
A bug report should contain:
* Comprehensive problem description. This includes error or
warning messages.
* \errorcontextlines=\maxdimen can be added in the
TeX code to get more information in TeX error messages.
-* Minimal test file that shows the problem, but does not
- contain any unnecessary packages and code.
+* Minimal test file that shows the problem,
+ but does not contain any unnecessary packages and code.
* Used drivers/programs.
* Version information about used packages and programs.
-* If you are using LaTeX, then add "\listfiles". Then
- a list of version information is printed at the end
+* If you are using LaTeX, then add "\listfiles" to the document.
+ Then a list of version information is printed at the end
of the LaTeX run.
* Please no other files than the minimal test file.
The other files .log, .dvi, .ps, .pdf are seldom
@@ -158,6 +160,6 @@ Bug reports can be send to the maintainer:
8 KNOWN PROBLEMS
-=================
+================
Really a lot, see chapter 3 of the documentation! \ No newline at end of file
diff --git a/macros/latex/contrib/lastpage/lastpage-example.pdf b/macros/latex/contrib/lastpage/lastpage-example.pdf
index a3c7c07477..9a6cd36a1c 100644
--- a/macros/latex/contrib/lastpage/lastpage-example.pdf
+++ b/macros/latex/contrib/lastpage/lastpage-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/lastpage/lastpage.dtx b/macros/latex/contrib/lastpage/lastpage.dtx
index 099d035a99..2b5a529436 100644
--- a/macros/latex/contrib/lastpage/lastpage.dtx
+++ b/macros/latex/contrib/lastpage/lastpage.dtx
@@ -1,46 +1,54 @@
% \iffalse meta-comment
%
% File: lastpage.dtx
-% Version: 2021/09/03 v1.2n
+% Version: 2023-03-07 v2.0a
+% Info: Refers to last page's name
%
-% Copyright (C) 2010 - 2021 by
-% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+% Copyright © 2010 - 2023 by
+% H.-Martin Münch <Martin dot Muench at Uni-Bonn dot de>
% Portions of code copyrighted by other people as marked.
%
% This package was invented by Jeffrey P. Goldberg.
% I thought that a replacement was needed and therefore created the pageslts package,
-% https://www.ctan.org/pkg/pageslts
+% 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 \thepage{} of \pageref{LastPage}"
+% to get "Page 7 of 9" or "Page VII of IX",
+% the NUMBER of pages is nowadays available via \@abspage@last from the kernel,
+% but with pages for example I to X and then 1 to 10, the number of pages would be "20",
+% while the name of the last page is "10". Decide what you need/want!
+%
% 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. This version of this license is in
-% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% https://www.latex-project.org/lppl/lppl-1-3c.txt
% and 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 2005/12/01 or later.
+% LaTeX version 2005-12-01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
-% The Current Maintainer of this work is H.-Martin Muench.
+% The Current Maintainer of this work is H.-Martin Münch.
%
% This work consists of the main source file lastpage.dtx,
% the README, and the derived files
-% lastpage.sty, lastpage.pdf,
-% lastpage.ins, lastpage.drv,
+% lastpage.sty, lastpage209.sty, lastpage2e.sty,
+% lastpageclassic.sty, lastpagemodern.sty,
+% lastpage.pdf, lastpage.ins, lastpage.drv,
% lastpage-example.tex, lastpage-example.pdf.
%
-% 'lastpage' is available on CTAN:
-% https://www.ctan.org/pkg/lastpage
+% "lastpage" is available on CTAN:
+% https://ctan.org/pkg/lastpage
%
% Also a TDS.ZIP file is provided that contains all the files
% already sorted in a TDS tree:
-% https://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
+% https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip
%
%<*ignore>
\begingroup
@@ -55,10 +63,10 @@
%</ignore>
%<*install>
\input docstrip.tex
-\Msg{*********************************************************************}
-\Msg{* Installation}
-\Msg{* Package: lastpage 2021/09/03 v1.2n Refers to last page's name (HMM)}
-\Msg{*********************************************************************}
+\Msg{**********************************************************************}
+\Msg{* Installation *}
+\Msg{* Package: lastpage 2023-03-07 v2.0a Refers to last page's name (HMM)*}
+\Msg{**********************************************************************}
\keepsilent
\askforoverwritefalse
@@ -69,17 +77,13 @@
This is a generated file.
Project: lastpage
-Version: 2021/09/03 v1.2n
+Version: 2023-03-07 v2.0a
+Info: Refers to last page's name
-Copyright (C) 2010 - 2021 by
- H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+Copyright (C) 2010 - 2023 by
+ H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
Portions of code copyrighted by other people as marked.
-The usual disclaimer applies:
-If it doesn't work right that's your problem.
-(Nevertheless, send an e-mail to the maintainer
- when you find an error in this package.)
-
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
@@ -88,31 +92,37 @@ version. This version of this license is in
and 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 2005/12/01 or later.
+LaTeX version 2005-12-01 or later.
This work has the LPPL maintenance status "maintained".
The Current Maintainer of this work is H.-Martin Muench.
-This package was invented by
-Jeffrey P. Goldberg (jeffrey+news at goldmark dot org).
+This package was invented by Jeffrey P. Goldberg.
I thought that a replacement was needed and therefore created the pageslts package,
-https://www.ctan.org/pkg/pageslts
+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}"
+to get "Page 7 of 9" or "Page VII of IX",
+the NUMBER of pages is nowadays available via slash @abspage@last from the kernel,
+but with pages for example I to X and then 1 to 10, the number of pages would be "20",
+while the name of the last page is "10". Decide what you need/want!
+
This work consists of the main source file lastpage.dtx,
the README, and the derived files
- lastpage.sty, lastpage.pdf,
- lastpage.ins, lastpage.drv,
+ lastpage.sty, lastpage209.sty, lastpage2e.sty,
+ lastpageclassic.sty, lastpagemodern.sty,
+ lastpage.pdf, lastpage.ins, lastpage.drv,
lastpage-example.tex, lastpage-example.pdf.
In memoriam
- Claudia Simone Barth + 1996/01/30
- Tommy Muench + 2014/01/02
- Hans-Klaus Muench + 2014/08/24
+ Claudia Simone Barth + 1996-01-30
+ Tommy Muench + 2014-01-02
+ Hans-Klaus Muench + 2014-08-24
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -121,8 +131,11 @@ In memoriam
\file{lastpage.ins}{\from{lastpage.dtx}{install}}%
\file{lastpage.drv}{\from{lastpage.dtx}{driver}}%
\usedir{tex/latex/lastpage}%
- \file{lastpage209.sty}{\from{lastpage.dtx}{lastpage209}}%
\file{lastpage.sty}{\from{lastpage.dtx}{package}}%
+ \file{lastpage209.sty}{\from{lastpage.dtx}{lastpage209}}%
+ \file{lastpage2e.sty}{\from{lastpage.dtx}{lastpage2e}}%
+ \file{lastpageclassic.sty}{\from{lastpage.dtx}{lastpageclassic}}%
+ \file{lastpagemodern.sty}{\from{lastpage.dtx}{lastpagemodern}}%
\usedir{doc/latex/lastpage}%
\file{lastpage-example.tex}{\from{lastpage.dtx}{example}}%
}
@@ -134,7 +147,8 @@ In memoriam
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
-\Msg{* lastpage.sty (or lastpage209.sty for TeX 2.09)}
+\Msg{* lastpage.sty, lastpage209.sty, lastpage2e.sty,}
+\Msg{* lastpageclassic.sty, and lastpagemodern.sty}
\Msg{*}
\Msg{* To produce the documentation run the file `lastpage.drv'}
\Msg{* through (pdf)LaTeX, e.g.}
@@ -168,19 +182,14 @@ In memoriam
%
% \begin{macrocode}
%<*driver>
-\NeedsTeXFormat{LaTeX2e}[2014/05/01]
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesFile{lastpage.drv}%
- [2021/09/03 v1.2n Refers to last page's name (HMM)]
-\documentclass{ltxdoc}[2015/03/26]% v2.0w
-\usepackage{holtxdoc}[2012/03/21]% v0.24
-%% lastpage may work with earlier versions of LaTeX2e and those
-%% class and package, but this was not tested.
-%% Please consider updating your LaTeX, class, and package
-%% to the most recent version (if they are not already the most
-%% recent version).
+ [2023-03-07 v2.0a Refers to last page's name (HMM)]
+\documentclass{ltxdoc}[2022/06/22]% v2.1i 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)},%
- pdfkeywords={LaTeX, lastpage, last page, page number, page name, H.-Martin Muench, Jeffrey P. Goldberg},%
+ pdfkeywords={LaTeX, lastpage, last page, page number, page name},%
pdfencoding=auto,%
pdflang={en},%
breaklinks=true,%
@@ -195,36 +204,15 @@ In memoriam
pdfwindowui=true,%
pdfnewwindow=true%
}
-\usepackage{ulem}[2012/05/18]% no version is given in the ulem.sty file
\CodelineIndex
-\hyphenation{created every-thing ignored}
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
+\hyphenation{every-thing}
\begin{document}
\DocInput{lastpage.dtx}%
\end{document}
%</driver>
% \end{macrocode}
-%
% \fi
%
-% \CheckSum{316}
-%
-% \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 \~}
-%
% \GetFileInfo{lastpage.drv}
%
% \begingroup
@@ -242,67 +230,83 @@ In memoriam
% }%^^A
% \expandafter\endgroup\x
%
-% \DoNotIndex{\",\-,\,,\\,\noindent}
-% \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage}
-% \DoNotIndex{\NeedsTeXFormat,\plainTeX,\TeX,\LaTeX,\pdfLaTeX}
-% \DoNotIndex{\textbf,\textit,\textsf,\texttt,\underline,\mathord,\normalsize}
-% \DoNotIndex{\textquotedblleft,\textquotedblright}
-% \DoNotIndex{\ifx,\ifnum,\gdef,\href,\pageref,\empty}
-% \DoNotIndex{\newpage,\pagebreak,\newline,\linebreak,\nolinebreak,\MessageBreak}
-% \DoNotIndex{\smallskip,\medskip,\bigskip,\space,\hfil,\qquad,\thinspace}
-% \DoNotIndex{\listfiles,\section,\today,\the,\arabic}
-% \DoNotIndex{\makeatletter,\makeatother,\verb}
-% \DoNotIndex{\begin,\end,\enddocument,\mathrm}
-% \DoNotIndex{\lastpage@testa,\lastpage@testb,\lastpage@one}
+% \DoNotIndex{\@auxout,\@evenfoot,\@firstofone,\@ifl@t@r,\@ifpackagelater,\@ifpackageloaded}
+% \DoNotIndex{\@ifundefined,\@mainaux,\@number,\@oddfoot}
+% \DoNotIndex{\addtocounter,\AddToHook,\arabic,\begin}
+% \DoNotIndex{\bigskip,\clearpage,\csname,\documentclass,\empty,\end,\endcsname}
+% \DoNotIndex{\enddocument,\ExplSyntaxOff,\ExplSyntaxOn,\fmtversion}
+% \DoNotIndex{\g,\gdef,\here,\hfil,\Hy@temp,\Hy@unicodefalse}
+% \DoNotIndex{\hypersetup,\if@filesw,\ifHy@hypertexnames,\ifHy@pageanchor,\ifHy@plainpages}
+% \DoNotIndex{\ifnum,\IfPackageAtLeastTF,\IfPackageLoadedTF,\ifx,\immediate,\input}
+% \DoNotIndex{\label,\lastpage,\lastpage-example.tex,\lastpage.dtx,\lastpage.sty,\lastpagee.sty}
+% \DoNotIndex{\lastpageclassic.sty,\lastpagemodern.sty,\LaTeX,\listfiles}
+% \DoNotIndex{\makeatletter,\makeatother,\markboth,\message,\MessageBreak}
+% \DoNotIndex{\NeedsTeXFormat,\newcommand,\newline,\newpage}
+% \DoNotIndex{\noindent,\normalsize,\numexpr,\origenddocument,\PackageError}
+% \DoNotIndex{\PackageWarning,\pagenumbering,\pageref,\pdfstringdef,\ProvidesPackage}
+% \DoNotIndex{\qquad,\RequirePackage,\section,\slshape,\smallskip,\space,\test,\textbf}
+% \DoNotIndex{\textit,\textquotedblleft,\textquotedblright,\textsf,\texttt,\the,\thepage}
+% \DoNotIndex{\today,\upshape,\url,\usepackage,\value,\verb,\write}
%
% \title{The \xpackage{lastpage} package}
-% \date{2021/09/03 v1.2n}
-% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
+% \date{2023-03-07 v2.0a}
+% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}\\
% invented by Jeffrey P. Goldberg\\\xemail{jeffrey+news at goldmark.org}}
%
% \maketitle
%
% \begin{abstract}
-% \noindent This \LaTeX{} package puts the label \texttt{LastPage}
-% (|\AtEndDocument|) into the \xfile{.aux} file, allowing the user to refer
-% to the last page of a document. This might be particularly useful
-% in places like headers or footers.~--\\
-% When more than one page numbering scheme is used, or the fnsymbol page
-% numbering scheme is used, or another package has output after this package,
-% or the number of pages instead of the last page's name is needed,
-% or the page numbers exceed a certain range, there might be problems,
-% which can be solved by using the \xpackage{pageslts} package instead.
+% \noindent This \LaTeX{} package puts the label \texttt{LastPage}
+% at the end of the document into the \xfile{.aux} file,
+% allowing the user to refer to the last page of a document.
+% This might be particularly useful in places like headers or footers.~--\\
+% While this package allows for things like\\
+% \hbox{\textquotedblleft Page} \hbox{|\thepage{}|} of |\pageref{LastPage}|\textquotedblright{}
+% to get \textquotedblleft Page 7 of 9\textquotedblright{} or
+% \textquotedblleft Page VII of IX\textquotedblright,
+% the \emph{number} of pages is nowadays available via |\@abspage@last| from the kernel,
+% but when more than one page numbering scheme is used
+% (for example pages I~to X and then 1~to 10, thus number of pages
+% \hbox{\textquotedblleft 20\textquotedblright ,} but name of the last page
+% \hbox{\textquotedblleft 10\textquotedblright ),}
+% or when or the fnsymbol page numbering scheme is used, or another package
+% has output after this package, or the page numbers exceed a certain range,
+% there might be problems, which can be solved by using the
+% \xpackage{pageslts} package instead.
% \end{abstract}
%
% \bigskip
%
% \noindent Disclaimer for web links: The author is not responsible for any contents
-% referred to in this work unless he has full knowledge of illegal contents.
-% If any damage occurs by the use of information presented there, only the
-% author of the respective pages might be liable, not the one who has referred
-% to these pages.
+% referred to in this work unless having full knowledge of illegal contents.
+% If any damage occurs by the use of information presented there,
+% only the author of the respective pages might be liable,
+% not the one who has referred to those pages.
%
% \bigskip
%
-% \noindent {\color{green} Save per page about $200\unit{ml}$ water,
-% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\\
-% Therefore please print only if this is really necessary.}
+% \textbf{Note: At several places in this manual as alternative the \pkg{pageslts}
+% package is \textquotedblleft advertised\textquotedblright. The current version
+% 2015/12/21 v1.2f of that 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 (small to large, public as well as private, some probably obsolete)
+% it is in the update queue.}
%
% \newpage
%
% \tableofcontents
%
% \section{Introduction}
-%
% \indent This \LaTeX{} package puts the label \texttt{LastPage}
-% (|\AtEndDocument|) into the \xfile{aux} file, allowing the user to refer
+% (at end of the document) into the \xfile{aux} file, allowing the user to refer
% to the last page of a document via |\pageref{LastPage}|.
% This might be particularly useful in places like headers or footers.
%
% \bigskip
%
% This package was invented by \textbf{Jeffrey P. Goldberg},
-% and is now maintained by \textsc{H.-Martin M\"{u}nch}. A~big
+% and is now maintained by \textsc{H.-Martin Münch}. A~big
% \textquotedblleft Thank you!\textquotedblright{} to
% \textsc{Jeffrey P. Goldberg} for granting this.
%
@@ -312,19 +316,13 @@ In memoriam
% you might want to have a look at the \xpackage{pageslts} package
% (see section~\ref{sec:Alternatives}: Alternatives).
%
-% \bigskip
-%
% \section{Usage}
-%
% \indent Just load the package placing
% \begin{quote}
% |\usepackage{lastpage}|
% \end{quote}
-% \noindent in the preamble of your \LaTeXe{} source file or
-% \begin{quote}
-% |\usepackage{lastpage209}|
-% \end{quote}
-% \noindent in the preamble of your \LaTeX2.09{} source file.\\
+% \noindent in the preamble of your source file
+% (or |\input{lastpage.sty}| if |\usepackage| is unknown).\\
%
% \indent For example for various draft forms it is desirable to have a
% page reference to the last page, so that e.\,g. page footers can
@@ -363,32 +361,23 @@ In memoriam
% have got to look in the used class/package(s)/preamble instead of in the
% \xpackage{lastpage} package.\\
%
-% If the \emph{number} of the last page is needed, this can be extracted
-% from the reference with the \xpackage{refcount} package
-% (\url{https://www.ctan.org/pkg/refcount}, since version~2.0 of it):
-% \begin{verbatim}
-% \newcounter{lastpagenumber}%
-% \setcounter{lastpagenumber}{\getrefbykeydefault{LastPage}{page}{1}}%
-%\end{verbatim}
-% but this only works if the last page has an arabic number
-% (and it is not necessarily the total number of pages).
-% For example it would not work in the example file because of the
-% |Roman| pagenumbering scheme:\newline
-% |\getrefbykeydefault{LastPage}{page}{1}| would result in |IV| instead of |4|.
-% When using the \xpackage{pageslts} package, the counter |pagesLTS.pagenr|
-% holds the value of the total number of pages (after a compilation run
-% with writing access to the \xfile{.aux} file).
-%
-% \section{A lot of WARNINGS\label{sec:warn}}
-%
-% \indent (Short: try using the \xpackage{pageslts} package instead,
-% if you have room for some more |\count|ers.\footnote{To determine the number of%
-% used and available counters and other registers, the \xpackage{regstats} package%
-% might be helpful.})
+% If the total \emph{number} of pages of a document is needed,
+% the kernel already gives this by |\makeatletter\@abspage@last\makeatother|
+% (needs at least two compiler runs).
%
+% \section{Some \textsc{Warnings}\label{sec:warn}}
% \subsection{\texttt{\textbackslash AtEndDocument}\label{ssec:aed}}
+% \indent {\bfseries |\AtEndDocument| is not used by the \pkg{lastpagemodern.sty}
+% version of the lastpage package, requiring \LaTeX -format 2022-11-01
+% or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used
+% and the problem does not arise.}
%
-% \indent The output of a \LaTeXe{} run is not independent of the order
+% \bigskip
+%
+% \pkg{lastpageclassic.sty} uses |\AtEndDocument| and
+% \pkg{lastpage209.sty} redefines \linebreak |\enddocument|.
+% The last two cases are problematic:\\
+% The output of a \LaTeXe{} run is not independent of the order
% in which the packages are loaded. It is often the case that the same
% formats for which one must put tables and figure at the end,
% are the ones in which endnotes are also required.
@@ -398,11 +387,7 @@ In memoriam
% as well). Clearly it is not safe for any package writer or user
% to assume that no material will follow what they put into
% |\AtEndDocument|. Therefore a message, which begins with
-% \texttt{AED}, is included in every usage of |\AtEndDocument|.~--\\
-% \indent (The \xpackage{pageslts} package solves this problem by using
-% |\AfterLastShipout| from \textsc{Heiko Oberdiek's} \xpackage{atveryend}
-% package for the references\\
-% |\lastpageref{VeryLastPage}| and |\lastpageref{LastPages}|.)\\
+% \texttt{AED}, is included in every usage of |\AtEndDocument|.
% \xpackage{lastpage} uses |\AtEndDocument{|\ldots|\clearpage|\ldots|}|, thus\\
%|\usepackage{lastpage}|\ldots|\AtEndDocument{|\textit{something}|}|
% will place \textit{something} after the |\clearpage|. To place it earlier, use\\
@@ -420,44 +405,38 @@ In memoriam
% ...
% \end{document}
% \end{verbatim}
-% (might need a protected and/or expanded |\def|). When |\cleapage| leads
-% to some output, |\cleapage\textit{something}| instead of |\textit{something}|
+% (might need a protected and/or expanded |\def|). When |\clearpage| leads
+% to some output, |\clearpage\textit{something}| instead of |\textit{something}|
% might be wanted.
%
-% \subsection{Interaction with very old versions of the \xpackage{endfloat} package\label{sec:endfloat}}
-%
-% \indent The \emph{very} old version~2.0 (and earlier) of the \xpackage{endfloat}
-% package actually redefined the |\enddocument| command, and so interfered
-% drastically with the \LaTeXe{} commands which make use of |\AtEndDocument|.
-% Newer versions of \xpackage{endfloat} exist
-% (at~the time of writing this documentation: v2.5d as of 2011/12/25)
-% in modern documentation form, which should be available from
-% the same source where you received this file, see subsection~\ref{ss:Downloads}.
-% (\textquotedblleft Note that versions~2.1 and beyond will no longer work
-% with \LaTeX209{}. Get your administrator to upgrade your site to the
-% new standard, \LaTeXe{}. Although version~2.0 (a \LaTeX209{} version)
-% will usually work with \LaTeXe{}, it will not do so in combination
-% with certain other packages.\textquotedblright{} (\xpackage{endfloat}
-% v2.5d, 2011/12/25))\\
-% A note is placed in the style file.\\
+% \subsection{Interaction with ancient versions of the \xpackage{endfloat} package\label{sec:endfloat}}
+%
+% \indent {\bfseries |\AtEndDocument| is not used by the \pkg{lastpagemodern.sty}
+% version of the lastpage package, requiring \LaTeX -format 2022-11-01
+% or newer. Instead |\AddToHook{enddocument/afterlastpage}| is used
+% and the problem does not arise.}
+%
+% \bigskip
+% The \emph{ancient} version~2.0 (and earlier; 2.0~from 1992;
+% current version at the time of updating this documentation: 2.7~from 2019)
+% of the \xpackage{endfloat} package actually redefined the |\enddocument| command,
+% and so interfered drastically with the \LaTeXe{} commands which make use of
+% |\AtEndDocument|.
% If you want your \texttt{LastPage} to label the last page of these end floats,
% you need to load \xpackage{lastpage} after loading \xpackage{endfloat}
% (or use \texttt{VeryLastPage} from the \xpackage{pageslts} package instead).
% If, on the other hand, you \emph{want} \texttt{LastPage} to refer
% to the (not so) last page, exclusive of the floats at the end,
% then load in the reverse order. Independent from the order of
-% \xpackage{lastpage} and \xpackage{endfloat}, you will still need the
-% modified\footnote{New versions are available since more than 15~years,
-% so it really might be time to update, if you did not do it already.}
-% version of \xpackage{endfloat}.\\
+% \xpackage{lastpage} and \xpackage{endfloat}, you will still need
+% a version of \xpackage{endfloat} later than 2.0 from 1992.\\
%
% Other \LaTeX2.09{} (!) packages also seem to like to redefine
% |\enddocument|. In addition to the old \xpackage{endfloat},
% \xpackage{harvard} comes to mind. All of these will need to be
-% modified swiftly. \textbf{If possible, update to \LaTeXe{}!}
+% modified swiftly.
%
% \subsection{Page name instead of page number}
-%
% When any page numbering scheme other than \texttt{arabic} is used
% at the page, which |\pageref{LastPage}| refers to, the \textit{name}
% and not the \textit{number} of the page is given. For example,
@@ -468,90 +447,90 @@ In memoriam
% (with \textbf{s} at the end) at your disposal for remediation.)
%
% \subsection{No write access to the \xfile{aux} file}
-%
% Some packages (e.\,g. \xpackage{tikz} and \xpackage{selectp}) sometimes prevent
% the output to the \xfile{aux} file. In that case a warning is issued. This is
% no problem as long as there is another compilation run where the label to the
% last page can be placed via the \xfile{aux} file.
%
-% \subsection{Wrong last page number with more than one page numbering scheme}
-%
+% \subsection[Wrong last page number with \textgreater 1 page numbering scheme]{%
+% Wrong last page number with more than one page numbering scheme}
% When more than one page numbering scheme is used,
% \texttt{LastPage} does not give the total \textbf{number} of pages
% (even if \texttt{arabic} is the page numbering scheme of that page).
% For example, for a document with VI+36 pages, it gives
% \textquotedblleft 36\textquotedblright{} as reference to the last page.
% While this is correct, the total number of pages is $42$.\\
-% \indent (The \xpackage{pageslts} package puts |\lastpageref{LastPages}|
-% (with \textbf{s} at the end) at your disposal for remediation.)
-%
-% \subsection{\texttt{\textbackslash addtocounter\{page\}\{\ldots\} and \texttt{\textbackslash setcounter\{page\}\{\ldots\}}}}
-%
+% If the total \emph{number} of pages of a document is needed,
+% the kernel already gives this by |\makeatletter\@abspage@last\makeatother|.
+% The \xpackage{pageslts} package puts |\lastpageref{LastPages}|
+% (with \textbf{s} at the end) at your disposal for remediation,
+% giving the number of pages and linking to the last page, if linking is provided
+% for examaple by the \pkg{hyperref} package.
+%
+% \subsection{\texttt{\textbackslash addtocounter\{page\}\{\ldots\} and %
+% \texttt{\textbackslash setcounter\{page\}\{\ldots\}}}}
% When the page number was manipulated by |\addtocounter{page}{...}| or
% |\setcounter{page}{...}|, \texttt{LastPage} does not give the total
% \textbf{number} of pages (even if \texttt{arabic} is the page numbering
% scheme of that page).\\
-% \indent (The \xpackage{pageslts} package puts |\lastpageref{LastPages}|
+% The \xpackage{pageslts} package puts |\lastpageref{LastPages}|
% (with \textbf{s} at the end) at your disposal for remediation:
-% \texttt{LastPages} ignores page number manipulation.)
+% \texttt{LastPages} ignores page number manipulation. Also |\@abspage@last|
+% from the kernel is not influenced by page number manipulation.
%
% \subsection{Page number reset by \texttt{\textbackslash pagenumbering\{\ldots\}}}
-%
% At a page numbering change the page number is reset to one.
% Therefore \texttt{LastPage} does not give the total \textbf{number} of pages
% (even if \texttt{arabic} is the page numbering scheme of that page).
% Furthermore, now two pages have the same name.\\
-% \indent (The \xpackage{pageslts} package does not only put
+% The \xpackage{pageslts} package does not only put
% |\lastpageref{LastPages}| (with \textbf{s} at the end) at your disposal
% for remediation: \texttt{LastPages} also ignores page number manipulation.
% It furthermore offers the option |pagecontinue| to continue the
-% page numbering, when |\pagenumbering{...}| is used.)
+% page numbering, when |\pagenumbering{...}| is used.
%
% \subsection{Last pages of different page numbering schemes}
-%
% |\pageref{LastPage}| refers to the (maybe not so) last page of the last
% page numbering scheme. References to the respective last page of the other
% page numbering schemes are not provided.\\
-% \indent (The \xpackage{pageslts} package does this with labels
+% The \xpackage{pageslts} package does this with labels
% \texttt{pagesLTS.<numbering scheme>}, where \texttt{<numbering scheme>} is
% e.\,g. arabic, roman, Roman, alph, or Alph.\linebreak
% For fnsymbol please use |\lastpageref{pagesLTS.fnsymbol}| instead of\\
-% |\pageref{pagesLTS.fnsymbol}|.)
+% |\pageref{pagesLTS.fnsymbol}|.
%
% \subsection{Current page}
-%
% The command |\thepage| gives the \textbf{name} of the current page
% in the current page numbering scheme, which is different from the
% current total/absolute page number e.\,g. with a second
% page numbering scheme, |\addtocounter{page}{...}|, or |\setcounter{page}{...}|,
% and it will not be an arabic number at all,
% if the current page numbering scheme is not arabic.\\
-% \indent (The \xpackage{pageslts} package provides the command
+% The \xpackage{pageslts} package provides the command
% |\theCurrentPage| and for the current number of pages in the current
% page numbering scheme\\
-% |\theCurrentPageLocal|.)
+% |\theCurrentPageLocal|. The kernel already provides the
+% number of pages, which have been shipped out, as |\the\ReadonlyShipoutCounter|.
+% The current page is always |ReadonlyShipoutCounter +1|.
%
% \subsection{First page}
-%
% There is no special label at the first page.
% (This is the \textbf{last}\textsf{page} package, after all.)\\
-% \indent (The \xpackage{pageslts} package creates a label \texttt{pagesLTS.0}
-% at the first page of the document.)
+% The \xpackage{pageslts} package creates a label \texttt{pagesLTS.0}
+% at the first page of the document.
%
% \subsection{Using the \xpackage{fnsymbol} page numbering scheme\label{ss:fnsymbol}}
-%
% \indent Using the \texttt{fnsymbol} page numbering scheme can result in problems!\\
% When the page, where |\pageref{lastpage}| points at, is in \texttt{fnsymbol}
% page numbering scheme, this package might screw up --
-% and quite totally for that, especially when used together with old versions of the
-% \xpackage{hyperref} package (e.\,g. \xpackage{hyperref} v6.80x as of 2010/04/17).
-% When testing with version v6.83m as of 2012/11/06 everything seemed to worked fine,
-% but this might not always be the case.\\
-% \indent (The \xpackage{pageslts} package with |\lastpageref{lastpage}| and
-% appropriate package options should cope even with this case.)
+% and quite totally for that, especially when used together with \emph{very old}
+% versions of the \xpackage{hyperref} package (e.\,g. \xpackage{hyperref} v6.80x
+% as of 2010/04/17). When testing with version v6.83m as of 2012/11/06 everything
+% seemed to worked fine, but this might not always be the case.\\
+% The \xpackage{pageslts} package with |\lastpageref{lastpage}| and
+% appropriate package options should cope even with this case.
%
% \subsection{Page counter overflow\label{ss:overflow}}
-%
% \indent \textquotedblleft The ranges of supported counter values are more or less
% restricted. Only \cs{arabic} can be used with any counter value \TeX{} supports.
% \begin{quote}
@@ -576,12 +555,11 @@ In memoriam
% The \xpackage{alphalph} package, 2010/04/18, v2.3, first table, p.~2).\\
%
% \noindent When \textit{any} page is out of that range, there will be a counter overflow.\\
-% \indent (\xpackage{lastpage} probably is not the right package to be asked
+% \xpackage{lastpage} probably is not the right package to be asked
% to correct this anyway, but the \xpackage{pageslts} package
-% (with appropriate options) can do this.)\\
+% (with appropriate options) can do this.
%
% \subsection{Other packages manipulating \texttt{\textbackslash lastpage@putlabel}}
-%
% The \xpackage{hyperref} package redefines the |\lastpage@putlabel| command,
% and the \xpackage{revtex4} class redefines the |\lastpage@putlabel| command,
% and the \xpackage{hyperref} package redefines the |\lastpage@putlabel| command,
@@ -600,52 +578,23 @@ In memoriam
% Because |\lastpage@putlabel| is no longer called, now there should not be any
% double definitions of the \texttt{lastpage} label.
%
-% \newpage
-%
% \section{Alternatives\label{sec:Alternatives}}
-%
% There are similar packages, which do (or do not) similar things (or even more).
% As I neither know what exactly you want to accomplish when using this package
% (e.\,g.~page number vs. page name, hyperlinks or not), nor what resources
-% you have (e.\,g.~$\varepsilon$-\TeX{}), here is a list of some possible
-% alternatives:\\
-%
-% \DescribeMacro{lastpage209.sty}
-% \begin{description}
-% \item[-] If \LaTeX2.09{} is still used, and if you are unable to switch to
-% \LaTeXe{}, the \LaTeX2.09{} compatible \xpackage{lastpage209.sty} can be used,
-% which is defined as follows:\\
-% (It is also generated automatically from \xfile{lastpage.dtx} when compiling it.)
-%
-% \begin{macrocode}
-%<*lastpage209>
- % FOR LaTeX 2.09 ONLY - FOR LaTeX 2e USE lastpage.sty OR pageslts.sty!
- % This is lastpage209.sty invented by Jeffrey P. Goldberg
- % (jeffrey+news at goldmark dot org), maintained by
- % H.-Martin M\"{u}ench (Martin dot Muench at Uni-Bonn dot de).
-\let\origenddocument=\enddocument%
-\def\enddocument{\clearpage%
- {\addtocounter{page}{-1}%
- \immediate\write\@mainaux{\string\newlabel{LastPage}{{}{\thepage}}}}%
- \addtocounter{page}{+1}%
- \origenddocument%
- }%
-%</lastpage209>
-% \end{macrocode}
-%
-% (after \textsc{Piet van Oostrum}: Page layout in \LaTeX{}, March~2, 2004,
-% section~16; fancyhdr.pdf). Because |\enddocument| is redefined,
-% similar problems as with the old version of the \xpackage{endfloat}
-% package (see subsection~\ref{sec:endfloat}) will arise.\\
-% \textbf{If possible, update to \LaTeXe{}} (and maybe to the
-% \xpackage{pageslts} package)\textbf{!}
-% \end{description}
-%
-% \newpage
+% you have (e.\,g.~\TeX, \LaTeX2e, $\varepsilon$-\TeX{}, \LaTeX-format as recent
+% as 2022-11-01 or newer), here is a list of some possible alternatives:
%
-% \DescribeMacro{pageslts}
+% \DescribeMacro{pageslts}\vspace*{-\baselineskip}
% \begin{description}
-% \item[-] The \xpackage{pageslts} package first started as a revision of this
+% \item[-]
+% \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
+% (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
% \xpackage{lastpage} package, but it became obvious that a replacement was
% needed to accomplish what the \xpackage{pageslts} package does. For backward
% compatibility, a label named |LastPage| is provided.
@@ -694,9 +643,7 @@ In memoriam
% Further labels are provided for special cases.
% \end{description}
%
-% \pagebreak
-%
-% \DescribeMacro{totpages}
+% \DescribeMacro{totpages}\vspace{-\baselineskip}
% \begin{description}
% \item[-] The \xpackage{totpages} package provides a \texttt{totpages} label similar to
% \texttt{LastPages}\\
@@ -709,31 +656,32 @@ In memoriam
% by mail to determine the postage).
% \end{description}
%
-% \DescribeMacro{nofm.sty}
+% \DescribeMacro{nofm.sty}\vspace{-\baselineskip}
% \begin{description}
% \item[-] \textquotedblleft There is a package \xpackage{nofm.sty} available,
% but some versions of it are defective, and most don't work with \xpackage{fancyhdr}
% because they take over the complete page layout.\textquotedblright (\textsc{Piet van %
% Oostrum}: Page layout in \LaTeX{}, March~2, 2004, section~16; fancyhdr.pdf)\\
% \xpackage{nofm} as of 1991/02/25 (without version number), available at\\
-% \url{https://mirrors.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},\\
+% \href{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}{%
+% https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}, \linebreak
% does not work with e.\,g. \xpackage{hyperref}, redefines |\enddocument|
% as well as |\@oddhead|, |\@evenhead|, |\@oddfoot|, and |\@evenfoot|.\\
% If you know the (CTAN) location of a \textbf{working}~(!) version,
% please send an e-mail to the \xpackage{lastpage} maintainer, thanks!
% \end{description}
%
-% \DescribeMacro{count1to}
+% \DescribeMacro{count1to}\vspace{-\baselineskip}
% \begin{description}
% \item[-] You may want to have a look at the \xpackage{count1to} package.
% \end{description}
%
-% \DescribeMacro{totalcount}
+% \DescribeMacro{totalcount}\vspace{-\baselineskip}
% \begin{description}
% \item[-] The \xpackage{totalcount} package provides |\totalpages|.
% If there are only arabic page numbers consecutively running from 1 to the last page,
% this works. But for example
-%
+%
% \begin{quote}
%\begin{verbatim}
%\documentclass{article}
@@ -751,45 +699,60 @@ In memoriam
% last page even if \xpackage{hyperref} is used).
% \end{description}
%
-% \DescribeMacro{zref}
+% \DescribeMacro{zref}\vspace{-\baselineskip}
% \begin{description}
% \item[-] The \xpackage{zref} package of \textsc{Heiko Oberdiek} requires
-% $\varepsilon$-\TeX{}. \xpackage{lastpage} does not require $\varepsilon$-\TeX{},
-% but if you already have $\varepsilon$-\TeX{}, you may have a look at the extensive
-% \xpackage{zref} package, whether it suits your needs better (or additionally or
-% whatsoever).
+% $\varepsilon$-\TeX{}. \xpackage{lastpageclassic} does not require $\varepsilon$-\TeX{},
+% but if you already have $\varepsilon$-\TeX{} (and use \xpackage{lastpagemodern}),
+% you may also have a look at the extensive \xpackage{zref} package,
+% whether it suits your needs better (or additionally or whatsoever).
% \end{description}
%
-% \DescribeMacro{memoir}
+% \DescribeMacro{memoir}\vspace{-\baselineskip}
% \begin{description}
-% \item[-] The \xpackage{memoir} class provides |\thelastpage| (page number printed
+% \item[-] The \xpackage{memoir} \emph{class} provides |\thelastpage| (page number printed
% on last page) and |\thelastsheet| (number of pages).
% \end{description}
%
+% \DescribeMacro{LaTeX-kernel}\vspace{-\baselineskip}
+% \begin{description}
+% \item[-] The number of pages is nowadays available via |\@abspage@last|
+% from the kernel, but when more than one page numbering scheme is used
+% (for example pages I~to X and then 1~to 10, thus number of pages
+% \hbox{\textquotedblleft 20\textquotedblright ,} but name of the last page
+% \hbox{\textquotedblleft 10\textquotedblright ),}
+% or when or the fnsymbol page numbering scheme is used, or another package
+% has output after this package, or the page numbers exceed a certain range,
+% there might be problems.
+% \end{description}
+%
% \bigskip
%
% \noindent (You programmed or found another alternative,
-% which is available at CTAN.org?\\
-% OK, send an e-mail to me with the name, location at CTAN.org,
+% which is available at \url{CTAN.org}?\\
+% OK, send an e-mail to me with the name, location at \url{CTAN.org},
% and a short notice, and I will probably include it in the list above.)\\
%
% \smallskip
%
% \noindent About how to get those packages, please see subsection~\ref{ss:Downloads}.
%
-% \pagebreak
-%
% \section{Example}
%
% \begin{macrocode}
%<*example>
-\documentclass[british]{article}[2014/09/29]% v1.4h
-\AtEndDocument{\message{^^JLaTeX Info: Executing hook `AtEndDocument'.}}
-\usepackage[draft]{showkeys}[2014/10/28]% v3.17
+\documentclass[british]{article}[2022/07/02]% 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'.}}%
+ }
+\makeatother
+\usepackage[draft]{showkeys}[2022/04/12]% v3.18 Show cite and label keys (DPC, MH)
%% Use final instead of draft to hide the keys. %%
-\usepackage{hyperref}[2012/11/06]% v6.83m
-\hypersetup{%
- extension=pdf,%
+\usepackage{hyperref}[2023-02-07]% v7.00v Hypertext links for LaTeX
+\hypersetup{extension=pdf,%
plainpages=false,%
pdfpagelabels=true,%
hyperindex=false,%
@@ -797,33 +760,30 @@ In memoriam
pdftitle={lastpage package example},%
pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the lastpage package},%
- pdfkeywords={LaTeX, lastpage, H.-Martin Muench},%
+ pdfkeywords={LaTeX, lastpage},%
pdfview=Fit,%
pdfstartview=Fit,%
pdfpagelayout=SinglePage%
}
-%% If hyperref is not used, the url package
-%% https://www.ctan.org/pkg/url
+%% If hyperref is not used, the url package
+%% https://ctan.org/pkg/url
%% must be loaded for the \url used in this example:
%% \usepackage{url}
%% or just use \let\url\texttt for the one used url.
-\usepackage{lastpage}[2021/09/03]% v1.2n
+\usepackage{lastpage}[2023-03-07]% v2.0a
\makeatletter
\renewcommand{\@evenfoot}{%
\normalsize\slshape \today\hfil \upshape %
page \thepage{} of \pageref{LastPage}}
\renewcommand{\@oddfoot}{\@evenfoot}
\makeatother
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
\pagenumbering{Roman}
-
\section*{Example for lastpage}
\markboth{Example for lastpage}{Example for lastpage}
-
This example demonstrates the use of package\newline
-\textsf{lastpage}, v1.2n as of 2021/09/03 (HMM; JPG).\newline
+\textsf{lastpage}, v2.0a as of 2023-03-07 (HMM; JPG).\newline
The package takes no options.\newline
For more details please see the documentation!\newline
@@ -848,47 +808,21 @@ 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 Reader DC 2021.005.20060:
-Edit $>$ Preferences $>$ Categories: Page Display $>$
+for the display of the pdf (in Adobe Acrobat Reader 2022.003.20322:
+Edit $>$ Preferences $>$ Page Display $>$
Page Content and Information: Use logical page numbers)!\newline
If you are more ambitious in respect to your aims with this package,
you might want to have a look at the \textsf{pageslts} package:\newline
-\url{https://www.ctan.org/pkg/pageslts}.
-
-\bigskip
-
-Save per page about $200\unit{ml}$~water, $2\unit{g}$~CO$_{2}$
-and $2\unit{g}$~wood:\newline
-Therefore please print only if this is really necessary.\newline
-I do NOT think, that it is necessary to print THIS file, really\newline
-(at least not after this page)!
-
+\url{https://ctan.org/pkg/pageslts}.
\bigskip
\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
-
-\newpage
-
-\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
-
+Last page's name (LastPage): \pageref{LastPage}
\newpage
\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
-
-\newpage
-
-\section*{The End}
-
-\noindent The page (\verb|\thepage|): \thepage \newline
-
-\noindent Last page's name (LastPage): \pageref{LastPage}
+Last page's name (LastPage): \pageref{LastPage}
\bigskip
@@ -936,82 +870,124 @@ prints:\newline
Page \thepage{} is page \makeatletter\lastpage@lastpage\makeatother.%
\newline
This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
+\newpage
+
+\noindent The page (\verb|\thepage|): \thepage \newline
+Last page's name (LastPage): \pageref{LastPage}
+\bigskip
+
+With modern \LaTeX{} it is possible to say:
+\begin{quote}
+\begin{verbatim}
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\documentclass{article}
+\pagenumbering{fnsymbol}
+\begin{document}
+\addtocounter{page}{8}%
+\makeatletter%
+\ExplSyntaxOn%
+\xdef\test{\numexpr\the\g_shipout_readonly_int +1\relax}%
+\ExplSyntaxOff%
+\ifnum \@abspage@last = \test\relax%
+This is the last page.%
+\else%
+This is not the last page
+(or it is but \LaTeX{} needs another compilation run
+to detect this).
+\fi
+\makeatother
+\end{document}
+\end{verbatim}
+\end{quote}
+
+\newpage
+\section*{The End}
+\noindent The page (\verb|\thepage|): \thepage \newline
+Last page's name (LastPage): \pageref{LastPage}
+\bigskip
+
+To see the content of the \texttt{enddocument/afterlastpage}-hook
+(for a recent \LaTeX-format!) use
+\verb|\ShowHook{enddocument/afterlastpage}|.% without the \verb||, of course!
\end{document}
%</example>
% \end{macrocode}
-%
-% \newpage
-%
% \StopEventually{}
+% \newpage
%
% \section{The implementation}
-%
-% We start off by checking that we are loading into \LaTeXe{} and
-% announcing the name and version of this package.
+% \DescribeMacro{lastpage.sty}
+% We first need to determine whether we are on \TeX~2.09 or \LaTeX2e:
%
% \begin{macrocode}
%<*package>
+%% 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}[2023/03/07 v2.0a 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
+\fi
+%</package>
% \end{macrocode}
%
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[2014/05/01]
-\ProvidesPackage{lastpage}%
- [2021/09/03 v1.2n Refers to last page's name (HMM; JPG)]%
-
-%% lastpage may work with earlier versions of LaTeX,
-%% but this was not tested. Please consider updating
-%% your LaTeX (and packages) to the most recent version
-%% (if it is/they are not already the most recent version).
-
-% \end{macrocode}
-%
-% A short description of the \xpackage{lastpage} package:
+% \DescribeMacro{lastpage209.sty}
+% If we are on \TeX~2.09 (really?!), we load the 2.09 version \pkg{lastpage209.sty}:
%
% \begin{macrocode}
-%% Allows for things like
-%% Page \thepage{} of \pageref{LastPage}
-%% to get
-%% 'Page 7 of 9'.
+%<*lastpage209>
+%% Part of the "lastpage" package
+%% FOR LaTeX 2.09 ONLY - FOR LaTeX 2e USE lastpage2e.sty
+%% This is lastpage209.sty invented by Jeffrey P. Goldberg,
+%% after Piet van Oostrum: Page layout in LaTeX, March 2, 2004, section 16; fancyhdr.pdf;
+%% lastpage209.sty maintained by H.-Martin Muench.
+\let\origenddocument=\enddocument%
+\def\enddocument{\clearpage%
+ {\addtocounter{page}{-1}%
+ \immediate\write\@mainaux{\string\newlabel{LastPage}{{}{\thepage}}}%
+ }%
+ \addtocounter{page}{+1}%
+ \origenddocument%
+ }
+%</lastpage209>
% \end{macrocode}
%
-% A last information for the user(s):
+% \DescribeMacro{lastpage2e.sty}
+% If |\documentclass| is known, we are in \LaTeXe{} - but which one?
+% For modern versions with \eTeX{} and hook management etc.
+% we load version \pkg{lastpagemodern.sty}, otherwise
+% \pkg{lastpageclassic.sty}. We start off by checking that we are
+% loading into \LaTeXe{} and announcing the name and version of this package.
%
% \begin{macrocode}
-%% For LaTeX 2.09 use lastpage209.sty.
-%% For LaTeX 2e maybe consider upgrading to the pageslts package.
-%% lastpage may work with earlier versions of LaTeX2e,
-%% but this was not tested. Please consider updating your LaTeX
-%% contribution to the most recent version (if it is not already
-%% the most recent version).
-
+%<*lastpage2e>
+%% Part of the "lastpage" package
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{lastpage2e}[2023/03/07 v2.0a Decide which 2e lastpage version to use (HMM)]
+\@ifl@t@r\fmtversion{2022/11/01}{\RequirePackage{lastpagemodern}}{%
+ \RequirePackage{lastpageclassic}}
+\message{^^J}
+%</lastpage2e>
% \end{macrocode}
%
-% The very old version~2.0 (and earlier) of the \xpackage{endfloat}
-% package actually redefined the |\enddocument| command,
-% and so interfered drastically with the \LaTeXe{} commands which
-% make use of |\AtEndDocument|. Newer versions of \xpackage{endfloat}
-% exists (at the time of writing this documentation: v2.5d as of 2011/12/25)
-% in modern documentation form, which are available from CTAN.org
-% (see subsection~\ref{ss:Downloads}).
-% A~note is placed here. (The \xpackage{pageslts} package even checks whether
-% a (very) old \xpackage{endfloat} package is in use. If it is, a warning or
-% even an error message is given, depending on \xpackage{endfloat} version.)
+% \DescribeMacro{lastpageclassic.sty}
+% In case of older \LaTeX-formats \pkg{lastpageclassic.sty} is loaded:
%
% \begin{macrocode}
-%% The recent version of the endfloat package is v2.5d as of 2011/12/25.
-%% The lastpage package is not fully compatible with version 2.0
-%% (and earlier) of the endfloat package, because those versions
-%% redefined the \enddocument command.
+%<*lastpageclassic>
+%% Part of the "lastpage" package
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{lastpageclassic}[2023/03/07 v2.0a Refers to last page's name (HMM; JPG)]
+%% allows for things like "Page \thepage{} of \pageref{LastPage}" to get "Page 7 of 9"
% \end{macrocode}
%
-% There are no options to be introduced.\\
-%
% \indent For comparisons, \textquotedblleft one\textquotedblright{} is defined
% (|\@ne| does not work for this).
%
% \begin{macrocode}
-\def\lastpage@one{1}
+\gdef\lastpage@one{1}
% \end{macrocode}
%
% We define |\lastpage@hyper|, |\lastpage@nameref|, |\lastpage@french|, and
@@ -1024,53 +1000,43 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
\gdef\lastpage@LTS{0}
% \end{macrocode}
%
-% We define |\lastpage@firstpage| to be \textquotedblleft \texttt{1}\textquotedblright{}.
+% We define |\lastpage@firstpage| to be \textquotedblleft \texttt{1}\textquotedblright{},
+% and before re-definition via the \xfile{.aux} file,
+% |\lastpage@lastpage| and |\lastpage@lastpageHy| are unknown.
%
% \begin{macrocode}
-\def\lastpage@firstpage{1}
+\gdef\lastpage@firstpage{1}
+\gdef\lastpage@lastpage{??}
+\gdef\lastpage@lastpageHy{??}
% \end{macrocode}
%
-% \pagebreak
-%
% \begin{macro}{\AtBeginDocument}
-% \indent |\AtBeginDocument| it is checked whether various packages are loaded.\\
-% (|\@ifpackageloaded| cannot be used later than |\AtBeginDocument|.)\\
-% If this is the case, |\lastpage@<package abbreviation>| is defined as
-% \texttt{1} (otherwise it stays \texttt{0}).\\
-% The \xpackage{ltxcmds} package provides |\ltx@ifpackageloaded|, which can be used
-% also after |\AtBeginDocument|, but \xpackage{lastpage} tries to not load other packages.
+% \indent |\AtBeginDocument| we give a waring about ancient versions of the \pkg{endfloat} package.
+% Then it is checked whether various packages are loaded.
+% (|\@ifpackageloaded| cannot be used later than |\AtBeginDocument|.)
+% If this is the case,\\
+% |\lastpage@<package abbreviation>| is defined as \texttt{1}
+% (otherwise it stays~\texttt{0}).
%
% \begin{macrocode}
\AtBeginDocument{%
+ \@ifpackageloaded{endfloat}{%
+ \@ifpackagelater{endfloat}{1993/04/30}{\relax}{%
+ \PackageError{lastpage}{%
+ Incompatibility with outdated version of endfloat package}{%
+ lastpage is not fully compatible with a version\MessageBreak%
+ before 2.1 of the endfloat package,\MessageBreak%
+ because those versions redefined\MessageBreak%
+ the \string\enddocument\space command.}%
+ }{}}%
\@ifpackageloaded{tikz}{\gdef\lastpage@tikz{1}}{}%
\@ifpackageloaded{hyperref}{\gdef\lastpage@hyper{1}}{}%
\@ifpackageloaded{nameref}{\gdef\lastpage@nameref{1}}{}%
\@ifpackageloaded{french}{\gdef\lastpage@french{1}}{}%
\@ifpackageloaded{frenchle}{\gdef\lastpage@french{1}}{}%
- \@ifpackageloaded{pageslts}{%
- \PackageWarning{lastpage}{Package pageslts found.\MessageBreak%
- Therefore the lastpage package is no longer\MessageBreak%
- necessary.%
- }%
- \gdef\lastpage@LTS{1}%
- }{\PackageInfo{lastpage}{%
- Please have a look at the pageslts package at\MessageBreak%
- https://www.ctan.org/pkg/pageslts\MessageBreak%
- !}%
- }%
- \@ifpackageloaded{pagesLTS}{%
- \PackageWarning{lastpage}{%
- Outdated pagesLTS package found.\MessageBreak%
- Please replace by a recent version of\MessageBreak%
- pageslts package, see e.g. at\MessageBreak%
- https://www.ctan.org/pkg/pageslts\MessageBreak%
- !\MessageBreak%
- With pagesLTS as well as pageslts package\MessageBreak%
- the lastpage package is no longer necessary.\MessageBreak%
- }%
- \gdef\lastpage@LTS{1}%
- }{}%
+ \@ifpackageloaded{pagesLTS}{\gdef\lastpage@LTS{1}}{}%
+ \@ifpackageloaded{pageslts}{\gdef\lastpage@LTS{1}}{}%
% \end{macrocode}
%
% |\lastpage@putlabel|, used by older versions of this package,
@@ -1094,8 +1060,6 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
% \begin{macro}{\lastpage@putl@bel}
% \indent This command does the writing of the label:
%
@@ -1174,12 +1138,10 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
% \begin{macro}{\lastpage@putlabelhyper}%
% \indent When \xpackage{hyperref} has been loaded, the label is set with the
% |\lastpage@putlabelhyper| command. If the \xpackage{hyperref} package is used,
-% but pageanchors are disabled, the hyperlinking will not work.
+% but page-anchors are disabled, the hyperlinking will not work.
%
% \begin{macrocode}
\newcommand{\lastpage@putlabelhyper}{%
@@ -1209,15 +1171,14 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
%
% \begin{macrocode}
%% The following code is from the hyperref package %%
-%% [2010/04/17 v6.80x; newer versions are available] %%
-%% by Heiko Oberdiek (Big Thanks!). %%
- \let\@number\@firstofone
- \ifHy@pageanchor
- \ifHy@hypertexnames
- \ifHy@plainpages
+%% 2010/04/17 v6.80x; newer versions are available. %%
+ \let\@number\@firstofone%
+ \ifHy@pageanchor%
+ \ifHy@hypertexnames%
+ \ifHy@plainpages%
\def\Hy@temp{\arabic{page}}%
- \else
- \Hy@unicodefalse
+ \else%
+ \Hy@unicodefalse%
%% Code not from hyperref package: %%
%% The following lines are taken from the pageslts package, %%
%% which in turn got them from the hyperref package and %%
@@ -1225,7 +1186,7 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
%% Without the modification, after the first shipout "PD1" %%
%% is inserted each time |\pdfstringdef\Hy@temp{\thepage}| %%
%% is executed. %%
- \ifnum \value{page}=1%
+ \ifnum \value{page}=1\relax%
% \end{macrocode}
%
% We do not count the pages ourselves, and so they could have been changed by
@@ -1238,7 +1199,7 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% We will make a mistake here at most once:
%
% \begin{macrocode}
- \ifx \lastpage@firstpage\lastpage@one
+ \ifx \lastpage@firstpage\lastpage@one\relax%
\def\Hy@temp{\thepage}%
\gdef\lastpage@firstpage{0}%
\else%
@@ -1254,14 +1215,13 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
%% Code from pageslts package again: %%
\fi%
%% Code from hyperref package again: %%
- \fi
- \else
+ \fi%
+ \else%
\def\Hy@temp{\the\Hy@pagecounter}%
- \fi
- \fi
+ \fi%
+ \fi%
\immediate\write\@auxout{%
- \string\newlabel
- {LastPage}{{}{\thepage}{}{%
+ \string\newlabel{LastPage}{{}{\thepage}{}{%
\ifHy@pageanchor page.\Hy@temp\fi}{}}%
}%
%% End of code from the hyperref package. %%
@@ -1271,14 +1231,11 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% whether they have been saved in the \xfile{aux} file.
%
% \begin{macrocode}
- \immediate\write\@auxout{%
- \string\xdef\string\lastpage@lastpage{\thepage}}%
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
\ifHy@pageanchor%
- \immediate\write\@auxout{%
- \string\xdef\string\lastpage@lastpageHy{\Hy@temp}}%
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpageHy{\Hy@temp}}%
\else%
- \immediate\write\@auxout{%
- \string\gdef\string\lastpage@lastpageHy{}}%
+ \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
\fi%
% \end{macrocode}
%
@@ -1295,8 +1252,7 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
%
% \begin{macro}{\lastpage@putlabelNR}
% \indent The \xpackage{nameref} package redefines |\label| to have five arguments
-% instead of two, therefore
-% \newline
+% instead of two, therefore\newline
% |\newlabel{LastPage}{{}{\thepage}{}{}{}}|
% instead of\newline
% |\newlabel{LastPage}{{}{\thepage}}| must be used:
@@ -1315,8 +1271,6 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
% \begin{macro}{\lastpage@fileswtest}
% \indent 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
@@ -1333,15 +1287,15 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
\newcommand{\lastpage@fileswtest}[2]{%
\edef\lastpage@testa{#1}%
\edef\lastpage@testb{#2}%
- \ifx\lastpage@testa\lastpage@testb% OK
+ \ifx\lastpage@testa\lastpage@testb%
\else%
- \ifx\lastpage@tikz\lastpage@one%
+ \ifx\lastpage@tikz\lastpage@one\relax%
\PackageWarning{lastpage}%
{The lastpage package was not allowed to write to an\MessageBreak%
.aux file. This package does not work without access\MessageBreak%
to an .aux file.\MessageBreak%
It is OK if the .aux file was already updated\MessageBreak%
- by a previouse compiler run\MessageBreak%
+ by a previous compiler run\MessageBreak%
and would not have changed anyway.\MessageBreak%
}%
\else%
@@ -1350,12 +1304,13 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
This package does not work without access to an .aux file.\MessageBreak%
Press Ctrl+Z to exit.\MessageBreak%
But it is OK if the .aux file was already updated\MessageBreak%
- by a previouse compiler run\MessageBreak%
+ by a previous compiler run\MessageBreak%
and would not have changed anyway.\MessageBreak%
}%
\fi%
\fi%
}
+
% \end{macrocode}
% \end{macro}
%
@@ -1377,28 +1332,21 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \end{macrocode}
% \end{macro}
%
-% \pagebreak
-%
% \begin{macro}{\AtEndDocument}
% \indent |\AtEndDocument| we again (re)define |\lastpage@putlabel|
-% to do nothing and check |\lastpage@lastpage| and |\lastpage@lastpageHy|,
-% whether they are still unchanged, which is OK for the first run only.
+% to do nothing and check |\lastpage@lastpage|,
+% whether it is still unchanged, which is OK for the first run only.
%
% \begin{macrocode}
-\gdef\lastpage@lastpage{\relax}%
-\gdef\lastpage@lastpageHy{\relax}%
-
\AtEndDocument{%
- \gdef\lastpage@putlabel{\relax}%
\ifx\lastpage@LTS\lastpage@one%
\else%
- \ifx\lastpage@lastpage\relax%
- \PackageWarning{lastpage}{Rerun to get the references right}%
- \fi%
- \ifx\lastpage@lastpageHy\relax%
+ \gdef\lastpage@putlabel{??}%
+ \ifx\lastpage@lastpage\lastpage@putlabel\relax%
\PackageWarning{lastpage}{Rerun to get the references right}%
\fi%
\fi%
+ \gdef\lastpage@putlabel{\relax}%
% \end{macrocode}
%
% It is checked whether writing to files is allowed
@@ -1444,25 +1392,381 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
\fi%
\fi%
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%</lastpageclassic>
+% \end{macrocode}
+% \newpage
+%
+% \DescribeMacro{lastpagemodern.sty}
+% In case of a recent \LaTeX-format, \pkg{lastpagemodern.sty} is loaded:
+%
+% \begin{macrocode}
+%<*lastpagemodern>
+%% Part of the "lastpage" package
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\ProvidesPackage{lastpagemodern}[2023-03-07 v2.0a 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";
+%% the NUMBER of pages is available via \@abspage@last, but with pages
+%% for example I to X and then 1 to 10, the number of pages woud be "20",
+%% while the name of the last page is "10". Decide what you need/want!
+
+% \end{macrocode}
+%
+% \indent For comparisons, \textquotedblleft one\textquotedblright{} is defined
+% (|\@ne| does not work for this).
+%
+% \begin{macrocode}
+\gdef\lastpage@one{1}
+% \end{macrocode}
+%
+% We define |\lastpage@firstpage| to be \textquotedblleft \texttt{1}\textquotedblright{},
+% and before re-definition via the \xfile{.aux} file,
+% |\lastpage@lastpage| and |\lastpage@lastpageHy| are unknown.
+%
+% \begin{macrocode}
+\gdef\lastpage@firstpage{1}
+\gdef\lastpage@lastpage{??}
+\gdef\lastpage@lastpageHy{??}
+
+% \end{macrocode}
+%
+% \DescribeMacro{\AddToHook\{begindocument/end\}}
+% \indent At |begindocument/end| we give a warning about ancient versions
+% of the \pkg{endfloat} package.
+%
+% \begin{macrocode}
+\AddToHook{begindocument/end}{%
+ \IfPackageLoadedTF{endfloat}{%
+ \IfPackageAtLeastTF{endfloat}{1994/06/01}{\relax}{%
+ \PackageError{lastpage}{%
+ Incompatibility with outdated version of endfloat package}{%
+ lastpage is not fully compatible with a version\MessageBreak%
+ before 2.1 of the endfloat package,\MessageBreak%
+ because those versions redefined\MessageBreak%
+ the \string\enddocument\space command.}%
+ }{}}%
+% \end{macrocode}
+%
+% |\lastpage@putlabel|, used by older versions of this package,
+% is redefined e.\,g. by \xpackage{revtex}, \xpackage{hyperref},
+% \xpackage{frenchle}, and \xpackage{PPRcorners}.
+% While now |\lastpage@putl@bel| is used instead, \xpackage{revtex}
+% or \xpackage{hyperref} could also define a label \texttt{LastPage},
+% which then would be multiply defined. (Which is no big issue,
+% if it is associated with the same page.) Therefore we define
+%
+% \begin{macrocode}
+ \gdef\lastpage@putlabel{\relax}%
+% \end{macrocode}
+%
+% Because |\lastpage@putlabel| might be (re)defined later, depending on the order
+% in which the packages are loaded, we will do this again at the end of the document.
+%
+% \begin{macrocode}
+ }
+
+% \end{macrocode}
+%
+% \begin{macro}{\lastpage@putl@bel}
+% \indent This command does the writing of the label.
+% If the \xpackage{pageslts} package is used, this \xpackage{lastpage} package is
+% not needed at all. The \xpackage{LastPage} label would even be defined twice.
+% Thus, if \xpackage{pageslts} is used, here nothing is done.
+%
+% \begin{macrocode}
+\newcommand{\lastpage@putl@bel}{%
+ \IfPackageLoadedTF{pageslts}{\relax}{%
+% \end{macrocode}
+%
+% Otherwise the label is set:\\
+% We have got to distinguish whether \xpackage{hyperref} has been loaded or not:
+%
+% \begin{macrocode}
+ \IfPackageLoadedTF{hyperref}{\lastpage@putlabelhyper}{%
+% \end{macrocode}
+%
+% and also need to treat documents with \xpackage{nameref} differently:
+%
+% \begin{macrocode}
+ \IfPackageLoadedTF{nameref}{\lastpage@putlabelNR}{%
+% \end{macrocode}
+%
+% When those packages have not been loaded, we just write the
+% simple label into the \xfile{aux} file (and store the value of the page):
+%
+% \begin{macrocode}
+ \begingroup%
+ \addtocounter{page}{-1}%
+ \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}%
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
+ \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
+ \addtocounter{page}{+1}%
+ \endgroup%
+ }%
+ }%
+ }%
+ }
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\lastpage@putlabelhyper}%
+% \indent When \xpackage{hyperref} has been loaded, the label is set with the
+% |\lastpage@putlabelhyper| command. If the \xpackage{hyperref} package is used,
+% but page-anchors are disabled, the hyperlinking will not work.
+%
% \begin{macrocode}
-%</package>
+\newcommand{\lastpage@putlabelhyper}{%
+ \ifHy@pageanchor%
+ \else%
+ \PackageError{lastpage}{hyperref option pageanchor disabled}{%
+ The \string\pageref{LastPage} link does not work\MessageBreak%
+ using hyperref with disabled option `pageanchor'.\MessageBreak%
+ }%
+ \fi%
+% \end{macrocode}
+%
+% Since the page has been put out, we are on the page \textit{after} that page.
+% We therefore subtract one from the page counter. (For the compiler,
+% this is equal to |\advance\c@page\m@ne|, but for human readers of the code
+% it is probably easier to understand.)
+%
+% \begin{macrocode}
+ \begingroup%
+ \addtocounter{page}{-1}%
+% \end{macrocode}
+%
+% Simply using |\label| for \texttt{LastPage} would not work,
+% because labels wait for the output routines to work, and there
+% may be no more invocations of the output routines. To force
+% the write out, we need to do an |\immediate| write into the \xfile{aux} file.
+%
+% \begin{macrocode}
+%% The following code is from the hyperref package %%
+%% 2010/04/17 v6.80x; newer versions are available. %%
+ \let\@number\@firstofone%
+ \ifHy@pageanchor%
+ \ifHy@hypertexnames%
+ \ifHy@plainpages%
+ \def\Hy@temp{\arabic{page}}%
+ \else%
+ \Hy@unicodefalse%
+%% Code not from hyperref package: %%
+%% The following lines are taken from the pageslts package, %%
+%% which in turn got them from the hyperref package and %%
+%% modified them. %%
+%% Without the modification, after the first shipout "PD1" %%
+%% is inserted each time |\pdfstringdef\Hy@temp{\thepage}| %%
+%% is executed. %%
+ \ifnum \value{page}=1\relax%
+% \end{macrocode}
+%
+% We do not count the pages ourselves, and so they could have been changed by
+% e.\,g. |\pagenumbering{...}|, |\addtocounter{page}{...}|,\\
+% |\setcounter{page}{...}|. Thus the page might have the number one
+% while not being the first page at all. Using the (obsolete) \xpackage{everyshi}
+% package would help, but this package should not require other packages.
+% The \xpackage{pageslts} package does a better handling, but requires
+% some other packages.\\
+% We will make a mistake here at most once:
+%
+% \begin{macrocode}
+ \ifx \lastpage@firstpage\lastpage@one\relax%
+ \def\Hy@temp{\thepage}%
+ \gdef\lastpage@firstpage{0}%
+ \else%
+%% Code from hyperref package again: %%
+ \pdfstringdef\Hy@temp{\thepage}%
+%% End of code from the hyperref package. %%
+ \fi%
+%% The pageslts package would even check for fnsymbol page %%
+%% numbering scheme and adapt the code correspondingly. %%
+ \else%
+%% Code from hyperref package again: %%
+ \pdfstringdef\Hy@temp{\thepage}%
+%% Code from pageslts package again: %%
+ \fi%
+%% Code from hyperref package again: %%
+ \fi%
+ \else%
+ \def\Hy@temp{\the\Hy@pagecounter}%
+ \fi%
+ \fi%
+ \immediate\write\@auxout{%
+ \string\newlabel{LastPage}{{}{\thepage}{}{%
+ \ifHy@pageanchor page.\Hy@temp\fi}{}}%
+ }%
+%% End of code from the hyperref package. %%
+% \end{macrocode}
+%
+% 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}
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
+ \ifHy@pageanchor%
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpageHy{\Hy@temp}}%
+ \else%
+ \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
+ \fi%
+% \end{macrocode}
+%
+% After the writeout we restore the page number again,
+% since there might be other things still to be done.
+%
+% \begin{macrocode}
+ \addtocounter{page}{+1}%
+ \endgroup%
+ }
+
% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\lastpage@putlabelNR}
+% \indent The \xpackage{nameref} package redefines |\label| to have five arguments
+% instead of two, therefore
+% \newline
+% |\newlabel{LastPage}{{}{\thepage}{}{}{}}|
+% instead of\newline
+% |\newlabel{LastPage}{{}{\thepage}}| must be used:
+%
+% \begin{macrocode}
+\newcommand{\lastpage@putlabelNR}{%
+ \begingroup%
+ \addtocounter{page}{-1}%
+ \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
+ \immediate\write\@auxout{\string\xdef\string\lastpage@lastpage{\thepage}}%
+ \immediate\write\@auxout{\string\gdef\string\lastpage@lastpageHy{}}%
+ \addtocounter{page}{+1}%
+ \endgroup%
+ }
+
+% \end{macrocode}
+% \end{macro}
% \pagebreak
%
-% \section{Installation}
+% \begin{macro}{\lastpage@fileswtest}
+% \indent 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
+% whether the label was already set via the \xfile{aux} file in some
+% earlier compilation run. (There are packages where the document
+% is compiled with access to the \xfile{aux} file, and then there is
+% an additional compiler run, where the \xfile{aux} file cannot be changed,
+% but in that run there is also no need to change it.) The \xpackage{tikz}
+% package is somewhat different, therefore we only give a warning instead
+% of an error (and hope that there is another compiler run where the
+% \xfile{aux} file can be written).
+%
+% \begin{macrocode}
+\newcommand{\lastpage@fileswtest}[2]{%
+ \edef\lastpage@testa{#1}%
+ \edef\lastpage@testb{#2}%
+ \ifx\lastpage@testa\lastpage@testb%
+ \else%
+ \IfPackageLoadedTF{tikz}{%
+ \PackageWarning{lastpage}%
+ {The lastpage package was not allowed to write to an\MessageBreak%
+ .aux file. This package does not work without access\MessageBreak%
+ to an .aux file.\MessageBreak%
+ It is OK if the .aux file was already updated\MessageBreak%
+ by a previous compiler run\MessageBreak%
+ and would not have changed anyway.\MessageBreak%
+ }%
+ }{\PackageError{lastpage}{No auxiliary file allowed}%
+ {The lastpage package was not allowed to write to an .aux file.\MessageBreak%
+ This package does not work without access to an .aux file.\MessageBreak%
+ Press Ctrl+Z to exit.\MessageBreak%
+ But it is OK if the .aux file was already updated\MessageBreak%
+ by a previous compiler run\MessageBreak%
+ and would not have changed anyway.\MessageBreak%
+ }%
+ }%
+ \fi%
+ }
+
+% \end{macrocode}
+% \end{macro}
%
-% \begin{center}
-% {\large \textbf{First, please make sure that there is no old version of}}
-% {\large \textbf{\textsf{lastpage}{} at some obsolete place in your system!}}
-% \end{center}
+% \begin{macro}{\lastpage@fileswtestHy}
+% \indent When the \xpackage{hyperref} package has been loaded,
+% |\lastpage@lastpageHy| must be tested additionally. (And a
+% |\newcommand| is needed, because |\ifHy@pageanchor| is not even
+% defined when \xpackage{hyperref} has not been loaded.)
%
-% \subsection{Downloads\label{ss:Downloads}}
+% \begin{macrocode}
+\newcommand{\lastpage@fileswtestHy}{%
+ \ifHy@pageanchor%
+ \lastpage@fileswtest{\Hy@temp}{\lastpage@lastpageHy}%
+ \else%
+ \lastpage@fileswtest{\empty}{\lastpage@lastpageHy}%
+ \fi%
+ }
+
+% \end{macrocode}
+% \end{macro}
+%
+% \DescribeMacro{enddocument/afterlastpage}
+% \indent |enddocument/afterlastpage| we again (re)define |\lastpage@putlabel|
+% to do nothing, but first use it to check whether |\lastpage@lastpage|
+% is still unchanged, which is OK for the first run only.
+%
+% \begin{macrocode}
+\AddToHook{enddocument/afterlastpage}{%
+ \IfPackageLoadedTF{pageslts}{\relax}{%
+ \gdef\lastpage@putlabel{??}%
+ \ifx\lastpage@lastpage\lastpage@putlabel\relax%
+ \AddToHook{enddocument/info}{%
+ \PackageWarning{lastpage}{Rerun to get the references right}%
+ }%
+ \fi%
+ }%
+ \gdef\lastpage@putlabel{\relax}%
+% \end{macrocode}
+% \pagebreak
+%
+% It is checked whether writing to files is allowed
+% (otherwise, only an error message is issued and nothing is done).
+%
+% \begin{macrocode}
+ \if@filesw%
+% \end{macrocode}
+%
+% We put in a |\message| to show, in what order things (which were called)
+% are done.
+%
+% \begin{macrocode}
+ \message{^^Jenddocument/afterlastpage: lastpage setting LastPage.^^J}%
+ \IfPackageLoadedTF{french}{%
+ \addtocounter{page}{+1}\lastpage@putl@bel\addtocounter{page}{-1}%
+ }{\IfPackageLoadedTF{frenchle}{%
+ \addtocounter{page}{+1}\lastpage@putl@bel\addtocounter{page}{-1}%
+ }{\lastpage@putl@bel%
+ }%
+ }%
+ \else%
+% \end{macrocode}
+%
+% When writing to files is not allowed, nothing can be done. But when
+% the label was already set via the \xfile{aux} file, nothing needs
+% to be done. We check for this with |\lastpage@fileswtest| and
+% (if \xpackage{hyperref} has been loaded) |\lastpage@fileswtestHy|.
%
+% \begin{macrocode}
+ \IfPackageLoadedTF{pageslts}{\relax}{%
+ \lastpage@fileswtest{\thepage}{\lastpage@lastpage}%
+ \IfPackageLoadedTF{hyperref}{\lastpage@fileswtestHy}{\relax}%
+ }%
+ \fi%
+ }
+%</lastpagemodern>
+% \end{macrocode}
+% \pagebreak
+%
+% \section{Installation}
+% \subsection{Downloads\label{ss:Downloads}}
% Everything is available at \url{https://www.ctan.org},
% but may need additional packages themselves.\\
%
@@ -1471,72 +1775,107 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \begin{description}
% \item[-] \TeX Format \LaTeXe{}: \url{https://www.CTAN.org}
%
-% \item[-] document class \xclass{ltxdoc}, 2015/03/26, v2.0w,\\
-% \url{https://www.ctan.org/pkg/ltxdoc}
+% \item[-] document class \xclass{ltxdoc}, 2022/06/22, v2.1i,
+% \url{https://ctan.org/pkg/ltxdoc}
%
-% \item[-] package \xpackage{holtxdoc}, 2012/03/21, v0.24,\\
-% \url{https://www.ctan.org/pkg/holtxdoc}
-%
-% \item[-] package \xpackage{hypdoc}, 2011/08/19, v1.11,\\
-% \url{https://www.ctan.org/pkg/hypdoc}
+% \item[-] package \xpackage{holtxdoc}, 2019/12/09, v0.30,
+% \url{https://ctan.org/pkg/holtxdoc}
% \end{description}
%
% \DescribeMacro{lastpage.sty}
-% The |lastpage.sty| for \LaTeXe{} (i.\,e. each document using
-% the \xpackage{lastpage} package) requires:
+% The |lastpage.sty| (i.\,e. each document using the \xpackage{lastpage} package)
+% requires:
% \begin{description}
-% \item[-] \TeX Format \LaTeXe{}, \url{https://www.CTAN.org}
+% \item[-] \TeX, \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{lastpage}, 2021/09/03, v1.2n,\\
-% \url{https://www.ctan.org/pkg/lastpage}
-% \end{description}
-% and can use
-% \begin{description}
-% \item[-] package \xpackage{hyperref}, 2012/11/06, v6.83m,\\
-% \url{https://www.ctan.org/pkg/hyperref}
+% \item[-] package \xpackage{lastpage}, 2023-03-07, v2.0a,
+% \url{https://ctan.org/pkg/lastpage}
% \end{description}
%
% \DescribeMacro{lastpage209.sty}
% The |lastpage209.sty| for \LaTeX2.09{} (i.\,e. each document using
% the \xpackage{lastpage209} package) requires:
% \begin{description}
-% \item[-] \TeX Format \LaTeX{}, v2.09
+% \item[-] \TeX-format \LaTeX{}, v2.09
%
-% \item[-] package \xpackage{lastpage209}, 2021/09/03, v1.2n, included in\\
-% \hspace*{-2em}\url{http://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}%
+% \item[-] package \xpackage{lastpage209}, 2023-03-07, v2.0a,
+% \url{https://ctan.org/pkg/lastpage}
% \end{description}
% and does not work with \xpackage{hyperref}, which needs \LaTeX2e{}.\\
%
+% \DescribeMacro{lastpage2e.sty}
+% The |lastpage2e.sty| for \LaTeXe{} (i.\,e. each document using
+% the \xpackage{lastpage2e} package) requires:
+% \begin{description}
+% \item[-] \TeX-format \LaTeXe{} 1994/12/01 or newer,
+% \url{https://www.CTAN.org}
+%
+% \item[-] package \xpackage{lastpage}, 2023-03-07, v2.0a,
+% \url{https://ctan.org/pkg/lastpage}
+% \end{description}
+%
+% \DescribeMacro{lastpageclassic.sty}
+% The |lastpageclassic.sty| for \LaTeXe{} (i.\,e. each document using
+% the \xpackage{lastpageclassic} package) requires:
+% \begin{description}
+% \item[-] \TeX-format \LaTeXe{} between 1994/12/01 and 2022/11/01,\\
+% \url{https://www.CTAN.org}
+%
+% \item[-] package \xpackage{lastpage}, 2023-03-07, v2.0a,
+% \url{https://ctan.org/pkg/lastpage}
+% \end{description}
+% and can use
+% \begin{description}
+% \item[-] package \xpackage{hyperref}, 2023-02-07, v7.00v,
+% \url{https://ctan.org/pkg/hyperref}
+% \end{description}
+%
+% \DescribeMacro{lastpagemodern.sty}
+% The |lastpagemodern.sty| for \LaTeXe{} (i.\,e. each document using
+% the \xpackage{lastpagemodern} package) requires:
+% \begin{description}
+% \item[-] \TeX-format \LaTeXe{} 2022-11-01 or newer,
+% \url{https://www.CTAN.org}
+%
+% \item[-] package \xpackage{lastpage}, 2023-03-07, v2.0a,
+% \url{https://ctan.org/pkg/lastpage}
+% \end{description}
+% and can use
+% \begin{description}
+% \item[-] package \xpackage{hyperref}, 2023-02-07, v7.00v,
+% \url{https://ctan.org/pkg/hyperref}
+% \end{description}
+%
% \DescribeMacro{lastpage-example.tex}
% The |lastpage-example.tex| requires the same file as all
% documents using the \xpackage{lastpage} package, i.\,e.
% \begin{description}
-% \item[-] package \xpackage{lastpage}, 2021/09/03, v1.2n,\\
-% \url{https://www.ctan.org/pkg/lastpage}\\
+% \item[-] package \xpackage{lastpage}, 2023-03-07, v2.0a,
+% \url{https://ctan.org/pkg/lastpage}\\
% (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
% have some version of it -- is it the current one?)
% \end{description}
% and additionally:
% \begin{description}
-% \item[-] class \xpackage{article}, 2014/09/29, v1.4h,\\
-% \url{https://www.ctan.org/pkg/article}
+% \item[-] class \xpackage{article}, 2022/07/02, v1.4n, from \xpackage{classes}:
+% \url{https://ctan.org/pkg/classes}
%
-% \item[-] package \xpackage{showkeys}, 2014/10/28, v3.17,\\
-% \url{https://www.ctan.org/pkg/showkeys}
+% \item[-] package \xpackage{showkeys}, 2022/04/12, v3.18,
+% \url{https://ctan.org/pkg/showkeys}
%
-% \item[-] package \xpackage{hyperref}, 2012/11/06, 6.83m,\\
-% \url{https://www.ctan.org/pkg/hyperref}
+% \item[-] package \xpackage{hyperref}, 2023-02-07, v7.00v,
+% \url{https://ctan.org/pkg/hyperref}
% \end{description}
%
% \DescribeMacro{endfloat}
% The \xpackage{endfloat} package is not required, but because
-% the \xpackage{lastpage} package is incompatible with \textit{very} old versions
+% the \xpackage{lastpage} package is incompatible with \textit{ancient} versions
% of the \xpackage{endfloat} package (see subsection~\ref{sec:endfloat}),
-% here the recent one is listed:
+% here the recent one (at the time of writing this documentation) is listed:
% \begin{description}
-% \item[-] package \xpackage{endfloat}, v2.5d, 2011/12/25,\\
-% \url{https://www.ctan.org/pkg/endfloat}
+% \item[-] package \xpackage{endfloat}, 2019/04/15, v2.7,
+% \url{https://ctan.org/pkg/endfloat}
% \end{description}
%
% \DescribeMacro{fancyhdr}
@@ -1546,19 +1885,11 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \xpackage{fancyheadings}), but because they were mentioned, also they are listed
% here:
% \begin{description}
-% \item[-] package \xpackage{fancyhdr}, 2005/03/22, v3.2,\\
-% \url{https://www.ctan.org/pkg/fancyhdr}
-%
-% \item[-] package \xpackage{nccfancyhdr}, 2004/12/07, v1.1,\\
-% \url{https://www.ctan.org/pkg/nccfancyhdr}
-% \end{description}
+% \item[-] package \xpackage{fancyhdr}, 2022/11/09, v4.1,
+% \url{https://ctan.org/pkg/fancyhdr}
%
-% \DescribeMacro{regstats}
-% For counting the used counters (and other registers), the \xpackage{regstats}
-% package was mentioned (it is not required). It can be found at:
-% \begin{description}
-% \item[-] package \xpackage{regstats}, 2012/01/07, v1.0h,\\
-% \url{https://www.ctan.org/pkg/regstats}
+% \item[-] package \xpackage{nccfancyhdr}, 2004/12/07, v1.1,
+% \url{https://ctan.org/pkg/nccfancyhdr}
% \end{description}
%
% \DescribeMacro{count1to}
@@ -1571,86 +1902,92 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% As possible alternatives in section~\ref{sec:Alternatives}, Alternatives,
% there are listed (newer versions might be available):
% \begin{description}
-% \item[-] package \xpackage{pageslts}, 2014/01/19, v1.2c,\\
-% \url{https://www.ctan.org/pkg/pageslts}
+% \item[-] package \xpackage{pageslts}, 2015/12/21, v1.2f,
+% \url{https://ctan.org/pkg/pageslts}
%
% \item[-] package \xpackage{papermas}, 2011/08/22, v1.0h; the \xpackage{papermas}
% package can be considered as kind of add-on to the \xpackage{pageslts} package.\\
-% \url{https://www.ctan.org/pkg/papermas}
+% \url{https://ctan.org/pkg/papermas}
%
-% \item[-] package \xpackage{count1to}, 2009/05/24, v2.1,\\
-% \url{https://www.ctan.org/pkg/count1to}
+% \item[-] package \xpackage{count1to}, 2009/05/24, v2.1,
+% \url{https://ctan.org/pkg/count1to}
%
-% \item[-] package \xpackage{nofm}, 1991/02/25, v?.?,\\
-% \url{https://mirrors.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty},
+% \item[-] package \xpackage{nofm}, 1991/02/25,
+% \href{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}{%
+% https://mirror.ctan.org/obsolete/macros/latex209/}%
+% \href{https://mirror.ctan.org/obsolete/macros/latex209/contrib/misc/nofm.sty}{%
+% contrib/misc/nofm.sty},
% does not work with e.\,g. \xpackage{hyperref}
%
-% \item[-] package \xpackage{totpages}, 2005/09/19, v2.00,\\
-% \url{https://www.ctan.org/pkg/totpages}
+% \item[-] package \xpackage{totpages}, 2005/09/19, v2.00,
+% \url{https://ctan.org/pkg/totpages}
%
-% \item[-] package \xpackage{totalcount}, 2018/01/21, v1.0a,\\
-% \url{https://www.ctan.org/pkg/totalcount}.
+% \item[-] package \xpackage{totalcount}, 2018/01/21, v1.0a,
+% \url{https://ctan.org/pkg/totalcount}
%
-% \item[-] package \xpackage{zref}, 2012/04/04, v2.24,\\
-% \url{https://www.ctan.org/pkg/zref},
-% requires $\varepsilon$-\TeX{}.
+% \item[-] package \xpackage{zref}, 2022-04-07, v2.34,
+% \url{https://ctan.org/pkg/zref}
%
-% \item[-] class \xpackage{memoir}, 2021/06/16, v3.7p,\\
-% \url{https://ctan.org/tex-archive/macros/latex/contrib/memoir/}.
+% \item[-] class \xpackage{memoir}, 2022-11-17, 3.7.19,
+% \url{https://ctan.org/pkg/memoir}.
% \end{description}
%
% \DescribeMacro{Oberdiek}
% \DescribeMacro{holtxdoc}
% \DescribeMacro{zref}
-% All packages of \textsc{Heiko Oberdiek's} bundle `oberdiek'
+% All packages of the `oberdiek' bundle
% (especially \xpackage{holtxdoc} and \xpackage{zref})
% are also available in a TDS compliant ZIP archive:\\
-% \url{http://mirrors.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\\
+% \url{https://mirror.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\\
% It is probably best to download and use this, because the packages in there
% are quite probably both recent and compatible among themselves.\\
%
% \DescribeMacro{hyperref}
% \noindent \xpackage{hyperref} is not included in that bundle and needs to be
% downloaded separately,\\
-% \url{http://mirrors.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\
+% \url{https://mirror.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\
%
-% \DescribeMacro{M\"{u}nch}
+% \DescribeMacro{Münch}
% A hyperlinked list of my (other) packages can be found at\\
-% \url{https://www.ctan.org/author/muench-hm}.\\
+% \url{https://ctan.org/author/muench-hm}.
+% \pagebreak
%
% \subsection{Package, unpacking TDS}
-% \paragraph{Package.} This package is available on CTAN.org.
+% \paragraph{Package.} This package is available on \url{https://www.CTAN.org}.
% \begin{description}
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.dtx}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/lastpage/lastpage.dtx}]\hspace*{0.1cm} \\
% The source file.
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/lastpage/lastpage.pdf}]\hspace*{0.1cm} \\
% The documentation.
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/lastpage/lastpage-example.pdf}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/lastpage/lastpage-example.pdf}]\hspace*{0.1cm}
% The compiled example file, as it should look like.
-% \item[\url{http://mirrors.ctan.org/macros/latex/contrib/lastpage/README}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/lastpage/README}]\hspace*{0.1cm} \\
% The README file.
% \end{description}
% There is also a |lastpage.tds.zip| available:
% \begin{description}
-% \item[\url{http://mirrors.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}]\hspace*{0.1cm}
% Everything in TDS compliant, compiled format
% \end{description}
% which additionally contains\\
% \begin{tabular}{ll}
-% lastpage.ins & The installation file.\\
-% lastpage.drv & The driver to generate the documentation.\\
-% lastpage.sty & The \xext{sty}le file.\\
-% lastpage209.sty & The \xext{sty}le file for \LaTeX2.09{} \textbf{only}.\\
+% lastpage.ins & The installation file.\\
+% lastpage.drv & The driver to generate the documentation.\\
+% lastpage.sty & The \xext{sty}le file.\\
+% lastpage209.sty & The \xext{sty}le file for \LaTeX2.09{} \textbf{only}.\\
+% lastpage2e.sty & The \xext{sty}le file to determine which 2e-style to use.\\
+% lastpageclassic.sty & The \xext{sty}le file for older \LaTeX-formats.\\
+% lastpagemodern.sty & The \xext{sty}le file for the recent \LaTeX-format.\\
% lastpage-example.tex & The example file.%
% \end{tabular}
%
% \bigskip
%
-% \noindent For required other packages see the preceding subsection.
+% \noindent For required other packages please see the preceding subsection.
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
% \docstrip{} archive. The files are extracted by running the
-% \xext{dtx} through \plainTeX{}:
+% \xext{.dtx} through \plainTeX{}:
% \begin{quote}
% \verb|tex lastpage.dtx|
% \end{quote}
@@ -1659,18 +1996,19 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
%
% \paragraph{TDS.} Now the different files must be moved into
% the different directories in your installation TDS tree
-% (also known as \xfile{texmf} tree), \textbf{but first you should delete
-% the old \xpackage{lastpage} files (which are probably located in other directories)}.
-% You can make a backup of the old files before deleting them, of course.
+% (also known as \xfile{texmf} tree):
% \begin{quote}
% \def\t{^^A
% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
% lastpage.sty & tex/latex/lastpage.sty\\
+% lastpage209.sty & tex/latex/lastpage.sty\\
+% lastpage2e.sty & tex/latex/lastpage.sty\\
+% lastpageclassic.sty & tex/latex/lastpage.sty\\
+% lastpagemodern.sty & tex/latex/lastpage.sty\\
% lastpage.pdf & doc/latex/lastpage.pdf\\
% lastpage-example.tex & doc/latex/lastpage-example.tex\\
% lastpage-example.pdf & doc/latex/lastpage-example.pdf\\
% lastpage.dtx & source/latex/lastpage.dtx\\
-% lastpage209.sty & tex/latex/lastpage209.sty for \LaTeX2.09\\
% \end{tabular}^^A
% }^^A
% \sbox0{\t}^^A
@@ -1734,16 +2072,14 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \end{quote}
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
% TDS installing feature, then some files can already be in the right
-% place, see the documentation of \docstrip.
+% place, see the documentation of \docstrip{}.
%
% \subsection{Refresh file name databases}
-%
-% If your \TeX~distribution (\TeX live, \mikTeX, \teTeX, \dots) relies on
-% file name databases, you must refresh these. For example, \teTeX{} users run
-% \verb|texhash| or \verb|mktexlsr|.
+% If your \TeX~distribution (\TeX\,Live, \mikTeX, \dots) relies on
+% file name databases, you must refresh these. For example, \TeX\,Live\ users
+% run \verb|texhash| or \verb|mktexlsr|.
%
% \subsection{Some details for the interested}
-%
% \paragraph{Unpacking with \LaTeX.}
% The \xfile{.dtx} chooses its action depending on the format:
% \begin{description}
@@ -1751,7 +2087,7 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \item[\LaTeX:] Generate the documentation.
% \end{description}
% If you insist on using \LaTeX{} for \docstrip{} (really,
-% \docstrip{} does not need \LaTeX), then inform the autodetect routine
+% \docstrip{} does not need \LaTeX ), then inform the autodetect routine
% about your intention:
% \begin{quote}
% \verb|latex \let\install=y\input{lastpage.dtx}|
@@ -1782,7 +2118,6 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \end{quote}
%
% \subsection{Compiling the example}
-%
% The example file, \textsf{lastpage-example.tex}, can be compiled via\\
% \indent |latex lastpage-example.tex|\\
% or (recommended)\\
@@ -1791,14 +2126,14 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
%
% \section{Acknowledgements}
%
-% I (\textsc{H.-Martin M\"{u}nch}) would like to thank
+% I (\textsc{H.-Martin Münch}) would like to thank
% \textsc{Jeffrey P. Goldberg} (jeffrey+news at goldmark dot org) for
-% inventing the \xpackage{lastpage} package as well as for granting me
+% inventing the \xpackage{lastpage} package as well as for allowing me
% to update it. Further I would like to thank \textsc{Heiko Oberdiek}
-% for providing a~lot~(!) of useful packages (from which I also got everything
+% 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),
% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex}
-% newsgroups for their help in all things \TeX{}. Thanks for bug reports go
+% newsgroups for their help in all things \TeX{}. Thanks for bug reports
% to \textsc{Ulrike Fischer}, \textsc{Sebastian Bank}, \textsc{James Hedges},
% \textsc{Mikhail Titov}, and \textsc{Micha\l{} Herman}.
% Thanks to \textsc{Sven Siegmund} for pointing out a necessary further
@@ -1834,13 +2169,13 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% and then the \xpackage{hyperref} package and the \xpackage{revtex4}
% class even redefine\\
% |\lastpage@putlabel| (at least \xpackage{hyperref} version
-% \sout{ 2010/09/13, v6.81n}\uwave{ 2012/11/06, v6.83m}, and
-% REV\TeX{}4 version 2010/07/25, v4.1r, still do this).
+% 2012/11/06, v6.83m, and
+% REV\TeX{}4 version 2010/07/25, v4.1r, still did this).
% \end{Version}
% \begin{Version}{2010/02/18 v1.1}
-% \item Proposed |LastPages| label by \textsc{H.-Martin M\"{u}nch}
+% \item Proposed |LastPages| label by \textsc{H.-Martin Münch}
% on \Newsgroup{comp.text.tex}, see e.\,g.
-% \url{http://groups.google.com/group/comp.text.tex/msg/4407493da9c747f0?dmode=source};
+% \url{https://groups.google.com/g/comp.text.tex/c/Ad8pO2Rw_HY/m/8EfHqT1JB0QJ};
% now available in the \xpackage{pageslts} package.
% \end{Version}
% \begin{Version}{2010/07/29 v1.2a}
@@ -1851,14 +2186,14 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \item Replacement of |\filedate|, |-version|, |-name|,\ldots{} because
% of \LaTeX{}~bug 2705:\\
% Synopsis: Possible problem with |\fileversion| and |\filedate|\\
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=lastpage&pr=latex%2F2705&search=}
+% \url{https://www.latex-project.org/cgi-bin/ltxbugs2html?category=LaTeX&responsible=anyone&state=anything&keyword=lastpage&pr=latex/2705}
% \item Example |lastpage-example.tex|.
% \item Alternatives listing (section \ref{sec:Alternatives}).
% \item Listing of \TeX{} sources (subsection \ref{ss:Downloads}).
-% \item A lot (!) of details.
+% \item Really a lot of details.
% \item Complete rewriting of the documentation.
% \item Everything in \texttt{DTX} framework.
-% \item Included a |\CheckSum|.
+% \item Included a |\CheckSum|. [Removed in v2.0a.]
% \item Complete rewriting of the README file.
% \end{Version}
% \begin{Version}{2010/08/12 v1.2b}
@@ -1878,23 +2213,23 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% |\AtBeginDocument|, when placing the \texttt{lastpage} label it is also
% checked for the |\hyperref| command, in case \xpackage{hyperref} was not
% loaded at |\begin{document}| yet. (Bug reported by \textsc{Sebastian Bank},
-% thanks!)
-% \item Changed the |\unit| definition (got rid of an old |\rm|).
+% thanks!) [lastpagemodern.sty just uses |\IfPackageLoadedTF{hyperref}|.]
+% \item Changed the |\unit| definition (got rid of an old |\rm|). [Removed in v2.0a.]
% \item Changed |\lastpage@puthyperlabel| to |\lastpage@putlabelhyper| analogous to
% |\pagesLTS@putlabelhyper| of the \xpackage{pageslts} package.
% \item Updated version number and date of \xpackage{pagesLTS} package (especially
-% for the check for outdated versions).
+% for the check for outdated versions). [Removed in v2.0a.]
% \item Removed wrong \%\ from the driver file.
% \end{Version}
% \begin{Version}{2010/08/25 v1.2d}
% \item Bug fix: also \xpackage{tcilatex} defines the |\hyperref| command,
% therefore for \xpackage{hyperref} package detection this had to be
% changed to |\Hy@Warning|.
+% [lastpagemodern just uses |\IfPackageLoadedTF{hyperref}|.]
% \end{Version}
% \begin{Version}{2010/09/12 v1.2e}
-% \item \textsc{James Hedges} (Thanks!) pointed out, that there was no
-% instruction in the documentation about suppressing hyperlinks:
-% added (also to the example).
+% \item \textsc{James Hedges} pointed out, that there was no instruction in the
+% documentation about suppressing hyperlinks: added (also to the example).
% \item Diverse small changes.
% \end{Version}
% \begin{Version}{2010/09/24 v1.2f}
@@ -1902,9 +2237,7 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \item New version of REV\TeX{}4\ 2010/07/25, v4.1r, old problem.
% \item New version of \xpackage{pagesLTS} package, 2010/09/22, v1.1k.
% \item Moved the package from \texttt{.../latex/muench/lastpage/...} to\\
-% \texttt{.../latex/lastpage/...}.\\
-% (Please make sure that any old versions of the \xpackage{lastpage}
-% package are properly uninstalled from your system.)
+% \texttt{.../latex/lastpage/...}.
% \end{Version}
% \begin{Version}{2011/02/01 v1.2g}
% \item Updated to version 2010/04/24 v0.19 of the \xpackage{holtxdoc} package.
@@ -1916,7 +2249,7 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \item The \xpackage{holtxdoc} package was fixed, therefore the warning
% in \xfile{drv} could be removed.~-- Adapted the style of this documentation
% to new \textsc{Oberdiek} \xfile{dtx} style.
-% \item New versions of \xpackage{pagesLTS}, \xpackage{ulem}, \xpackage{hyperref},%
+% \item New versions of \xpackage{pagesLTS}, \xpackage{ulem}, \xpackage{hyperref},
% \xpackage{papermas} packages.
% \item Corrected references in the README and manual.
% \end{Version}
@@ -1926,26 +2259,23 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \item Some details.
% \end{Version}
% \begin{Version}{2011/08/31 v1.2j}
-% \item Updated to \TeX{} live 2011 (for compiling the documentation and example).
+% \item Updated to \TeX{} Live 2011 (for compiling the documentation and example).
% \item New version of \xpackage{papermas} package, 2011/08/22, v1.0h.
% \item Adapted for the use together with packages, which sometimes prevent writing
-% to the \xfile{aux} file. (Bug reported by \textsc{Mikhail Titov}, thanks!)
-% \item Minor details.
+% to the \xfile{aux} file. (Bug reported by \textsc{Mikhail Titov}.)
% \end{Version}
% \begin{Version}{2011/09/01 v1.2k}
% \item Fixed |\thepage{}| to |\thepage{} |, where there should be a space.
% \item New version of the \xpackage{hyperref} package, 2011/08/19, v6.82h, but
% still problem with links to pages with
% page-\textquotedblleft number\textquotedblright{} in \texttt{fnsymbol}
-% pagenumbering scheme.
-% \uwave{Seems to be fixed since v6.83m as of 2012/11/06.}
+% pagenumbering scheme. [Seems to be fixed since v6.83m as of 2012/11/06.]
% \item Documentation update about \textquotedblleft No write access to the
% \xfile{aux} file\textquotedblright .
% \item New version of \xpackage{regstats} package available.
-% \item Some small details.
% \end{Version}
% \begin{Version}{2013/01/28 v1.2l}
-% \item Updated to \TeX{} live 2012 (for compiling the documentation and example).
+% \item Updated to \TeX{} Live 2012 (for compiling the documentation and example).
% \item New versions of the packages
% \xpackage{endfloat}, \xpackage{holtxdoc}, \xpackage{hypdoc},
% \xpackage{hyperref}, \xpackage{pageslts}, \xpackage{regstats},
@@ -1953,30 +2283,35 @@ This can be broken for example by \verb|\pagenumbering{fnsymbol}|.
% \item The \xpackage{nameref} package redefines |\label| to have five arguments
% instead of two, therefore |\newlabel{LastPage}{{}{\thepage}{}{}{}}| instead of
% |\newlabel{LastPage}{{}{\thepage}}| must be used.
-% (Bug reported at \url{http://tex.stackexchange.com/q/95541/6865},
+% (Bug reported at \url{https://tex.stackexchange.com/q/95541},
% thanks to Micha\l{} Herman!) Fixed.
-% \item Updates to several details, also in the documentation.
% \end{Version}
% \begin{Version}{2015/03/29 v1.2m}
-% \item Updated to \TeX{} live 2014 (for compiling the documentation and example)
-% and installed the available updates. Therefore I can no longer test
-% whether \xpackage{lastpage} works with earlier versions of \LaTeX{}.
-% (It probably does, but there is no guarantee.)
-% \item Updates to a lot (!) of details in the documentation (manual \& README),
-% very small changes in code.
+% \item Updated to \TeX{} Live 2014 (for compiling the documentation and example).
+% \item Updates to really a lot of details in the documentation (manual \& README).
% \end{Version}
% \begin{Version}{2021/09/03 v1.2n}
% \item Updates to the documentation (manual \& README), to the example, and
% several small changes in code.
+% \item This version has been archived at
+% \url{https://web.archive.org/web/20230305193232/https://mirror.ctan.org/install/macros/latex/contrib/lastpage.tds.zip}.
+% \end{Version}
+% \begin{Version}{2023-03-07 v2.0a}
+% \item Removed use of \pkg{ulem}.
+% \item Removed |\unit|.
+% \item \pkg{lastpage} should now determine automatically, whether to load
+% its \TeX~2.09 version, classic \LaTeX2e-version, or modern version
+% with \eTeX, hook-management etc.
+% \item Converted to UTF-8.
+% \item Updated to \LaTeX{} format 2022-11-01.
+% \item Extensive updates to the documentation (manual \& README) and to the example.
% \end{Version}
% \end{History}
-%
% \bigskip
%
% When you find a mistake or have a suggestion for an improvement of this package,
% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.)
-%
-% \pagebreak
+% \newpage
%
% \PrintIndex
%
diff --git a/macros/latex/contrib/lastpage/lastpage.pdf b/macros/latex/contrib/lastpage/lastpage.pdf
index d0bedd4949..4f0988a919 100644
--- a/macros/latex/contrib/lastpage/lastpage.pdf
+++ b/macros/latex/contrib/lastpage/lastpage.pdf
Binary files differ
diff --git a/macros/latex/contrib/microtype/README.md b/macros/latex/contrib/microtype/README.md
index 0a3faccb4f..251860143d 100644
--- a/macros/latex/contrib/microtype/README.md
+++ b/macros/latex/contrib/microtype/README.md
@@ -4,7 +4,7 @@ The `microtype` package
**Subliminal refinements towards typographical perfection**
- (v3.0f -- 2022/06/23)
+ (v3.1 -- 2023/03/06)
Overview
@@ -82,4 +82,4 @@ provided that: (1) the original copyright statement is not removed, and
(2) the identification string is changed.
------------------------------------------------------
-Copyright (c) 2004--2022 R Schlicht `<w.m.l@gmx.net>`
+Copyright (c) 2004--2023 R Schlicht `<w.m.l@gmx.net>`
diff --git a/macros/latex/contrib/microtype/microtype-code.pdf b/macros/latex/contrib/microtype/microtype-code.pdf
index fa07085058..ec73da44e1 100644
--- a/macros/latex/contrib/microtype/microtype-code.pdf
+++ b/macros/latex/contrib/microtype/microtype-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/microtype/microtype-utf.dtx b/macros/latex/contrib/microtype/microtype-utf.dtx
index fc6226a095..380619cf8c 100644
--- a/macros/latex/contrib/microtype/microtype-utf.dtx
+++ b/macros/latex/contrib/microtype/microtype-utf.dtx
@@ -3,7 +3,7 @@
% ------------------------------------------------------------------------
% The `microtype' package
% Subliminal refinements towards typographical perfection
-% Copyright (c) 2004--2022 R Schlicht <w.m.l@gmx.net>
+% Copyright (c) 2004--2023 R Schlicht <w.m.l@gmx.net>
%
% 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
@@ -27,7 +27,7 @@
\ProvidesFile
%</!EBGaramond>
%<*driver>
- {\jobname.dtx}[2022/06/23 v3.0f]
+ {\jobname.dtx}[2023/03/06 v3.1]
%</driver>
%<CharisSIL> {mt-CharisSIL.cfg}[2017/07/07 v1.1 microtype config. file: Charis SIL (RS)]
%<LatinModernRoman> {mt-LatinModernRoman.cfg}[2021/02/21 v1.1 microtype config. file: Latin Modern Roman (RS)]
diff --git a/macros/latex/contrib/microtype/microtype.dtx b/macros/latex/contrib/microtype/microtype.dtx
index 1df1413136..db89547894 100644
--- a/macros/latex/contrib/microtype/microtype.dtx
+++ b/macros/latex/contrib/microtype/microtype.dtx
@@ -3,7 +3,7 @@
% ------------------------------------------------------------------------
% The `microtype' package
% Subliminal refinements towards typographical perfection
-% Copyright (c) 2004--2022 R Schlicht <w.m.l@gmx.net>
+% Copyright (c) 2004--2023 R Schlicht <w.m.l@gmx.net>
%
% 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
@@ -37,7 +37,7 @@
%<lua-> {microtype-luatex.def}
%<xe-> {microtype-xetex.def}
%<*package|letterspace|m-t|pdf-|lua-|xe-|show>
- [2022/06/23 v3.0f
+ [2023/03/06 v3.1
%<package> Micro-typographical refinements
%<letterspace> Robust letterspacing
%<show> Visual debugging for the microtype package
@@ -52,8 +52,8 @@
%<luafile>local microtype = microtype
%<luafile>microtype.module = {
%<luafile> name = "microtype",
-%<luafile> version = "3.0f",
-%<luafile> date = "2022/06/23",
+%<luafile> version = "3.1",
+%<luafile> date = "2023/03/06",
%<luafile> description = "microtype module.",
%<luafile> author = "E. Roux, R. Schlicht and P. Gesang",
%<luafile> copyright = "E. Roux, R. Schlicht and P. Gesang",
@@ -343,7 +343,7 @@
\ifcodedoc
Numbers in upright shape refer to the \textit{page} where the corresponding entry
is described (bold face) resp. occurs.
- Numbers in italics refer to the \textit{code line} where the corresponding entry
+ Numbers in italic shape refer to the \textit{code line} where the corresponding entry
is defined (underlined) resp. used.
Numbers prefixed with `U' refer to the User manual.
\fi
@@ -616,7 +616,8 @@
\DeclareMicrotypeSetDefault,\SetProtrusion,\SetExpansion,\SetTracking,
\SetExtraKerning,\SetExtraSpacing,\DisableLigatures,\DeclareCharacterInheritance,
\DeclareMicrotypeVariants,\DeclareMicrotypeAlias,\DeclareMicrotypeBabelHook,
- \LoadMicrotypeFile,\microtypecontext,\textmicrotypecontext,\textls,\lsstyle,\lslig,
+ \LoadMicrotypeFile,\DeclareMicrotypeFilePrefix,\microtypecontext,\textmicrotypecontext,
+ \textls,\lsstyle,\lslig,
\leftprotrusion,\rightprotrusion,\noprotrusion,\noprotrusionifhmode,
\Microtype@Hook},
keywordstyle=[0]\color{thegreen},
@@ -670,7 +671,7 @@
pdfkeywords={TeX, LaTeX, pdfTeX, LuaTeX, XeTeX, typography, micro-typography,
character protrusion, margin kerning, optical alignment, font expansion,
font scaling, hz, kerning, spacing, glue, letterspacing, tracking, ligatures},
- pdfcopyright={\textcopyright\ 2004--2022 R Schlicht\textLF
+ pdfcopyright={\textcopyright\ 2004--2023 R Schlicht\textLF
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.\textLF
@@ -723,7 +724,8 @@
\def\mailtoRS{\href % some PDF viewers don't like spaces:
{mailto:Robert\%20Schlicht\%3cw.m.l@gmx.net\%3e?subject=[microtype\%20\fileversion]}
{\texttt{w.m.l@gmx.net}}}
- % the samples in the introduction, utilising nested optional content groups (aka. layers):
+ % the samples in the introduction, utilising nested optional content groups (aka. layers)
+ % (nowadays, I would be using one of the ocg packages, but none of them existed back then (2005)):
\ifnum\pdftexversion<140 \else
\def\mt@layer#1#2{\pdfliteral page{/OC/#1 BDC}#2\pdfliteral page{EMC}}
\ifx\mt@objects\@undefined\let\mt@objects\@empty\fi
@@ -960,7 +962,7 @@
% other extensions (see section~\ref{sec:lettersp}\ifcodedoc\space of the User manual\fi).
%
%\bigskip\noindent
-% This package is copyright \textcopyright\ 2004\kern.09em--2022 R Schlicht.
+% This package is copyright \textcopyright\ 2004\kern.09em--2023 R Schlicht.
% It may be distributed and/or modified under the conditions of the
% \IfFileExists{lppl.tex}{\hyperref[LPPL:LPPL]}{\href{https://www.latex-project.org/lppl/}}
% {\LaTeX\ Project Public License},
@@ -2506,6 +2508,12 @@
% section~\ref{sub:hook}.}
% This command will load the file `|mt-|\meta{font name}|.cfg|'.
%
+%\medskip
+%\Describe{Macro}{\DeclareMicrotypeFilePrefix}{prefix}
+% Or, in fact, it will load the file `\meta{prefix}|-|\meta{file name}|.cfg|'.
+% The \meta{prefix} may be changed, which, however, you should only do
+% if you have your own set of configuration files that you want to be
+% loaded \emph{instead of} any of those provided with the package.
%
%\section{Context-sensitive setup}\label{sec:context}
%
@@ -2639,8 +2647,8 @@
%\medskip
%\Describe{Macro}{\lslig}{ligature}
% Since the commands \cs{textls} and \cs{lsstyle} will also evaluate the
-% `\texttt{no ligatures}' key for the respective font (cf.
-% section~\ref{sub:tracking}), you usually need not worry
+% `\texttt{no ligatures}' key for the respective font (as well as all other
+% options mentioned in section~\ref{sub:tracking}), you usually need not worry
% about protecting or breaking ligatures with most fonts. However, in certain
% situations, there may be a conflict of ligatures beginning with the same
% letter, where some of them should be inhibited, while others should not. For
@@ -2648,17 +2656,17 @@
% `ck', `tz' and `sz'~(`\textfrak{sz}') should never be broken up; you also usually
% see the `st'~(`\textfrak{st}') ligature in letterspaced text. Furthermore, at
% least the \pkg{yfonts} package realises the short~s~(`\textfrak{s:}') as the
-% ligature~`|s:|'. On the other hand, the `ct'~ligature and the other `long~s'
+% pseudo-ligature~`|s:|'. On the other hand, the `ct'~ligature and the other `long~s'
% ligatures often found in Fraktur fonts should be suppressed. There are two
% ways of solving this problem: either don't disable the `|s|' and/or `|c|'
% ligatures and break those that need to be broken up by inserting
-% `|{\kern0pt}|' or \pkg{babel}'s \verb="|= shortcut; or disable them and
+% `|{\kern0pt}|' or \pkg{babel}'s~\verb="|= shortcut; or disable them and
% protect those ligatures that need to be protected by enclosing them in the
% \cs{lslig} command. So, the following two solutions have the same result
% (namely, `\textls{\def\!#1{\textcolor{thegreen}{\lslig{#1}}}^^A
% \def\?#1{\textcolor{thered}{#1}}^^A
% \textfrak{Au\!{s:}\?{si}\!{ch}t\!{s:}lo\?{si}gkeit}}',
-% with ligatures here highlighted in green, inhibited ligatures in red).
+% with ligatures here highlighted in green, inhibited ligatures in red):
%
%\begin{verbatim}[morekeywords={[0]{\kern}}]
%\SetTracking[noligatures={f}]{encoding = LY, family = yfrak}{120}
@@ -2759,8 +2767,8 @@
%
%\medskip\noindent
% The \microtype\ package defines a number of patches in order to get protrusion
-% right (with dedicated patches for the classes and packages indicated in
-% parentheses; they may still work with other classes or packages):
+% right (indicated in parentheses are dedicated patches for classes and packages
+% beyond the standard ones; they may still work with other classes or packages):
%\begingroup
%\list{}{\labelwidth=3em \itemindent\z@ \leftmargin=\labelwidth
% \def\makelabel#1{\hskip\labelsep\texttt{#1}\hss}}
@@ -2773,20 +2781,22 @@
% slightly shifted to the right.
% This patch also affects environments such as |quote| or |flushleft|, which are
% implemented in \LaTeX\ as lists starting with an implicit empty item.
-% \MTsupp{standard classes, \cls{beamer}, \cls{simplecv}}
+% \MTsupp{\cls{beamer}, \cls{simplecv}}
% \item[toc] Adds protrusion at the left margins of sectioning titles in the Table of Contents
% and similar Lists of \meta{Things}.
-% \MTsupp{standard classes, \cls{memoir}}
+% \MTsupp{\cls{memoir}}
% \item[footnote] Protrusion for the first line of footnote text (visible in particular
% when the footnote text is set in block paragraphs, like in this document).
-% \MTsupp{standard classes, \cls{memoir}, <\cls{KOMA}> classes, \cls{beamer}, \pkg{hyperref}}
+% \MTsupp{\cls{memoir}, <\cls{KOMA}> classes, \cls{beamer}, \pkg{hyperref}}
+% \item[verbatim] Disables protrusion and expansion in verbatim environments.
+% \MTsupp{\pkg{alltt}}
% \item[eqnum] Protrusion for equation numbers on either side. If you are using the
% interface provided by \pkg{mathtools}, insert the relevant commands
% yourself, \eg:
%\begin{verbatim}[belowskip=-\smallskipamount]
%\newtagform{mytag}[\textbf]{\leftprotrusion{(}}{\rightprotrusion{)}}
%\end{verbatim}^^A
-% \MTsupp{standard classes, \pkg{amsmath}, \cls{IEEEtran}}
+% \MTsupp{\pkg{amsmath}, \cls{IEEEtran}}
%\endlist\endgroup
%
%\medskip\noindent
@@ -2924,8 +2934,8 @@
%\end{verbatim}
%\fi
%
+%\iffalse
%\changes{v1.9}{2005/07/10}{add hint about \texttt{verbatim} environment}
-%\todo{option to patch \texttt{verbatim}?} ^^A for Karl
%\paragraph{You might want to disable protrusion in \texttt{verbatim} environments.}
% As you know by now, \microtype\ will by default activate character protrusion
% for all fonts contained in the font set `|alltext|'. This also includes the
@@ -2949,6 +2959,7 @@
% If you are using the \pkg{fancyvrb} or the \pkg{listings} package, this is
% not necessary, since their implementation of the corresponding environments
% will inhibit protrusion anyway.
+%\fi
%
%\changes{v1.9e}{2006/07/10}{add hint about unknown encodings}
%\paragraph{Settings for Greek/Thai/Armenian etc. encodings are not yet included.}
@@ -3038,29 +3049,6 @@
%\lstset{style=message}
% \item
%\begin{verbatim}
-%! Font csnameendcsname=<cmr10+20 at 10.0pt> not loadable: Metric (TFM) file not found.
-%\end{verbatim}
-%\changes{v1.9a}{2005/11/15}{add explanation for error message in <DVI> mode}
-% This error message will occur if you are trying to employ font expansion
-% while creating <DVI> output. Remember that \emph{automatic} font expansion
-% only works when running \pdftex\ or \luatex\ in <PDF> mode. Although expansion is also
-% possible in <DVI> mode with \pdftex, it requires that all instances of the expanded fonts
-% exist on your \TeX\ system.
-%
-% \item
-%\begin{verbatim}
-%! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.
-%\end{verbatim}
-%\changes{v2.2}{2007/06/13}{add hint about error message with \pdftex\ 1.40}
-% Automatic font expansion has been improved in \pdftex\ 1.40, in that it now
-% not only works with Type\,1 fonts but also with TrueType, OpenType and even
-% non-embedded fonts. The above error message indicates either that you are
-% trying to apply expansion to a bitmap~(|pk|) font, which is still not
-% possible, or that the font isn't found at all, \eg, because of missing map
-% entries.
-%
-% \item
-%\begin{verbatim}
%Package microtype Warning: Unknown slot number of character
%(microtype) `<\k A>'
%(microtype) in font encoding `TU' in inheritance list
@@ -3083,6 +3071,44 @@
% inheritance and protrusion settings specific to the font in question.
%
% \item
+%\begin{verbatim}[deletekeywords={[1]{patch}}]
+%Package microtype Warning: Unable to apply patch `<eqnum>' on input line <29>.
+%\end{verbatim}
+%\changes{v3.1}{2021/09/15}{add hint about protrusion patch warnings}
+% As described in chapter~\ref{sec:pedantic} above, \microtype\ tries to patch a number
+% of commands to enable or disable protrusion in certain situations. If you receive a warning
+% like the above, you should first make sure (as always) that the package is up to date.
+% If it is, consider filing a \href{\githuburl/issues}{bug report}.
+% Until a fix is available, or if you are, for whatever reason, unable or unwilling
+% to update, the easiest solution to get rid of the warning is to disable the
+% problematic patch with the \opt{nopatch} option, \eg:
+%\begin{verbatim}[style=microtype]
+%\microtypesetup{nopatch={eqnum}}
+%\end{verbatim}
+%
+%% \item
+%\begin{verbatim}
+%! Font csnameendcsname=<cmr10+20 at 10.0pt> not loadable: Metric (TFM) file not found.
+%\end{verbatim}
+%\changes{v1.9a}{2005/11/15}{add explanation for error message in <DVI> mode}
+% This error message will occur if you are trying to employ font expansion
+% while creating <DVI> output. Remember that \emph{automatic} font expansion
+% only works when running \pdftex\ or \luatex\ in <PDF> mode. Although expansion is also
+% possible in <DVI> mode with \pdftex, it requires that all instances of the expanded fonts
+% exist on your \TeX\ system.
+%
+% \item
+%\begin{verbatim}
+%! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.
+%\end{verbatim}
+%\changes{v2.2}{2007/06/13}{add hint about error message with \pdftex\ 1.40}
+% Beginning with \pdftex\ 1.40, font expansion not only works with Type\,1 fonts
+% but also with TrueType, OpenType and even non-embedded fonts.
+% The above error message indicates either that you are trying to apply expansion to
+% a bitmap~(|pk|) font, which is still not possible, or that the font isn't found
+% at all, \eg, because of missing map entries.
+%
+% \item
%\begin{verbatim}
%Warning: pdflatex: font <ptmr8r> cannot be expanded (not an included Type1 font)
%\end{verbatim}
@@ -3122,7 +3148,6 @@
%! TeX capacity exceeded, sorry [maximum internal font number (font_max)=<2000>].
%\end{verbatim}
% Memory parameter `|font_max|' too small.
-%\pagebreak ^^A layout
% \item
%\begin{verbatim}
%! TeX capacity exceeded, sorry [PDF memory size (pdf_mem_size)=<65536>].
@@ -3338,9 +3363,12 @@
% \contributor Nelson Lago <@\at @>, ^^A https://github.com/urrameu
% \contributor Brian Dunn <@\at @>, ^^A https://github.com/bdtc
% \contributor Ralf Steinle <rasteinle\at web.de>,
-% \contributor Denis Bitouz\'e <@\at @> ^^A https://tex.stackexchange.com/users/18401/denis-bitouz%c3%a9
+% \contributor Denis Bitouz\'e <@\at @>, ^^A https://tex.stackexchange.com/users/18401/denis-bitouz%c3%a9
+% \contributor Christophe Dervieux <@\at @>, ^^A https://github.com/cderv
+% \contributor Shen Zhou Hong <@\at @>, ^^A https://github.com/ShenZhouHong
+% \contributor David Purton <@\at @> ^^A https://github.com/dcpurton
% and
-% \contributor Christophe Dervieux <@\at @>. ^^A https://github.com/cderv
+% `\contributor rallg <@\at @>'. ^^A https://github.com/rallg
%
%\iffalse
%\section{History of micro-typography} ^^A some time ...
@@ -3421,7 +3449,7 @@
%
% \bibitem[\LaTeXe\ font selection]{fntguide}
% \LaTeX\ Project Team, \emph{\LaTeXe\ font selection},
-% March 2021.
+% August 2022.
% (\ctanurl{macros/latex/base/fntguide.pdf})
%
% \bibitem[\pkg{fontspec}]{fontspec}
@@ -3433,7 +3461,7 @@
% \bibitem[\pkg{luaotfload}]{luaotfload}
% \LaTeX3 Project, \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer, Marcel Kr\"uger,
% \emph{The \pkg{luaotfload} package},
-% 15~June 2022.
+% 3~October 2022.
% (\ctanpkgurl{luaotfload})
%
% \bibitem[\pkg{pdfcprot}]{pdfcprot}
@@ -3442,13 +3470,9 @@
% (\ctanpkgurl{pdfcprot})
%
% \bibitem[\pkg{soul}]{soul}
-% Melchior Franz, \emph{The \pkg{soul} package},
-% 17 November 2003.
+% [Melchior Franz,] Heiko Oberdiek, \emph{The \pkg{soul} package},
+% 18 February 2023.
% (\ctanpkgurl{soul}).
-%\changes{v2.3a}{2008/01/06}{mention \pkg{soulutf8}}
-% See also Heiko Oberdiek's extension of this package,
-% \pkg{soulutf8}, which adds Unicode support.
-% (\ctanpkgurl{soulutf8})
%
%\end{thebibliography}
%
@@ -3485,7 +3509,13 @@
%
%\begin{History}
%
-%\VersionDate{\expandafter\@gobble\fileversion}{\filedate}
+%\Version{\expandafter\@gobble\fileversion}{\filedate}
+% \item New command \cs{DeclareMicrotypeFilePrefix} to change the prefix of the
+% configuration files \refsection{\ref{sub:config-file}}
+% \item New protrusion patch |verbatim| to switch off protrusion
+% and expansion in |verbatim| environments \refsection{\ref{sec:pedantic}}
+%
+%\VersionDate{3.0f}{2022/06/23}
%
%\VersionDate{3.0e}{2022/06/20}
%
@@ -3740,8 +3770,8 @@
%^^A be loaded at any time)
%^^A \item \cs{microtypesetup} now sets the correct level of protrusion
%^^A \refsection{\ref{sub:options-cmd}}
-% \item New option: `\opt{final}'
-% \refsection{\ref{sub:options-misc}}
+%^^A \item New option: `\opt{final}'
+%^^A \refsection{\ref{sub:options-misc}}
%
%\VersionDate{1.3}{2004/10/27}
%
@@ -3847,8 +3877,9 @@
% \inputlineno,\interlinepenalty,\jobname,\kern,\lastbox,\lastkern,\lastskip,\lccode,
% \leaders,\let,\long,\lowercase,\maxdimen,\meaning,\multiply,\newlinechar,\noexpand,
% \noindent,\number,\or,\parfillskip,\pretolerance,\relax,\setbox,\showboxdepth,
-% \splittopskip,\string,\the,\tolerance,\unhbox,\unkern,\unskip,\unvbox,\uppercase,
-% \vbadness,\vbox,\vfuzz,\vrule,\vsplit,\wd,\widowpenalty,\write,\xdef}
+% \splittopskip,\string,\the,\tolerance,\tracingmacros,\unhbox,\unkern,\unskip,
+% \unvbox,\uppercase,\vbadness,\vbox,\vfuzz,\vrule,\vsplit,\vss,\wd,\widowpenalty,
+% \write,\xdef}
%^^A\DoNotIndex{\font,\fontdimen,\fontname,\nullfont,\sfcode,\spacefactor,
%^^A \spaceskip,\xspaceskip} ^^A tex
%\DoNotIndex{\currentgrouplevel,\currentgrouptype,\currentiflevel,\detokenize,
@@ -3878,30 +3909,42 @@
% \@undefined,\@unprocessedoptions,\@unusedoptionlist,\@xobeysp,\check@icr,
% \color@begingroup,\color@endgroup,\g@addto@macro,\hmode@bgroup,\m@ne,\maybe@ic,
% \maybe@ic@,\nfss@text,\not@math@alphabet,\on@line,\p@,\set@display@protect,
-% \strip@prefix,\strip@pt,\@text@composite,\tw@,\z@,\z@skip,\zap@space,
-% \active,\bfseries,\documentclass,\dotfill,\fbox,\fboxrule,\fboxsep,\fmtversion,
+% \strip@prefix,\strip@pt,\@text@composite,\tw@,\@verbatim,\z@,\z@skip,\zap@space,
+% \active,\bfseries,\documentclass,\dotfill,\em,\emph,\fbox,\fboxrule,\fboxsep,\fmtversion,
% \fontseriesforce,\fontshapeforce,\footnotesize,\huge,\Huge,\itshape,\large,\Large,
-% \LARGE,\leavevmode,\llap,\makeatletter,\makebox,\mathrm,\mbox,\mdseries,\medskip,
-% \newbox,\newcommand,\newcount,\newdimen,\newif,\newline,\newskip,\newtoks,\nobreak,
-% \nonfrenchspacing,\normalbaselineskip,\normalshape,\normalsize,\numberline,\obeylines,
-% \par,\parbox,\providecommand,\quad,\raggedright,\renewcommand,\rmfamily,\scalebox,
-% \sffamily,\scriptsize,\scshape,\slshape,\small,\space,\sscshape,\strut,\swshape,
-% \textwidth,\texttt,\tiny,\tracingnone,\ttfamily,\upshape,\ulcshape,\usefont,\tiny,
-% \AddToHook,\AtBeginDocument,\AtEndOfPackage,\CheckCommand,\CurrentOption,\DeclareOption,
-% \DeclareRobustCommand,\IfFileExists,\IfFormatAtLeastTF,\InputIfFileExists,\MessageBreak,
-% \PackageError,\PackageInfo,\PackageWarning,\PassOptionsToPackage,\ProcessOptions,
-% \RawNoindent,\RequirePackage,\UnicodeEncodingName}
+% \LARGE,\leavevmode,\llap,\makeatletter,\makebox,\marginparsep,\mathrm,\mbox,\mdseries,
+% \medskip,\newbox,\newcommand,\newcount,\newdimen,\newif,\newline,\newskip,\newtoks,
+% \nobreak,\nonfrenchspacing,\normalbaselineskip,\normalshape,\normalsize,\numberline,
+% \obeylines,\par,\parbox,\providecommand,\quad,\raggedright,\renewcommand,\rmfamily,
+% \scalebox,\sffamily,\scriptsize,\scshape,\slshape,\small,\space,\sscshape,\strut,\swshape,
+% \textbf,\textit,\textmd,\textnormal,\textrm,\textsc,\textsf,\textsl,\textssc,\textsw,
+% \textulc,\textup,\textwidth,\texttt,\tiny,\tracingnone,\ttfamily,\upshape,\ulcshape,
+% \usefont,\tiny,\AddToHook,\AtBeginDocument,\AtEndOfPackage,\CheckCommand,\CurrentOption,
+% \DeclareOption,\DeclareRobustCommand,\IfFileExists,\IfFormatAtLeastTF,\InputIfFileExists,
+% \MakeLowercase,\MakeUppercase,\MakeTitlecase,\MessageBreak,\PackageError,\PackageInfo,
+% \PackageWarning,\PassOptionsToPackage,\ProcessOptions,\RawNoindent,\RequirePackage,
+% \UnicodeEncodingName}
%^^A\DoNotIndex{\add@accent,\cf@encoding,\curr@fontshape,\define@newfont,
%^^A \do@subst@correction,\f@encoding,\f@family,\f@size,\font@name,\fontencoding,
%^^A \fontseries,\fontshape,\glb@currsize,\glb@settings,\normalfont,\pickup@font,
%^^A \remove@tlig,\selectfont,\seriesdefault,\shapedefault,\set@fontsize,\showhyphens} ^^A latex
%\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision} ^^A tex live 2004
+%\DoNotIndex{\alltt} ^^A alltt
+%\DoNotIndex{\eqref,\tagform@} ^^A amsmath
%\DoNotIndex{\foreign@language,\languagename,\select@language,\shorthandoff} ^^A babel
%\DoNotIndex{\percentsign} ^^A babel/spanish,galician,mexican
-%\DoNotIndex{\polyglossia@language@switched} ^^A polyglossia
+%\DoNotIndex{\beamer@@callorigitem,\beamer@callorigitem,
+% \beamer@framefootnotetext} ^^A beamer
%\DoNotIndex{\CJK@ifundefined,\CJK@plane,\CJK@temp,\CJK@addcmap} ^^A CJK,CJKutf8
%\DoNotIndex{\color} ^^A color
-%\DoNotIndex{\csqQQ,\csq@bqgroup,\csq@eqgroup,\@disablequotes} ^^A csquotes
+%\DoNotIndex{\csqQQ,\csq@bqgroup,\csq@eqgroup,\@disablequotes,
+% \enquote,\foreignquote,\foreigntextquote,\foreigntextcquote,
+% \hyphenquote,\hyphentextquote,\hyphentextcquote,\textquote,\textcquote} ^^A csquotes
+%\DoNotIndex{\meta} ^^A doc
+%\DoNotIndex{\apptocmd,\gappto,\ifdefmacro,\ifdefparam,\patchcmd} ^^A etoolbox
+%\DoNotIndex{\txfigures,\lnfigures,\tbfigures,\prfigures,\fontfigurestyle,
+% \fontfigurealignment,\fontbasefamily,\figureversion,\textfigures,
+% \liningfigures,\tabularfigures,\proportionalfigures} ^^A fontaxes
%\DoNotIndex{\hyper@@anchor,\hyper@nopatch@footnote,\Hy@footnote@currentHref,
% \ifHy@hyperfootnotes,\ifHy@implicit,\pdfstringdefDisableCommands,
% \pdfstringdefWarn} ^^A hyperref
@@ -3914,30 +3957,41 @@
%\DoNotIndex{\define@key,\KV@@sp@def,\setkeys} ^^A keyval
%\DoNotIndex{\l@dunhbox@line} ^^A ((r)e)ledmac,((r)e)ledpar
%\DoNotIndex{\lst@ProcessLetter} ^^A listings
+%\DoNotIndex{\cs,\marg,\oarg,\parg} ^^A ltxdoc
%\DoNotIndex{\newluafunction} ^^A luatexbase
+%\DoNotIndex{\tistyle,\ltstyle,\ofstyle,\altstyle,\regstyle,\embossstyle,
+% \ornamentalstyle,\qtstyle,\shstyle,\tmstyle,\tvstyle,\swashstyle,
+% \lnstyle,\osstyle,\instyle,\sustyle,\lstyle,\ostyle,\pstyle,\tstyle,
+% \plstyle,\postyle,\tlstyle,\tostyle,\scolshape,\olshape,\sishape,\ushape,
+% \scushape,\uishape,\rishape,\dfshape,\swstyle,\nwwidth,\cdwidth,\ecwidth,
+% \ucwidth,\etwidth,\epwidth,\exwidth,\uxwidth,\regwidth,\mbweight,\dbweight,
+% \sbweight,\ebweight,\ubweight,\lgweight,\elweight,\ulweight,
+% \textti,\textlt,\textof,\textalt,\textreg,\emboss,\textorn,\ornament,
+% \textqt,\textsh,\texttm,\texttv,\textswash,\textln,\textos,\textin,\textsu,
+% \textl,\texto,\textp,\textt,\textpl,\textpo,\texttl,\textto,\textol,\textsi,
+% \textu,\textscu,\textui,\textri,\textdf,\textnw,\textcd,\textec,\textuc,
+% \textet,\textep,\textex,\textux,\textrw,\textmb,\textdb,\textsb,\texteb,
+% \textub,\textlg,\textel,\textul} ^^A nfssext-cfr
%\DoNotIndex{\pdf@escapestring} ^^A pdftexcmds
%\DoNotIndex{\py@macron} ^^A pinyin
+%\DoNotIndex{\polyglossia@language@switched} ^^A polyglossia
+%\DoNotIndex{\@topic@item} ^^A simplecv
%\DoNotIndex{\SOUL@,\SOUL@doword,\soulregister} ^^A soul
%\DoNotIndex{\tikz@expandcount} ^^A tikz
%\DoNotIndex{\conditionally@traceoff} ^^A trace
%\DoNotIndex{\@xspace,\@xspace@firsttrue} ^^A xspace
-%\DoNotIndex{\frakfamily,\swabfamily,\gothfamily} ^^A yfonts
-%\DoNotIndex{\apptocmd,\gappto,\ifdefmacro,\ifdefparam,\patchcmd} ^^A etoolbox
-%\DoNotIndex{\beamer@@callorigitem,\beamer@callorigitem,
-% \beamer@framefootnotetext} ^^A beamer
-%\DoNotIndex{\eqref,\tagform@} ^^A amsmath
-%\DoNotIndex{\@topic@item} ^^A simplecv
+%\DoNotIndex{\frakfamily,\gothfamily,\swabfamily,\textfrak,\textgoth,\textswab}^^A yfonts
%\DoNotIndex{\booknumberline,\chapternumberline,\foottextfont,\partnumberline,
% \cftbookafterpnum,\cftchapterafterpnum,\cftfigureafterpnum,\cftparagraphafterpnum,
% \cftpartafterpnum,\cftsectionafterpnum,\cftsubparagraphafterpnum,\cftsubsectionafterpnum,
% \cftsubsubsectionafterpnum,\cfttableafterpnum} ^^A memoir
-%\DoNotIndex{\setuptoc,\unsettoc,\scr@saved@footnotetext} ^^A koma (tocbasic)
+%\DoNotIndex{\KOMAClassName,\setuptoc,\unsettoc,\scr@saved@footnotetext} ^^A koma (tocbasic)
%\DoNotIndex{\theequationdis,\theIEEEsubequationdis} ^^A IEEEtran
%\DoNotIndex{\x,\MT@dinfo,\MT@dinfo@nl,\tracingmicrotype,\tracingmicrotypeinpdf,
% \ifMT@inannot,\MT@inannottrue,\MT@inannotfalse,\MT@addto@annot,\MT@pdf@annot,
% \MT@show@pdfannot,\iftracingmicrotypeinpdfall,\tracingmicrotypeinpdfalltrue,
% \tracingmicrotypeinpdfallfalse,\DeclareMicroTypeAlias,\DeclareMicroTypeSet,
-% \LoadMicroTypeFile,\UseMicroTypeSet,\MicroType@Hook} ^^A microtype
+% \LoadMicroTypeFile,\DeclareMicrotypeFilePrefix,\UseMicroTypeSet,\MicroType@Hook}^^A microtype
%
% ^^A -------------------------------------------------------------------------
%
@@ -4069,6 +4123,7 @@
\newcommand*\DeclareMicrotypeVariants[1]{}
\newcommand*\DeclareMicrotypeAlias[2]{}
\newcommand*\LoadMicrotypeFile[1]{}
+\newcommand*\DeclareMicrotypeFilePrefix[1]{}
\newcommand*\DeclareMicrotypeBabelHook[2]{}
\newcommand*\microtypesetup[1]{}
\newcommand*\microtypecontext[1]{}
@@ -4102,6 +4157,7 @@
\@onlypreamble\DisableLigatures
\@onlypreamble\DeclareMicrotypeVariants
\@onlypreamble\DeclareMicrotypeBabelHook
+\@onlypreamble\DeclareMicrotypeFilePrefix
% \end{macrocode}
% Don't load \letterspace.
% \begin{macrocode}
@@ -6378,10 +6434,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@glet\MT@setupfont@hook\@empty
% \end{macrocode}
% \microtype\ is so so loquacious~\dots\
-% Sometimes you just want to silence it when debugging a document.
+% Sometimes you just want to silence it when debugging a document.\footnote{
+% Cf. \url{https://www.youtube.com/watch?v=7FQLnggVgDE&t=38m24s}}
+% \index{Mittelbach=\textit {Frank Mittelbach} (contributor)|hyperpage}
% \begin{macrocode}
- %\gdef\MT@setupfont@hook{\tracingnone
- % \MT@info{Silently doing my `magic' (Mittelbach) for font\MessageBreak\MT@@font}}%
+ %\gdef\MT@setupfont@hook{\ifnum\tracingmacros>\z@\tracingnone
+ % \MT@info{->Silently doing my `magic' (Mittelbach) for font\MessageBreak->\MT@@font}\fi}%
\MT@if@false
\MT@with@babel@and@T{spanish} \MT@if@true
\MT@with@babel@and@T{galician}\MT@if@true
@@ -6566,7 +6624,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\newif\ifMT@patch@ok
\def\MT@patch@info#1{\MT@info{Applying patch `#1'}}
\def\MT@patch@warn#1{\MT@warning{Unable to apply patch `#1'}}
-\def\MT@patch@undef#1{\MT@warning{Patch `#1' undefined. Cannot apply it}}
+\def\MT@patch@undef#1{\MT@warning{Patch `#1' undefined.\MessageBreak Cannot apply it}}
\def\MT@patch@info@undo#1{\MT@info{Reverting patch `#1'}}
% \end{macrocode}
%\end{macro}
@@ -6579,12 +6637,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Define a patch and add it to the list of patches.
% The third argument may contain more revert commands, but will
% mostly be empty.
+%\changes{v3.1}{2022/09/26}{define patches globally}
+%\changes{v3.1}{2022/09/26}{check if patch defined}
% \begin{macrocode}
\let\MT@patches@def\@gobble
\def\MT@define@patch#1#2#3{%
- \g@addto@macro\MT@patches@def{,#1}%
- \MT@def@n{MT@patch@@#1}{#2}%
- \MT@def@n{MT@patch@undo@@#1}{#3}%
+ \MT@ifdefined@n@TF{MT@patch@@#1}{%
+ \MT@warning{Patch `#1' already defined.\MessageBreak Cannot define it}%
+ }{%
+ \g@addto@macro\MT@patches@def{,#1}%
+ \MT@gdef@n{MT@patch@@#1}{#2}%
+ \MT@gdef@n{MT@patch@undo@@#1}{#3}%
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -6599,8 +6663,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\MT@redefined@patches\@empty
\def\MT@redefine@patch#1#2#3{%
\g@addto@macro\MT@redefined@patches{%
- \MT@def@n{MT@patch@@#1}{#2}%
- \MT@def@n{MT@patch@undo@@#1}{#3}%
+ \MT@ifdefined@n@TF{MT@patch@@#1}{%
+ \MT@gdef@n{MT@patch@@#1}{#2}%
+ \MT@gdef@n{MT@patch@undo@@#1}{#3}%
+ }{%
+ \MT@warning{Patch `#1' undefined.\MessageBreak Cannot redefine it}%
+ }%
}%
}
% \end{macrocode}
@@ -6869,11 +6937,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@exp@cs\MT@patch@patch{beamerx@\string\@mpfootnotetext}
{\ignorespaces}{\ignorespaces\leftprotrusion}}
% \end{macrocode}
-% \item the <\cls{KOMA}> classes (which load \pkg{scrkbase})
+% \item the <\cls{KOMA}> classes
%\changes{v3.0a}{2021/12/02}{fix protrusion patch \texttt{footnote} with <\cls{KOMA}> classes
% (reported by \contributor MisterFiLou <@\at @>) \githubissue{2}}
+%\changes{v3.1}{2022/08/03}{fix test for <\cls{KOMA}> classes in protrusion patch \texttt{footnote}
+% (also reported by \contributor David Purton <@\at @>) \githubissue{26}}
% \begin{macrocode}
- {\@ifpackageloaded{scrkbase}
+ {\MT@ifdefined@c@TF\KOMAClassName
{\MT@patch@patch\scr@saved@footnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}}%
% \end{macrocode}
% \item the base classes
@@ -6883,13 +6953,33 @@ time will almost certainly lead to undesired results. Have your choice!}%
}{}%
% \end{macrocode}
% \end{itemize}
+% \item [|verbatim|] disable all microtypographic extensions in
+% verbatim blocks. (This could have been a nice opportunity
+% to use the new \LaTeX\ hook management, however, the hook
+% here is executed too early -- namely, before the |\par| in
+% \cmd\@verbatim, which may result in spilling the
+% microtypographic settings to the preceding paragraph -- so
+% we're resorting to patching, again.)
+%\changes{v3.1}{2022/09/29}{new protrusion patch \texttt{verbatim}}
+% \begin{itemize}
+% \item Appending to \cmd\@verbatim\ works for, at least, the standard
+% classes, \pkg{verbatim} (and \cls{memoir}); the implementations
+% in \pkg{fancvrb} and \pkg{listings} don't allow protrusion anyway.
+% \begin{macrocode}
+ \MT@define@patch{verbatim}{%
+ \MT@append@patch\@verbatim{\microtypesetup{activate=false}}%
+% \end{macrocode}
+% \item package \pkg{alltt}
+% \begin{macrocode}
+ \MT@with@package@T{alltt}{\MT@append@patch\alltt{\microtypesetup{activate=false}}}%
+ }{}
+% \end{macrocode}
+% \end{itemize}
+%\end{description}
% Finally, execute any redefinitions.
% \begin{macrocode}
\MT@redefined@patches
}}
-% \end{macrocode}
-%\end{description}
-% \begin{macrocode}
%</package>
%</package|letterspace>
% \end{macrocode}
@@ -7142,8 +7232,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% won't work, and we could skip the settings (for example, the \pkg{dsfont}
% fonts don't specify this dimension; this is probably a bug -- the \pkg{fourier}
% and \pkg{newpx}/\pkg{newtx} packages have been fixed in the meantime).
-% However, we can fix it ourselves -- only tracking still doesn't work (it seems
-% that \cmd\letterspacefont\ uses the \fontdim6 from the original font).
+% However, we can fix it ourselves (and since \pdftex\ 1.40.23, this also works
+% for \cmd\letterspacefont). ^^A https://mailman.ntg.nl/pipermail/ntg-pdftex/2021-June/004335.html
% \xetex\ doesn't provide an equivalent to \cmd\pdffontsize, so we use the
% nominal size instead.
% \begin{macrocode}
@@ -8006,10 +8096,11 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@set@pr@prefixes}
%\begin{macro}{\MT@set@pr@prefixes@}
-% Add |charwidth(inheriting char)-charwidth(base char)| to either left or
-% right side or half the amount to both sides. For \xetex, we may have to
-% translate to glyph numbers because \cmd\fontcharwd\ doesn't have the nice
-% feature of understanding the `|U|' or `|/|' prefixes.
+% Add |charwidth(|\meta{inheriting char}|)-charwidth(|\meta{base char}|)|
+% to either left or right side or half the amount to both sides.
+% For \xetex, we may have to translate to glyph numbers because
+% \cmd\fontcharwd\ doesn't have the nice feature of understanding the
+% `|U|' or `|/|' prefixes.
% \begin{macrocode}
%<*pdf-|lua-|xe-|show>
%<pdf-|lua-|xe->\def\MT@set@pr@prefixes#1{\MT@set@pr@prefixes@#1}
@@ -8107,6 +8198,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
+%
+%\subsubsection{Manual protrusion}\label{ssub:setup-protcmd}
+%
%\begin{macro}{\noprotrusion}
%\changes{v3.0}{2021/05/15}{provide command for older \LaTeX\ versions}
% This command may be used to inhibit protrusion on either side. It's part
@@ -8125,7 +8219,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\DeclareRobustCommand\noprotrusionifhmode{\relax\ifhmode\kern-\p@\kern\p@\fi}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\ifMT@prot@}
%\begin{macro}{\leftprotrusion}
%\changes{v3.0}{2021/05/15}{new command}
% This command may be used to add protrusion on the left hand side.
@@ -8140,25 +8233,46 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\DeclareRobustCommand\leftprotrusion{%
\MT@toks{}%
- \MT@prot@false
+ \MT@prot@toks{}%
+ \let\MT@prot@l\MT@prot@l@
+ \let\MT@maybe@textcmd\@firstofone
\MT@prot@get@firstgroup
}
-\newif\ifMT@prot@
% \end{macrocode}
%\end{macro}
-%\end{macro}
-%\begin{macro}{\MT@prot@l}
+%\begin{macro}{\MT@prot@l@}
%\changes{v3.0b}{2021/12/05}{make \cmd\long\ again
% (reported by \contributor Akira Yokosawa <@\at @>) \githubissue{3}}
%\changes{v3.0c}{2022/01/14}{next try at removing \cmd\long}
% This probably doesn't need to be \cmd\long\ any longer.
% \begin{macrocode}
-\def\MT@prot@l#1{%
+\def\MT@prot@l@#1{%
\MT@get@prot{#1}{left}%
#1%
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\MT@prot@toks}
+%\begin{macro}{\MT@prot@l@tc}
+%\changes{v3.1}{2023/03/06}{new macro: for text commands}
+%\begin{macro}{\MT@gobble@to@nil}
+% If \cs{leftprotrusion} is followed by a text command,
+% we trial-typeset only the first glyph, then actually typeset
+% the whole argument, which we've saved in \cs{MT@prot@toks},
+% and finally gobble anything that might still be left in the
+% input stream (see \cs{MT@prot@check@F} below).
+% \begin{macrocode}
+\newtoks\MT@prot@toks
+\def\MT@prot@l@tc#1{%
+ \MT@get@prot{\MT@maybe@textcmd{#1}}{left}%
+ \the\MT@prot@toks
+ \MT@gobble@to@nil
+}
+\def\MT@gobble@to@nil#1\MT@nil{}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
%\begin{macro}{\rightprotrusion}
%\changes{v3.0}{2021/05/15}{new command}
%\begin{macro}{\MT@prot@r}
@@ -8196,7 +8310,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@prot@hook}
% Furthermore, we have a hook for compatibility fixes (currently used for \pkg{csquotes} only),
%\begin{macro}{\MT@csq@eqgroup}
-%\changes{v3.0c}{2022/01/06}{compatibility for \pkg{csquotes}, again
+%\changes{v3.0c}{2022/01/06}{compatibility with \pkg{csquotes}, again
% (reported by \contributor NightShade <@\at @>)}
% ^^A https://tex.stackexchange.com/questions/629068/microtype-quotation-marks-in-itemize-not-aligned-properly-at-begin-of-an-item
% and a dedicated command to end \pkg{csquotes}'s group (because we actually typeset
@@ -8208,7 +8322,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\changes{v3.0c}{2022/01/14}{use \cmd\RawNoindent, if available \githubissue{8}}
% Finally, \LaTeX's new paragraph hooks require special attention, as they're
% (currently?) unable to distinguish between real typesetting and trial runs.
-% In our case, fortunately, we really don't want to trigger the hooks.
+% In our case, fortunately, we really don't want to trigger the hooks.\footnote{
+% Well, in some cases we do, but this indeed `needs further analysis'
+% (cf. \url{https://github.com/latex3/latex2e/issues/880}).}
+%\todo{fix use of \cmd\RawNoindent}
% Also, as far as I can tell, we don't need a \cmd\RawParEnd\ at the end
% (as suggested in \file{ltpara}), because none of our commands are \cmd\long\ anymore.
% \begin{macrocode}
@@ -8330,9 +8447,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
\expandafter\expandafter\expandafter\@tempa
\expandafter\MT@getthird\MT@prot@next\relax\@nil
\MT@exp@two@c\ifx\@car\@tempa\relax\@nil\@text@composite
- \def\MT@temp*##1##2{\MT@prot@l{\the\MT@toks##1##2}}%
+ \def\MT@temp*##1##2{\MT@exp@one@n\MT@prot@l{\the\MT@toks##1##2}}%
\else
- \def\MT@temp*##1{\MT@prot@l{\the\MT@toks##1}}%
+ \def\MT@temp*##1{\MT@exp@one@n\MT@prot@l{\the\MT@toks##1}}%
\fi
}%
}
@@ -8343,7 +8460,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% (reported by \contributor Torsten Schuetze <torsten.schuetze\at gmx.net>)}
% ^^A private mail, 2021/11/18
% ^^A also on the non-public dante-ev mailing list: https://lists.dante.de/mailman/listinfo/dante-ev
-% If we have a group, we inject \cs{MT@prot@get@firsttoken} at the
+% If we have a group, we inject \cs{MT@prot@get@firstgroup} again at the
% beginning and don't bother about the rest. This still allows,
% \eg, |\verb|, |verbatim| or |lstlistings| material.
% The downside of being this cautious is that we'll miss lots of cases.
@@ -8353,31 +8470,37 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\changes{v3.0d}{2022/02/26}{no brace delimiting
% (reported by \contributor Nelson Lago <@\at @>) \githubissue{10}}
%\changes{v3.0e}{2022/06/16}{only add group if very first token}
+%\changes{v3.1}{2023/03/06}{allow multiple groups}
% \begin{macrocode}
-\def\MT@prot@addgroup{\bgroup\afterassignment\MT@prot@get@firsttoken\let\MT@temp= }
+\def\MT@prot@addgroup{\bgroup\afterassignment\MT@prot@get@firstgroup\let\MT@temp= }
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@prot@get@firstgroup}
+%\begin{macro}{\MT@prot@get@firstgroup@tc}
%\begin{macro}{\MT@prot@get@firsttoken}
%\begin{macro}{\MT@prot@get@nexttoken}
% Scan token by token.
% \begin{macrocode}
\def\MT@prot@get@firstgroup{\futurelet\MT@prot@next\MT@prot@get@first@group}
+\def\MT@prot@get@firstgroup@tc{\futurelet\MT@prot@next\MT@prot@get@first@group@tc}
\def\MT@prot@get@firsttoken{\futurelet\MT@prot@next\MT@prot@get@first@token}
\def\MT@prot@get@nexttoken{\futurelet\MT@prot@next\MT@prot@get@next@token}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@prot@check}
+%\changes{v3.1}{2022/12/17}{allow replacement command}
%\begin{macro}{\MT@prot@check@}
% We map through a list of commands that should be copied into the toks.
+% \meta{\#3} will be \cmd\relax\ by default, but can also indicate
+% a replacement command.
% \begin{macrocode}
-\def\MT@prot@check#1{\MT@prot@check@#1}
-\def\MT@prot@check@#1#2{%
+\def\MT@prot@check#1{\MT@prot@check@#1\relax\@nil}
+\def\MT@prot@check@#1#2#3\@nil{%
\ifx\MT@prot@next#2%
- \MT@prot@true
- \csname MT@prot@check@#1\endcsname
+ \csname MT@prot@check@#1\endcsname #3%
\let\MT@prot@ifmacro\@gobble
\expandafter\MT@tlist@break
\fi
@@ -8385,51 +8508,142 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\end{macro}
+% Beware that the following nomenclature is rather arcane.
+%\begin{itemize}
+% \item
%\begin{macro}{\MT@prot@check@I}
% This is for commands to be \textbf{I}gnored.
% \begin{macrocode}
\def\MT@prot@check@I{%
- \def\MT@temp*##1{\MT@prot@get@firsttoken}%
+ \def\MT@temp*##1{\MT@prot@get@firstgroup}%
}
% \end{macrocode}
%\end{macro}
+% \item
%\begin{macro}{\MT@prot@check@S}
% Add a \textbf{S}ingle command (without an argument).
% \begin{macrocode}
\def\MT@prot@check@S{%
- \def\MT@temp*##1{\MT@toks\expandafter{\the\MT@toks##1}\MT@prot@get@firsttoken}%
+ \def\MT@temp*##1{\MT@toks\expandafter{\the\MT@toks##1}\MT@prot@get@firstgroup}%
}
% \end{macrocode}
%\end{macro}
+% \item
%\begin{macro}{\MT@prot@check@X}
% Add a command with \textbf{O}ne argument.
% \begin{macrocode}
\def\MT@prot@check@O{%
- \def\MT@temp*##1##2{\MT@toks\expandafter{\the\MT@toks##1{##2}}\MT@prot@get@firsttoken}%
+ \def\MT@temp*##1##2{\MT@toks\expandafter{\the\MT@toks##1{##2}}\MT@prot@get@firstgroup}%
}
% \end{macrocode}
%\end{macro}
+% \item
%\begin{macro}{\MT@prot@check@T}
% Add a command with \textbf{T}wo arguments.
% \begin{macrocode}
\def\MT@prot@check@T{%
- \def\MT@temp*##1##2##3{\MT@toks\expandafter{\the\MT@toks##1{##2}{##3}}\MT@prot@get@firsttoken}%
+ \def\MT@temp*##1##2##3{\MT@toks\expandafter{\the\MT@toks##1{##2}{##3}}\MT@prot@get@firstgroup}%
+}
+% \end{macrocode}
+%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@E}
+%\changes{v3.1}{2022/11/29}{new macro: take care of commands that enclose their argument}
+% This is for commands that \textbf{E}nclose their argument in something, \eg, in braces,
+% and which we trial-typeset without any contents.
+% \begin{macrocode}
+\def\MT@prot@check@E{%
+ \def\MT@temp*##1{\MT@prot@l{##1}}%
+}
+% \end{macrocode}
+%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@e}
+%\changes{v3.1}{2022/11/29}{new macro: take care of starred commands that enclose their argument}
+% Same for starred commands (the main candidate here is \pkg{csquotes}'s \cmd\enquote).
+% \begin{macrocode}
+\def\MT@prot@check@e{%
+ \def\MT@temp*##1{\@ifstar{\MT@prot@l{##1*}}{\MT@prot@l{##1}}}%
+}
+% \end{macrocode}
+%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@eX}
+%\changes{v3.1}{2022/12/28}{new macro: replace enclosing commands}
+% Here we replace the `integrated interface' (\pkg{csquotes}) with the regular one.
+% \begin{macrocode}
+\def\MT@prot@check@eX#1{%
+ \def\MT@temp*##1{\@ifstar
+ {\MT@get@prot{#1*}{left}##1*}
+ {\MT@get@prot{#1}{left}##1}}}
+% \end{macrocode}
+%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@l}
+%\changes{v3.1}{2022/12/26}{new macro: for commands that enclose their second argument}
+%\begin{macro}{\MT@prot@check@l@}
+% \pkg{csquotes} provides a couple of commands for quotations in foreign
+% \textbf{l}anguages (lowercase, because it may be starred), whose first argument
+% (the language) we also have to evaluate before trial typesetting.
+% \begin{macrocode}
+\def\MT@prot@check@l{%
+ \def\MT@temp*##1{\@ifstar{\MT@prot@check@l@{##1*}}{\MT@prot@check@l@{##1}}}}
+\def\MT@prot@check@l@#1#2{\MT@prot@l{#1{#2}}}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@lX}
+%\changes{v3.1}{2022/12/28}{new macro: replace language-switching enclosing commands}
+%\begin{macro}{\MT@prot@check@lX@}
+% Another macro for \pkg{csquotes} commands: replace integrated language-switching
+% commands with their regular variants.
+% \begin{macrocode}
+\def\MT@prot@check@lX#1{%
+ \def\MT@temp*##1{\@ifstar
+ {\def\MT@temp{##1*}\MT@prot@check@lX@{#1*}}
+ {\def\MT@temp{##1}\MT@prot@check@lX@{#1}}}}
+\def\MT@prot@check@lX@#1#2{%
+ \MT@get@prot{#1{#2}}{left}\MT@temp{#2}}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@F}
+%\changes{v3.1}{2022/03/06}{new macro: for text commands}
+% Here we deal with \textbf{F}ont switching commands (\ie, text commands,
+% which take an argument).
+% We (a) remember the text command, (b) save the full text,
+% and then (c) continue inspecting the contents of the argument.
+% Nested text commands still don't work.
+% \begin{macrocode}
+\def\MT@prot@check@F{%
+ \ifx\MT@prot@l\MT@prot@l@tc
+ \def\MT@temp*{\MT@exp@one@n\MT@prot@l{\the\MT@toks}}%
+ \else
+ \let\MT@prot@l\MT@prot@l@tc
+ \def\MT@temp*##1##2{%
+ \let\MT@maybe@textcmd##1%
+ \MT@prot@toks{##1{##2}}%
+ \MT@prot@get@firstgroup@tc##2\MT@nil}%
+ \fi
}
% \end{macrocode}
%\end{macro}
+%\end{itemize}
%\begin{macro}{\MT@prot@check@cmds}
%\changes{v3.0e}{2022/06/09}{new macro: make list of commands extensible}
%\changes{v3.0e}{2022/05/13}{ignore \cmd\@empty}
%\changes{v3.0e}{2022/06/15}{add standard font selection commands}
%\changes{v3.0f}{2022/06/22}{add \microtype's commands}
-% Here's the list of commands to be added to our toks.
-% We'll postpone the handling of commands whose argument would have
-% to be processed (\eg, \cmd\textrm).
+%\changes{v3.1}{2023/01/07}{add \cmd\em}
+%\changes{v3.1}{2023/03/06}{add \cmd\MakeUppercase\ and friends}
+% And here's the list of commands that we can deal with.
% \begin{macrocode}
\def\MT@prot@check@cmds{%
{I\ignorespaces}{I\relax}{I\@empty}%
{S\rmfamily}{S\sffamily}{S\ttfamily}{S\mdseries}{S\bfseries}%
- {S\upshape}{S\slshape}{S\itshape}{S\scshape}%
+ {S\upshape}{S\itshape}{S\slshape}{S\scshape}{S\em}%
{S\normalfont}{S\selectfont}%
{S\lsstyle}%
{S\tiny}{S\scriptsize}{S\footnotesize}{S\small}{S\normalsize}%
@@ -8437,22 +8651,102 @@ time will almost certainly lead to undesired results. Have your choice!}%
{O\fontencoding}{O\fontfamily}{O\fontseries}{O\fontshape}%
{O\microtypesetup}{O\microtypecontext}%
{T\fontsize}%
+ {F\textrm}{F\textsf}{F\texttt}{F\textnormal}%
+ {F\textbf}{F\textmd}{F\textit}{F\textsl}{F\textsc}{F\textup}{F\emph}%
+ {F\MakeUppercase}{F\MakeLowercase}%
}
% \end{macrocode}
-% \LaTeX\ 2020/02/02 introduced some more commands.
-%\changes{v3.0f}{2022/06/22}{add new NFSS commands}
+% \LaTeX\ 2020/02/02 introduced some more text commands
+%\changes{v3.0f}{2022/06/22}{add new <NFSS> commands}
+% (adopted from \pkg{fontaxes}, which provides some more, see below).
+%\changes{v3.1}{2023/01/08}{add \pkg{fontaxes} commands}
% \begin{macrocode}
\IfFormatAtLeastTF{2020/02/02}
{\g@addto@macro\MT@prot@check@cmds{%
{S\swshape}{S\ulcshape}{S\sscshape}{S\normalshape}%
- {O\fontseriesforce}{O\fontshapeforce}}}{}
-% \end{macrocode}
-% If \pkg{yfonts} is loaded, we add the relevant commands (again, only those that
-% don't take an argument).
-% \begin{macrocode}
+ {F\textulc}{F\textsw}{F\textssc}%
+ {O\fontseriesforce}{O\fontshapeforce}}}
+ \relax
+\IfFormatAtLeastTF{2022/11/01}
+ {\g@addto@macro\MT@prot@check@cmds{{F\MakeTitlecase}}}\relax
+% \end{macrocode}
+% The \cls{ltxdoc} class and the \pkg{doc} package provide some abbreviations.
+% Unfortunately, the \cmd\cmd\ command doesn't work.
+%\changes{v3.1}{2022/12/04}{add \cls{ltxdoc} and \pkg{doc} abbreviations}
+% \begin{macrocode}
+\@ifclassloaded{ltxdoc}
+ {\g@addto@macro\MT@prot@check@cmds{{E\enquote}{E\marg}{E\oarg}{E\parg}{E\cs}}}\relax
\MT@addto@setup{%
+ \MT@with@package@T{doc}
+ {\g@addto@macro\MT@prot@check@cmds{{E\meta}}}%
+% \end{macrocode}
+% The additional \pkg{fontaxes} commands.
+% \begin{macrocode}
+ \MT@with@package@T{fontaxes}
+ {\g@addto@macro\MT@prot@check@cmds{%
+ {S\txfigures}{S\lnfigures}{S\tbfigures}{S\prfigures}%
+ {O\fontfigurestyle}{O\fontfigurealignment}{O\fontbasefamily}%
+ {O\figureversion}%
+ {F\textsw}{F\textssc}{F\textulc}%
+ {F\textfigures}{F\liningfigures}{F\tabularfigures}{F\proportionalfigures}}%
+ \IfFormatAtLeastTF{2020/02/02}\relax
+ {\g@addto@macro\MT@prot@check@cmds{%
+ {S\swshape}{S\ulcshape}{S\sscshape}%
+ {F\textulc}{F\textsw}{F\textssc}}}}
+% \end{macrocode}
+% The \pkg{nfssext-cfr} package (an extension of the \pkg{nfssext} package,
+% which is part of Philipp Lehman's \pkg{fontinstallationguide} but was never
+% publicised separately as far as I can tell) adds many more commands on top
+% of the <NFSS>.
+%\changes{v3.1}{2023/01/16}{add \pkg{nfssext-cfr} commands}
+% \begin{macrocode}
+ \MT@with@package@T{nfssext-cfr}
+ {\g@addto@macro\MT@prot@check@cmds{%
+ {S\tistyle}{S\ltstyle}{S\ofstyle}{S\altstyle}{S\regstyle}{S\embossstyle}%
+ {S\ornamentalstyle}{S\qtstyle}{S\shstyle}{S\tmstyle}{S\tvstyle}{S\swashstyle}%
+ {S\lnstyle}{S\osstyle}{S\instyle}{S\sustyle}{S\lstyle}{S\ostyle}%
+ {S\pstyle}{S\tstyle}{S\plstyle}{S\postyle}{S\tlstyle}{S\tostyle}%
+ {S\scolshape}{S\olshape}{S\sishape}{S\ushape}{S\scushape}%
+ {S\uishape}{S\rishape}{S\dfshape}{S\swstyle}%
+ {S\nwwidth}{S\cdwidth}{S\ecwidth}{S\ucwidth}%
+ {S\etwidth}{S\epwidth}{S\exwidth}{S\uxwidth}{S\regwidth}%
+ {S\mbweight}{S\dbweight}{S\sbweight}{S\ebweight}%
+ {S\ubweight}{S\lgweight}{S\elweight}{S\ulweight}%
+ {F\textti}{F\textlt}{F\textof}{F\textalt}{F\textreg}{F\emboss}%
+ {F\textorn}{O\ornament}{F\textqt}{F\textsh}{F\texttm}{F\texttv}{F\textswash}%
+ {F\textln}{F\textos}{F\textin}{F\textsu}{F\textl}{F\texto}%
+ {F\textp}{F\textt}{F\textpl}{F\textpo}{F\texttl}{F\textto}%
+ {F\textol}{F\textsi}{F\textu}{F\textscu}%
+ {F\textui}{F\textri}{F\textdf}%
+ {F\textnw}{F\textcd}{F\textec}{F\textuc}%
+ {F\textet}{F\textep}{F\textex}{F\textux}{F\textrw}%
+ {F\textmb}{F\textdb}{F\textsb}{F\texteb}%
+ {F\textub}{F\textlg}{F\textel}{F\textul}}%
+ \IfFormatAtLeastTF{2020/02/02}\relax
+ {\g@addto@macro\MT@prot@check@cmds{{S\swshape}{F\textsw}}}}
+% \end{macrocode}
+% If \pkg{yfonts} is loaded, we add the relevant commands.
+% \begin{macrocode}
\MT@with@package@T{yfonts}
- {\g@addto@macro\MT@prot@check@cmds{{S\frakfamily}{S\swabfamily}{S\gothfamily}}}%
+ {\g@addto@macro\MT@prot@check@cmds{%
+ {S\frakfamily}{S\swabfamily}{S\gothfamily}%
+ {F\textfrak}{F\textswab}{F\textgoth}}}%
+% \end{macrocode}
+% \pkg{csquotes}'s \cmd\enquote\ command.
+% It would take precedence over the one provided by \cls{ltxdoc}.
+%\changes{v3.1}{2022/11/29}{add \pkg{csquotes}'s commands
+% (reported by \contributor Shen Zhou Hong <@\at @>)
+% \githubissue{25}}
+% \begin{macrocode}
+ \MT@with@package@T{csquotes}
+ {\@ifclassloaded{ltxdoc}
+ {\patchcmd\MT@prot@check@cmds{E\enquote}{e\enquote}\relax\relax}
+ {\g@addto@macro\MT@prot@check@cmds{{e\enquote}}}%
+ \g@addto@macro\MT@prot@check@cmds{{e\textquote}%
+ {l\foreignquote}{l\hyphenquote}{l\foreigntextquote}{l\hyphentextquote}%
+ {{eX}\textcquote\textquote}%
+ {{lX}\foreigntextcquote\foreigntextquote}%
+ {{lX}\hyphentextcquote\hyphentextquote}}}%
}
% \end{macrocode}
%\end{macro}
@@ -8470,13 +8764,30 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\MT@prot@get@first@group@tc}
+% The variant for text commands (in case they start with another group).
+% \begin{macrocode}
+\def\MT@prot@get@first@group@tc{%
+ \MT@prot@ifcat\bgroup{%
+ \def\MT@temp*##1##2\MT@nil{\MT@ifempty{##1}\relax
+ {{\MT@prot@get@firstgroup@tc##1\MT@nil}}}%
+ }{%
+ \def\MT@temp*{\MT@prot@get@first@token}%
+ }%
+ \MT@temp*%
+}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\MT@prot@get@first@token}
%\changes{v3.0e}{2022/06/15}{don't gobble previously captured content}
+%\changes{v3.1}{2023/03/06}{expand toks once}
% This can be called repeatedly.
% We add a letter or other character, \dots
% \begin{macrocode}
\def\MT@prot@get@first@token{%
- \def\MT@temp*{\ifMT@prot@\MT@prot@l{\the\MT@toks}\fi}%
+ \def\MT@temp*{\MT@exp@one@n\MT@ifempty{\the\MT@toks}
+ {\MT@exp@one@n\MT@ifempty{\the\MT@prot@toks}\relax{\the\MT@prot@toks\MT@gobble@to@nil}}
+ {\MT@exp@one@n\MT@prot@l{\the\MT@toks}}}%
\MT@prot@ifcat{a}{%
\def\MT@temp*{\MT@prot@addtoken@first}%
}{%
@@ -8487,7 +8798,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% a space character, \dots
% \begin{macrocode}
\MT@prot@ifx\@sptoken{%
- \def\MT@temp* {\MT@prot@get@firsttoken}%
+ \def\MT@temp* {\MT@prot@get@firstgroup}%
}{%
% \end{macrocode}
% commands, \dots
@@ -8499,20 +8810,21 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\MT@prot@ifmacro{%
\MT@prot@iffirstcmd\UTFviii@two@octets{%
- \def\MT@temp*##1##2{\MT@prot@l{\the\MT@toks##1##2}}%
+ \def\MT@temp*##1##2{\MT@exp@one@n\MT@prot@l{\the\MT@toks##1##2}}%
}{%
\MT@prot@iffirstcmd\UTFviii@three@octets{%
- \def\MT@temp*##1##2##3{\MT@prot@l{\the\MT@toks##1##2##3}}%
+ \def\MT@temp*##1##2##3{\MT@exp@one@n\MT@prot@l{\the\MT@toks##1##2##3}}%
}{%
\MT@prot@iffirstcmd\UTFviii@four@octets{%
- \def\MT@temp*##1##2##3##4{\MT@prot@l{\the\MT@toks##1##2##3##4}}%
+ \def\MT@temp*##1##2##3##4{\MT@exp@one@n\MT@prot@l{\the\MT@toks##1##2##3##4}}%
}{%
% \end{macrocode}
-% (this is for \pkg{csquotes})
+% (this is for chars made active by \pkg{csquotes}, via \cmd\MakeAutoQuote\ or
+% \cmd\MakeOuterQuote)
% \begin{macrocode}
- \MT@prot@iffirstcmd\csqQQ{\def\MT@temp*##1{\MT@prot@l{\the\MT@toks##1}}}{%
+ \MT@prot@iffirstcmd\csqQQ{\def\MT@temp*##1{\MT@exp@one@n\MT@prot@l{\the\MT@toks##1}}}{%
% \end{macrocode}
-% or, finally, a <LICR> command.
+% or, finally, a <LICR> command.
% \begin{macrocode}
\MT@prot@iflicrcmd
}%
@@ -8543,7 +8855,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\def\MT@temp*{\MT@prot@addtoken@next}%
\MT@prot@ifcat{a}\relax{%
\MT@prot@ifcat{!}\relax{%
- \def\MT@temp*{\MT@prot@l{\the\MT@toks}}%
+ \def\MT@temp*{\MT@exp@one@n\MT@prot@l{\the\MT@toks}}%
}%
}%
\MT@temp*%
@@ -8559,12 +8871,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
%<*pdf-|lua-|xe->
\def\MT@prot@addtoken@next#1{%
\MT@toks\expandafter{\the\MT@toks#1}%
- \setbox\MT@tempbox\hbox{\the\MT@toks
+ \setbox\MT@tempbox\hbox{%
+% \end{macrocode}
+% We disable italic correction, which would prevent us from
+% seeing the ligature (with text commands).
+% \begin{macrocode}
+ \let\maybe@ic\relax
+ \MT@exp@one@n\MT@maybe@textcmd{\the\MT@toks}%
%<pdf-|xe-> \relax
%<lua-> }\setbox\MT@tempbox\hbox{\unhbox\MT@tempbox
\ifnum\lastnodetype=7 \aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi}%
\MT@prot@get@nexttoken
- {\MT@prot@l{\the\MT@toks}}%
+ {\MT@exp@one@n\MT@prot@l{\the\MT@toks}}%
}
%</pdf-|lua-|xe->
% \end{macrocode}
@@ -10185,6 +10503,7 @@ end
% font family has already been loaded}
% Micro-typographic settings may be written into a file |mt-|\meta{font family}|.cfg|.
%\changes{v1.8}{2005/04/16}{no longer wrap names in commands}
+%\changes{v3.1}{2023/02/13}{simplify}
%\begin{macro}{\MT@file@list}
% We must also record whether we've already loaded the file.
% \begin{macrocode}
@@ -10204,23 +10523,20 @@ end
\MT@begin@catcodes
\let\MT@begin@catcodes\relax
\let\MT@end@catcodes\relax
- \InputIfFileExists{mt-#1.cfg}{%
- \edef\MT@curr@file{mt-#1.cfg}%
+ \MT@xadd\MT@file@list{#1,}%
+ \InputIfFileExists{\MT@cfg@prefix-#1.cfg}{%
+ \edef\MT@curr@file{\MT@cfg@prefix-#1.cfg}%
\MT@vinfo{... Loading configuration file \MT@curr@file}%
- \MT@xadd\MT@file@list{#1,}%
}{%
\MT@get@basefamily#1\@empty\@empty\@empty\@nil
\MT@exp@one@n\MT@in@clist\@tempa\MT@file@list
- \ifMT@inlist@
- \MT@xadd\MT@file@list{#1,}%
- \else
- \InputIfFileExists{mt-\@tempa.cfg}{%
- \edef\MT@curr@file{mt-\@tempa.cfg}%
+ \ifMT@inlist@ \else
+ \InputIfFileExists{\MT@cfg@prefix-\@tempa.cfg}{%
+ \edef\MT@curr@file{\MT@cfg@prefix-\@tempa.cfg}%
\MT@vinfo{... Loading configuration file \MT@curr@file}%
- \MT@xadd\MT@file@list{\@tempa,#1,}%
+ \MT@xadd\MT@file@list{\@tempa,}%
}{%
- \MT@vinfo{... No configuration file mt-#1.cfg}%
- \MT@xadd\MT@file@list{#1,}%
+ \MT@vinfo{... No configuration file \MT@cfg@prefix-#1.cfg}%
}%
\fi
}%
@@ -11601,6 +11917,7 @@ end
%</package>
}
%<plain>}\relax
+%</package|letterspace>
%<*package>
% \end{macrocode}
%\end{macro}
@@ -11646,6 +11963,7 @@ end
\expandafter\MT@rem@from@clist\MT@font\MT@font@list
\fi
}
+%</package>
% \end{macrocode}
%\end{macro}
%
@@ -11653,9 +11971,18 @@ end
%
% Here are the variants for context-sensitive setup.
%\begin{macro}{\MT@active@features}
-% The activated features are stored in this command.
+% The activated features are stored in a command.
+%\changes{v3.1}{2022/07/24}{always activate contexts for tracking}
+% We always allow contexts for tracking, because \cmd\textls\ may
+% be used without activating the feature.
% \begin{macrocode}
-\let\MT@active@features\@empty
+%<*pdf-|lua-|xe->
+%<pdf->\MT@requires@pdftex6
+%<lua->\MT@requires@luatex3
+%<pdf-|lua-> {\def\MT@active@features{,tr}}{%
+ \let\MT@active@features\@empty
+%<pdf-|lua-> }
+%</pdf-|lua-|xe->
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@font@cx}
@@ -11666,6 +11993,7 @@ end
% This should be more efficient than book-keeping the fonts in lists associated
% with the combination of contexts, as we've done it before.
% \begin{macrocode}
+%<*package>
\def\MT@check@font@cx{%
\MT@if@true
\MT@map@clist@c\MT@active@features{%
@@ -12493,6 +12821,9 @@ end
}
% \end{macrocode}
%\end{macro}
+%
+%\subsubsection{Configuration file management}
+%
%\begin{macro}{\LoadMicrotypeFile}
%\changes{v1.7}{2005/03/22}{new command (suggested by
% \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)}
@@ -12505,24 +12836,36 @@ end
\@onelevel@sanitize\@tempa
\MT@exp@one@n\MT@in@clist\@tempa\MT@file@list
\ifMT@inlist@
- \MT@vinfo{... Configuration file mt-\@tempa.cfg already loaded}%
+ \MT@vinfo{... Configuration file \MT@cfg@prefix-\@tempa.cfg already loaded}%
\else
\MT@xadd\MT@file@list{\@tempa,}%
\MT@begin@catcodes
- \InputIfFileExists{mt-\@tempa.cfg}{%
- \edef\MT@curr@file{mt-\@tempa.cfg}%
+ \InputIfFileExists{\MT@cfg@prefix-\@tempa.cfg}{%
+ \edef\MT@curr@file{\MT@cfg@prefix-\@tempa.cfg}%
\MT@vinfo{... Loading configuration file \MT@curr@file}%
}{%
- \MT@warning{Configuration file mt-\@tempa.cfg\MessageBreak
+ \MT@warning{Configuration file \MT@cfg@prefix-\@tempa.cfg\MessageBreak
does not exist}%
}%
\MT@end@catcodes
\fi
}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@cfg@prefix}
+%\begin{macro}{\DeclareMicrotypeFilePrefix}
+%\changes{v3.1}{2023/03/01}{new command (suggested by
+% \contributor rallg <@\at @>) \githubissue{28}}
+% The configuration files' prefix may be customised.
+% \begin{macrocode}
+\def\MT@cfg@prefix{mt}
+\def\DeclareMicrotypeFilePrefix#1{%
+ \def\MT@cfg@prefix{#1}%
+}
%</package>
-%</package|letterspace>
% \end{macrocode}
%\end{macro}
+%\end{macro}
%
%\subsubsection{Disabling ligatures}
%
@@ -14802,7 +15145,6 @@ end
%<lua->\MT@requires@luatex3{%
\def\MT@setup@tracking{%
\ifMT@tracking
- \edef\MT@active@features{\MT@active@features,tr}%
\MT@info@nl{Tracking enabled}%
\MT@check@active@set{tr}%
% \end{macrocode}
@@ -19984,7 +20326,7 @@ This is the current font stretched by 5\%, normal, and shrunk by 5\%:
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \CheckSum{12598}
+% \CheckSum{12962}
%
% \Finale
%
@@ -20034,6 +20376,7 @@ lualatex microtype-utf.dtx
# - Latin Modern Roman (OpenType)
# - Charis SIL (OpenType)
# - EB Garamond (OpenType)
+# - New Computer Modern (OpenType)
# - TeX Gyre Pagella (OpenType) ]
# (8) To create the code index and history run
makeindex -r -s microtype-gind.ist -t microtype-code.ilg -o microtype-code.ind microtype.idx microtype-code.idx
diff --git a/macros/latex/contrib/microtype/microtype.ins b/macros/latex/contrib/microtype/microtype.ins
index 0efb05765f..ed10e20008 100644
--- a/macros/latex/contrib/microtype/microtype.ins
+++ b/macros/latex/contrib/microtype/microtype.ins
@@ -10,7 +10,7 @@
The `microtype' package
Subliminal refinements towards typographical perfection
- Copyright (c) 2004--2022 R Schlicht <w.m.l@gmx.net>
+ Copyright (c) 2004--2023 R Schlicht <w.m.l@gmx.net>
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
diff --git a/macros/latex/contrib/microtype/microtype.pdf b/macros/latex/contrib/microtype/microtype.pdf
index 642f98889a..7fcb8a53af 100644
--- a/macros/latex/contrib/microtype/microtype.pdf
+++ b/macros/latex/contrib/microtype/microtype.pdf
Binary files differ
diff --git a/macros/latex/contrib/minimalist/minimalist-classical.sty b/macros/latex/contrib/minimalist/minimalist-classical.sty
index 0ea75181ce..31bbbdf00b 100644
--- a/macros/latex/contrib/minimalist/minimalist-classical.sty
+++ b/macros/latex/contrib/minimalist/minimalist-classical.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-classical}
- {2023/01/05} {}
+ {2023/03/07} {}
{The "classical" style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -30,6 +30,19 @@
\endinput
}
+\bool_new:N \l__minimalist_colored_proof_bool
+\bool_set_true:N \l__minimalist_colored_proof_bool
+\tl_if_eq:NnTF \l__minimalist_colored_proof_tl { * }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ {
+ \tl_if_eq:NnT \l__minimalist_colored_proof_tl { false }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ }
+
%%================================
%% Title fonts
%%================================
@@ -57,6 +70,14 @@
\cs_new:Nn \minimalist_bfseries: {}
}
+\bool_if:NTF \l__minimalist_use_sffamily_bool
+ {
+ \cs_new:Nn \minimalist_sffamily: { \sffamily }
+ }
+ {
+ \cs_new:Nn \minimalist_sffamily: {}
+ }
+
\bool_if:NTF \l__minimalist_use_scshape_bool
{
\cs_new:Nn \minimalist_scshape: { \scshape }
@@ -74,12 +95,12 @@
\tl_new:N \g_minimalist_title_font_subsubsection_tl
\tl_new:N \g_minimalist_title_font_paragraph_tl
-\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: }
-\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: }
-\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries: \itshape }
-\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries:\minimalist_sffamily: }
+\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries:\minimalist_sffamily: }
+\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries:\minimalist_sffamily: \itshape }
+\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries:\minimalist_sffamily: \minimalist_scshape: }
\bool_if:NF \l__minimalist_fast_bool
{
@@ -421,7 +442,7 @@
{\LocallyStopLineNumbers
\g_minimalist_title_font_section_tl\centering}{}{0em}
{{\small\textcolor{main-text!27!paper}{\footnotesize \g_minimalist_section_decoration_char_tl }
- \,\,\textcolor{main-text!90!paper}{\minimalist_bfseries:\arabic{section}}
+ \,\,\textcolor{main-text!90!paper}{\minimalist_bfseries:\minimalist_sffamily:\arabic{section}}
\,\,\textcolor{main-text!27!paper}{\footnotesize \g_minimalist_section_decoration_char_tl }}\\
\seculine{#1}}
[\ResumeLineNumbers]
@@ -543,6 +564,7 @@
%%================================
%% Lists
%%================================
+\PassOptionsToPackage { inline } { enumitem }
\RequirePackage { enumitem }
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
@@ -553,7 +575,7 @@
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman*}$\mskip-.5mu\big)$}
\setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$,
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$\mskip-.5mu\big)$}
-\setlist[description]{font=\normalfont\minimalist_bfseries:}
+\setlist[description]{font=\normalfont\minimalist_bfseries:\minimalist_sffamily:}
\newcommand\desculine{\bgroup\markoverwith{\color{.!55!paper}
\rule[-.45ex]{2pt}{.75pt}}\ULon}
\renewcommand{\descriptionlabel}[1]{
@@ -699,7 +721,7 @@ heading_suffix "}\n"
\RequirePackage { mathtools }
\RequirePackage { amsthm }
-\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+\def\tagform@#1{\maketag@@@{\textcolor{.!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
\PassOptionsToPackage { nopatch = eqnum } { microtype }
@@ -756,10 +778,19 @@ heading_suffix "}\n"
\renewcommand\Hy@numberline[1]{#1.~}
% https://tex.stackexchange.com/a/1821
% Add the bookmark of ToC
- \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ \bool_if:NTF \l__minimalist_is_book_bool
{
- \if@openright\cleardoublepage\else\clearpage\fi
- \pdfbookmark[0]{\contentsname}{toc}
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
+ {
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \pdfbookmark[1]{\contentsname}{toc}
+ }
}
}
@@ -769,23 +800,32 @@ heading_suffix "}\n"
\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
+\bool_if:NT \l__minimalist_colored_proof_bool
+ {
+ \hook_gput_code:nnn { env/proof/begin } { minimalist }
+ {
+ \Hy@SaveLastskip
+ \color{ \l__minimalist_colored_proof_tl }
+ \Hy@RestoreLastskip
+ }
+ }
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -794,18 +834,18 @@ heading_suffix "}\n"
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -816,33 +856,33 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = {
- \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -851,35 +891,35 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = {
- \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -925,16 +965,17 @@ heading_suffix "}\n"
}
\RequirePackage { projlib-titlepage }
- \renewcommand{\maketitle}{
- \LocallyStopLineNumbers
- \ProjLibTitlePage [ style = simple ]
- {
- , title = \@title
- , author = \@author
- , date = \@date
- }
- \ResumeLineNumbers
- }
+ \RenewDocumentCommand \maketitle { O{} }
+ {
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple, #1 ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
}
{
\renewcommand{\@maketitle}
@@ -946,7 +987,7 @@ heading_suffix "}\n"
\vspace{-.5\baselineskip}
\begin{flushright}
\let\footnote\thanks
- {\minimalist_bfseries:\@title}\\\medskip
+ {\minimalist_bfseries:\minimalist_sffamily:\@title}\\\medskip
\color{main-text!80!paper}
{\small\minimalist_scshape:\@author}
\par\vspace{-\parskip}\vspace{2pt}
@@ -1011,7 +1052,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\vspace{-.5\baselineskip}
\begin{flushright}
- {\minimalist_bfseries:\minimalist_scshape:\small\keywordname}\par
+ {\minimalist_bfseries:\minimalist_sffamily:\minimalist_scshape:\small\keywordname}\par
\vspace{-\parskip}
\vspace{-.30\baselineskip}
\begin{minipage}[t]{.833\textwidth}
diff --git a/macros/latex/contrib/minimalist/minimalist-flow.sty b/macros/latex/contrib/minimalist/minimalist-flow.sty
index acc236efe5..106d18dc0b 100644
--- a/macros/latex/contrib/minimalist/minimalist-flow.sty
+++ b/macros/latex/contrib/minimalist/minimalist-flow.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-flow}
- {2023/01/05} {}
+ {2023/03/07} {}
{The "flow" style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -30,6 +30,19 @@
\endinput
}
+\bool_new:N \l__minimalist_colored_proof_bool
+\bool_set_true:N \l__minimalist_colored_proof_bool
+\tl_if_eq:NnTF \l__minimalist_colored_proof_tl { * }
+ {
+ \tl_set:Nn \l__minimalist_colored_proof_tl { blue!50!cyan!55!main-text }
+ }
+ {
+ \tl_if_eq:NnT \l__minimalist_colored_proof_tl { false }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ }
+
%%================================
%% Title fonts
%%================================
@@ -57,6 +70,14 @@
\cs_new:Nn \minimalist_bfseries: {}
}
+\bool_if:NTF \l__minimalist_use_sffamily_bool
+ {
+ \cs_new:Nn \minimalist_sffamily: { \sffamily }
+ }
+ {
+ \cs_new:Nn \minimalist_sffamily: {}
+ }
+
\bool_if:NTF \l__minimalist_use_scshape_bool
{
\cs_new:Nn \minimalist_scshape: { \scshape }
@@ -74,12 +95,12 @@
\tl_new:N \g_minimalist_title_font_subsubsection_tl
\tl_new:N \g_minimalist_title_font_paragraph_tl
-\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \itshape \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
\bool_if:NF \l__minimalist_fast_bool
{
@@ -272,7 +293,12 @@
\tl_set:Nx \l_tmpa_tl { #1 }
\regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
\regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
- \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ % \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ \bool_if:NF \l_minimalist_is_under_bfseries_bool
+ {
+ \colorlet{minimalist-temp-color}{.}
+ }
+ \textcolor { minimalist-temp-color!39!paper } { \normalfont \l_tmpa_tl }
}
\cs_new_protected:Nn \minimalist_apply_title_numbering_style:n
@@ -284,10 +310,9 @@
\exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
\int_case:nn { \l_tmpa_int }
{
- { 0 } { \textcolor { .!24!paper } }
- { 1 } { \textcolor { .!39!paper } }
- { 2 } { \textcolor { .!39!paper } }
- { 3 } { \smaller[.5] \textcolor { .!39!paper } }
+ { 0 } { \textcolor { main-text!39!paper } }
+ { 1 } { \textcolor { main-text!39!paper } }
+ { 2 } { \textcolor { main-text!39!paper } }
}
\l_tmpa_tl
\group_end:
@@ -533,6 +558,7 @@
%%================================
%% Lists
%%================================
+\PassOptionsToPackage { inline } { enumitem }
\RequirePackage { enumitem }
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
@@ -543,7 +569,7 @@
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman*}$\mskip-.5mu\big)$}
\setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$,
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$\mskip-.5mu\big)$}
-\setlist[description]{font=\normalfont\minimalist_bfseries:}
+\setlist[description]{font=\normalfont\minimalist_bfseries:\minimalist_sffamily:}
\renewlist{itemize}{itemize}{10}
\setlist[itemize]{leftmargin=*,label=\textcolor{.!27!paper}{$\cdot$}}
@@ -684,7 +710,7 @@ heading_suffix "}\n"
\RequirePackage { mathtools }
\RequirePackage { amsthm }
-\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+\def\tagform@#1{\maketag@@@{\textcolor{.!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
\PassOptionsToPackage { nopatch = eqnum } { microtype }
@@ -739,10 +765,19 @@ heading_suffix "}\n"
\renewcommand\Hy@numberline[1]{#1.~}
% https://tex.stackexchange.com/a/1821
% Add the bookmark of ToC
- \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ \bool_if:NTF \l__minimalist_is_book_bool
{
- \if@openright\cleardoublepage\else\clearpage\fi
- \pdfbookmark[0]{\contentsname}{toc}
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
+ {
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \pdfbookmark[1]{\contentsname}{toc}
+ }
}
}
@@ -752,7 +787,15 @@ heading_suffix "}\n"
\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
-\AddToHook{env/proof/begin}{\Hy@SaveLastskip\color{blue!50!cyan!55!main-text}\Hy@RestoreLastskip}
+\bool_if:NT \l__minimalist_colored_proof_bool
+ {
+ \hook_gput_code:nnn { env/proof/begin } { minimalist }
+ {
+ \Hy@SaveLastskip
+ \color{ \l__minimalist_colored_proof_tl }
+ \Hy@RestoreLastskip
+ }
+ }
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name, proof } { shared counter = subsection }
@@ -760,17 +803,17 @@ heading_suffix "}\n"
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = { \minimalist_apply_title_numbering_style_static:n }
}
@@ -780,18 +823,18 @@ heading_suffix "}\n"
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = { \minimalist_apply_title_numbering_style_static:n }
}
@@ -803,30 +846,30 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = { \minimalist_apply_title_numbering_style_static:n }
}
@@ -836,32 +879,32 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = { \minimalist_apply_title_numbering_style_static:n }
}
@@ -909,16 +952,17 @@ heading_suffix "}\n"
}
\RequirePackage { projlib-titlepage }
- \renewcommand{\maketitle}{
- \LocallyStopLineNumbers
- \ProjLibTitlePage [ style = simple ]
- {
- , title = \@title
- , author = \@author
- , date = \@date
- }
- \ResumeLineNumbers
- }
+ \RenewDocumentCommand \maketitle { O{} }
+ {
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple, #1 ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
}
{
\renewcommand{\@maketitle}
@@ -926,7 +970,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\begin{center}
\let\footnote\thanks
- {\minimalist_bfseries:\sffamily\minimalist_scshape:\Large\@title}\\\bigskip
+ {\minimalist_bfseries:\minimalist_scshape:\sffamily\Large\@title}\\\bigskip
\color{main-text!80!paper}
{\small\minimalist_scshape:\@author}
\par\smallskip\vspace{-\parskip}
@@ -984,7 +1028,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\vspace{-.75\baselineskip}
\begin{center}
- {\minimalist_bfseries:\minimalist_scshape:\small\keywordname}\\
+ { \g_minimalist_title_font_section_tl \minimalist_scshape: \small\keywordname}\\
\vspace{-.3\baselineskip}
\begin{minipage}[t]{.833\textwidth}
\vspace{0pt}
diff --git a/macros/latex/contrib/minimalist/minimalist-plain.sty b/macros/latex/contrib/minimalist/minimalist-plain.sty
index ed4d399512..134fb89080 100644
--- a/macros/latex/contrib/minimalist/minimalist-plain.sty
+++ b/macros/latex/contrib/minimalist/minimalist-plain.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-plain}
- {2023/01/05} {}
+ {2023/03/07} {}
{The "plain" style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -30,6 +30,19 @@
\endinput
}
+\bool_new:N \l__minimalist_colored_proof_bool
+\bool_set_true:N \l__minimalist_colored_proof_bool
+\tl_if_eq:NnTF \l__minimalist_colored_proof_tl { * }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ {
+ \tl_if_eq:NnT \l__minimalist_colored_proof_tl { false }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ }
+
%%================================
%% Title fonts
%%================================
@@ -57,6 +70,14 @@
\cs_new:Nn \minimalist_bfseries: {}
}
+\bool_if:NTF \l__minimalist_use_sffamily_bool
+ {
+ \cs_new:Nn \minimalist_sffamily: { \sffamily }
+ }
+ {
+ \cs_new:Nn \minimalist_sffamily: {}
+ }
+
\bool_if:NTF \l__minimalist_use_scshape_bool
{
\cs_new:Nn \minimalist_scshape: { \scshape }
@@ -74,12 +95,12 @@
\tl_new:N \g_minimalist_title_font_subsubsection_tl
\tl_new:N \g_minimalist_title_font_paragraph_tl
-\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
\bool_if:NF \l__minimalist_fast_bool
{
@@ -272,7 +293,12 @@
\tl_set:Nx \l_tmpa_tl { #1 }
\regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
\regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
- \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ % \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ \bool_if:NF \l_minimalist_is_under_bfseries_bool
+ {
+ \colorlet{minimalist-temp-color}{.}
+ }
+ \textcolor { minimalist-temp-color!39!paper } { \normalfont \l_tmpa_tl }
}
\cs_new_protected:Nn \minimalist_apply_title_numbering_style:n
@@ -284,10 +310,9 @@
\exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
\int_case:nn { \l_tmpa_int }
{
- { 0 } { \textcolor { .!24!paper } }
- { 1 } { \textcolor { .!39!paper } }
- { 2 } { \textcolor { .!39!paper } }
- { 3 } { \smaller[2] \textcolor { .!24!paper } }
+ { 0 } { \textcolor { main-text!39!paper } }
+ { 1 } { \textcolor { main-text!39!paper } }
+ { 2 } { \textcolor { main-text!39!paper } }
}
\l_tmpa_tl
\group_end:
@@ -415,7 +440,7 @@
\titleformat{\section}
{\LocallyStopLineNumbers
\g_minimalist_title_font_section_tl\centering}
- {\raisebox{-.02\baselineskip}{\large \minimalist_apply_title_numbering_style_static:n { \thesection } }}{1em}
+ {\raisebox{-.02\baselineskip}{\large \minimalist_apply_title_numbering_style:n { \thesection } }}{1em}
{#1}
[\ResumeLineNumbers]
@@ -423,7 +448,7 @@
\titleformat{\subsection}
{\LocallyStopLineNumbers
\g_minimalist_title_font_subsection_tl}
- { \minimalist_apply_title_numbering_style_static:n { \thesubsection } }{.75em}
+ { \minimalist_apply_title_numbering_style:n { \thesubsection } }{.75em}
{#1}
[\ResumeLineNumbers]
@@ -432,14 +457,14 @@
{
\titleformat{\subsubsection}[runin]
{\g_minimalist_title_font_subsubsection_tl}
- { \minimalist_apply_title_numbering_style_static:n { \thesection } }{.5em}
+ { \minimalist_apply_title_numbering_style:n { \thesection } }{.5em}
{#1.}[\hspace*{.3em}]
}
{
\titleformat{\subsubsection}
{\LocallyStopLineNumbers
\g_minimalist_title_font_subsubsection_tl}
- { \minimalist_apply_title_numbering_style_static:n { \thesubsubsection } }{.5em}
+ { \minimalist_apply_title_numbering_style:n { \thesubsubsection } }{.5em}
{#1}
[\ResumeLineNumbers]
}
@@ -522,6 +547,7 @@
%%================================
%% Lists
%%================================
+\PassOptionsToPackage { inline } { enumitem }
\RequirePackage { enumitem }
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
@@ -532,7 +558,7 @@
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman*}$\mskip-.5mu\big)$}
\setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$,
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$\mskip-.5mu\big)$}
-\setlist[description]{font=\normalfont\minimalist_bfseries:}
+\setlist[description]{font=\normalfont\minimalist_bfseries:\minimalist_sffamily:}
\renewlist{itemize}{itemize}{10}
\setlist[itemize]{leftmargin=*,label=\textcolor{.!27!paper}{$\cdot$}}
@@ -673,7 +699,7 @@ heading_suffix "}\n"
\RequirePackage { mathtools }
\RequirePackage { amsthm }
-\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+\def\tagform@#1{\maketag@@@{\textcolor{.!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
\PassOptionsToPackage { nopatch = eqnum } { microtype }
@@ -706,7 +732,8 @@ heading_suffix "}\n"
{\normalfont}{}
{0pt}
{{\thmname{#1}\thmnumber{\nobreakspace #2}}
- {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}\nobreakspace\nobreakspace{\normalfont\textcolor{main-text!27!paper}{---}}\nobreakspace\nobreakspace}
+ {\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}.\nobreakspace\nobreakspace}
+ % {\normalfont\textcolor{main-text!27!paper}{---}}
}
\theoremstyle{simple}
@@ -728,10 +755,19 @@ heading_suffix "}\n"
\renewcommand\Hy@numberline[1]{#1.~}
% https://tex.stackexchange.com/a/1821
% Add the bookmark of ToC
- \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ \bool_if:NTF \l__minimalist_is_book_bool
{
- \if@openright\cleardoublepage\else\clearpage\fi
- \pdfbookmark[0]{\contentsname}{toc}
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
+ {
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \pdfbookmark[1]{\contentsname}{toc}
+ }
}
}
@@ -741,23 +777,32 @@ heading_suffix "}\n"
\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
+\bool_if:NT \l__minimalist_colored_proof_bool
+ {
+ \hook_gput_code:nnn { env/proof/begin } { minimalist }
+ {
+ \Hy@SaveLastskip
+ \color{ \l__minimalist_colored_proof_tl }
+ \Hy@RestoreLastskip
+ }
+ }
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name }
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -766,18 +811,18 @@ heading_suffix "}\n"
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -788,33 +833,33 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = {
- \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -823,35 +868,35 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textit
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textit
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = {
- \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
}
}
@@ -898,16 +943,17 @@ heading_suffix "}\n"
}
\RequirePackage { projlib-titlepage }
- \renewcommand{\maketitle}{
- \LocallyStopLineNumbers
- \ProjLibTitlePage [ style = simple ]
- {
- , title = \@title
- , author = \@author
- , date = \@date
- }
- \ResumeLineNumbers
- }
+ \RenewDocumentCommand \maketitle { O{} }
+ {
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple, #1 ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
}
{
\renewcommand{\@maketitle}
@@ -915,7 +961,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\begin{center}
\let\footnote\thanks
- {\minimalist_bfseries:\sffamily\minimalist_scshape:\Large\@title}\\\bigskip
+ {\minimalist_bfseries:\minimalist_scshape:\sffamily\Large\@title}\\\bigskip
\color{main-text!80!paper}
{\small\minimalist_scshape:\@author}
\par\smallskip\vspace{-\parskip}
@@ -973,7 +1019,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\vspace{-.75\baselineskip}
\begin{center}
- {\minimalist_bfseries:\minimalist_scshape:\small\keywordname}\\
+ { \g_minimalist_title_font_section_tl \minimalist_scshape: \small\keywordname}\\
\vspace{-.3\baselineskip}
\begin{minipage}[t]{.833\textwidth}
\vspace{0pt}
diff --git a/macros/latex/contrib/minimalist/minimalist-stream.sty b/macros/latex/contrib/minimalist/minimalist-stream.sty
index e9e94eda46..d81bcbd059 100644
--- a/macros/latex/contrib/minimalist/minimalist-stream.sty
+++ b/macros/latex/contrib/minimalist/minimalist-stream.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist-stream}
- {2023/01/05} {}
+ {2023/03/07} {}
{The "stream" style of minimalist}
\IfPackageLoadedTF { minimalist } {}
@@ -30,6 +30,19 @@
\endinput
}
+\bool_new:N \l__minimalist_colored_proof_bool
+\bool_set_true:N \l__minimalist_colored_proof_bool
+\tl_if_eq:NnTF \l__minimalist_colored_proof_tl { * }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ {
+ \tl_if_eq:NnT \l__minimalist_colored_proof_tl { false }
+ {
+ \bool_set_false:N \l__minimalist_colored_proof_bool
+ }
+ }
+
%%================================
%% Title fonts
%%================================
@@ -57,6 +70,14 @@
\cs_new:Nn \minimalist_bfseries: {}
}
+\bool_if:NTF \l__minimalist_use_sffamily_bool
+ {
+ \cs_new:Nn \minimalist_sffamily: { \sffamily }
+ }
+ {
+ \cs_new:Nn \minimalist_sffamily: {}
+ }
+
\bool_if:NTF \l__minimalist_use_scshape_bool
{
\cs_new:Nn \minimalist_scshape: { \scshape }
@@ -74,12 +95,12 @@
\tl_new:N \g_minimalist_title_font_subsubsection_tl
\tl_new:N \g_minimalist_title_font_paragraph_tl
-\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
-\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_part_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl }
+\tl_gset:Nn \g_minimalist_title_font_chapter_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_section_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_subsection_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
\tl_gset:Nn \g_minimalist_title_font_subsubsection_tl { \itshape \g_minimalist_title_font_common_tl }
-\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries: \g_minimalist_title_font_common_tl \minimalist_scshape: }
+\tl_gset:Nn \g_minimalist_title_font_paragraph_tl { \minimalist_bfseries:\minimalist_sffamily: \g_minimalist_title_font_common_tl \minimalist_scshape: }
\bool_if:NF \l__minimalist_fast_bool
{
@@ -272,7 +293,12 @@
\tl_set:Nx \l_tmpa_tl { #1 }
\regex_replace_all:nnN { (\w) } { \c{minimalist_original_bfseries:}{\1} } \l_tmpa_tl
\regex_replace_all:nnN { (\d) } { {\c{minimalist_title_numbering_apply_font:n}{\1}} } \l_tmpa_tl
- \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ % \textcolor { .!39!paper } { \normalfont \l_tmpa_tl }
+ \bool_if:NF \l_minimalist_is_under_bfseries_bool
+ {
+ \colorlet{minimalist-temp-color}{.}
+ }
+ \textcolor { minimalist-temp-color!39!paper } { \normalfont \l_tmpa_tl }
}
\cs_new_protected:Nn \minimalist_apply_title_numbering_style:n
@@ -284,10 +310,10 @@
\exp_args:Nnx \regex_count:nnN { \. } {#1} \l_tmpa_int
\int_case:nn { \l_tmpa_int }
{
- { 0 } { \textcolor { .!39!paper } }
- { 1 } { \textcolor { .!39!paper } }
- { 2 } { \textcolor { .!39!paper } }
- { 3 } { \smaller[2] \textcolor { .!24!paper } }
+ { 0 } { \textcolor { main-text!39!paper } }
+ { 1 } { \textcolor { main-text!39!paper } }
+ { 2 } { \textcolor { main-text!39!paper } }
+ { 3 } { \smaller[2] \textcolor { main-text!24!paper } }
}
\l_tmpa_tl
\group_end:
@@ -591,6 +617,7 @@
%%================================
%% Lists
%%================================
+\PassOptionsToPackage { inline } { enumitem }
\RequirePackage { enumitem }
\setlistdepth{10}
\setlist{noitemsep, topsep=.33\topsep-.5\parskip}
@@ -601,7 +628,7 @@
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman*}$\mskip-.5mu\big)$}
\setlist[enumerate,3]{label = \normalfont\emph{\alph*}$\mskip-.5mu\big)$,
ref = \normalfont\color{.!45!paper}\arabic{enumi}.\emph{\roman{enumii}}.\emph{\alph*}$\mskip-.5mu\big)$}
-\setlist[description]{font=\normalfont\minimalist_bfseries:}
+\setlist[description]{font=\normalfont\minimalist_bfseries:\minimalist_sffamily:}
\renewlist{itemize}{itemize}{10}
\setlist[itemize]{leftmargin=*,label=\textcolor{.!27!paper}{$\cdot$}}
@@ -742,7 +769,7 @@ heading_suffix "}\n"
\RequirePackage { mathtools }
\RequirePackage { amsthm }
-\def\tagform@#1{\maketag@@@{\textcolor{main-text!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
+\def\tagform@#1{\maketag@@@{\textcolor{.!39!paper}{(\ignorespaces#1\unskip\@@italiccorr)}}}
\PassOptionsToPackage { nopatch = eqnum } { microtype }
@@ -785,7 +812,7 @@ heading_suffix "}\n"
\minimalist_apply_title_numbering_style:n { \thmnumber{#2} }
\skip_horizontal:n { \l_minimalist_title_sep_dim }
}
- % \minimalist_bfseries:
+ % \minimalist_bfseries:\minimalist_sffamily:
{\thmname{#1}}
{\color{main-text!50!paper}\thmnote{\hspace{.4em}$($#3$)$}}
. \hspace{.5em}
@@ -842,10 +869,19 @@ heading_suffix "}\n"
\renewcommand\Hy@numberline[1]{#1.~}
% https://tex.stackexchange.com/a/1821
% Add the bookmark of ToC
- \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ \bool_if:NTF \l__minimalist_is_book_bool
{
- \if@openright\cleardoublepage\else\clearpage\fi
- \pdfbookmark[0]{\contentsname}{toc}
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
+ {
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { minimalist }
+ {
+ \pdfbookmark[1]{\contentsname}{toc}
+ }
}
}
@@ -856,6 +892,15 @@ heading_suffix "}\n"
\SetTheorem { proof, proof* } { qed-symbol = { \customqedsymbol } }
+\bool_if:NT \l__minimalist_colored_proof_bool
+ {
+ \hook_gput_code:nnn { env/proof/begin } { minimalist }
+ {
+ \Hy@SaveLastskip
+ \color{ \l__minimalist_colored_proof_tl }
+ \Hy@RestoreLastskip
+ }
+ }
\exp_args:No \SetTheorem { \c_projlib_theorem_supported_clist, theorem-with-name, proof } { shared counter = subsection }
@@ -863,17 +908,17 @@ heading_suffix "}\n"
{
name style = {
, heading style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = { \minimalist_apply_title_numbering_style_static:n }
}
@@ -895,30 +940,30 @@ heading_suffix "}\n"
{
name style = {
, crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, Crefname style = {
- , english = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , french = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , ngerman = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , italian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , portuguese = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , brazilian = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , spanish = \minimalist_bfseries:\g_minimalist_title_font_common_tl\textsc
- , schinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , tchinese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , japanese = \minimalist_bfseries:\g_minimalist_title_font_common_tl
- , russian = \minimalist_bfseries:\g_minimalist_title_font_common_tl
+ , english = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , french = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , ngerman = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , italian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , portuguese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , brazilian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , spanish = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl\textsc
+ , schinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , tchinese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , japanese = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
+ , russian = \minimalist_bfseries:\minimalist_sffamily:\g_minimalist_title_font_common_tl
}
, numbering style = { \minimalist_apply_title_numbering_style_static:n }
}
@@ -979,16 +1024,17 @@ heading_suffix "}\n"
}
\RequirePackage { projlib-titlepage }
- \renewcommand{\maketitle}{
- \LocallyStopLineNumbers
- \ProjLibTitlePage [ style = simple ]
- {
- , title = \@title
- , author = \@author
- , date = \@date
- }
- \ResumeLineNumbers
- }
+ \RenewDocumentCommand \maketitle { O{} }
+ {
+ \LocallyStopLineNumbers
+ \ProjLibTitlePage [ style = simple, #1 ]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ \ResumeLineNumbers
+ }
}
{
\renewcommand{\@maketitle}
@@ -996,7 +1042,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\begin{center}
\let\footnote\thanks
- {\minimalist_bfseries:\sffamily\minimalist_scshape:\Large\@title}\\\bigskip
+ {\minimalist_bfseries:\minimalist_scshape:\sffamily\Large\@title}\\\bigskip
\color{main-text!80!paper}
{\small\minimalist_scshape:\@author}
\par\smallskip\vspace{-\parskip}
@@ -1054,7 +1100,7 @@ heading_suffix "}\n"
\LocallyStopLineNumbers
\vspace{-.75\baselineskip}
\begin{center}
- {\minimalist_bfseries:\minimalist_scshape:\small\keywordname}\\
+ { \g_minimalist_title_font_section_tl \minimalist_scshape: \small\keywordname}\\
\vspace{-.3\baselineskip}
\begin{minipage}[t]{.833\textwidth}
\vspace{0pt}
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 0266993cec..8eeb64e747 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{minimalist}
- {2023/01/05} {}
+ {2023/03/07} {}
{A simple and clear style for articles and books}
\keys_define:nn { minimalist }
@@ -33,6 +33,8 @@
, use~style .str_set:N = \l__minimalist_style_str
, use style .str_set:N = \l__minimalist_style_str
, classical .meta:n = { style = classical }
+ , flow .meta:n = { style = flow }
+ , stream .meta:n = { style = stream }
, use-boldface .bool_set:N = \l__minimalist_use_boldface_bool
, use-boldface .initial:n = { false }
@@ -45,6 +47,14 @@
, title~in~bold .bool_set:N = \l__minimalist_use_boldface_bool
, title in bold .bool_set:N = \l__minimalist_use_boldface_bool
+ , use-sffamily .bool_set:N = \l__minimalist_use_sffamily_bool
+ , use-sffamily .initial:n = { false }
+ , use~sffamily .bool_set:N = \l__minimalist_use_sffamily_bool
+ , use sffamily .bool_set:N = \l__minimalist_use_sffamily_bool
+ , title-in-sffamily .bool_set:N = \l__minimalist_use_sffamily_bool
+ , title~in~sffamily .bool_set:N = \l__minimalist_use_sffamily_bool
+ , title in sffamily .bool_set:N = \l__minimalist_use_sffamily_bool
+
, use-scshape .bool_set:N = \l__minimalist_use_scshape_bool
, use-scshape .initial:n = { false }
, use~scshape .bool_set:N = \l__minimalist_use_scshape_bool
@@ -61,6 +71,16 @@
, theorem~in~new~line .bool_set:N = \l__minimalist_theorem_in_new_line_bool
, theorem in new line .bool_set:N = \l__minimalist_theorem_in_new_line_bool
+ , colored-proof .tl_set:N = \l__minimalist_colored_proof_tl
+ , colored-proof .initial:n = { * }
+ , colored-proof .default:n = { blue!50!cyan!55!main-text }
+ , colored~proof .tl_set:N = \l__minimalist_colored_proof_tl
+ , colored~proof .initial:n = { * }
+ , colored~proof .default:n = { blue!50!cyan!55!main-text }
+ , colored proof .tl_set:N = \l__minimalist_colored_proof_tl
+ , colored proof .initial:n = { * }
+ , colored proof .default:n = { blue!50!cyan!55!main-text }
+
, unknown .code:n = {
\PassOptionsToPackage { \CurrentOption } { projlib-language }
\PassOptionsToPackage { \CurrentOption } { projlib-author }
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 14681ba41d..04e877e103 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{minimart}
- {2023/01/05} {}
+ {2023/03/07} {}
{A simple and clear article style}
\tl_const:Nn \l__minimclass_base_class_tl { article }
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index 63d84a04a0..536a23fe55 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{minimbook}
- {2023/01/05} {}
+ {2023/03/07} {}
{A simple and clear book style}
\tl_const:Nn \l__minimclass_base_class_tl { book }
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index 3ce4049f78..85ec3103b5 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index 6340ef2e45..e9700dd86c 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -39,6 +39,7 @@
\usepackage{footnote}
\usepackage{booktabs}
\usepackage{varwidth}
+\usepackage{tcolorbox}
\usepackage[auto-lang=false]{lipsum}
\usepackage[hyperfootnotes = false]{hyperref}
@@ -486,52 +487,60 @@ $\begin{bNiceArray}{cw{c}{1cm}c|c}[margin]
0 & \Cdots& 0 & 0
\end{bNiceArray}$
+\NewDocumentCommand{\Definition}{m}
+ {{\setlength{\fboxsep}{1pt}\colorbox{gray!20}{\ttfamily \vphantom{gl}#1}}}
+
\interitem
La commande |\Block| accepte en premier argument optionnel (entre crochets) une
liste de couples \textsl{clé=valeur}. Les clés sont les suivantes :
\begin{itemize}
-\item la clé |fill| prend en argument une couleur et remplit le bloc avec cette
-couleur ;
-\item la clé |draw| prend en argument une couleur et trace le cadre avec cette
-couleur (la valeur par défaut de cette clé est la couleur courante des filets du
-tableau) ;
-\item la clé |color| prend en argument une couleur et l'applique au contenu et
-trace également le cadre avec cette couleur ;
-\item les clés |hlines|, |vlines| et |hvlines| tracent les filets correspondants
-dans le bloc\footnote{Néanmoins, les filets ne sont pas tracés dans les
- sous-blocs du bloc, conformément à l'esprit de \pkg{nicematrix}: les filets ne
-sont pas tracés dans les blocs (cf. section~\ref{rules} p.~\pageref{rules}).} ;
-\item la clé |line-width| fixe la largeur utilisée pour tracer les filets (n'a
-d'intérêt que si |draw|, |hvlines|, |hlines| ou |vlines| est utilisée) ;
-\item la clé |rounded-corners| impose des coins arrondis (pour le cadre dessiné
-par |draw| et le fond dessiné par |fill|) avec un rayon égal à la valeur de
-cette clé (la valeur par défaut est 4~pt\footnote{Cette valeur par défaut est la
- valeur initiale des \emph{rounded corners} de TikZ.}) ;
-\item quand la clé |tikz| est utilisée, le chemin TikZ correspondant au
-rectangle délimitant le bloc est exécuté avec TikZ\footnote{TikZ doit être
+\item la clé \Definition{fill} prend en argument une couleur et remplit le bloc
+avec cette couleur ;
+\item la clé \Definition{draw} prend en argument une couleur et trace le cadre
+avec cette couleur (la valeur par défaut de cette clé est la couleur courante
+des filets du tableau) ;
+\item la clé \Definition{color} prend en argument une couleur et l'applique au
+contenu et trace également le cadre avec cette couleur ;
+\item les clés \Definition{hlines}, \Definition{vlines} et \Definition{hvlines}
+tracent les filets correspondants dans le bloc\footnote{Néanmoins, les filets ne
+ sont pas tracés dans les sous-blocs du bloc, conformément à l'esprit de
+ \pkg{nicematrix}: les filets ne sont pas tracés dans les blocs (cf.
+ section~\ref{rules} p.~\pageref{rules}).} ;
+\item la clé \Definition{line-width} fixe la largeur utilisée pour tracer les
+filets (n'a d'intérêt que si |draw|, |hvlines|,
+|hlines| ou |vlines| est utilisée) ;
+\item la clé \Definition{rounded-corners} impose des coins arrondis (pour le
+cadre dessiné par |draw| et le fond dessiné par |fill|)
+avec un rayon égal à la valeur de cette clé (la valeur par défaut est
+4~pt\footnote{Cette valeur par défaut est la valeur initiale des \emph{rounded
+ corners} de TikZ.}) ;
+\item quand la clé \Definition{tikz} est utilisée, le chemin TikZ correspondant
+au rectangle délimitant le bloc est exécuté avec TikZ\footnote{TikZ doit être
chargé préalablement (par défaut, \pkg{nicematrix} ne charge que
\textsc{pgf}), faute de quoi, une erreur sera levée.} en utilisant comme
options la valeur de cette clé |tikz| (qui doit donc être une liste de clés TikZ
applicables à un chemin de TikZ). Pour des exemples d'utilisation de cette clé
|tikz|, voir p.~\pageref{tikz-key-examples} ;
-\item la clé |name| donne un nom au nœud TikZ rectangulaire correspondant au
-bloc ; on peut utiliser ce nom avec TikZ dans le |\CodeAfter| (cf.~p.~\pageref{code-after});
-\item la clé |respect-arraystretch| évite la remise à $1$ de |\arraystretch| en
-début de bloc (qui a lieu par défaut) ;
-\item la clé |borders| permet de ne tracer que certaines des bordures du bloc :
-cette clé prend comme valeur une liste d'éléments parmi les suivants : |left|,
-|right|, |top| et |bottom| ; on peut en fait, dans la liste qui est la valeur de
-la clé |borders| mettre une entrée de la forme |tikz={|\textsl{liste}|}| où
-\textsl{liste} est une liste de couples \textsl{clé=valeur} de TikZ spécifiant
-les caractéristiques graphiques des traits qui seront dessinés (pour un exemple,
-voir p.~\pageref{tiretes}).
-
-\item \colorbox{yellow!50}{\textbf{Nouveau 6.15}}\par\nobreak
-Par défaut, les filets ne sont pas tracés dans les blocs (voir à ce sujet la
-partie sur les filets, section~\ref{rules} p.~\pageref{rules}). Néanmoins, si la
-clé |transparent| est utilisée, les filets seront tracés. Pour un example, voir
-la section~\ref{tikz-key-examples}, page~\pageref{tikz-key-examples}.
+\item la clé \Definition{name} donne un nom au nœud TikZ rectangulaire
+correspondant au bloc ; on peut utiliser ce nom avec TikZ dans le |\CodeAfter|
+(cf.~p.~\pageref{code-after});
+\item la clé \Definition{respect-arraystretch} évite la remise à $1$ de
+|\arraystretch| en début de bloc (qui a lieu par défaut) ;
+\item la clé \Definition{borders} permet de ne tracer que certaines des bordures
+du bloc : cette clé prend comme valeur une liste d'éléments parmi les suivants :
+|left|, |right|, |top| et |bottom| ; on peut en fait, dans la liste qui est la
+valeur de la clé |borders| mettre une entrée de la forme
+|tikz={|\textsl{liste}|}| où \textsl{liste} est une liste de couples
+\textsl{clé=valeur} de TikZ spécifiant les caractéristiques graphiques des
+traits qui seront dessinés (pour un exemple, voir p.~\pageref{tiretes}).
+
+\item \colorbox{yellow!50}{\textbf{Nouveau 6.15}}\par\nobreak Par défaut, les
+filets ne sont pas tracés dans les blocs (voir à ce sujet la partie sur les
+filets, section~\ref{rules} p.~\pageref{rules}). Néanmoins, si la clé
+\Definition{transparent} est utilisée, les filets seront tracés. Pour un
+example, voir la section~\ref{tikz-key-examples},
+page~\pageref{tikz-key-examples}.
\end{itemize}
@@ -1080,7 +1089,7 @@ Avec \pkg{nicematrix}, il est possible de spécifier une couleur même si
nommée également |\arrayrulecolor|. Les environnements de \pkg{nicematrix}
proposent également une clé |rules/color| qui permet de fixer cette couleur pour
l'environnement en question. Cette clé fixe localement la couleur des filets
-(alors que la commande |\arrayrulecolor| agit globalement).
+(alors que la commande |\arrayrulecolor| agit globalement !).
\medskip
\begin{scope}
@@ -1200,7 +1209,9 @@ arum & iris & jacinthe & muguet
\medskip
La clé |hvlines-except-borders| est similaire à la clé |hvlines| mais ne trace
-pas les filets sur les bords horizontaux et verticaux du tableau.
+pas les filets sur les bords horizontaux et verticaux du tableau. Pour un
+exemple d'utilisation de cette clé, voir la partie «Exemple d'utilisation avec
+tcolorbox» p.~\pageref{tcolorbox}.
\medskip
\subsubsection{Les coins (vides)}
@@ -1630,7 +1641,7 @@ peut placer le contenu de ce |code-before| entre les mots-clés |\CodeBefore| et
\begin{Verbatim}
\begin{pNiceArray}{~textsl#preamble@}
-~emphase#\CodeBefore@
+~emphase#\CodeBefore [~textsl#options@]@
~textsl#instructions du code-before@
~emphase#\Body@
~textsl#contenu de l'environnement@
@@ -1638,6 +1649,12 @@ peut placer le contenu de ce |code-before| entre les mots-clés |\CodeBefore| et
\end{Verbatim}
\smallskip
+L'argument optionnel entre crochets est une liste de couples \textsl{clé=valeur}
+qui seront présentées au fur et à mesure. \footnote{Les clés disponibles sont
+ \texttt{create-cell-nodes}, \texttt{sub-matrix} (et ses sous-clés) et
+ \texttt{delimiters-color}.}
+
+\smallskip
De nouvelles commandes sont disponibles dans ce |\CodeBefore|: |\cellcolor|,
|\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|, |\rowlistcolors|,
|\chessboardcolors| et |\arraycolor|.\footnote{On pourra remarquer que, dans le
@@ -3160,6 +3177,79 @@ $\begin{bNiceMatrix}[margin,hvlines]
0 & \Cdots& 0 & 0
\end{bNiceMatrix}$
+\section{Délimiteurs dans le préambule de l'environnement}
+
+\colorbox{yellow!50}{\textbf{Modifié 6.16}}\enskip Pour les environnements à
+préambule (|{NiceArray}|, |{pNiceArray}|, etc.), il est possible de placer des
+délimiteurs verticaux directement dans le préambule.\footnote{Cette syntaxe est
+ inspirée de l'extension \pkg{blkarray}.}
+\label{delimiters-in-preamble}%
+
+\smallskip
+Les délimiteurs ouvrants doivent être précédés du mot-clé |\left| et les
+délimiteurs fermants du mot-clé |\right|. Les mots-clés |\left| et |\right| n'ont
+pas d'obligation à être utilisés par paires.
+
+\smallskip
+Tous les délimiteurs extensibles de LaTeX peuvent être utilisés.
+
+\medskip
+Voici un exemple qui utilise |\lgroup| et |\rgroup|.
+
+\medskip
+\begin{BVerbatim}
+$\begin{NiceArray}{~emphase#\left\lgroup@ ccc~emphase#\right\rgroup@ l}
+1 & 2 & 3 &
+4 & 1 & 6 &
+7 & 8 & 9 & \scriptstyle L_3 \gets L_3 + L_1 + L_2
+\end{NiceArray}$
+\end{BVerbatim}
+
+\[\begin{NiceArray}{\left\lgroup ccc\right\rgroup l}
+1 & 2 & 3 & \\
+4 & 1 & 6 & \\
+7 & 8 & 9 & \scriptstyle L_3 \gets L_3 + L_1 + L_2
+\end{NiceArray}\]
+
+\medskip
+Pour cet exemple, on aurait aussi pu utiliser |{NiceArrayWithDelims}|
+(cf. la partie \ref{NiceArrayWithDelims}, p.~\pageref{NiceArrayWithDelims})
+et la clé |last-col| (cf. p.~\pageref{exterior}).
+
+\bigskip
+Il y a un cas particulier : pour les délimiteurs |(|, |[| et |\{| (et les
+délimiteurs fermants correspondants), les préfixes |\left| et |\right| sont
+facultatifs.\footnote{Pour les délimiteurs \texttt{[} et \texttt{]},
+ les préfixes restent obligatoires en cas de conflit de notation avec des
+ crochets d'options de certains descripteurs de colonnes.}
+
+\bigskip
+Dans le cas de deux délimiteurs successifs (nécessairement un fermant suivi d'un
+ouvrant pour une autre sous-matrice) un espace égal à |\enskip| est inséré
+automatiquement.
+
+\medskip
+\begin{BVerbatim}
+$\begin{pNiceArray}{~emphase#(c)(c)(c)@}
+a_{11} & a_{12} & a_{13} \\
+a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
+a_{31} & a_{32} & a_{33}
+\end{pNiceArray}$
+\end{BVerbatim}
+
+\[\begin{pNiceArray}{(c)(c)(c)}
+a_{11} & a_{12} & a_{13} \\
+a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
+a_{31} & a_{32} & a_{33}
+\end{pNiceArray}\]
+
+
+\bigskip
+Pour des constructions plus complexes, avec en particulier des délimiteurs ne
+couvrant pas toutes les rangées, on aura intérêt à considérer la commande
+|\SubMatrix| disponible dans le |\CodeAfter|: voir la partie~\ref{sub-matrix},
+p.~\pageref{sub-matrix}.
+
\section{Le \textbackslash CodeAfter}
@@ -3255,7 +3345,8 @@ autres lignes diagonales (par défaut, les lignes tracées par |\Ddots| sont
\end{bNiceMatrix}\]
-\subsection{La commande \textbackslash SubMatrix dans le \textbackslash CodeAfter}
+\subsection{La commande \textbackslash SubMatrix dans le \textbackslash
+ CodeAfter (et aussi le \textbackslash CodeBefore)}
\label{sub-matrix}
@@ -3279,7 +3370,7 @@ crochet est alors le délimiteur gauche de la sous-matrice (ex. :
|\SubMatrix[{2-2}{4-7}]|).}
\end{itemize}
-On remarquera que la commande |\SubMatrix| trace les délimiteurs après la
+On remarquera que la commande |\SubMatrix| trace les délimiteurs \emph{après} la
construction de la matrice : aucun espace n'est inséré par la commande
|\SubMatrix|. C'est pourquoi, dans l'exemple suivant, on a utilisé la clé
|margin| et on a inséré à la main de l'espace entre la troisième et la quatrième
@@ -3310,6 +3401,31 @@ $\begin{NiceArray}{ccc@{\hspace{1.5em}}c}[cell-space-limits=2pt,margin]
\end{NiceArray}$
\medskip
+En fait, dans cet exemple, il aurait sans doute été plus simple de mettre des
+délimiteurs directement dans le préambule de l'environnement |{NiceArray}| (voir
+la section~\ref{delimiters-in-preamble}, p.~\pageref{delimiters-in-preamble})
+avec la construction suivante.
+
+\medskip
+\begin{scope}
+\hfuzz=15cm
+\begin{BVerbatim}[boxwidth=11cm,baseline=c]
+$\begin{NiceArray}{~emphase#(ccc)(c)@}[cell-space-limits=2pt]
+ 1 & 1 & 1 & x \\
+\dfrac{1}{4} & \dfrac{1}{2} & \dfrac{1}{4} & y \\
+ 1 & 2 & 3 & z
+\end{NiceArray}$
+\end{BVerbatim}
+\end{scope}
+$\begin{NiceArray}{(ccc)(c)}[cell-space-limits=2pt]
+ 1 & 1 & 1 & x \\
+\dfrac{1}{4} & \dfrac{1}{2} & \dfrac{1}{4} & y \\
+ 1 & 2 & 3 & z
+\end{NiceArray}$
+
+
+
+\bigskip
La commande |\SubMatrix| accepte en fait également deux arguments optionnels
spécifiés par les symboles traditionnels |^| et |_| pour des éléments en
exposant et en indice.
@@ -3336,7 +3452,7 @@ $\begin{bNiceMatrix}[right-margin=1em]
\end{scope}
-\medskip
+\bigskip
Les clés disponibles pour la commande |\SubMatrix| sont les suivantes :
%
\begin{itemize}
@@ -3356,9 +3472,12 @@ contenu des cases des colonnes mises en jeu (voir exemple ci-dessous) ;
la sous-matrice (si cette clé est utilisée sans valeur, tous les filets
verticaux sont tracés) ;
\item |hlines| est similaire à |vlines| mais pour les filets horizontaux ;
-\item |hvlines|, qui s'utilise sans valeur, trace tous les filets dans la sous-matrice.
+\item |hvlines|, qui s'utilise sans valeur, trace tous les filets dans la
+sous-matrice ;
+\item |code| permet d'insérer du code, en particulier du code TikZ, après la
+construction de la matrice. Cette clé est décrite en détail plus loin.
\end{itemize}
-On remarquera que tous ces filets sont dessinés après la construction du tableau
+On remarquera que tous les filets sont dessinés après la construction du tableau
principal : les colonnes et les rangées ne sont pas écartées.
\medskip
@@ -3433,32 +3552,6 @@ Il existe aussi une clé |name| qui permet de donner un nom à une sous-matrice
créée par une commande |\SubMatrix|. Ce nom est utilisé pour créer des nœuds
PGF-TikZ : voir p.~\pageref{node-sub-matrix}.
-\medskip
-Il est également possible de spécifier des délimiteurs\footnote{Les délimiteurs
- en question sont |(|, |[| et |\{| et les fermants correspondants.
- On peut bien sûr aussi mettre des \verb+|+ et des \verb+||+ dans le
- préambule.} en les plaçant dans le préambule de l'environnement (pour les
-environnements à préambule : |{NiceArray}|, |{pNiceArray}|, etc.). Cette syntaxe
-est inspirée de l'extension \pkg{blkarray}.
-
-Dans le cas de deux délimiteurs successifs (nécessairement un fermant suivi d'un
-ouvrant pour une autre sous-matrice) un espace égal à |\enskip| est inséré
-automatiquement.
-
-\medskip
-\begin{BVerbatim}
-$\begin{pNiceArray}{~emphase#(c)(c)(c)@}
-a_{11} & a_{12} & a_{13} \\
-a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
-a_{31} & a_{32} & a_{33}
-\end{pNiceArray}$
-\end{BVerbatim}
-
-\[\begin{pNiceArray}{(c)(c)(c)}
-a_{11} & a_{12} & a_{13} \\
-a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
-a_{31} & a_{32} & a_{33}
-\end{pNiceArray}\]
\bigskip
La commande |\SubMatrix| est en fait aussi disponible dans le |\CodeBefore|.
@@ -3471,10 +3564,11 @@ Pour un exemple, voir \ref{submatrix-in-codebefore}
p.~\pageref{submatrix-in-codebefore}.
\bigskip
-En dépit de son nom, la commande |\SubMatrix| peut être utilisée également dans
+En dépit de son nom, la commande |\SubMatrix| peut également être utilisée dans
|{NiceTabular}| comme dans l'exemple suivant (qui utilise |\bottomrule| et
-|\toprule| de \pkg{booktabs}).
+|\toprule| de l'extension \pkg{booktabs}).
+\smallskip
\begin{BVerbatim}[baseline=c]
\begin{NiceTabular}{~@{}ll~@{}}
\toprule
@@ -3498,7 +3592,52 @@ Part A & the first part \\
\end{NiceTabular}
+\vspace{1cm}
+\colorbox{yellow!50}{\textbf{Nouveau 6.16}}\enskip La clé |code| de la commande
+|\SubMatrix| permet d'insérer du code après la création de la matrice. Elle a
+surtout pour vocation d'être utilisée pour insérer des instructions TikZ,
+sachant que, dans les instructions TikZ insérées dans cette clé, les nœuds de la
+forme |i-j| et \verb+i-|j+ sont interprétés avec |i| et |j| étant des numéros de
+ligne et colonne \emph{relatifs à la sous-matrice}.
+\medskip
+\begin{scope}
+\fvset{commandchars=\~\#\!}%
+\begin{Verbatim}
+$\begin{NiceArray}{ccc@{}w{c}{5mm}@{}ccc}
+ & & && -1 & 1 & 2 \\
+ & & && 0 & 3 & 4 \\
+ & & && 0 & 0 & 5 \\
+ 1 & 2 & 3 && -1 & 7 & 25 \\
+ 0 & 4 & 5 && 0 & 12 & 41 \\
+ 0 & 0 & 6 && 0 & 0 & 30
+\CodeAfter
+ ~emphase#\NewDocumentCommand{\MyDraw}{}{\tikz \draw [blue] (2-|1) -| (3-|2) -| (4-|3) ;}!
+ \SubMatrix({1-5}{3-7})[~emphase#code = \MyDraw!]
+ \SubMatrix({4-1}{6-3})[~emphase#code = \MyDraw!]
+ \SubMatrix({4-5}{6-7})[~emphase#code = \MyDraw!]
+\end{NiceArray}$
+\end{Verbatim}
+\end{scope}
+
+
+\[\begin{NiceArray}{ccc@{}w{c}{5mm}@{}ccc}
+ & & && -1 & 1 & 2 \\
+ & & && 0 & 3 & 4 \\
+ & & && 0 & 0 & 5 \\
+ 1 & 2 & 3 && -1 & 7 & 25 \\
+ 0 & 4 & 5 && 0 & 12 & 41 \\
+ 0 & 0 & 6 && 0 & 0 & 30
+\CodeAfter
+ \NewDocumentCommand{\MyDraw}{}{\tikz \draw [blue] (2-|1) -| (3-|2) -| (4-|3) ;}
+ \SubMatrix({1-5}{3-7})[code = \MyDraw ]
+ \SubMatrix({4-1}{6-3})[code = \MyDraw ]
+ \SubMatrix({4-5}{6-7})[code = \MyDraw ]
+\end{NiceArray}\]
+
+\medskip
+Comme on le voit, le tracé effectué par la commande |\MyDraw| est \emph{relatif}
+à la sous-matrice à laquelle elle s'applique.
\subsection{Les commandes \textbackslash OverBrace et \textbackslash
UnderBrace dans le \textbackslash CodeAfter}
@@ -3961,6 +4100,8 @@ suivant (avec une version de LaTeX postérieure à 2020/10/01).
\makeatother
\end{Verbatim}
+Néanmoins, les fonctionnalités proposées par \pkg{nicematrix} rendent peu
+utile l'utilisation de \pkg{threeparttable} en conjonction avec \pkg{nicematrix}.
\section{Autres fonctionnalités}
@@ -4160,6 +4301,13 @@ En fait, l'option |small| correspond aux réglages suivants :
\item les caractéristiques des lignes en pointillés sont également modifiées.
\end{itemize}
+\medskip
+Quand la clé |small| est active, certaines fonctionnalités de \pkg{nicematrix}
+ne sont plus disponibles: par exemple, il n'est plus possible de mettre des
+délimiteurs directement dans le préambule d'un environnement avec préambule (cf.
+partie \ref{delimiters-in-preamble}, p.~\pageref{delimiters-in-preamble}).
+
+
\subsection{Les compteurs iRow et jCol}
\label{iRow}
@@ -4299,6 +4447,8 @@ Cette couleur s'applique aussi aux délimiteurs tracés par |\SubMatrix|
\subsection{L'environnement \{NiceArrayWithDelims\}}
+\label{NiceArrayWithDelims}
+
En fait, l'environnement |{pNiceArray}| et ses variantes sont fondés sur un
environnement plus général, appelé |{NiceArrayWithDelims}|. Les deux premiers
arguments obligatoires de cet environnement sont les délimiteurs gauche et droit
@@ -5168,8 +5318,9 @@ L'extension \pkg{nicematrix} n'est pas compatible avec la classe \cls{ieeeaccess
\url{https://tex.stackexchange.com/questions/528975/error-loading-tikz-in-ieeeaccess-class}}
\medskip
-Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{aastex631}, on doit
-ajouter dans le préambule du fichier les lignes suivantes :
+Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{aastex631} (de
+l'\emph{American Astronomical Society}, on doit ajouter dans le préambule du
+fichier les lignes suivantes :
\begin{Verbatim}
\BeforeBegin{NiceTabular}{\let\begin\BeginEnvironment\let\end\EndEnvironment}
@@ -5178,8 +5329,9 @@ ajouter dans le préambule du fichier les lignes suivantes :
\end{Verbatim}
\medskip
-Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{sn-jnl}, \pkg{pgf}
-doit être chargé avant le |\documentclass|:
+Pour pouvoir utiliser \pkg{nicematrix} avec la classe \cls{sn-jnl} (de
+\emph{Springer Nature}), \pkg{pgf} doit être chargé avant le |\documentclass|
+avec |\RequirePackage|:
\begin{Verbatim}
\RequirePackage{pgf}
@@ -5196,7 +5348,7 @@ L'extension \pkg{nicematrix} n'est pas parfaitement compatible avec l'extension
\pkg{arydshln} (parce que cette extension redéfinit de nombreuses commandes
internes de \pkg{array}). De toutes manières, dans le cadre de \pkg{nicematrix},
il est conseillé de tracer les filets en tiretés avec les commandes de
-\pkg{nicematrix} en créant un style de ligne personnalisée avec |custom-line| :
+\pkg{nicematrix} en créant un style de ligne personnalisé avec |custom-line| :
cf.~p.~\pageref{custom-line}.
\medskip
@@ -5256,7 +5408,7 @@ Pour l'exemple suivant, la bibliothèque \pkg{patterns} de TikZ doit aussi être
\bigskip
Dans l'exemple suivant, on utilise la clé |tikz| pour hachurer une ligne du
tableau. On remarquera que l'on utilise la clé |transparent| de la commande
-|\Block| pour que les filets sont tracés dans le bloc.\footnote{Par défaut, les filets ne sont pas tracés dans les blocs créés avec la commande
+|\Block| pour que les filets soient tracés dans le bloc.\footnote{Par défaut, les filets ne sont pas tracés dans les blocs créés avec la commande
\texttt{\textbackslash Block} : cf.~section~\ref{rules} p.~\pageref{rules}}
\begin{Verbatim}
@@ -5282,6 +5434,116 @@ sept & huit & neuf
\end{NiceTabular}
\end{center}
+\subsection{Utilisation avec tcolorbox}
+
+\label{tcolorbox}
+
+Voici un exemple d'utilisation de |{NiceTabular}| dans une commande |\tcbox| de
+\pkg{tcolorbox}. On a utilisé la clé |hvlines-except-borders| pour faire afficher
+tous les filets sauf ceux sur les bords (qui sont, bien entendu, ajoutés par
+\pkg{tcolorbox}).
+
+\medskip
+\begin{BVerbatim}
+\tcbset
+ {
+ colframe = blue!50!black ,
+ colback = white ,
+ colupper = red!50!black ,
+ fonttitle = \bfseries ,
+ nobeforeafter ,
+ center title
+ }
+
+\tcbox
+ [
+ left = 0mm ,
+ right = 0mm ,
+ top = 0mm ,
+ bottom = 0mm ,
+ boxsep = 0mm ,
+ toptitle = 0.5mm ,
+ bottomtitle = 0.5mm ,
+ title = My table
+ ]
+ {
+ \renewcommand{\arraystretch}{1.2}% <-- the % is mandatory here
+ \begin{NiceTabular}{rcl}[~emphase#hvlines-except-borders@,rules/color=blue!50!black]
+ \CodeBefore
+ \rowcolor{red!15}{1}
+ \Body
+ One & Two & Three \\
+ Men & Mice & Lions \\
+ Upper & Middle & Lower
+ \end{NiceTabular}
+ }
+\end{BVerbatim}
+
+\medskip
+\begin{center}
+\tcbset
+ {
+ colframe = blue!50!black ,
+ colback = white ,
+ colupper = red!50!black ,
+ fonttitle = \bfseries ,
+ nobeforeafter ,
+ center title
+ }
+
+\tcbox
+ [
+ left = 0mm ,
+ right = 0mm ,
+ top = 0mm ,
+ bottom = 0mm ,
+ boxsep = 0mm ,
+ toptitle = 0.5mm ,
+ bottomtitle = 0.5mm ,
+ title = My table
+ ]
+ {
+ \renewcommand{\arraystretch}{1.2}%
+ \begin{NiceTabular}{rcl}[hvlines-except-borders,rules/color=blue!50!black]
+ \CodeBefore
+ \rowcolor{red!15}{1}
+ \Body
+ One & Two & Three \\
+ Men & Mice & Lions \\
+ Upper & Middle & Lower
+ \end{NiceTabular}
+ }
+\end{center}
+
+
+\vspace{1cm}
+Cet exemple montre l'utilisation de \pkg{nicematrix} en conjonction avec
+\pkg{tcolorbox}. Si on souhaite seulement faire un tableau avec un cadre
+extérieur aux coins arrondis, il n'est pas nécessaire d'utiliser \pkg{tcolorbox} :
+on peut tracer un |\Block| avec la commande |rounded-corners|.
+
+\medskip
+\begin{BVerbatim}[baseline=c,boxwidth=10.5cm]
+\begin{NiceTabular}{rcl}[hvlines-except-borders]
+\Block[draw,transparent,~emphase#rounded-corners@]{*-*}{}
+ One & Two & Three \\
+ Men & Mice & Lions \\
+ Upper & Middle & Lower
+\end{NiceTabular}
+\end{BVerbatim}
+\begin{NiceTabular}{rcl}[hvlines-except-borders]
+\Block[draw,transparent,rounded-corners]{*-*}{}
+ One & Two & Three \\
+ Men & Mice & Lions \\
+ Upper & Middle & Lower
+\end{NiceTabular}
+
+\medskip
+On a utilisé la clé |transparent| de manière à avoir les filets spécifiés par
+|hvlines-except-borders| tracés dans le bloc (par défaut, les filets ne sont
+pas tracés dans les blocs).
+
+
\subsection{Notes dans les tableaux}
\label{ex:notes}
@@ -5356,7 +5618,7 @@ Nom & Prénom & Date de naissance \\
\midrule
Achard~emphase#\tabularnote{La famille Achard est une très ancienne famille du Poitou.}!
& Jacques & 5 juin 1962 \\
-Lefèbvre~emphase#\tabularnote{Le patronyme Lefèbvre est une altération de Lefébure.}!
+Lefèbvre~emphase#\tabularnote{Le patronyme Lefebvre est une altération de Lefébure.}!
& Mathilde & 23 mai 1988 \\
Vanesse & Stéphanie & 30 octobre 1994 \\
Dupont & Chantal & 15 janvier 1998 \\
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index 3083528029..6ef8d2a7f7 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -17,8 +17,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{6.15}
-\def\myfiledate{2023/02/25}
+\def\myfileversion{6.16}
+\def\myfiledate{2023/03/06}
%
%
%<*batchfile>
@@ -60,6 +60,7 @@ version 2005/12/01 or later.
\usepackage{siunitx}
\usepackage{caption}
\usepackage{varwidth}
+\usepackage{tcolorbox}
\usepackage[auto-lang=false]{lipsum}
\NewDocumentEnvironment {scope} {} {} {}
@@ -533,54 +534,58 @@ version 2005/12/01 or later.
% \end{bNiceArray}$
% \end{scope}
%
+% \NewDocumentCommand{\Definition}{m}
+% {{\setlength{\fboxsep}{1pt}\colorbox{gray!20}{\ttfamily \vphantom{gl}#1}}}
+%
%
% \interitem
% In fact, the command |\Block| accepts as first optional argument (between
% square brackets) a list of couples \textsl{key=value}. The available keys are as
% follows:
% \begin{itemize}
-% \item the keys |l|, |c| and |r| are used to fix the horizontal position of the
-% content of the block, as explained previously;
-% \item the key |fill| takes in as value a color and fills the block with that
+% \item the key \Definition{fill} takes in as value a color and fills the block
+% with that color;
+% \item the key \Definition{draw} takes in as value a color and strokes the
+% frame of the block with that color (the default value of that key is the
+% current color of the rules of the array);
+% \item the key \Definition{color} takes in as value a color and apply that
+% color the content of the block but draws also the frame of the block with that
% color;
-% \item the key |draw| takes in as value a color and strokes the frame of the
-% block with that color (the default value of that key is the current color of
-% the rules of the array);
-% \item the key |color| takes in as value a color and apply that color the
-% content of the block but draws also the frame of the block with that color;
-% \item the keys |hlines|, |vlines| and |hvlines| draw all the corresponding
-% rules in the block;\footnote{However, the rules are not drawn in the
-% sub-blocks of the block, as always with \pkg{nicematrix}: the rules are not
-% drawn in the blocks (cf. section~\ref{rules} p.~\pageref{rules}).}
-% \item the key |line-width| is the width of the rules (this key
+% \item the keys \Definition{hlines}, \Definition{vlines} and
+% \Definition{hvlines} draw all the corresponding rules in the
+% block;\footnote{However, the rules are not drawn in the sub-blocks of the
+% block, as always with \pkg{nicematrix}: the rules are not drawn in the blocks
+% (cf. section~\ref{rules} p.~\pageref{rules}).}
+% \item the key \Definition{line-width} is the width of the rules (this key
% is meaningful only when one of the keys |draw|, |hvlines|, |vlines| and
% |hlines| is used);
-% \item the key |rounded-corners| requires rounded corners (for the frame drawn
-% by |draw| and the shape drawn by |fill|) with a radius equal to the value of
-% that key (the default value is 4~pt\footnote{This value is the initial value
-% of the \emph{rounded corners} of Tikz.});
-% \item when the key |tikz| is used, the Tikz path corresponding of the
-% rectangle which delimits the block is executed with Tikz\footnote{Tikz should
-% be loaded (by default, \pkg{nicematrix} only loads \textsc{pgf}) and, if it's
-% not, an error will be raised.} by using as options the value of that key
-% |tikz| (which must be a list of keys allowed for a Tikz path). For examples,
-% cf. p.~\pageref{tikz-key-examples};
-% \item the key |name| provides a name to the rectangular Tikz node
+% \item the key \Definition{rounded-corners} requires rounded corners (for the
+% frame drawn by |draw| and the shape drawn by |fill|) with a radius equal to
+% the value of that key (the default value is 4~pt\footnote{This value is the
+% initial value of the \emph{rounded corners} of Tikz.});
+% \item when the key \Definition{tikz} is used, the Tikz path corresponding of
+% the rectangle which delimits the block is executed with Tikz\footnote{Tikz
+% should be loaded (by default, \pkg{nicematrix} only loads \textsc{pgf}) and,
+% if it's not, an error will be raised.} by using as options the value of that
+% key |tikz| (which must be a list of keys allowed for a Tikz path). For
+% examples, cf. p.~\pageref{tikz-key-examples};
+% \item the key \Definition{name} provides a name to the rectangular Tikz node
% corresponding to the block; it's possible to use that name with Tikz in the
% |\CodeAfter| of the environment (cf.~p.~\pageref{code-after});
-% \item the key |respect-arraystretch| prevents the setting of |\arraystretch|
-% to $1$ at the beginning of the block (which is the behaviour by default) ;
-% \item the key |borders| provides the ability to draw only some borders of the
-% blocks; the value of that key is a (comma-separated) list of elements covered
-% by |left|, |right|, |top| and |bottom|; it's possible, in fact, in the list
-% which is the value of the key |borders|, to add an entry of the form
-% |tikz={|\textsl{list}|}| where \textsl{list} is a list of couples
+% \item the key \Definition{respect-arraystretch} prevents the setting of
+% |\arraystretch| to $1$ at the beginning of the block (which is the behaviour
+% by default) ;
+% \item the key \Definition{borders} provides the ability to draw only some
+% borders of the blocks; the value of that key is a (comma-separated) list of
+% elements covered by |left|, |right|, |top| and |bottom|; it's possible, in
+% fact, in the list which is the value of the key |borders|, to add an entry of
+% the form |tikz={|\textsl{list}|}| where \textsl{list} is a list of couples
% \textsl{key=value} of Tikz specifying the graphical characteristics of the
-% lines that will be drawn (for an example, see p.~\pageref{dashed}).
+% lines that will be drawn (for an example, see p.~\pageref{dashed}).
% \item \colorbox{yellow!50}{\textbf{Nouveau 6.15}}\par\nobreak
% By default, the rules are not drawn in the blocks (see the section about the
% rules: section~\ref{rules} p.~\pageref{rules}). However, if the key
-% |transparent| is used, the rules are drawn. For an example, see
+% \Definition{transparent} is used, the rules are drawn. For an example, see
% section~\ref{tikz-key-examples} on page~\pageref{tikz-key-examples}.
% \end{itemize}
%
@@ -1115,7 +1120,7 @@ version 2005/12/01 or later.
% also named |\arrayrulecolor|. The environments of \pkg{nicematrix} also
% provide a key |rules/color| to fix the color of the rules in the current
% environment. This key sets the value locally (whereas |\arrayrulecolor| acts
-% globally).
+% globally!).
%
% \medskip
% \begin{scope}
@@ -1231,7 +1236,9 @@ version 2005/12/01 or later.
%
% \bigskip
% The key |hvlines-except-borders| is similar to the key |hvlines| but does not
-% draw the rules on the horizontal and vertical borders of the array.
+% draw the rules on the horizontal and vertical borders of the array. For an
+% example of use of that key, see the part ``Use with tcolorbox`,
+% p.~\pageref{tcolorbox}.
%
% \subsubsection{The (empty) corners}
%
@@ -1645,13 +1652,20 @@ version 2005/12/01 or later.
%
% \begin{Verbatim}
% \begin{pNiceArray}{~textsl#preamble@}
-% ~emphase#\CodeBefore@
+% ~emphase#\CodeBefore [~textsl#options@]@
% ~textsl#instructions of the code-before@
% ~emphase#\Body@
% ~textsl#contents of the environment@
% \end{pNiceArray}
% \end{Verbatim}
%
+% \smallskip
+% The optional argument between square brackets is a list of \textsl{key=value}
+% pairs which will be presented progressively in this
+% documentation.\footnote{The available keys are |create-cell-nodes|,
+% |sub-matrix| (and its subkeys) and \texttt{delimiters-color}.}
+%
+% \medskip
% New commands are available in that |\CodeBefore|: |\cellcolor|,
% |\rectanglecolor|, |\rowcolor|, |\columncolor|, |\rowcolors|,
% |\rowlistcolors|, |\chessboardcolors| and |\arraycolor|.\footnote{Remark that,
@@ -2689,7 +2703,7 @@ version 2005/12/01 or later.
% \end{bNiceMatrix}$
%
% \bigskip
-% In the first column of this exemple, there are two instructions |\Vdots| but,
+% In the first column of this example, there are two instructions |\Vdots| but,
% of course, only one dotted line is drawn.
%
% \bigskip
@@ -3129,6 +3143,81 @@ version 2005/12/01 or later.
% \end{bNiceMatrix}$
%
%
+% \section{Delimiters in the preamble of the environnment}
+%
+% \label{delimiters-in-preamble}
+%
+% \colorbox{yellow!50}{\textbf{New 6.16}\enskip}
+% In the environments with preamble (|{NiceArray}|, |{pNiceArray}|, etc.), it's
+% possible to put vertical delimiters directly in the preamble of the
+% environnment.\footnote{This syntax is inspired by the extension \pkg{blkarray}.}
+%
+% \smallskip
+% The opening delimiters should be prefixed by the keyword |\left| and the
+% closing delimiters by the keyword |\right|. It's not mandatory to use
+% |\left| and |\right| pair-wise.
+%
+% \smallskip
+% All the vertical extensible delimiters of LaTeX are allowed.
+%
+% \medskip
+% Here is a example which uses the delimiters |\lgroup| and |\rgroup|.
+%
+% \smallskip
+% \begin{BVerbatim}
+% $\begin{NiceArray}{~emphase#\left\lgroup@ ccc~emphase#\right\rgroup@ l}
+% 1 & 2 & 3 &
+% 4 & 1 & 6 &
+% 7 & 8 & 9 & \scriptstyle L_3 \gets L_3 + L_1 + L_2
+% \end{NiceArray}$
+% \end{BVerbatim}
+%
+% \[\begin{NiceArray}{\left\lgroup ccc\right\rgroup l}
+% 1 & 2 & 3 & \\
+% 4 & 1 & 6 & \\
+% 7 & 8 & 9 & \scriptstyle L_3 \gets L_3 + L_1 + L_2
+% \end{NiceArray}\]
+%
+% \medskip
+% For this example, it would also have been possible to use the environnment
+% |{NiceArrayWithDelims}| (cf. the section \ref{NiceArrayWithDelims},
+% p.~\pageref{NiceArrayWithDelims}) and the key |last-col| (cf. p.~\pageref{exterior}).
+%
+% \bigskip
+% There is a particular case: for the delimiters |(|, |[| and |\{| (and the
+% corresponding closing delimiters), the prefixes |\left| et |\right| are
+% optional.\footnote{For the delimiters |[| and |]|, the prefixes remain mandatory
+% when there is a conflict of notation with the square brackets for the options
+% of some descriptors of columns.}
+%
+%
+%
+% \bigskip
+% When there are two successive delimiters (necessarily a closing one following by
+% an opening one for another submatrix), a space equal to |\enskip| is
+% automatically inserted.
+%
+% \medskip
+% \begin{BVerbatim}
+% $\begin{pNiceArray}{~emphase#(c)(c)(c)@}
+% a_{11} & a_{12} & a_{13} \\
+% a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
+% a_{31} & a_{32} & a_{33}
+% \end{pNiceArray}$
+% \end{BVerbatim}
+%
+% \[\begin{pNiceArray}{(c)(c)(c)}
+% a_{11} & a_{12} & a_{13} \\
+% a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
+% a_{31} & a_{32} & a_{33}
+% \end{pNiceArray}\]
+%
+%
+% \bigskip
+% For more complex constructions, in particular with delimiters spanning only a
+% \emph{subset} of the rows of the array, one should consider the command
+% |\SubMatrix| available in the |\CodeAfter|. See the section~\ref{sub-matrix},
+% p.~\pageref{sub-matrix}.
%
% \section{The \textbackslash CodeAfter}
%
@@ -3222,34 +3311,9 @@ version 2005/12/01 or later.
%
%
%
-% \bigskip
-% Despite its name, the command |\SubMatrix| may also be used within a
-% |{NiceTabular}|. Here is an example (which uses |\bottomrule| and
-% |\toprule| of \pkg{booktabs}).
-%
-% \begin{BVerbatim}[baseline=c]
-% \begin{NiceTabular}{~@{}ll~@{}}
-% \toprule
-% Part A & the first part \\
-% \Block{2-1}{Part B} & a first sub-part \\
-% & a second sub-part \\
-% \bottomrule
-% \CodeAfter
-% ~emphase#\SubMatrix{\{}{2-2}{3-2}{.}@
-% \end{NiceTabular}
-% \end{BVerbatim}
-% \hspace{2cm}
-% \begin{NiceTabular}{@{}ll@{}}
-% \toprule
-% Part A & the first part \\
-% \Block{2-1}{Part B} & a first sub-part \\
-% & a second sub-part \\
-% \bottomrule
-% \CodeAfter
-% \SubMatrix{\{}{2-2}{3-2}{.}
-% \end{NiceTabular}
%
-% \subsection{The command \textbackslash SubMatrix in the \textbackslash CodeAfter}
+% \subsection{The command \textbackslash SubMatrix in the \textbackslash
+% CodeAfter (and also the \textbackslash CodeBefore)}
%
% \label{sub-matrix}
%
@@ -3272,7 +3336,7 @@ version 2005/12/01 or later.
% |\SubMatrix[{2-2}{4-7}]|).}
% \end{itemize}
%
-% One should remark that the command |\SubMatrix| draws the delimiters after the
+% One should remark that the command |\SubMatrix| draws the delimiters \emph{after} the
% construction of the array: no space is inserted by the command |\SubMatrix|
% itself. That's why, in the following example, we have used the key |margin|
% and you have added by hand some space between the third and fourth column with
@@ -3302,6 +3366,29 @@ version 2005/12/01 or later.
% \SubMatrix({1-4}{3-4})
% \end{NiceArray}$
%
+% \medskip
+% Eventually, in this example, it would probably have been easier to put the
+% delimiters directly in the preamble of |{NiceArray}| (see
+% section~\ref{delimiters-in-preamble}, p.~\pageref{delimiters-in-preamble})
+% with the following construction.
+%
+% \medskip
+% \begin{scope}
+% \hfuzz=15cm
+% \begin{BVerbatim}[boxwidth=11cm,baseline=c]
+% $\begin{NiceArray}{~emphase#(ccc)(c)@}[cell-space-limits=2pt]
+% 1 & 1 & 1 & x \\
+% \dfrac{1}{4} & \dfrac{1}{2} & \dfrac{1}{4} & y \\
+% 1 & 2 & 3 & z
+% \end{NiceArray}$
+% \end{BVerbatim}
+% \end{scope}
+% $\begin{NiceArray}{(ccc)(c)}[cell-space-limits=2pt]
+% 1 & 1 & 1 & x \\
+% \dfrac{1}{4} & \dfrac{1}{2} & \dfrac{1}{4} & y \\
+% 1 & 2 & 3 & z
+% \end{NiceArray}$
+%
% \bigskip
% In fact, the command |\SubMatrix| also takes in two optional arguments
% specified by the traditional symbols |^| and |_| for material in superscript
@@ -3349,9 +3436,11 @@ version 2005/12/01 or later.
% the sub-matrix are drawn);
% \item |hlines| is similar to |vlines| but for the horizontal rules;
% \item |hvlines|, which must be used without value, draws all the vertical and
-% horizontal rules.
+% horizontal rules;
+% \item |code| insert code, especially TikZ code, after the construcion of the
+% submatrix. That key is detailed below.
% \end{itemize}
-% One should remark that these keys add their rules after the construction of
+% One should remark that the keys add their rules after the construction of
% the main matrix: no space is added between the rows and the columns of the
% array for theses rules.
%
@@ -3428,32 +3517,32 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% It's also possible to specify some delimiters\footnote{Those delimiters are
-% |(|, |[|, |\{| and the closing ones. Of course, it's also
-% possible to put \verb+|+ and \verb+||+ in the preamble of the environement.}
-% by placing them in the preamble of the environment (for the environments with
-% a preamble: |{NiceArray}|, |{pNiceArray}|, etc.). This syntax is inspired by
-% the extension \pkg{blkarray}.
-%
-% When there are two successive delimiters (necessarily a closing one following by
-% an opening one for another submatrix), a space equal to |\enskip| is
-% automatically inserted.
+% Despite its name, the command |\SubMatrix| may also be used within a
+% |{NiceTabular}|. Here is an example (which uses |\bottomrule| and
+% |\toprule| of \pkg{booktabs}).
%
% \medskip
-% \begin{BVerbatim}
-% $\begin{pNiceArray}{~emphase#(c)(c)(c)@}
-% a_{11} & a_{12} & a_{13} \\
-% a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
-% a_{31} & a_{32} & a_{33}
-% \end{pNiceArray}$
+% \begin{BVerbatim}[baseline=c]
+% \begin{NiceTabular}{~@{}ll~@{}}
+% \toprule
+% Part A & the first part \\
+% \Block{2-1}{Part B} & a first sub-part \\
+% & a second sub-part \\
+% \bottomrule
+% \CodeAfter
+% ~emphase#\SubMatrix{\{}{2-2}{3-2}{.}@
+% \end{NiceTabular}
% \end{BVerbatim}
-%
-% \[\begin{pNiceArray}{(c)(c)(c)}
-% a_{11} & a_{12} & a_{13} \\
-% a_{21} & \displaystyle \int_0^1\dfrac{1}{x^2+1}\,dx & a_{23} \\
-% a_{31} & a_{32} & a_{33}
-% \end{pNiceArray}\]
-%
+% \hspace{2cm}
+% \begin{NiceTabular}{@{}ll@{}}
+% \toprule
+% Part A & the first part \\
+% \Block{2-1}{Part B} & a first sub-part \\
+% & a second sub-part \\
+% \bottomrule
+% \CodeAfter
+% \SubMatrix{\{}{2-2}{3-2}{.}
+% \end{NiceTabular}
%
% \bigskip
% The command |\SubMatrix| is, in fact, also available in the |\CodeBefore|. By
@@ -3464,6 +3553,55 @@ version 2005/12/01 or later.
% For an example, see voir \ref{submatrix-in-codebefore}
% p.~\pageref{submatrix-in-codebefore}.
%
+%
+%
+% \vspace{1cm}
+% \colorbox{yellow!50}{\textbf{New 6.16}}\enskip The key |code| of the command
+% |\SubMatrix| allows the insertion of code after the construction of the
+% submatrix. It's meant to be used to insert TikZ instructions because, in the
+% TikZ instructions inserted by that code, the nodes of the form |i-j| and
+% \verb+i-|j+ are interpreted with |i| and |j| as numbers of row and columns
+% \emph{relative to the submatrix}.
+%
+% \medskip
+% \begin{scope}
+% \fvset{commandchars=\~\#\!}%
+% \begin{Verbatim}
+% $\begin{NiceArray}{ccc@{}w{c}{5mm}@{}ccc}
+% & & && -1 & 1 & 2 \\
+% & & && 0 & 3 & 4 \\
+% & & && 0 & 0 & 5 \\
+% 1 & 2 & 3 && -1 & 7 & 25 \\
+% 0 & 4 & 5 && 0 & 12 & 41 \\
+% 0 & 0 & 6 && 0 & 0 & 30
+% \CodeAfter
+% ~emphase#\NewDocumentCommand{\MyDraw}{}{\tikz \draw [blue] (2-|1) -| (3-|2) -| (4-|3) ;}!
+% \SubMatrix({1-5}{3-7})[~emphase#code = \MyDraw!]
+% \SubMatrix({4-1}{6-3})[~emphase#code = \MyDraw!]
+% \SubMatrix({4-5}{6-7})[~emphase#code = \MyDraw!]
+% \end{NiceArray}$
+% \end{Verbatim}
+% \end{scope}
+%
+%
+% \[\begin{NiceArray}{ccc@{}w{c}{5mm}@{}ccc}
+% & & && -1 & 1 & 2 \\
+% & & && 0 & 3 & 4 \\
+% & & && 0 & 0 & 5 \\
+% 1 & 2 & 3 && -1 & 7 & 25 \\
+% 0 & 4 & 5 && 0 & 12 & 41 \\
+% 0 & 0 & 6 && 0 & 0 & 30
+% \CodeAfter
+% \NewDocumentCommand{\MyDraw}{}{\tikz \draw [blue] (2-|1) -| (3-|2) -| (4-|3) ;}
+% \SubMatrix({1-5}{3-7})[code = \MyDraw ]
+% \SubMatrix({4-1}{6-3})[code = \MyDraw ]
+% \SubMatrix({4-5}{6-7})[code = \MyDraw ]
+% \end{NiceArray}\]
+%
+% \medskip
+% As we see, the drawing done by our command |\MyDraw| is \emph{relative} to the
+% submatrix to which it is applied.
+%
% \subsection{The commands \textbackslash OverBrace and \textbackslash
% UnderBrace in the \textbackslash CodeAfter}
%
@@ -3915,12 +4053,14 @@ version 2005/12/01 or later.
% \makeatother
% \end{Verbatim}
%
+% Nevertheless, the use of \pkg{threeparttable} in conjonction with
+% \pkg{nicematrix} seems rather point-less because of the functionalities
+% provided by \pkg{nicematrix}.
%
%
% \section{Other features}
%
-% \section{Autres fonctionnalités}
-%
+
% \subsection{Command \textbackslash ShowCellNames}
%
% The command |\ShowCellNames|, which may be used in the |\CodeBefore| and in
@@ -4102,7 +4242,6 @@ version 2005/12/01 or later.
% \end{bNiceArray}\]
%
%
-%
% \bigskip
% One should note that the environment |{NiceMatrix}| with the option |small| is
% not composed \emph{exactly} as the environment |{smallmatrix}|. Indeed, all
@@ -4119,6 +4258,13 @@ version 2005/12/01 or later.
% \item the characteristics of the dotted lines are also modified.
% \end{itemize}
%
+% \medskip
+% When the key |small| is in force, some functionalities of \pkg{nicematrix} are
+% no longer available: for example, it's no longer possible to put vertical
+% delimiters directly in the preamble of an environment with preamble (cf.
+% section \ref{delimiters-in-preamble}, p.~\pageref{delimiters-in-preamble}).
+%
+%
% \subsection{The counters iRow and jCol}
%
% \label{iRow}
@@ -4249,6 +4395,8 @@ version 2005/12/01 or later.
%
% \subsection{The environment \{NiceArrayWithDelims\}}
%
+% \label{NiceArrayWithDelims}
+%
% In fact, the environment |{pNiceArray}| and its variants are based upon a
% more general environment, called |{NiceArrayWithDelims}|. The first two
% mandatory arguments of this environment are the left and right delimiters used
@@ -5096,7 +5244,8 @@ version 2005/12/01 or later.
% \url{https://tex.stackexchange.com/questions/528975/error-loading-tikz-in-ieeeaccess-class}}
%
% \bigskip
-% In order to use \pkg{nicematrix} with the class \cls{aastex631}, you have to
+% In order to use \pkg{nicematrix} with the class \cls{aastex631}
+% (of the \emph{American Astronomical Society}), you have to
% add the following lines in the preamble of your document :
%
% \begin{Verbatim}
@@ -5106,8 +5255,9 @@ version 2005/12/01 or later.
% \end{Verbatim}
%
% \bigskip
-% In order to use \pkg{nicematrix} with the class \cls{sn-jnln}, \pkg{pgf} must
-% be loaded before the |\documentclass|:
+% In order to use \pkg{nicematrix} with the class \cls{sn-jnl} (of
+% \emph{Springer Nature}), \pkg{pgf} must
+% be loaded before the |\documentclass| with |\RequirePackage|:
%
% \begin{Verbatim}
% \RequirePackage{pgf}
@@ -5210,6 +5360,113 @@ version 2005/12/01 or later.
% \end{NiceTabular}
% \end{center}
%
+% \subsection{Use with tcolorbox}
+%
+% \label{tcolorbox}
+%
+% Here is an example of use of |{NiceTabular}| within a command |\tcbox| of
+% \pkg{tcolorbox}. We have used the key |hvlines-except-borders| in order all
+% the rules excepted on the borders (which are, of course, added by \pkg{tcolorbox})
+%
+% \medskip
+% \begin{BVerbatim}
+% \tcbset
+% {
+% colframe = blue!50!black ,
+% colback = white ,
+% colupper = red!50!black ,
+% fonttitle = \bfseries ,
+% nobeforeafter ,
+% center title
+% }
+%
+% \tcbox
+% [
+% left = 0mm ,
+% right = 0mm ,
+% top = 0mm ,
+% bottom = 0mm ,
+% boxsep = 0mm ,
+% toptitle = 0.5mm ,
+% bottomtitle = 0.5mm ,
+% title = My table
+% ]
+% {
+% \renewcommand{\arraystretch}{1.2}% <-- the % is mandatory here
+% \begin{NiceTabular}{rcl}[~emphase#hvlines-except-borders@,rules/color=blue!50!black]
+% \CodeBefore
+% \rowcolor{red!15}{1}
+% \Body
+% One & Two & Three \\
+% Men & Mice & Lions \\
+% Upper & Middle & Lower
+% \end{NiceTabular}
+% }
+% \end{BVerbatim}
+%
+% \medskip
+% \begin{center}
+% \tcbset
+% {
+% colframe = blue!50!black ,
+% colback = white ,
+% colupper = red!50!black ,
+% fonttitle = \bfseries ,
+% nobeforeafter ,
+% center title
+% }
+%
+% \tcbox
+% [
+% left = 0mm ,
+% right = 0mm ,
+% top = 0mm ,
+% bottom = 0mm ,
+% boxsep = 0mm ,
+% toptitle = 0.5mm ,
+% bottomtitle = 0.5mm ,
+% title = My table
+% ]
+% {
+% \renewcommand{\arraystretch}{1.2}\begin{NiceTabular}{rcl}[hvlines-except-borders,rules/color=blue!50!black]
+% \CodeBefore
+% \rowcolor{red!15}{1}
+% \Body
+% One & Two & Three \\
+% Men & Mice & Lions \\
+% Upper & Middle & Lower
+% \end{NiceTabular}
+% }
+% \end{center}
+%
+%
+%
+% \vspace{1cm}
+% That example shows the use of \pkg{nicematrix} in conjunction with
+% \pkg{tcolorbox}. If one wishes a tabular with an exterior frame with rounded
+% corners, it's not necessary to use \pkg{tcolorbox}: it's possible to use the
+% command |\Block| with the key |rounded-corners|.
+%
+% \medskip
+% \begin{BVerbatim}[baseline=c,boxwidth=10.5cm]
+% \begin{NiceTabular}{rcl}[hvlines-except-borders]
+% \Block[draw,transparent,~emphase#rounded-corners@]{*-*}{}
+% One & Two & Three \\
+% Men & Mice & Lions \\
+% Upper & Middle & Lower
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \begin{NiceTabular}{rcl}[hvlines-except-borders]
+% \Block[draw,transparent,rounded-corners]{*-*}{}
+% One & Two & Three \\
+% Men & Mice & Lions \\
+% Upper & Middle & Lower
+% \end{NiceTabular}
+%
+% \medskip
+% We have used the key |transparent| to have the rules specified by
+% |hvlines-except-borders| drawn in the blocks (by default, the rules are not
+% drawn in the blocks).
%
% \subsection{Notes in the tabulars}
%
@@ -6785,7 +7042,7 @@ version 2005/12/01 or later.
% \bigskip
% The following token list will contain the type of horizontal alignment of the
% current cell as provided by the corresponding column. The possible values are
-% |r|, |l|, |c|. For exemple, a column |p[l]{3cm}| will provide the value |l|
+% |r|, |l|, |c|. For example, a column |p[l]{3cm}| will provide the value |l|
% for all the cells of the column.
% \begin{macrocode}
\str_new:N \l_@@_hpos_cell_str
@@ -7056,6 +7313,11 @@ version 2005/12/01 or later.
\dim_new:N \l_@@_X_columns_dim
% \end{macrocode}
%
+% \medskip
+% \begin{macrocode}
+\bool_new:N \l_@@_X_V_bool
+% \end{macrocode}
+%
% \bigskip
% This boolean will be used only to detect in an expandable way whether we are
% at the beginning of the (potential) column zero, in order to raise an error if
@@ -10524,34 +10786,36 @@ version 2005/12/01 or later.
{
\str_case:nnF { #1 }
{
- c { \@@_patch_preamble_i:n #1 }
- l { \@@_patch_preamble_i:n #1 }
- r { \@@_patch_preamble_i:n #1 }
- > { \@@_patch_preamble_xiv:n }
- ! { \@@_patch_preamble_ii:nn #1 }
- @ { \@@_patch_preamble_ii:nn #1 }
- | { \@@_patch_preamble_iii:n #1 }
- p { \@@_patch_preamble_iv:n #1 }
- b { \@@_patch_preamble_iv:n #1 }
- m { \@@_patch_preamble_iv:n #1 }
+ c { \@@_patch_preamble_i:n #1 }
+ l { \@@_patch_preamble_i:n #1 }
+ r { \@@_patch_preamble_i:n #1 }
+ > { \@@_patch_preamble_xiv:n }
+ ! { \@@_patch_preamble_ii:nn #1 }
+ @ { \@@_patch_preamble_ii:nn #1 }
+ | { \@@_patch_preamble_iii:n #1 }
+ p { \@@_patch_preamble_iv:n #1 }
+ b { \@@_patch_preamble_iv:n #1 }
+ m { \@@_patch_preamble_iv:n #1 }
\@@_V: { \@@_patch_preamble_v:n }
- V { \@@_patch_preamble_v:n }
- \@@_w: { \@@_patch_preamble_vi:nnnn { } #1 }
- \@@_W: { \@@_patch_preamble_vi:nnnn { \@@_special_W: } #1 }
- \@@_S: { \@@_patch_preamble_vii:n }
- ( { \@@_patch_preamble_viii:nn #1 }
- [ { \@@_patch_preamble_viii:nn #1 }
- \{ { \@@_patch_preamble_viii:nn #1 }
- ) { \@@_patch_preamble_ix:nn #1 }
- ] { \@@_patch_preamble_ix:nn #1 }
- \} { \@@_patch_preamble_ix:nn #1 }
- X { \@@_patch_preamble_x:n }
+ V { \@@_patch_preamble_v:n }
+ \@@_w: { \@@_patch_preamble_vi:nnnn { } #1 }
+ \@@_W: { \@@_patch_preamble_vi:nnnn { \@@_special_W: } #1 }
+ \@@_S: { \@@_patch_preamble_vii:n }
+ ( { \@@_patch_preamble_viii:nn #1 }
+ [ { \@@_patch_preamble_viii:nn #1 }
+ \{ { \@@_patch_preamble_viii:nn #1 }
+ \left { \@@_patch_preamble_viii:nn }
+ ) { \@@_patch_preamble_ix:nn #1 }
+ ] { \@@_patch_preamble_ix:nn #1 }
+ \} { \@@_patch_preamble_ix:nn #1 }
+ \right { \@@_patch_preamble_ix:nn }
+ X { \@@_patch_preamble_x:n }
% \end{macrocode}
% When \pkg{tabularx} is loaded, a local redefinition of the specifier |X| is
% done to replace |X| by |\@@_X|. Thus, our column type |X| will be used in the
% |{NiceTabularX}|.
% \begin{macrocode}
- \@@_X { \@@_patch_preamble_x:n }
+ \@@_X { \@@_patch_preamble_x:n }
\q_stop { }
}
{
@@ -11173,7 +11437,7 @@ version 2005/12/01 or later.
{
\tl_gput_right:Nx \g_@@_pre_code_after_tl
{ \@@_delimiter:nnn #1 { \int_eval:n { \c@jCol + 1 } } \c_true_bool }
- \tl_if_in:nnTF { ( [ \{ ) ] \} } { #2 }
+ \tl_if_in:nnTF { ( [ \{ ) ] \} \left \right } { #2 }
{
\@@_error:nn { delimiter~after~opening } { #2 }
\@@_patch_preamble:n
@@ -11183,7 +11447,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% For |)|, |]| and |\}|. We have two arguments for the following command because
+% For the closing delimiters. We have two arguments for the following command because
% we directly read the following letter in the preamble (we have to see whether
% we have a opening delimiter following and we also have to see whether we are
% at the end of the preamble because, in that case, our letter must be
@@ -11208,7 +11472,7 @@ version 2005/12/01 or later.
}
}
{
- \tl_if_in:nnT { ( [ \{ } { #2 }
+ \tl_if_in:nnT { ( [ \{ \left } { #2 }
{ \tl_gput_right:Nn \g_@@_preamble_tl { ! { \enskip } } }
\tl_gput_right:Nx \g_@@_pre_code_after_tl
{ \@@_delimiter:nnn #1 { \int_use:N \c@jCol } \c_false_bool }
@@ -11273,7 +11537,10 @@ version 2005/12/01 or later.
% of keys will be used to retrieve that value (in the counter |\l_@@_weight_int|).
% \begin{macrocode}
\keys_define:nn { WithArrows / X-column }
- { unknown .code:n = \int_set:Nn \l_@@_weight_int { \l_keys_key_str } }
+ {
+ v .bool_set:N = \l_@@_X_V_bool ,
+ unknown .code:n = \int_set:Nn \l_@@_weight_int { \l_keys_key_str }
+ }
% \end{macrocode}
%
%
@@ -11300,14 +11567,14 @@ version 2005/12/01 or later.
% initial value is $1$). The user may specify a different value (such as $2$,
% $3$, etc.) by putting that value in the optional argument of the specifier.
% The weights of the |X| columns are used in the computation of the actual width
-% of those columns as in \pkg{tabu} of \pkg{tabularray}.
+% of those columns as in \pkg{tabu} (now obsolete) or \pkg{tabularray}.
% \begin{macrocode}
\int_zero_new:N \l_@@_weight_int
\int_set:Nn \l_@@_weight_int { 1 }
\tl_set:Nn \l_tmpa_tl { #1 }
\tl_replace_all:Nnn \l_tmpa_tl { \@@_S: } { S }
- \@@_keys_p_column:V \l_tmpa_tl
- % \keys_set_known:nnN { WithArrows / p-column } { #1 } \l_tmpa_tl
+ \@@_keys_p_column:V \l_tmpa_tl
+ \bool_set_false:N \l_@@_X_V_bool
\keys_set:nV { WithArrows / X-column } \l_tmpa_tl
\int_compare:nNnT \l_@@_weight_int < 0
{
@@ -11323,9 +11590,14 @@ version 2005/12/01 or later.
% \begin{macrocode}
\bool_if:NTF \l_@@_X_columns_aux_bool
{
+ \exp_args:Nnx
\@@_patch_preamble_iv_iv:nn
{ \l_@@_weight_int \l_@@_X_columns_dim }
- { minipage }
+ {
+ \bool_if:NTF \l_@@_X_V_bool
+ { varwidth }
+ { minipage }
+ }
}
{
\tl_gput_right:Nn \g_@@_preamble_tl
@@ -11334,6 +11606,14 @@ version 2005/12/01 or later.
\@@_cell_begin:w
\bool_set_true:N \l_@@_X_column_bool
% \end{macrocode}
+% You encounter a problem on 2023-03-04: for an environment with |X| columns,
+% during the first compilations (which are not the definitive one), sometimes,
+% some cells are declared empty even if they should not. That's a problem
+% because user's instructions may use these nodes. That's why we have added the
+% following |\NotEmpty|.
+% \begin{macrocode}
+ \NotEmpty
+% \end{macrocode}
% The following code will nullify the box of the cell.
% \begin{macrocode}
\tl_gput_right:Nn \g_@@_cell_after_hook_tl
@@ -21400,6 +21680,7 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
last-col,~
last-row,~
left-margin,~
@@ -21455,6 +21736,7 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
last-col,~
last-row,~
left-margin,~
@@ -21516,6 +21798,7 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
l,~
last-col,~
last-row,~
@@ -21575,6 +21858,7 @@ version 2005/12/01 or later.
first-row,~
hlines,~
hvlines,~
+ hvlines-except-borders,~
label,~
last-col,~
last-row,~
@@ -21641,6 +21925,13 @@ version 2005/12/01 or later.
% \nolinkurl{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/nicematrix.sty}
% }
%
+% \subsection*{Changes between version 6.15 and 6.16}
+%
+% It's now possible to put any LaTeX extensible delimiter (|\lgroup|, |\langle|,
+% etc.) in the preamble of an environment with pramble (such as |{NiceArray}|)
+% by prefixing them by |\left| and |\right|.
+%
+% New key |code| for the command |\SubMatrix| in the |\CodeAfter|.
%
% \subsection*{Changes between version 6.14 and 6.15}
%
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index 0f91df0b72..f9c9e28bb7 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/pythonimmediate/README b/macros/latex/contrib/pythonimmediate/README
index be4026bf43..43c413e62c 100644
--- a/macros/latex/contrib/pythonimmediate/README
+++ b/macros/latex/contrib/pythonimmediate/README
@@ -1,10 +1,9 @@
pythonimmediate -- Library to run Python code
- \fileinfo.
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt
-Report bugs at https://github.com/user202729/TeXlib
+Report bugs at https://github.com/user202729/pythonimmediate-tex
========
@@ -21,4 +20,4 @@ This work has the LPPL maintenance status `maintained'.
The Current Maintainer of this work is user202729.
-This work consists of the files pythonimmediate.sty.
+This work consists of the files pythonimmediate.sty, pythonimmediate_helper.lua.
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf b/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf
index c9bf716c59..5b8bf34442 100644
--- a/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate.pdf
Binary files differ
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate.sty b/macros/latex/contrib/pythonimmediate/pythonimmediate.sty
index 5a92dd88a6..4556973831 100644
--- a/macros/latex/contrib/pythonimmediate/pythonimmediate.sty
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate.sty
@@ -12,7 +12,7 @@
%
% The Current Maintainer of this work is user202729.
-\ProvidesExplPackage{pythonimmediate}{2023/01/09}{0.1.0}{Library to run Python code}
+\ProvidesExplPackage{pythonimmediate}{2023/03/07}{0.4.0}{Library to run Python code}
\RequirePackage{saveenv}
\RequirePackage{currfile}
@@ -44,9 +44,9 @@
% e.g. \__begingroup_setup_estr: \exp_args:NNx \endgroup \__function:n {⟨text⟩}
% will eventually execute to \__function:n {⟨estr-expansion of text⟩}
-\str_set:Nn \_pythonimmediate_args{--mode=multiprocessing-network}
-\str_set:Nn \_pythonimmediate_python_executable{python3}
-\str_set:Nn \_pythonimmediate_python_flags{}
+\str_gset:Nn \_pythonimmediate_args{}
+\str_gset:Nn \_pythonimmediate_python_executable{python3}
+\str_gset:Nn \_pythonimmediate_python_flags{}
\keys_define:nn{pythonimmediate}{
args.tl_gset:N =\_pythonimmediate_args,
python-executable.tl_gset:N=\_pythonimmediate_python_executable,
@@ -61,8 +61,9 @@
\str_gset:Nx \_pythonimmediate_python_flags { \_pythonimmediate_python_flags }
\endgroup
-\msg_new:nnn {pythonimmediate} {shell-fail} {Please~enable~unrestricted~shell~scape!}
-\msg_new:nnn {pythonimmediate} {cannot-read-line} {Cannot~read~line!}
+\msg_new:nnn {pythonimmediate} {shell-fail} {Please~enable~unrestricted~shell~escape!}
+\msg_new:nnn {pythonimmediate} {process-start-error} {Cannot~start~Python~process!~
+ Make~sure~package~options~are~correct~and~the~Python~package~is~installed.}
\msg_new:nnn {pythonimmediate} {internal-error} {Internal~error!}
\sys_if_shell_unrestricted:F {
@@ -96,21 +97,52 @@
% ======== setup write file ========
-\newwrite \_pythonimmediate_write_file
+\cs_new_protected:Npn \_pythonimmediate_send_content:e #1 {
+ \immediate\write \_pythonimmediate_write_file { #1 }
+}
+
+\cs_new_protected:Npn \_pythonimmediate_close_write: {
+ \immediate\closeout \_pythonimmediate_write_file
+ % safeguard, in some mode e.g. nonstopmode after a Python error TeX might continue
+ \cs_gset_eq:Nc \_pythonimmediate_write_file {m@ne}
+ \cs_gset_protected:Npn \_pythonimmediate_send_content:e ##1 {}
+}
+
\bool_if:NTF \_pythonimmediate_child_process {
+ \newwrite \_pythonimmediate_write_file
%\immediate\openout \_pythonimmediate_write_file=symlink-to-stderr.txt~
% tried this method, it seems to work except that it's buffered when stderr is redirected to a file...
\immediate\openout \_pythonimmediate_write_file=|"\_pythonimmediate_python_executable \space \_pythonimmediate_python_flags \space -m ~ pythonimmediate.copy_to_stderr"~
+
+
} {
- \immediate\openout \_pythonimmediate_write_file=|"\_pythonimmediate_python_executable \space \_pythonimmediate_python_flags \space -m ~ pythonimmediate.textopy"~
- % note that openout, even to shell, will append .tex if there's no dot in the command
- % so we artificially add a dot here in `.textopy`
+
+ \sys_if_engine_luatex:TF {
+ % use lua's io.popen
+ % the other method works as well, but this one allows explicit flushing because on some TeX distribution it does not work
+
+ \directlua{
+ (require "pythonimmediate_helper")(
+ "\luaescapestring{ \_pythonimmediate_python_executable \space \_pythonimmediate_python_flags \space -m ~ pythonimmediate.textopy ~ \_pythonimmediate_args }"
+ )
+ }
+ } {
+ \newwrite \_pythonimmediate_write_file
+
+ \immediate\openout \_pythonimmediate_write_file=|"\_pythonimmediate_python_executable \space \_pythonimmediate_python_flags \space -m ~ pythonimmediate.textopy ~ \_pythonimmediate_args"~
+ % note that openout, even to shell, will append .tex if there's no dot in the command
+ % so we artificially add a dot here in `.textopy`
+ }
+ % the command-line arguments passed to textopy above are only used initially before establishing a connection
+ % after connection is made then the configuration object is sent over
+
+
% both processes must be before the \readline below so that the 2 Python processes are started "in parallel"
\_pythonimmediate_str_get:N \_pythonimmediate_line % read one line from pytotex half, forward to textopy half
\str_if_eq:VnT \_pythonimmediate_line {} {
- \msg_error:nn {pythonimmediate} {cannot-read-line}
+ \msg_error:nn {pythonimmediate} {process-start-error}
}
\str_const:Nn \_pythonimmediate_engine_mark_pdftex {p}
@@ -120,7 +152,7 @@
\str_const:Nn \_pythonimmediate_engine_mark_xetex {x}
\str_const:Nn \_pythonimmediate_engine_mark_luatex {l}
- \immediate\write\_pythonimmediate_write_file {
+ \_pythonimmediate_send_content:e {
\use:c {_pythonimmediate_engine_mark_ \c_sys_engine_str}
\_pythonimmediate_line
}
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate.tex b/macros/latex/contrib/pythonimmediate/pythonimmediate.tex
index eacffa24f6..539a770fc2 100644
--- a/macros/latex/contrib/pythonimmediate/pythonimmediate.tex
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate.tex
@@ -1,4 +1,4 @@
-\ProvidesFile{pythonimmediate.tex}[2023/01/09 0.1.0 Library to run Python code]
+\ProvidesFile{pythonimmediate.tex}[2023/03/07 0.4.0 Library to run Python code]
\RequirePackage{fvextra}
\documentclass{l3doc}
\usepackage{tikz}
@@ -32,10 +32,6 @@
\maketitle
-\begin{abstract}
- \fileinfo.
-\end{abstract}
-
\section{Motivation}
Just like \pkg{Perl\TeX} or \pkg{PyLua\TeX} (and unlike \pkg{Python\TeX} or \pkg{lt3luabridge}),
@@ -57,7 +53,7 @@ In addition to the \LaTeX\ package, you need the Python \pkg{pythonimmediate-tex
installation instruction can be found at \url{https://pypi.org/project/pythonimmediate-tex/}.
Note that not all \TeX\ package versions are compatible with all Python package versions.
-This \TeX\ package is compatible with Python package version |0.1.2|.
+This \TeX\ package is compatible with Python package version |0.4.0|.
Remember to enable unrestricted\footnote{
There's little point in supporting restricted mode, since it's possible to execute arbitrary shell commands in Python anyway.
@@ -80,9 +76,10 @@ Instruction:
\item \file{saveenv.sty}
\item \file{precattl.sty}
\item \file{pythonimmediate.sty}
- \item \file{pythonimmediate-tex-0.1.2.zip}
+ \item \file{pythonimmediate_helper.lua}
+ \item \file{pythonimmediate-tex-0.4.0.zip}
\end{itemize}
- The |0.1.2| part should be replaced with the desired version
+ The |0.4.0| part should be replaced with the desired version
of the Python package.
The |.sty| files can be downloaded from CTAN at
@@ -97,9 +94,9 @@ Instruction:
\item Write the following in the preamble:
\begin{verbatim}
\usepackage[abspath]{currfile}
-\usepackage[python-executable={PYTHONPATH=pythonimmediate-tex-0.1.2.zip/pythonimmediate-tex-0.1.2/ python3},args={--mode=unnamed-pipe}]{pythonimmediate}
+\usepackage[python-executable={PYTHONPATH=pythonimmediate-tex-0.4.0.zip/pythonimmediate-tex-0.4.0/ python3},args={--mode=unnamed-pipe}]{pythonimmediate}
\end{verbatim}
-As above, replace both occurrences of |0.1.2| with the downloaded version specified in the zip file above.
+As above, replace both occurrences of |0.4.0| with the downloaded version specified in the zip file above.
Refer to \ref{troubleshoot-source-file-not-found} for explanation of the |abspath| option.
\end{itemize}
diff --git a/macros/latex/contrib/pythonimmediate/pythonimmediate_helper.lua b/macros/latex/contrib/pythonimmediate/pythonimmediate_helper.lua
new file mode 100644
index 0000000000..8590233242
--- /dev/null
+++ b/macros/latex/contrib/pythonimmediate/pythonimmediate_helper.lua
@@ -0,0 +1,20 @@
+return function(cmd)
+ local process = io.popen(cmd, "w")
+
+ local function_table=lua.get_functions_table()
+
+ -- https://tex.stackexchange.com/questions/632408/how-can-i-exclude-tex-macros-when-counting-a-strings-characters-in-lua/632464?noredirect=1#comment1623008_632464 this only work in Lua 5.3 or assume it's allocated sequentially
+ local send_content_index=#function_table+1
+ function_table[send_content_index]=function()
+ process:write(token.scan_string())
+ process:write("\n")
+ process:flush()
+ end
+
+ local close_index=#function_table+1
+ function_table[close_index]=function()
+ process:close()
+ end
+
+ tex.print([[\protected \luadef \_pythonimmediate_send_content:e ]] .. send_content_index .. [[\protected \luadef \_pythonimmediate_close_write: ]] .. close_index .. [[\relax]])
+ end
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index fd324960da..7b3f9c74a6 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.98d
-Packagedate: 2023/02/15
+Packageversion: 0.98e
+Packagedate: 2023/03/07
Author: Ulrike Fischer
## License
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 012321bba5..9c947ca0b3 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-02-15} {0.98d}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-03-07} {0.98e}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98d", --TAGVERSION
- date = "2023-02-15", --TAGDATE
+ version = "0.98e", --TAGVERSION
+ date = "2023-03-07", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index 6219d00192..2eba24c889 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -295,7 +295,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-03-07} {0.98e}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -493,7 +493,7 @@
% and breaks the structure.
% \begin{macrocode}
\msg_new:nnnn { tag } {para-hook-count-wrong}
- {The~number~of~automatic~begin~(#1)~and~end~(#2)~para~hooks~differ!}
+ {The~number~of~automatic~begin~(#1)~and~end~(#2)~#3~para~hooks~differ!}
{This~quite~probably~a~coding~error~and~the~structure~will~be~wrong!}
%</package>
% \end{macrocode}
@@ -950,6 +950,10 @@
{
Struct~end~#1~[\msg_line_context:]
}
+\msg_new:nnn { tag / debug } {struct-end-wrong}
+ {
+ Struct~end~'#1'~doesn't~fit~start~'#2'~[\msg_line_context:]
+ }
\cs_new_protected:Npn \@@_debug_struct_begin_insert:n #1
{
@@ -981,6 +985,24 @@
\msg_note:nnn { tag / debug } {struct-end } {ignored}
}
}
+\cs_new_protected:Npn \@@_debug_struct_end_check:n #1
+ {
+ \int_compare:nNnT { \l_@@_loglevel_int } > {0}
+ {
+ \seq_get:NNT \g_@@_struct_tag_stack_seq \l_@@_tmpa_tl
+ {
+ \str_if_eq:eeF
+ {#1}
+ {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl}
+ {
+ \msg_warning:nnxx { tag/debug }{ struct-end-wrong }
+ {#1}
+ {\exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl}
+ }
+ }
+ }
+ }
+
% \end{macrocode}
% \begin{macrocode}
%</debug>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index d3c692b9d0..9d2b42fe9c 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index 89b6d09d26..77c08c1602 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -60,7 +60,7 @@
% It lists the new tag, the rolemap and the namespace of the rolemap.
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-03-07} {0.98e}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -69,15 +69,21 @@ subsection, H2, pdf2,
subsubsection,H3, pdf2,
paragraph, H4, pdf2,
subparagraph, H5, pdf2,
+list, L, pdf2,
itemize, L, pdf2,
enumerate, L, pdf2,
description, L, pdf2,
+quote, BlockQuote,pdf,
+quotation, BlockQuote,pdf,
+verbatim, Div, pdf2,
item, LI, pdf2,
itemlabel, Lbl, pdf2,
itembody, LBody, pdf2,
footnote, FENote, pdf2,
footnotemark, Lbl, pdf2,
footnotelabel,Lbl, pdf2,
+text-unit, Part, pdf2,
+text, P, pdf2,
%</ns-latex>
% \end{macrocode}
% \section{The LaTeX-book namespace}
@@ -86,7 +92,7 @@ footnotelabel,Lbl, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-03-07} {0.98e}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -102,7 +108,7 @@ subparagraph, H6,pdf2,
% It is bound to change a lot!
% \begin{macrocode}
%<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-03-07} {0.98e}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
@@ -116,7 +122,7 @@ P, Span, pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-03-07} {0.98e}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -184,7 +190,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-03-07} {0.98e}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
@@ -240,7 +246,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-03-07} {0.98e}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,,,
and,,,
@@ -475,7 +481,7 @@ xor,,,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-03-07} {0.98e}
,,,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,∅,∅
@@ -530,7 +536,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} {2023-02-15} {0.98d}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-03-07} {0.98e}
,,,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/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index 8061a5d18d..e2973a593b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-03-07} {0.98e}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-03-07} {0.98e}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index 1b03011ddf..8e006f6c5b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{implementation}
% The code is splitted into three parts: code shared by all engines,
@@ -86,7 +86,7 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-03-07} {0.98e}
{tagpdf - mc code only for the luamode }
%</luamode>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index ba5516dc4c..300eb1ee3b 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-03-07} {0.98e}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index 8557552f9a..07598ca148 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-03-07} {0.98e}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index ffb891fdc5..bbcb91bff1 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-space-code} {2023-03-07} {0.98e}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index c488ad823d..796ecf34e4 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -46,17 +46,22 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
-% \begin{function}{\tag_struct_begin:n,\tag_struct_end:}
+% \begin{function}{\tag_struct_begin:n,\tag_struct_end:,\tag_struct_end:n}
% \begin{syntax}
% \cs{tag_struct_begin:n}\Arg{key-values}\\
-% \cs{tag_struct_end:}
+% \cs{tag_struct_end:}\\
+% \cs{tag_struct_end:n}\Arg{tag}
% \end{syntax}
% These commands start and end a new structure.
% They don't start a group. They set all their values globally.
+% \cs{tag_struct_end:n} does nothing special normally (apart from
+% swallowing its argument, but if \texttt{tagpdf-debug} is loaded,
+% it will check if the \Arg{tag} (after expansion)
+% is identical to the current structure on the stack. The tag is not role mapped!
% \end{function}
% \begin{function}{\tag_struct_use:n}
% \begin{syntax}
@@ -242,7 +247,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-03-07} {0.98e}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -416,7 +421,9 @@
% to reference them in a Ref. The key is the destination.
% It is currently used by the toc-tagging and sec-tagging code.
% \begin{macrocode}
-\prop_new:N \g_@@_struct_dest_num_prop
+%</package>
+%<base>\prop_new:N \g_@@_struct_dest_num_prop
+%<*package>
% \end{macrocode}
% \end{variable}
%
@@ -1251,6 +1258,7 @@
% \begin{macrocode}
%<base>\cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c@g_@@_struct_abs_int}
%<base>\cs_new_protected:Npn \tag_struct_end:{}
+%<base>\cs_new_protected:Npn \tag_struct_end:n{}
%<*package|debug>
%<package>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
%<debug>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
@@ -1398,6 +1406,12 @@
}
%<debug>{\@@_debug_struct_end_ignore:}
}
+
+\cs_set_protected:Npn \tag_struct_end:n #1
+ {
+%<debug>\@@_debug_struct_end_check:n{#1}
+ \tag_struct_end:
+ }
%</package|debug>
% \end{macrocode}
% \end{macro}
@@ -1552,7 +1566,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-03-07} {0.98e}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index c757e9e54d..c682386fc2 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-03-07} {0.98e}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 01de768a15..5b1534be04 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98d, released 2023-02-15}
+% \date{Version 0.98e, released 2023-03-07}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -250,7 +250,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-user} {2023-03-07} {0.98e}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -554,7 +554,7 @@
{ \cs_if_exist_p:N \pdf_activate_structure_destination: }
}
{
- \tl_set:Nn \l_pdf_current_structure_destination_tl { __tag/struct/\g__tag_struct_stack_current_tl }
+ \tl_set:Nn \l_pdf_current_structure_destination_tl { __tag/struct/\g_@@_struct_stack_current_tl }
\pdf_activate_structure_destination:
}
}
@@ -580,17 +580,34 @@
% Probably one should add some checks if we are already in a paragraph.
%
%
-% \begin{macro}{\l_@@_para_bool,\l_@@_para_show_bool,\g_@@_para_int,\l_@@_para_tag_default_tl}
+% \begin{macro}{
+% \l_@@_para_bool,
+% \l_@@_para_flattened_bool,
+% \l_@@_para_show_bool,
+% \g_@@_para_begin_int,
+% \g_@@_para_end_int,
+% \g_@@_para_main_begin_int,
+% \g_@@_para_main_end_int,
+% \l_@@_para_tag_default_tl,
+% \l_@@_para_tag_tl,
+% \l_@@_para_main_tag_tl}
% At first some variables.
% \begin{macrocode}
\bool_new:N \l_@@_para_bool
+%</package>
+%<base>\bool_new:N \l_@@_para_flattened_bool
+%<*package>
\bool_new:N \l_@@_para_show_bool
\int_new:N \g_@@_para_begin_int
\int_new:N \g_@@_para_end_int
+\int_new:N \g_@@_para_main_begin_int
+\int_new:N \g_@@_para_main_end_int
\tl_new:N \l_@@_para_tag_default_tl
-\tl_set:Nn \l_@@_para_tag_default_tl { P }
+\tl_set:Nn \l_@@_para_tag_default_tl { text }
\tl_new:N \l_@@_para_tag_tl
\tl_set:Nn \l_@@_para_tag_tl { \l_@@_para_tag_default_tl }
+\tl_new:N \l_@@_para_main_tag_tl
+\tl_set:Nn \l_@@_para_main_tag_tl {text-unit}
% \end{macrocode}
% \end{macro}
%
@@ -601,6 +618,8 @@
% paratagging-show (setup-key),
% paratag (setup-key),
% paratag (tool-key),
+% unittag (tool-key),
+% para-flattened (tool-key),
% }
% These keys enable/disable locally paratagging, and the debug modus.
% It can affect the typesetting if |paratagging-show| is used. The small numbers
@@ -615,7 +634,9 @@
}
\keys_define:nn { tag / tool}
{
- paratag .tl_set:N = \l_@@_para_tag_tl
+ paratag .tl_set:N = \l_@@_para_tag_tl,
+ unittag .tl_set:N = \l_@@_para_main_tag_tl,
+ para-flattened .bool_set:N = \l_@@_para_flattened_bool
}
% \end{macrocode}
% \end{macro}
@@ -647,6 +668,14 @@
{
\bool_if:NT \l_@@_para_bool
{
+ \bool_if:NF \l_@@_para_flattened_bool
+ {
+ \int_gincr:N \g_@@_para_main_begin_int
+ \tag_struct_begin:n
+ {
+ tag=\l_@@_para_main_tag_tl,
+ }
+ }
\int_gincr:N \g_@@_para_begin_int
\tag_struct_begin:n {tag=\l_@@_para_tag_tl}
\@@_check_para_begin_show:nn {green}{}
@@ -661,17 +690,32 @@
\tag_mc_end:
\@@_check_para_end_show:nn {red}{}
\tag_struct_end:
+ \bool_if:NF \l_@@_para_flattened_bool
+ {
+ \int_gincr:N \g_@@_para_main_end_int
+ \tag_struct_end:
+ }
}
}
\AddToHook{enddocument/info}
{
- \int_compare:nNnF {\g__tag_para_begin_int}={\g__tag_para_end_int}
+ \int_compare:nNnF {\g_@@_para_main_begin_int}={\g_@@_para_main_end_int}
+ {
+ \msg_error:nnxxx
+ {tag}
+ {para-hook-count-wrong}
+ {\int_use:N\g_@@_para_main_begin_int}
+ {\int_use:N\g_@@_para_main_end_int}
+ {text-unit}
+ }
+ \int_compare:nNnF {\g_@@_para_begin_int}={\g_@@_para_end_int}
{
- \msg_error:nnxx
+ \msg_error:nnxxx
{tag}
{para-hook-count-wrong}
- {\int_use:N\g__tag_para_begin_int}
- {\int_use:N\g__tag_para_end_int}
+ {\int_use:N\g_@@_para_begin_int}
+ {\int_use:N\g_@@_para_end_int}
+ {text}
}
}
% \end{macrocode}
@@ -720,7 +764,8 @@
\renewcommand\tagpdfparaOff{\bool_set_false:N \l_@@_para_bool}
\keys_define:nn { tag / tool}
{
- para .bool_set:N = \l_@@_para_bool
+ para .bool_set:N = \l_@@_para_bool,
+ para-flattened .bool_set:N = \l_@@_para_flattened_bool,
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index 67a3e411d4..ab81e9573a 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -92,7 +92,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf} {2023-03-07} {0.98e}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -118,7 +118,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdf-debug} {2023-03-07} {0.98e}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -136,12 +136,21 @@
\prop_gput:Nnn \g_msg_module_name_prop { tag / debug }{tagpdf~DEBUG}
%</debug>
% \end{macrocode}
+%\section{base package}
+% To avoid to have to test everywhere if tagpdf has been loaded and is active,
+% we define a base package with dummy functions
+% \begin{macrocode}
+%<*base>
+\ProvidesExplPackage {tagpdf-base} {2023-03-07} {0.98e}
+ {part of tagpdf - provide base, no-op versions of the user commands }
+%</base>
+% \end{macrocode}
%\section{Package options}
% There are only two options to switch for luatex between generic and luamode,
% TODO try to get rid of them.
% \begin{macrocode}
%<*package>
-\bool_new:N\g_@@_mode_lua_bool
+\bool_new:N\g_@@_mode_lua_bool
\DeclareOption {luamode} { \sys_if_engine_luatex:T { \bool_gset_true:N \g_@@_mode_lua_bool } }
\DeclareOption {genericmode}{ \bool_gset_false:N\g_@@_mode_lua_bool }
\ExecuteOptions{luamode}
@@ -157,12 +166,6 @@
\RequirePackage{tagpdf-base}
%</package>
% \end{macrocode}
-% \begin{macrocode}
-%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-02-15} {0.98d}
- {part of tagpdf - provide base, no-op versions of the user commands }
-%</base>
-% \end{macrocode}
% The no-op version should behave a near enough to the real code as
% possible, so we define a command which a special in the relevant backends:
% \begin{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index 8266cfc1b3..3ae1de58e9 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index 364fcce88f..2fe592b0b5 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -10,13 +10,13 @@
\DocumentMetadata
{
% comment the following line to compile an untagged documentation:
- testphase=phase-II,testphase=toc-tagging,testphase=sec-tagging,
- pdfversion=2.0,lang=en-UK,pdfstandard=a-2b
+ testphase=phase-III,
+ pdfversion=2.0,lang=en-UK,pdfstandard=a-4,
}
-
+\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.98d}
-\def\UlrikeFischer@package@date{2023-02-15}
+\def\UlrikeFischer@package@version{0.98e}
+\def\UlrikeFischer@package@date{2023-03-07}
\makeatother
\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
@@ -52,8 +52,6 @@
\tikzset{operator/.style = {font=\footnotesize\ttfamily, anchor=base,draw, rounded corners,node distance=4mm and 4mm}}
-\usepackage{enumitem}
-
\usepackage{listings}
\lstset{basicstyle=\ttfamily, columns=fullflexible,language=[LaTeX]TeX,
escapechar=*,
@@ -486,6 +484,23 @@ added. The ID of a structure can be retrieved with |\tag_get:n|
see~\ref{sec:retrieve}.
+\subsection{Changes in version 0.98d}
+The main change is from now on every structure has an ID and an IDtree is
+added. The ID of a structure can be retrieved with |\tag_get:n|
+see~\ref{sec:retrieve}.
+
+
+\subsection{Changes in version 0.98e}
+
+\begin{itemize}
+\item The main change is that the automatic paratagging uses now a two-level structure. This accompanies development
+in the LaTeX github inthe \texttt{latex-lab} package regarding the tagging of blocks like lists or verbatim.
+See~\ref{sec:paratagging} and also \texttt{latex-lab-block-tagging.dtx} for more background.
+
+\item The command |tag_struct_end:n| has been add to improve debugging.
+\end{itemize}
+
+
\subsection{Proof of concept: the tagging of the documentation itself}
Starting with version 0.6 the documentation itself has been tagged. The
@@ -549,7 +564,7 @@ Various parts of the code differentiate between \PDF{} version 2.0 and lower ver
\PDF{} 2.0 is wanted it is required to set the version early in the \cs{DocumentMetadata}
command so that \pkg{tagpdf} can pick up the correct code path.
-\begin{lstlisting}
+\begin{taglstlisting}
\DocumentMetadata
{
% testphase = phase-I, % tagging without paragraph tagging
@@ -560,7 +575,7 @@ command so that \pkg{tagpdf} can pick up the correct code path.
\begin{document}
some text
\end{document}
-\end{lstlisting}
+\end{taglstlisting}
\minisec{Activation needed!}
@@ -635,15 +650,15 @@ Boolean, initially false. Activates the code related to trees. Should be used on
Boolean.\sidenote{luamode}
That's a debug option, it helps in lua mode to see where space glyph will be inserted if \PrintKeyName{interwordspace} is activated.
-\item[\PrintKeyName{paratagging}] Boolean. This activate/deactivates the automatic tagging of paragraphs.
+\item[\PrintKeyName{paratagging}] Boolean. This activate/deactivates the automatic tagging of paragraphs, see
+ \ref{sec:paratagging} for more background.
It uses the \texttt{para/begin} and \texttt{para/end} hooks of the newest \LaTeX{} version (2021-05-01).
- This is a first try to use this hooks, and the code is bound to change. Paragraphs can appear in many unexpected
- places and the code can easily break, so there is also an option to see where such paragraphs are:
+ With more tagging support conditions will be added, that means the code is bound to change! Paragraphs can appear in many unexpected places and the code can easily break, so there is also an option to see where such paragraphs are:
-\item[\PrintKeyName{paratagging-show}] Boolean. This activate/deactivates small red numbers in the places where the paratagging hook code is used.
-
-\item[\PrintKeyName{paratag}] String. This key changes the tag used by the paratagging code. The default tag is \texttt{P}. A useful local setting here can be \texttt{NonStruct}, which creates a structure \enquote{without meaning}.
+\item[\PrintKeyName{paratagging-show}] Boolean. This activate/deactivates small red and green numbers in the places where the paratagging hook code is used.
+\item[\PrintKeyName{paratag}] String. This key changes the second tag used by the paratagging code. The default tag is \texttt{text}, a \LaTeX{} specific tag that is role mapped to \texttt{P}. A useful local setting here can be \texttt{NonStruct}, which creates a structure \enquote{without meaning}. For local changes it is recommended
+ to use the newer \cs{tagtool} command described below instead of \cs{tagpdfsetup}.
\item[\PrintKeyName{tabsorder}]
Choice key, possible values are \PrintKeyName{row}, \PrintKeyName{column}, \PrintKeyName{structure}, \PrintKeyName{none}. This decides if a \verb+/Tabs+ value is written to the dictionary of the page objects. Not really needed for tagging itself, but one of the things you probably need for accessibility checks. So I added it. Currently the tabsorder is the same for all pages. Perhaps this should be changed \ldots.
@@ -667,7 +682,11 @@ arguments are supported
\begin{description}
\item[\PrintKeyName{para}] Boolean. It will replace the \cs{tagpdfparaOn} and \cs{tagpdfparaOff} command.
-\item[\PrintKeyName{paratag}] String. It allows to change the tag used in the following automatically tagged paragraphs.
+\item[\PrintKeyName{unittag}] String. It allows to change the outer tag used in the following automatically tagged paragraphs. The setting is local.
+\item[\PrintKeyName{paratag}] String. It allows to change the inner tag used in the following automatically tagged paragraphs. The setting is local.
+\item[\PrintKeyName{para-flattened}] Boolean. If set it will suppress the outer structure in the automatic paratagging.
+This should be applied to the start and end hook in the same way! The setting is local.
+
\end{description}
@@ -677,7 +696,7 @@ arguments are supported
pdf is a page orientated graphic format. It simply puts ink and glyphs at various coordinates on a page. A simple stream of a page can look like this\footnote{The appendix contains some remarks about the syntax of a \PDF{} file}:
-\begin{lstlisting}[columns=fixed]
+\begin{taglstlisting}[columns=fixed]
stream
BT
/F27 14.3462 Tf %select font
@@ -690,7 +709,7 @@ stream
[(1)]TJ %print text
ET
endstream
-\end{lstlisting}
+\end{taglstlisting}
From this stream one can extract the characters and their placement on the page
@@ -835,11 +854,11 @@ called \enquote{marked content}. The three main variants needed here are:
complain.
-\begin{lstlisting}
+\begin{taglstlisting}
/Artifact BMC
text to be marked
/EMC
-\end{lstlisting}
+\end{taglstlisting}
@@ -852,11 +871,11 @@ called \enquote{marked content}. The three main variants needed here are:
in header and footer can e.g. be declared as pagination like this:
-\begin{lstlisting}
+\begin{taglstlisting}
/Artifact <</Type /Pagination>> BDC
text to be marked
/EMC
-\end{lstlisting}
+\end{taglstlisting}
@@ -876,11 +895,11 @@ data can be stored. \emph{Required} is an \texttt{/MCID}-key which takes an
integer as a value:
-\begin{lstlisting}
+\begin{taglstlisting}
/H1 <</MCID 3>> BDC
text to be marked
/EMC
-\end{lstlisting}
+\end{taglstlisting}
This integer is used to identify the chunk when building the structure
@@ -898,11 +917,11 @@ title, alternative text or a local language setting.
The needed markers can be added with low level code e.g. like this (in pdftex syntax):
-\begin{lstlisting}
+\begin{taglstlisting}
\pdfliteral page {/H1 <</MCID 3>> BDC}%
text to be marked
\pdfliteral page {EMC}%
-\end{lstlisting}
+\end{taglstlisting}
This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
@@ -915,11 +934,11 @@ This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
section could end on the previous page:
-\begin{lstlisting}
+\begin{taglstlisting}
\pdfliteral page {/H1 <</MCID 3>> BDC} %problem: possible pagebreak here
\section{mysection}
\pdfliteral page {EMC}%
-\end{lstlisting}
+\end{taglstlisting}
Using the literals \emph{inside} the section argument is better, but then
@@ -1076,10 +1095,10 @@ The key-val list understands the following keys:
That means that you can do something like in the following listing
and it will insert \verb+\frac{a}{b}+ (hex encoded) in the \PDF{}.
- \begin{lstlisting}
+ \begin{taglstlisting}
\newcommand\myalttext{\frac{a}{b}}
\tagmcbegin{tag=P,alt=\myalttext}
- \end{lstlisting}
+ \end{taglstlisting}
@@ -1095,10 +1114,10 @@ The key-val list understands the following keys:
and it will insert \verb+X+ (hex encoded) in the \PDF{}.
- \begin{lstlisting}
+ \begin{taglstlisting}
\newcommand\myactualtext{X}
\tagmcbegin{tag=Span,actualtext=\myactualtext}
- \end{lstlisting}
+ \end{taglstlisting}
According to the PDF reference, \texttt{/ActualText} should only be used
on marked content sequence of type Span. This is not enforced by the code
@@ -1131,9 +1150,9 @@ the command, as the effect of the begin command ends with a new
%Consider a code like this:
%
%
-%\begin{lstlisting}
+%\begin{taglstlisting}
%\tagmcbegin{tag=P} Block 1 {\tagmcbegin{tag=P} Block 2} Block 3 \tagmcend
-%\end{lstlisting}
+%\end{taglstlisting}
%
%
%Block 3 will here get the same id number as Block 1 and be stored in the structure \emph{before} Block 2. The \PDF{} will record the chunks in the order \texttt{Block 1 -- Block 3 -- Block 2}. See also section~\ref{sec:global-local}.
@@ -1193,7 +1212,7 @@ This had the advantage that the attributes didn't spill over in area where they
But it had the disadvantage that it was difficult for an inner structure to correctly interrupt the outer
mc-chunk if it can't control the group level. For example this didn't work due to the grouping inserted by the user:
-\begin{lstlisting}
+\begin{taglstlisting}
\tagstructbegin{tag=P}
\tagmcbegin{tag=P}
Start paragraph
@@ -1209,7 +1228,7 @@ mc-chunk if it can't control the group level. For example this didn't work due t
Continuation of paragraph
\tagmcend
\tagstructend
-\end{lstlisting}
+\end{taglstlisting}
The reading order was then wrong, and the \emph{emphasized text} moved in the structure at the end.
@@ -1217,7 +1236,7 @@ So starting with version 0.9 this has been reverted. The attribute is now global
This solves the \enquote{interruption} problem, but has its price: Material inserted by the output routine
must be properly guarded. For example
-\begin{lstlisting}
+\begin{taglstlisting}
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{uncompress}
\documentclass{article}
@@ -1232,7 +1251,7 @@ must be properly guarded. For example
\tagmcbegin{tag=P}Page 1\newpage Page 2\tagmcend
\tagstructend
\end{document}
-\end{lstlisting}
+\end{taglstlisting}
Here the header and the background code on the \emph{first} page will be marked up as paragraph
and added as chunk to the document structure. The header and the background code on
@@ -1317,7 +1336,7 @@ automatic tagging, the value \texttt{pagination} add additionally an \texttt{/Ar
If some additional markup (or even a structure) is wanted, something like this should be used (here with
the syntax of the \pkg{fancyhdr} package) to close the open mc-chunk and restart if after the content:
-\begin{lstlisting}
+\begin{taglstlisting}
\ExplSyntaxOn
\cfoot{\leavevmode
\tag_mc_end_push:
@@ -1326,7 +1345,7 @@ the syntax of the \pkg{fancyhdr} package) to close the open mc-chunk and restart
\tagmcend
\tag_mc_begin_pop:n{artifact}}
\ExplSyntaxOff
-\end{lstlisting}
+\end{taglstlisting}
\subsubsection{Links and other annotations}\label{sec:link+annot}
@@ -1364,7 +1383,7 @@ the \pkg{l3pdffield-testphase} package will be handle by this package.
The following listing shows low-level to create link where the two commands are used:
-\begin{lstlisting}
+\begin{taglstlisting}
\pdfextension startlink
attr
{
@@ -1382,7 +1401,7 @@ The following listing shows low-level to create link where the two commands are
This is a link.
\pdfextension endlink
\tag_struct_insert_annot:xx {\pdfannot_link_ref_last:}{\tag_struct_parent_int:}
-\end{lstlisting}
+\end{taglstlisting}
@@ -1394,13 +1413,13 @@ Math is a problem. I have seen an example where \emph{every single symbol} has b
The \PDF{} then looked like this
-\begin{lstlisting}
+\begin{taglstlisting}
/mn <</MCID 6 /ActualText<FEFF0034>/Alt( : open bracket: four )>>BDC
...
/mn <</MCID 7 /ActualText<FEFF0033>/Alt( third s )>>BDC
...
/mo <</MCID 8 /ActualText<FEFF2062>/Alt( times )>>BDC
-\end{lstlisting}
+\end{taglstlisting}
If this is really the way to go one would need some script to add the mark-up as doing it manually is too much work and would make the source unreadable -- at least with pdflatex and the generic mode. In lua mode is it possible to hook into the \texttt{mlist\_to\_hlist} callback and add marker automatically. Some first implementation is done by Marcel Krüger in the luamml project.
@@ -1421,7 +1440,7 @@ So with pdflatex in generic mode one until now had to do the splitting manually.
The example \texttt{mc-manual-para-split} demonstrates how this can be done. The general idea was to use \verb+\vadjust+ in the right place:
-\begin{lstlisting}
+\begin{taglstlisting}
\tagmcbegin{tag=P}
...
fringilla, ligula wisi commodo felis, ut adipiscing felis dui in
@@ -1430,7 +1449,7 @@ enim. Suspendisse malesuada ultrices ante.% page break
Pellentesque scelerisque
...
sit amet, lacus.\tagmcend
-\end{lstlisting}
+\end{taglstlisting}
Starting with version 0.92 there is code which tries to resolve this problem. Basically it works like this: every mc-command
issues a mark command (actually two slightly different). When the page is built in the output routine this mark commands are inspected
@@ -1451,20 +1470,70 @@ rerun.
\subsubsection{Automatic tagging of paragraphs}\label{sec:paratagging}
-\begin{docCommand}[nosep]{tagpdfparaOn}{}\end{docCommand}
-\begin{docCommand}{tagpdfparaOff}{}\end{docCommand}
-
Another feature that emerged from the \LaTeX{} tagged PDF project are hooks at the begin and end of paragraphs.
-\pkg{tagpdf} makes use of these hooks to tag paragraphs. This can be activated/deactivated (also locally) with
-options of \cs{tagpdfsetup} or with the two commands above.
+\pkg{tagpdf} makes use of these hooks to tag paragraphs. In the first version it added only one structure, but this proved to be not adequate:
+
+Paragraphs in \LaTeX{} can be nested, e.g., you can have a paragraph
+containing a display quote, which in turn consists of more than one
+(sub)paragraph, followed by some more text which all belongs to the
+same outer paragraph.
+
+In the \PDF{} model and in the HTML model that is not supported: the rules
+in \PDF{} specification do not allow \texttt{P}-structures to be nested --- a
+limitation that conflicts with real live, given that such
+constructs are quite normal in spoken and written language.
+
+The approach we take (starting with march 2023, version 0.98e)
+to resolve this is to model such \enquote{big}
+paragraphs with a structure named \texttt{text-unit} and use \texttt{P} (under the name \texttt{text})
+only for (portions of) the actual paragraph text in a way that the
+\texttt{P}s are not nested. As a result we have for a simple
+paragraph two structures:
+
+\begin{taglstlisting}
+<text-unit>
+ <P>
+ The paragraph text ...
+ </P>
+</text-unit
+\end{taglstlisting}
+
+ In the case of an element, such as a display quote or a display list
+ inside the paragraph, we then have
+\begin{taglstlisting}
+<text-unit>
+ <text>
+ The paragraph text before the display element ...
+ </text>
+ <display element structure>
+ Content of the display structure possibly involving inner <text-unit> tags
+ </display element structure>
+ <text>
+ ... continuing the outer paragraph text
+ </text>
+</text-unit>
+\end{taglstlisting}
+
+In other words such a display block is always embedded in a
+|<text-unit>| structure, possibly preceded by a |<text>|\ldots|</text>| block
+and possibly followed by one, though both such blocks are optional.
+More information about this can be found in the documentation of \texttt{latex-lab-block-tagging}.
+
+As a consequence \pkg{tagpdf} now adds two structures if paratagging is activated. The new code
+to tag display blocks extends this code to handle the nesting of lists and other display structures.
The automatic tagging require that for every begin of a paragraph with the begin hook code
there a corresponding end with the closing hook code. This can fail, e.g if a |vbox| doesn't correctly issue a |\par| at the end.
-If this happens the tagging structure can get every confused. At the end of the document \pkg{tagpdf} checks if
-the number of start and end paragraph structures created here are equal and it will error if not.
+If this happens the tagging structure can get very confused. At the end of the document \pkg{tagpdf} checks if
+the number of outer and inner start and end paragraph structures created with the automatic paratagging code
+are equal and it will error if not.
+
+The automatic tagging of paragraphs can be deactivated completely or only the outer level with the |\tagtool| keys
+|para| and |para-flattened| or with the (now deprecated) commands |\tagpdfparaOn| and |\tagpdfparaOff|.
-Nesting the activation and deactivation of the tagging of paragraphs can be quite difficult. For example if it is unclear if the inner code issues a |\par| or not it is not trivial to exclude an end hook for every excluded begin hook.
-In such cases it can be easier to use the new |paratag| key with the value |NonStruct| to convert some |P|-structures
+
+Nesting the activation and deactivation of the tagging of paragraphs can be quite difficult. For example if it is unclear if the inner code issues a |\par| or not it is not trivial to exclude an end hook for every excluded begin hook.
+In such cases it can be easier to use the |paratag| key with the value |NonStruct| to convert some |P|-structures
into |NonStruct|-structures without real meaning.
\subsection{Task 2: Marking the structure}
@@ -1482,12 +1551,12 @@ The structure is represented in the \PDF{} with a number of objects of type \tex
The tree should reflect the \emph{semantic} meaning of the text. That means that the text should be marked as section, list, table head, table cell and so on. A number of standard structure types is predefined, see section \ref{sec:new-tag} but it is allowed to create more. If you want to use types of your own you must declare them. E.g. this declares two new types \texttt{TAB} and {FIG} and bases them on \texttt{P}:
-\begin{lstlisting}
+\begin{taglstlisting}
\tagpdfsetup{
add-new-tag = TAB/P,
add-new-tag = FIG/P,
}
-\end{lstlisting}
+\end{taglstlisting}
@@ -1499,12 +1568,12 @@ The sectioning units can be structured in two ways: a flat, html-like and a more
The flat version creates a structure like this:
-\begin{lstlisting}
+\begin{taglstlisting}
<H1>section header</H1>
<P> text</P>
<H2>subsection header</H2>
...
-\end{lstlisting}
+\end{taglstlisting}
So here the headings are marked according their level with \texttt{H1}, \texttt{H2}, etc.
@@ -1512,7 +1581,7 @@ So here the headings are marked according their level with \texttt{H1}, \texttt{
In the xml-like tree the complete text of a sectioning unit is surrounded with the \texttt{Sect} tag, and all headers with the tag \texttt{H}. Here the nesting defines the level of a sectioning heading.
-\begin{lstlisting}
+\begin{taglstlisting}
<Sect>
<H>section heading</H>
<P> text</p>
@@ -1521,7 +1590,7 @@ In the xml-like tree the complete text of a sectioning unit is surrounded with t
...
</Sect>
</Sect>
-\end{lstlisting}
+\end{taglstlisting}
The flat version is more \LaTeX-like and it is rather straightforward to patch \verb+\chapter+, \verb+\section+ and so on to insert the appropriates \texttt{H\ldots} start and end markers. The xml-like tree is more difficult to automate. If such a tree is wanted I would recommend to use -- like the context format -- explicit commands to start and end a sectioning unit.
@@ -1570,10 +1639,10 @@ The key-val list understands the following keys:
This key inserts an \texttt{/Alt} value in the dictionary of structure object, see section~\ref{sec:alt}. The value is handled as verbatim string and hex encoded. The value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like this:
- \begin{lstlisting}
+ \begin{taglstlisting}
\newcommand\myalttext{\frac{a}{b}}
\tagstructbegin{tag=P,alt=\myalttext}
- \end{lstlisting}
+ \end{taglstlisting}
@@ -1584,10 +1653,10 @@ The key-val list understands the following keys:
\item[\PrintKeyName{actualtext}]
This key inserts an \texttt{/ActualText} value in the dictionary of structure object, see section~\ref{sec:alt}. The value is handled as verbatim string, The value will be expanded first once (so works like the key \texttt{alttext-o} in previous versions which has been removed). That means that you can do something like this:
- \begin{lstlisting}
+ \begin{taglstlisting}
\newcommand\myactualtext{X}
\tagstructbegin{tag=P,actualtext=\myactualtext}
- \end{lstlisting}
+ \end{taglstlisting}
@@ -1597,9 +1666,9 @@ The key-val list understands the following keys:
\item[\PrintKeyName{attribute}]
This key takes as argument a comma list of attribute names (use braces to protect the commas from the external key-val parser) and allows to add one or more attribute dictionary entries in the structure object. As an example
- \begin{lstlisting}
+ \begin{taglstlisting}
\tagstructbegin{tag=TH,attribute= TH-row}
- \end{lstlisting}
+ \end{taglstlisting}
See also section~\ref{sec:attributes}.
@@ -1607,9 +1676,9 @@ The key-val list understands the following keys:
This key takes as argument a comma list of attribute names (use braces to protect the commas from the external key-val parser) and allows to add them as attribute classes to the structure object. As an example
- \begin{lstlisting}
+ \begin{taglstlisting}
\tagstructbegin{tag=TH,attribute-class= TH-row}
- \end{lstlisting}
+ \end{taglstlisting}
See also section~\ref{sec:attributes}.
@@ -1626,13 +1695,13 @@ The key-val list understands the following keys:
\verb+\pdf_object_ref:n+ from a current \texttt{l3kernel}.
For example:
- \begin{lstlisting}
+ \begin{taglstlisting}
\group_begin:
\pdfdict_put:nnn {l_pdffile/Filespec} {AFRelationship}{/Supplement}
\pdffile_embed_file:nnn{example-input-file.tex}{}{tag/AFtest}
\group_end:
\tagstructbegin{tag=P,AF=tag/AFtest}
- \end{lstlisting}
+ \end{taglstlisting}
As shown, the wanted AFRelationship can be set
by filling the dictionary with the value. The mime type
@@ -1651,14 +1720,14 @@ The key-val list understands the following keys:
This key allows to embed an associated file with inline content. The value is some text,
which is embedded in the PDF as a text file with mime type text/plain.
- \begin{lstlisting}
+ \begin{taglstlisting}
\tagstructbegin{tag=P,AFinline=Some extra text}
- \end{lstlisting}
+ \end{taglstlisting}
\item[\PrintKeyName{AFinline-o}]
- This is like verb+AFinline+, but it expands the value once.
+ This is like \verb+AFinline+, but it expands the value once.
-\item[\PrintKeyName{texsource}] This is like verb+AFinline-o+, but it
+\item[\PrintKeyName{texsource}] This is like \verb+AFinline-o+, but it
creates a tex-file, with mime type \texttt{application/x-tex} and the
AFRelationship \texttt{Source}.
@@ -1706,9 +1775,9 @@ Structure Element can have so-called attributes. A single attribute is a diction
with at least the required key \verb+/O+ (for \enquote{Owner} which describes the scope the attribute applies too.
As an example here an attribute that can be attached to tabular header (type TH) and adds the info that the header is a column header:
-\begin{lstlisting}
+\begin{taglstlisting}
<</O /Table /Scope /Column>>
-\end{lstlisting}
+\end{taglstlisting}
One or more such attributes can be attached to a structure element. It is also possible to store such an attribute under a symbolic name in a so-called \enquote{ClassedMap} and then to attach references to such classes to a structure.
@@ -1718,7 +1787,7 @@ The name should be a sensible key name, it is converted to a pdf name with
-\begin{lstlisting}
+\begin{taglstlisting}
\tagpdfsetup
{
newattribute =
@@ -1726,7 +1795,7 @@ The name should be a sensible key name, it is converted to a pdf name with
newattribute =
{TH-row}{/O /Table /Scope /Row},
}
-\end{lstlisting}
+\end{taglstlisting}
@@ -1742,12 +1811,12 @@ Attributes can then be used with the key \PrintKeyName{attribute} or \PrintKeyNa
-\begin{lstlisting}
+\begin{taglstlisting}
\tagstructbegin{tag=TH,
attribute-class= {TH-row,TH-col},
attribute = {TH-row,TH-col},
}
-\end{lstlisting}
+\end{taglstlisting}
@@ -1766,7 +1835,7 @@ This will hopefully write all the needed objects and values to the \PDF{}. (Besi
The following shows the marking needed for a section, a sentence and a list with two items. It is obvious that one wouldn't like to have to do this for real documents. If tagging should be usable, the commands must be hidden as much as possible inside suitable \LaTeX\ commands and enviroments.
-\begin{lstlisting}
+\begin{taglstlisting}
\begin{document}
\tagstructbegin{tag=Document}
@@ -1814,7 +1883,7 @@ The following shows the marking needed for a section, a sentence and a list with
\tagstructend %Sect
\tagstructend %Document
\end{document}
-\end{lstlisting}
+\end{taglstlisting}
\subsection{Interrupting the tagging}
@@ -1842,7 +1911,7 @@ only restarts if the corresponding |tag_stop:n| actually
stopped something. This is meant for a situation like the following,
where you don't want that the inner |\tag_start:n| restarts tagging.
-\begin{lstlisting}
+\begin{taglstlisting}
\tag_stop:n{outer}
...
\tag_stop:n{inner}
@@ -1850,7 +1919,7 @@ where you don't want that the inner |\tag_start:n| restarts tagging.
\tag_start:n{inner}
...
\tag_start:n{outer}
-\end{lstlisting}
+\end{taglstlisting}
\subsection{Lazy and automatic tagging}\label{sec:lazy}
@@ -1868,11 +1937,11 @@ This means that even if you don't care about a proper structure you should try t
As mentioned above the mc-markers should not be nested. Basically you write:
-\begin{lstlisting}
+\begin{taglstlisting}
\tagmcbegin{..}some text ...\tagmcend
<optional structure commands>
\tagmcbegin{..}some other text\tagmcend
-\end{lstlisting}
+\end{taglstlisting}
This is quite workable as long as you mark everything manually. But when defining commands you have to ensure that they correctly push and pop the mc-chunks where needed.
@@ -1912,9 +1981,9 @@ a known set of standard types or are \enquote{role mapped} to such a standard ty
So instead of |H1| the type |section| could be used. The role mapping can then be declared
with the |add-new-tag| key:
-\begin{lstlisting}
+\begin{taglstlisting}
\tagpdfsetup{add-new-tag = section/H1}
-\end{lstlisting}
+\end{taglstlisting}
In PDF 2.0 the situation is a bit more complicated. At first PDF~2.0 introduced \emph{name spaces}.
That means that a type can have more than one \enquote{meaning} depending on the name space it belongs to.
@@ -1990,10 +2059,10 @@ syntax |section/H1| should in most cases do the right thing.
\item[unknown key] An unknown key is interpreted as a |tag/role|, this preserves the old syntax. So this two calls are equivalent:
- \begin{lstlisting}
+ \begin{taglstlisting}
\tagpdfsetup{add-new-tag = section/H1}
\tagpdfsetup{add-new-tag = {tag=section,role=H1}}
- \end{lstlisting}
+ \end{taglstlisting}
\end{description}
@@ -2035,13 +2104,13 @@ will only be visible if the log-level is increased.
Typical messages will look then like this
-\begin{lstlisting}[mathescape]
+\begin{taglstlisting}[mathescape]
Package tagpdf Info: The rule between parent 'Sect (from Sect/pdf2)'
(tagpdf) and child 'H10 (from H10/pdf2)' is '1 (0..n)'
Package tagpdf Info: The rule between parent 'H2 (from subsection/latex)'
(tagpdf) and child 'H1 (from section/latex)' is '-1 ($\emptyset$)'
-\end{lstlisting}
+\end{taglstlisting}
The descriptions of the parent and childs are rather verbose as the checks have to take role mapping and name spaces into account. The result of a check is a number---negative if the relation is not allowed,
positive if allowed. The text in the parentheses show the symbols used in the \PDF-matrix.
@@ -2133,11 +2202,10 @@ A tagged \PDF{} is needed for accessibility but this is not enough. As already m
\item The language must be declared by adding a \texttt{/Lang xx-XX} to the \PDF{} catalog or -- if the language changes for a part of the text to the structure or the marked content. Setting the document language can be rather easily done with existing packages. With the new \PDF{} resource management it should be done with \verb+\pdfmanagement_add:nnn{Catalog}{Lang}{(en-US)}+. For settings in marked content and structure I will have to add keys.
\item All characters must have an unicode representation or a suitable alternative text.
With lualatex and open type (unicode) fonts this is normally not a problem. With pdflatex it could need
-
- \begin{verbatim}
+ \begin{taglstlisting}
\input{glyphtounicode}
\pdfgentounicode=1
- \end{verbatim}
+ \end{taglstlisting}
and perhaps some\verb+\pdfglyphtounicode+ commands.
\item Hard and soft hyphen must be distinct.
@@ -2322,7 +2390,7 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
Dictionaries can be written all in one line:\\ \texttt{<</Type/Page/Contents 3 0 R/Resources 1 0 R/Parent 5 0 R>>}\\
but at least for examples a layout with line breaks and indentation is more readable:
- \begin{lstlisting}
+ \begin{taglstlisting}
<<
/Type /Page
/Contents 3 0 R
@@ -2330,7 +2398,7 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
/MediaBox [0 0 595.276 841.89]
/Parent 5 0 R
>>
- \end{lstlisting}
+ \end{taglstlisting}
@@ -2342,7 +2410,7 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
Here an example of a stream, an object definition and reference. In the object 2 (a page object) the \texttt{/Contents} key references the object 3 and this then contains the text of the page in a stream. \texttt{Tf}, \texttt{Tm} and \texttt{TJ} are (postfix) operators, the first chooses the font with the name \texttt{/F15} at the size 10.9, the second displaces the reference point on the page and the third inserts the text.
- \begin{lstlisting}
+ \begin{taglstlisting}
% a page object (shortened)
2 0 obj
<<
@@ -2362,13 +2430,13 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
ET
endstream
endobj
- \end{lstlisting}
+ \end{taglstlisting}
In such a stream the \texttt{BT}--\texttt{ET} pair encloses texts while drawing and graphics are outside of such pairs.
\item[Number tree] This is a more complex data structure that is meant to index objects by numbers. In the core is an array with number-value pairs. A simple version of number tree which has the keys 0 and 3 is
-\begin{lstlisting}
+\begin{taglstlisting}
6 0 obj
<<
/Nums [
@@ -2377,7 +2445,7 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
]
>>
endobj
-\end{lstlisting}
+\end{taglstlisting}
This maps 0 to an array and 2 to the object reference \texttt{21 0 R}. Number trees can be split over various nodes -- root, intermediate and leaf nodes. We will need such a tree for the \emph{parent tree}.
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index df9d084a39..2501381ded 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,9 +1,9 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-02-15} {0.98d}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-03-07} {0.98e}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
-%vLogos
+%Logos
\ExplSyntaxOn
\DeclareRobustCommand\TeX{
@@ -48,7 +48,7 @@
\AddToHook{cmd/emph/after}
{\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
-
+% minisec, correct tagging is still unclear.
\newcommand\minisec[1]{%
\if@noskipsec \leavevmode \fi
\par
@@ -66,75 +66,34 @@
\@afterheading
}
-
+% listings. Unclear how to make it work for the original lstlisting, so we make a
+% copy taglstlisting for now
+\DeclareInstance{blockenv}{lstlisting}{display}
+{
+ env-name = lstlisting,
+ tag-name = verbatim,
+ tag-class = ,
+ tagging-recipe = standard,
+ inner-level-counter = ,
+ level-increase = false,
+ setup-code = ,
+ block-instance = displayblock ,
+ inner-instance = ,
+ final-code = \tl_set:Nn \l__tag_para_main_tag_tl {codeline}\tagtool{paratag=Code},
+}
+
+\lstnewenvironment{taglstlisting}[2][]{%
+ \UseInstance{blockenv}{lstlisting} {}
+ \lst@TestEOLChar{#2}%
+ \lstset{#1}%
+ \csname\@lst @SetFirstNumber\endcsname%
+ }{%
+ \@nobreakfalse
+ \csname\@lst @SaveFirstNumber\endcsname%
+ \endblockenv
+ }
-%%%%
-%% Lists
-%% patches enumitem internals!
-%%%%
-\tagpdfsetup
- {
- newattribute =
- {itemize}{/O /List /ListNumbering/Unordered},
- newattribute =
- {enumerate}{/O /List /ListNumbering/Ordered},
- newattribute =
- {description}{/O /List /ListNumbering/Description},
- }
-\AddToHook{env/itemize/begin}{\par\tagstructbegin{tag=L,attribute-class=itemize}}%\par is needed to close the paragraph before.
-\AddToHook{env/itemize/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
-\AddToHook{env/enumerate/begin}{\par\tagstructbegin{tag=L,attribute-class=enumerate}}
-\AddToHook{env/enumerate/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
-\AddToHook{env/description/begin}{\par\tagstructbegin{tag=L,attribute-class=description}}
-\AddToHook{env/description/end}{\par\tagstructend\tagstructend\tagstructend}%LBody,LI,L
-
-\newcommand\tag@enit@format@preset[1]{%
- \str_if_eq:eeTF { \prop_item:cn { g__tag_struct_\g__tag_struct_stack_current_tl _prop }{S} }{/L}
- {
- %\typeout{BEGIN~OF~LIST}
- }
- {%\typeout{NEXT ITEM}
- \tagstructend\tagstructend} % for the LBody/LI
- \tagstructbegin{tag=LI}
- \tagstructbegin{tag=Lbl}
- \tagmcbegin{}
- #1
- \tagmcend
- \tagstructend
- \tagstructbegin{tag=LBody}
- }
-
-\ExplSyntaxOff
-\xpatchcmd\enit@preset{\@firstofone}{\tag@enit@format@preset}{}{\fail}
-%close mc from paratagging and reopen ...
-% this disturbs someone docCommand which has then a MC outside a P.
-\xpatchcmd\@item{\box\@labels}{\tagmcend \box\@labels \tagmcbegin{tag=P}}{}{\fail}
-\ExplSyntaxOn
-
-% keys that overwrite \enit@format must be patched, eg like the follow
-% the font key should be patched in a similar way
-\enitkv@key{}{format}{% new enumitem don't use first argument
- \def\enit@format{%
- \tagstructbegin{tag=LI}%
- \tagstructbegin{tag=Lbl}%
- \tagmcbegin{}%
- #1\tagmcend}}
-
-
-% listings + verbatim
-% the paragraph code could create span around the lines ...
-% we use Code for every line.
-
-\AddToHook{env/lstlisting/begin}{\tagpdfsetup{paratag=Code}}
-\AddToHook{env/lstlisting/end}{}
-
-\AddToHook{env/verbatim/begin}{\tagpdfsetup{paratag=Code}}
-\AddToHook{env/verbatim/end}{}
-
-\AddToHook{env/docCommand/begin}{\tagstructbegin{tag=P}\tagpdfsetup{paratag=Code}}
-\AddToHook{env/docCommand/end} {\tagstructend}
-
-% ======== marginnote ==========
+ % ======== marginnote ==========
% TODO marginnote has a bug (a \par is missing) so it messes up tagging.
% but currently unneeded as we marked them up as artifacts anyway as they don't contain
% meaningful contents
@@ -144,6 +103,7 @@
\tag_mc_artifact_group_begin:n{notype}\tagpdfparaOff\marginnote{#1}\tag_mc_artifact_group_end:
}
+\ExplSyntaxOff
% ======== tikzpicture ==========
% TODO this needs some investigation: it messes up the stack if one add paraOff
@@ -153,12 +113,21 @@
% We switch of paratagging at the begin and reenable it locally in before upper.
% the before upper setting is dangerous as it can be overwritten by
% users. So a more stable hook is needed.
-%\AddToHook{env/tcolorbox/begin}{\tagpdfparaOff}
-%\AddToHook{env/docCommand/begin}{\tagpdfparaOff}
-%\tcbset{before~upper=\tagpdfparaOn}
-\AddToHook{env/tcolorbox/begin}{\tagpdfparaOff \tcbset{before~upper=\tagpdfparaOn}}
-\AddToHook{env/docCommand/begin}{\tagpdfparaOff \tcbset{before~upper=\tagpdfparaOn}}
+% we force also a \par and add a div structure, to avoid clashes with the block
+% tagging code. This needs revisting!
+
+\AddToHook{env/tcolorbox/before}{\par\tagstructbegin{tag=Div}}
+\AddToHook{env/tcolorbox/begin}{\tagpdfparaOff \tcbset{before upper=\tagpdfparaOn}}
+\AddToHook{env/tcolorbox/after}{\par\tagstructend}
+
+% this is not good and only temporary, but it is still unclear how to handle internal lists.
+\ExplSyntaxOn
+\AddToHook{env/docCommand/before}{\par\tagtool{para=false}\tagstructbegin{tag=Code}\tagmcbegin{}\tag_stop:}
+\AddToHook{env/docCommand/after}{\par\tag_start:\tagmcend\tagstructend\tagtool{para=true}}
\ExplSyntaxOff
+
+%\AddToHook{env/docCommand/begin}{\tagpdfparaOff \tcbset{before upper=\tagpdfparaOn}\tagtool{paratag=Code}\tagtool{para-flattened=true}}
+
% ======= footnote ========
% done in testphase code
@@ -170,6 +139,16 @@
\newbibmacro*{begentry}{\tagstructbegin{tag=BibEntry}\tagmcbegin{}}
\newbibmacro*{finentry}{\finentry\tagmcend\tagstructend}
+\def\blx@endbibliography{%
+ \csuse{blx@endenv@\blx@theenv}%
+ \blx@noitem
+ \blx@locallabelwidth@finish
+ \endgroup
+ \blx@bibnote\blx@thepostnote
+% \endgroup
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+}
+
% ====== hyperref ========
% this should probably go into tagpdf, but it is related to
% problem of pdf strings and context ....
diff --git a/macros/luatex/latex/linebreaker/README.md b/macros/luatex/latex/linebreaker/README.md
index 26b4cd59e5..a418e231b0 100644
--- a/macros/luatex/latex/linebreaker/README.md
+++ b/macros/luatex/latex/linebreaker/README.md
@@ -1,4 +1,4 @@
-#The Linebreaker package, version v0.1a (2022-03-12)
+#The Linebreaker package, version v0.1b (2023-03-06)
This package tries to prevent overflow lines in paragraphs or boxes.
It changes the LuaTeX's `linebreak` callback, and it re-typesets the paragraph
@@ -15,6 +15,8 @@ with the lowest badness.
## License
+Author: Michal Hoftich <michal.h21@gmail.com>
+
Permission is granted to copy, distribute and/or modify this software
under the terms of the LaTeX Project Public License, version 1.3.
diff --git a/macros/luatex/latex/linebreaker/linebreaker-doc.pdf b/macros/luatex/latex/linebreaker/linebreaker-doc.pdf
index ac6659002f..b47fc0e3e3 100644
--- a/macros/luatex/latex/linebreaker/linebreaker-doc.pdf
+++ b/macros/luatex/latex/linebreaker/linebreaker-doc.pdf
Binary files differ
diff --git a/macros/luatex/latex/linebreaker/linebreaker-doc.tex b/macros/luatex/latex/linebreaker/linebreaker-doc.tex
index 8da047ceea..f94aa33ef0 100644
--- a/macros/luatex/latex/linebreaker/linebreaker-doc.tex
+++ b/macros/luatex/latex/linebreaker/linebreaker-doc.tex
@@ -140,6 +140,11 @@ Maximal allowed value of \verb|\emergencystretch|.
Maximal allowed value of \verb|tolerance|.
\end{function}
+\begin{function}{cubic}
+Use cubic method for the \verb|tolerance| calculation. By default, \verb|tolerance| is calculated
+using a linear method, with constant steps. With the cubic method, each step is larger than the previous.
+\end{function}
+
\begin{function}{debug}
Print debugging info to the terminal output.
\end{function}
@@ -186,6 +191,12 @@ under the terms of the LaTeX Project Public License, version 1.3.
\section{Changes}
\begin{description}
+ \item[v0.1b, 2023-03-06]\hfill
+ \begin{itemize}
+ \item Set maximal value of tolerance to 8189, bigger value doesn't have any effect.
+ \item Added \verb|cubic| method for calculating tolerance.
+ \item Explicitly set the \verb|tex.linebreak| parameters, to support paragraph direction and other paragraph variables.
+ \end{itemize}
\item[v0.1a, 2022-03-12]\hfill
\begin{itemize}
diff --git a/macros/luatex/latex/linebreaker/linebreaker.lua b/macros/luatex/latex/linebreaker/linebreaker.lua
index 6a2d20e074..99966ad302 100644
--- a/macros/luatex/latex/linebreaker/linebreaker.lua
+++ b/macros/luatex/latex/linebreaker/linebreaker.lua
@@ -1,3 +1,11 @@
+-- linebreaker.lua
+--
+-- (c) Michal Hoftich <michal.h21@gmail.com>
+--
+-- 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.
+
local linebreaker = {}
local hlist_id = node.id "hlist"
@@ -22,7 +30,7 @@ end
linebreaker.debug = false
-- max allowed value of tolerance
-linebreaker.max_tolerance = 9999
+linebreaker.max_tolerance = 8189 -- maximal possible value of tolerance (thanks to Jan Šustek for pointing that out)
-- maximal allowed emergencystretch
linebreaker.max_emergencystretch = tex.sp("3em")
-- line breaking function is customizable
@@ -43,9 +51,38 @@ linebreaker.previous_points = linebreaker.vertical_point / linebreaker.boxsize
linebreaker.width_factor = 1.5
-- will be linebreaker active?
linebreaker.active = true
+
+-- use cubic method for tolerance calculation
+linebreaker.use_cubic = false
-- return array with default parameters
function linebreaker.parameters()
- return {}
+ return {
+ pardir = tex.pardir
+ ,pretolerance = tex.pretolerance
+ ,tracingparagraphs=tex.tracingparagraphs
+ ,tolerance=tex.tolerance
+ ,looseness=tex.looseness
+ ,hyphenpenalty=tex.hyphenpenalty
+ ,exhyphenpenalty=tex.exhyphenpenalty
+ ,pdfadjustspacing=tex.pdfadjustspacing
+ ,adjdemerits=tex.adjdemerits
+ ,pdfprotrudechars=tex.pdfprotrudechars
+ ,linepenalty=tex.linepenalty
+ ,lastlinefit=tex.lastlinefit
+ ,doublehyphendemerits=tex.doublehyphendemerits
+ ,finalhyphendemerits=tex.finalhyphendemerits
+ ,hangafter=tex.hangafter
+ ,interlinepenalty=tex.interlinepenalty
+ ,clubpenalty=tex.clubpenalty
+ ,widowpenalty=tex.widowpenalty
+ ,brokenpenalty=tex.brokenpenalty
+ ,emergencystretch=tex.emergencystretch
+ ,hangindent=tex.hangindent
+ ,hsize=tex.hsize
+ ,leftskip=tex.leftskip
+ ,rightskip=tex.rightskip
+ ,parshape=tex.parshape
+ }
end
-- diagnostic function for traversing nodes returned by linebreaking
@@ -144,9 +181,23 @@ local function glue_calc(n, sign,set)
end
--- calculate new tolerance
+local function cube_root(num)
+ return num ^(1/3)
+end
+
+
+-- calculate new tolerance using method suggested by Jan Šustek
+local function calc_tolerance_cubic(previous, step)
+ local previous = previous or tex.tolerance
+ local max_cycles = linebreaker.max_cycles
+ local max_tolerance = linebreaker.max_tolerance
+ local new = 100 * (cube_root(previous / 100) + (cube_root(max_tolerance/100) - cube_root(previous/100)) * (step/max_cycles))^3
+ -- local new = previous + (max_tolerance / max_cycles)-- + math.sqrt(previous * 4)
+ return (new < max_tolerance) and new or max_tolerance
+end
+
-- max_tolerance / max_cycles is added to the current tolerance value
-local function calc_tolerance(previous)
+local function calc_tolerance(previous, step)
local previous = previous or tex.tolerance
local max_cycles = linebreaker.max_cycles
local max_tolerance = linebreaker.max_tolerance
@@ -340,7 +391,9 @@ end
-- try to linebreak current paragraph with increasing tolerance and
-- emergencystretch
-function linebreaker.best_solution(par, parameters)
+function linebreaker.best_solution(par, parameters, step)
+ -- step is used in the tolerance calculation
+ local step = (step or 0) + 1
-- save current node list, because call to the linebreaker modifies it
-- and we wouldn't be able to run it multiple times
local head = node.copy_list(par)
@@ -373,9 +426,14 @@ function linebreaker.best_solution(par, parameters)
params.badness = badness
if badness > 0 then
-- calc new value of tolerance
- local tolerance = calc_tolerance(params.tolerance) -- or 10000
+ local tolerance
+ if linebreaker.use_cubic then
+ tolerance = calc_tolerance_cubic(params.tolerance, step) -- or 10000
+ else
+ tolerance = calc_tolerance(params.tolerance, step) -- or 10000
+ end
-- save tolerance to newparams so this value will be used in next run
- newparams.tolerance = tolerance
+ newparams.tolerance = math.floor(tolerance)
newparams.emergencystretch = (params.emergencystretch or 0) + linebreaker.max_emergencystretch / linebreaker.max_cycles
table.insert(parameters, newparams)
-- run linebreaker again
diff --git a/macros/luatex/latex/linebreaker/linebreaker.sty b/macros/luatex/latex/linebreaker/linebreaker.sty
index 2804f4bbe6..3442adad8c 100644
--- a/macros/luatex/latex/linebreaker/linebreaker.sty
+++ b/macros/luatex/latex/linebreaker/linebreaker.sty
@@ -1,3 +1,11 @@
+% linebreaker.sty
+%
+% (c) Michal Hoftich <michal.h21@gmail.com>
+%
+%% 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.
+
\ProvidesPackage{linebreaker}
\RequirePackage{luatexbase}
@@ -16,6 +24,7 @@ luatexbase.add_to_callback("hpack_quality", linebreaker.hpack_quality, "Our over
maxtolerance .code:n = \directlua{linebreaker.max_tolerance = tonumber("#1")},
maxemergencystretch .code:n = \directlua{linebreaker.max_emergencystretch = tex.sp("#1")},
maxcycles .code:n = \directlua{linebreaker.max_cycles = tonumber("#1")},
+ cubic .code:n = \directlua{linebreaker.use_cubic = true}
}
\NewDocumentCommand{\linebreakersetup}{m}{
\keys_set:nn {linebreaker} {#1}