From 7018dd6ace780dbf792b16f2c70294d5363db14c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 14 May 2016 22:10:53 +0000 Subject: microtype (14may16) git-svn-id: svn://tug.org/texlive/trunk@41127 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/microtype/microtype-utf.dtx | 12 ++- .../source/latex/microtype/microtype.dtx | 115 ++++++++++++--------- 2 files changed, 75 insertions(+), 52 deletions(-) (limited to 'Master/texmf-dist/source/latex/microtype') diff --git a/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx b/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx index eb10bc5d2fd..15f426bec15 100644 --- a/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx +++ b/Master/texmf-dist/source/latex/microtype/microtype-utf.dtx @@ -2,7 +2,7 @@ % ^^A messages to WinEdt: % !Mode:: "TeX:DTX:UK" % !smartQuote:: "English" -% !DTXversion:: "2.6" +% !DTXversion:: "2.6a" % ------------------------------------------------------------------------ % The `microtype' package % Subliminal refinements towards typographical perfection @@ -27,7 +27,7 @@ % \ProvidesFile %<*driver> - {\jobname.dtx}[2016/05/01 v2.6] + {\jobname.dtx}[2016/05/14 v2.6a] % % {mt-CharisSIL.cfg}[2013/03/13 v1.0 microtype config. file: Charis SIL (RS)] % {mt-LatinModernRoman.cfg}[2013/03/13 v1.0 microtype config. file: Latin Modern Roman (RS)] @@ -37,6 +37,14 @@ \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/Master/texmf-dist/source/latex/microtype/microtype.dtx b/Master/texmf-dist/source/latex/microtype/microtype.dtx index 7415061d05c..50a06ab4596 100644 --- a/Master/texmf-dist/source/latex/microtype/microtype.dtx +++ b/Master/texmf-dist/source/latex/microtype/microtype.dtx @@ -2,7 +2,7 @@ % ^^A messages to WinEdt: % !Mode:: "TeX:DTX:UK" % !smartQuote:: "English" -% !DTXversion:: "2.6" +% !DTXversion:: "2.6a" % ------------------------------------------------------------------------ % The `microtype' package % Subliminal refinements towards typographical perfection @@ -38,7 +38,7 @@ % {microtype-luatex.def} % {microtype-xetex.def} %<*package|letterspace|m-t|pdftex-def|luatex-def|xetex-def> - [2016/05/01 v2.6 + [2016/05/14 v2.6a % Micro-typographical refinements % Robust letterspacing % microtype main configuration file @@ -547,7 +547,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--2013 R Schlicht\012% + pdfcopyright={\textcopyright\ 2004--2016 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% @@ -581,6 +581,8 @@ \@esphack} \def\ctanurl#1{Available from \acronym{CTAN} at \href{http://mirror.ctan.org/#1}{\nolinkurl{/#1}}} + \def\ctanpkgurl#1{Available from \acronym{CTAN} at + \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:\%20Robert\%20Schlicht?subject=[microtype\%20\fileversion]} @@ -673,6 +675,7 @@ \let\hyperpage\@firstofone \let\texorpdfstring\@firstoftwo \def\ctanurl{Available from \acronym{CTAN} at \url} + \let\ctanpkgurl\ctanurl \let\nolinkurl\url \let\mailto\texttt \def\mailtoRS{\mailto{w.m.l@gmx.net}} @@ -927,7 +930,7 @@ % respective package option or with the \cs{microtypesetup} command % (section~\ref{sec:options}). % \item Select the fonts to which this feature should be applied by declaring -% and activating `sets of fonts'. Some sets are predefined, which may be +% and activating `sets of fonts'. A number of sets are predefined, which may be % activated directly in the package options % (section~\ref{sec:font-sets}). % \item Fine-tune the micro-typographic settings of the fonts or sets of fonts @@ -946,7 +949,7 @@ %\section{Options}\label{sec:options} % % Like many other \LaTeX\ packages, the \microtype\ package accepts options in -% the well known |key=value| syntax. In the following, you will find a +% 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 @@ -2258,7 +2261,6 @@ % \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi % \new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax} %\end{verbatim} -%\ifcmr\else\enlargethispage\baselineskip\fi ^^A layout % For the \pkg{memoir} class, you would additionally have to disable % auto-detection of multiple footnotes, which prevents protrusion: %\begin{verbatim} @@ -2562,7 +2564,8 @@ % characters, as numbers, or as glyph names (cf. section~\ref{sec:fine-tuning}); % and secondly, if you are using a font for which pre-defined settings do not exist, % that you create these settings yourself (because otherwise, the default settings -% will be loaded, which do contain text commands). +% will be loaded, which do contain text commands). Furthermore, you should +% load \microtype\ late. %\end{itemize} % %\changes{v1.8}{2005/06/23}{add hint about error messages} @@ -2712,7 +2715,7 @@ % interword spacing adjustment and additional character kerning. % \contributor Georg Duffner has patiently tested % \microtype\ under \xetex\ and \luatex\ with his beautiful OpenType font -% ~Garamond\footnote{\ctanurl{fonts/ebgaramond}, including configuration +% ~Garamond\footnote{\ctanpkgurl{ebgaramond}, including configuration % files for \microtype.}. % My thanks also go to % \contributor Maciej Eder @@ -2882,8 +2885,8 @@ % \bibitem[\pdftex\ manual]{pdftexman} % \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder, % \emph{The \pdftex\ user manual}, -% \newblock 23 November 2010. -% \newblock (\ctanurl{systems/pdftex/}) +% \newblock 25 April 2016. +% \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} % @@ -2901,27 +2904,27 @@ % Will Robertson, Khaled Hosny, % \emph{The \pkg{fontspec} package: Font selection for \xe\LaTeX\ and Lua\LaTeX}, % \newblock 1 February 2016. -% \newblock (\ctanurl{macros/latex/contrib/fontspec/}) +% \newblock (\ctanpkgurl{fontspec}) % % \bibitem[\pkg{luaotfload}]{luaotfload} % \'Elie Roux, Khaled Hosny, Philipp Gesang, % \emph{The \pkg{luaotfload} package}, -% \newblock 12 December 2015. -% \newblock (\ctanurl{macros/luatex/generic/luaotfload/}) +% \newblock 21 April 2016. +% \newblock (\ctanpkgurl{luaotfload}) % % \bibitem[\pkg{pdfcprot}]{pdfcprot} % Carsten Schurig, Tobias Schlemmer, \emph{The \pkg{pdfcprot}|.sty| package}, % \newblock 10 June 2005. -% \newblock (\ctanurl{macros/latex/contrib/pdfcprot/}) +% \newblock (\ctanpkgurl{pdfcprot}) % % \bibitem[\pkg{soul}]{soul} % Melchior Franz, \emph{The \pkg{soul} package}, % \newblock 17 November 2003. -% \newblock (\ctanurl{macros/latex/contrib/soul/}). +% \newblock (\ctanpkgurl{soul}). %\changes{v2.3a}{2008/01/06}{mention \pkg{soulutf8}} % \newblock See also Heiko Oberdiek's extension of this package, % \pkg{soulutf8}, which adds Unicode support. -% \newblock (\ctanurl{macros/latex/contrib/oberdiek/}) +% \newblock (\ctanpkgurl{soulutf8}) % %\end{thebibliography} % @@ -2957,7 +2960,9 @@ % %\begin{History} % -%\Version{\expandafter\@gobble\fileversion}{\filedate} +%\VersionDate{\expandafter\@gobble\fileversion}{\filedate} +% +%\Version{2.6}{2016/05/01} % \item Support for \luatex\ 0.85 % \item Improvements for tracking/letterspacing with \luatex\ % (|Renderer=Basic| no longer required) @@ -3076,6 +3081,7 @@ % \refsection{\ref{sub:options-cmd}} % \item Protrusion settings for encoded Charter % +%\ifcmr\else\pagebreak\fi ^^A layout %\Version{1.9}{2005/10/28} % \item New command \cs{DisableLigatures} to disable ligatures % (\pdftex\ $\geq$ 1.30) @@ -4141,7 +4147,7 @@ % \MT@pdftex@no % \MT@luatex@no <#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi} -%\MT@requires@luatex4{\let\pdftracingfonts\tracingfonts}\relax +%\MT@requires@luatex4{\directlua{tex.enableprimitives('pdf',{'tracingfonts'})}}\relax %\MT@requires@pdftex6{ %\pdftracingfonts=1 %}\relax @@ -4179,8 +4185,8 @@ microtype = microtype or {} local microtype = microtype microtype.module = { name = "microtype", - version = 2.6, - date = "2016/05/01", + version = "2.6a", + date = "2016/05/14", description = "microtype module.", author = "E. Roux, R. Schlicht and P. Gesang", copyright = "E. Roux, R. Schlicht and P. Gesang", @@ -4195,7 +4201,7 @@ local match = string.match local tex_write = tex.write function microtype.sprint (...) - tex.sprint(luatexbase.catcodetables['latex-package'], ...) + tex.sprint(luatexbase.catcodetables['latex-package'], ...) end % @@ -4256,7 +4262,9 @@ end %\begin{macro}{\MT@let@cn} % \cmd\let\ a command to a \cmd\csname\ sequence. % \begin{macrocode} +% \def\MT@let@cn#1#2{\expandafter\let\expandafter#1\csname #2\endcsname} +%<*package> % \end{macrocode} %\end{macro} %\begin{macro}{\MT@let@nn} @@ -4635,7 +4643,7 @@ microtype.if_str_eq = if_str_eq %^^A ^^A MID: % Using \cmd\pdfmatch\ would be slower. %\changes{v1.9a}{2005/11/03}{fix} -%\changes{v2.3}{2007/11/14}{fix: don't use \cmd\x\ +%\changes{v2.3}{2007/11/14}{don't use \cmd\x\ % (reported by \contributor Peter Meier )} % ^^A private mail, 2007/11/12 % \begin{macrocode} @@ -4754,26 +4762,31 @@ 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@do@font} % Execute \meta{\#1} 256 times, % \begin{macrocode} -%\def\MT@do@font{\MT@while@num\z@\@cclvi} +%\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}. %\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{} )} +% ^^A private mail, 2016/05/10 % \begin{macrocode} -%<*luatex-def|letterspace> +%<*luatex-def> \def\MT@do@font#1{% \MT@if@fontspec@font{% \def\MT@dofont@function{#1}% \MT@lua{microtype.do_font()}% }{\MT@while@num\z@\@cclvi{#1}}% } -% +% % \end{macrocode} % This is the |lua| function, which is much faster than looping through all glyphs -% in \TeX. +% 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. % \begin{macrocode} %<*luafile> local function do_font() @@ -4786,7 +4799,7 @@ local function do_font() end if thefont then for i,v in next,thefont.characters do - if v.index > 0 then + if v.index == nil or v.index > 0 then microtype.sprint([[\@tempcnta=]]..i..[[\relax\MT@dofont@function]]) end end @@ -5240,7 +5253,11 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@with@package@T {eledmac}\MT@ledmac@setup \MT@with@package@T{reledmac}\MT@ledmac@setup \MT@with@package@T{xunicode}\MT@xunicodetrue +% +% \MT@requires@latex2{ \MT@with@package@T{fontspec}{\MT@fontspectrue\MT@fontspec@setup}% +% }\relax +%<*package> % \end{macrocode} % We can clean up \cs{MT@setupfont@hook} now. %\changes{v2.6}{2014/03/17}{redefine \cs{MT@setupfont@hook} globally @@ -6974,7 +6991,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \MT@get@ls@basefont % \end{macrocode} -%\changes{v2.6}{2013/07/15}{use \pkg{luaotfload}'s \texttt{kernfactor} font feature if available} +%\changes{v2.6}{2013/07/15}{use \pkg{luaotfload}'s \texttt{kernfactor} feature if available} % \pkg{luaotfload} provides the faux font feature |kernfactor|, which we will % use when dealing with non-legacy fonts, as it is less problematic and faster % than the \pdftex\ primitive \cmd\letterspacefont. @@ -6982,10 +6999,11 @@ time will almost certainly lead to undesired results. Have your choice!}% %<*luatex-def|letterspace> \MT@if@fontspec@font{% %\MT@dinfo@nl{1}{... fontspec font: \MessageBreak -% \expandafter\fontname\MT@font}% +% \expandafter\fontname\font@name}% + \ifnum\MT@letterspace@<\z@\def\MT@minus{-}\else\let\MT@minus\@empty\fi \global\expandafter\font\MT@lsfont=% \expandafter\MT@exp@two@c\expandafter\MT@ls@fontspec@font - \expandafter\fontname\expandafter\MT@font\space \@nil + \expandafter\fontname\expandafter\font@name\space \@nil }{% % %\MT@dinfo@nl{1}{... legacy font}% @@ -7150,6 +7168,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\begin{macro}{\MT@ls@fontspec@colon} %\begin{macro}{\MT@ls@fontspec@font} +%\changes{v2.6a}{2016/05/03}{fix for value of \textpm1000} % Add the |kernfactor| feature to a font loaded by \pkg{fontspec} % (we might have to add the colon ourselves). % \begin{macrocode} @@ -7157,16 +7176,10 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@ls@fontspec@colon#1:#2:#3\@nil{#1:#2} \def\MT@ls@fontspec@font#1 #2\@nil{% "\MT@ls@fontspec@colon#1::\@nil - kernfactor=% - \ifnum\MT@letterspace@<\z@ -0.% - \ifnum-\MT@letterspace@<100 0\fi - \ifnum-\MT@letterspace@<10 0\fi - \number-\MT@letterspace@ - \else 0.% - \ifnum\MT@letterspace@<100 0\fi - \ifnum\MT@letterspace@<10 0\fi - \number\MT@letterspace@ - \fi;" + kernfactor=\MT@minus \ifnum\MT@letterspace@=1000 1\else 0.% + \ifnum\MT@minus\MT@letterspace@<100 0\fi + \ifnum\MT@minus\MT@letterspace@<10 0\fi + \number\MT@minus\MT@letterspace@ \fi;" \ifx\\#2\\ at \f@size pt\else#2\fi\relax } % @@ -7884,7 +7897,8 @@ 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} -% \MT@if@fontspec@font{\MT@lua{microtype.noligatures([[#1]],[[\MT@char]])}}\relax +% \MT@if@fontspec@font +% {\MT@lua{microtype.noligatures([[#1]],[[\MT@char]])}}\relax \fi }% \MT@vinfo{... Disabling ligatures for characters: #2}% @@ -9080,8 +9094,8 @@ end % (reported by \contributor HcN <@\at @>)} % ^^A http://tex.stackexchange.com/questions/275653/warning-using-microtype-and-excjk-packages % \begin{macrocode} - \MT@with@package@T{luatexja}{\MT@warn@unknown@once{luatexja}}% - \MT@with@package@T{xeCJK} {\MT@warn@unknown@once{xeCJK}}% +% \MT@with@package@T{luatexja}{\MT@warn@unknown@once{luatexja}}% +% \MT@with@package@T{xeCJK} {\MT@warn@unknown@once{xeCJK}}% % \end{macrocode} %\changes{v2.1}{2007/01/15}{compatibility with \pkg{CJK}: also check for its definition} %\changes{v2.3b}{2008/05/26}{compatibility with \pkg{CJKutf8}: also check for its definition} @@ -11772,11 +11786,9 @@ end % \begin{macrocode} \MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@ \let\MT@tracking\MT@set@tr@zero \else \let\MT@tracking\MT@tracking@ \fi} -%<*pdftex> - \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta} - \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta - \pdfappendkern \@tempcnta} -% +% \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta} +% \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta +% \pdfappendkern\@tempcnta} }{ % %<*pdftex-def|luatex-def|xetex-def> @@ -12793,6 +12805,9 @@ end % configuration files, where the proper input encoding is guaranteed, or else in % combination with the `|inputenc|' key. % +% With \xetex\ or \luatex, in contrast, it is advisable to use the proper +% Unicode characters. +% %\subsection{Character inheritance} %\GeneralChanges{Inheritance} % @@ -16279,7 +16294,7 @@ end %\changes{v2.2}{2007/04/05}{add sample}^^A % \begin{figure} % \caption{^^A -% Example for interword spacing (from: M.~Siemoneit, \emph{Typographisches Gestalten}, Frankfurt/M. 1989). +% Example of interword spacing (from: M.~Siemoneit, \emph{Typographisches Gestalten}, Frankfurt/M. 1989). % ^^A Manfred Siemoneit, Typographisches Gestalten. % ^^A Regeln und Tips f\"ur die richtige Gestaltung von Drucksachen, % ^^A Frankfurt/M.: Polygraph Verlag, 1989 @@ -16764,7 +16779,7 @@ normal, and shrunk by 5\%: % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% \CheckSum{10444} +% \CheckSum{10449} % % \Finale % -- cgit v1.2.3