From 888b15f68d68b9c64fc5f046ffd99c948a3b8f72 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 20 Jun 2022 21:08:21 +0000 Subject: microtype (20jun22) git-svn-id: svn://tug.org/texlive/trunk@63666 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/microtype/letterspace.sty | 2 +- .../tex/latex/microtype/microtype-luatex.def | 14 +- .../tex/latex/microtype/microtype-pdftex.def | 12 +- .../tex/latex/microtype/microtype-show.sty | 2 +- .../tex/latex/microtype/microtype-xetex.def | 8 +- .../texmf-dist/tex/latex/microtype/microtype.cfg | 12 +- .../texmf-dist/tex/latex/microtype/microtype.lua | 4 +- .../texmf-dist/tex/latex/microtype/microtype.sty | 251 ++++++++++++++------- 8 files changed, 199 insertions(+), 106 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/microtype/letterspace.sty b/Master/texmf-dist/tex/latex/microtype/letterspace.sty index 14ee42263e9..4946ea39049 100644 --- a/Master/texmf-dist/tex/latex/microtype/letterspace.sty +++ b/Master/texmf-dist/tex/latex/microtype/letterspace.sty @@ -34,7 +34,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage {letterspace} - [2022/03/14 v3.0d + [2022/06/20 v3.0e Robust letterspacing (RS)] \def\MT@MT diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def b/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def index 188a1d018ad..6784d6693ad 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def @@ -31,7 +31,7 @@ %% \ProvidesFile {microtype-luatex.def} - [2022/03/14 v3.0d + [2022/06/20 v3.0e Definitions specific to luatex (RS)] @@ -58,8 +58,8 @@ #1{\ifnum \MT@luatex@no <#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi} -\@ifl@t@r\fmtversion{2016/01/01}\relax{\RequirePackage{luatexbase}} -\@ifl@t@r\fmtversion{2017/01/01}\relax{\RequirePackage{luaotfload}} +\IfFormatAtLeastTF{2016/01/01}\relax{\RequirePackage{luatexbase}} +\IfFormatAtLeastTF{2017/01/01}\relax{\RequirePackage{luaotfload}} \MT@lua{require("microtype")} \MT@requires@luatex6{\let\MT@glet\glet}\relax \def\MT@ifint#1{\csname\MT@lua{microtype.if_int([[#1]])}\endcsname} @@ -265,12 +265,14 @@ \fi \rpcode\MT@font #2=\numexpr\rpcode\MT@font#1+\@tempcnta\relax } +\def\MT@enc@list + {{TU}} \def\MT@prot@addtoken@next#1{% - \edef\MT@temp{\MT@toks={\the\MT@toks\noexpand#1}}\MT@temp + \MT@toks\expandafter{\the\MT@toks#1}% \setbox\MT@tempbox\hbox{\the\MT@toks }\setbox\MT@tempbox\hbox{\unhbox\MT@tempbox \ifnum\lastnodetype=7 \aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi}% - \MT@prot@get@nextchar + \MT@prot@get@nexttoken {\MT@prot@l{\the\MT@toks}}% } \def\MT@expansion{\MT@maybe@do{ex}} @@ -1161,7 +1163,7 @@ \MT@check@active@set{ex}% \MT@ifdefined@n@TF{showhyphens }{% \def\MT@temp##1##2{% - \expandafter\CheckCommand\csname showhyphens \endcsname[1]{##1}% + \MT@exp@cs\CheckCommand{showhyphens }[1]{##1}% \DeclareRobustCommand\showhyphens[1]{##2}}% }{% \def\MT@temp##1##2{% diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def b/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def index 892d82ca52f..707c79a0fc3 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def @@ -31,7 +31,7 @@ %% \ProvidesFile {microtype-pdftex.def} - [2022/03/14 v3.0d + [2022/06/20 v3.0e Definitions specific to pdftex (RS)] @@ -351,12 +351,14 @@ \fi \rpcode\MT@font #2=\numexpr\rpcode\MT@font#1+\@tempcnta\relax } +\def\MT@enc@list + {{T1}{OT1}} \def\MT@prot@addtoken@next#1{% - \edef\MT@temp{\MT@toks={\the\MT@toks\noexpand#1}}\MT@temp + \MT@toks\expandafter{\the\MT@toks#1}% \setbox\MT@tempbox\hbox{\the\MT@toks \relax \ifnum\lastnodetype=7 \aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi}% - \MT@prot@get@nextchar + \MT@prot@get@nexttoken {\MT@prot@l{\the\MT@toks}}% } \def\MT@expansion{\MT@maybe@do{ex}} @@ -615,7 +617,7 @@ \MT@vinfo{Tracking font `\MT@@font'\on@line}% \MT@requires@pdftex8\@firstofone{% \MT@ifdefined@n@TF{\MT@@font-fake6}{% - \expandafter\ifx\csname\MT@@font-fake6\endcsname\@empty + \MT@exp@cs\ifx{\MT@@font-fake6}\@empty \MT@warning@nl{% Font `\MT@@font' does not specify its\MessageBreak \@backslashchar fontdimen 6 (width of an `em')! Therefore,\MessageBreak @@ -1458,7 +1460,7 @@ \MT@check@active@set{ex}% \MT@ifdefined@n@TF{showhyphens }{% \def\MT@temp##1##2{% - \expandafter\CheckCommand\csname showhyphens \endcsname[1]{##1}% + \MT@exp@cs\CheckCommand{showhyphens }[1]{##1}% \DeclareRobustCommand\showhyphens[1]{##2}}% }{% \def\MT@temp##1##2{% diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-show.sty b/Master/texmf-dist/tex/latex/microtype/microtype-show.sty index 226ba8c8e1c..29a9b073db2 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-show.sty +++ b/Master/texmf-dist/tex/latex/microtype/microtype-show.sty @@ -34,7 +34,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage {microtype-show} - [2022/03/14 v3.0d + [2022/06/20 v3.0e Visual debugging for the microtype package (RS)] \RequirePackage{iftex} diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def b/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def index c909b45431d..0ce2b984198 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def @@ -31,7 +31,7 @@ %% \ProvidesFile {microtype-xetex.def} - [2022/03/14 v3.0d + [2022/06/20 v3.0e Definitions specific to xetex (RS)] @@ -225,12 +225,14 @@ \fi \rpcode\MT@font #2=\numexpr\rpcode\MT@font#1+\@tempcnta\relax } +\def\MT@enc@list + {{TU}} \def\MT@prot@addtoken@next#1{% - \edef\MT@temp{\MT@toks={\the\MT@toks\noexpand#1}}\MT@temp + \MT@toks\expandafter{\the\MT@toks#1}% \setbox\MT@tempbox\hbox{\the\MT@toks \relax \ifnum\lastnodetype=7 \aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi}% - \MT@prot@get@nextchar + \MT@prot@get@nexttoken {\MT@prot@l{\the\MT@toks}}% } \DeclareRobustCommand\lsstyle{% diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.cfg b/Master/texmf-dist/tex/latex/microtype/microtype.cfg index 28f93c09fad..73c6e01d478 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.cfg +++ b/Master/texmf-dist/tex/latex/microtype/microtype.cfg @@ -41,7 +41,7 @@ %% \ProvidesFile {microtype.cfg} - [2022/03/14 v3.0d + [2022/06/20 v3.0e microtype main configuration file (RS)] @@ -154,9 +154,9 @@ \DeclareMicrotypeAlias{Asana Math} {Palatino} %% -- Times New Roman \DeclareMicrotypeAlias{txr}{ptm} % txfonts -\DeclareMicrotypeAlias{ntxlf}{ptmx} % newtxtext -\DeclareMicrotypeAlias{ntxosf}{ptmj} % " -\DeclareMicrotypeAlias{ntxtlf}{ptmx} % " +\DeclareMicrotypeAlias{ntxlf} {ptmx} % newtxtext +\DeclareMicrotypeAlias{ntxtlf} {ptmx} % " +\DeclareMicrotypeAlias{ntxosf} {ptmj} % " \DeclareMicrotypeAlias{ntxtosf}{ptmj} % " \DeclareMicrotypeAlias{Tempora-TLF} {ptmx} % tempora \DeclareMicrotypeAlias{Tempora-TOsF}{ptmj} % " @@ -165,6 +165,10 @@ \DeclareMicrotypeAlias{STEP-TOsF}{ptmj} % " \DeclareMicrotypeAlias{stix} {ptm} % stix \DeclareMicrotypeAlias{stix2}{ptm} % stix2 +\DeclareMicrotypeAlias{SticksTooText-LF} {ptmx} +\DeclareMicrotypeAlias{SticksTooText-TLF} {ptmx} +\DeclareMicrotypeAlias{SticksTooText-OsF} {ptmj} +\DeclareMicrotypeAlias{SticksTooText-TOsF}{ptmj} %% -- Charter \DeclareMicrotypeAlias{chr}{bch} % CH Math \DeclareMicrotypeAlias{XCharter-TLF} {bch} % XCharter diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.lua b/Master/texmf-dist/tex/latex/microtype/microtype.lua index 250e56f0d6a..1ccfb4c9fcb 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.lua +++ b/Master/texmf-dist/tex/latex/microtype/microtype.lua @@ -35,8 +35,8 @@ microtype = microtype or {} local microtype = microtype microtype.module = { name = "microtype", - version = "3.0d", - date = "2022/03/14", + version = "3.0e", + date = "2022/06/20", description = "microtype module.", author = "E. Roux, R. Schlicht and P. Gesang", copyright = "E. Roux, R. Schlicht and P. Gesang", diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.sty b/Master/texmf-dist/tex/latex/microtype/microtype.sty index cc7777a1002..f9763221d29 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.sty +++ b/Master/texmf-dist/tex/latex/microtype/microtype.sty @@ -30,7 +30,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage {microtype} - [2022/03/14 v3.0d + [2022/06/20 v3.0e Micro-typographical refinements (RS)] \def\MT@MT @@ -186,6 +186,7 @@ \endinput\fi \RequirePackage{keyval}[1997/11/10] ^^X\RequirePackage{etoolbox} +\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \newtoks\MT@toks \newbox\MT@tempbox \newif\ifMT@if@ @@ -469,7 +470,7 @@ \MT@with@package@T{fontspec}\MT@fontspectrue \newif\ifMT@xunicode \MT@with@package@T{xunicode}\MT@xunicodetrue -\@ifl@t@r\fmtversion{2020/10/01} +\IfFormatAtLeastTF{2020/10/01} {\IfFormatAtLeastTF{2021/11/15} {\AddToHook{package/fontspec/after}{\MT@fontspectrue}} {\AddToHook{package/after/fontspec}{\MT@fontspectrue}}}\relax @@ -523,7 +524,10 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@with@package@T{csquotes}{% \@ifpackagelater{csquotes}{2005/05/11}{% \g@addto@macro\MT@setupfont@hook\@disablequotes - ^^X\apptocmd\csq@bqgroup{\let\MT@csq@eqgroup\csq@eqgroup}\relax\relax + \g@addto@macro\MT@prot@hook{% + \def\csq@bqgroup{\begingroup\leavevmode + \let\MT@csq@eqgroup\endgroup}% + \let\csq@eqgroup\endgroup}% }{% \MT@warning@nl{% Should you receive warnings about unknown slot\MessageBreak @@ -691,7 +695,9 @@ time will almost certainly lead to undesired results. Have your choice!}% \@ifpackageloaded{amsmath} {\MT@patch@patch\tagform@{(}{\leftprotrusion{(}}% \MT@patch@patch\tagform@{)}{\rightprotrusion{)}}% - \MT@patch@patch\eqref{\tagform@}{\@nameuse{MT@patch@saved@\string\tagform@}}% + \MT@ifdefined@n@TF{eqref } + {\MT@exp@cs\MT@patch@patch{eqref }}{\MT@patch@patch\eqref} + {\tagform@}{\@nameuse{MT@patch@saved@\string\tagform@}}% \MT@with@package@T{mathtools}{% \ifMT@patch@ok\else \MT@patch@oktrue \MT@info@nl{The `eqnum' patch may not be effective because you are\MessageBreak @@ -705,7 +711,14 @@ time will almost certainly lead to undesired results. Have your choice!}% }{}% \MT@define@patch{footnote}{% \@ifpackageloaded{hyperref} - {\ifHy@hyperfootnotes\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + {\MT@if@false + \ifHy@implicit + \ifHy@hyperfootnotes + \MT@ifdefined@c@TF\hyper@nopatch@footnote\relax + \MT@if@true + \fi + \fi + \ifMT@if@\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} \@secondoftwo {\MT@patch@patch\@footnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}% \MT@patch@patch\@footnotetext{\@empty\ignorespaces}{\@empty\ignorespaces\leftprotrusion}% @@ -716,12 +729,17 @@ time will almost certainly lead to undesired results. Have your choice!}% {{\expandafter\hyper@@anchor\expandafter {\Hy@footnote@currentHref}{\relax}}\ignorespaces\leftprotrusion}} {\@ifclassloaded{memoir} - {\MT@patch@patch\@footnotetext{\foottextfont #1}{\foottextfont\leftprotrusion #1}% - \MT@patch@patch\@mpfootnotetext{\foottextfont #1}{\foottextfont\leftprotrusion #1}} - {\MT@patch@patch\@mpfootnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}% - \@ifpackageloaded{scrkbase} - {\MT@patch@patch\scr@saved@footnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}}% - {\MT@patch@patch\@footnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}}}}% + {\MT@patch@patch\@footnotetext{\foottextfont #1}{\foottextfont\leftprotrusion #1}% + \MT@patch@patch\@mpfootnotetext{\foottextfont #1}{\foottextfont\leftprotrusion #1}} + {\@ifclassloaded{beamer} + {\MT@exp@cs\MT@patch@patch{beamerx@\string\beamer@framefootnotetext} + {\ignorespaces}{\ignorespaces\leftprotrusion}% + \MT@exp@cs\MT@patch@patch{beamerx@\string\@mpfootnotetext} + {\ignorespaces}{\ignorespaces\leftprotrusion}} + {\@ifpackageloaded{scrkbase} + {\MT@patch@patch\scr@saved@footnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}}% + {\MT@patch@patch\@footnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}}% + \MT@patch@patch\@mpfootnotetext{\ignorespaces}{\ignorespaces\leftprotrusion}}}}% }{}% \MT@redefined@patches }} @@ -1027,8 +1045,10 @@ time will almost certainly lead to undesired results. Have your choice!}% \DeclareRobustCommand\noprotrusionifhmode{\relax\ifhmode\kern-\p@\kern\p@\fi} \DeclareRobustCommand\leftprotrusion{% \MT@toks{}% - \MT@prot@get@firstchar + \MT@prot@false + \MT@prot@get@firstgroup } +\newif\ifMT@prot@ \def\MT@prot@l#1{% \MT@get@prot{#1}{left}% #1% @@ -1040,11 +1060,9 @@ time will almost certainly lead to undesired results. Have your choice!}% } \let\MT@prot@hook\@empty \let\MT@csq@eqgroup\relax -\ifx\RawNoindent\@undefined - \let\MT@noindent\noindent -\else - \let\MT@noindent\RawNoindent -\fi +\IfFormatAtLeastTF{2021/11/15} + {\let\MT@noindent\RawNoindent} + {\let\MT@noindent\noindent} \def\MT@get@prot#1#2{% \begingroup \setbox\MT@tempbox\vbox{% @@ -1056,7 +1074,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \interlinepenalty\z@ \@newlistfalse \MT@prot@hook - \MT@noindent #1\MT@csq@eqgroup}% + \MT@noindent #1\relax\MT@csq@eqgroup}% \vbadness=\@M \splittopskip=\z@ \vfuzz=\maxdimen @@ -1068,10 +1086,10 @@ time will almost certainly lead to undesired results. Have your choice!}% \fi }% \endgroup - \leavevmode \ifhbox\MT@tempbox \@tempdima=\@nameuse{#2marginkern}\MT@tempbox\relax \expandafter\ifdim\@tempdima=\z@ \else + \leavevmode \MT@vinfo{|<< adding #2 margin kern for `#1':\MessageBreak \the\@tempdima \on@line}% \kern\@tempdima @@ -1084,19 +1102,8 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@prot@ifcat#1{% \ifcat#1\noexpand\MT@prot@next\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi } -^^X\def\MT@prot@ifmacro{% -^^X \expandafter\MT@prot@ifmacro@\meaning\MT@prot@next\@nil -^^X} -^^X\edef\MT@prot@ifmacro@#1\@nil{% -^^X \noexpand\MT@prot@ifmacro@@#1{}{}\detokenize{macro:->}\noexpand\@nil -^^X} -^^X\edef\MT@temp{% -^^X \def\noexpand\MT@prot@ifmacro@@##1\detokenize{macro:->}##2\noexpand\@nil{% -^^X \noexpand\ifx\relax##1\relax -^^X \unexpanded{\expandafter\@firstofone\else\expandafter\@gobble\fi}% -^^X }% -^^X} -^^X\MT@temp +^^X\def\MT@prot@ifmacro@{% +^^X \ifdefmacro\MT@prot@next{\ifdefparam\MT@prot@next\@gobble\@firstofone}\@gobble} ^^Q\let\MT@prot@ifmacro\@gobble \def\MT@prot@iffirstcmd#1{% \ifx\relax#1\expandafter\@secondoftwo\else @@ -1115,59 +1122,97 @@ 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{##1##2}}% + \def\MT@temp*##1##2{\MT@prot@l{\the\MT@toks##1##2}}% \else - \def\MT@temp*##1{\MT@prot@l{##1}}% + \def\MT@temp*##1{\MT@prot@l{\the\MT@toks##1}}% \fi - \@gobble - }\@firstofone + \MT@tlist@break + }\relax +} +\MT@addto@setup{% + \ifx\@fontenc@load@list\@undefined \else + \def\@elt#1{,#1,}% + \edef\@tempa{\@fontenc@load@list}% + \MT@map@clist@c\@tempa{% + \MT@ifempty{#1}\relax{% + \MT@in@tlist{#1}\MT@enc@list + \ifMT@inlist@\else\edef\MT@enc@list{\MT@enc@list{#1}}\fi + }% + }% + \fi +} +\def\MT@prot@addgroup{\bgroup\afterassignment\MT@prot@get@firsttoken\let\MT@temp= } +\def\MT@prot@get@firstgroup{\futurelet\MT@prot@next\MT@prot@get@first@group} +\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} +\def\MT@prot@check#1{\MT@prot@check@#1} +\def\MT@prot@check@#1#2{% + \ifx\MT@prot@next#2% + \MT@prot@true + \csname MT@prot@check@#1\endcsname + \let\MT@prot@ifmacro\@gobble + \expandafter\MT@tlist@break + \fi +} +\def\MT@prot@check@I{% + \def\MT@temp*##1{\MT@prot@get@firsttoken}% +} +\def\MT@prot@check@S{% + \def\MT@temp*##1{\MT@toks\expandafter{\the\MT@toks##1}\MT@prot@get@firsttoken}% +} +\def\MT@prot@check@O{% + \def\MT@temp*##1##2{\MT@toks\expandafter{\the\MT@toks##1{##2}}\MT@prot@get@firsttoken}% +} +\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@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\normalfont}{S\selectfont}% + {S\tiny}{S\scriptsize}{S\footnotesize}{S\small}{S\normalsize}% + {S\large}{S\Large}{S\LARGE}{S\huge}{S\Huge}% + {O\fontencoding}{O\fontfamily}{O\fontseries}{O\fontshape}% + {T\fontsize}% +} +\MT@addto@setup{% + \MT@with@package@T{yfonts} + {\g@addto@macro\MT@prot@check@cmds{{S\frakfamily}{S\swabfamily}{S\gothfamily}}}% } -\def\MT@prot@group{\bgroup\afterassignment\MT@prot@get@firstchar\let\MT@temp= } -\def\MT@prot@get@firstchar{\futurelet\MT@prot@next\MT@prot@get@first@char} -\def\MT@prot@get@nextchar{\futurelet\MT@prot@next\MT@prot@get@next@char} -\def\MT@prot@get@first@char{% +\def\MT@prot@get@first@group{% \MT@prot@ifcat\bgroup{% - \def\MT@temp*{\MT@prot@group}% + \def\MT@temp*{\MT@prot@addgroup}% }{% - \MT@prot@ifx\ignorespaces{% - \def\MT@temp*##1{\MT@prot@get@firstchar}% + \def\MT@temp*{\MT@prot@get@first@token}% + }% + \MT@temp*% +} +\def\MT@prot@get@first@token{% + \def\MT@temp*{\ifMT@prot@\MT@prot@l{\the\MT@toks}\fi}% + \MT@prot@ifcat{a}{% + \def\MT@temp*{\MT@prot@addtoken@first}% + }{% + \MT@prot@ifcat{!}{% + \def\MT@temp*{\MT@prot@addtoken@first}% }{% - \MT@prot@ifx\relax{% - \def\MT@temp*##1{\MT@prot@get@firstchar}% + \MT@prot@ifx\@sptoken{% + \def\MT@temp* {\MT@prot@get@firsttoken}% }{% - \MT@prot@ifx\@sptoken{% - \def\MT@temp* {\MT@prot@get@firstchar}% - }{% - \MT@prot@ifcat{a}{% - \def\MT@temp*{\MT@prot@addtoken@first}% + \let\MT@prot@ifmacro\MT@prot@ifmacro@ + \MT@map@tlist@c\MT@prot@check@cmds\MT@prot@check + \MT@prot@ifmacro{% + \MT@prot@iffirstcmd\UTFviii@two@octets{% + \def\MT@temp*##1##2{\MT@prot@l{\the\MT@toks##1##2}}% }{% - \MT@prot@ifcat{!}{% - \def\MT@temp*{\MT@prot@addtoken@first}% + \MT@prot@iffirstcmd\UTFviii@three@octets{% + \def\MT@temp*##1##2##3{\MT@prot@l{\the\MT@toks##1##2##3}}% }{% - \def\MT@temp*{}% - \MT@prot@ifmacro{% - \MT@prot@iffirstcmd\UTFviii@two@octets{% - \def\MT@temp*##1##2{\MT@prot@l{##1##2}}% - }{% - \MT@prot@iffirstcmd\UTFviii@three@octets{% - \def\MT@temp*##1##2##3{\MT@prot@l{##1##2##3}}% - }{% - \MT@prot@iffirstcmd\UTFviii@four@octets{% - \def\MT@temp*##1##2##3##4{\MT@prot@l{##1##2##3##4}}% - }{% - \MT@prot@iffirstcmd\csqQQ{\def\MT@temp*##1{\MT@prot@l{##1}}}{% - \MT@prot@iflicrcmd{T1}{% - \MT@prot@iflicrcmd{TU}{% - \MT@prot@iflicrcmd{LY1}{% - \MT@prot@iflicrcmd{OT1}{% - \MT@prot@iflicrcmd{T2A}\relax % should we add more encodings? - }% - }% - }% - }% - }% - }% - }% + \MT@prot@iffirstcmd\UTFviii@four@octets{% + \def\MT@temp*##1##2##3##4{\MT@prot@l{\the\MT@toks##1##2##3##4}}% + }{% + \MT@prot@iffirstcmd\csqQQ{\def\MT@temp*##1{\MT@prot@l{\the\MT@toks##1}}}{% + \MT@map@tlist@c\MT@enc@list\MT@prot@iflicrcmd }% }% }% @@ -1178,7 +1223,11 @@ time will almost certainly lead to undesired results. Have your choice!}% }% \MT@temp*% } -\def\MT@prot@get@next@char{% +\def\MT@prot@addtoken@first#1{% + \MT@toks\expandafter{\the\MT@toks#1}% + \MT@prot@get@nexttoken +} +\def\MT@prot@get@next@token{% \def\MT@temp*{\MT@prot@addtoken@next}% \MT@prot@ifcat{a}\relax{% \MT@prot@ifcat{!}\relax{% @@ -1187,10 +1236,6 @@ time will almost certainly lead to undesired results. Have your choice!}% }% \MT@temp*% } -\def\MT@prot@addtoken@first#1{% - \edef\MT@temp{\MT@toks={\the\MT@toks\noexpand#1}}\MT@temp - \MT@prot@get@nextchar -} \newif\ifMT@nonselected \DeclareRobustCommand\textls{% \@ifstar{\let\MT@ls@adjust@\MT@ls@adjust@empty\MT@textls}% @@ -1490,6 +1535,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@undefined@char{utf8}\else\expandafter ##1\fi}% \MT@ifdefined@c@T\PrerenderUnicode {\PrerenderUnicode{\@tempa}\let\unicode@charfilter\@firstofone}% + \MT@is@active@hook{#1}% \edef\x{\endgroup \def\noexpand\@tempa{\expandafter\expandafter\expandafter\@empty\@tempa}% \MT@toks={\the\MT@toks\space(= @@ -1498,6 +1544,44 @@ time will almost certainly lead to undesired results. Have your choice!}% \x \fi } +\let\MT@is@active@hook\@gobble +^^Q\@gobble +{\catcode`\#=12 +\MT@addto@setup{% + \MT@with@package@T{listings}{% + \apptocmd\MT@is@active@hook{% + \MT@ifdefined@n@T{lst@ShortInlineOldCatcode\string#1}{% + \catcode`#1=\csname lst@ShortInlineOldCatcode\string#1\endcsname\relax + \ifnum\catcode`#1=\active + \begingroup + \catcode`\~\active \lccode`\~`#1% + \lowercase{\endgroup + \MT@let@cn~{lst@ShortInlineOldMeaning\string#1}}% + \else + \def\@tempa{#1}% + \fi + }% + }{}{}% + }% + \MT@if@false + \MT@with@package@T{doc}\MT@if@true + \MT@with@package@T{shortvrb}\MT@if@true + \ifMT@if@\expandafter\@firstofone\else\expandafter\@gobble\fi{% + \apptocmd\MT@is@active@hook{% + \MT@ifdefined@n@T{cc\string#1}{% + \catcode`#1=\csname cc\string#1\endcsname\relax + \ifnum\catcode`#1=\active + \begingroup + \catcode`\~\active \lccode`\~`#1% + \lowercase{\endgroup + \MT@let@cn~{ac\string#1}}% + \else + \def\@tempa{#1}% + \fi + }% + }{}{}% + }% +}} \def\MT@undefined@char#1{undefined in input encoding ``#1''} \def\MT@is@symbol{% \expandafter\def\expandafter\MT@char\expandafter @@ -1516,8 +1600,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@is@opt@char#1\iffontchar#2\char#3\else#4\fi\relax{% \MT@ifempty{#1}{% \iffontchar#2% - \expandafter\chardef - \csname\MT@encoding\MT@detokenize@c\@tempa\endcsname=#3\relax + \MT@exp@cs\chardef{\MT@encoding\MT@detokenize@c\@tempa}=#3\relax \fi }\relax } @@ -1880,7 +1963,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \expandafter\MT@test@ast\MT@val*\@nil\relax{% \MT@ifempty\@tempa{\def\@tempa{#1}}\relax \MT@ifdefined@n@TF{\@tempa default}% - {\edef\MT@val{\expandafter\noexpand\csname \@tempa default\endcsname}}% + {\edef\MT@val{\MT@exp@cs\noexpand{\@tempa default}}}% {\MT@warning{`\@backslashchar\@tempa default' is not a defined command.\MessageBreak Ignoring `#1 = {\@tempa*}' in font set\MessageBreak`\MT@curr@set@name'}% \let\MT@val\@empty}% -- cgit v1.2.3