diff options
Diffstat (limited to 'Master/texmf-dist/tex')
26 files changed, 352 insertions, 304 deletions
diff --git a/Master/texmf-dist/tex/latex/microtype/letterspace.sty b/Master/texmf-dist/tex/latex/microtype/letterspace.sty index 07b08c0a3cd..1e2477b9aff 100644 --- a/Master/texmf-dist/tex/latex/microtype/letterspace.sty +++ b/Master/texmf-dist/tex/latex/microtype/letterspace.sty @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 @@ -33,7 +33,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage {letterspace} - [2019/11/18 v2.7d + [2020/12/07 v2.8 Robust letterspacing (RS)] \def\MT@MT @@ -42,10 +42,11 @@ \def\MT@fix@catcode#1#2{% \edef\MT@restore@catcodes{% \MT@restore@catcodes - \catcode#1 \the\catcode#1\relax + \catcode#1=\the\catcode#1\relax }% - \catcode#1 #2\relax + \catcode#1=#2\relax } +\MT@fix@catcode{17}{14}% ^^Q (comment) \MT@fix@catcode{24} {9}% ^^X (ignore) \MT@fix@catcode{36} {3}% $ (math shift) \MT@fix@catcode{39}{12}% ' @@ -96,6 +97,8 @@ \else \catcode`\^^Q=9 \catcode`\^^X=14 \fi +^^Q\MT@warning@nl{This package requires the etex extensions. +^^Q \MessageBreak Exiting}\MT@restore@catcodes\endinput \def\MT@clear@options{% \MT@requires@latex1{% \AtEndOfPackage{\let\@unprocessedoptions\relax\MT@restore@catcodes}% @@ -123,9 +126,11 @@ \ifnum\luatexversion < 62 \def\MT@engine@tooold{0} \else \def\MT@engine@tooold{1} + \let\MT@lua\directlua \ifnum\luatexversion > 84 \let\pdfoutput\outputmode \let\pdfprotrudechars\protrudechars + \let\pdfadjustspacing\adjustspacing \fi \fi \fi @@ -222,28 +227,24 @@ \advance\@tempcnta \@ne \ifnum\@tempcnta < #2\MT@repeat } +\MT@pdf@or@lua{\let\MT@if@luaotf@font\@secondoftwo}{ +\def\MT@if@luaotf@font{\csname\MT@lua{% + local thefont = font.getfont(font.current()) + if thefont and ( thefont.format == "opentype" or thefont.format == "truetype" ) + then tex.write("@firstoftwo") + else tex.write("@secondoftwo") + end + }\endcsname +} +} \def\MT@do@font{\MT@while@num\z@\@cclvi} \MT@requires@latex1{ \let\MT@setup@\@empty \def\MT@addto@setup{\g@addto@macro\MT@setup@} }{\let\MT@addto@setup\@firstofone} \def\MT@with@package@T#1{\@ifpackageloaded{#1}\@firstofone\@gobble} -\newif\ifMT@fontspec -\MT@requires@latex2{ -\MT@with@package@T{fontspec}\MT@fontspectrue -}{\MT@fontspecfalse} -\let\MT@if@fontspec@font\@secondoftwo -\def\MT@fontspec@setup{% - \@ifpackagelater{fontspec}{2013/05/23}{ - \MT@let@cn\MT@if@fontspec@font{fontspec_if_fontspec_font:TF}% - }\relax -} -\ifMT@fontspec\MT@fontspec@setup\fi \MT@addto@setup{% \MT@requires@latex2{ - \MT@with@package@T{fontspec}{\MT@fontspectrue\MT@fontspec@setup}% - }\relax - \MT@requires@latex2{ \MT@with@package@T{hyperref}{% \pdfstringdefDisableCommands{% \def\lsstyle{\pdfstringdefWarn\lsstyle}% @@ -251,15 +252,14 @@ }% }% }\relax - \MT@requires@latex2{ - \MT@with@package@T{soul}{% + \ifx\SOUL@\@undefined\else \soulregister\lsstyle 0% \soulregister\textls 1% - }% - }{\ifx\SOUL@\@undefined\else - \soulregister\lsstyle 0% - \soulregister\textls 1% - \fi}% + \ifx\XeTeXrevision\@undefined + \let\MT@SOUL@doword\SOUL@doword + \def\SOUL@doword{\pdfadjustspacing=\z@ \MT@SOUL@doword}% + \fi + \fi } \let\MT@tracking \relax @@ -273,7 +273,7 @@ /\number\MT@letterspace@ ls\endcsname}% \expandafter\ifx\MT@lsfont\relax \MT@get@ls@basefont - \MT@if@fontspec@font{% + \MT@if@luaotf@font{% \ifnum\MT@letterspace@<\z@\def\MT@minus{-}\else\let\MT@minus\@empty\fi \global\expandafter\font\MT@lsfont=% \expandafter\MT@exp@two@c\expandafter\MT@ls@fontspec@font @@ -286,7 +286,7 @@ * \fontdimen2\MT@lsfont/1000\relax % no ligatures = {f} \tagcode\MT@lsfont`f=\m@ne - \MT@if@fontspec@font\relax{% + \MT@if@luaotf@font\relax{% \MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax \rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}% \let\MT@the@pr@code\MT@the@pr@code@tr @@ -328,6 +328,7 @@ \def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont} \DeclareRobustCommand\lsstyle{% \not@math@alphabet\lsstyle\textls + \let\glb@currsize\@empty \let\MT@tracking\MT@set@tr@codes \selectfont } diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def b/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def index 5bdb98dc2bf..ea55d562c3c 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-luatex.def @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 @@ -30,11 +30,11 @@ %% \ProvidesFile {microtype-luatex.def} - [2019/11/18 v2.7d + [2020/12/07 v2.8 Definitions specific to luatex (RS)] -\def\MT@lua{\directlua} +\let\MT@lua\directlua \def\MT@luatex@no{5} \ifnum\luatexversion<90 \def\MT@luatex@no{4} @@ -55,13 +55,17 @@ \MT@luatex@no <#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi} \@ifl@t@r\fmtversion{2016/01/01}\relax{\RequirePackage{luatexbase}} -\RequirePackage{luaotfload} +\@ifl@t@r\fmtversion{2017/01/01}\relax{\RequirePackage{luaotfload}} \MT@lua{require("microtype")} \def\MT@ifint#1{\csname\MT@lua{microtype.if_int([[#1]])}\endcsname} \def\MT@ifdimen#1{\csname\MT@lua{microtype.if_dimen([[#1]])}\endcsname} \def\MT@ifstreq#1#2{\csname\MT@lua{microtype.if_str_eq([[#1]],[[#2]])}\endcsname} +\def\MT@if@luaotf@font{\csname\MT@lua{% + microtype.if_luaotf_font() + }\endcsname +} \def\MT@do@font#1{% - \MT@if@fontspec@font{% + \MT@if@luaotf@font{% \def\MT@dofont@function{#1}% \MT@lua{microtype.do_font()}% }{\MT@while@num\z@\@cclvi{#1}}% @@ -132,7 +136,6 @@ \fi \MT@exp@two@c\let\MT@font\MT@font@copy \let\font@name\MT@font@copy - \aftergroup\MT@exp@two@c \aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy } \def\MT@rem@from@list#1{% @@ -143,6 +146,16 @@ } \def\MT@lua@copyfont #1 #2 #3\@nil{% \global\expandafter\font\MT@font@copy=#3\relax} +\def\MT@fix@fontdimen@six{% + \ifnum\fontdimen6\MT@font=\z@ + \fontdimen6\MT@font=% + \MT@requires@luatex4{\pdffeedback fontsize}{\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 + \fi + \edef\MT@dimen@six{\number\fontdimen6\MT@font}% +} \def\MT@protrusion{\MT@maybe@do{pr}} \def\MT@set@pr@codes{% \MT@nofamilyfalse @@ -156,29 +169,16 @@ \MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty }% \fi - \MT@get@font@dimen@six{% - \MT@get@opt - \MT@reset@pr@codes - \MT@get@inh@list - \MT@set@inputenc{c}% - \MT@load@list\MT@pr@c@name - \MT@set@listname - \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% - \expandafter\MT@set@codes\@tempc,\relax,}% + \MT@get@opt + \MT@reset@pr@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@pr@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,% }\MT@reset@pr@codes } -\def\MT@get@font@dimen@six{% - \ifnum\fontdimen6\MT@font=\z@ - \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}% - \expandafter\@gobble - \else - \edef\MT@dimen@six{\number\fontdimen6\MT@font}% - \expandafter\@firstofone - \fi -} \def\MT@set@all@pr#1#2{% \let\MT@temp\@empty \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1}}% @@ -240,8 +240,8 @@ \ifnum\MT@count=\z@ \MT@info@missing@char \fi } \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 + \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@ @@ -298,6 +298,7 @@ \let\MT@stretch@ \MT@stretch \let\MT@shrink@ \MT@shrink \let\MT@step@ \MT@step + \let\MT@auto@ \MT@auto \let\MT@ex@factor@\MT@ex@factor }% \MT@reset@ef@codes @@ -305,20 +306,20 @@ \MT@nonselectedfalse } \let\MT@set@ex@codes\MT@set@ex@codes@n -\directlua{\detokenize{ - if font.setexpansion == nil then - tex.print("\\@firstoftwo") - else - tex.print("\\@secondoftwo") - end -}}{ +\MT@requires@luatex3{ \MT@requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax +\ifnum\luatexversion<79 \def\MT@expandfont{% - \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax + \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ autoexpand\relax +} +\else +\def\MT@expandfont{% + \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@\relax } +\fi }{ \def\MT@expandfont{% - \directlua{font.setexpansion(font.current(),\MT@stretch@,\MT@shrink@,\MT@step@)}% + \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax } } \def\MT@set@all@ex#1{% @@ -371,6 +372,9 @@ \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}% \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}% \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}% + \MT@requires@luatex3\relax{% + \MT@get@ex@opt@{auto}{\MT@ifstreq{\MT@auto@}{autoexpand}{En}{Dis}abling automatic expansion}% + }% \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{% \MT@preset@ex \let\MT@reset@ef@codes\relax @@ -408,7 +412,15 @@ \MT@tracking@ \def\MT@set@tr@codes{% \MT@vinfo{Tracking font `\MT@@font'\on@line}% - \MT@get@font@dimen@six{% + \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@if@list@exists \MT@get@tr@opt \relax @@ -422,7 +434,7 @@ /\number\MT@letterspace@ ls\endcsname}% \expandafter\ifx\MT@lsfont\relax \MT@get@ls@basefont - \MT@if@fontspec@font{% + \MT@if@luaotf@font{% \ifnum\MT@letterspace@<\z@\def\MT@minus{-}\else\let\MT@minus\@empty\fi \global\expandafter\font\MT@lsfont=% \expandafter\MT@exp@two@c\expandafter\MT@ls@fontspec@font @@ -440,7 +452,7 @@ \MT@ifdefined@c@TF\MT@tr@okern{\let\@tempa\MT@tr@okern}{\def\@tempa{*,*}}% \expandafter\MT@tr@set@okern\@tempa,% \MT@ifdefined@c@T\MT@tr@ligatures\MT@tr@noligatures - \MT@if@fontspec@font\relax{% + \MT@if@luaotf@font\relax{% \MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax \rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}% \let\MT@the@pr@code\MT@the@pr@code@tr @@ -448,7 +460,7 @@ \fi \aftergroup\MT@set@lsfont \let\MT@font\MT@lsfont - \MT@if@fontspec@font\MT@font\relax + \MT@if@luaotf@font\MT@font\relax \xdef\MT@set@curr@ls{\def\noexpand\MT@curr@ls{\MT@letterspace@}}% \aftergroup\MT@set@curr@ls \MT@outer@space=\csname MT@outer@space\expandafter\string\font@name\endcsname\relax @@ -494,19 +506,21 @@ } \def\MT@get@tr@opt{% \MT@set@listname + \let\MT@tr@factor@\@m + \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{% + \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}% + \ifdim\MT@tr@unit@=1em + \let\MT@tr@unit@\@undefined + \else + \MT@get@unit\MT@tr@unit@ + \fi + }% \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{% \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}% - \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{% - \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}% - \ifdim\MT@tr@unit@=1em - \let\MT@tr@unit@\@undefined - \else - \MT@let@cn\@tempb{MT@tr@c@\MT@tr@c@name}% - \MT@get@unit\MT@tr@unit@ - \let\MT@tr@factor@\@m - \MT@scale@to@em - \edef\MT@letterspace{\number\@tempcntb}% - \fi + \MT@ifdefined@c@T\MT@tr@unit@{% + \let\@tempb\MT@letterspace + \MT@scale@to@em + \edef\MT@letterspace{\number\@tempcntb}% }% }% \MT@get@tr@opt@{spacing} {ispace}% @@ -521,6 +535,7 @@ \def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont} \DeclareRobustCommand\lsstyle{% \not@math@alphabet\lsstyle\textls + \let\glb@currsize\@empty \MT@maybe@gobble@with@tikz{\aftergroup\glb@settings}% \def\MT@feat{tr}% \let\MT@tracking\MT@set@tr@codes @@ -568,13 +583,11 @@ } \def\MT@tr@set@space@#1#2#3#4{% \MT@ifempty{#2}{% - \MT@ifempty{#1}{% - \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}% - }{% + \MT@ifempty{#1}\relax{% \MT@tr@set@space@@{#1}{#3}{1000}% - \edef\MT@temp{\MT@temp#4\the\@tempdima}% \fontdimen#3\MT@lsfont=\@tempdima }% + \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}% }{% \MT@tr@set@space@@{#2}{#3}{2000}% \edef\MT@temp{\MT@temp#4\the\@tempdima}% @@ -589,12 +602,10 @@ \MT@ifdefined@c@TF\MT@tr@unit@ {\edef\@tempb{#1}\MT@scale@to@em} {\@tempcntb=#1\relax}% - \@tempdima=\dimexpr \dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax - -\fontdimen#2\MT@lsfont\relax + \@tempdima=\dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax \ifnum#2=\tw@ \advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax \fi - \@tempdima=\dimexpr \fontdimen#2\MT@lsfont+\@tempdima\relax }{% \MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax \@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax @@ -751,7 +762,7 @@ \KV@@sp@def\@tempa{##1}\MT@get@slot \ifnum\MT@char>\m@ne \tagcode#1\MT@char=\m@ne - \MT@if@fontspec@font + \MT@if@luaotf@font {\MT@lua{microtype.noligatures([[#1]],[[\MT@char]])}}\relax \fi }% @@ -764,7 +775,7 @@ }% }{% \pdfnoligatures#1% - \MT@if@fontspec@font + \MT@if@luaotf@font {\MT@lua{microtype.noligatures([[#1]],"_all_")}}\relax \MT@vinfo{... Disabling all ligatures}% }% @@ -930,9 +941,13 @@ \define@key{MT@ex@c}{auto}[true]{% \def\@tempa{#1}% \csname if\@tempa\endcsname + \MT@requires@luatex3\relax + {\MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}}% \else - \MT@warning{Non-automatic font expansion doesn't work with\MessageBreak - luatex}% + \MT@requires@luatex3{% + \MT@warning{Non-automatic font expansion doesn't work with\MessageBreak + luatex}}% + {\MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty}% \fi } \MT@define@opt@key{tr}{spacing} @@ -1105,7 +1120,17 @@ } \def\MT@setup@expansion{% \ifnum\pdfoutput<\@ne - \ifMT@opt@expansion \else + \ifMT@opt@expansion + \ifMT@expansion + \MT@requires@luatex3{% + \MT@warning@nl{Font expansion doesn't work properly with luatex in\MessageBreak + DVI mode: the glyphs won't be actually transformed,\MessageBreak + but will only be shifted. You might want to use\MessageBreak + pdflatex instead. I'll continue anyway ..}% + %\MT@expansionfalse + }\relax + \fi + \else \MT@expansionfalse \fi \fi @@ -1124,13 +1149,17 @@ Setting it to one}% \def\MT@step{1 }% \fi - \let\MT@auto@\@empty + \let\MT@auto\@empty \ifMT@auto + \MT@requires@luatex3\relax{\def\MT@auto{autoexpand}}% \else - \ifMT@opt@auto - \MT@error{Non-automatic font expansion does not work with\MessageBreak - luatex}{Remove `auto=false' from the package options, or use pdftex.}% - \fi + \MT@requires@luatex3{% + \ifMT@opt@auto + \MT@error{Non-automatic font expansion does not work with\MessageBreak + luatex}{Remove `auto=false' from the package options, or use pdftex.}% + \MT@autotrue + \fi + }\relax \fi \ifMT@selected \let\MT@set@ex@codes\MT@set@ex@codes@s diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def b/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def index eff2fd5ba14..5cc828c24f6 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-pdftex.def @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 @@ -30,7 +30,7 @@ %% \ProvidesFile {microtype-pdftex.def} - [2019/11/18 v2.7d + [2020/12/07 v2.8 Definitions specific to pdftex (RS)] @@ -118,7 +118,7 @@ } \MT@requires@pdftex5{ \def\MT@ifstreq#1#2{% - \ifcase\pdfstrcmp{#1}{#2}\relax + \ifnum\pdfstrcmp{#1}{#2}=\z@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo @@ -230,6 +230,16 @@ \fi } }\relax +\def\MT@fix@fontdimen@six{% + \ifnum\fontdimen6\MT@font=\z@ + \fontdimen6\MT@font=% + \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 + \fi + \edef\MT@dimen@six{\number\fontdimen6\MT@font}% +} \def\MT@protrusion{\MT@maybe@do{pr}} \def\MT@set@pr@codes{% \MT@nofamilyfalse @@ -243,29 +253,16 @@ \MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty }% \fi - \MT@get@font@dimen@six{% - \MT@get@opt - \MT@reset@pr@codes - \MT@get@inh@list - \MT@set@inputenc{c}% - \MT@load@list\MT@pr@c@name - \MT@set@listname - \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% - \expandafter\MT@set@codes\@tempc,\relax,}% + \MT@get@opt + \MT@reset@pr@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@pr@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,% }\MT@reset@pr@codes } -\def\MT@get@font@dimen@six{% - \ifnum\fontdimen6\MT@font=\z@ - \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}% - \expandafter\@gobble - \else - \edef\MT@dimen@six{\number\fontdimen6\MT@font}% - \expandafter\@firstofone - \fi -} \def\MT@set@all@pr#1#2{% \let\MT@temp\@empty \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1}}% @@ -345,8 +342,8 @@ \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 + \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@ @@ -464,8 +461,7 @@ \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}% \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}% \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}% - \def\@tempa{autoexpand}% - \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}% + \MT@get@ex@opt@{auto}{\MT@ifstreq{\MT@auto@}{autoexpand}{En}{Dis}abling automatic expansion}% \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{% \MT@preset@ex \let\MT@reset@ef@codes\relax @@ -491,15 +487,14 @@ \def\MT@spacing{\MT@maybe@do{sp}} \def\MT@set@sp@codes{% \MT@if@list@exists{% - \MT@get@font@dimen@six{% - \MT@get@opt - \MT@reset@sp@codes - \MT@get@inh@list - \MT@set@inputenc{c}% - \MT@load@list\MT@sp@c@name - \MT@set@listname - \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}% - \expandafter\MT@set@codes\@tempc,\relax,}% + \MT@get@opt + \MT@reset@sp@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@sp@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,% }\MT@reset@sp@codes } \def\MT@sp@split@val#1,#2,#3\relax{% @@ -563,15 +558,14 @@ \def\MT@kerning{\MT@maybe@do{kn}} \def\MT@set@kn@codes{% \MT@if@list@exists{% - \MT@get@font@dimen@six{% - \MT@get@opt - \MT@reset@kn@codes - \MT@get@inh@list - \MT@set@inputenc{c}% - \MT@load@list\MT@kn@c@name - \MT@set@listname - \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}% - \expandafter\MT@set@codes\@tempc,\relax,}% + \MT@get@opt + \MT@reset@kn@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@kn@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,% }\MT@reset@kn@codes } \def\MT@kn@split@val#1,#2\relax{% @@ -637,7 +631,15 @@ \MT@tracking@ \def\MT@set@tr@codes{% \MT@vinfo{Tracking font `\MT@@font'\on@line}% - \MT@get@font@dimen@six{% + \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@if@list@exists \MT@get@tr@opt \relax @@ -704,19 +706,21 @@ } \def\MT@get@tr@opt{% \MT@set@listname + \let\MT@tr@factor@\@m + \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{% + \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}% + \ifdim\MT@tr@unit@=1em + \let\MT@tr@unit@\@undefined + \else + \MT@get@unit\MT@tr@unit@ + \fi + }% \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{% \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}% - \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{% - \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}% - \ifdim\MT@tr@unit@=1em - \let\MT@tr@unit@\@undefined - \else - \MT@let@cn\@tempb{MT@tr@c@\MT@tr@c@name}% - \MT@get@unit\MT@tr@unit@ - \let\MT@tr@factor@\@m - \MT@scale@to@em - \edef\MT@letterspace{\number\@tempcntb}% - \fi + \MT@ifdefined@c@T\MT@tr@unit@{% + \let\@tempb\MT@letterspace + \MT@scale@to@em + \edef\MT@letterspace{\number\@tempcntb}% }% }% \MT@get@tr@opt@{spacing} {ispace}% @@ -731,6 +735,7 @@ \def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont} \DeclareRobustCommand\lsstyle{% \not@math@alphabet\lsstyle\textls + \let\glb@currsize\@empty \MT@maybe@gobble@with@tikz{\aftergroup\glb@settings}% \def\MT@feat{tr}% \let\MT@tracking\MT@set@tr@codes @@ -787,13 +792,11 @@ } \def\MT@tr@set@space@#1#2#3#4{% \MT@ifempty{#2}{% - \MT@ifempty{#1}{% - \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}% - }{% + \MT@ifempty{#1}\relax{% \MT@tr@set@space@@{#1}{#3}{1000}% - \edef\MT@temp{\MT@temp#4\the\@tempdima}% \fontdimen#3\MT@lsfont=\@tempdima }% + \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}% }{% \MT@tr@set@space@@{#2}{#3}{2000}% \edef\MT@temp{\MT@temp#4\the\@tempdima}% @@ -808,12 +811,10 @@ \MT@ifdefined@c@TF\MT@tr@unit@ {\edef\@tempb{#1}\MT@scale@to@em} {\@tempcntb=#1\relax}% - \@tempdima=\dimexpr \dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax - -\fontdimen#2\MT@lsfont\relax + \@tempdima=\dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax \ifnum#2=\tw@ \advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax \fi - \@tempdima=\dimexpr \fontdimen#2\MT@lsfont+\@tempdima\relax }{% \MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax \@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax @@ -1193,15 +1194,13 @@ \define@key{MT@ex@c}{auto}[true]{% \def\@tempa{#1}% \csname if\@tempa\endcsname - \MT@requires@pdftex4{% - \MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}% - }{% - \MT@warning{pdftex too old for automatic font expansion}% - } + \MT@requires@pdftex4% + {\MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}}% + {\MT@warning{pdftex too old for automatic font expansion}}% \else - \MT@requires@pdftex4{% - \MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty - }\relax + \MT@requires@pdftex4% + {\MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty}% + \relax \fi } \MT@define@opt@key{tr}{spacing} @@ -1384,7 +1383,8 @@ } \def\MT@setup@expansion{% \ifnum\pdfoutput<\@ne - \ifMT@opt@expansion \else + \ifMT@opt@expansion + \else \MT@expansionfalse \fi \fi diff --git a/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def b/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def index b9f2d478b2c..e7991789055 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def +++ b/Master/texmf-dist/tex/latex/microtype/microtype-xetex.def @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 @@ -30,7 +30,7 @@ %% \ProvidesFile {microtype-xetex.def} - [2019/11/18 v2.7d + [2020/12/07 v2.8 Definitions specific to xetex (RS)] @@ -68,9 +68,7 @@ }% } \def\MT@ifstreq#1#2{% - \edef\MT@res@a{#1}% - \edef\MT@res@b{#2}% - \ifx\MT@res@a\MT@res@b + \ifnum\strcmp{#1}{#2}=\z@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo @@ -78,9 +76,10 @@ } \def\MT@do@font#1{% \@tempcnta=\z@ - \MT@loop #1% - \advance\@tempcnta \@ne - \ifnum\@tempcnta < \XeTeXcountglyphs\MT@font \MT@repeat + \MT@loop + \iffontchar\MT@font\@tempcnta #1\fi + \advance\@tempcnta\@ne + \ifnum\@tempcnta < \XeTeXlastfontchar\MT@font \MT@repeat } \def\MT@ledmac@setup{% \ifMT@protrusion @@ -123,6 +122,16 @@ \MT@register@font \fi } +\def\MT@fix@fontdimen@six{% + \ifnum\fontdimen6\MT@font=\z@ + \fontdimen6\MT@font=% + \MT@size pt + \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 + \fi + \edef\MT@dimen@six{\number\fontdimen6\MT@font}% +} \def\MT@protrusion{\MT@maybe@do{pr}} \def\MT@set@pr@codes{% \MT@nofamilyfalse @@ -136,29 +145,16 @@ \MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty }% \fi - \MT@get@font@dimen@six{% - \MT@get@opt - \MT@reset@pr@codes - \MT@get@inh@list - \MT@set@inputenc{c}% - \MT@load@list\MT@pr@c@name - \MT@set@listname - \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% - \expandafter\MT@set@codes\@tempc,\relax,}% + \MT@get@opt + \MT@reset@pr@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@pr@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,% }\MT@reset@pr@codes } -\def\MT@get@font@dimen@six{% - \ifnum\fontdimen6\MT@font=\z@ - \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}% - \expandafter\@gobble - \else - \edef\MT@dimen@six{\number\fontdimen6\MT@font}% - \expandafter\@firstofone - \fi -} \def\MT@set@all@pr#1#2{% \let\MT@temp\@empty \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1}}% @@ -220,8 +216,8 @@ \ifnum\MT@count=\z@ \MT@info@missing@char \fi } \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 + \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@ diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.cfg b/Master/texmf-dist/tex/latex/microtype/microtype.cfg index 212b37910cd..5c62ae2b8da 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.cfg +++ b/Master/texmf-dist/tex/latex/microtype/microtype.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 @@ -40,7 +40,7 @@ %% \ProvidesFile {microtype.cfg} - [2019/11/18 v2.7d + [2020/12/07 v2.8 microtype main configuration file (RS)] @@ -102,8 +102,8 @@ %%% DEFAULT SETS \DeclareMicrotypeSetDefault[protrusion]{alltext} -\DeclareMicrotypeSetDefault[expansion] {basictext} -\DeclareMicrotypeSetDefault[spacing] {basictext} +\DeclareMicrotypeSetDefault[expansion] {alltext-nott} +\DeclareMicrotypeSetDefault[spacing] {alltext-nott} \DeclareMicrotypeSetDefault[kerning] {alltext} \DeclareMicrotypeSetDefault[tracking] {smallcaps} @@ -118,51 +118,65 @@ \fi \ifMT@fontspec\MT@if@true\fi \ifMT@if@ +%% -- Computer/Latin Modern Roman \DeclareMicrotypeAlias{lmr}{Latin Modern Roman} \else -\DeclareMicrotypeAlias{lmr}{cmr} % lmodern +\DeclareMicrotypeAlias{lmr}{cmr} % lmodern \fi -\DeclareMicrotypeAlias{lmsy}{cmsy} -\DeclareMicrotypeAlias{lmm} {cmm} -\DeclareMicrotypeAlias{aer} {cmr} % ae -\DeclareMicrotypeAlias{zer} {cmr} % zefonts -\DeclareMicrotypeAlias{cmor}{cmr} % eco -\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty -\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts -\DeclareMicrotypeAlias{qpl} {ppl} % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino) -\DeclareMicrotypeAlias{fp9x}{pplx} % FPL Neu -\DeclareMicrotypeAlias{fp9j}{pplj} % " -\DeclareMicrotypeAlias{zpllf}{ppl} % newpxtext -\DeclareMicrotypeAlias{zplosf}{ppl} % " -\DeclareMicrotypeAlias{zpltlf}{ppl} % " -\DeclareMicrotypeAlias{zpltosf}{ppl} % " -\DeclareMicrotypeAlias{txr} {ptm} % txfonts -\DeclareMicrotypeAlias{ntxlf}{ptm} % newtxtext -\DeclareMicrotypeAlias{ntxosf}{ptm} % " -\DeclareMicrotypeAlias{ntxtlf}{ptm} % " -\DeclareMicrotypeAlias{ntxtosf}{ptm} % " -\DeclareMicrotypeAlias{Tempora-TLF}{ptm} % tempora -\DeclareMicrotypeAlias{Tempora-TOsF}{ptm}% " -\DeclareMicrotypeAlias{qtm} {ptm} % TeX Gyre Termes (formerly: qfonts/QuasiTimes) +\DeclareMicrotypeAlias{lmsy}{cmsy} % " +\DeclareMicrotypeAlias{lmm} {cmm} % " +\DeclareMicrotypeAlias{aer} {cmr} % ae +\DeclareMicrotypeAlias{zer} {cmr} % zefonts +\DeclareMicrotypeAlias{cmor}{cmr} % eco +\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty +\DeclareMicrotypeAlias{New Computer Modern}{Latin Modern Roman} +%% -- Palatino +\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts +\DeclareMicrotypeAlias{qpl} {ppl} % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino) +\DeclareMicrotypeAlias{fp9x}{pplx} % FPL Neu +\DeclareMicrotypeAlias{fp9j}{pplj} % " +\DeclareMicrotypeAlias{zpllf}{pplx} % newpxtext +\DeclareMicrotypeAlias{zplosf}{pplj} % " +\DeclareMicrotypeAlias{zpltlf}{pplx} % " +\DeclareMicrotypeAlias{zpltosf}{pplj} % " +\DeclareMicrotypeAlias{Domitian-TLF} {pplx}% domitian +\DeclareMicrotypeAlias{Domitian-TOsF}{pplj}% " +\DeclareMicrotypeAlias{Domitian} {Palatino Linotype} \DeclareMicrotypeAlias{TeX Gyre Pagella}{Palatino Linotype} \DeclareMicrotypeAlias{Palatino LT Std} {Palatino Linotype} \DeclareMicrotypeAlias{Palatino} {Palatino Linotype} \DeclareMicrotypeAlias{Asana Math} {Palatino Linotype} -\DeclareMicrotypeAlias{zeur}{eur} % Euler VM -\DeclareMicrotypeAlias{zeus}{eus} % " -\DeclareMicrotypeAlias{chr} {bch} % CH Math +%% -- Times New Roman +\DeclareMicrotypeAlias{txr}{ptm} % txfonts +\DeclareMicrotypeAlias{ntxlf}{ptmx} % newtxtext +\DeclareMicrotypeAlias{ntxosf}{ptmj} % " +\DeclareMicrotypeAlias{ntxtlf}{ptmx} % " +\DeclareMicrotypeAlias{ntxtosf}{ptmj} % " +\DeclareMicrotypeAlias{Tempora-TLF}{ptmx} % tempora +\DeclareMicrotypeAlias{Tempora-TOsF}{ptmj} % " +\DeclareMicrotypeAlias{qtm}{ptm} % TeX Gyre Termes (formerly: qfonts/QuasiTimes) +\DeclareMicrotypeAlias{STEP-TLF}{ptmx} % step +\DeclareMicrotypeAlias{STEP-TOsF}{ptmj} % " +\DeclareMicrotypeAlias{stix} {ptm} % stix +\DeclareMicrotypeAlias{stix2}{ptm} % stix2 +%% -- Charter +\DeclareMicrotypeAlias{chr}{bch} % CH Math \DeclareMicrotypeAlias{XCharter-TLF} {bch} % XCharter \DeclareMicrotypeAlias{XCharter-TOsF}{bch} % " -\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter -\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond -\DeclareMicrotypeAlias{zgmx}{ugm} % garamondx -\DeclareMicrotypeAlias{zgmj}{ugm} % " -\DeclareMicrotypeAlias{zgmI}{ugm} % " -\DeclareMicrotypeAlias{zgmq}{ugm} % " -\DeclareMicrotypeAlias{ulg} {blg} % URW LetterGothic -> Bitstream LetterGothic12Pitch -\DeclareMicrotypeAlias{zpeus} {zpeu} % Adobe Euro sans -> serif -\DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif -\DeclareMicrotypeAlias{euroitcs}{euroitc}% ITC Euro sans -> serif +\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter +%% -- Garamond +\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond +\DeclareMicrotypeAlias{zgmx}{ugm} % garamondx +\DeclareMicrotypeAlias{zgmj}{ugm} % " +\DeclareMicrotypeAlias{zgmI}{ugm} % " +\DeclareMicrotypeAlias{zgmq}{ugm} % " +%% -- +\DeclareMicrotypeAlias{ulg}{blg} % URW LetterGothic -> Bitstream LetterGothic12Pitch +\DeclareMicrotypeAlias{zeur}{eur} % Euler VM +\DeclareMicrotypeAlias{zeus}{eus} % " +\DeclareMicrotypeAlias{zpeus} {zpeu} % Adobe Euro sans -> serif +\DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif +\DeclareMicrotypeAlias{euroitcs}{euroitc} % ITC Euro sans -> serif %%% ----------------------------------------------------------------------- %%% INTERACTION WITH THE `babel' PACKAGE diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.lua b/Master/texmf-dist/tex/latex/microtype/microtype.lua index c12ec1b9d8d..796b4f8bf9f 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.lua +++ b/Master/texmf-dist/tex/latex/microtype/microtype.lua @@ -10,7 +10,7 @@ -- -- The `microtype' package -- Subliminal refinements towards typographical perfection --- Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +-- Copyright (c) 2004--2020 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 @@ -34,8 +34,8 @@ microtype = microtype or {} local microtype = microtype microtype.module = { name = "microtype", - version = "2.7d", - date = "2019/11/18", + version = "2.8", + date = "2020/12/07", description = "microtype module.", author = "E. Roux, R. Schlicht and P. Gesang", copyright = "E. Roux, R. Schlicht and P. Gesang", @@ -54,7 +54,7 @@ local catpackage if luatexbase.registernumber then catpackage = luatexbase.registernumber("catcodetable@atletter") -- LaTeX else - catpackage = luatexbase.catcodetables.CatcodeTableAtletter -- luatexbase + catpackage = luatexbase.catcodetables.CatcodeTableLaTeXAtLetter -- luatexbase end function microtype.sprint (...) tex.sprint(catpackage, ...) @@ -88,19 +88,21 @@ local function if_str_eq(s1, s2) end microtype.if_str_eq = if_str_eq +local function if_luaotf_font() + local thefont = font.getfont(font.current()) + if thefont and ( thefont.format == "opentype" or thefont.format == "truetype" ) + then tex.write("@firstoftwo") + else tex.write("@secondoftwo") + end +end +microtype.if_luaotf_font = if_luaotf_font + local function do_font() - if fonts then - local thefont - if fonts.ids then --- legacy luaotfload - thefont = fonts.ids[font.current()] - else --- new location - thefont = fonts.hashes.identifiers[font.current()] - end - if thefont then - for i,v in next,thefont.characters do - if v.index == nil or v.index > 0 then - microtype.sprint([[\@tempcnta=]]..i..[[\relax\MT@dofont@function]]) - end + local thefont = font.getfont(font.current()) + if thefont then + for i,v in next,thefont.characters do + if v.index == nil or v.index > 0 then + microtype.sprint([[\@tempcnta=]]..i..[[\relax\MT@dofont@function]]) end end end @@ -158,17 +160,17 @@ else local function name_to_slot(name, unsafe) if fonts then local unicodes - if fonts.ids then --- legacy luaotfload + if fonts.ids then -- legacy luaotfload local tfmdata = fonts.ids[font.current()] if not tfmdata then return end unicodes = tfmdata.shared.otfdata.luatex.unicodes - else --- new location + else -- new location local tfmdata = fonts.hashes.identifiers[font.current()] if not tfmdata then return end unicodes = tfmdata.resources.unicodes end local unicode = unicodes[name] - if unicode then --- does the 'or' branch actually exist? + if unicode then -- does the 'or' branch actually exist? return type(unicode) == "number" and unicode or unicode[1] end end diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.sty b/Master/texmf-dist/tex/latex/microtype/microtype.sty index 302589147d3..07375123b7d 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.sty +++ b/Master/texmf-dist/tex/latex/microtype/microtype.sty @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 @@ -29,7 +29,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage {microtype} - [2019/11/18 v2.7d + [2020/12/07 v2.8 Micro-typographical refinements (RS)] \def\MT@MT @@ -38,9 +38,9 @@ \def\MT@fix@catcode#1#2{% \edef\MT@restore@catcodes{% \MT@restore@catcodes - \catcode#1 \the\catcode#1\relax + \catcode#1=\the\catcode#1\relax }% - \catcode#1 #2\relax + \catcode#1=#2\relax } \MT@fix@catcode{17}{14}% ^^Q (comment) \MT@fix@catcode{24} {9}% ^^X (ignore) @@ -430,13 +430,6 @@ \MT@with@package@T{xunicode}\MT@xunicodetrue \newif\ifMT@fontspec \MT@with@package@T{fontspec}\MT@fontspectrue -\let\MT@if@fontspec@font\@secondoftwo -\def\MT@fontspec@setup{% - \@ifpackagelater{fontspec}{2013/05/23}{ - \MT@let@cn\MT@if@fontspec@font{fontspec_if_fontspec_font:TF}% - }\relax -} -\ifMT@fontspec\MT@fontspec@setup\fi \let\MT@maybe@gobble@with@tikz\@firstofone \def\MT@tikz@setup{% \def\MT@maybe@gobble@with@tikz{% @@ -472,7 +465,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@with@package@T {eledmac}\MT@ledmac@setup \MT@with@package@T{reledmac}\MT@ledmac@setup \MT@with@package@T{xunicode}\MT@xunicodetrue - \MT@with@package@T{fontspec}{\MT@fontspectrue\MT@fontspec@setup}% + \MT@with@package@T{fontspec}\MT@fontspectrue \MT@glet\MT@setupfont@hook\@empty \MT@if@false \MT@with@babel@and@T{spanish} \MT@if@true @@ -507,20 +500,24 @@ time will almost certainly lead to undesired results. Have your choice!}% \ifMT@if@\g@addto@macro\MT@setupfont@hook\MT@restore@p@h\fi \MT@with@package@T{listings}{% \g@addto@macro\MT@cfg@catcodes{% - \MT@while@num{"30}{"3A}{\catcode\@tempcnta 12\relax}% - \MT@while@num{"41}{"5B}{\catcode\@tempcnta 11\relax}% - \MT@while@num{"61}{"7B}{\catcode\@tempcnta 11\relax}% + \MT@while@num{"30}{"3A}{\catcode\@tempcnta=12\relax}% + \MT@while@num{"41}{"5B}{\catcode\@tempcnta=11\relax}% + \MT@while@num{"61}{"7B}{\catcode\@tempcnta=11\relax}% }% \g@addto@macro\MT@setupfont@hook{% - \catcode`\\\z@ - \def\space{ }% + \catcode`\\=\z@ + \def\space{ }% \let\lst@ProcessLetter\@empty }% }% - \MT@with@package@T{soul}{% + \ifx\SOUL@\@undefined\else \soulregister\lsstyle 0% \soulregister\textls 1% - }% + \ifx\XeTeXrevision\@undefined + \let\MT@SOUL@doword\SOUL@doword + \def\SOUL@doword{\pdfadjustspacing=\z@ \MT@SOUL@doword}% + \fi + \fi \MT@with@package@T{tikz}\MT@tikz@setup \MT@with@package@T{pinyin}{% \let\MT@orig@py@macron\py@macron @@ -548,6 +545,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@series {#3}% \def\MT@shape {#4}% \def\MT@size {#5}% + \MT@fix@fontdimen@six \MT@ifdefined@n@TF{MT@\MT@family @alias}% {\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}% {\let\MT@familyalias\@empty}% @@ -1340,9 +1338,15 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@font \csname MT@\@tempa @#1font@list\endcsname }% } -\def\microtypecontext#1{\MT@addto@setup{\microtypecontext{#1}}} +\def\microtypecontext{\MT@begin@catcodes\MT@microtypecontext} +\def\MT@microtypecontext#1{\MT@end@catcodes\MT@addto@setup{\microtypecontext{#1}}} \MT@addto@setup{% - \DeclareRobustCommand\microtypecontext[1]{% + \DeclareRobustCommand\microtypecontext{% + \MT@begin@catcodes + \MT@microtypecontext + }% + \def\MT@microtypecontext#1{% + \MT@end@catcodes \MT@setup@contexts \let\MT@reset@context\relax \MT@glet\glb@currsize\@empty @@ -1351,7 +1355,9 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@reset@context }% } -\DeclareRobustCommand\textmicrotypecontext[2]{{\microtypecontext{#1}#2}} +\DeclareRobustCommand\textmicrotypecontext{\MT@begin@catcodes\MT@textmicrotypecontext} +\def\MT@textmicrotypecontext#1{\MT@end@catcodes\MT@text@microtypecontext{#1}} +\def\MT@text@microtypecontext#1#2{{\microtypecontext{#1}#2}} \def\MT@reset@context@{% \MT@vinfo{<<< Resetting contexts\on@line }% @@ -1388,8 +1394,8 @@ time will almost certainly lead to undesired results. Have your choice!}% }% } \define@key{MTC}{activate}[]{% - \setkeys{MT}{protrusion={#1}}% - \setkeys{MT}{expansion={#1}}% + \setkeys{MTC}{protrusion={#1}}% + \setkeys{MTC}{expansion={#1}}% } \MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{% \MT@def@n{MT@#1@context}{@}% diff --git a/Master/texmf-dist/tex/latex/microtype/mt-CharisSIL.cfg b/Master/texmf-dist/tex/latex/microtype/mt-CharisSIL.cfg index 6fcdb415aa2..ce3c4606eda 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-CharisSIL.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-CharisSIL.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg b/Master/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg index 2883b716baf..f7585c60e98 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-PalatinoLinotype.cfg b/Master/texmf-dist/tex/latex/microtype/mt-PalatinoLinotype.cfg index 012f01b862b..887b63c8384 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-PalatinoLinotype.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-PalatinoLinotype.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg b/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg index 6e27f0e1d41..0e9e92ff3e7 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-blg.cfg b/Master/texmf-dist/tex/latex/microtype/mt-blg.cfg index 024ff95f749..53674f18aef 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-blg.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-blg.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg b/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg index 3496e21ba7f..e3c6a4cfa62 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg b/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg index 115b28b2d23..9fc0aa3f84d 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-eur.cfg b/Master/texmf-dist/tex/latex/microtype/mt-eur.cfg index e8f15d237da..6f1060f27d0 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-eur.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-eur.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg b/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg index 16e86ac04d1..a05fc8edc12 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg b/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg index 7a4f954bdae..b73991daadb 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg b/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg index 8389610633d..b7c7c37f2b7 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg b/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg index fb5ad934d49..94e45bbdb7a 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg b/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg index 961fa1e7a7e..3337978da52 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg b/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg index 361bbb11e6d..06845443557 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg b/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg index 989f28da6d4..eb9bf265add 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg b/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg index 69918ef3d52..09f9beded6e 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg b/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg index 2d377398162..dc17fb071f8 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg b/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg index c7b6c83fdff..7f8657a2f36 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg b/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg index 3bdb8a06fb0..e1dd43776b2 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg @@ -10,7 +10,7 @@ %% %% The `microtype' package %% Subliminal refinements towards typographical perfection -%% Copyright (c) 2004--2019 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2020 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 |