summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/microtype
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-11-19 03:02:21 +0000
committerNorbert Preining <norbert@preining.info>2019-11-19 03:02:21 +0000
commit025f7bfee79d7817a876831bb19f34a2dfb1b2e2 (patch)
tree76efc8c89514583aae7ddb55b59bfb879500a09d /macros/latex/contrib/microtype
parent96f9362fc3e3bb70fa2411c62418c42d9acda4d7 (diff)
CTAN sync 201911190302
Diffstat (limited to 'macros/latex/contrib/microtype')
-rw-r--r--macros/latex/contrib/microtype/README.md2
-rw-r--r--macros/latex/contrib/microtype/microtype-utf.dtx12
-rw-r--r--macros/latex/contrib/microtype/microtype.dtx131
-rw-r--r--macros/latex/contrib/microtype/microtype.pdfbin1689839 -> 1694528 bytes
4 files changed, 100 insertions, 45 deletions
diff --git a/macros/latex/contrib/microtype/README.md b/macros/latex/contrib/microtype/README.md
index 211ed32576..47a727711c 100644
--- a/macros/latex/contrib/microtype/README.md
+++ b/macros/latex/contrib/microtype/README.md
@@ -4,7 +4,7 @@ The `microtype` package
**Subliminal refinements towards typographical perfection**
- (v2.7c -- 2019/10/10)
+ (v2.7d -- 2019/11/18)
Overview
diff --git a/macros/latex/contrib/microtype/microtype-utf.dtx b/macros/latex/contrib/microtype/microtype-utf.dtx
index c72fca3f54..36b08620a2 100644
--- a/macros/latex/contrib/microtype/microtype-utf.dtx
+++ b/macros/latex/contrib/microtype/microtype-utf.dtx
@@ -1,7 +1,7 @@
%\iffalse meta-comment
% !Mode:: "TeX:DTX:UK"
% !smartQuote:: "English"
-% !DTXversion:: "2.7c"
+% !DTXversion:: "2.7d"
% ------------------------------------------------------------------------
% The `microtype' package
% Subliminal refinements towards typographical perfection
@@ -26,7 +26,7 @@
%
\ProvidesFile
%<*driver>
- {\jobname.dtx}[2019/10/10 v2.7c]
+ {\jobname.dtx}[2019/11/18 v2.7d]
%</driver>
%<CharisSIL> {mt-CharisSIL.cfg}[2017/07/07 v1.1 microtype config. file: Charis SIL (RS)]
%<LatinModernRoman> {mt-LatinModernRoman.cfg}[2013/03/13 v1.0 microtype config. file: Latin Modern Roman (RS)]
@@ -36,14 +36,6 @@
\usepackage{fontspec}
\usepackage{luatexbase}
\RequireLuaModule{luainputenc}
-\ifnum\luatexversion>84
- \protected\edef\pdfminorversion {\pdfvariable minorversion}
- \protected\def\pdfobj {\pdfextension obj }
- \protected\def\pdfcatalog {\pdfextension catalog }
- \protected\def\pdfmapline {\pdfextension mapline }
- \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
- \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax}
-\fi
\makeatletter
% microtype-doc.sty is 8-bit, and the following is a hack
\luatexbase@directlua{luatexbase.add_to_callback('process_input_buffer', luainputenc.fake_utf_read, 'luainputenc.fake_utf_read')}
diff --git a/macros/latex/contrib/microtype/microtype.dtx b/macros/latex/contrib/microtype/microtype.dtx
index 3871ffedc3..9f92e7296f 100644
--- a/macros/latex/contrib/microtype/microtype.dtx
+++ b/macros/latex/contrib/microtype/microtype.dtx
@@ -1,7 +1,7 @@
%\iffalse meta-comment
% !Mode:: "TeX:DTX:UK"
% !smartQuote:: "English"
-% !DTXversion:: "2.7c"
+% !DTXversion:: "2.7d"
% ------------------------------------------------------------------------
% The `microtype' package
% Subliminal refinements towards typographical perfection
@@ -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/10/10 v2.7c
+ [2019/11/18 v2.7d
%<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.7c",
-%<luafile> date = "2019/10/10",
+%<luafile> version = "2.7d",
+%<luafile> date = "2019/11/18",
%<luafile> description = "microtype module.",
%<luafile> author = "E. Roux, R. Schlicht and P. Gesang",
%<luafile> copyright = "E. Roux, R. Schlicht and P. Gesang",
@@ -84,16 +84,16 @@
%</driver>
% Let's abolish CM! We use Charter and Letter Gothic
% (for the pre-built documentation on CTAN):
- \usepackage[T1]{fontenc}
- \usepackage[charter]{mathdesign}
+\usepackage[T1]{fontenc}
+\usepackage[charter]{mathdesign}
\def\rmdefault{bch} % not scaled
\def\sfdefault{SourceSansPro-TLF}
\def\SourceSansPro@scale{1.02}
\def\ttdefault{blg}
{\ttfamily\selectfont
\DeclareFontShape{T1}{blg}{k}{n}{<-> ssub * blg/b/n}{}}
- \usepackage{textcomp}
-\usepackage{ifpdf,ifluatex,ifxetex}
+\usepackage{textcomp}
+\usepackage{iftex}
%<*!docsty>
\ifxetex\else
\usepackage[latin1]{\ifluatex lua\fi inputenc}
@@ -120,10 +120,10 @@
{ encoding = T1,
family = blg }
{ _ = {100,100} } % underscores shouldn't touch
- \ifxetex\else
+\ifxetex\else
% disable ?` and !` ligatures (sample in section \ref{sec:disable-ligatures})
\DisableLigatures[?,!]{encoding = *, family = rm* }
- \fi
+\fi
% Fraktur sample in section \ref{sec:lettersp}
\IfFileExists{t1mwr.fd}
{\def\textfrak##1{{\fontfamily{mwr}\selectfont ##1}}
@@ -136,15 +136,18 @@
\SetTracking[no ligatures={f,s,c}]{encoding=LY,family=yfrak}{120}
\fi}
{\def\textfrak{\rule{.5em}{1.5ex}\@gobble}}}
+\ifpdftex\else
+ \microtypesetup{kerning=false}
+\fi
\tolerance=700
\ifpdf
\ifluatex % microtype.dtx finally compiles with 0.35!
- \microtypesetup{kerning=false}
\def\pdftexversion{200} % in TeX Live 2015, they let this to \luatexversion
\let\pdfxform \saveboxresource
\let\pdflastxform \lastsavedboxresourceindex
\protected\edef\pdfminorversion {\pdfvariable minorversion}
\protected\def\pdfobj {\pdfextension obj }
+ \protected\def\pdfcatalog {\pdfextension catalog }
\protected\def\pdfannot {\pdfextension annot }
\protected\def\pdfoutline {\pdfextension outline }
\protected\def\pdfmapline {\pdfextension mapline }
@@ -161,10 +164,9 @@
\InputIfFileExists{microtype-logo.dtx}\relax\relax
\InputIfFileExists{microtype-lssample.dtx}\relax\relax
\else
- \let\lsstyle\relax
-\fi
-\ifxetex
- \microtypesetup{kerning=false}
+ \ifluatex\else
+ \let\lsstyle\relax
+ \fi
\fi
\usepackage{booktabs}
\usepackage{array}
@@ -333,7 +335,7 @@
\itemindent \labelsep
\lstset{belowskip=0pt}}}
{\endlist}
-% boxes (for some reason, mathdesign changes these values) % still?
+% boxes (for some reason, mathdesign changes these values)
\setlength\fboxrule{0.4pt}
\setlength\fboxsep{3pt}
\setlength\arrayrulewidth{0.4pt}
@@ -1216,7 +1218,7 @@
%\Describe{Option}{DVIoutput}{true,*false}
% \pdftex\ and \luatex\ are not only able to generate <PDF> output but can also
% spit out <DVI> files.\footnote{
-% Recent \TeX\ systems are using \pdftex\ as the default engine even for
+% 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.
@@ -2054,7 +2056,6 @@
% of the respective space dimension set by the font. By default, the unit
% is measured by the space dimensions. For example, with the following
% (nonsensical) settings:
-%\pagebreak ^^A layout
%\begin{verbatim}
%\SetExtraSpacing
% [ unit = space ] % default
@@ -2651,6 +2652,7 @@
% distributions, this can be changed in the file \file{updmap.cfg} by setting
% |pdftexDownloadBase14| to |true|.
%
+%\pagebreak ^^A layout
%\changes{v1.9a}{2005/11/15}{add explanation for error message with non-Type\,1 fonts}
% \item
%\begin{verbatim}
@@ -2866,9 +2868,13 @@
% \contributor Franz Wexler <@\at @>, ^^A https://tex.stackexchange.com/users/182307/franz-wexler
% \contributor Moritz Wemheuer <moritz.wemheuer\at gmail.com>,
% `\contributor Andy N <@\at @>', ^^A https://tex.stackexchange.com/users/182462/andy-n
-% \contributor Phelype Oleinik <phe.h.o1\at gmail.com>
+% \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>
% and
-% \contributor Falk Hanisch <falk.hanisch\at tu-dresden.de>.
+% \contributor Hironori Kitagawa <h_kitagawa2001\at yahoo.co.jp>.
%
%
%\iffalse
@@ -2960,13 +2966,13 @@
% \bibitem[\pkg{fontspec}]{fontspec}
% Will Robertson,
% \emph{The \pkg{fontspec} package: Font selection for \xe\LaTeX\ and Lua\LaTeX},
-% \newblock 15~March 2019.
+% \newblock 19~October 2019.
% \newblock (\ctanpkgurl{fontspec})
%
% \bibitem[\pkg{luaotfload}]{luaotfload}
-% \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer,
+% \'Elie Roux, Khaled Hosny, Philipp Gesang, Ulrike Fischer, Marcel Kr\"uger,
% \emph{The \pkg{luaotfload} package},
-% \newblock 13~September 2019.
+% \newblock 10~November 2019.
% \newblock (\ctanpkgurl{luaotfload})
%
% \bibitem[\pkg{pdfcprot}]{pdfcprot}
@@ -3019,6 +3025,8 @@
%
%\VersionDate{\expandafter\@gobble\fileversion}{\filedate}
%
+%\VersionDate{2.7c}{2019/10/10}
+%
%\VersionDate{2.7b}{2019/02/28}
%
%\VersionDate{2.7a}{2018/01/14}
@@ -3371,7 +3379,7 @@
% \RequirePackage,\@@enc@update,\cf@encoding,\f@encoding}
%^^A\DoNotIndex{\add@accent,\curr@fontshape,\define@newfont,\do@subst@correction,
%^^A \every@math@size,\f@size,\font@name,\glb@currsize,\glb@settings,\normalfont,
-%^^A \pickup@font,\selectfont,\set@fontsize,\showhyphens} ^^A latex
+%^^A \pickup@font,\remove@tlig,\selectfont,\set@fontsize,\showhyphens} ^^A latex
%\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision} ^^A tex live 2004
%\DoNotIndex{\foreign@language,\languagename,\select@language,\shorthandoff} ^^A babel
%\DoNotIndex{\percentsign} ^^A babel/spanish,galician,mexican
@@ -3967,6 +3975,8 @@
%\todo{interface for \cmd\protrusionboundary}
%\end{enum}
%\changes{v2.6}{2016/04/22}{update for \luatex\ 0.85 (renamed primitives)}
+% Also, sometime between 1.0.4 and 1.0.7, the function |font.setexpansion|
+% has been introduced, but we'll test this directly later.
% \begin{macrocode}
%<*luatex-def>
%<debug>\MT@dinfo@nl0{this is luatex (\the\luatexversion)}
@@ -5630,7 +5640,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
%<*pdftex-def|luatex-def>
\let\MT@copy@font\relax
-%<luatex-def>\MT@requires@luatex4{\let\pdfcopyfont\copyfont}\relax
%<pdftex-def>\MT@requires@pdftex7{
\def\MT@copy@font@{%
% \end{macrocode}
@@ -5654,10 +5663,22 @@ time will almost certainly lead to undesired results. Have your choice!}%
\else
\MT@exp@two@c\let\font@name\MT@font@orig
\fi
- \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name
-%<debug>\MT@dinfo1{creating new copy: \MT@font@copy}%
+%<pdftex-def> \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name
% \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
+%\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/419288/microtypecontext-with-lualatex
+% Therefore, we do not copy the font but load it anew.
+% \begin{macrocode}
+%<luatex-def> \MT@exp@two@c\MT@lua@copyfont\meaning\font@name\@nil
+%<debug>\MT@dinfo1{creating new copy: \MT@font@copy}%
+% \end{macrocode}
% Since it's a new font, we have to remove it from the context lists.
% \begin{macrocode}
\MT@map@clist@c\MT@active@features{%
@@ -5674,7 +5695,9 @@ 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}
@@ -5689,6 +5712,14 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
}
%<pdftex-def>}\relax
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@lua@copy@font}
+% \meta{\#1} and \meta{\#2} are `|select|' and `|font|', respectively,
+% \meta{\#3} is the font spec.
+% \begin{macrocode}
+%<luatex-def>\def\MT@lua@copyfont #1 #2 #3\@nil{%
+%<luatex-def> \global\expandafter\font\MT@font@copy=#3\relax}
%</pdftex-def|luatex-def>
% \end{macrocode}
%\end{macro}
@@ -6660,11 +6691,29 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@expandfont}
% Expand the font.
+% 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}
% \begin{macrocode}
-%<luatex-def>\MT@requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
+%<*luatex-def>
+\directlua{\detokenize{
+ if font.setexpansion == nil then
+ tex.print("\\@firstoftwo")
+ else
+ tex.print("\\@secondoftwo")
+ end
+}}{
+\MT@requires@luatex4{\let\pdffontexpand\expandglyphsinfont}\relax
+%</luatex-def>
\def\MT@expandfont{%
\pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax
}
+%<*luatex-def>
+}{
+\def\MT@expandfont{%
+ \directlua{font.setexpansion(font.current(),\MT@stretch@,\MT@shrink@,\MT@step@)}%
+}
+}
+%</luatex-def>
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@all@ex}
@@ -9457,16 +9506,27 @@ end
%\end{macro}
%\begin{macro}{\MT@register@subst@font}
% Register the substituted font
-%\changes{v2.5}{2010/08/23}{only register if it isn't registered already
+%\changes{v2.5}{2010/08/23}{only register substituted font if it isn't registered already
% (reported by \contributor George Gratzer <gratzer\at me.com>
% and \contributor Josep Maria Font <jmfont\at ub.edu>)}
% ^^A 1. <http://permalink.gmane.org/gmane.comp.tex.macosx/38293>
% ^^A 2. <http://permalink.gmane.org/gmane.comp.tex.macosx/38303>
% ^^A (beta:02)
% (only if it isn't registered already).
-% \begin{macrocode}
-\def\MT@register@subst@font{\MT@exp@one@n\MT@in@clist\font@name\MT@font@list
- \ifMT@inlist@\else\xdef\MT@font@list{\MT@font@list\font@name,}\fi}
+%\changes{v2.7d}{2019/10/28}{remove substitute font from list
+% (reported by \contributor Markus Kohm <komascript\at gmx.info>)}
+% ^^A private mail, 2019/01/16
+% ^^A https://tex.stackexchange.com/q/470311
+% Additionally, we have to remove the substitute font from the list of fonts,
+% so that we set it up again.
+% \begin{macrocode}
+\def\MT@register@subst@font{%
+ \MT@exp@one@n\MT@in@clist\font@name\MT@font@list
+ \ifMT@inlist@\else
+ \xdef\MT@font@list{\MT@font@list\font@name,}%
+ \expandafter\MT@rem@from@clist\MT@font\MT@font@list
+ \fi
+}
% \end{macrocode}
%\end{macro}
%
@@ -9503,9 +9563,10 @@ end
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@register@subst@font@cx}
-% Add the substituted font to each feature list.
+% Add the substituted font to each feature list and possibly remove substitute font.
%\todo{remove from other lists?}
%\changes{v2.5}{2010/08/23}{only register if it isn't registered already} ^^A (beta:02)
+%\changes{v2.7d}{2019/10/28}{remove substitute font from lists}
% \begin{macrocode}
\def\MT@register@subst@font@cx{%
\MT@map@clist@c\MT@active@features{%
@@ -9515,6 +9576,8 @@ end
\MT@exp@cs\MT@xadd
{MT@##1@\csname MT@##1@context\endcsname font@list}%
{\font@name,}%
+ \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter\MT@font
+ \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
\fi
}%
}
@@ -17071,7 +17134,7 @@ normal, and shrunk by 5\%:
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \CheckSum{10630}
+% \CheckSum{10666}
%
% \Finale
%
diff --git a/macros/latex/contrib/microtype/microtype.pdf b/macros/latex/contrib/microtype/microtype.pdf
index 95bd060f8a..6c2810a2c9 100644
--- a/macros/latex/contrib/microtype/microtype.pdf
+++ b/macros/latex/contrib/microtype/microtype.pdf
Binary files differ