summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/microtype/microtype.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/microtype/microtype.dtx')
-rw-r--r--macros/latex/contrib/microtype/microtype.dtx922
1 files changed, 521 insertions, 401 deletions
diff --git a/macros/latex/contrib/microtype/microtype.dtx b/macros/latex/contrib/microtype/microtype.dtx
index 9f92e7296f..698eec0772 100644
--- a/macros/latex/contrib/microtype/microtype.dtx
+++ b/macros/latex/contrib/microtype/microtype.dtx
@@ -1,11 +1,11 @@
%\iffalse meta-comment
% !Mode:: "TeX:DTX:UK"
% !smartQuote:: "English"
-% !DTXversion:: "2.7d"
+% !DTXversion:: "2.8"
% ------------------------------------------------------------------------
% 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
@@ -37,7 +37,7 @@
%<luatex-def> {microtype-luatex.def}
%<xetex-def> {microtype-xetex.def}
%<*package|letterspace|m-t|pdftex-def|luatex-def|xetex-def>
- [2019/11/18 v2.7d
+ [2020/12/07 v2.8
%<package> Micro-typographical refinements
%<letterspace> Robust letterspacing
%<m-t> microtype main configuration file
@@ -51,8 +51,8 @@
%<luafile>local microtype = microtype
%<luafile>microtype.module = {
%<luafile> name = "microtype",
-%<luafile> version = "2.7d",
-%<luafile> date = "2019/11/18",
+%<luafile> version = "2.8",
+%<luafile> date = "2020/12/07",
%<luafile> description = "microtype module.",
%<luafile> author = "E. Roux, R. Schlicht and P. Gesang",
%<luafile> copyright = "E. Roux, R. Schlicht and P. Gesang",
@@ -91,7 +91,7 @@
\def\SourceSansPro@scale{1.02}
\def\ttdefault{blg}
{\ttfamily\selectfont
- \DeclareFontShape{T1}{blg}{k}{n}{<-> ssub * blg/b/n}{}}
+ \DeclareFontShape{T1}{blg}{eb}{n}{<-> ssub * blg/b/n}{}}
\usepackage{textcomp}
\usepackage{iftex}
%<*!docsty>
@@ -192,11 +192,11 @@
\def\PackageFont{\sffamily}
\def\match{\textbullet}
\usepackage{amssymb} % \varnothing
- \let\OrigTeX\TeX
+ \expandafter\let\expandafter\OrigTeX\csname TeX \endcsname
\DeclareRobustCommand\TeX{\textoractual{\OrigTeX}{TeX}}
\setlength\textheight{49\baselineskip}
\else
- \def\bfdefault{b}
+ \let\bfdefault\bfdefault@previous % undo mathdesign's \def\bdefault{b}
\def\Module#1{{\color{theblue}\textoractual{$\langle$}{<}\textit{#1}\textoractual{$\rangle$}{>}}}
\DeclareRobustCommand\TeX{\textoractual{T\kern-.1em\lower.4ex\hbox{E}\kern-.075emX\@}{TeX}}
\DeclareRobustCommand\LaTeX{\textoractual{L\kern-.26em{\sbox\z@ T\vbox to\ht\z@{%
@@ -206,6 +206,7 @@
\def\match{{\large\raisebox{-.15em}{\textbullet}}}
{\catcode`\`=\active % indiscernible from ' in Bitstream Letter Gothic
\g@addto@macro\macro@code{\let`\textasciigrave}}
+ \DeclareEncodingSubset{TS1}{blg}{1} % for \textasciigrave
\linespread{1.07}\normalfont
\setlength\textheight{48\baselineskip}
\fi
@@ -217,15 +218,15 @@
\def\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
- {\normalfont\Large\ifcmr\fontseries{bx}\else\fontseries{k}\fi\sffamily\color{sectioning}}}
+ {\normalfont\Large\ifcmr\fontseries{bx}\else\fontseries{eb}\fi\sffamily\color{sectioning}}}
\def\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
- {\normalfont\large\ifcmr\fontseries{bx}\else\fontseries{k}\fi\sffamily\color{sectioning}}}
+ {\normalfont\large\ifcmr\fontseries{bx}\else\fontseries{eb}\fi\sffamily\color{sectioning}}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
- {\normalfont\normalsize\ifcmr\fontseries{bx}\else\fontseries{k}\fi\sffamily\color{sectioning}}}
+ {\normalfont\normalsize\ifcmr\fontseries{bx}\else\fontseries{eb}\fi\sffamily\color{sectioning}}}
\def\paragraph{\@startsection{paragraph}{4}%
{0pt}{8pt plus 2pt minus 1pt}{-1em}%
{\normalfont\normalsize\itshape}}
@@ -559,7 +560,8 @@
colorlinks,linkcolor=theblue,citecolor=theblue,urlcolor=thered,
hyperindex=false,hyperfootnotes=false]
{hyperref}
- \usepackage{hyperxmp}
+ \PassOptionsToPackage{nodvi}{totpages} % remove annoying log output
+ \usepackage{hyperxmp} % (hyperxmp loads totpages)
\usepackage{attachfile}
\usepackage{pdfpages}
\hypersetup{
@@ -569,7 +571,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--2019 R Schlicht\012%
+ pdfcopyright={\textcopyright\ 2004--2020 R Schlicht\012%
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.\012%
@@ -607,7 +609,7 @@
\href{https://www.ctan.org/pkg/#1}{\nolinkurl{pkg/#1}}}
\DeclareRobustCommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}}
\def\mailtoRS{\href % some PDF viewers don't like spaces:
- {mailto:<w.m.l@gmx.net>\%20Robert\%20Schlicht?subject=[microtype\%20\fileversion]}
+ {mailto:Robert\%20Schlicht\%3cw.m.l@gmx.net\%3e?subject=[microtype\%20\fileversion]}
{\texttt{w.m.l@gmx.net}}}
% the samples in the introduction, utilising nested optional content groups (aka. layers):
\ifnum\pdftexversion<140 \else
@@ -812,7 +814,7 @@
% other extensions (see section~\ref{sec:lettersp}).
%
%\bigskip\noindent
-% This package is copyright \textcopyright\ 2004\kern.09em--2019 R Schlicht.
+% This package is copyright \textcopyright\ 2004\kern.09em--2020 R Schlicht.
% It may be distributed and/or modified under the conditions of the
% \IfFileExists{lppl.tex}{\hyperref[LPPL:LPPL]}{\href{http://www.latex-project.org/lppl/}}
% {\LaTeX\ Project Public License},
@@ -823,7 +825,7 @@
%
%\newpage
%\emptypdfpageresources ^^A layers of the logo
-%{\sffamily\def\familydefault{\sfdefault}\ifcmr\else\def\bfdefault{sb}\fi
+%{\sffamily\def\familydefault{\sfdefault}\ifcmr\else\DeclareFontSeriesDefault[sf]{bf}{sb}\fi
% \tableofcontents
% \listoftables
%}
@@ -972,8 +974,8 @@
% the well-known |key=value| syntax. In the following, you will find a
% description of all \key{keys} and their possible |values|
% (`|true|' may be omitted; multiple values, where allowed, must be enclosed in
-% braces; the default value is shown on the right, preceded by an asterisk
-% if it is contingent on the \TeX\ engine, version and/or the output mode).
+% braces; the default value is shown on the right -- if preceded by an asterisk,
+% this default only applies when running an up-to-date \pdftex\ in <PDF> mode).
%
%
%\subsection{Enabling the micro-typographic features}\label{sub:options-microtype}
@@ -989,7 +991,7 @@
% output mode (see section~\ref{sub:options-misc}), or with \xetex.
% In other words, \microtype\ will try to apply as much micro-typography as
% can safely be expected to work under the respective conditions (hence, it is
-% usually not necessary to load the package with different options for <PDF>
+% usually not necessary to load the package with different options, \eg, for <PDF>
% resp. <DVI> mode).
%
% Protrusion and expansion may be enabled or disabled independently from each
@@ -1068,15 +1070,15 @@
% & $\less$ 0.14f & <DVI>/<PDF> & _ & _ & _ & _ & _ & _\\
% & $\geq$ 0.14f & <DVI>/<PDF> & ! & ? & _ & _ & _ & _\\
% & $\geq$ 1.20 & <DVI> & ! & ? & _ & _ & _ & _\\
-% & & <PDF> & ! & ! & ! & _ & _ & _\\
+% & & <PDF> & ! & ? & ! & _ & _ & _\\
% & $\geq$ 1.40 & <DVI> & ! & ? & _ & ? & ? & _\\
-% & & <PDF> & ! & ! & ! & ? & ? & ?\\^^A\,\textsuperscript{\itshape a}\\
+% & & <PDF> & ! & ? & ! & ? & ? & ?\\
%\cmidrule(r){1-3}
-% \luatex ^^A we will have to re-model kerning, spacing and tracking with \luatex
+% \luatex ^^A we will have to re-model kerning and spacing with \luatex
% & $\geq$ 0.30 & <DVI> & ! & ? & _ & _ & _ & _\\
-% & & <PDF> & ! & ! & ! & _ & _ & _\\
-% & $\geq$ 0.62 & <DVI> & ! & ? & ?\,\textsuperscript{\itshape a} & _ & _ & ?\,\textsuperscript{\itshape a}\\
-% & & <PDF> & ! & ! & ! & _ & _ & ?\\
+% & & <PDF> & ! & ? & ! & _ & _ & _\\
+% & $\geq$ 0.62 & <DVI> & ! & _ & \hskip1em\llap{(}\textcolor{theblue}{$\boxtimes$})\textsuperscript{\itshape a} & _ & _ & ?\\
+% & & <PDF> & ! & _ & ! & _ & _ & ?\\
%\cmidrule(r){1-3}
% \let\textoractual\@firstoftwo ^^A why?
% \xetex
@@ -1084,14 +1086,13 @@
%\bottomrule
%\end{tabular}^^A
%\vskip4pt\footnotesize
-%\hskip-.8em
+%\hskip-1em
% ! = enabled\quad
% ? = not enabled\quad
% _ = not available
%\hfill
-% ^^A \textit{a}\quad $\geq$ 1.40.4 recommended
-% \textit{a}\quad for legacy (<TFM>) fonts only
-%\vskip3pt
+% \textit{a}\quad by means of variable tracking\hskip1em
+%\vskip4pt
%\end{minipage}^^A
%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox
%\end{table}
@@ -1138,7 +1139,13 @@
% instances of the fonts may be calculated automatically and at run-time instead
% of the user having to prepare them in advance. This option is true
% by default provided that you are using a \TeX\ engine with this capability
-% and the output mode is <PDF>.
+% and the output mode is <PDF>.\footnote{
+% With \pdftex, automatic font expansion does not work with bitmap fonts.
+% Therefore, if you are using the Computer Modern Roman fonts in <T1> encoding,
+% you should either install the \pkg{cm-super} package or use the Latin Modern
+% fonts (package \pkg{lmodern}).}
+%\changes{v1.9}{2005/08/27}{add remark about Type\,1 fonts required for
+% automatic font expansion}
% If \opt{auto} is set to false, the font instances for all expansion steps must exist
% (with files called \meta{font~name}\texttt{\textpm}\meta{expansion value},
% \eg, \file{cmr12+10}, as described in the \cite{pdftexman}).
@@ -1146,23 +1153,17 @@
% If expanded instances of the fonts are available, they will be used
% regardless whether \opt{auto} is true or not.
%\fi
+% With \luatex, expansion is always automatic.
%
-%\changes{v1.9}{2005/08/27}{add remark about Type\,1 fonts required for
-% automatic font expansion}
-% With \pdftex, automatic font expansion does not work with bitmap fonts. Therefore, if you
-% are using the Computer Modern Roman fonts in <T1> encoding,
-%\iffalse
-% \footnote{
-% En passant, it may be noted that Type\,1 format and <T1> encoding are in
-% no other way related than that both start with a `T' and end with a `1'.}
-%\fi
-% you should either install the \pkg{cm-super} fonts or use the Latin Modern
-% fonts (package \pkg{lmodern}).
-%\changes{v2.7}{2017/07/06}{add remark about automatic font expansion with \texttt{dvilualatex}}
-% With \luatex, expansion is always automatic, and also works in <DVI> mode
-% (|dvilualatex|), however, because postprocessing programs like |dvips|
-% or |dvipdfmx| are not (yet) capable of dealing with OpenType fonts,
-% only for legacy fonts.
+% When generating <DVI> files, font expansion has to be enabled explicitly.
+% With \pdftex, \emph{automatic} font expansion will not work because
+% the postprocessing drivers (|dvips|, |dvipdfm|, etc.) resp. the <DVI> viewer
+% are not able to generate the fonts on the fly.
+%^^A\changes{v2.7}{2017/07/06}{add remark about automatic font expansion with \texttt{dvilualatex}}
+%\changes{v2.8}{2020/02/09}{squash fake news about automatic font expansion with \texttt{dvilualatex}}^^A
+% With \luatex, on the other hand, expansion in <DVI> mode is realised by
+% modifying the inter-letter spacing (tracking) instead of the glyphs
+% themselves, which may or may not be desired.
%
%\medskip
%\Describe{Option}{stretch}{:integer}[20]
@@ -1212,36 +1213,11 @@
% to +1000.
%
%
-%\enlargethispage{\baselineskip} ^^A layout
%\subsection{Miscellaneous options}\label{sub:options-misc}
%
-%\Describe{Option}{DVIoutput}{true,*false}
-% \pdftex\ and \luatex\ are not only able to generate <PDF> output but can also
-% spit out <DVI> files.\footnote{
-% All recent \TeX\ systems are using \pdftex\ as the default engine also for
-% <DVI> output.}
-% The latter can be ordered with the option \opt{DVIoutput}, which will set
-% \cmd\pdfoutput\ to zero.
-% For \xetex, this option is not applicable.
-%
-%\changes{v1.5}{2004/12/15}{add note about \opt{DVIoutput} option}
-% Note that this will confuse packages that depend on the value of
-% \cmd\pdfoutput\ if they were loaded earlier, as they had been made believe
-% that they were called to generate <PDF> output where they actually weren't.
-% These packages are, among others: \pkg{graphics}, \pkg{color},
-% \pkg{hyperref}, \pkg{pstricks} and, obviously, \pkg{ifpdf}. Either load these
-% packages after \microtype\ or else issue the command |\pdfoutput=0| earlier
-% -- in the latter case, the \opt{DVIoutput} option is redundant.
-%
-% When generating <DVI> files, font expansion has to be enabled explicitly.
-% With \pdftex, neither letterspacing nor \emph{automatic} font expansion will work because
-% the postprocessing drivers (|dvips|, |dvipdfm|, etc.) resp. the <DVI> viewer
-% are not able to generate the fonts on the fly.
-%
%\changes{v2.0}{2006/11/28}{add remark about `\opt{draft}' option disabling \microtype\
% (noted by \contributor Michalis Miatidis <miatidis\at informatik.rwth-aachen.de>)}
% ^^A private mail, 2006/11/26
-%\medskip
%\Describe{Option}{draft}{true,!false}
%\DescribeOption{final}
% If the \opt{draft} option is passed to the package, \emph{all
@@ -1276,6 +1252,31 @@
% You can have a different configuration file loaded instead by specifying its
% name \emph{without the extension}, \eg, |config=mycrotype|.
%
+%\medskip
+%\Describe{Option}{DVIoutput}{true,*false}
+% \pdftex\ and \luatex\ are not only able to generate <PDF> output but can also
+% spit out <DVI> files. In fact, all recent \TeX\ systems are using \pdftex\ as
+% the default engine also for <DVI> output, and \luatex\ too can be called
+% in <DVI> mode. However, since changing the output mode inside the document
+% may have undesired effects, this option should be considered deprecated;
+% instead, it is recommended to just call the respective program (|latex| resp.
+% |dvilualatex|).
+%\changes{v2.8}{2020/04/02}{declare \opt{DVIoutput} option deprecated}
+% For \xetex, this option is not applicable.
+%
+%\iffalse
+%\changes{v1.5}{2004/12/15}{add note about \opt{DVIoutput} option}
+% The latter can be ordered with the option \opt{DVIoutput}, which will set
+% \cmd\pdfoutput\ to zero.
+% Note that this will confuse packages that depend on the value of
+% \cmd\pdfoutput\ if they were loaded earlier, as they had been made believe
+% that they were called to generate <PDF> output where they actually weren't.
+% These packages are, among others: \pkg{graphics}, \pkg{color},
+% \pkg{hyperref}, \pkg{pstricks} and, obviously, \pkg{ifpdf}. Either load these
+% packages after \microtype\ or else issue the command |\pdfoutput=0| earlier
+% -- in the latter case, the \opt{DVIoutput} option is redundant.
+%\fi
+%
%\iffalse ^^A ... waiting for bug reports before documenting yet another option ...
%\medskip
%\Describe{Option}{defersetup}{!true,false}
@@ -1301,7 +1302,7 @@
% expansion settings with a |context| keyword are encountered. If these
% settings are loaded after the preamble, however, it is too late, and you
% should set the \opt{copyfonts} option manually.
-% This only works with \pdftex\ 1.40.4 or later.
+% This only works with \pdftex\ 1.40.4 or later, or \luatex.
%\fi
%
%
@@ -1413,20 +1414,13 @@
% normal font. Size selection commands are possible, too, however, ranges are
% not allowed.
%
-%\medskip\noindent
-% Table~\ref{tab:predefined-font-sets} lists the eleven predefined font sets.
-% They may also be activated by passing their name to the feature options
-% \opt{protrusion}, \opt{expansion}, \opt{tracking}, \opt{kerning} and
-% \opt{spacing} when loading the package, for example:
-%\begin{verbatim}
-%\usepackage[protrusion=allmath,tracking=smallcaps]{microtype}
-%\end{verbatim}
-%
+%\newcounter{nrfontsets}
%\begin{table}\microtypesetup{protrusion=false}\small
%\caption{Predefined font sets}\label{tab:predefined-font-sets}
%\catcode`\!=13 \def!{\textcolor{thered}{$\varnothing$}}
%\catcode`\/=13 \def/#1/{\textcolor{thegreen}{#1}}
%\def<#1>{\textcolor{theblue}{\acronym{#1}}}
+%\def\s#1{|#1|\stepcounter{nrfontsets}}
%\setlength\fboxsep{4pt}
%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax
%\fcolorbox{theframe}{white}{^^A
@@ -1443,56 +1437,56 @@
% & \footnotesize Size\\
%\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}
%\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule{6-6}
-% |all|
+% \s{all}
% & !
% & !
% & !
% & !
% & ! \\
%\cmidrule(r){1-1}
-% |alltext|\linebreak(|allmath|)
+% \s{alltext}\linebreak(\s{allmath})
% & Text encodings, <TS1>\linebreak (<OML>, <OMS>, <U>)
% & !
% & !
% & !
% & ! \\
%\cmidrule(r){1-1}
-% |alltext-nott|\linebreak(|allmath-nott|)
+% \s{alltext-nott}\linebreak(\s{allmath-nott})
% & Text encodings, <TS1>\linebreak (<OML>, <OMS>, <U>)
% & /\cmd\rm|*|/,\linebreak/\cmd\sf|*|/
% & !
% & !
% & ! \\
%\cmidrule(r){1-1}
-% |basictext|\linebreak(|basicmath|)
+% \s{basictext}\linebreak(\s{basicmath})
% & Text encodings \linebreak (<OML>, <OMS>)
% & /\cmd\rm|*|/,\linebreak/\cmd\sf|*|/
% & /\cmd\md|*|/
% & !
% & /\cmd\normalsize/, /\cmd\footnotesize/, /\cmd\small/, /\cmd\large/\\
%\cmidrule(r){1-1}
-% |smallcaps|
+% \s{smallcaps}
% & Text encodings
% & !
% & !
% & /\cmd\sc|*|/,/si/,/scit/
% & ! \\
%\cmidrule(r){1-1}
-% |footnotesize|
+% \s{footnotesize}
% & Text encodings, <TS1>
% & !
% & !
% & !
% & |-|/\cmd\small/\\
%\cmidrule(r){1-1}
-% |scriptsize|
+% \s{scriptsize}
% & Text encodings, <TS1>
% & !
% & !
% & !
% & |-|/\cmd\footnotesize/\\
%\cmidrule(r){1-1}
-% |normalfont|
+% \s{normalfont}
% & /\cmd\encoding|*|/
% & /\cmd\family|*|/
% & /\cmd\series|*|/
@@ -1504,11 +1498,23 @@
% `Text encodings' = <OT1>, <T1>, <T2A>, <LY1>, <OT4>, <QX>, <T5>, <EU1>, <EU2>, <TU>
%\hfill
% `/\bslash\,\dots|*|/' = `/\bslash\,\dots|default|/'
-%\vskip3pt
+%\vskip4pt
%\end{minipage}^^A
%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox
+%\ifcase\c@nrfontsets\or\or\or\or\or\or\or\or\or\or\or
+% \def\@currentlabel{eleven}\or \def\@currentlabel{twelve}\else
+% \PackageError{\MT@MT}{I cannot count any further}{}\fi\label{nrfontsets}
%\end{table}
%
+%\medskip\noindent
+% Table~\ref{tab:predefined-font-sets} lists the \ref*{nrfontsets} predefined font sets.
+% They may also be activated by passing their name to the feature options
+% \opt{protrusion}, \opt{expansion}, \opt{tracking}, \opt{kerning} and
+% \opt{spacing} when loading the package, for example:
+%\begin{verbatim}
+%\usepackage[protrusion=allmath,tracking=smallcaps]{microtype}
+%\end{verbatim}
+%
%\ifcmr\else\pagebreak\fi ^^A layout
%\medskip
%\Describe{Macro}{\UseMicrotypeSet}{?features,set name}
@@ -1521,8 +1527,8 @@
%\Describe{Macro}{\DeclareMicrotypeSetDefault}{?features,set name}
% If a feature is enabled but no font set has been chosen explicitly, the sets
% declared by this command will be activated. By default, the `|alltext|' font
-% set will be used for character protrusion and additional kerning, the
-% `|basictext|' set for font expansion and interword spacing, and the
+% set will be activated for character protrusion and additional kerning, the
+% `|alltext-nott|' set for font expansion and interword spacing, and the
% `|smallcaps|' set for tracking.
%
%\medskip\noindent
@@ -1625,7 +1631,7 @@
% (since the value that comes last will take precedence). Font settings
% will be loaded recursively.
% The following options will affect all loaded lists, in other words,
-% any options from the loaded lists will be ignored:
+% any options from the loaded lists will be ignored:\looseness=-1 ^^A layout
%\changes{v1.8}{2005/06/23}{add example for \texttt{factor} option}
% \item[\key{factor}] This option can be used to influence all protrusion
% factors of the list, overriding any global \opt{factor} setting (see
@@ -1736,12 +1742,13 @@
% This paragraph contains a `fussy' widow.}
%\end{verbatim}
% This method of employing contexts to temporarily apply different
-% expansion parameters only works with \pdftex\ version 1.40.4 or later.^^A
+% expansion parameters only works with \pdftex\ version 1.40.4 or later,^^A
% \footnote{For older versions, a dirty trick is laid out in
% section~\ref{ssec:font-setup} on page~\pageref{exp-hack}.}
-% Also note that \pdftex\ prohibits the use of fonts with different expansion
+% or with \luatex.
+% Also note that both \pdftex\ and \luatex\ prohibit the use of fonts with different expansion
% limits or steps (even of different fonts) within one paragraph, hence
-% the |sloppy| context has to be applied to complete paragraphs.
+% the |sloppy| context would have to be applied to complete paragraphs.
% \item[\key{factor}]
% This option provides a different method to alter expansion settings for
% certain fonts, working around the restriction just mentioned. The
@@ -1936,7 +1943,7 @@
% is, whenever a particular character appears in the text, the specified
% kerning will be inserted, regardless of which character precedes resp.
% follows it.
-% (Put in another way, this feature allows to modify the left or right
+% (Put differently, this feature allows modifying the left or right
% \textit{sidebearings} of specific glyphs.)
%
%\emptypdfpageresources ^^A layers of letterspacing illustration
@@ -2116,6 +2123,7 @@
% This package ships with configuration files for a number of font families.
% Table~\ref{tab:fonts} lists them all.
%
+%\enlargethispage{\baselineskip} ^^A layout
%\begin{table}[t]\small
%\changes{v1.6a}{2005/02/02}{add table of fonts with tailored protrusion settings}
%\caption{Fonts with tailored protrusion settings}\label{tab:fonts}
@@ -2125,10 +2133,10 @@
%\begin{minipage}{\textwidth}
%\def\arraystretch{1.2}
%\long\def\@makefntext#1{%
-% \leftskip 0pt
-% \parindent 0pt
-% \everypar{\parindent 0pt}%
-% \leavevmode\hbox to 15pt{\@thefnmark\hss}#1}
+% \leftskip 1em
+% \parindent -1em
+% \everypar{\parindent -1em}%
+% \leavevmode\hbox to 1em{\@thefnmark\hss}#1}
%\let\footnoterule\relax
%\def\fnref#1{\textsuperscript{\itshape\ifpdf\ref*{#1}\else\ref{#1}\fi}}
%\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*3l@{}}
@@ -2141,7 +2149,7 @@
% Generic
% & <OT1>, <T1>, <T2A>, <LY1>, <QX>, (<TS1>)\footnote{Incomplete\label{fn:incmpl}}
% & n, (it, sl, sc)\fnref{fn:incmpl} \\
-% Computer Modern Roman (|cmr|)\footnote{Aliases: Latin Modern (|lmr|),
+% Computer Modern Roman (|cmr|)\footnote{Aliases: Latin Modern Roman (|lmr|),
% \pkg{ae} (|aer|), \pkg{zefonts} (|zer|),
% \pkg{eco} (|cmor|), \pkg{hfoldsty} (|hfor|)}
% & <OT1>, <OT4>, <T1>, <T2A>, <T5>, <LY1>, <TS1>
@@ -2164,15 +2172,15 @@
% & n, it, (sl)\fnref{fn:it-sl}, sc, si\\
% Palatino (|ppl|, |pplx|, |pplj|)\footnote{Aliases: \pkg{pxfonts} (|pxr|),
% \pkg{qfonts}/QuasiPalatino, \TeX\ Gyre Pagella (|qpl|),
-% \pkg{newpx}, <FPL> Neu (|fp9x|, |fp9j|)}
+% \pkg{newpx}, <FPL> Neu (|fp9x|, |fp9j|), \pkg{domitian}}
% & <OT1>, <OT4>, <T1>, <LY1>, (<TS1>)\fnref{fn:incmpl}
% & n, it, (sl)\fnref{fn:it-sl}, sc \\
% Times (|ptm|, |ptmx|, |ptmj|)\footnote{Aliases: \pkg{txfonts} (|txr|),
% \pkg{qfonts}/QuasiTimes, \TeX\ Gyre Termes (|qtm|),
-% \pkg{newtx}, \pkg{tempora}}
+% \pkg{newtx}, \pkg{tempora}, \pkg{step}, \pkg{stix}/\pkg{stix2}}
% & <OT1>, <OT4>, <T1>, <LY1>, <QX>, (<TS1>)\fnref{fn:incmpl}
% & n, it, (sl)\fnref{fn:it-sl}, sc \\
-% Latin Modern Roman
+% Latin Modern Roman\footnote{Alias: New Computer Modern}
% & <EU1>/<2>, <TU> [Latin, Greek]
% & n, it, (sl)\fnref{fn:it-sl}\\
% Charis <SIL>
@@ -2183,7 +2191,7 @@
% & <EU1>/<2>, <TU> [Latin, Cyrillic, Greek]
% & n, it, sc, si\\
%\fi
-% Palatino Linotype\footnote{Aliases: \TeX\ Gyre Pagella, Palatino <LT> Std, Palatino}
+% Palatino Linotype\footnote{Aliases: \TeX\ Gyre Pagella, Palatino <LT> Std, Palatino, Domitian}
% & <EU1>/<2>, <TU> [Latin]
% & n, it, sc\\
% Computer Modern math (|cmsy|, |cmm|)\footnote{Aliases: Latin Modern (|lmsy|, |lmm|)}
@@ -2619,8 +2627,8 @@
%\end{verbatim}
% This error message will occur if you are trying to employ font expansion
% while creating <DVI> output. Remember that \emph{automatic} font expansion
-% only works when running \pdftex\ in <PDF> mode. Although expansion is also
-% possible in <DVI> mode, it requires that all instances of the expanded fonts
+% only works when running \pdftex\ or \luatex\ in <PDF> mode. Although expansion is also
+% possible in <DVI> mode with \pdftex, it requires that all instances of the expanded fonts
% exist on your \TeX\ system.
%
%\changes{v2.2}{2007/06/13}{add hint about error message with \pdftex\ 1.40}
@@ -2652,7 +2660,7 @@
% distributions, this can be changed in the file \file{updmap.cfg} by setting
% |pdftexDownloadBase14| to |true|.
%
-%\pagebreak ^^A layout
+%\ifcmr\else\pagebreak\fi ^^A layout
%\changes{v1.9a}{2005/11/15}{add explanation for error message with non-Type\,1 fonts}
% \item
%\begin{verbatim}
@@ -2871,10 +2879,14 @@
% \contributor Phelype Oleinik <phe.h.o1\at gmail.com>,
% \contributor Falk Hanisch <falk.hanisch\at tu-dresden.de>,
% \contributor Markus Kohm <komascript\at gmx.info>,
-% \contributor Paolo Polesana <@\at @>, ^^A https://tex.stackexchange.com/users/95083/paolo-polesana
-% \contributor Oliver Kopp <koppdev\at gmail.com>
+% \contributor Paolo Polesana <@\at @>, ^^A https://tex.stackexchange.com/users/95083/paolo-polesana
+% \contributor Oliver Kopp <koppdev\at gmail.com>,
+% \contributor Hironori Kitagawa <h_kitagawa2001\at yahoo.co.jp>,
+% `\contributor d909 <@\at @>', ^^A https://tex.stackexchange.com/users/176404/d909
+% \contributor Daniel Benjamin Miller <dbmiller\at dbmiller.org>,
+% \contributor Md Ayquassar <mdayq0\at lenta.ru>
% and
-% \contributor Hironori Kitagawa <h_kitagawa2001\at yahoo.co.jp>.
+% \contributor Marcel Kr\"uger <tex\at 2krueger.de>.
%
%
%\iffalse
@@ -2946,9 +2958,9 @@
% \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb29-1/tb91thanh-fonts.pdf})
%
% \bibitem[\pdftex\ manual]{pdftexman}
-% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder,
+% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder, Karl Berry,
% \emph{The \pdftex\ user manual},
-% \newblock 2~January 2018.
+% \newblock 2~March 2020.
% \newblock (\ctanurl{systems/doc/pdftex/manual/pdftex-a.pdf})
% ^^A latest version at \url{http://sarovar.org/projects/pdftex/}
% ^^A or even \url{http://foundry.supelec.fr/scm/?group_id=23}
@@ -2960,19 +2972,19 @@
%
% \bibitem[\LaTeXe\ font selection]{fntguide}
% \LaTeX3 Project Team, \emph{\LaTeXe\ font selection},
-% \newblock July 2019.
+% \newblock July 2020.
% \newblock (\ctanurl{macros/latex/base/fntguide.pdf})
%
% \bibitem[\pkg{fontspec}]{fontspec}
% Will Robertson,
% \emph{The \pkg{fontspec} package: Font selection for \xe\LaTeX\ and Lua\LaTeX},
-% \newblock 19~October 2019.
+% \newblock 21~February 2020.
% \newblock (\ctanpkgurl{fontspec})
%
% \bibitem[\pkg{luaotfload}]{luaotfload}
% \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer, Marcel Kr\"uger,
% \emph{The \pkg{luaotfload} package},
-% \newblock 10~November 2019.
+% \newblock 2~September 2020.
% \newblock (\ctanpkgurl{luaotfload})
%
% \bibitem[\pkg{pdfcprot}]{pdfcprot}
@@ -3023,7 +3035,11 @@
%
%\begin{History}
%
-%\VersionDate{\expandafter\@gobble\fileversion}{\filedate}
+%\Version{\expandafter\@gobble\fileversion}{\filedate}
+% \item New default font sets for expansion and spacing: `|alltext-nott|'
+% \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}}
+%
+%\VersionDate{2.7d}{2019/11/18}
%
%\VersionDate{2.7c}{2019/10/10}
%
@@ -3277,6 +3293,7 @@
% \setlength{\linewidth}{\textwidth}
% \footnotesize
%}
+%
%\def\LPPLSettings{
%\changes{v1.9e}{2006/06/13}{include <LPPL>}
% \let\LPPLicense\empty
@@ -3353,9 +3370,9 @@
%^^A \tagcode,\letterspacefont,\pdfcopyfont,\pdffontexpand,\pdfnoligatures,
%^^A \pdfprotrudechars,\pdfadjust(interwordglue,spacing),\pdf(ap,pre)pendkern,
%^^A \pdftracingfonts} ^^A pdftex
-%\DoNotIndex{\XeTeXversion,\XeTeXrevision} ^^A xetex
-%^^A\DoNotIndex{\XeTeXcharglyph,\XeTeXcountglyphs,\XeTeXfonttype,\XeTeXglyph,
-%^^A \XeTeXglyphindex,\XeTeXglyphname,\XeTeXprotrudechars}
+%\DoNotIndex{\XeTeXversion,\XeTeXrevision,\strcmp} ^^A xetex
+%^^A\DoNotIndex{\XeTeXcharglyph,\XeTeXfonttype,\XeTeXglyph,\XeTeXglyphindex,
+%^^A \XeTeXglyphname,\XeTeXlastfontchar,\XeTeXprotrudechars}
%\DoNotIndex{\directlua,\luatexversion} ^^A luatex
%^^A\DoNotIndex{\adjustspacing,\copyfont,\expandglyphsinfont,
%^^A \ignoreligaturesinfont,\outputmode,\protrudechars,\tracingfonts}
@@ -3396,7 +3413,7 @@
%\DoNotIndex{\RequireLuaModule} ^^A luatexbase
%\DoNotIndex{\pdf@escapestring} ^^A pdftexcmds
%\DoNotIndex{\py@macron} ^^A pinyin
-%\DoNotIndex{\SOUL@,\soulregister} ^^A soul
+%\DoNotIndex{\SOUL@,\SOUL@doword,\soulregister} ^^A soul
%\DoNotIndex{\tikz@expandcount} ^^A tikz
%\DoNotIndex{\conditionally@traceoff} ^^A trace
%\DoNotIndex{\@xspace,\@xspace@firsttrue} ^^A xspace
@@ -3495,11 +3512,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
}
-%<package>\MT@fix@catcode{17}{14}% ^^Q (comment)
+\MT@fix@catcode{17}{14}% ^^Q (comment)
\MT@fix@catcode{24} {9}% ^^X (ignore)
%<package>\MT@fix@catcode{33}{12}% !
%<package>\MT@fix@catcode{34}{12}% "
@@ -3780,6 +3797,7 @@
%\end{macro}
%\changes{v2.2}{2007/05/01}{use catcode trickery for \etex\ test}
%^^A\changes{v2.3a}{2007/12/29}{removed} ^^A \MT@maybe@etex
+%\changes{v2.8}{2020/05/26}{\letterspace\ works with \etex\ only}
% For definitions that depend on \etex\ features.
% \begin{macrocode}
\ifcase 0%
@@ -3791,6 +3809,8 @@
\else
\catcode`\^^Q=9 \catcode`\^^X=14
\fi
+%<letterspace>^^Q\MT@warning@nl{This package requires the etex extensions.
+%<letterspace>^^Q \MessageBreak Exiting}\MT@restore@catcodes\endinput
%<debug>\MT@dinfo@nl{0}{this is
%<debug>^^Q not
%<debug> etex}
@@ -3850,9 +3870,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
%</letterspace>
@@ -3968,7 +3990,11 @@
% \item N/A
% \item \luatex\ ($\less$~0.36)
% \item + \cmd\directlua\ without state number ($\geq$~0.36)
-% \item + \cmd\letterspacefont\ ($\geq$~0.62)
+% \item + \cmd\letterspacefont; non-automatic expansion doesn't work anymore,
+% and automatic expansion in <DVI> mode is realised by modifying the tracking,
+% not the glyphs\footnote{This may have been changed earlier, but I'm no longer able
+% to find out when (the last version that actually works for me is 0.40).}
+% ($\geq$~0.62)
% \item + almost all of the \pdftex\ primitives have been renamed ($\geq$~0.85)
% \item + default \cmd\efcode\,=\,1000;
% \cmd\protrusionboundary\ [not yet supported] ($\geq$~0.90)
@@ -3988,7 +4014,7 @@
% number.
%\changes{v2.3d}{2009/03/25}{update for \luatex\ 0.36}
% \begin{macrocode}
-\def\MT@lua{\directlua}
+\let\MT@lua\directlua
\def\MT@luatex@no{5}
\ifnum\luatexversion<90
\def\MT@luatex@no{4}
@@ -4094,6 +4120,7 @@
%\end{macro}
%\end{macro}
%\end{macro}
+% [This line intentionally left blank.]
%\begin{macro}{\MT@pr@level}
%\begin{macro}{\MT@ex@level}
%\begin{macro}{\MT@pr@factor}
@@ -4224,7 +4251,7 @@
%<pdftex-def> \MT@pdftex@no
%<luatex-def> \MT@luatex@no
<#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}
-%<luatex-def&debug>\MT@requires@luatex4{\directlua{tex.enableprimitives('pdf',{'tracingfonts'})}}\relax
+%<luatex-def&debug>\MT@requires@luatex4{\MT@lua{tex.enableprimitives('pdf',{'tracingfonts'})}}\relax
%<pdftex-def&debug>\MT@requires@pdftex6{
%<debug>\pdftracingfonts=1
%<pdftex-def&debug>}\relax
@@ -4249,8 +4276,9 @@
% load \pkg{fontspec} before \microtype.
% There will hardly be any \luatex\ documents that don't load this package, anyway.
%\changes{v2.6}{2013/06/19}{load \pkg{luaotfload} with \luatex}
+% Since 2017/01/01, it is already loaded in the format.
% \begin{macrocode}
-\RequirePackage{luaotfload}
+\@ifl@t@r\fmtversion{2017/01/01}\relax{\RequirePackage{luaotfload}}
\MT@lua{require("microtype")}
%</luatex-def>
% \end{macrocode}
@@ -4262,6 +4290,7 @@
% \contributor Ulrike Fischer <news3\at nililand.de>)}
% ^^A private mail, 2019/02/19
% ^^A private mail, 2019/02/26
+%\changes{v2.8}{2020/05/26}{fix for \pkg{luatexbase}}
% \begin{macrocode}
%<*luafile>
@@ -4277,7 +4306,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, ...)
@@ -4589,19 +4618,21 @@ microtype.if_dimen = if_dimen
% (found by \contributor Wiebke Petersen <petersew\at uni-duesseldorf.de>)}
% ^^A MID: <esmd6k$954$1@news1.rz.uni-duesseldorf.de>
%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available}
+%\changes{v2.8}{2020/06/18}{use \xetex's \cmd\stringcmp}
% \begin{macrocode}
-%<*pdftex-def>
-\MT@requires@pdftex5{
+%<*pdftex-def|xetex-def>
+%<pdftex-def>\MT@requires@pdftex5{
\def\MT@ifstreq#1#2{%
- \ifcase\pdfstrcmp{#1}{#2}\relax
+%<pdftex-def> \ifnum\pdfstrcmp{#1}{#2}=\z@
+%<xetex-def> \ifnum\strcmp{#1}{#2}=\z@
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
}
+%</pdftex-def|xetex-def>
+%<*pdftex-def>
}{
-%</pdftex-def>
-%<*pdftex-def|xetex-def>
\def\MT@ifstreq#1#2{%
\edef\MT@res@a{#1}%
\edef\MT@res@b{#2}%
@@ -4611,8 +4642,8 @@ microtype.if_dimen = if_dimen
\expandafter\@secondoftwo
\fi
}
-%</pdftex-def|xetex-def>
-%<pdftex-def>}
+}
+%</pdftex-def>
%<luatex-def>\def\MT@ifstreq#1#2{\csname\MT@lua{microtype.if_str_eq([[#1]],[[#2]])}\endcsname}
%<*luafile>
local function if_str_eq(s1, s2)
@@ -4842,21 +4873,45 @@ microtype.if_str_eq = if_str_eq
% \end{macrocode}
%\end{macro}
%\changes{v2.6a}{2016/05/03}{fixes for \letterspace\ package with \luatex}
+%\begin{macro}{\MT@if@luaotf@font}
+%\changes{v2.8}{2019/11/27}{use \texttt{lua} function}
+% For fonts loaded by \pkg{luaotfload} we query the font's table.
+% \begin{macrocode}
+%<letterspace>\MT@pdf@or@lua{\let\MT@if@luaotf@font\@secondoftwo}{
+%<luatex-def|letterspace>\def\MT@if@luaotf@font{\csname\MT@lua{%
+%<luatex-def> microtype.if_luaotf_font()
+%<*luafile|letterspace>
+%<luafile>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
+%<luafile>end
+%<luafile>microtype.if_luaotf_font = if_luaotf_font
+%<luafile>
+%</luafile|letterspace>
+%<luatex-def|letterspace> }\endcsname
+%<luatex-def|letterspace>}
+%<letterspace>}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\MT@do@font}
% Execute \meta{\#1} 256 times,
% \begin{macrocode}
%<pdftex-def|letterspace>\def\MT@do@font{\MT@while@num\z@\@cclvi}
% \end{macrocode}
-% resp. for the whole font for \luatex, if loaded by \pkg{fontspec}/\pkg{luaotfload}.
+% resp. for the whole font for \luatex, if it's a Unicode font.
%\changes{v2.5}{2010/08/14}{adapt for \luatex}
%\changes{v2.6}{2013/07/14}{speed up for \luatex}
%\changes{v2.6a}{2015/05/10}{fix \texttt{lua} function
% (reported by \contributor Herbert Vo\ss{} <Herbert.Voss\at FU-Berlin.DE>)}
% ^^A private mail, 2016/05/10
+%\changes{v2.8}{2020/06/20}{simplify \texttt{lua} function}
% \begin{macrocode}
%<*luatex-def>
\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}}%
@@ -4864,23 +4919,15 @@ microtype.if_str_eq = if_str_eq
%</luatex-def>
% \end{macrocode}
% This is the |lua| function, which is much faster than looping through all glyphs
-% in \TeX. Legacy fonts (which this function might be fed with, because \pkg{fontspec}
-% isn't always getting it right) don't contain a |v.index| field.
+% in \TeX. Legacy fonts (which this function should never work on) don't contain a |v.index| field.
% \begin{macrocode}
%<*luafile>
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
@@ -4889,15 +4936,17 @@ microtype.do_font = do_font
%</luafile>
% \end{macrocode}
-% The \xetex\ variant.
+% The \xetex\ variant (it's slow~\dots!).
%\changes{v2.5}{2010/05/18}{adapt for \xetex}
+%\changes{v2.8}{2020/02/06}{fix for \xetex}
% \begin{macrocode}
%<*xetex-def>
\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
}
%</xetex-def>
%<*package>
@@ -5219,27 +5268,8 @@ microtype.do_font = do_font
% \begin{macrocode}
\newif\ifMT@xunicode
\MT@with@package@T{xunicode}\MT@xunicodetrue
-%</package>
\newif\ifMT@fontspec
-%<letterspace>\MT@requires@latex2{
\MT@with@package@T{fontspec}\MT@fontspectrue
-%<letterspace>}{\MT@fontspecfalse}
-% \end{macrocode}
-%\end{macro}
-%\end{macro}
-%\begin{macro}{\MT@if@fontspec@font}
-%\begin{macro}{\MT@fontspec@setup}
-%\changes{v2.6}{2016/04/23}{fix \cs{MT@if@fontspec@font} ABD}
-% For fonts loaded by \pkg{fontspec} (or, rather, \pkg{luaotfload}) we can
-% use some of the features the latter package provides.
-% \begin{macrocode}
-\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
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -5255,7 +5285,6 @@ microtype.do_font = do_font
% lest we disturb \pkg{tikz}. This is used in \cs{MT@afteraftergroup}, and we
% don't need it for \letterspace.
% \begin{macrocode}
-%<*package>
\let\MT@maybe@gobble@with@tikz\@firstofone
\def\MT@tikz@setup{%
\def\MT@maybe@gobble@with@tikz{%
@@ -5359,11 +5388,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
-%</package>
-%<plain> \MT@requires@latex2{
- \MT@with@package@T{fontspec}{\MT@fontspectrue\MT@fontspec@setup}%
-%<plain> }\relax
-%<*package>
+ \MT@with@package@T{fontspec}\MT@fontspectrue
% \end{macrocode}
% We can clean up \cs{MT@setupfont@hook} now.
%\changes{v2.6}{2014/03/17}{redefine \cs{MT@setupfont@hook} globally
@@ -5426,9 +5451,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\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}%
}%
% \end{macrocode}
% \dots~and the backslash (which would lead to problems in \cs{MT@get@slot}).
@@ -5437,7 +5462,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% ^^A private mail, 2006/09/15
% \begin{macrocode}
\g@addto@macro\MT@setupfont@hook{%
- \catcode`\\\z@
+ \catcode`\\=\z@
% \end{macrocode}
% Inside a listing, \cmd\space\ is redefined.
%\changes{v2.5}{2011/05/03}{restore \cmd\space\ inside \pkg{listings}
@@ -5445,7 +5470,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% ^^A private mail, 2011/04/30
% ^^A (beta:07)
% \begin{macrocode}
- \def\space{ }%
+ \def\space{ }%
% \end{macrocode}
%\changes{v1.9b}{2005/12/23}{compatibility with the \texttt{extendedchar} option of
% the \pkg{listings} package}
@@ -5462,24 +5487,23 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Of course, using both \pkg{soul}'s and \microtype's letterspacing mechanisms
% at the same time doesn't make much sense. But \pkg{soul} can do more, \eg,
% underlining. The optional argument to \cs{textls} may not be used.
+%\changes{v2.8}{2020/04/11}{compatibility with \pkg{soul}: patch for font change
+% (reported by \contributor Md Ayquassar <mdayq0\at lenta.ru>)}
+% ^^A https://github.com/latex3/babel/issues/53#issuecomment-598307655
+% Also, we have to disable expansion within \pkg{soul}'s trial run.
+%\changes{v2.3a}{2008/01/06}{fix test for \pkg{soul} under plain \TeX}
+% Under plain \TeX, \pkg{soul} doesn't register itself the \LaTeX\ way, so
+% we just test for its main command.
% \begin{macrocode}
%</package>
-%<plain> \MT@requires@latex2{
- \MT@with@package@T{soul}{%
+ \ifx\SOUL@\@undefined\else
\soulregister\lsstyle 0%
\soulregister\textls 1%
- }%
-% \end{macrocode}
-%\changes{v2.3a}{2008/01/06}{fix test for \pkg{soul} under plain \TeX}
-% Under plain \TeX, \pkg{soul} doesn't register itself the \LaTeX\ way, hence
-% we have to use a different test in this case.
-% \begin{macrocode}
-%<*plain>
- }{\ifx\SOUL@\@undefined\else
- \soulregister\lsstyle 0%
- \soulregister\textls 1%
- \fi}%
-%</plain>
+ \ifx\XeTeXrevision\@undefined
+ \let\MT@SOUL@doword\SOUL@doword
+ \def\SOUL@doword{\pdfadjustspacing=\z@ \MT@SOUL@doword}%
+ \fi
+ \fi
%<*package>
\MT@with@package@T{tikz}\MT@tikz@setup
% \end{macrocode}
@@ -5667,12 +5691,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
% Even though \luatex\ also provides the primitive from \pdftex\ (even renamed to
-% \cmd\copyfont, that is, `promoted' as per the \luatex\ manual), it is crippled
-% in that OpenType features will be lost. ^^A see https://mailman.ntg.nl/pipermail/ntg-context/2016/087541.html
+% \cmd\copyfont, that is, `promoted' as per the \luatex\ manual), it is seriously
+% crippled in that OpenType features will be lost. ^^A see https://mailman.ntg.nl/pipermail/ntg-context/2016/087541.html seqq.
%\changes{v2.7d}{2019/11/17}{in \luatex, don't use the \cmd\copyfont\ primitive, but load the font anew
% (reported by \contributor Paolo Polesana <@\at @> and
% \contributor Oliver Kopp <koppdev\at gmail.com>)}
-% ^^A http://tex.stackexchange.com/questions/338942/cancellation-of-color-fontspec-font-settings-while-defining-microtype-context
+% ^^A https://tex.stackexchange.com/questions/338942/cancellation-of-color-fontspec-font-settings-while-defining-microtype-context
% ^^A https://tex.stackexchange.com/questions/419288/microtypecontext-with-lualatex
% Therefore, we do not copy the font but load it anew.
% \begin{macrocode}
@@ -5695,9 +5719,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\font@name\MT@font@copy
% \end{macrocode}
% But we have to properly substitute the font after we're done.
-% In \luatex, for some reason, one expansion step more.
% \begin{macrocode}
-%<luatex-def> \aftergroup\MT@exp@two@c
\aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy
}
% \end{macrocode}
@@ -5751,6 +5773,39 @@ time will almost certainly lead to undesired results. Have your choice!}%
% prevent a different design size being selected.
%
%\bigskip
+%\begin{macro}{\MT@fix@fontdimen@six}
+%\changes{v1.8}{2005/05/03}{new macro: test whether \fontdim6 is defined}
+%\changes{v2.3e}{2009/08/31}{fix: gobbling settings with tracking failed
+% (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}
+%\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}
+% fonts don't specify this dimension; this is probably a bug -- the \pkg{fourier}
+% and \pkg{newpx}/\pkg{newtx} packages have been fixed in the meantime).
+% However, we can fix it ourselves -- only tracking still doesn't work (it seems
+% that \cmd\letterspacefont\ uses the \fontdim6 from the original font).
+% \xetex\ doesn't provide an equivalent to \cmd\pdffontsize, so we use the
+% nominal size instead.
+% \begin{macrocode}
+%<*pdftex-def|luatex-def|xetex-def>
+\def\MT@fix@fontdimen@six{%
+ \ifnum\fontdimen6\MT@font=\z@
+ \fontdimen6\MT@font=%
+%<pdftex-def> \pdffontsize\MT@font
+%<luatex-def> \MT@requires@luatex4{\pdffeedback fontsize}{\pdffontsize}\MT@font
+%<xetex-def> \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}%
+}
+%</pdftex-def|luatex-def|xetex-def>
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@split@name}
%\changes{v1.7}{2005/02/27}{don't define \cs{MT@encoding} \&c. \cmd\global ly}
%\changes{v2.0}{2006/12/19}{adjust to possible letterspacing}
@@ -5774,6 +5829,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
% \end{macrocode}
%\begin{macro}{\MT@familyalias}
% Alias family?
@@ -6035,57 +6091,30 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@glet@nc{\MT@encoding-\MT@family-settings}\@empty
}%
\fi
- \MT@get@font@dimen@six{%
- \MT@get@opt
- \MT@reset@pr@codes
+ \MT@get@opt
+ \MT@reset@pr@codes
% \end{macrocode}
% Get the name of the inheritance list and parse it.
% \begin{macrocode}
- \MT@get@inh@list
+ \MT@get@inh@list
% \end{macrocode}
% Set an input encoding?
% \begin{macrocode}
- \MT@set@inputenc{c}%
+ \MT@set@inputenc{c}%
% \end{macrocode}
% Load additional lists?
% \begin{macrocode}
- \MT@load@list\MT@pr@c@name
- \MT@set@listname
+ \MT@load@list\MT@pr@c@name
+ \MT@set@listname
% \end{macrocode}
% Load the main list.
% \begin{macrocode}
- \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}%
- \expandafter\MT@set@codes\@tempc,\relax,}%
+ \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}%
+ \expandafter\MT@set@codes\@tempc,\relax,%
}\MT@reset@pr@codes
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\MT@get@font@dimen@six}
-%\changes{v1.8}{2005/05/03}{new macro: test whether \fontdim6 is defined}
-%\changes{v2.3e}{2009/08/31}{fix: gobbling settings with tracking failed
-% (reported by \contributor Leo <sdl.web\at gmail.com>)}
-% ^^A MID: <m0vdk4g8t2.fsf@cam.ac.uk>
-%\begin{macro}{\MT@dimen@six}
-% If \fontdim6 is zero, character protrusion, spacing, kerning and tracking
-% won't work, and we can skip the settings (for example, the \pkg{dsfont} and
-% \pkg{fourier} fonts don't specify this dimension; this is probably a bug in
-% the fonts).
-% \begin{macrocode}
-\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
-}
-% \end{macrocode}
-%\end{macro}
-%\end{macro}
%\begin{macro}{\MT@set@all@pr}
%\changes{v2.2}{2007/06/16}{(et al.) allow empty values}
% Set all protrusion codes of the font.
@@ -6372,7 +6401,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@get@opt}
% The optional argument to the configuration commands (except for
-% \cs{SetExpansion}, which is being dealt with in \cs{MT@get@ex@opt}).
+% \cs{SetExpansion} and \cs{SetTracking}, which are being dealt with
+% in \cs{MT@get@ex@opt} and \cs{MT@get@tr@opt}, resp.).
% \begin{macrocode}
\def\MT@get@opt{%
\MT@set@listname
@@ -6554,8 +6584,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
%<*pdftex-def|xetex-def|luatex-def>
\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
%<debug>\MT@dinfo@nl{2}{-- heir of \MT@char: #1}%
%<debug>\MT@dinfo@nl{4}{;;; lp/rp (#1): \number\lpcode\MT@font\MT@char\space/%
%<debug> \number\rpcode\MT@font\MT@char\space}%
@@ -6671,7 +6701,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\MT@stretch@ \MT@stretch
\let\MT@shrink@ \MT@shrink
\let\MT@step@ \MT@step
-%<pdftex-def> \let\MT@auto@ \MT@auto
+ \let\MT@auto@ \MT@auto
\let\MT@ex@factor@\MT@ex@factor
}%
\MT@reset@ef@codes
@@ -6690,30 +6720,33 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@expandfont}
-% Expand the font.
+% Expand the font. For some reason, older \luatex\ versions freeze if
+% the |autoexpand| modifier is missing. Can't be bothered to find out why.
+% For newer versions, we could also use the function |font.setexpansion|,
+% or, in the future, \pkg{luaotfload}'s expansion font feature. ^^A https://github.com/latex3/luaotfload/commit/4907e23407c52437cca56966d11d3b4548bba585
+%\iffalse
% In \luatex, we try to go the |lua| way, if the |font.setexpansion| function exists.
%\changes{v2.7d}{2019/11/17}{use \luatex\ function \texttt{font.}\penalty\exhyphenpenalty\texttt{setexpansion} if available}
+%\fi
% \begin{macrocode}
%<*luatex-def>
-\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
-%</luatex-def>
+\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
}
-%<*luatex-def>
-}{
+\else
\def\MT@expandfont{%
- \directlua{font.setexpansion(font.current(),\MT@stretch@,\MT@shrink@,\MT@step@)}%
-}
+ \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@\relax
}
+\fi
+}{
%</luatex-def>
+\def\MT@expandfont{%
+ \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax
+}
+%<luatex-def>}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@all@ex}
@@ -6809,8 +6842,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
\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@}%
-%<pdftex-def> \def\@tempa{autoexpand}%
-%<pdftex-def> \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}%
+%<luatex-def> \MT@requires@luatex3\relax{%
+ \MT@get@ex@opt@{auto}{\MT@ifstreq{\MT@auto@}{autoexpand}{En}{Dis}abling automatic expansion}%
+%<luatex-def> }%
\MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{%
\MT@preset@ex
\let\MT@reset@ef@codes\relax
@@ -6870,15 +6904,14 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\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
}
% \end{macrocode}
@@ -6987,15 +7020,14 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\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
}
% \end{macrocode}
@@ -7120,12 +7152,23 @@ time will almost certainly lead to undesired results. Have your choice!}%
% The tracking amount is determined by the optional argument to \cs{textls},
% settings from \cs{SetTracking}, or the global \opt{letterspace} option, in
% this order.
+%
+% Tracking won't work if the original font's \fontdim6 is zero, in which
+% case we issue a warning (once for every font).
% \begin{macrocode}
%<*pdftex-def|luatex-def|letterspace>
\def\MT@set@tr@codes{%
%<*pdftex-def|luatex-def>
\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
@@ -7170,8 +7213,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% than the \pdftex\ primitive \cmd\letterspacefont.
% \begin{macrocode}
%<*luatex-def|letterspace>
- \MT@if@fontspec@font{%
-%<luatex-def&debug>\MT@dinfo@nl{1}{... fontspec font: \MessageBreak
+ \MT@if@luaotf@font{%
+%<luatex-def&debug>\MT@dinfo@nl{1}{... luaotf font: \MessageBreak
%<luatex-def&debug> \expandafter\fontname\font@name}%
\ifnum\MT@letterspace@<\z@\def\MT@minus{-}\else\let\MT@minus\@empty\fi
\global\expandafter\font\MT@lsfont=%
@@ -7231,7 +7274,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% (reported by \contributor Wolfram Schaalo <schaalo\at gmx.net>)}
% ^^A private mail, 2008/05/12
% \begin{macrocode}
-%<luatex-def|letterspace> \MT@if@fontspec@font\relax{%
+%<luatex-def|letterspace> \MT@if@luaotf@font\relax{%
%<debug>\MT@dinfo@nl{2}{... compensating for tracking (\number\MT@letterspace@)}%
\MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax
\rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}%
@@ -7245,7 +7288,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\aftergroup\MT@set@lsfont
%<pdftex-def|luatex-def> \let\MT@font\MT@lsfont
-%<luatex-def> \MT@if@fontspec@font\MT@font\relax
+%<luatex-def> \MT@if@luaotf@font\MT@font\relax
% \end{macrocode}
%\begin{macro}{\MT@set@curr@ls}
%\begin{macro}{\MT@curr@ls}
@@ -7367,23 +7410,26 @@ time will almost certainly lead to undesired results. Have your choice!}%
%<*pdftex-def|luatex-def>
\def\MT@get@tr@opt{%
\MT@set@listname
- \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{%
- \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}%
+ \let\MT@tr@factor@\@m
% \end{macrocode}
%\begin{macro}{\MT@tr@unit@}
-% Different unit?
+% Different unit (for |letterspace| and/or |(outer)spacing|)?
+%\changes{v2.8}{2020/11/22}{fix: allow unit regardless whether letterspacing is set}
% \begin{macrocode}
- \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@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@c@T\MT@tr@unit@{%
+ \let\@tempb\MT@letterspace
+ \MT@scale@to@em
+ \edef\MT@letterspace{\number\@tempcntb}%
}%
}%
% \end{macrocode}
@@ -7448,12 +7494,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\changes{v2.7}{2016/08/03}{fix: prevent infinite loop with \pkg{psnfss} and \pkg{exscale} packages
% (reported by \contributor user11126 <@\at @>,
% solution by \contributor Ulrike Fischer <fischer\at troubleshooting-tex.de>)}
-% Setting \cmd\glb@currsize\ to \cmd\@empty\ (our previous solution) could
+% ^^A https://tex.stackexchange.com/questions/316231/microtype-and-exscale-crashing-in-texlive-2016#comment771828_316252
+% Setting \cmd\glb@currsize\ globally to \cmd\@empty\ (our previous solution) could
% throw us into an infinite loop (\eg, with the \pkg{psnfss} packages,
% via \cmd\every@math@size), so we issue \cmd\glb@settings\ instead.
+%\changes{v2.8}{2020/05/26}{fix: enforce math setup, again}
+% However, in certain situations, we may still miss some math fonts, so
+% let's try to also enforce it by emptying \cmd\glb@currsize, fingers crossed.
+% The overhead seems small.
% \begin{macrocode}
\DeclareRobustCommand\lsstyle{%
\not@math@alphabet\lsstyle\textls
+ \let\glb@currsize\@empty
%<pdftex-def|luatex-def> \MT@maybe@gobble@with@tikz{\aftergroup\glb@settings}%
%<pdftex-def|luatex-def> \def\MT@feat{tr}%
\let\MT@tracking\MT@set@tr@codes
@@ -7598,16 +7650,15 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@tr@set@space@}
% If settings for outer spacing \meta{\#2} don't exist, they will be inherited
% from the inner spacing settings \meta{\#1}.
+%\changes{v2.8}{2020/11/24}{simplified}
% \begin{macrocode}
\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}%
@@ -7629,8 +7680,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\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
% \end{macrocode}
% For \fontdim2, we also have to subtract the kerning that letterspacing adds
% to each side of the characters (only half if it's for outer spacing).
@@ -7638,7 +7688,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\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
@@ -8061,7 +8110,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% in a table (used by the \pkg{luaotfload} function |keepligature|).
%\changes{v2.6}{2016/04/20}{use \pkg{luaotfload} function to keep\slash inhibit ligatures}
% \begin{macrocode}
-%<luatex-def> \MT@if@fontspec@font
+%<luatex-def> \MT@if@luaotf@font
%<luatex-def> {\MT@lua{microtype.noligatures([[#1]],[[\MT@char]])}}\relax
\fi
}%
@@ -8074,7 +8123,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}{%
\pdfnoligatures#1%
-%<luatex-def> \MT@if@fontspec@font
+%<luatex-def> \MT@if@luaotf@font
%<luatex-def> {\MT@lua{microtype.noligatures([[#1]],"_all_")}}\relax
\MT@vinfo{... Disabling all ligatures}%
}%
@@ -8739,17 +8788,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
@@ -9067,10 +9116,12 @@ end
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@is@tlig}
-% This might have to change again with the next \LaTeX\ release. ^^A see https://github.com/latex3/latex2e/issues/165
+% 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
+%<debug> \MT@dinfo@nl{3}{> `\the\MT@toks' (removing remove@tlig)}%
\MT@is@number #2\relax\relax
\fi
}
@@ -9619,15 +9670,24 @@ end
% ^^A MID: <46ab4fbb$0$31632$9b4e6d93@newsspool3.arcor-online.net>
%\changes{v2.6}{2014/03/26}{allow \texttt{activate} shortcut (reported by \contributor Karl Berry <karl\at freefriends.org>)}
% ^^A private mail, 2014/03/21
+%\changes{v2.8}{2019/11/25}{fix \texttt{activate} shortcut}
+%\changes{v2.8}{2019/12/12}{ignore spaces}
+%\begin{macro}{\MT@microtypecontext}
% The user may change the context, so that different setups are possible. This
% is especially useful for multi-lingual documents.
%
-% Inside the preamble, it shouldn't actually do anything but remember it for
+% Inside the preamble, this command shouldn't actually do anything but remember itself for
% later.
% \begin{macrocode}
-\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
% \end{macrocode}
@@ -9643,13 +9703,21 @@ end
}
% \end{macrocode}
%\end{macro}
+%\end{macro}
%\begin{macro}{\textmicrotypecontext}
%\changes{v2.2}{2007/07/03}{new command: wrapper around \cs{microtypecontext}}
+%\changes{v2.8}{2019/12/12}{ignore spaces}
+%\begin{macro}{\MT@textmicrotypecontext}
+%\begin{macro}{\MT@text@microtypecontext}
% This is just a wrapper around \cs{microtypecontext}.
% \begin{macrocode}
-\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}}
% \end{macrocode}
%\end{macro}
+%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@reset@context}
%\changes{v1.9f}{2006/08/03}{only reset context if it has actually been changed}
%\begin{macro}{\MT@reset@context@}
@@ -9701,6 +9769,7 @@ end
\def\MT@reset@context{\aftergroup\MT@reset@context@}%
% \end{macrocode}
% The next time we see the font, we have to reset \emph{all} factors.
+%^^A TODO: only for pdftex? or why at all?
% \begin{macrocode}
\MT@glet@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}%
% \end{macrocode}
@@ -9721,8 +9790,8 @@ end
% We also allow the |activate| shortcut.
% \begin{macrocode}
\define@key{MTC}{activate}[]{%
- \setkeys{MT}{protrusion={#1}}%
- \setkeys{MT}{expansion={#1}}%
+ \setkeys{MTC}{protrusion={#1}}%
+ \setkeys{MTC}{expansion={#1}}%
}
% \end{macrocode}
%\begin{macro}{\MT@pr@context}
@@ -9888,7 +9957,7 @@ end
Ignoring `#1 = {\@tempa*}' in font set\MessageBreak`\MT@curr@set@name'}%
\let\MT@val\@empty}%
% \end{macrocode}
-% In contrast to earlier version, these values will not be expanded immediately
+% In contrast to earlier versions, these values will not be expanded immediately,
% but at the end of the preamble.
%\changes{v1.2}{2004/09/26}{check whether defaults have changed}
%\changes{v1.5}{2004/12/02}{don't test defaults if called after begin document}
@@ -10978,23 +11047,19 @@ end
%\changes{v1.7}{2005/03/07}{disallow automatic expansion if \pdftex\ too old}
%\changes{v2.7a}{2017/08/08}{disallow non-automatic expansion with \luatex}
% \begin{macrocode}
-%<*pdftex-def>
- \MT@requires@pdftex4{%
- \MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}%
- }{%
- \MT@warning{pdftex too old for automatic font expansion}%
- }
-%</pdftex-def>
+%<pdftex-def> \MT@requires@pdftex4%
+%<luatex-def> \MT@requires@luatex3\relax
+ {\MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}}%
+%<pdftex-def> {\MT@warning{pdftex too old for automatic font expansion}}%
\else
-%<*pdftex-def>
- \MT@requires@pdftex4{%
- \MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty
- }\relax
-%</pdftex-def>
+%<pdftex-def> \MT@requires@pdftex4%
%<*luatex-def>
- \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}}%
%</luatex-def>
+ {\MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty}%
+%<pdftex-def> \relax
\fi
}
% \end{macrocode}
@@ -12238,11 +12303,30 @@ end
% For <DVI> output, the user must have explicitly passed the \opt{expansion}
% option to the package.
%\changes{v1.5}{2004/12/02}{defaults: turn off expansion for <DVI> output}
+% Under \luatex, expansion works quite differently: the glyphs will be
+% positioned as if they were transformed, without actually being transformed.
+% Since this could still be considered a viable option, we don't disable
+% the feature completely, but issue a warning.
+%\changes{v2.8}{2020/02/09}{warning when expanding in <DVI> mode with \luatex\
+% (reported by \contributor d909 <@\at @>)}
+% ^^A https://tex.stackexchange.com/questions/531413/dvipdfmx-and-dvips-do-not-expand-fonts-properly-with-lualatex-in-dvi-mode
% \begin{macrocode}
%<*pdftex-def|luatex-def>
\def\MT@setup@expansion{%
\ifnum\pdfoutput<\@ne
- \ifMT@opt@expansion \else
+ \ifMT@opt@expansion
+%<*luatex-def>
+ \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
+%</luatex-def>
+ \else
\MT@expansionfalse
\fi
\fi
@@ -12316,14 +12400,13 @@ end
% (reported by \contributor Ulrike Fischer <news3\at nililand.de>)}
% ^^A private mail, 2017/10/29
% In \luatex\ 1.0.6, the `|autoexpand|' option seems to have been removed altogether
-% and would trigger an error.
+% and would trigger a warning.
% \begin{macrocode}
-%<luatex-def> \let\MT@auto@\@empty
-%<pdftex-def> \let\MT@auto\@empty
+ \let\MT@auto\@empty
\ifMT@auto
% \end{macrocode}
%\end{macro}
-% We turn off automatic expansion if output mode is <DVI> and we're running \pdftex.
+% We turn off automatic expansion if output mode is <DVI>.
%\changes{v1.5}{2004/12/02}{disable automatic expansion for <DVI> output}
%\changes{v2.7}{2017/07/02}{don't disable automatic expansion for <DVI> output with \luatex}
% \begin{macrocode}
@@ -12359,6 +12442,7 @@ end
\def\MT@auto{1000 }%
}%
%</pdftex-def>
+%<luatex-def> \MT@requires@luatex3\relax{\def\MT@auto{autoexpand}}%
\else
%<*pdftex-def>
% \end{macrocode}
@@ -12369,10 +12453,13 @@ end
}%
%</pdftex-def>
%<*luatex-def>
- \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
%</luatex-def>
\fi
% \end{macrocode}
@@ -12917,13 +13004,15 @@ end
% \end{macrocode}
% The default sets.
%\changes{v2.2}{2007/04/15}{default set for tracking: \texttt{smallcaps}}
+%\changes{v2.8}{2019/12/04}{default set for expansion: \texttt{alltext-nott}}
+%\changes{v2.8}{2019/12/04}{default set for spacing: \texttt{alltext-nott}}
% \begin{macrocode}
%%% -----------------------------------------------------------------------
%%% 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}
@@ -12932,13 +13021,11 @@ end
%\subsection{Font variants and aliases}
%\GeneralChanges{Font aliases}
%
-% \begin{macrocode}
-%%% -----------------------------------------------------------------------
-%%% FONT VARIANTS AND ALIASES
-% \end{macrocode}
% These are the variants I happen to be using (expert encoding, oldstyle
% numerals, swashes, alternative, display, inferior and superior numerals):
% \begin{macrocode}
+%%% -----------------------------------------------------------------------
+%%% FONT VARIANTS AND ALIASES
\DeclareMicrotypeVariants{x,j,w,a,d,0,1}
% \end{macrocode}
@@ -12968,9 +13055,10 @@ end
\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
% \end{macrocode}
% The Latin Modern fonts, the virtual fonts from the
@@ -12986,12 +13074,17 @@ end
% (reported by \contributor Jonas Hogstrom <hjb981\at gmail.com>)}
% ^^A https://tex.stackexchange.com/questions/63558/how-to-get-microtype-to-work-with-mathematical-minus-sign-and-package-lmodern
% \begin{macrocode}
-\DeclareMicrotypeAlias{lmsy}{cmsy}
-\DeclareMicrotypeAlias{lmm} {cmm}
-\DeclareMicrotypeAlias{aer} {cmr} % ae
-\DeclareMicrotypeAlias{zer} {cmr} % zefonts
-\DeclareMicrotypeAlias{cmor}{cmr} % eco
-\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty
+\DeclareMicrotypeAlias{lmsy}{cmsy} % "
+\DeclareMicrotypeAlias{lmm} {cmm} % "
+\DeclareMicrotypeAlias{aer} {cmr} % ae
+\DeclareMicrotypeAlias{zer} {cmr} % zefonts
+\DeclareMicrotypeAlias{cmor}{cmr} % eco
+\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty
+% \end{macrocode}
+% Another, new Computer Modern extension.
+%\changes{v2.8}{2019/11/22}{declare New Computer Modern as an alias of Latin Modern Roman}
+% \begin{macrocode}
+\DeclareMicrotypeAlias{New Computer Modern}{Latin Modern Roman}
% \end{macrocode}
% The packages \pkg{pxfonts} and \pkg{txfonts} fonts inherit Palatino and Times
% settings respectively,
@@ -13001,67 +13094,84 @@ end
%\changes{v1.9}{2005/08/16}{declare \texttt{qpl} and \texttt{qtm} (\pkg{qfonts}, \TeX\ Gyre)
% as aliases of \texttt{ppl} resp. \texttt{ptm}}
% \begin{macrocode}
-\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts
-\DeclareMicrotypeAlias{qpl} {ppl} % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino)
+%% -- Palatino
+\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts
+\DeclareMicrotypeAlias{qpl} {ppl} % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino)
% \end{macrocode}
% The `<FPL> Neu' fonts, a `re-implementation' of Palatino.
%\changes{v2.2}{2007/05/27}{declare \texttt{fp9x}, \texttt{fp9j} (<FPL> Neu) as aliases of \texttt{ppl[xj]}}
% \begin{macrocode}
-\DeclareMicrotypeAlias{fp9x}{pplx} % FPL Neu
-\DeclareMicrotypeAlias{fp9j}{pplj} % "
+\DeclareMicrotypeAlias{fp9x}{pplx} % FPL Neu
+\DeclareMicrotypeAlias{fp9j}{pplj} % "
% \end{macrocode}
% The \pkg{newpx} package, a replacement for \pkg{pxfonts}.
%\changes{v2.7}{2017/03/13}{declare aliases for \pkg{newpx}}
% \begin{macrocode}
-\DeclareMicrotypeAlias{zpllf}{ppl} % newpxtext
-\DeclareMicrotypeAlias{zplosf}{ppl} % "
-\DeclareMicrotypeAlias{zpltlf}{ppl} % "
-\DeclareMicrotypeAlias{zpltosf}{ppl} % "
-\DeclareMicrotypeAlias{txr} {ptm} % txfonts
-% \end{macrocode}
-% The \pkg{newtx} package, a replacement for \pkg{txfonts}.
-%\changes{v2.7}{2017/02/25}{declare aliases for \pkg{newtx}}
-% \begin{macrocode}
-\DeclareMicrotypeAlias{ntxlf}{ptm} % newtxtext
-\DeclareMicrotypeAlias{ntxosf}{ptm} % "
-\DeclareMicrotypeAlias{ntxtlf}{ptm} % "
-\DeclareMicrotypeAlias{ntxtosf}{ptm} % "
+\DeclareMicrotypeAlias{zpllf}{pplx} % newpxtext
+\DeclareMicrotypeAlias{zplosf}{pplj} % "
+\DeclareMicrotypeAlias{zpltlf}{pplx} % "
+\DeclareMicrotypeAlias{zpltosf}{pplj} % "
% \end{macrocode}
-% The \pkg{tempora} package.
-%\changes{v2.7}{2017/02/25}{declare aliases for \pkg{tempora}}
+% The \pkg{domitian} package.
+%\changes{v2.8}{2020/03/07}{declare aliases for \pkg{step} and \pkg{domitian}
+% (notified by \contributor Daniel Benjamin Miller <dbmiller\at dbmiller.org>)}
+% ^^A private mail, 2020/02/27
% \begin{macrocode}
-\DeclareMicrotypeAlias{Tempora-TLF}{ptm} % tempora
-\DeclareMicrotypeAlias{Tempora-TOsF}{ptm}% "
-\DeclareMicrotypeAlias{qtm} {ptm} % TeX Gyre Termes (formerly: qfonts/QuasiTimes)
+\DeclareMicrotypeAlias{Domitian-TLF} {pplx}% domitian
+\DeclareMicrotypeAlias{Domitian-TOsF}{pplj}% "
% \end{macrocode}
% The OpenType versions:
%
%\changes{v2.5}{2012/03/29}{declare TeX Gyre Pagella, Asana Math, Palatino <LT> Std, and Palatino
% as aliases of Palatino Linotype (OpenType version)}
% \begin{macrocode}
+\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}
+%% -- Times New Roman
+\DeclareMicrotypeAlias{txr}{ptm} % txfonts
+% \end{macrocode}
+% The \pkg{newtx} package, a replacement for \pkg{txfonts}.
+%\changes{v2.7}{2017/02/25}{declare aliases for \pkg{newtx}}
+% \begin{macrocode}
+\DeclareMicrotypeAlias{ntxlf}{ptmx} % newtxtext
+\DeclareMicrotypeAlias{ntxosf}{ptmj} % "
+\DeclareMicrotypeAlias{ntxtlf}{ptmx} % "
+\DeclareMicrotypeAlias{ntxtosf}{ptmj} % "
+% \end{macrocode}
+% The \pkg{tempora} package.
+%\changes{v2.7}{2017/02/25}{declare aliases for \pkg{tempora}}
+% \begin{macrocode}
+\DeclareMicrotypeAlias{Tempora-TLF}{ptmx} % tempora
+\DeclareMicrotypeAlias{Tempora-TOsF}{ptmj} % "
+\DeclareMicrotypeAlias{qtm}{ptm} % TeX Gyre Termes (formerly: qfonts/QuasiTimes)
+% \end{macrocode}
+% The \pkg{step} package.
+% \begin{macrocode}
+\DeclareMicrotypeAlias{STEP-TLF}{ptmx} % step
+\DeclareMicrotypeAlias{STEP-TOsF}{ptmj} % "
+% \end{macrocode}
+% The \pkg{stix} and \pkg{stix2} packages (the latter has departed a bit from being
+% a Times clone, but still seems close enough).
+%\changes{v2.8}{2020/05/31}{declare aliases for \pkg{stix} and \pkg{stix2} fonts}
+% \begin{macrocode}
+\DeclareMicrotypeAlias{stix} {ptm} % stix
+\DeclareMicrotypeAlias{stix2}{ptm} % stix2
% \end{macrocode}
%\todo{check Times variants}
% More Times variants, to be checked: |pns|, |mns| (TimesNewRomanPS); |mnt|
% (Times\-NewRomanMT, TimesNRSevenMT), |mtm| (TimesSmallTextMT); |pte|
% (TimesEuropa); |ptt| (TimesTen); TimesEighteen; TimesModernEF.
%
-% The \pkg{eulervm} package virtually extends the Euler fonts.
-%\changes{v1.9e}{2006/07/28}{declare \texttt{zeur} and \texttt{zeus} (\pkg{eulervm})
-% as aliases of \texttt{eur} resp. \texttt{eus} (\pkg{euler})}
-% \begin{macrocode}
-\DeclareMicrotypeAlias{zeur}{eur} % Euler VM
-\DeclareMicrotypeAlias{zeus}{eus} % "
-% \end{macrocode}
% MicroPress's Charter version (\pkg{chmath}).
%\changes{v2.2}{2007/06/08}{declare \texttt{chr} (\pkg{chmath}) as an alias of \texttt{bch}
% (reported by \contributor Geoff Vallis <gkv\at Princeton.EDU>)}
% ^^A private mail, 2007/06/07
% \begin{macrocode}
-\DeclareMicrotypeAlias{chr} {bch} % CH Math
+%% -- Charter
+\DeclareMicrotypeAlias{chr}{bch} % CH Math
% \end{macrocode}
%\changes{v2.7}{2017/03/13}{declare aliases for \pkg{XCharter}}
% The \pkg{XCharter} package extends the Charter fonts.
@@ -13074,29 +13184,38 @@ end
% as an alias of \texttt{bch}}
% and <URW> Garamond.
% \begin{macrocode}
-\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter
-\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond
+\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter
+%% -- Garamond
+\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond
% \end{macrocode}
% The \pkg{garamondx} package, an extension of <URW> Garamond, providing
% small caps and oldstyle figures.
%\changes{v2.5}{2013/02/20}{declare \texttt{zgmx} etc. (\pkg{garamondx})
% as aliases of \texttt{ugm}}
% \begin{macrocode}
-\DeclareMicrotypeAlias{zgmx}{ugm} % garamondx
-\DeclareMicrotypeAlias{zgmj}{ugm} % "
-\DeclareMicrotypeAlias{zgmI}{ugm} % "
-\DeclareMicrotypeAlias{zgmq}{ugm} % "
+\DeclareMicrotypeAlias{zgmx}{ugm} % garamondx
+\DeclareMicrotypeAlias{zgmj}{ugm} % "
+\DeclareMicrotypeAlias{zgmI}{ugm} % "
+\DeclareMicrotypeAlias{zgmq}{ugm} % "
+%% --
% \end{macrocode}
% <URW> Letter Gothic is similar enough to Bitstream Letter Gothic to share the
% configuration.
% \begin{macrocode}
-\DeclareMicrotypeAlias{ulg} {blg} % URW LetterGothic -> Bitstream LetterGothic12Pitch
+\DeclareMicrotypeAlias{ulg}{blg} % URW LetterGothic -> Bitstream LetterGothic12Pitch
+% \end{macrocode}
+% The \pkg{eulervm} package virtually extends the Euler fonts.
+%\changes{v1.9e}{2006/07/28}{declare \texttt{zeur} and \texttt{zeus} (\pkg{eulervm})
+% as aliases of \texttt{eur} resp. \texttt{eus} (\pkg{euler})}
+% \begin{macrocode}
+\DeclareMicrotypeAlias{zeur}{eur} % Euler VM
+\DeclareMicrotypeAlias{zeus}{eus} % "
% \end{macrocode}
% Euro symbol fonts, to save some files.
% \begin{macrocode}
-\DeclareMicrotypeAlias{zpeus} {zpeu} % Adobe Euro sans -> serif
-\DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif
-\DeclareMicrotypeAlias{euroitcs}{euroitc}% ITC Euro sans -> serif
+\DeclareMicrotypeAlias{zpeus} {zpeu} % Adobe Euro sans -> serif
+\DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif
+\DeclareMicrotypeAlias{euroitcs}{euroitc} % ITC Euro sans -> serif
% \end{macrocode}
%
@@ -13145,7 +13264,7 @@ end
% encoding with \cmd\DeclareTextSymbol\ or \cmd\DeclareTextComposite.
% Characters defined via \cmd\chardef\ are also possible.
%
-% Ligatures and \cmd\mathchardef ed symbols have to be specified numerically.
+% Ligatures and \cmd\mathchardef'ed symbols have to be specified numerically.
% Of course, numerical identification is possible in any other case, too.
%
%\changes{v1.1}{2004/09/14}{remove 8-bit characters from the configuration files
@@ -13157,7 +13276,8 @@ end
% combination with the `|inputenc|' key.
%
% With \xetex\ or \luatex, in contrast, it is advisable to use the proper
-% Unicode characters.
+% Unicode characters, or the font-specific glyph names prefixed with `|/|'
+% (cf. section \ref{sec:OpenType}).
%
%\subsection{Character inheritance}
%\GeneralChanges{Inheritance}
@@ -16971,9 +17091,9 @@ end
%
%\IfFileExists{microtype-utf.pdf}
% {\includepdf[pages=-,
-% addtotoc={1,section,1,OpenType configuration files,section.\thesection,
-% \utfsectioni,subsection,2,Character inheritance,subsection.\thesection.1,
-% \utfsectionii,subsection,2,Character protrusion,subsection.\thesection.2}]
+% addtotoc={1,section,1,OpenType configuration files,sec:OpenType,
+% \utfsectioni,subsection,2,Character inheritance,sub:OT-inheritance,
+% \utfsectionii,subsection,2,Character protrusion,sub:OT-protrusion}]
% {microtype-utf.pdf}}
% {\section{OpenType configuration settings}
% To view the OpenType configuration settings, first typeset
@@ -17134,7 +17254,7 @@ normal, and shrunk by 5\%:
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \CheckSum{10666}
+% \CheckSum{10748}
%
% \Finale
%