summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/microtype
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-30 03:03:36 +0000
committerNorbert Preining <norbert@preining.info>2024-03-30 03:03:36 +0000
commit16a9aadc4ae32ef5d7f20d62a3606b05e20f3405 (patch)
tree4cdbef1301bfdfe766434e49385bd2d251a7827e /macros/latex/contrib/microtype
parent23724df30adf3c6356ee7877833b8096987c643f (diff)
CTAN sync 202403300303
Diffstat (limited to 'macros/latex/contrib/microtype')
-rw-r--r--macros/latex/contrib/microtype/DEPENDS.txt1
-rw-r--r--macros/latex/contrib/microtype/README.md4
-rw-r--r--macros/latex/contrib/microtype/microtype-code.pdfbin2139911 -> 2137618 bytes
-rw-r--r--macros/latex/contrib/microtype/microtype-utf.dtx4
-rw-r--r--macros/latex/contrib/microtype/microtype.dtx184
-rw-r--r--macros/latex/contrib/microtype/microtype.ins2
-rw-r--r--macros/latex/contrib/microtype/microtype.pdfbin670821 -> 670969 bytes
7 files changed, 150 insertions, 45 deletions
diff --git a/macros/latex/contrib/microtype/DEPENDS.txt b/macros/latex/contrib/microtype/DEPENDS.txt
new file mode 100644
index 0000000000..f8372ec7f7
--- /dev/null
+++ b/macros/latex/contrib/microtype/DEPENDS.txt
@@ -0,0 +1 @@
+etoolbox # with etex
diff --git a/macros/latex/contrib/microtype/README.md b/macros/latex/contrib/microtype/README.md
index cc63892a47..7dae3d2776 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.1a -- 2023/03/13)
+ (v3.1b -- 2024/03/29)
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--2023 R Schlicht `<w.m.l@gmx.net>`
+Copyright (c) 2004--2024 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 bba1009e7c..186c876991 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 02af4db500..cfee09e68d 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--2023 R Schlicht <w.m.l@gmx.net>
+% Copyright (c) 2004--2024 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}[2023/03/13 v3.1a]
+ {\jobname.dtx}[2024/03/29 v3.1b]
%</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 cfa8994833..c14309de32 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--2023 R Schlicht <w.m.l@gmx.net>
+% Copyright (c) 2004--2024 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>
- [2023/03/13 v3.1a
+ [2024/03/29 v3.1b
%<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.1a",
-%<luafile> date = "2023/03/13",
+%<luafile> version = "3.1b",
+%<luafile> date = "2024/03/29",
%<luafile> description = "microtype module.",
%<luafile> author = "E. Roux, R. Schlicht and P. Gesang",
%<luafile> copyright = "E. Roux, R. Schlicht and P. Gesang",
@@ -671,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--2023 R Schlicht\textLF
+ pdfcopyright={\textcopyright\ 2004--2024 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
@@ -917,6 +917,10 @@
%\changes{v2.0}{2006/12/29}{new package \letterspace: a stripped-down version,
% containing the letterspacing commands only}
%\changes{v3.0}{2021/10/31}{move development to \href{\githuburl}{GitHub}}
+%\changes{v3.1b}{2023/09/30}{add \file{DEPENDS.txt}
+% (suggested by \contributor Bruno Victal <mirai\at makinata.eu>)}
+% ^^A private mail, 2023/09/29
+%
%\GeneralChanges{Documentation}
%\changes{v1.9b}{2006/01/13}{activate expansion in the distributed <PDF>}
%\changes{v2.2}{2007/04/01}{logo transparency and amusement}
@@ -962,7 +966,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--2023 R Schlicht.
+% This package is copyright \textcopyright\ 2004\kern.09em--2024 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},
@@ -3074,7 +3078,7 @@
%\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}
+%\changes{v3.1}{2022/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.
@@ -3365,10 +3369,18 @@
% \contributor Ralf Steinle <rasteinle\at web.de>,
% \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 Scott Kostyshak <@\at @>, ^^A https://github.com/scottkosty
% \contributor Shen Zhou Hong <@\at @>, ^^A https://github.com/ShenZhouHong
-% \contributor David Purton <@\at @> ^^A https://github.com/dcpurton
+% \contributor David Purton <@\at @>, ^^A https://github.com/dcpurton
+% `\contributor rallg <@\at @>', ^^A https://github.com/rallg
+% \contributor Artur A. Marczok <marczok\at t-online.de>,
+% \contributor Uwe Siart <uwe.siart\at tum.de>,
+% `\contributor simon-codes-something <@\at @>', ^^A https://github.com/simon-codes-something
+% `\contributor scholnik <@\at @>', ^^A https://github.com/scholnik
+% \contributor Ulrich Schwarz <@\at @>, ^^A https://tex.stackexchange.com/users/1860/ulrich-schwarz
+% \contributor Bruno Victal <mirai\at makinata.eu>
% and
-% `\contributor rallg <@\at @>'. ^^A https://github.com/rallg
+% \contributor Linas Stonys <lstonys\at vtex.lt>.
%
%\iffalse
%\section{History of micro-typography} ^^A some time ...
@@ -3439,7 +3451,7 @@
% \bibitem[\pdftex\ manual]{pdftexman}
% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder, Karl Berry,
% \emph{The \pdftex\ user manual},
-% 1~March 2022.
+% 28~February 2023.
% (\ctanurl{systems/doc/pdftex/manual/pdftex-a.pdf})
%
% \bibitem[Fontname]{fontname}
@@ -3449,7 +3461,7 @@
%
% \bibitem[\LaTeXe\ font selection]{fntguide}
% \LaTeX\ Project Team, \emph{\LaTeXe\ font selection},
-% August 2022.
+% October 2023.
% (\ctanurl{macros/latex/base/fntguide.pdf})
%
% \bibitem[\pkg{fontspec}]{fontspec}
@@ -3461,7 +3473,7 @@
% \bibitem[\pkg{luaotfload}]{luaotfload}
% \LaTeX3 Project, \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer, Marcel Kr\"uger,
% \emph{The \pkg{luaotfload} package},
-% 3~October 2022.
+% 31~August 2023.
% (\ctanpkgurl{luaotfload})
%
% \bibitem[\pkg{pdfcprot}]{pdfcprot}
@@ -3471,7 +3483,7 @@
%
% \bibitem[\pkg{soul}]{soul}
% [Melchior Franz,] Heiko Oberdiek, \emph{The \pkg{soul} package},
-% 18 February 2023.
+% 14 June 2023.
% (\ctanpkgurl{soul}).
%
%\end{thebibliography}
@@ -3509,7 +3521,9 @@
%
%\begin{History}
%
-%\Version{\expandafter\@gobble\fileversion}{\filedate}
+%\VersionDate{\expandafter\@gobble\fileversion}{\filedate}
+%
+%\VersionDate{3.1a}{2023/03/13}
%
%\Version{3.1}{2023/03/06}
% \item New command \cs{DeclareMicrotypeFilePrefix} to change the prefix of the
@@ -3903,10 +3917,10 @@
%\DoNotIndex{\@backslashchar,\@car,\@cclvi,\@changed@cmd,\@classoptionslist,
% \@current@cmd,\@currext,\@currname,\@defaultunits,\@empty,\@@enc@update,
% \@eqnnum,\@expandtwoargs,\@firstofone,\@firstoftwo,\@footnotetext,\@gobble,
-% \@gobbletwo,\@ifclassloaded,\@ifl@t@r,\@ifl@aded,\@ifpackagelater,\@ifpackageloaded,
-% \@ifstar,\@ifundefined,\@item,\@let@token,\@m,\@M,\@makeother,\@minus,\@mpfootnotetext,
-% \@nameuse,\@ne,\@newlistfalse,\@nil,\@nnil,\@onelevel@sanitize,\@onlypreamble,
-% \@pkgextension,\@plus,\@ptionlist,\@removeelement,\@secondoftwo,\@spaces,\@sptoken,
+% \@gobbletwo,\@ifclassloaded,\@ifl@t@r,\@ifl@aded,\@ifnextchar,\@ifpackagelater,
+% \@ifpackageloaded,\@ifstar,\@ifundefined,\@item,\@let@token,\@m,\@M,\@makeother,
+% \@minus,\@mpfootnotetext,\@nameuse,\@ne,\@newlistfalse,\@nil,\@nnil,\@onelevel@sanitize,
+% \@onlypreamble,\@plus,\@ptionlist,\@removeelement,\@secondoftwo,\@spaces,\@sptoken,
% \@tempa,\@tempb,\@tempc,\@tempcnta,\@tempcntb,\@tempdima,\@typeset@protect,
% \@undefined,\@unprocessedoptions,\@unusedoptionlist,\@xobeysp,\check@icr,
% \color@begingroup,\color@endgroup,\g@addto@macro,\hmode@bgroup,\m@ne,\maybe@ic,
@@ -4169,7 +4183,7 @@
% The old command names had one more hunch (|\..MicroType..|).
% Before finally letting them sink into oblivion, raise an error.
%\changes{v1.8}{2005/04/28}{renamed commands from \cmd{\..MicroType..} to \cmd{\..Microtype..}}
-%\changes{v3.0}{2020/04/10}{old command names will raise an error}
+%\changes{v3.0}{2021/04/10}{old command names will raise an error}
% \begin{macrocode}
\def\MT@old@cmd#1#2{%
\newcommand*#1{\MT@error{%
@@ -5460,12 +5474,22 @@ end
%<package>^^Q \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax
%<package>^^Q \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi
}
-%<*package>
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
+%\begin{macro}{\MT@if@expanding@F}
+%\changes{v3.1b}{2023/06/07}{new macro: check whether inside expanding context}
+%\begin{macro}{\MT@if@expanding@F@}
+% The following voodoo is based on a trick by \contributor Ulrich Schwarz <@\at @>.\footnote{Cf. \url{https://tex.stackexchange.com/a/29188/7674}}
+% \begin{macrocode}
+\def\MT@if@expanding@F{\let\MT@if@expanding@F@\MT@if@expanding@F@\@firstofone}
+\def\MT@if@expanding@F@#1#2#3{\relax\relax}
+%<*package>
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@detokenize@n}
%\changes{v1.9d}{2006/03/08}{new macro: use \cmd\detokenize\ if available}
%\begin{macro}{\MT@detokenize@c}
@@ -5675,6 +5699,13 @@ microtype.if_str_eq = if_str_eq
%</luafile>
% \end{macrocode}
%\end{macro}
+% With this, we can now also check whether versions match (using the command from
+% \ref{ssub:def-files}).
+% \begin{macrocode}
+%<lua->\MT@check@MT@version
+%<lua-> {\MT@lua{tex.write(microtype.module['date'] .. ' v' .. microtype.module['version'])}}
+%<lua-> {\MT@MT.lua}
+% \end{macrocode}
%\begin{macro}{\MT@xadd}
%\changes{v1.8}{2005/04/17}{simplified}
% Add item to a list.
@@ -6186,12 +6217,13 @@ microtype.do_font = do_font
%\begin{macro}{\MT@with@babel@and@T}
%\changes{v2.2}{2007/05/25}{also inspect class options}
%\changes{v3.0a}{2021/11/23}{fix grouping}
+%\changes{v3.1b}{2023/03/24}{don't use \cmd\@pkgextension\ (was \cmd\@onlypreamble d in older \LaTeX\ versions)}
% \LaTeX's \cmd\@ifpackagewith\ ignores the class options.
% \begin{macrocode}
\def\MT@with@babel@and@T#1{%
- \MT@ifdefined@n@T{opt@babel.\@pkgextension}{%
+ \MT@ifdefined@n@T{opt@babel.sty}{%
\@expandtwoargs\MT@in@clist{#1}
- {\csname opt@babel.\@pkgextension\endcsname,\@classoptionslist}%
+ {\csname opt@babel.sty\endcsname,\@classoptionslist}%
\ifMT@inlist@\expandafter\@secondoftwo\else\expandafter\@firstofone\fi
}\@gobble
}
@@ -7229,6 +7261,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
% (reported by \contributor Leo <sdl.web\at gmail.com>)}
% ^^A MID: <m0vdk4g8t2.fsf@cam.ac.uk>
%\changes{v2.8}{2020/05/25}{try to fix zero \fontdim6}
+%\changes{v3.1b}{2023/12/04}{compatibility with \luatex\ in <DVI> mode
+% (reported by \contributor Linas Stonys <lstonys\at vtex.lt>)}
+% ^^A private mail, 2023/11/30
%\begin{macro}{\MT@dimen@six}
% If \fontdim6 is zero, character protrusion, spacing, kerning and tracking
% won't work, and we could skip the settings (for example, the \pkg{dsfont}
@@ -7236,16 +7271,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
% and \pkg{newpx}/\pkg{newtx} packages have been fixed in the meantime).
% 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.
+% \xetex\ (and newer \luatex\ in <DVI> mode) doesn't provide an equivalent to
+% \cmd\pdffontsize, so we use the nominal size instead.
% \begin{macrocode}
%<*pdf-|lua-|xe->
\def\MT@fix@fontdimen@six{%
\ifnum\fontdimen6\MT@font=\z@
\fontdimen6\MT@font=%
%<pdf-> \pdffontsize\MT@font
-%<lua-> \MT@requires@luatex4{\pdffeedback fontsize}{\pdffontsize}\MT@font
-%<xe-> \MT@size pt
+%<lua-> \MT@requires@luatex4{\ifnum\outputmode=\@ne \pdffeedback fontsize\else
+%<lua-|xe-> \MT@size pt%
+%<lua-> \expandafter\@gobble\fi}{\pdffontsize}\MT@font
\MT@info{Fixing zero \@backslashchar fontdimen 6 for font `\MT@@font'\MessageBreak
(new value: \the\fontdimen6\MT@font)}%
%<pdf-> \MT@requires@pdftex8\relax{\MT@glet@nc{\MT@@font-fake6}\@empty}%
@@ -8237,11 +8273,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@toks{}%
\MT@prot@toks{}%
\let\MT@prot@l\MT@prot@l@
+ \let\MT@prot@get@first@group\MT@prot@get@first@group@
\let\MT@maybe@textcmd\@firstofone
\MT@prot@get@firstgroup
}
% \end{macrocode}
%\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}}
@@ -8254,6 +8292,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@prot@toks}
%\begin{macro}{\MT@prot@l@tc}
%\changes{v3.1}{2023/03/06}{new macro: for text commands}
@@ -8623,10 +8662,14 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
% \item
%\begin{macro}{\MT@prot@check@F}
-%\changes{v3.1}{2022/03/06}{new macro: for text commands}
-%\changes{v3.1a}{2022/03/12}{fix: execute (and empty) \cs{MT@toks}
-% (reported by \contributor Artur A. Marczok <marczok\at t-online.de>)}
+%\changes{v3.1}{2023/03/06}{new macro: for text commands}
+%\changes{v3.1a}{2023/03/12}{fix: execute (and empty) \cs{MT@toks}
+% (reported by \contributor Artur A. Marczok <marczok\at t-online.de>
+% and \contributor Uwe Siart <uwe.siart\at tum.de>)}
% ^^A private mail, 2023/03/12
+% ^^A private mail, 2023/03/13
+%\changes{v3.1b}{2024/03/29}{fix: failed when group began with another command
+% \githubissue{31}}
% 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,
@@ -8640,6 +8683,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\def\MT@temp*{\MT@exp@one@n\MT@prot@l{\the\MT@toks}}%
\else
\let\MT@prot@l\MT@prot@l@tc
+ \let\MT@prot@get@first@group\MT@prot@get@first@group@tc
\def\MT@temp*##1##2{%
\let\MT@maybe@textcmd##1%
\the\MT@toks
@@ -8651,6 +8695,36 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
+% \item
+%\begin{macro}{\MT@prot@check@C}
+%\changes{v3.1b}{2023/03/16}{new macro: for text commands with an optional argument
+% (after \contributor scholnik <@\at @> reported
+% that \cmd\MakeUppercase\ and friends support one) \githubissue{29}}
+% Same, but for commands that allow an optional argument (\eg, the \textbf{C}ase
+% changing commands since \LaTeX\ 2022/11/01).
+% \begin{macrocode}
+\def\MT@prot@check@C{%
+ \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
+ \let\MT@prot@get@first@group\MT@prot@get@first@group@tc
+ \def\MT@temp*##1{%
+ \the\MT@toks
+ \MT@toks{}%
+ \@ifnextchar[%
+ {\MT@prot@check@C@##1}%
+ {\MT@prot@check@C@##1[]}%
+ }%
+ \fi
+}
+\def\MT@prot@check@C@#1[#2]#3{%
+ \def\MT@maybe@textcmd{#1[#2]}%
+ \MT@prot@toks{#1[#2]{#3}}%
+ \MT@prot@get@firstgroup@tc#3\MT@nil
+}
+% \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}
@@ -8674,7 +8748,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
{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 text commands
@@ -8689,7 +8762,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
{O\fontseriesforce}{O\fontshapeforce}}}
\relax
\IfFormatAtLeastTF{2022/11/01}
- {\g@addto@macro\MT@prot@check@cmds{{F\MakeTitlecase}}}\relax
+ {\g@addto@macro\MT@prot@check@cmds{{C\MakeUppercase}{C\MakeLowercase}{C\MakeTitlecase}}}
+ {\g@addto@macro\MT@prot@check@cmds{{F\MakeUppercase}{F\MakeLowercase}}}
% \end{macrocode}
% The \cls{ltxdoc} class and the \pkg{doc} package provide some abbreviations.
% Unfortunately, the \cmd\cmd\ command doesn't work.
@@ -8772,10 +8846,11 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@prot@get@first@group}
+%\begin{macro}{\MT@prot@get@first@group@}
% If next char is |{|, start a group and try again, else continue until
% we find a beginning char.
% \begin{macrocode}
-\def\MT@prot@get@first@group{%
+\def\MT@prot@get@first@group@{%
\MT@prot@ifcat\bgroup{%
\def\MT@temp*{\MT@prot@addgroup}%
}{%
@@ -8785,6 +8860,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@prot@get@first@group@tc}
% The variant for text commands (in case they start with another group).
% \begin{macrocode}
@@ -11522,7 +11598,7 @@ end
%\end{macro}
%\begin{macro}{\MT@remove@tlig}
% We remove the \cs{remove@tlig} command and only pass on the number.
-%\changes{v2.8c}{2020/03/04}{fix for text commands containing conditionals
+%\changes{v2.8c}{2021/03/04}{fix for text commands containing conditionals
% (reported by \contributor Frank Mittelbach <frank.mittelbach\at latex-project.org>)}
% ^^A private mail, 2021/03/02
% \begin{macrocode}
@@ -11860,6 +11936,16 @@ end
% \begin{macrocode}
\MT@with@package@T{trace}{\g@addto@macro\pickup@font{\conditionally@traceoff}}%
\g@addto@macro\pickup@font{%
+% \end{macrocode}
+%\changes{v3.1b}{2023/06/07}{guard against expanding context}
+% If we're inside an \cmd\edef\ (or \cmd\write~\dots), we don't want to
+% execute our code. This will still leave `|\begingroup \let \relax \relax \endgroup|'
+% in the input stream, which is not nothing but should be harmless enough.
+% \cmd\pickup@font\ should never be executed in these contexts anyway, but obviously
+% this may, under rare circumstances, still happen (\eg, with \pkg{hyperref}).\footnote{
+% Cf. \url{https://tex.stackexchange.com/q/687763/7674}}
+% \begin{macrocode}
+%<package> \MT@if@expanding@F{%
\escapechar\m@ne
%<*package>
%<debug> \global\MT@inannottrue
@@ -11881,7 +11967,7 @@ end
\MT@register@subst@font
\fi
\fi
- \MT@setupfont
+ \MT@setupfont}%
%</package>
%<letterspace> \MT@tracking
\endgroup
@@ -14402,9 +14488,29 @@ end
%\subsubsection{Loading the definition file}\label{ssub:def-files}
%
% Load the engine-specific code (as strewn across this file).
+%\begin{macro}{\MT@get@MT@version}
+%\begin{macro}{\MT@version}
+%\begin{macro}{\MT@check@MT@version}
+%\changes{v3.1b}{2023/03/14}{check if \texttt{.sty} and \texttt{.def} (and \texttt{.lua}) file versions match}
+% We also check whether versions are the same.
% \begin{macrocode}
-\input{microtype-\MT@engine tex.def}
+\def\MT@get@MT@version#1 #2 #3\@nil{#1 #2}
+\edef\MT@version{\expandafter\expandafter\expandafter\MT@get@MT@version
+ \csname ver@\MT@MT.sty\endcsname\@nil}
+\def\MT@check@MT@version#1#2{%
+ \MT@ifstreq\MT@version{#1}{}{%
+ \MT@warning@nl{Mismatching file versions:\MessageBreak
+ \MT@MT.sty provides:\MessageBreak`\MT@version',\MessageBreak
+ whereas #2 provides:\MessageBreak`#1'.\MessageBreak
+ Please fix your installation}}}
+\input{\MT@MT-\MT@engine tex.def}
+\edef\@tempa{\expandafter\expandafter\expandafter\MT@get@MT@version
+ \csname ver@\MT@MT-\MT@engine tex.def\endcsname\@nil}
+\MT@check@MT@version\@tempa{\MT@MT-\MT@engine tex.def}
% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
%
% \subsubsection{Reading the configuration file}
%
@@ -14437,22 +14543,20 @@ end
%\changes{v1.8}{2005/05/15}{new option: \opt{config} to load a different main
% configuration file}
%\begin{macro}{\MT@config@file}
-%\begin{macro}{\MT@get@config}
% However, the \opt{config} option must of course be evaluated beforehand.
% We also have to define a no-op for the regular option processing later.
% \begin{macrocode}
%<*package>
\define@key{MT}{config}[]{\relax}
-\def\MT@get@config#1config=#2,#3\@nil{%
+\def\MT@temp#1config=#2,#3\@nil{%
\MT@ifempty{#2}%
{\def\MT@config@file{\MT@MT.cfg}}%
{\def\MT@config@file{#2.cfg}}%
}
-\expandafter\expandafter\expandafter\MT@get@config
+\expandafter\expandafter\expandafter\MT@temp
\csname opt@\@currname.\@currext\endcsname,config=,\@nil
% \end{macrocode}
%\end{macro}
-%\end{macro}
%\changes{v1.4b}{2004/11/25}{fix: set catcodes before reading global configuration file
% (reported by \contributor Christoph Bier <christoph.bier\at web.de>)}
% ^^A MID: <30k2tqF30v483U1@uni-berlin.de>
@@ -20347,7 +20451,7 @@ This is the current font stretched by 5\%, normal, and shrunk by 5\%:
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \CheckSum{12975}
+% \CheckSum{13078}
%
% \Finale
%
diff --git a/macros/latex/contrib/microtype/microtype.ins b/macros/latex/contrib/microtype/microtype.ins
index ed10e20008..e7de0295d3 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--2023 R Schlicht <w.m.l@gmx.net>
+ Copyright (c) 2004--2024 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 51110edd6a..d2447135fe 100644
--- a/macros/latex/contrib/microtype/microtype.pdf
+++ b/macros/latex/contrib/microtype/microtype.pdf
Binary files differ