diff options
author | Karl Berry <karl@freefriends.org> | 2021-10-31 21:08:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-10-31 21:08:53 +0000 |
commit | 2df086481eed9b96ca38f21228299834a8bf0daa (patch) | |
tree | e0b71f448e52fcda18c7eafa45ae23ba60e777cb /Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def | |
parent | 86788abd74eb263275a4cdd8887f8501055ef29f (diff) |
microtype (31oct21)
git-svn-id: svn://tug.org/texlive/trunk@60913 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def | 154 |
1 files changed, 92 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def b/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def index ead3d149558..7bb387536b1 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def @@ -4,7 +4,7 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `pdftex-def') +%% microtype.dtx (with options: `pdf-') %% %% ------------------------------------------------------------------------ %% @@ -18,11 +18,12 @@ %% http://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. %% -%% This work has the LPPL maintenance status `author-maintained'. +%% This work has the LPPL maintenance status `maintained'. %% -%% This work consists of the files microtype.dtx and microtype.ins and the -%% derived files microtype.sty, microtype-pdftex.def, microtype-luatex.def, -%% microtype-xetex.def, microtype.lua and letterspace.sty. +%% This work consists of the files microtype.dtx, microtype-utf.dtx and +%% microtype.ins and the derived files microtype.sty, microtype-pdftex.def, +%% microtype-luatex.def, microtype-xetex.def, microtype.lua, letterspace.sty +%% and microtype-show.sty. %% %% ------------------------------------------------------------------------ %% This file contains enginge-specific definitions. @@ -30,14 +31,17 @@ %% \ProvidesFile {microtype-pdftex.def} - [2021/03/14 v2.8c + [2021/10/31 v3.0 Definitions specific to pdftex (RS)] -\def\MT@pdftex@no{7} +\def\MT@pdftex@no{8} \ifnum\pdftexversion = 140 - \ifnum\pdftexrevision < 4 - \def\MT@pdftex@no{6} + \ifnum\pdftexrevision < 23 + \def\MT@pdftex@no{7} + \ifnum\pdftexrevision < 4 + \def\MT@pdftex@no{6} + \fi \fi \else \ifnum\pdftexversion < 140 @@ -236,13 +240,13 @@ \pdffontsize\MT@font \MT@info{Fixing zero \string\fontdimen 6 for font `\MT@@font'\MessageBreak (new value: \the\fontdimen6\MT@font)}% - \MT@glet@nc{\MT@@font-fake6}\@empty + \MT@requires@pdftex8\relax{\MT@glet@nc{\MT@@font-fake6}\@empty}% \fi \edef\MT@dimen@six{\number\fontdimen6\MT@font}% } -\def\MT@protrusion{\MT@maybe@do{pr}} -\def\MT@set@pr@codes{% - \MT@nofamilyfalse +\def\MT@set@pr@codes + {% + \MT@nofamilyfalse \MT@if@list@exists{% \ifMT@nofamily \MT@ifdefined@n@TF{\MT@encoding-\MT@family-settings}\relax{% @@ -261,7 +265,9 @@ \MT@set@listname \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% \expandafter\MT@set@codes\@tempc,\relax,% - }\MT@reset@pr@codes + \MT@set@pr@prefixheirs + }% + \MT@reset@pr@codes } \def\MT@set@all@pr#1#2{% \let\MT@temp\@empty @@ -293,15 +299,17 @@ \fi \fi } -\def\MT@pr@split@val#1,#2\relax{% - \def\@tempb{#1}% - \MT@ifempty\@tempb\relax{% - \MT@scale@to@em +\def\MT@pr@split@val#1,#2\relax + {\def\@tempb{#1}% + \MT@ifempty\@tempb + \relax + {\MT@scale@to@em \lpcode\MT@font\MT@char=\MT@the@pr@code }% \def\@tempb{#2}% - \MT@ifempty\@tempb\relax{% - \MT@scale@to@em + \MT@ifempty\@tempb + \relax + {\MT@scale@to@em \rpcode\MT@font\MT@char=\MT@the@pr@code }% \MT@ifdefined@c@T\MT@pr@inh@name{% @@ -341,41 +349,31 @@ } \def\MT@get@charwd{\MT@count=\MT@dimen@six} } -\def\MT@set@pr@heirs#1{% - \lpcode\MT@font #1=\lpcode\MT@font\MT@char\relax - \rpcode\MT@font #1=\rpcode\MT@font\MT@char\relax -} -\def\MT@preset@pr{% - \expandafter\expandafter\expandafter\MT@preset@pr@ - \csname MT@pr@c@\MT@pr@c@name @preset\endcsname\@nil -} -\def\MT@preset@pr@#1,#2\@nil{% - \ifx\MT@pr@unit@\@empty - \MT@warn@preset@towidth{pr}% - \let\MT@preset@aux\MT@preset@aux@factor - \else - \def\MT@preset@aux{\MT@preset@aux@space2}% +\def\MT@set@pr@prefixes#1{\MT@set@pr@prefixes@#1} +\def\MT@set@pr@prefixes@#1#2#3#4% + {% + \@tempcnta=\z@ + \ifnum#3>\z@ + \@tempcnta=\numexpr + (\fontcharwd\MT@font#2-\fontcharwd\MT@font#1)% + *#3/\MT@dimen@six\relax \fi - \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}% - \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}% - \MT@set@all@pr\@tempa\@tempb -} -\def\MT@preset@aux@factor#1#2{% - \@tempcntb=#1\relax - \MT@scale@factor - \edef#2{\number\@tempcntb}% -} -\def\MT@preset@aux@space#1#2#3{% - \def\@tempb{#2}% - \MT@get@space@unit#1% - \MT@scale@to@em - \edef#3{\number\@tempcntb}% + \lpcode\MT@font #2=\numexpr\lpcode\MT@font#1+\@tempcnta\relax + \@tempcnta=\z@ + \ifnum#4>\z@ + \@tempcnta=\numexpr + (\fontcharwd\MT@font#2-\fontcharwd\MT@font#1)% + *#4/\MT@dimen@six\relax + \fi + \rpcode\MT@font #2=\numexpr\rpcode\MT@font#1+\@tempcnta\relax } -\def\MT@warn@preset@towidth#1{% - \MT@warning@nl{% - Cannot preset characters relative to their widths\MessageBreak - for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'. Presetting them% - \MessageBreak relative to 1em instead}% +\def\MT@prot@addtoken@next#1{% + \edef\MT@temp{\MT@toks={\the\MT@toks\noexpand#1}}\MT@temp + \setbox\MT@tempbox\hbox{\the\MT@toks + \relax + \ifnum\lastnodetype=7 \aftergroup\@firstoftwo\else\aftergroup\@secondoftwo\fi}% + \MT@prot@get@nextchar + {\MT@prot@l{\the\MT@toks}}% } \def\MT@expansion{\MT@maybe@do{ex}} \def\MT@set@ex@codes@s{% @@ -631,14 +629,16 @@ \MT@tracking@ \def\MT@set@tr@codes{% \MT@vinfo{Tracking font `\MT@@font'\on@line}% - \MT@ifdefined@n@TF{\MT@@font-fake6}{% - \expandafter\ifx\csname\MT@@font-fake6\endcsname\@empty - \MT@warning@nl{% - Font `\MT@@font' does not specify its\MessageBreak - \@backslashchar fontdimen 6 (width of an `em')! Therefore,\MessageBreak - \@nameuse{MT@abbr@\MT@feat} will not work with this font}% - \MT@glet@nc{\MT@@font-fake6}\relax - \fi + \MT@requires@pdftex8\@firstofone{% + \MT@ifdefined@n@TF{\MT@@font-fake6}{% + \expandafter\ifx\csname\MT@@font-fake6\endcsname\@empty + \MT@warning@nl{% + Font `\MT@@font' does not specify its\MessageBreak + \@backslashchar fontdimen 6 (width of an `em')! Therefore,\MessageBreak + tracking will not work with this font}% + \MT@glet@nc{\MT@@font-fake6}\relax + \fi + }% }{% \MT@if@list@exists \MT@get@tr@opt @@ -1214,6 +1214,7 @@ \def\MT@inh@split#1=#2=#3\relax{% \def\@tempa{#1}% \ifx\@tempa\@empty \else + \expandafter\MT@has@inh@prefix\@tempa()\relax\@nil \MT@get@slot \ifnum\MT@char > \m@ne \let\MT@val\MT@char @@ -1222,13 +1223,42 @@ \ifx\@tempa\@empty \else \MT@get@slot \ifnum\MT@char > \m@ne - \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}% + \ifx\MT@inh@prefix\@empty + \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}% + \else + \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @prefixes}% + {{{\MT@val}{\MT@char}\MT@inh@prefix@}}% + \fi \fi \fi }% \fi \fi } +\def\MT@has@inh@prefix#1(#2)#3#4\@nil{% + \let\MT@temp\relax + \ifx\relax#3% + \def\@tempa{#1#2}% + \let\MT@inh@prefix\@empty + \else + \MT@ifstreq{\MT@feat}{pr}{% + \MT@ifstreq{#2}{l}{\def\MT@inh@prefix@{{1000}{0}}\@firstoftwo}{% + \MT@ifstreq{#2}{r}{\def\MT@inh@prefix@{{0}{1000}}\@firstoftwo}{% + \MT@ifstreq{#2}{lr}{\def\MT@inh@prefix@{{500}{500}}\@firstoftwo}{% + \MT@warning@nl{`#2' is not a valid prefix in inheritance list% + \MessageBreak\MT@listname. Ignoring it}% + \@secondoftwo}}}% + {\def\@tempa{#3}% + \def\MT@inh@prefix{#2}% + \@gobble}% + {\@firstofone}% + }{\@firstofone}% + {\let\MT@char\m@ne + \let\MT@temp\@gobble + }% + \fi + \MT@temp +} \MT@def@bool@opt{DVIoutput}{% \csname if\@tempa\endcsname \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi |