From 641254b2ef0f7fa3faa2cdd144019b68ec55f2b9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 15 Mar 2021 22:04:15 +0000 Subject: microtype (15mar21) git-svn-id: svn://tug.org/texlive/trunk@58394 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/microtype/microtype-utf.dtx | 2 +- .../source/latex/microtype/microtype.dtx | 91 ++++++++++++++++------ 2 files changed, 69 insertions(+), 24 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx b/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx index 1f64521c5b5..c553e53e2da 100644 --- a/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx +++ b/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx @@ -26,7 +26,7 @@ % \ProvidesFile %<*driver> - {\jobname.dtx}[2021/02/25 v2.8b] + {\jobname.dtx}[2021/03/14 v2.8c] % % {mt-CharisSIL.cfg}[2017/07/07 v1.1 microtype config. file: Charis SIL (RS)] % {mt-LatinModernRoman.cfg}[2021/02/21 v1.1 microtype config. file: Latin Modern Roman (RS)] diff --git a/Master/texmf-dist/source/latex/microtype/microtype.dtx b/Master/texmf-dist/source/latex/microtype/microtype.dtx index a4a45649471..088b55ea1f9 100644 --- a/Master/texmf-dist/source/latex/microtype/microtype.dtx +++ b/Master/texmf-dist/source/latex/microtype/microtype.dtx @@ -1,7 +1,7 @@ %\iffalse meta-comment % !Mode:: "TeX:DTX:UK" % !smartQuote:: "English" -% !DTXversion:: "2.8b" +% !DTXversion:: "2.8c" % ------------------------------------------------------------------------ % The `microtype' package % Subliminal refinements towards typographical perfection @@ -37,7 +37,7 @@ % {microtype-luatex.def} % {microtype-xetex.def} %<*package|letterspace|m-t|pdftex-def|luatex-def|xetex-def> - [2021/02/25 v2.8b + [2021/03/14 v2.8c % Micro-typographical refinements % Robust letterspacing % microtype main configuration file @@ -51,8 +51,8 @@ %local microtype = microtype %microtype.module = { % name = "microtype", -% version = "2.8b", -% date = "2021/02/25", +% version = "2.8c", +% date = "2021/03/14", % description = "microtype module.", % author = "E. Roux, R. Schlicht and P. Gesang", % copyright = "E. Roux, R. Schlicht and P. Gesang", @@ -3052,7 +3052,9 @@ % %\VersionDate{\expandafter\@gobble\fileversion}{\filedate} % -%\VersionDate{2.8a}{2020/02/22} +%\VersionDate{2.8b}{2021/02/25} +% +%\VersionDate{2.8a}{2021/02/22} % %\Version{2.8}{2020/12/07} % \item New default font sets for expansion and spacing: `|alltext-nott|' @@ -3380,8 +3382,8 @@ % \write,\xdef} %^^A\DoNotIndex{\font,\fontdimen,\nullfont,\sfcode,\spacefactor,\spaceskip, %^^A \xspaceskip} ^^A tex -%\DoNotIndex{\currentgrouplevel,\currentgrouptype,\detokenize,\dimexpr, -% \eTeXversion,\ifcsname,\ifdefined,\numexpr} +%\DoNotIndex{\currentgrouplevel,\currentgrouptype,\currentiflevel,\detokenize, +% \dimexpr,\eTeXversion,\ifcsname,\ifdefined,\numexpr} %^^A\DoNotIndex{\fontcharwd,\iffontchar} ^^A e-tex %\DoNotIndex{\pdfannot,\pdfescapestring,\pdfmatch,\pdfoutput,\pdfstrcmp, % \pdftexrevision,\pdftexversion} @@ -3392,7 +3394,7 @@ %\DoNotIndex{\XeTeXversion,\XeTeXrevision,\strcmp} ^^A xetex %^^A\DoNotIndex{\XeTeXcharglyph,\XeTeXfonttype,\XeTeXglyph,\XeTeXglyphindex, %^^A \XeTeXglyphname,\XeTeXlastfontchar,\XeTeXprotrudechars} -%\DoNotIndex{\directlua,\luatexversion} ^^A luatex +%\DoNotIndex{\directlua,\glet,\luatexversion} ^^A luatex %^^A\DoNotIndex{\adjustspacing,\copyfont,\expandglyphsinfont, %^^A \ignoreligaturesinfont,\outputmode,\protrudechars,\tracingfonts} %\DoNotIndex{\eplain,\usepkg@pkg} ^^A eplain @@ -3409,7 +3411,7 @@ % \on@line,\p@,\set@display@protect,\strip@prefix,\strip@pt,\tw@,\z@,\z@skip, % \zap@space,\active,\documentclass,\fmtversion,\leavevmode,\makeatletter, % \mbox,\newcommand,\newcount,\newdimen,\newif,\newskip,\newtoks,\nobreak, -% \nonfrenchspacing,\normalsize,\renewcommand,\space,\AtBeginDocument, +% \nonfrenchspacing,\normalsize,\renewcommand,\space,\AddToHook,\AtBeginDocument, % \AtEndOfPackage,\CheckCommand,\CurrentOption,\DeclareRobustCommand,\IfFileExists, % \InputIfFileExists,\MessageBreak,\PackageError,\PackageInfo,\PackageWarning, % \RequirePackage,\@@enc@update,\cf@encoding,\f@encoding} @@ -5224,7 +5226,7 @@ microtype.do_font = do_font % ^^A private mail, 2012/06/30 % They are also part of recent \xetex. %\changes{v2.5a}{2013/03/25}{support for \pkg{eledmac}} -%\changes{v2.6}{2015/08/10}{support for \pkg{reledmac}} +%\changes{v2.6}{2015/08/10}{support for \pkg{reledmac}}^^A % The successor packages \pkg{eledmac} and \pkg{reledmac} are also supported. % \begin{macrocode} % @@ -5287,17 +5289,24 @@ microtype.do_font = do_font \def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# } % \end{macrocode} %\end{macro} -%\begin{macro}{\ifMT@xunicode} %\begin{macro}{\ifMT@fontspec} +%\begin{macro}{\ifMT@xunicode} % Two new conditionals for use with \xetex\ or \luatex. % \begin{macrocode} -\newif\ifMT@xunicode -\MT@with@package@T{xunicode}\MT@xunicodetrue \newif\ifMT@fontspec \MT@with@package@T{fontspec}\MT@fontspectrue +\newif\ifMT@xunicode +\MT@with@package@T{xunicode}\MT@xunicodetrue % \end{macrocode} %\end{macro} +%\changes{v2.8c}{2021/03/12}{add to hook for \pkg{fontspec}} %\end{macro} +% We need the correct value of the former for configuration commands +% inside the preamble (to get the default families right). +% \begin{macrocode} +\@ifl@t@r\fmtversion{2020/10/01} + {\AddToHook{package/after/fontspec}{\MT@fontspectrue}}\relax +% \end{macrocode} %\begin{macro}{\MT@maybe@gobble@with@tikz} %\begin{macro}{\MT@tikz@setup} %\changes{v2.3e}{2009/11/02}{compatibility with \pkg{tikz} (first reported by @@ -9045,13 +9054,19 @@ end \def\MT@is@symbol{% \expandafter\def\expandafter\MT@char\expandafter {\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}% +% \end{macrocode} +% Since recently, some glyphs are defined optionally in \LaTeX\ +% by checking if the glyph actually exists in the font (\eg, \cmd\textasteriskcentered). +% \begin{macrocode} + \expandafter\expandafter\expandafter + \MT@is@opt@char\MT@char\iffontchar\char\else\fi\relax \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter - \meaning\expandafter\MT@char\MT@charstring\relax\relax\relax + \meaning\expandafter\MT@char\MT@charstring\relax\relax\relax \ifnum\MT@char@ < \z@ % \end{macrocode} %\changes{v2.7c}{2019/08/13}{take care of \cs{remove@tlig}} -% For encoding, the commands \cmd\textquotesingle, \cmd\textasciigrave\ -% and \cmd\textquotedbl\ are defined by means of the auxiliary macro +% In encoding, some commands (currently, \cmd\textquotesingle, \cmd\textasciigrave\ +% and \cmd\textquotedbl) are defined by means of the auxiliary macro % \cmd\remove@tlig, which we take care of here. % \begin{macrocode} \expandafter\expandafter\expandafter\MT@is@tlig\MT@char\relax\relax @@ -9068,6 +9083,24 @@ end } % \end{macrocode} %\end{macro} +%\begin{macro}{\MT@is@opt@char} +% This seems adventurous, but we're only redefining the text command within +% the scope of our setup. +%\changes{v2.8c}{2021/03/05}{fix for optionally defined glyphs +% (reported by \contributor Frank Mittelbach )} +% ^^A private mail, 2021/03/02 +% ^^A also: https://github.com/latex3/latex2e/issues/525 +% \begin{macrocode} +\def\MT@is@opt@char#1\iffontchar#2\char#3\else#4\fi\relax{% + \ifx\\#1\\% + \iffontchar#2% + \expandafter\chardef + \csname\MT@encoding\MT@detokenize@c\@tempa\endcsname=#3\relax + \fi + \fi +} +% \end{macrocode} +%\end{macro} %\begin{macro}{\MT@is@char} %\begin{macro}{\MT@charstring} % A helper macro that inspects the \cmd\meaning\ of its argument. @@ -9144,14 +9177,26 @@ end % This might have to change again with the next \LaTeX\ release, ^^A see https://github.com/latex3/latex2e/issues/165 % \dots\ or so I feared, but it still seems to be fine. % \begin{macrocode} -\def\MT@is@tlig#1#2{% - \ifx#1\remove@tlig +\def\MT@is@tlig#1#2\relax{% + \ifx\remove@tlig#1% % \MT@dinfo@nl{3}{> `\the\MT@toks' (removing remove@tlig)}% - \MT@is@number #2\relax\relax + \MT@remove@tlig \fi } % \end{macrocode} %\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 +% (reported by \contributor Frank Mittelbach )} +% ^^A private mail, 2021/03/02 +% \begin{macrocode} +\def\MT@remove@tlig{% + \expandafter\MT@exp@two@c\expandafter\MT@is@number + \expandafter\@secondoftwo\MT@char\relax\relax +} +% \end{macrocode} +%\end{macro} %\begin{macro}{\MT@is@composite} % Here, we are dealing with accented characters, specified as two tokens. %\changes{v1.7}{2005/03/10}{new macro: construct command for composite character; @@ -9205,7 +9250,7 @@ end % Helper for \cs{DeclareUnicodeComposite}. % \begin{macrocode} \def\MT@is@uni@comp#1\iffontchar#2\else#3\fi\relax{% - \ifx\\#2\\\else\edef\MT@char{\iffontchar#2\fi}\fi + \ifx\\#1\\\edef\MT@char{\iffontchar#2\fi}\fi } % \end{macrocode} %\end{macro} @@ -10162,10 +10207,10 @@ end ^^X \def\MT@get@size@{% ^^X \@tempcnta=\currentiflevel ^^X \MT@get@size@@ -^^X \loop +^^X \MT@loop ^^X \ifnum\numexpr\currentiflevel-1>\@tempcnta ^^X \csname fi\endcsname -^^X \repeat +^^X \MT@repeat ^^X }% ^^X}{% \let\MT@get@size@\MT@get@size@@ @@ -17363,7 +17408,7 @@ normal, and shrunk by 5\%: % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% \CheckSum{10800} +% \CheckSum{10847} % % \Finale % -- cgit v1.2.3