diff options
author | Karl Berry <karl@freefriends.org> | 2006-06-01 22:56:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-06-01 22:56:51 +0000 |
commit | 3f78b824add5f8236277b3be45a141e7436ec5d5 (patch) | |
tree | 7d1229feafb6d21bba77d8e26488a74a985a5789 /Master | |
parent | e39a33ec4d6321f43329645a687af33893234ff5 (diff) |
microtype 1.9d
git-svn-id: svn://tug.org/texlive/trunk@1647 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
23 files changed, 6066 insertions, 4449 deletions
diff --git a/Master/texmf-dist/doc/latex/microtype/README b/Master/texmf-dist/doc/latex/microtype/README index 17931779e90..870a3031b7a 100644 --- a/Master/texmf-dist/doc/latex/microtype/README +++ b/Master/texmf-dist/doc/latex/microtype/README @@ -3,7 +3,7 @@ The `microtype' package An interface to the micro-typographic extensions of pdfTeX ================================= - v1.9 2005/10/28 + v1.9d 2006/05/05 * Overview @@ -53,15 +53,13 @@ of all distributions of LaTeX version 2003/12/01 or later. This work has the LPPL maintenance status `author-maintained'. -This work consists of the files microtype.dtx and microtype.ins and the +This work consists of the files microtype.dtx and microtype.ins and the derived file microtype.sty. -Modified versions of the configuration files (*.cfg) may be distributed +Modified versions of the configuration files (*.cfg) may be distributed provided that (1) the original copyright statement is not removed, and (2) the identification string is changed. - --------------------------------------------------- - Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> - --------------------------------------------------- - -$Id: README,v 1.10 2005-10-28 16:43:44+02 schlicht Exp schlicht $ + ---------------------------------------------------- + Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> + ---------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/microtype/microtype.pdf b/Master/texmf-dist/doc/latex/microtype/microtype.pdf Binary files differindex 711fd4b85ac..639d9ee3658 100644 --- a/Master/texmf-dist/doc/latex/microtype/microtype.pdf +++ b/Master/texmf-dist/doc/latex/microtype/microtype.pdf diff --git a/Master/texmf-dist/doc/latex/microtype/test-microtype.tex b/Master/texmf-dist/doc/latex/microtype/test-microtype.tex index 959bf0bbadc..89ab6e2db4b 100644 --- a/Master/texmf-dist/doc/latex/microtype/test-microtype.tex +++ b/Master/texmf-dist/doc/latex/microtype/test-microtype.tex @@ -9,9 +9,9 @@ %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,16 +23,16 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This file might be useful to test protrusion settings for a font. -%% You can do whatever you want with it. -%% ----------------------------------------------------------------------- -%% +%% This file might be useful to test protrusion settings for a font. +%% You can do whatever you want with it. +%% ----------------------------------------------------------------------- +%% \documentclass{article} -%% Here you can set the font you want to test, using +%% Here you can specify the font you want to test, using %% the commands \fontfamily, \fontseries, and \fontshape. %% Make sure to end all lines with a comment character! -\newcommand*{\TestFont}{% +\newcommand*\TestFont{% \fontfamily{ppl}% %% \fontseries{b}% %% \fontshape{it}% sc, sl @@ -40,13 +40,13 @@ \usepackage{ifthen} \usepackage[T1]{fontenc} -%%\usepackage[latin1]{inputenc} +\usepackage[latin1]{inputenc} \usepackage[verbose,expansion=alltext,stretch=50]{microtype} \pagestyle{empty} \setlength{\parindent}{0pt} -\newcommand*{\crulefill}{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill} -\newcommand*{\testprotrusion}[2][]{% +\newcommand*\crulefill{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill} +\newcommand*\testprotrusion[2][]{% \ifthenelse{\equal{#1}{r}}{}{#2}% lorem ipsum dolor sit amet, \ifthenelse{\equal{#1}{r}}{\crulefill}{\leftarrowfill} #2 @@ -60,7 +60,7 @@ \selectfont Here is the beginning of a line, \dotfill and here is its end}\linebreak } -\newcommand*{\showTestFont}{\expandafter\stripprefix\meaning\TestFont} +\newcommand*\showTestFont{\expandafter\stripprefix\meaning\TestFont} \def\stripprefix#1>{} \newcount\charcount \begin{document} @@ -117,21 +117,21 @@ \testprotrusion{\guillemotleft} \testprotrusion{\guillemotright} -\bigskip +\newpage The following displays the current font stretched by 5\%, normal, and shrunk by 5\%: -\microtypesetup{expansion=true} - \bigskip \newlength{\MTln} -\newcommand*{\teststring} +\newcommand*\teststring {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789} \settowidth{\MTln}{\teststring} +\microtypesetup{expansion=true} \parbox{1.05\MTln}{\teststring\linebreak\\ \teststring}\par\bigskip \parbox{0.95\MTln}{\teststring} + \end{document} \endinput %% diff --git a/Master/texmf-dist/source/latex/microtype/microtype.dtx b/Master/texmf-dist/source/latex/microtype/microtype.dtx index 4265e11964a..79da51ab8a3 100644 --- a/Master/texmf-dist/source/latex/microtype/microtype.dtx +++ b/Master/texmf-dist/source/latex/microtype/microtype.dtx @@ -1,11 +1,14 @@ %\iffalse meta-comment +% ^^A messages to WinEdt: % -*- TeX:DTX:UK -*- -% smartQuote: english -% $Id: microtype.dtx,v 1.25 2005-10-28 16:31:54+02 schlicht Exp schlicht $ +% smartQuote: English +% DTXversion: 1.9d +% ----------------------------------------------------------------------- +% $Id: microtype.dtx,v 1.34 2006-05-05 19:32:37+02 schlicht Exp schlicht $ % ----------------------------------------------------------------------- % The `microtype' package % An interface to the micro-typographic extensions of pdfTeX -% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +% Copyright (c) 2004--2006 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.3 of this license or @@ -26,77 +29,76 @@ %<*driver> \expandafter\newif\csname ifbeta\endcsname %\betatrue -\ProvidesFile{microtype.dtx}[2005/10/28 v\ifbeta 2.0-beta \else 1.9 \fi] +\ProvidesFile{microtype.dtx}[2006/05/05 v\ifbeta 2.0-beta:5 \else 1.9d \fi] %</driver> %<package>\NeedsTeXFormat{LaTeX2e} -%<package>\ProvidesPackage{microtype} -%<package&beta> [2005/10/28 v2.0-beta Micro-typography with pdfTeX (RS)] -%<package&!beta> [2005/10/28 v1.9 Micro-typography with pdfTeX (RS)] -%<*config|cfg-u> -%<config|cfg-u>\ProvidesFile -%<m-t> {microtype.cfg}[2005/08/16 v1.6 microtype main configuration file (RS)] -%<bch> {mt-bch.cfg}[2005/03/15 v1.3 microtype config. file: Bitstream Charter (RS)] -%<cmr> {mt-cmr.cfg}[2005/08/16 v1.8 microtype config. file: Computer Modern (RS)] -%<euf> {mt-euf.cfg}[2005/06/01 v1.0 microtype config. file: AMS Euler Fraktur (RS)] -%<eus> {mt-eus.cfg}[2005/06/01 v1.0 microtype config. file: AMS Euler script (RS)] -%<msa> {mt-msa.cfg}[2005/06/01 v1.0 microtype config. file: AMS (a) (RS)] +%<package>\ProvidesPackage{microtype}[2006/05/05 +%<package&beta> v2.0-beta:5 +%<package&!beta> v1.9d +%<package> Micro-typography with pdfTeX (RS)] +%<*config> +%<config>\ProvidesFile +%<m-t> {microtype.cfg}[2006/04/20 v1.8 microtype main configuration file (RS)] +%<bch> {mt-bch.cfg}[2005/12/02 v1.4 microtype config. file: Bitstream Charter (RS)] +%<cmr> {mt-cmr.cfg}[2005/11/07 v1.9 microtype config. file: Computer Modern (RS)] +%<pad> {mt-pad.cfg}[2005/11/07 v1.5 microtype config. file: Adobe Garamond (RS)] +%<pmn> {mt-pmn.cfg}[2004/11/07 v1.2 microtype config. file: Adobe Minion (HH)] +%<ppl> {mt-ppl.cfg}[2005/11/16 v1.6 microtype config. file: Palatino (RS)] +%<ptm> {mt-ptm.cfg}[2006/04/20 v1.7 microtype config. file: Times (RS)] +%<ugm> {mt-ugm.cfg}[2006/01/26 v1.0 microtype config. file: URW Garamond (RS)] +%<msa> {mt-msa.cfg}[2006/02/04 v1.1 microtype config. file: AMS (a) (RS)] %<msb> {mt-msb.cfg}[2005/06/01 v1.0 microtype config. file: AMS (b) (RS)] -%<pad> {mt-pad.cfg}[2005/03/15 v1.4a microtype config. file: Adobe Garamond (RS)] -%<pmn> {mt-pmn.cfg}[2004/03/15 v1.1b microtype config. file: Adobe Minion (HH)] -%<ppl> {mt-ppl.cfg}[2005/08/16 v1.5 microtype config. file: Palatino (RS)] -%<ptm> {mt-ptm.cfg}[2005/08/16 v1.5 microtype config. file: Times (RS)] -%</config|cfg-u> +%<euf> {mt-euf.cfg}[2005/06/01 v1.0 microtype config. file: AMS Euler Fraktur (RS)] +%<eus> {mt-eus.cfg}[2006/02/04 v1.1 microtype config. file: AMS Euler script (RS)] +%<zpeu> {mt-zpeu.cfg}[2006/05/04 v1.0 microtype config. file: Adobe Euro (RS)] +%<euroitc> {mt-euroitc.cfg}[2006/05/04 v1.0 microtype config. file: ITC Euro (RS)] +%<mvs> {mt-mvs.cfg}[2006/05/04 v1.0 microtype config. file: Marvosym Euro (RS)] +%</config> % %<*driver> \documentclass[10pt,a4paper]{ltxdoc} -\usepackage[latin1]{inputenc} -\usepackage{textcomp} -\usepackage{array} - \newcolumntype{L}[1]{p{#1}<{\raggedright}} -\expandafter\newif\csname ifbooktabs\endcsname -\IfFileExists{booktabs.sty} - {\usepackage{booktabs}\booktabstrue}{} -\IfFileExists{url.sty} - {\usepackage{url}} - {\def\url##1{\texttt{##1}}} % Let's abolish CM! We use Charter and Letter Gothic % (for the pre-built documentation on CTAN): % \def\rmdefault{bch} % \def\ttdefault{blg} - \usepackage[T1]{fontenc} -\ifbeta - \PassOptionsToPackage{kerning=true}{microtype} -\fi - \usepackage[expansion=false]{microtype} % it's a web document - \DeclareMicrotypeSet* - [ protrusion ]* - { encoding = {*, TS1, OMS}, - family = {rm*, tt*, cmsy}, - size = {footnotesize,small,normalsize} - } +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage[expansion=false]{microtype} % it's a web document + \DeclareMicrotypeSet*[protrusion]{doc} + { encoding = {*, TS1, OMS}, + family = {rm*, tt*, cmsy}, + size = {footnotesize, small, normalsize} } \ifbeta - \DeclareMicrotypeSet* - [ kerning ] - { lettergothic } - { encoding = T1, - family = blg } + \microtypesetup{kerning=true} + \DeclareMicrotypeSet*[kerning]{lettergothic} + { encoding = T1, + family = blg } \SetExtraKerning - { encoding = T1, - family = blg } - { - _ = {100,100}, - } + { encoding = T1, + family = blg } + { _ = {100,100} } % underscores shouldn't touch \else \newcommand\textls[2][]{#2} \let\lsstyle\relax \fi +\usepackage{ifpdf} +\makeatletter +\tolerance=700 +\ifpdf\ifnum\pdftexversion < 140 \else % ... we're using Hartmut's textmatrix.ch patch + \microtypesetup{expansion=alltext,step=1} + \g@addto@macro\macrocode{\pdfadjustspacing\z@} + \tolerance=300 % this is almost TeX's default tolerance +\fi\fi +\usepackage{booktabs} +\usepackage{array} + \newcolumntype{L}[1]{p{#1}<{\raggedright}} +\usepackage{graphicx} \usepackage{color} - \definecolor{theblue}{rgb}{0.02,0.04,0.48} - \definecolor{thered}{rgb}{0.65,0.04,0.07} + \definecolor{theblue} {rgb}{0.02,0.04,0.48} + \definecolor{thered} {rgb}{0.65,0.04,0.07} \definecolor{thegreen}{rgb}{0.06,0.44,0.08} - \definecolor{thegrey}{gray}{0.5} + \definecolor{thegrey} {gray}{0.5} \definecolor{theshade}{gray}{0.92} -\makeatletter \ifbeta \usepackage[color]{changebar} \cbcolor{thered} @@ -106,32 +108,33 @@ \let\betastart\ifbeta \let\betaend\fi \fi -% layout +% general layout \frenchspacing +\setlength\textheight{\topskip} \expandafter\newif\csname ifcharter\endcsname -\def\@tempa{bch} +\long\def\@tempa{cmr} \ifx\rmdefault\@tempa + \def\PackageFont{\sffamily} + \def\match{\textbullet} + \def\textgeq{$\geq$} + \linespread{1}\normalfont + \addtolength\textheight{46\baselineskip} +\else \chartertrue \def\bfdefault{b} - \def\PackageFont{\ttfamily} - \def\match{{\large\raisebox{-.15em}{\textbullet}}} \def\Module#1{{\color{theblue}$\langle$\textit{#1}$\rangle$}} \DeclareRobustCommand{\LaTeX}{L\kern-.26em{\sbox\z@ T\vbox to\ht\z@{% \hbox{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont A}% \vss}}\kern-.1em\TeX} - \newcommand*\textgeq{% being picky... - \raisebox{.2ex}{\kern1pt\underline - {\kern-1pt\textgreater\kern-1pt}\kern1pt}} - \linespread{1.07} -\else - \def\PackageFont{\sffamily} - \def\match{\textbullet} - \newcommand*\textgeq{$\geq$} - \linespread{1} + \def\PackageFont{\ttfamily} + \def\match{{\large\raisebox{-.15em}{\textbullet}}} + \def\textgeq{% being picky... + \raisebox{.2ex}{\kern1pt\underline{\kern-1pt\textgreater\kern-1pt}\kern1pt}} + {\catcode`\`=\active % indiscernible from ' in lettergothic + \g@addto@macro\macro@code{\let`\textasciigrave}} + \linespread{1.07}\normalfont + \addtolength\textheight{45\baselineskip} \fi -\normalfont -\setlength\textheight{\topskip} -\addtolength\textheight{44\baselineskip} \def\paragraph{\@startsection {paragraph}{4}{0pt}% {3.25ex plus 1ex minus .2ex}{-1em}% @@ -143,11 +146,9 @@ \def\theCodelineNo{\reset@font\color{thegrey}\scriptsize\arabic{CodelineNo}} \def\MacroFont{\ttfamily\small} \def\AltMacroFont{\ttfamily\footnotesize} -\tolerance=400 \def\ImplementationSettings{% \linespread{1}% - \tolerance=1000 - \hfuzz=20pt + \hfuzz=16pt \def\MacroFont{\ttfamily\footnotesize}% \def\macro@font{\ttfamily\footnotesize}% } @@ -166,9 +167,9 @@ \pagestyle{MTheadings} % toc \let\l@section@\l@section -\def\l@section{\vskip -.5ex\l@section@} +\def\l@section{\vskip -.75ex\l@section@} \let\l@subsection@\l@subsection -\def\l@subsection{\vspace{.25ex}\l@subsection@} +\def\l@subsection{\vskip.25ex \penalty\@secpenalty \l@subsection@} \def\l@subsubsection#1#2{% \leftskip 3.8em \rightskip 2em plus 1fil @@ -176,14 +177,12 @@ {\let\numberline\@gobble{\small[#1~--~#2]}}} \def\l@table{\@dottedtocline{1}{0pt}{1.5em}} \def\@pnumwidth{1.7em} -\long\def\tableofcontents{% - \section*{\contentsname }\ifPDF\pdfbookmark[1]{\contentsname}{section.TOC}\fi - \@mkboth{\textls[30]{\MakeUppercase{\contentsname}}}{}% - \@starttoc{toc}} -\long\def\listoftables{% - \section*{\listtablename }\ifPDF\pdfbookmark[1]{\listtablename}{section.LOT}\fi - \@mkboth{\textls[30]{\MakeUppercase{\listtablename}}}{}% - \@starttoc{lot}} +\def\special@toc#1#2#3{% + \long\def#1{\ifpdf\hypertarget{section.#3}{}\fi + \section*{#2}\@mkboth{\textls[30]{\MakeUppercase{#2}}}{}\@starttoc{#3}}% + \ifpdf\pdfoutline attr{/C [0.85 0.04 0.07] /F 00} goto name {section.#3}{#2}\fi} +\special@toc\tableofcontents\contentsname{toc} +\special@toc\listoftables\listtablename{lot} % bibliography \def\@cite#1#2{#1\if@tempswa, #2\fi} \def\thebibliography#1{% @@ -196,67 +195,54 @@ \def\@biblabel#1{} % footnotes \long\def\@makefntext#1{% - \leftskip 15pt - \parindent -15pt + \leftskip 0pt + \parindent 0pt \everypar{\parindent 0pt}% \leavevmode\hbox to 15pt{\@thefnmark\hss}#1} \skip\@mpfootins=0.5\baselineskip % lists -\def\descriptionlabel#1{\hspace\labelsep\normalfont#1} +\def\descriptionlabel#1{\hspace\labelsep\normalfont#1:} \def\@listi{\leftmargin\leftmargini \parsep 4.5pt plus 1pt minus 1pt \topsep 4.5pt plus 1pt minus 1pt \itemsep 0pt} \let\@listI\@listi \setlength\leftmargini{15pt} +\setlength\leftmarginii{15pt} +\setlength\leftmarginiii{10pt} \newenvironment{options} - {\list{}{\leftmargin 0pt - \labelwidth 0pt - \labelsep 1em - \itemindent \labelsep}} - {\endlist} + {\list{}{\leftmargin 0pt + \labelwidth 0pt + \labelsep 1em + \itemindent \labelsep}} + {\endlist} % tables \setlength\tabcolsep{2pt} -%\def\arraystretch{1.2} \long\def\@makecaption#1#2{% \sbox\@tempboxa{\footnotesize\itshape#1: #2}% \hb@xt@\hsize{\box\@tempboxa\hfil}% \vskip 6pt} % index and change log \IndexPrologue{\section{Index}% - Numbers written in italic refer to the page where the corresponding entry is - described; numbers underlined refer to the code line of the definition; - numbers in roman refer to the code lines where the entry is used.} -\IfFileExists{multicol.sty}{ - %\raggedcolumns - \setcounter{finalcolumnbadness}{100} - \setcounter{IndexColumns}{2} - \def\IndexMin{12\baselineskip} - \def\GlossaryParms{% - \IndexParms - \def\@idxitem ####1####2\efill{% - \end{multicols} - \begin{multicols}{2} - [\subsubsection*{\if####1v\relax - Version ####2 (\csname MTversiondate####2\endcsname)% - \else ####2\fi}] - [6\baselineskip] - \GlossaryParms - \rightskip 15pt plus 10pt - \let\item\@idxitem - \ignorespaces \makeatletter \scan@allowedfalse}% - \def\subitem{\par\hangindent 25pt}% - \def\subsubitem{\subitem\hspace*{15pt}}} - \GlossaryPrologue{% - \section{Change History}\label{sec:changes}% - \vspace*{-2\multicolsep}} -}{% - \GlossaryPrologue{% - \section{Change History}\label{sec:changes}} -} + Links refer to the page where the corresponding entry is described + (bold italic) resp. occurs. Plain numbers refer to the code line where the + corresponding entry is defined (underlined) resp. used.} +\GlossaryPrologue{\section{Change History}\label{sec:changes}\vspace*{-2\multicolsep}} + %\raggedcolumns +\setcounter{finalcolumnbadness}{100} +\setcounter{IndexColumns}{2} +\def\IndexMin{12\baselineskip} +\def\GlossaryParms{\IndexParms + \def\@idxitem ##1##2\efill{\end{multicols} + \begin{multicols}{2}[\subsubsection*{\if##1v\relax Version ##2 + (\csname MTversiondate##2\endcsname)\else ##2\fi}][6\baselineskip] + \GlossaryParms \rightskip 15pt plus 5pt + \let\item\@idxitem + \ignorespaces \makeatletter \scan@allowedfalse}% + \def\subitem{\par\hangindent 25pt}% + \def\subsubitem{\subitem\hspace*{15pt}}} % additional bells ... -\def\Describe#1#2#3{\noindent - \csname Describe#1\endcsname{#2}% +\def\Describe#1#2#3{\noindent\csname Describe#1\endcsname{#2}% \DescribeValues{#1}{#3}} \def\DescribeOption{\leavevmode\@bsphack \begingroup\MakePrivateLetters\Describe@Option} @@ -264,8 +250,7 @@ \marginpar{\raggedleft\PrintDescribeOption{#1}}% \SpecialOptionIndex{#1}\@esphack\ignorespaces} \def\DescribeValues#1#2{% - \let\@tempa\@empty - \let\Option@default\@empty + \let\@tempa\@empty \let\Option@default\@empty \@for\@tempb:=#2\do{% \expandafter\csname Special#1Value\expandafter\endcsname\@tempb\@nil \expandafter\g@addto@macro\expandafter\@tempa @@ -279,17 +264,15 @@ \def\SpecialMacroValue#1#2\@nil{% \if#1?\def\@tempb{\normalsize[\Variable{#2}]}% % ? = optional \else\def\@tempb{\normalsize\{\Variable{#1#2}\}}\fi} -\def\OptionSep{,\,} -\def\MacroSep{\space} +\def\Variable#1{$\langle${\rmfamily\itshape\small#1}$\rangle$} +\def\OptionSep{,\,} \def\MacroSep{\space} \def\PrintValues[#1]{{\MacroFont\expandafter\@gobble\@tempa\hfill #1}% \\*[.25\baselineskip]} -\def\CatIndex#1#2{\index{#2\actualchar{\protect\ttfamily #2} (#1)\encapchar hyperpage}} -\def\SpecialOptionIndex#1{\@bsphack - \CatIndex{option}{#1}% +\def\CatIndex#1#2{\index{#1\actualchar{\protect\ttfamily #1} (#2)\encapchar hyperpage}} +\def\SpecialOptionIndex#1{\@bsphack\CatIndex{#1}{option}% \index{\quotechar!Options % the `!' will be sorted first \actualchar{\protect\bfseries Options:}% - \levelchar{\protect\ttfamily#1}\encapchar usage}% - \@esphack} + \levelchar{\protect\ttfamily#1}\encapchar usage}\@esphack} \def\SpecialUsageIndex#1{\@bsphack {\index{\quotechar!User Commands \actualchar{\protect\indexspace\protect\bfseries User Commands:}% @@ -297,44 +280,35 @@ \quotechar*\verbatimchar\string#1\verbatimchar\encapchar usage}% \let\special@index\index\SpecialIndex@{#1}{\encapchar usage}}% \@esphack} -\def\IndexNewif#1{\@bsphack - \expandafter\SpecialMainIndex\expandafter{\csname #1true\endcsname}% - \expandafter\SpecialMainIndex\expandafter{\csname #1false\endcsname}% - \@esphack} \def\PrintDescribeMacro#1{\strut\MacroFont\color{thegreen}\string #1} \def\PrintDescribeOption#1{\strut\MacroFont\color{thered}#1} -\def\Key#1{{\color{thered}\ttfamily#1}} -\def\Variable#1{$\langle${\rmfamily\itshape\small#1}$\rangle$} -\DeclareRobustCommand\pkg[1]{{\PackageFont#1}\@bsphack\CatIndex{package}{#1}\@esphack} -\DeclareRobustCommand\opt[1]{{\ttfamily#1}\@bsphack\CatIndex{option}{#1}\@esphack} +\def\Indexing{\let\special@index\codeline@wrindex} +\def\NoIndexing{\let\special@index\@gobble} +\def\GeneralChanges#1{\edef\generalname{\if*#1 General\else#1\fi}}% mind the space! +\DeclareRobustCommand\key[1]{\textcolor{thered}{\ttfamily#1}} +\DeclareRobustCommand\pkg[1]{{\PackageFont#1}\@bsphack\CatIndex{#1}{package}\@esphack} +\DeclareRobustCommand\opt[1]{{\ttfamily#1}\@bsphack\CatIndex{#1}{option}\@esphack} \DeclareRobustCommand\file[1]{{\ttfamily#1}} % ... and whistles \expandafter\newif\csname iflistings\endcsname \IfFileExists{listings.sty}{ \usepackage{listings} - \lstset{% - gobble=1, - columns=flexible, - keepspaces=true, - basicstyle=\MacroFont, - keywords=[0]{\microtypesetup,\DeclareMicrotypeSet,\UseMicrotypeSet, - \DeclareMicrotypeSetDefault,\SetProtrusion,\SetExpansion,\DisableLigatures, - \DeclareCharacterInheritance,\DeclareMicrotypeAlias,\LoadMicrotypeFile, - \microtypecontext,\Microtype@Hook}, - keywordstyle=[0]\color{thegreen}, - keywords=[1]{protrusion,expansion,activate,DVIoutput,draft,final,verbose, - config,factor,auto,stretch,shrink,step,selected,unit}, - keywordstyle=[1]\color{thered}, - comment=[l]\%, - commentstyle=\color{thegrey}, - escapeinside=<>, - frame=single, - framerule=0pt, - xleftmargin=\fboxsep, - xrightmargin=\fboxsep, -% aboveskip=\smallskipamount, - belowskip=\smallskipamount, - backgroundcolor=\color{theshade} + \lstset{ + gobble=1,columns=flexible,keepspaces=true,upquote, + basicstyle=\MacroFont, + keywords=[0]{\microtypesetup,\DeclareMicrotypeSet,\UseMicrotypeSet, + \DeclareMicrotypeSetDefault,\SetProtrusion,\SetExpansion,\DisableLigatures, + \DeclareCharacterInheritance,\DeclareMicrotypeAlias,\LoadMicrotypeFile, + \microtypecontext,\Microtype@Hook}, + keywordstyle=[0]\color{thegreen}, + keywords=[1]{protrusion,expansion,activate,DVIoutput,draft,final,verbose, + config,factor,auto,stretch,shrink,step,selected,unit,context}, % defersetup + keywordstyle=[1]\color{thered}, + comment=[l]\%, + commentstyle=\color{thegrey}\itshape, + escapeinside=<>, + frame=single,framerule=0pt,backgroundcolor=\color{theshade}, + xleftmargin=\fboxsep,xrightmargin=\fboxsep,belowskip=\smallskipamount } \let\verbatim\relax \lstnewenvironment{verbatim}{}{} @@ -344,54 +318,22 @@ } \ifbeta \lstset{ - morekeywords=[0]{\SetExtraSpacing,\SetExtraKerning,\textls,\lsstyle, - \DeclareMicrotypeBabelHook}, + morekeywords=[0]{\SetExtraSpacing,\SetExtraKerning,\textls,\lsstyle,\DeclareMicrotypeBabelHook}, morekeywords=[1]{spacing,kerning,letterspacing,babel} } -\fi -\ifbeta \def\todo{\changes{zTo Do}{0000/00/00}} \else - \def\todo#1{} + \let\todo\@gobble \fi -\def\Indexing{\let\special@index\codeline@wrindex} -\def\NoIndexing{\let\special@index\@gobble} -\def\GeneralChanges#1{\edef\generalname{\if!#1General\else#1\fi}} -% Heiko Oberdiek's workaround from latexbugs (latex/3540): -\begingroup - \def\x\begingroup#1\@nil{% - \endgroup - \def\DoNotIndex{% - \begingroup - \@makeother\#% - \@makeother\$% - \@makeother\%% - \@makeother\&% - \@makeother\^% - \@makeother\_% - \@makeother\|% - \@makeother\~% - \@makeother\ % - % \@makeother\{\@makeother\} cannot be used here - #1}}% -\expandafter\x\DoNotIndex\@nil +\newcommand\microtypesample[1]{\begin{quote}#1\end{quote}} % fancy PDF document -\expandafter\newif\csname ifPDF\endcsname -\ifx\pdfoutput\undefined\else\ifx\pdfoutput\relax\else - \ifcase\pdfoutput\else\PDFtrue\fi\fi\fi -\ifPDF -% \ifx\eTeXversion\undefined \else -% \usepackage{pdfcolmk}% errors when not using etex (conflict with multicol) -% \fi - \usepackage{graphicx} - \usepackage[ - bookmarks=true, - colorlinks=true, - linkcolor=theblue, - urlcolor=theblue, - citecolor=theblue, - hyperindex=false, - hyperfootnotes=false, +\ifpdf + \ifx\eTeXversion\undefined \else % errors when not using etex (conflict with multicol) + \usepackage{pdfcolmk} + \fi + \usepackage[bookmarks=true,colorlinks=true, + linkcolor=theblue,urlcolor=theblue,citecolor=theblue, + hyperindex=false,hyperfootnotes=false, pdftitle={The microtype package}, pdfauthor={R Schlicht <w.m.l@gmx.net>}, pdfsubject={An interface to the micro-typographic extensions of pdfTeX}, @@ -407,56 +349,128 @@ \string\verb\quotechar*\verbatimchar\saved@macroname\verbatimchar\fi :\levelchar #3\encapchar hyperpage}}% \@tempa\endgroup\@esphack} -% \def\theCodelineNo{% % ... and everything else (would double the pdf file size) -% \reset@font\color{thegrey}\scriptsize -% \@tempcnta\arabic{CodelineNo}\advance\@tempcnta by\@ne -% \hypertarget{L:\number\@tempcnta}{\arabic{CodelineNo}}} -% \def\main#1{\underline{\hyperlink{L:#1}{#1}}} -% \def\codeline#1{\link@sanitize#1-\@nil{#1}} -% \def\link@sanitize#1-#2\@nil{\link@@sanitize#1,\@nil} -% \def\link@@sanitize#1,#2\@nil{\hyperlink{L:#1}} -% \def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble -% \string#1\actualchar -% \string\verb\quotechar*\verbatimchar\string#1\verbatimchar -% \encapchar codeline}% -% \@esphack} - \def\ctanurl#1{\href{http://www.tex.ac.uk/tex-archive#1}{\texttt{#1}}} + %\def\theCodelineNo{% % ... and everything else (would double the pdf file size) + % \reset@font\color{thegrey}\scriptsize + % \@tempcnta\arabic{CodelineNo}\advance\@tempcnta by\@ne + % \hypertarget{L:\number\@tempcnta}{\arabic{CodelineNo}}} + %\def\main#1{\underline{\hyperlink{L:#1}{#1}}} + %\def\codeline#1{\link@sanitize#1-\@nil{#1}} + %\def\link@sanitize#1-#2\@nil{\link@@sanitize#1,\@nil} + %\def\link@@sanitize#1,#2\@nil{\hyperlink{L:#1}} + %\def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble + % \string#1\actualchar + % \string\verb\quotechar*\verbatimchar\string#1\verbatimchar + % \encapchar codeline}% + % \@esphack} + \def\ctanurl#1{\href{http://www.tex.ac.uk/tex-archive#1}{\nolinkurl{#1}}} \def\mailto#1{\href{mailto:#1}{\texttt{#1}}} - \def\mailtoRS{\href{mailto:<w.m.l@gmx.net> R Schlicht?subject=microtype \fileversion} - {\texttt{w.m.l@gmx.net}}} + % some PDF viewers don't like spaces: + {\catcode`\%=12 + \gdef\mailtoRS{\href + {mailto:<w.m.l@gmx.net>%20Robert%20Schlicht?subject=[microtype%20\fileversion]} + {\texttt{w.m.l@gmx.net}}}} + % the samples on the first page, utilizing nested optional content groups (layers): + \ifnum\pdftexversion < 140 \else + \newbox\mt@box + \def\mt@place#1{% + \setbox\mt@box\vbox{#1}% + \@tempdima\dimexpr\ht\mt@box+\dp\mt@box\relax + \unvbox\mt@box \vskip-\@tempdima} + \def\mt@pseudo@marg#1{% + \mt@place{\llap{\vbox{% + \hsize\marginparwidth + \rightskip 15pt plus 1em + \leavevmode \footnotesize\itshape #1}}}} + \let\mt@objects\@empty \let\mt@resources\@empty + \def\mt@register#1#2{% + \immediate\pdfobj{<< /Type/OCG /Name(#1:#2) >>} + \expandafter\xdef\csname mt@#1@#2\endcsname{\the\pdflastobj\space 0 R } + \xdef\mt@objects{\mt@objects\csname mt@#1@#2\endcsname} + \xdef\mt@resources{\mt@resources/#1#2 \csname mt@#1@#2\endcsname}} + \mt@register{Protrusion}{true} \mt@register{Expansion}{true} + \mt@register{Protrusion}{false} \mt@register{Expansion}{false} + \mt@register{invisible}{} + \pdfcatalog{/OCProperties << + /OCGs [\mt@objects] + /D << /Order [\mt@objects] + /BaseState/OFF + /ON [\mt@Protrusion@false \mt@Expansion@false] >> >>} + \def\mt@show@sample#1#2{% + \pdfliteral{/OC /Protrusion#1 BDC /OC /Expansion#2 BDC}% + \mt@place{\microtypesetup{protrusion=#1,expansion=#2}\mt@sample@text}% + \pdfliteral{EMC EMC}} + \def\mt@toggle@sample#1{\pdfstartlink user{% + /Subtype/Link /Border[0 0 1 [3 2]] /H/O /C[0.65 0.04 0.07] + %/OC <</Type/OCMD /VE[/Not \mt@invisible@] >> % not honoured by older viewers + /A << /S/SetOCGState + /State [/Toggle \csname mt@#1@true\endcsname + \csname mt@#1@false\endcsname] >>} + #1 \hfill\pdfendlink & \pdfliteral{/OC/#1true BDC}\rlap{on}\pdfliteral{EMC % + /OC/#1false BDC}off\pdfliteral{EMC}} + \renewcommand\microtypesample[1]{% + \begingroup + \leftskip 15pt \rightskip 15pt + \parskip\parsep \parindent 0pt + \vskip\topsep + \long\def\mt@sample@text{#1} + \mt@pseudo@marg{\color{theblue}% + After you have read the text on the right, you can view the effect of the + features it describes by clicking on the links:\strut\\ + \colorbox{theshade}{% + \begin{tabular}{@{}>{\upshape}l@{\quad}l} + \mt@toggle@sample{Protrusion}\\\addlinespace + \mt@toggle@sample{Expansion} + \end{tabular}}\\[0.3\baselineskip] + Both features are enabled in this document.} + \mt@show@sample{false}{false} + \mt@show@sample{false}{true} + \mt@show@sample{true} {false} + % for compatibility with older PDF viewers that don't support OCGs, we + % add a layer that contains a white box, which will hide the underlying + % layers for older viewers, and will be ignored by PDF 1.5 capable viewers. + \pdfliteral{/OC /invisible BDC} + \mt@place{\rlap{\hskip-\marginparwidth \color{white}% + \vrule width\dimexpr\hsize+\marginparwidth\relax height\@tempdima}} + \mt@pseudo@marg{\color{thered}% + If you had a PDF viewer that understands PDF\,1.5, you could view the + effect of the micro-typographic features by clicking on the links.\strut + \\\vphantom{\colorbox{white}{\tabular l\\\addlinespace\\\endtabular}}% + \\[0.3\baselineskip] Both features are enabled in this document.} + \pdfliteral{EMC} + \def\mt@place##1{\setbox\mt@box\vbox{##1}\unvbox\mt@box} + \mt@show@sample{true}{true} + \vskip\parsep + \endgroup + \edef\x{\pdfpageresources{/Properties <<\mt@resources>>}}\x} + \fi \else - \let\hyperpage\relax - \def\texorpdfstring#1#2{#1} - \def\ctanurl#1{\url{#1}} - \def\mailto#1{\texttt{#1}} + \usepackage{url} + \let\hyperpage\@firstofone + \let\texorpdfstring\@firstoftwo + \let\ctanurl\url + \let\nolinkurl\url + \let\mailto\texttt \def\mailtoRS{\mailto{w.m.l@gmx.net}} - \let\nolinkurl\texttt \fi -\hyphenation{Ha-rald Har-ders Ber-nard Ku-char-czyk} +\hyphenation{Ha-rald Har-ders Ber-nard Ku-char-czyk Jac-kow-ski} % abbreviations \def\microtype{{\PackageFont microtype}} \def\pdftex{\texorpdfstring{pdf\kern.05em\TeX}{pdfTeX}} \def\etex{\mbox{e-\TeX}} -\DeclareRobustCommand\thanh{H\`an Th\^e\llap{\raisebox{0.5ex}{\'{}}} Th\`anh} -\DeclareRobustCommand\acro[1]{\texorpdfstring - {{\ifdim\f@size pt=1\@ptsize pt\relax\small\fi - \ifcharter\textls[30]{#1}\else#1\fi}}{#1}} -\def\spaceout#1{\ifx#1\relax\else#1\kern.06em\expandafter\spaceout\fi} -\def\ams{\acro{AMS}} -\def\ctan{\acro{CTAN}} -\def\dvi{\acro{DVI}} -\def\nfss{\acro{NFSS}} -\def\pdf{\acro{PDF}} -\def\tI{\acro{T1}} -\def\tV{\acro{T5}} -\def\otI{\acro{OT1}} -\def\otIV{\acro{OT4}} -\def\lyI{\acro{LY1}} -\def\tsI{\acro{TS1}} -\def\oml{\acro{OML}} -\def\oms{\acro{OMS}} -\def\U{\acro{U}} -\def\ascii{\acro{ASCII}} +\def\fontdim{\cmd{\fontdimen}\,} +\DeclareRobustCommand\thanh{H\`an Th\^e% + \ifx\eTeXversion\undefined \llap{\raisebox{0.5ex}{\'{}}} + \else \llap{\raisebox{0.45ex}{\'{}\kern\dimexpr.05em-2\fontdimen1\font\relax}} + \fi Th\`anh} +\DeclareRobustCommand\acronym[1]{\texorpdfstring{{\setbox\z@\hbox{% + \@tempcnta=\f@size \edef\x{\@tempcnta=\the\@tempcnta}\expandafter}\x + \advance\@tempcnta-7 \ifcase\@tempcnta\tiny\or\scriptsize\or + \footnotesize\or\small\or\or\normalsize\or\or\large\or\or\or\Large\fi + \ifcharter\textls[30]{#1}\else#1\fi}}{#1}} +\catcode`\<=\active +\def<#1>{\acronym{#1}} +%\def\contributor#1 <#2\at#3>{#1\protect\footnote{\mailto{#2@#3}}} +\def\contributor#1 <#2\at#3>{\textit{#1}} \def\eg{e.\,g.} \def\ie{i.\,e.} \makeatother @@ -471,19 +485,20 @@ % \fi % % ^^A ------------------------------------------------------------------------- +%\GeneralChanges* %\changes{v1.0}{2004/09/11}{Initial version} %\GeneralChanges{Documentation} +%\changes{v1.9b}{2006/01/13}{activate expansion in the distributed <PDF>} % % \GetFileInfo{microtype.dtx} % \title{\IfFileExists{mt-logo.pdf}{\vspace{-2\baselineskip}^^A -% \includegraphics{mt-logo}\\[3.5\baselineskip]}{}^^A +% \includegraphics{mt-logo}\\[3.5\baselineskip]}\relax % \textls[30]{The \microtype\ package}\\[.3\baselineskip]\large % An interface to the micro-typographic extensions of \pdftex} % \author{R Schlicht\quad\mailtoRS} % \date{\fileversion\ --- \filedate} % -% \maketitle -% \thispagestyle{empty} +% \maketitle \thispagestyle{empty} % %\begin{abstract} %\noindent @@ -501,15 +516,16 @@ % configure all micro-typographic aspects of the fonts in a straight-forward % and flexible way. Settings for various fonts are provided.\footnote{ % Currently, this package provides settings for Computer Modern Roman, -% Palatino, Times, Adobe Garamond and Minion, Bitstream Charter, and the -% \ams\ math fonts, as well as some generic settings for unknown fonts. -% Contributions are very welcome.} +% Palatino, Times, Utopia Garamond, Adobe Garamond and Minion, Bitstream +% Charter, and the <AMS> math fonts, for various Euro symbol fonts, as well +% as some generic settings for unknown fonts. Contributions are very +% welcome.} % % Note that font expansion and character protrusion will only work with \pdftex, % at least version 0.14f. Automatic font expansion requires version 1.20 or % newer. Disabling ligatures require \pdftex\ 1.30^^A %\betastart, -% adjustment of interword spacing and of kerning requires version 1.3x^^A +% adjustment of interword spacing and of kerning requires version 1.40^^A %\betaend. % The package will by default enable the features that can safely be assumed to % work. @@ -520,10 +536,12 @@ %\betaend %\end{abstract} % +% %\newpage %\tableofcontents %\listoftables % +% %\newpage %\section{Micro-Typography with \pdftex}\label{sec:micro-type} % @@ -533,12 +551,8 @@ % protrusion} (also known as margin kerning) and \textit{font expansion}. % Quoting \thanh's thesis: % -%\begin{quote}\small -%\ifPDF -% \dimen0=\lpcode\font`\`em -% \divide\dimen0 by 500 ^^A double -% \hskip-\dimen0 ^^A cheat! -%\fi +%\changes{v1.9b}{2006/01/13}{add samples of micro-typographic features} +%\microtypesample{\small % `Margin kerning is the adjustments of the characters at the margins of a % typeset text. A simplified employment of margin kerning is hanging % punctuation. Margin kerning is needed for optical alignment of the margins @@ -557,13 +571,12 @@ % distortion when using such manipulations, thus they must be used with % extreme care. The potentiality to adjust a line width by font expansion can % be taken into consideration while a paragraph is being broken into lines, -% in order to choose better breakpoints.' [\cite[p.~323]{ThanhThesis}] -%\end{quote} +% in order to choose better breakpoints.' [\cite[p.~323]{ThanhThesis}]} % % Both these features have been lacking a simple \LaTeX\ user interface for -% quite some time. Then, the \pkg{pdfcprot} package was released [\cite{pdfcprot}], -% which allowed \LaTeX\ users to employ character protrusion without having to -% mess much with the internals. +% quite some time. Then, the \cite{pdfcprot} package was released, which +% allowed \LaTeX\ users to employ character protrusion without having to mess +% much with the internals. % % Font expansion, however, was still most difficult to utilize, since it % required that the font metrics are available in all levels of expansion. @@ -582,9 +595,8 @@ %\bigskip % After this great leap in usability had been taken, the development did not % stop. On the contrary, \pdftex\ was extended with even more features: Version -% 1.3x introduced the \emph{adjustment of interword spacing}, additional -% \emph{kerning settings} and the possibility to \emph{disable all ligatures} -% of a font. +% 1.40 introduced the \emph{adjustment of interword spacing} and the possibility +% to specify \emph{additional character kerning}. % % Adjustment of interword spacing is based upon the idea that in order to % achieve a uniform greyness of the text, the space between words should also @@ -595,7 +607,7 @@ % interword space (or glue) by the same amount -- the kerning, the maximum % amount that the space may be stretched and the maximum amount that it may be % shrunk~\mbox{--,} \pdftex\ provides the possibility to modify these -% parameters independently from one other. Furthermore, the values may be set +% parameters independently from one another. Furthermore, the values may be set % differently for each font. And, probably most importantly, the parameters may % not only be increased but also decreased. This feature may enhance the % appearance of paragraphs even more. @@ -623,10 +635,22 @@ % command \cs{textls}, which can be used much like the normal text commands. %\betaend % -% Finally, the possibility to disable all ligatures of a font has been introduced. -% This may be useful when using typewriter fonts. +% Finally, the possibility to \emph{disable all ligatures} of a font has been +% introduced. This may be useful when using typewriter fonts.\ifbeta\else +% \footnote{\label{fn:beta}\pdftex\ version 1.40 (available from +% \url{http://sarovar.org/projects/pdftex/}) additionally implements two new +% experimental extensions: the \emph{adjustment of interword spacing (glue)} +% and the possibility to specify \emph{additional character kerning}. The +% former may improve the appearance of the text even more, the latter allows +% for instance to insert small spaces before certain characters (\eg, for +% typesetting in the French tradition) without having to use active +% characters; also, letterspacing can be implemented in a robust way. +% \microtype\ already supports these new extensions, so that you can easily +% experiment with them. To generate the extended version of the \microtype\ +% package and its documentation, simply remove the comments before +% `\texttt{\textbackslash betatrue}' near the beginning of \file{microtype.ins} +% resp. \file{microtype.dtx}.}\fi % -%\ifcharter\else\enlargethispage\baselineskip\fi ^^A layout %\bigskip\noindent % The \microtype\ package provides an interface to all these micro-typographic % extensions.\footnote{ @@ -651,11 +675,12 @@ % typographic issues), you may actually skip the rest of this document. % % +%\ifpdf\pdfpageresources{}\fi %\section{Options} % % Like many other \LaTeX\ packages, the \microtype\ package accepts options in % the well known |key=value| syntax. In the following, you'll find a -% description of all \Key{keys} and their possible |values| +% 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 \pdftex\ version). @@ -670,14 +695,14 @@ % package is moderately greedy: Character protrusion will be enabled, font % expansion will only be disabled in circumstances where \pdftex\ cannot expand % the fonts automatically, that is, if it is either too old (versions before -% 1.20) or if the output mode is \dvi\ (see section~\ref{sub:options-misc}). +% 1.20) or if the output mode is <DVI> (see section~\ref{sub:options-misc}). % % Protrusion and expansion may be enabled or disabled independently from each % other by setting the respective key to |true| resp. |false|. The % \opt{activate} option %\DescribeOption{activate} % is a shortcut for setting both options at the same time. Therefore, the -% following lines all have the same effect (when creating \pdf\ files with a +% following lines all have the same effect (when creating <PDF> files with a % new \pdftex): %\begin{verbatim} %\usepackage[protrusion=true,expansion=true]{microtype} @@ -698,10 +723,10 @@ % and/or \opt{expansion} options. Typographically, however, the results may be % suboptimal. % -%\enlargethispage\baselineskip ^^A layout % Finally, you may also specify the name of a font set to which character % protrusion and/or font expansion should be restricted. See -% section~\ref{sec:font-sets} for a detailed discussion. +% section~\ref{sec:font-sets} for a detailed discussion. Specifying a font set +% for a feature implies activating this feature. % %\betastart %\bigskip @@ -710,7 +735,7 @@ % The new extensions of interword spacing and additional kerning adjustment do % not feature a compatibility layer. Therefore, they can only be switched on or % off, or they may be activated by passing a set name to the option. By -% default, neither extension is enabled. +% default, neither feature is enabled. %\betaend % %\bigskip\noindent @@ -744,7 +769,7 @@ %\Describe{Option}{auto}{true,false}[*\,true] % As noted in chapter~\ref{sec:micro-type}, the expanded versions of the fonts % may be calculated automatically. This option is true by default provided that -% \pdftex's version is found to be 1.20 or higher and the output mode is \pdf; +% \pdftex's version is found to be 1.20 or higher and the output mode is <PDF>; % otherwise, it will be disabled. % If \opt{auto} is set to false, the fonts for all expansion steps must exist % (with files called \meta{font~name}\texttt{\textpm}\meta{expansion value}, @@ -755,12 +780,13 @@ %\changes{v1.9}{2005/08/27}{add remark about Type\,1 fonts required for % automatic font expansion} % Automatic font expansion requires fonts in Type\,1 format. Therefore, if you -% are using the Computer Modern Roman fonts in \tI\ encoding\footnote{ -% En passant, it may be noted that Type\,1 format and \tI\ encoding are in +% are using the Computer Modern Roman fonts in <T1> encoding\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'.}, % you should either install the \pkg{cm-super} fonts or use the Latin Modern % fonts (package \pkg{lmodern}). % +%\ifbeta\else\pagebreak\fi ^^A layout %\bigskip %\Describe{Option}{stretch}{:integer}[20] %\DescribeOption{shrink} @@ -771,7 +797,6 @@ % The default stretch limit is 20. The shrink limit will by default be the % same as the stretch limit. % -%\pagebreak ^^A layout %\bigskip %\Describe{Option}{step}{:integer}[\textrm{min(\opt{stretch},\opt{shrink})/5}] % Font expansion will be applied in discrete steps. For example, if \opt{step} @@ -808,24 +833,24 @@ %\subsection{Miscellaneous Options}\label{sub:options-misc} % %\Describe{Option}{DVIoutput}{true,!false} -% \pdftex\ is not only able to generate \pdf\ output but can also spit out \dvi\ +% \pdftex\ is not only able to generate <PDF> output but can also spit out <DVI> % files.\footnote{ % \TeX\ systems are beginning to switch to pdfe\TeX\ as the default engine -% even for \dvi\ output.} +% even for <DVI> output.} % The latter can be ordered with the option \opt{DVIoutput}, which will set % \cmd{\pdfoutput} to zero. % %\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. +% 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. -% \emph{Automatic} font expansion will not work because dvips (resp. the \dvi\ +% When generating <DVI> files, font expansion has to be enabled explicitly. +% \emph{Automatic} font expansion will not work because dvips (resp. the <DVI> % viewer) is not able to generate the expanded fonts on the fly. % %\bigskip @@ -854,12 +879,26 @@ % You can have a different configuration file loaded instead by specifying its % name \emph{without the extension}, \eg, |config=mycrotype|. % +%\iffalse ^^A ... waiting for bug reports before documenting yet another option ... +%\bigskip +%\Describe{Option}{defersetup}{!true,false} +% Unlike in earlier versions, \microtype\ will since version 1.9a defer its +% setup until the end of the preamble. This has at least two advantages: the +% command \cs{microtypesetup} described below may be used to change package +% options later on, and it is no longer necessary to set the default fonts and +% encodings before loading \microtype. There is one possible problem: If a box +% is being constructed inside the preamble, \emph{and} this box contains a font +% that is not loaded before the box is being used in the document, then this +% font will not be set up. Should this extremely unlikely case occur, set +% |defersetup=false|. Then, however, the aforementioned restrictions apply. +%\fi +% %\betastart %\bigskip -%\Describe{Option}{letterspacing}{:number}[100] +%\Describe{Option}{letterspacing}{:integer}[100] % This option changes the default amount that the command \cs{textls}, which is -% described below in section~\ref{sec:lettersp}, will space out its argument. -% The amount is specified in thousandth of 1em. +% described below in section~\ref{sec:lettersp}, will space out the text. The +% amount is specified in thousandth of 1em. % %\bigskip %\Describe{Option}{babel}{true,!false} @@ -869,17 +908,20 @@ %\betaend % % -%\subsection{Changing Settings Later}\label{sec:options-cmd} +%\subsection{Changing Options Later}\label{sec:options-cmd} % -%\Describe{Macro}{\microtypesetup}{key\,=\,value list} -% This command may be used in the document body to change the general settings -% of the micro-typographic extensions. It accepts the keys: \Key{expansion}, -% \Key{protrusion} and \Key{activate}, which in turn may receive the values +%\Describe{Macro}{\microtypesetup}{key\,|=|\,value list} +% Inside the preamble, this command accepts all package options described above +% (except for |config|). +% +% In the document body, this command may be used to change the general settings +% of the micro-typographic extensions. It then accepts the keys: \key{expansion}, +% \key{protrusion} and \key{activate}, which in turn may receive the values % |true|, |false|, |compatibility| or |nocompatibility| (but not the name of a % font set). %\ifbeta -% For \Key{spacing} and \Key{kerning}, there is no compatibility level, -% therefore, only the values |true| and |false| are admissible here. +% Since there is no compatibility level for \key{spacing} and \key{kerning}, +% only the values |true| and |false| are admissible here. %\fi % Using this command, you could for instance temporarily disable font expansion % by saying: @@ -888,59 +930,48 @@ %\end{verbatim} % % -%\section{Declaring Font Sets}\label{sec:font-sets} +%\section{Selecting Fonts for Micro-Typography}\label{sec:font-sets} % % By default, character protrusion will be applied to all text fonts that are -% being used in the document, and a basic set of fonts will be expanded. You -% may want to customize the set of fonts that should get the benefit of -% micro-typographic treatment. This can be achieved by specifying attributes of -% the font that have to be matched for them to be taken into account. +% being used in the document, and a basic set of fonts will be subject to font +% expansion. You may want to customize which fonts should get the benefit of +% micro-typographic treatment. This can be achieved by declaring and activating +% `font sets'; these font sets are specified via font attributes that have to +% match. % %\bigskip %\Describe{Macro}{\DeclareMicrotypeSet}{?features,set name,set of fonts} %\DescribeMacro{\DeclareMicrotypeSet*} % This command declares a new set of fonts to which the micro-typographic % extensions should be applied. The optional argument may contain a -% comma-separated list of features to which this set should be restricted. The -% set can subsequently be activated by calling: -%\iflistings -%\begin{verbatim} -%\UseMicrotypeSet[<\Variable{features}>]{<\Variable{set name}>} -%\end{verbatim} -%\else -%\begin{flushleft}\small -%|\UseMicrotypeSet[|\Variable{features}|]{|\Variable{set name}|}| -%\end{flushleft} -%\fi -% -%\bigskip\noindent +% comma-separated list of features to which this set should be restricted. % The starred version of the command declares \emph{and} activates the font % set at the same time. % -% \paragraph{The set of fonts} is specified by assigning values to the \nfss\ +% \paragraph{The set of fonts} is specified by assigning values to the <NFSS> % font attributes: encoding, family, series, shape, and size (cf.~\cite{fntguide}). % Let's start with an example. This package defines a font set called % `|basictext|' in the main configuration file as follows: %\begin{verbatim} %\DeclareMicrotypeSet{basictext} -% { encoding = {T1,OT1,LY1}, +% { encoding = {OT1,T1,LY1,OT4,QX,T5}, % family = {rm*,sf*}, -% series = {m}, +% series = {md*}, % size = {normalsize,footnotesize,small,large} % } %\end{verbatim} % If you now call -%{\lstset{deletekeywords=[1]{expansion}} +%{\lstset{deletekeywords=[1]{protrusion}} %\begin{verbatim} -%\UseMicrotypeSet[expansion]{basictext} +%\UseMicrotypeSet[protrusion]{basictext} %\end{verbatim}} %\noindent -% in the document's preamble, only fonts in the text encodings \tI, \otI\ or -% \lyI, roman or sans serif families, normal (or `medium') series, and in -% sizes called by \cmd{\normalsize}, \cmd{\footnotesize}, \cmd{\small} or -% \cmd{\large}, will be expanded. Math fonts, on the other hand, will not, -% since they are in another encoding. Neither will fonts in bold face, or huge -% fonts. Etc. +% in the document's preamble, only fonts in the text encodings <OT1>, <T1>, +% <LY1>, <OT4>, <QX> or <T5>, roman or sans serif families, normal (or +% `medium') series, and in sizes called by \cmd{\normalsize}, +% \cmd{\footnotesize}, \cmd{\small} or \cmd{\large}, will be protruded. Math +% fonts, on the other hand, will not, since they are in another encoding. +% Neither will fonts in bold face, or huge fonts. Etc. % % If an attribute list is empty or missing -- like the `shape' attribute % in the above example --, it does not constitute a restriction. In other @@ -949,20 +980,20 @@ % Therefore, the predefined set `|alltext|', which is declared as: %\begin{verbatim} %\DeclareMicrotypeSet{alltext} -% { encoding = {T1,OT1,LY1,TS1} } +% { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1} } %\end{verbatim} % is far less restrictive. The only condition is that the encoding must match. % % If a value is followed by an asterisk (like `|rm*|' and `|sf*|' in the example -% above), it does not designate an \nfss\ code, but will expand to the current -% |\|\meta{value}|default|, \eg\ \cmd{\rmdefault}.\footnote{ -% Note that this expansion will take place immediately, so you should make -% all relevant changes \emph{before} loading the \microtype\ package.} +% above), it does not designate an <NFSS> code, but will expand to the +% document's |\|\meta{value}|default|, \eg\ \cmd{\rmdefault}. +%\iffalse ^^A what's wrong here? % For example, if you want to include the bold font, too, you should say `|bf*|' % instead of `|b|' (\cmd{\bfdefault} for Computer Modern is `|bx|', while for -% other fonts, it might be `|b|' or even `|sb|'). A single asterisk means -% |\|\meta{characteristic}|default|, \eg\ \cmd{\encodingdefault}, respectively -% \cmd{\normalsize} for the size axis. +% other fonts, it might be `|b|' or even `|sb|'). +%\fi +% A single asterisk means |\|\meta{attribute}|default|, \eg\ +% \cmd{\encodingdefault}, respectively \cmd{\normalsize} for the size axis. % % Sizes may be either specified as a dimension (`|10|' or `|10pt|'), or as a % size selection command \emph{without} the backslash. You may also specify @@ -974,15 +1005,16 @@ %\bigskip\noindent % Additionally to this declaration scheme, you can add single fonts to % a set using the `|font|' key, which expects the concatenation of all font -% characteristics, separated by forward slashes, \ie, -%`|font|\,=\,\meta{encoding}|/|\meta{family}|/|\meta{series}|/|\meta{shape}|/|\meta{size}'. +% attributes, separated by forward slashes, \ie, +%`|font|\,|=|\,\meta{encoding}|/|\meta{family}|/|\meta{series}|/|\meta{shape}|/|\meta{size}'. % This allows you to add fonts to the set that are otherwise disjunct from it. % For instance, if you wanted to have the roman family in all sizes protruded, % but only the normal sized, possibly italic, typewriter font (in contrast to, % say, the small one), this is how you could declare the set: +%\pagebreak ^^A layout %{\lstset{deletekeywords=[1]{protrusion}} %\begin{verbatim} -%\DeclareMicrotypeSet* +%\DeclareMicrotypeSet % [ protrusion ] % { myset } % { encoding = T1, @@ -997,46 +1029,48 @@ % %\begin{table}\small %\caption{Predefined font sets}\label{tab:predefined-font-sets} -%\begin{tabular}{@{}L{65pt}L{74pt}*3{L{43pt}}L{67pt}@{}} -%\ifbooktabs\toprule\else\hline\fi +%\begin{tabular}{@{}L{65pt}L{80pt}*3{L{41pt}}L{67pt}@{}} +%\toprule % \footnotesize Set name -% & \multicolumn{5}{l}{\footnotesize Font attributes}\\ -%\ifbooktabs\cmidrule{2-6}\fi +% & \multicolumn{5}{l}{\footnotesize Font attributes}\\ +%\cmidrule{2-6} % & \footnotesize Encoding % & \footnotesize Family % & \footnotesize Series % & \footnotesize Shape % & \footnotesize Size\\ -%\ifbooktabs\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3} -% \cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule{6-6}\else\hline\fi +%\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3} +%\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule{6-6} % |all| % & -- % & -- % & -- % & -- % & -- \\ -%\ifbooktabs\cmidrule(r){1-1}\fi +%\cmidrule(r){1-1} % |alltext|\linebreak\linebreak(|allmath|) -% & \fontsize{8}{11}\selectfont \otI, \tI, \lyI,\linebreak \otIV, \tV, \tsI\linebreak (\oml, \oms, \U) +% & <OT1>, <T1>, <LY1>, <OT4>,\linebreak <QX>, <T5>, <TS1> +% \linebreak (<OML>, <OMS>, <U>) % & -- % & -- % & -- % & -- \\ -%\ifbooktabs\cmidrule(r){1-1}\fi +%\cmidrule(r){1-1} % |basictext|\linebreak\linebreak(|basicmath|) -% & \fontsize{8}{11}\selectfont \otI, \tI, \lyI,\linebreak \otIV, \tV\linebreak (\oml, \oms) +% & <OT1>, <T1>, <LY1>, <OT4>,\linebreak <QX>, <T5> +% \linebreak (<OML>, <OMS>) % & |\rm*|,\linebreak |\sf*| -% & m +% & |\md*| % & -- % & \cmd{\normalsize}, \cmd{\footnotesize}, \cmd{\small}, \cmd{\large} \\ -%\ifbooktabs\cmidrule(r){1-1}\fi +%\cmidrule(r){1-1} % |normalfont| % & |\encoding*| % & |\family*| % & |\series*| % & |\shape*| % & |\normalsize| \\ -%\ifbooktabs\bottomrule\else\hline\fi +%\bottomrule %\end{tabular} % \vskip8pt % `|*|' = `|default|' @@ -1057,21 +1091,21 @@ %\Describe{Macro}{\UseMicrotypeSet}{?features,set name} % This command activates a font set previously declared by \cs{DeclareMicrotypeSet}. % Using the optional argument, you can limit the application of the set to -% one or more features. +% one or more features. This command only has an effect if the feature has been +% activated in the package options. % %\bigskip %\Describe{Macro}{\DeclareMicrotypeSetDefault}{?features,set name} -% If the package has been loaded without activating any font sets in the package -% options, the sets declared by this command will be activated (provisionally). -% By default, the `|basictext|' font set will be used for font expansion, the -% `|alltext|' set for character protrusion. +% If the package has been loaded without activating any font sets, the sets +% declared by this command will be activated. By default, the `|alltext|' font +% set will be used for character protrusion\ifbeta\space and additional +% kerning\fi, the `|basictext|' set for font expansion\ifbeta\space and +% interword spacing\fi. % %\bigskip\noindent -% This command will only have an effect inside the main configuration file (cf. -% section~\ref{sub:config-file}). The commands \cs{DeclareMicrotypeSet} and -% \cs{UseMicrotypeSet} may only be used in the preamble or in the main -% configuration file. Their scope is global to the document. Only one set per -% feature may be activated. +% These commands may only be used in the preamble or in the main configuration +% file. Their scope is global to the document. Only one set per feature may be +% activated. % % %\section{Micro Fine Tuning}\label{sec:fine-tuning} @@ -1091,13 +1125,13 @@ %\SetProtrusion % { encoding = T1, % family = cmr } -% { A = { 50, 50}, -% \textquoteleft = {700, } } +% { A = {50,50}, +% \textquoteleft = {700, } } %\end{verbatim} % which would result in the character `A' being protruded by 5\% of its width on % both sides, and the left quote character by 70\% of its width into the left % margin. This would apply to all font shapes, series and sizes of the Computer -% Modern Roman family in encoding~\tI. +% Modern Roman family in encoding~<T1>. % %\paragraph{The protrusion settings} % consist of \meta{character}\,|=|\,\meta{protrusion factors} pairs. @@ -1105,12 +1139,13 @@ % The \meta{characters} may be specified either as a single character (`|A|'), % as a text symbol command (`\cmd{\textquoteleft}'), or as a slot number: three % digits for decimal notation, prefixed with~|"| for hexadecimal, with~|'| for -% octal (\eg, the `fl' ligature in \tI\ encoding:~|029|, |"1D|, |'35|). -% \mbox{8-bit} characters may be entered directly or in the \LaTeX\ -% \mbox{7-bit} way of defining them: both |Ä| and |\"A| are valid, provided the -% character is actually included in the encoding(s). You also have the -% possibility to declare lists of characters that should inherit protrusion or -% expansion factors (see section~\ref{sub:inherit}). +% octal (\eg, the `fl' ligature in <T1> encoding:~|029|, |"1D|, |'35|). +% \mbox{8-bit} (and even <UTF-8>) characters may be entered directly or in +% \LaTeX's traditional \mbox{7-bit} notation: both |\"A| and \expandafter|\"A| +% are valid, provided the character is actually declared in both the input and +% the font encoding. You also have the possibility to declare lists of +% characters that should inherit protrusion or expansion factors (see +% section~\ref{sub:inherit}). % % The \meta{protrusion factors} designate the amount that a character should be % protruded into the left margin (first value) respectively into the right @@ -1125,7 +1160,9 @@ %\paragraph{The set of fonts} % to which the settings should apply is declared using the same syntax of % \meta{font axis}\,|=|\,\meta{value list} pairs as for the command -% \cs{DeclareMicrotypeSet}. +% \cs{DeclareMicrotypeSet} (see section~\ref{sec:font-sets}). The only +% difference is that asterisked values will be expanded immediately instead of +% at the end of the preamble. % %\changes{v1.7}{2005/03/23}{remove table of match order} % To find the matching settings for a given font the package will try all @@ -1138,35 +1175,36 @@ % page~\pageref{tab:match-order} presents the exact order.} % The encoding must always match. % +%\ifcharter\else\enlargethispage\baselineskip\fi ^^A layout %\paragraph{Options:} %\begin{options} -% \item[\Key{name}] You may assign a name to the protrusion settings, so that you +% \item[\key{name}] You may assign a name to the protrusion settings, so that you % are able to load it by another list. -% \item[\Key{load}] You can load another list (provided, you previously assigned +% \item[\key{load}] You can load another list (provided, you previously assigned % a name to it) before the current list will be loaded, so that the % fonts will inherit the values from the loaded list.\par % Thus, the configuration may be simplified considerably. You can for % instance create a default list for a font; settings for other shapes % or series can then load these settings, and extend or overwrite them % (since the value that comes last will take precedence). Font settings -% will be loaded recursively.\par +% will be loaded recursively. % The following options will affect all loaded lists: %\changes{v1.8}{2005/06/23}{add example for \texttt{factor} option} -% \item[\Key{factor}] This option can be used to influence all protrusion +% \item[\key{factor}] This option can be used to influence all protrusion % factors of the list, overriding any global \opt{factor} setting (see % section~\ref{sub:options-protrusion}). For instance, if you want fonts % in larger sizes to be protruded less, you could load the normal lists % with a different factor applied to them: %\begin{verbatim} %\SetProtrusion -% [ load = cmr-T1, -% factor = 700 ] +% [ factor = 700 +% load = cmr-T1 ] % { encoding = T1, % family = cmr, % size = large- } % { } %\end{verbatim} -% \item[\Key{unit}] By default, the protrusion factors are relative to the +% \item[\key{unit}] By default, the protrusion factors are relative to the % respective character's width. The |unit| option may be used to override % this and make \microtype\ regard all values in the list as thousandths % of the specified width. Issuing, for instance, `|unit=1em|' would have @@ -1177,13 +1215,13 @@ % The |unit| option can even be passed globally to the package. % However, all provided settings are created under the assumption % that the values are relative to the character width. Therefore, you -% should only ask for a different \opt{unit} if you are certain that -% none of the default settings will be used in your document.} -% \item[\Key{preset}] Presets the protrusion codes of all characters to the +% should only change it if you are certain that the +% default settings will not be used in your document.} +% \item[\key{preset}] Presets the protrusion codes of all characters to the % specified values (|={|\meta{left}|,|\meta{right}|}|), possibly % scaled by a |factor|. A |unit| setting will only be taken into account % if it is not |=character|. -% \item[\Key{context}] The scope of the list may be limited to a certain +% \item[\key{context}] The scope of the list may be limited to a certain % context. For an example application, see section~\ref{sec:context}. %\end{options} % @@ -1199,7 +1237,7 @@ % the expansion settings will be ignored. % %\paragraph{The expansion settings} -% consist of \meta{character}\,=\,\meta{expansion factor} pairs. +% consist of \meta{character}\,|=|\,\meta{expansion factor} pairs. % % You may specify one number for each character, which determines the amount % that a character may be expanded. The numbers denominate thousandths of the @@ -1215,37 +1253,39 @@ %\paragraph{The set of fonts} % is declared in the same way as for \cs{SetProtrusion}. % -%\ifbeta\pagebreak\fi ^^A layout %\paragraph{Options:} %\begin{options} -% \item[\Key{name}, \Key{load}, \Key{preset}, \Key{context}] +% \item[\key{name}, \key{load}, \key{preset}, \key{context}] % Analogous to \cs{SetProtrusion}, the optional argument may be used to % assign a name to the list, to load another list, to preset all % expansion factors, or to determine the context of the list. -%\changes{v1.8}{2005/06/23}{add example of how to get rid of a widow} -% \item[\Key{auto}, \Key{stretch}, \Key{shrink}, \Key{step}] +%\changes{v1.8}{2005/04/12}{add example of how to get rid of a widow +% (suggested by \contributor Adam Kucharczyk <adamk\at ijp-pan.krakow.pl>)} +% ^^A private mail, 09/04/2004 +% \item[\key{auto}, \key{stretch}, \key{shrink}, \key{step}] % These keys can be used to override the global settings from the package -% options (see section~\ref{sub:options-expansion}). If you don't -% specify either one of |stretch|, |shrink| and |step|, their respective -% global value will be used (that is, no calculation will take place). +% options (see section~\ref{sub:options-expansion}). If you don't specify +% either one of |stretch|, |shrink| and |step|, their respective global +% value will be used (that is, no calculation will take place). % % As a practical example, suppose you have a paragraph containing a widow % that could easily be avoided by shrinking the font a little bit more. -% You could take advantage of the |stretch| and |shrink| options to -% allow for more expansion in this particular paragraph. There is one -% problem that has to be worked around, however: \pdftex\ prohibits the -% use of the same font with different expansion parameters. If you do -% not want to create a clone of the font setup (this would require -% duplicating the \file{tfm}/\file{vf} files under a new name, and -% writing new \file{fd} files and \file{map} entries), you could exploit -% a dirty trick and load a minimally larger font for the paragraph in -% question. E.\,g., for a document printed in 10pt:\footnote{ +% You could take advantage of the |stretch| and |shrink| options to allow +% for more expansion in this particular paragraph. There is one problem +% that has to be worked around, however: \pdftex\ prohibits the use of +% the same font with different expansion parameters. If you do not want +% to create a clone of the font setup (this would require duplicating the +% \file{tfm}/\file{vf} files under a new name, and writing new \file{fd} +% files and \file{map} entries), you could exploit a dirty trick and load +% a minimally larger font for the paragraph in question. E.\,g., for a +% document typeset in 10pt:\footnote{ % Note that the \cmd{\expandpar} command can only be applied to % complete paragraphs. If you are using Computer Modern Roman, you % have to load the \pkg{fix-cm} package to be able to select fonts % in arbitrary sizes. Finally, the reason I suggest to use a larger % font, and not a smaller one, is to prevent a different design size % being selected.} +%\pagebreak ^^A layout %{\lstset{gobble=2} %\begin{verbatim} % \SetExpansion @@ -1254,18 +1294,19 @@ % { encoding = *, % size = 10.001 } % { } -% \newcommand{\expandpar}[1] -% {{\fontsize{10.001}{\baselineskip}\selectfont #1}} +% \newcommand{\expandpar}[1]{{% +% \fontsize{10.001}{\baselineskip}\selectfont #1}} % % ... % \expandpar{This paragraph contains an `unnecessary' widow.} %\end{verbatim}} -% \item[\Key{factor}] +% \item[\key{factor}] % This option provides a different method to alter expansion settings for % certain fonts, working around another restriction of \pdftex: It does -% not allow different expansion limits or steps within one paragraph. -% The |factor| option influences the expansion factors of all characters -% (in contrast to the overall stretchability) of the font. For instance, -% if you want the italic shape to be expanded less, you could declare: +% not allow different expansion limits or steps (even of different fonts) +% within one paragraph. The |factor| option influences the expansion +% factors of all characters (in contrast to the overall stretchability) +% of the font. For instance, if you want the italic shape to be expanded +% less, you could declare: %\begin{verbatim} %\SetExpansion % [ factor = 500 ] @@ -1298,14 +1339,13 @@ % %\Describe{Macro}{\SetExtraSpacing}{?options,set of fonts,spacing settings} % This command allows you to fine tune the interword spacing (also known as -% glue). A preliminary remark about what a `space' is may be in order: Between -% two words, \TeX\ will insert a so called glue, which is characterized by -% three parameters -- the normal distance between two words, the maximum amount -% that this distance may be stretched, and the maximum amount that it may be -% shrunk. The latter two parameters come into effect whenever \TeX\ tries to -% break a paragraph into lines and does not succeed; it can then stretch or -% shrink the spaces between words. These three parameters are specific to each -% font. +% glue). A preliminary remark on what a `space' is may be in order: Between two +% words, \TeX\ will insert a so called glue, which is characterized by three +% parameters -- the normal distance between two words, the maximum amount of +% space that may be added to it, and the maximum amount that may be subtracted. +% The latter two parameters come into effect whenever \TeX\ tries to break a +% paragraph into lines and does not succeed; it can then stretch or shrink the +% spaces between words. These three parameters are specific to each font. % % On top of these glue dimensions, \TeX\ has the concept of `space factors'. % They may be used to increase the space after certain characters, most @@ -1314,7 +1354,7 @@ % considered an extension to space factors with much finer control. % %\paragraph{The spacing settings} -% are declared as pairs of \meta{character}\,=\,\meta{spacing factors}, where +% are declared as pairs of \meta{character}\,|=|\,\meta{spacing factors}, where % the latter consist of three numbers: first, the additional kern inserted % after this character if it appears before an interword space, second, the % additional stretch amount, and third, the additional shrink amount. All @@ -1326,14 +1366,15 @@ % %\paragraph{Options:} %\begin{options} -% \item[\Key{name}, \Key{load}, \Key{factor}, \Key{context}] +% \item[\key{name}, \key{load}, \key{factor}, \key{context}] % These options serve the same function as in the previous configuration % commands. -% \item[\Key{unit}] Like in \cs{SetProtrusion}, you can specify the unit by which +% \item[\key{unit}] Like in \cs{SetProtrusion}, you can specify the unit by which % the specified numbers are measured. Possible values are: |character|, a % \meta{dimension} and, additionally, |space|. The latter will measure the -% values in thousandths of the respective space dimension set by the -% font. For example, with these settings: +% values in thousandths of the respective space dimension set by the font. +% By default, the unit is measured by the space dimensions. For example, +% with these settings: %\begin{verbatim} %\SetExtraSpacing % [ unit = space ] % default @@ -1343,26 +1384,27 @@ % } %\end{verbatim} % the space inserted after a full stop would be doubled (technically -% speaking: 2\,\texttimes\ \cmd{\fontdimen}\,2), as well as the maximum -% stretch amount and the maximum shrink amount of the interword space -% (\cmd{\fontdimen}\,3 and \cmd{\fontdimen}\,4). As another example, -% setting all three value to |-1000| would completely cancel a space after -% the respective character. By default, the unit is measured by the space -% dimensions. -% \item[\Key{preset}] Preset all characters to the specified three values, -% possibly scaled by a |factor|, and relative to the |unit|. +% speaking: 2\,\texttimes\ \fontdim2), as well as the maximum stretch +% amount and the maximum shrink amount of the interword space (\fontdim3 +% and \fontdim4). As another example, setting all three value to |-1000| +% would completely cancel a space after the respective character. +% \item[\key{preset}] Preset all characters to the specified three values, +% possibly scaled by a |factor|, and measured by a given |unit| (except +% |character|). %\end{options} % -% +%\pagebreak ^^A layout %\subsection{Additional Kerning}\label{sub:kerning} % %\Describe{Macro}{\SetExtraKerning}{?options,set of fonts,kerning settings} % Fine tune the additional kerning. In contrast to standard kerning, which % is always associated with a \emph{pair} of characters, the additional kerning -% relates to single characters. +% relates to single characters, that is, whenever that character appears in the +% text, the specified kerning will be inserted, regardless of which character +% precedes resp. follows it. % %\paragraph{The kerning settings} -% are specified as pairs of \meta{character}\,=\,\meta{kerning values}, where +% are specified as pairs of \meta{character}\,|=|\,\meta{kerning values}, where % the latter consist of two values: the kerning added before the character, and % the kerning appended after the respective character. Once again, either value % may be omitted, but not the separating comma. @@ -1371,19 +1413,17 @@ % %\paragraph{Options:} %\begin{options} -% \item[\Key{name}, \Key{load}, \Key{factor}] +% \item[\key{name}, \key{load}, \key{factor}, \key{preset}] % These options serve the same function as in the previous configuration % commands. -% \item[\Key{unit}] Admissible values are: |space|, |character| and a +% \item[\key{unit}] Admissible values are: |space|, |character| and a % \meta{dimension}. By default, the values are relative to 1em. -% \item[\Key{context}] When it comes to kerning settings, this option is +% \item[\key{context}] When it comes to kerning settings, this option is % especially useful, since it allows to apply settings depending on the -% current language. -% \item[\Key{preset}] Preset all characters to the specified values. +% current language (see section~\ref{sec:context}). %\end{options} %\betaend % -% %\subsection{Character Inheritance}\label{sub:inherit} % % \Describe{Macro}{\DeclareCharacterInheritance} @@ -1392,11 +1432,11 @@ % expansion factors from the respective base character. For example, all of the % characters \`A, \'A, \^A, \~A, \"A, \r{A} and \u{A} should probably be % protruded by the same (absolute) amount as the character A. Using the command -% \cs{DeclareCharacterInheritance}, you may declare such lists of characters, -% so that you then only have to set up the base characters. With the optional -% argument, which may contain a comma-separated list of features, you may -% confine the scope of the list. The font set can be declared in the usual way, -% with the only exception that you must specify exactly one encoding. The +% \cs{DeclareCharacterInheritance}, you may declare such classes of characters, +% so that you then only have to set up the respective base character. With the +% optional argument, which may contain a comma-separated list of features, you +% can confine the scope of the list. The font set can be declared in the usual +% way, with the only exception that exactly one encoding must be specified. The % inheritance lists are to be declared as pairs of \meta{base % character}\,|=|\,\meta{list of inheriting characters}. Unless you are using a % different encoding or a very peculiarly shaped font, there should be no need @@ -1418,84 +1458,78 @@ % % If you are embarking on creating new expansion and protrusion settings for a % font family, you should put them into a separate file, whose name must be: -% `|mt-|\meta{font family}|.cfg|' (\eg\ `\file{mt-pad.cfg}'), and may contain -% the commands \cs{SetProtrusion}, \cs{SetExpansion} and -% \cs{DeclareCharacterInheritance}. These files will be loaded automatically if -% you are actually using the respective fonts. If the font name consists of -% four characters, the package will also try to find the file for the base font -% family by removing the suffix denoting the sub-family, so that you may put -% settings for the fonts |padx| (expert set), |padj| (oldstyle numerals) and -% |pad| (plain) into one and the same file. +% `|mt-|\meta{font family}|.cfg|' (\eg, `\file{mt-pad.cfg}'), and may contain +% all commands described in the current section~\ref{sec:fine-tuning}. These +% files will be loaded automatically if you are actually using the respective +% fonts. If the font name consists of four characters, the package will also +% try to find the file for the base font family by removing the suffix denoting +% the sub-family, so that you may put settings for the fonts |padx| (expert +% set), |padj| (oldstyle numerals) and |pad| (plain) into one and the same +% file. % %\changes{v1.6a}{2005/02/02}{add table of fonts with tailored protrusion settings} -%\begin{table}\small +%\begin{table}[t]\small +%\caption{Fonts with tailored protrusion settings}\label{tab:fonts} %\begin{minipage}{\textwidth} %\def\arraystretch{1.2} %\let\footnoterule\relax -%\def\fnref#1{\textsuperscript{\itshape#1}} -%\settowidth{\dimen0}{(} -%\def\p{\hskip\dimen0} -%\caption{Fonts with tailored protrusion settings}\label{tab:fonts} -%\begin{tabular}{@{}L{170pt}L{31pt}L{75pt}*2{L{31pt}}@{}} -%\ifbooktabs\toprule\else\hline\fi -% \footnotesize Font family (\nfss\ code) -% & \multicolumn{4}{l}{\footnotesize Features} \\ -%\ifbooktabs\cmidrule{2-5}\fi -% & \footnotesize Series -% & \footnotesize Shapes -% & \footnotesize \tsI -% & \footnotesize Math \\ -%\ifbooktabs\cmidrule(r){1-1}\cmidrule(r){2-2} -% \cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule{5-5}\else\hline\fi +%\def\fnref#1{\textsuperscript{\itshape\ifpdf\ref*{#1}\else\ref{#1}\fi}} +%\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*3l@{}} +%\toprule +% \footnotesize Font family (<NFSS> code) +% & \multicolumn{2}{l}{\footnotesize Features}\\ +%\cmidrule{2-3} +% & \footnotesize Encodings +% & \footnotesize Shapes\\ +%\cmidrule{1-1}\cmidrule{2-2}\cmidrule{3-3} % Generic -% & m -% & n, (it, sl, sc)\footnote{Incomplete} -% & (\match)\fnref{a}\\ -% Computer Modern Roman (|cmr|)\footnote{Also used for: -% Latin Modern (|lmr|), \pkg{ae} (|aer|), \pkg{zefonts} (|zer|), -% \pkg{eco} (|cmor|), \pkg{hfoldsty} (|hfor|)} -% & m -% & n, it, sl, sc -% & \p\match -% & \p\match \\ -% Bitstream Charter (|bch|) -% & m -% & n, it, (sl)\footnote{Settings inherited from italic shape}, sc -% & \p\match \\ +% & <OT1>, <T1>, <LY1>, <QX>, (<TS1>)\footnote{Incomplete\label{fn:incmpl}} +% & n, (it, sl, sc)\fnref{fn:incmpl} \\ +% Computer Modern Roman (|cmr|)\footnote{Aliases: Latin Modern (|lmr|), +% \pkg{ae} (|aer|), \pkg{zefonts} (|zer|), +% \pkg{eco} (|cmor|), \pkg{hfoldsty} (|hfor|)} +% & <OT1>, <OT4>, <T1>, <T5>, <LY1>, <TS1> +% & n, it, sl, sc \\ +% Bitstream Charter (|bch|)\footnote{Alias: \pkg{mathdesign}/Charter (|mdbch|)} +% & <OT1>, <T1>, <T5>, <LY1>, <TS1> +% & n, it, (sl)\footnote{Settings inherited from italic shape\label{fn:it-sl}}, sc \\ % Adobe Garamond (|pad|, |padx|, |padj|) -% & m -% & n, it, (sl)\fnref{c}, sc -% & \p\match \\ +% & <OT1>, <T1>, <LY1>, <TS1> +% & n, it, (sl)\fnref{fn:it-sl}, sc \\ +% <URW> Garamond (|ugm|)\footnote{Alias: \pkg{mathdesign}/<URW> Garamond (|mdugm|)} +% & <OT1>, <T1>, <TS1> +% & n, it\\ % Adobe Minion (|pmnx|, |pmnj|) -% & m -% & n, it, (sl)\fnref{c}, sc, si -% & \p\match \\ -% Palatino (|ppl|, |pplx|, |pplj|)\footnote{Also used for: \pkg{pxfonts} (|pxr|), +% & <OT1>, <T1>, <LY1>, <TS1> +% & n, it, (sl)\fnref{fn:it-sl}, sc, si \\ +% Palatino (|ppl|, |pplx|, |pplj|)\footnote{Aliases: \pkg{pxfonts} (|pxr|), % \pkg{qfonts}/QuasiPalatino (|qpl|)} -% & m -% & n, it, (sl)\fnref{c}, sc -% & (\match)\fnref{a} \\ -% Times (|ptm|, |ptmx|, |ptmj|)\footnote{Also used for: \pkg{txfonts} (|txr|), +% & <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 (|qtm|)} -% & m -% & n, it, (sl)\fnref{c}, sc -% & (\match)\fnref{a} \\ -% \ams\ math fonts (|msa|, |msb|, |euf|, |eus|) -% & m -% & n -% & -% & \p\match \\ -%\ifbooktabs\bottomrule\else\hline\fi -%\end{tabular} +% & <OT1>, <OT4>, <T1>, <LY1>, <QX>, (<TS1>)\fnref{fn:incmpl} +% & n, it, (sl)\fnref{fn:it-sl}, sc \\ +% Computer Modern math fonts (|cmsy|, |cmm|) +% & <OML>/<OMS> +% & n/it \\ +% <AMS> math fonts (|msa|, |msb|, |euf|, |eus|) +% & <U> +% & n\\ +% Euro fonts (Adobe, <ITC>, Marvosym) +% & <U>/<OT1> +% & n, it \\ +%\bottomrule +%\end{tabular*} %\end{minipage} %\end{table} % % This package ships with configuration files for the font families Computer -% Modern Roman, Palatino, the inescapable Times, Adobe Garamond and -% Minion\footnote{ +% Modern Roman, Palatino, the inescapable Times, <URW> Garamond, Adobe Garamond +% and Minion\footnote{ % By courtesy of Harald Harders (\mailto{h.harders@tu-bs.de}).}, -% for Bitstream Charter and the \ams\ math fonts. -% Table~\ref{tab:fonts} lists them all. +% for Bitstream Charter, the <AMS> math fonts and Euro symbols fonts (Adobe, +% <ITC> and Marvosym). Table~\ref{tab:fonts} lists them all. % % If you have created a file for another font and you are willing to share, % don't hesitate to send it to me so that it can be included in future releases @@ -1513,10 +1547,9 @@ %\end{verbatim} % which would make the package, whenever it encounters the font |lmr| and does % not find settings for it, also try the font |cmr|. In fact, you will find -% this very line in the default configuration file, along with others for the -% virtual fonts provided by the packages \pkg{ae}, \pkg{zefonts}, \pkg{eco} and -% \pkg{hfoldsty}. +% this very line, along with some others, in the default configuration file. % +%\ifbeta\else\pagebreak\fi ^^A layout %\bigskip %\Describe{Macro}{\LoadMicrotypeFile}{font name} % In rare cases, it might be necessary to load a font configuration file @@ -1529,89 +1562,57 @@ % This command will load the file |mt-|\meta{font name}|.cfg|. % % -%\pagebreak ^^A layout -%\section{Disabling Ligatures}\label{sec:disable-ligatures} -% -%\Describe{Macro}{\DisableLigatures}{set of fonts} -% A new feature has been introduced with \pdftex\ 1.30: The possibility to -% completely disable all ligatures of a font (which will also switch off -% kerning). While this purposely \textit{lowers} the micro-typographic quality -% instead of raising it, it is especially useful for typewriter fonts, so that, -% \eg, in a \tI\ encoded font, `|\texttt{--}|' will indeed be printed as -% `|--|', not as `\texttt{--}'. \cs{DisableLigatures} may be used to specify, -% in the usual way, a set of fonts for which ligatures should be disabled, for -% example, of the typewriter font in \tI\ encoding: -%\begin{verbatim} -%\DisableLigatures{encoding = T1, family = tt* } -%\end{verbatim} -% -% -%\betastart -%\section{Letterspacing}\label{sec:lettersp} -% -%\Describe{Macro}{\textls}{?amount,general text} -%\DescribeMacro{\lsstyle} -% Until recently, it has been quite difficult to achieve letterspacing with -% \TeX.\footnote{^^A -% Many renowned typographers would have praised \TeX\ for this difficulty, -% since `he who would letterspace lower-case text, would steal sheep' -% (credited, among others, to Eric Gill). To learn more about the pros and -% cons of letterspacing, I suggest to read the documentation of the -% \cite{soul} package.} -% The most robust solution is provided by the \cite{soul} package; however, it -% can still fail in certain circumstances. Employing \pdftex's new extension of -% additional kerning, letterspacing is now entirely robust, since the extra -% kerning will be inserted on the typesetting level, not on the macro level. In -% contrast to the \pkg{soul} implementation, there are two major differences: -% Firstly, the downside: hyphenation will be suppressed (this restriction will -% hopefully be lifted some day). Secondly, ligatures will not be broken up, -% which is usually typographically correct. If this is not desired, you can -% split the ligatures with a pair of braces |{}| between them. -% -% By default, the text will be spaced out by 0.1em on both sides of every -% character; this amount may altered in the optional argument to \cs{textls} or -% globally with the \opt{letterspacing} package option (see -% section~\ref{sub:options-misc}). You may also fine tune the kerning for each -% character by defining a list for the |letterspacing| context. The default -% declarations can be found in the main configuration file. Improvements are -% welcome. -% -% Font switches inside \cs{textls} may lead to undesired results, therefore you -% should start a new letterspacing group when changing to a different font. -%\betaend -% +%\section{Context-sensitive Setup}\label{sec:context} % -%\section{Context-sensitive setup}\label{sec:context} -% -% In previous versions of \microtype, each font was set up exactly once for -% the entire document. Since version 1.9, it is possible to apply different -% settings to a font depending on the context it appears in. +% The \microtype\ package also allows to apply different micro-typographic +% settings to the fonts depending on the context they occur in. This opens up +% the space for infinite possibilities of tweaking the document's appearance. % %\bigskip -%\Describe{Macro}{\microtypecontext}{key=value list} +%\Describe{Macro}{\microtypecontext}{context assignments} % This command may be used anywhere in the document (also in the preamble) to -% change the micro-typographic context. For each feature (\Key{protrusion}, -% \Key{expansion}\ifbeta, \Key{spacing} and \Key{kerning}\fi), one context may -% be specified. Only settings which have been specified with the corresponding -% `|context|' keyword will then be applied. This makes it possible to use -% different settings for different parts of the document.\ifbeta\else\footnote{ -% This feature is especially useful for the new experimental extensions of -% \pdftex: adjustment of interword spacing (glue) and the possibility to -% specify additional character kerning. The former may improve the appearance -% of the text even more, the latter allows for instance to insert small -% spaces before certain characters (\eg, for typesetting in the French -% tradition) without having to use active characters; also, letterspacing can -% be implemented in a robust way. Currently, these extensions are only -% available through patches from \url{http://pdftex.sarovar.org/}. However, -% if you are adventurous, know how to apply the patches and you are able to -% compile \pdftex\ yourself, you can easily experiment with them, since -% \microtype\ already supports these new extensions. To generate the extended -% version of the \microtype\ package and its documentation, simply remove the -% comments before `\texttt{\textbackslash betatrue}' near the beginning of -% \file{microtype.ins} and \file{microtype.dtx}.\label{fn:beta}}\fi +% change the micro-typographic context. To each feature (\key{protrusion}, +% \key{expansion}\ifbeta, \key{spacing} and \key{kerning}\fi), one context may +% be assigned. Consequently, only settings which have been specified with the +% corresponding `|context|' keyword will be applied. +% +%\changes{v1.9c}{2006/01/25}{add example of how to increase protrusion of footnote markers +% (suggested by \contributor Georg Verweyen <verweyen\at gmail.com>)} +% ^^A private mail, 25/01/2006 +% Suppose you want the footnote markers in the text to be protruded by a larger +% amount. You could define settings for the numbers: +%\begin{verbatim} +%\SetProtrusion +% [ context = footnotes ] +% { font = */*/*/*/scriptsize } % adapt if necessary +% { 1 = { ,650}, 2 = { ,400}, 3 = { ,400}, 4 = { ,400}, 5 = { ,400}, +% 6 = { ,400}, 7 = { ,500}, 8 = { ,400}, 9 = { ,400}, 0 = { ,400} } +%\end{verbatim} +% and have \microtype's context changed by the footnote marker command. This +% command differs among the various classes, here are some examples: for the +% base \LaTeX\ classes, \eg, \pkg{article}: +%\ifbeta\pagebreak\fi ^^A layout +%\begin{verbatim} +%\newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont +% \microtypecontext{protrusion=footnotes}\@thefnmark}}} +%\renewcommand*\@footnotemark{% +% \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi +% \new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax} +%\end{verbatim} +% For the \pkg{memoir} class, you would additionally have to disable +% auto-detection of multiple footnotes, which prevents protrusion: +%\begin{verbatim} +%\renewcommand*\@makefnmark{\hbox{\@textsuperscript{\normalfont +% \microtypecontext{protrusion=footnotes}\@thefnmark}}} +%\let\m@mmf@prepare\relax +%\let\m@mmf@check\relax +%\end{verbatim} +% For other classes, the command would have to be changed in a similar way. % %\betastart -% For instance, if you are writing a text in French, you could add +%\bigskip\noindent +% Another possibility would be to employ contexts for a language-dependent +% setup. For instance, if you are writing a text in French, you could add: %\begin{verbatim} %\microtypecontext{kerning=french} %\end{verbatim} @@ -1650,6 +1651,57 @@ %\betaend % % +%\section{Disabling Ligatures}\label{sec:disable-ligatures} +% +%\Describe{Macro}{\DisableLigatures}{set of fonts} +% A new feature has been introduced with \pdftex\ 1.30: The possibility to +% completely disable all ligatures of a font (which will also switch off +% kerning for this font). While this purposely \textit{lowers} the +% micro-typographic quality instead of raising it, it is especially useful for +% typewriter fonts, so that, \eg, in a <T1> encoded font, `|\texttt{--}|' will +% indeed be printed as `|--|', not as `\texttt{--}'. \cs{DisableLigatures} may +% be used to specify, in the usual way, a set of fonts for which ligatures +% should be disabled, for example, of the typewriter font in <T1> encoding: +%\begin{verbatim} +%\DisableLigatures{encoding = T1, family = tt* } +%\end{verbatim} +% +% +%\betastart +%\section{\textls[50]{Letterspacing}}\label{sec:lettersp} +% +%\Describe{Macro}{\textls}{?amount,general text} +%\DescribeMacro{\lsstyle} +% Until recently, it has been quite difficult to achieve letterspacing with +% \TeX.\footnote{ +% Many renowned typographers would have praised \TeX\ for this difficulty, +% since `he who would letterspace lower-case text, would steal sheep' +% (credited, among others, to Eric Gill). To learn more about the pros and +% cons of letterspacing, I suggest to read the documentation of the +% \cite{soul} package.} +% The most robust solution is provided by the \cite{soul} package; however, it +% can still fail in certain circumstances. Employing \pdftex's new extension of +% additional kerning, letterspacing is now entirely robust, since the extra +% kerning will be inserted on the typesetting level, not on the macro level. In +% contrast to the \pkg{soul} implementation, there are two major differences: +% Firstly, the downside: hyphenation will be suppressed (this restriction will +% hopefully be lifted some day). Secondly, ligatures will not be broken up, +% which is usually typographically correct. If this is not desired, you can +% split the ligatures with a pair of braces |{}| between them. +% +% By default, the text will be spaced out by 0.1em on both sides of every +% character; this amount may be altered in the optional argument to \cs{textls} +% or globally with the \opt{letterspacing} package option (see +% section~\ref{sub:options-misc}). You may also fine tune the kerning for each +% character by defining settings for the |letterspacing| context. The default +% declarations can be found in the main configuration file. Improvements are +% welcome. +% +% Font switches inside \cs{textls} may lead to undesired results, therefore you +% should start a new letterspacing group when changing to a different font. +%\betaend +% +% %\section{Hints and Caveats}\label{sec:caveats} % %\paragraph{Use settings that match your font.} @@ -1673,7 +1725,7 @@ % Multiple Master font, you may set expansion limits to up to 4\%. % %\paragraph{Don't use font expansion for web documents.} -% Because each expanded instance of the font will be embedded in the \pdf\ file, +% Because each expanded instance of the font will be embedded in the <PDF> file, % the file size may increase by quite a large factor (depending on expansion % limits and step). Therefore, courtesy and thriftiness of bandwidth command it % not to enable font expansion when creating files to be distributed @@ -1682,84 +1734,105 @@ %\betastart %\paragraph{Only employ kerning adjustment if it is customary in the language's %typographic tradition.} -% In contrast to protrusion, expansion and spacing adjustment, kerning -% adjustment does not unconditionally improve the micro-typographical quality -% of your document. You should only switch it on if you are writing a document -% in a language, whose typographic tradition warrants such kerning. If you are, -% for example, writing an English text, your readers would probably be rather -% confused by any additional spaces before the punctuation characters. +% In contrast to protrusion and expansion (and possibly adjustment of interword spacing), +% kerning adjustment does not unconditionally improve the micro-typographical +% quality of your document. You should only switch it on if you are writing a +% document in a language, whose typographic tradition warrants such kerning. If +% you are, for example, writing an English text, your readers would probably be +% rather confused by any additional spaces before the punctuation characters. %\betaend % %\changes{v1.7}{2005/03/23}{add hint about compatibility} %\paragraph{Compatibility.} % The package should work happily together with all other \LaTeX\ packages % (except \pkg{pdfcprot}). However, life isn't perfect, so problems are to be -% expected. Currently, you should be aware of the following issues concerning -% the loading order of packages: +% expected. Currently, I am aware of the following issues: %\begin{itemize} -% \item All packages that change the default fonts and encodings (\eg\ -% \pkg{mathpazo}, \pkg{fontenc}) should be loaded before \microtype, so -% that variables used in the configuration file (\eg\ `|rm*|' for -% \cmd{\rmdefault}) don't expand to a different value than in the body of -% the document (as explained in section~\ref{sec:font-sets}). -% \item When using 8-bit characters in the configuration, \pkg{inputenc} must -% be loaded first. Unicode input in the configuration is currently not -% supported. -% \item The \pkg{CJK} package must be loaded before \microtype.\footnote{ -% And it might still not work. I simply don't know, since I know -% nothing about \pkg{CJK}. Feedback on the interaction of both -% packages -- positive or negative -- would be appreciated.} +% \item If you want to use 8-bit characters in the configuration, you have to +% load the \pkg{inputenc} package first. Unicode input is also supported +% (when loading \pkg{inputenc} with the |utf8| option, however, \emph{not} +% with the |utf8x| option resp. the \pkg{ucs} package). If you are using +% multiple input encodings in your document, 8-bit characters will not +% work reliably. +% \item The \pkg{CJK} package, like \microtype, hooks into the \LaTeX\ font +% selection scheme. Therefore, both packages will currently not cooperate +% (\microtype\ will simply overwrite \pkg{CJK}'s definition). If you are +% interested in getting both packages to work together, and you can +% spare some time for testing, I would be glad to receive your feedback. %\end{itemize} % %\changes{v1.9}{2005/07/10}{add hint about \texttt{verbatim} environment} -%\paragraph{You might want to disable protrusion in \texttt{verbatim} environments.} +%\paragraph{You might want to disable protrusion in \textup{\texttt{verbatim}} environments.} % As you know by now, \microtype\ will by default apply character protrusion to -% all fonts part of the font set `|alltext|'. This also includes the typewriter -% font. Although it does make sense to protrude the typewriter font if it -% appears in running text (like, for example, in this manual), this is probably -% not desirable inside the |verbatim| environment. However, \microtype\ has no -% knowledge about the context that a font appears in but will solely decide by -% examining its attributes. Therefore, you have to take of care of disabling -% protrusion in |verbatim| environments for yourself (that is, if you don't -% want to disable protrusion for the typewriter font altogether, by choosing a -% different font set). While the \cs{microtypesetup} command has of course been -% designed for cases like this, you might find it tiring to repeat it every -% time if you are using the |verbatim| environment frequently. The following -% incantation, added to the document's preamble, would serve the same -% purpose:\footnote{ -% If you are using the \pkg{fancyvrb} or the \pkg{listings} package, this is -% not necessary, since their implementation of the corresponding -% environments will inhibit protrusion anyway.} +% all fonts contained in the font set `|alltext|'. This also includes the +% typewriter font. Although it does make sense to protrude the typewriter font +% if it appears in running text (like, for example, in this manual), this is +% probably not desirable inside the |verbatim| environment. However, +% \microtype\ has no knowledge about the context that a font appears in but +% will solely decide by examining its attributes. Therefore, you have to take +% care of disabling protrusion in |verbatim| environments for yourself (that +% is, if you don't want to disable protrusion for the typewriter font +% altogether, by choosing a different font set). While the \cs{microtypesetup} +% command has of course been designed for cases like this, you might find it +% tiring to repeat it every time if you are using the |verbatim| environment +% frequently. The following line, added to the document's preamble, would serve +% the same purpose: %\begin{verbatim} -%\makeatletter -%\g@addto@macro\verbatim{\pdfprotrudechars=0 \pdfadjustspacing=0\relax} -%\makeatother +%\g@addto@macro\verbatim{\microtypesetup{activate=false}} %\end{verbatim} +% If you are using the \pkg{fancyvrb} or the \pkg{listings} package, this is not +% necessary, since their implementation of the corresponding environments will +% inhibit protrusion anyway. % %\changes{v1.8}{2005/06/23}{add hint about error messages} +%\changes{v1.9a}{2005/11/15}{add explanation for error message with bitmap fonts} +%\changes{v1.9a}{2005/11/15}{add explanation for error message in <DVI> mode} %\paragraph{Possible error messages and how to get rid of them:} %\begin{itemize} -%\lstset{belowskip=-\smallskipamount,frame=none,xleftmargin=0pt,backgroundcolor=} +%\lstset{belowskip=-\smallskipamount,frame=none,xleftmargin=0pt,backgroundcolor=, +% basicstyle=\MacroFont\footnotesize} % \item %\begin{verbatim} -%font ____ cannot be expanded (not an included Type1 font) +%Warning: pdflatex: font ptmr8r cannot be expanded (not an included Type1 font) %\end{verbatim} +% and the <PDF> viewer complains about a missing font, \eg, Adobe Reader: +%{\lstset{aboveskip=\smallskipamount} +%\begin{verbatim} +%Could not find a font in the Resources dictionary - using Helvetica instead. +%\end{verbatim}} % Font expansion can only be applied if the font is actually embedded in the -% \pdf\ file. If you receive the above error message, your \TeX\ system is not +% <PDF> file. If you receive the above error message, your \TeX\ system is not % set up to embed (or `download') the base PostScript fonts (\eg\ Times, % Helvetica, Courier). In most \TeX\ distributions, this can be changed in the % file \file{updmap.cfg} by setting |pdftexDownloadBase14| to |true|. % Otherwise, consult the local guide of your \TeX\ system. % \item %\begin{verbatim} +%Warning: pdflatex (file ecrm1000+20): Font ecrm1000+20 at 1200 not found +%\end{verbatim} +% Furthermore, automatic font expansion requires Type\,1 fonts. When you receive +% a message like the above, you are probably trying to apply font expansion to +% a bitmap or TrueType font. This is not possible, unless you manually create +% expanded instances of the fonts. +% \item +%\begin{verbatim} +%! Font csnameendcsname=cmr10+20 at 10.0pt not loadable: Metric (TFM) file not found. +%\end{verbatim} +% Such an error message could 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 +% exist on your \TeX\ system. +% \item +%\begin{verbatim} %! TeX capacity exceeded, sorry [PDF memory size (pdf_mem_size)=65536]. %\end{verbatim} -% When applying micro-typographic enhancement to a large number of fonts, you -% may be running out of \pdftex\ memory. You can increase it by setting -% |pdf_mem_size| to a larger value (maximum 524\,288). For te\TeX-based -% systems, change the settings in \file{texmf.cnf}, for MiK\TeX, in the file -% \file{miktex.ini}. Beginning with version 1.30 of \pdftex, the memory will -% grow dynamically, so that this problem can no longer arise. +% When applying micro-typographic enhancement to a large document with a lot of +% fonts, \pdftex\ may be running out of memory. The memory can be increased +% by setting |pdf_mem_size| to a larger value (maximum 524\,288). For +% te\TeX-based systems, change the settings in \file{texmf.cnf}, for MiK\TeX, +% in the file \file{miktex.ini}. Beginning with version 1.30 of \pdftex, +% memory will grow dynamically, so that this problem can no longer occur. %\end{itemize} % % @@ -1779,9 +1852,6 @@ % %\section{Acknowledgments} % -%\def\contributor#1 <#2\at#3>{#1 (\mailto{#2@#3})} -%\def\contributor#1 <#2\at#3>{\textit{#1}} -% % This package would be pointless if \contributor\thanh{} <thanh\at pdftex.org> % hadn't created the \pdftex\ programme in the first place, which introduced the % micro-typographic extensions and made them available to the \TeX\ world. @@ -1796,10 +1866,12 @@ % implementing this. He also came up with some good ideas for the management of % complex configurations. %\ifbeta -% \contributor Ulrich Dirr <ud\at art-satz.de> has made numerous suggestion +% \contributor Ulrich Dirr <ud\at art-satz.de> has made numerous suggestion, % especially concerning the new extensions of interword spacing adjustment % and additional character kerning. %\fi +% My thanks also go to \contributor Maciej Eder <maciej_eder\at poczta.onet.pl> +% for contributing settings for the <QX> encoding. % % I thank \contributor Philipp Lehman <plehman\at gmx.net> for adding to his % \pkg{csquotes} package the possibility to restore the original meanings of @@ -1818,7 +1890,7 @@ % \contributor Herb Schulz <herbs\at wideopenwest.com>, % \contributor Michael Hoppe <mh\at michael-hoppe.de>, % \contributor Gary~L. Gray <gray\at engr.psu.edu>, -% \contributor Georg Verweyen <Georg.Verweyen\at web.de>, +% \contributor Georg Verweyen <verweyen\at gmail.com>, % \contributor Christoph Bier <christoph.bier\at web.de>, % \contributor Peter Muthesius <Pemu\at gmx.de>, % \contributor Bernard Gaulle <gaulle\at idris.fr>, @@ -1826,8 +1898,11 @@ % \contributor Mark Rossi <mark.rossi\at de.bosch.com>, % \contributor Stephan Hennig <stephanhennig\at arcor.de>, % \contributor Michael Zedler <Michael.Zedler\at tum.de>, -%and -% \contributor Herbert Voss <Herbert.Voss\at gmx.net>. +% \contributor Herbert Vo\ss{} <Herbert.Voss\at gmx.net>, +% \contributor Ralf Stubner <ralf.stubner\at physik.uni-erlangen.de>, +% \contributor Holger Uhr <huhr\at uni-paderborn.de> +% and +% \contributor Peter Dyballa <Peter_Dyballa\at Web.DE>. % % %\begin{thebibliography}{} @@ -1846,7 +1921,7 @@ %\fi % %\bibitem[Th\`anh 2004]{ThanhPracTeX} -% \thanh, \emph{Micro-typographic Extensions of \pdftex\ in Practice}, +% \thanh, \emph{Micro-typographic extensions of \pdftex\ in practice}, % \newblock in: \textit{TUGBoat}, vol.~25(2004), no.~1 -- Proceedings of the % Practical \TeX\ 2004 Conference, pp.~35--38. % \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb25-1/thanh.pdf}) @@ -1861,40 +1936,39 @@ %\fi % % \bibitem[\pdftex\ manual]{pdftexman} -% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, \emph{The \pdftex\ user manual}, -% \newblock August 21, 2005. -% \newblock (Available from \ctan\ at \ctanurl{/systems/pdftex/manual}; +% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, +% \emph{The \pdftex\ user manual}, +% \newblock December 4, 2005. +% \newblock (Available from <CTAN> at \ctanurl{/systems/pdftex/manual/}; % latest version at \url{http://sarovar.org/projects/pdftex/}) % % \bibitem[\LaTeXe\ font selection]{fntguide} % \LaTeX3 Project Team, \emph{\LaTeXe\ font selection}, % \newblock February 10, 2004. -% \newblock (Available from \ctan\ at \ctanurl{/macros/latex/doc/fntguide.pdf}) +% \newblock (Available from <CTAN> at \ctanurl{/macros/latex/doc/fntguide.pdf}) % % \bibitem[\texttt{pdfcprot}]{pdfcprot} -% Carsten Schurig, \emph{The |pdfcprot.sty| package}, -% \newblock August 14, 2002. -% \newblock (Available from \ctan\ at \ctanurl{/macros/latex/contrib/pdfcprot/}) +% Carsten Schurig, Tobias Schlemmer, \emph{The |pdfcprot.sty| package}, +% \newblock June 10, 2005. +% \newblock (Available from <CTAN> at \ctanurl{/macros/latex/contrib/pdfcprot/}) % %\ifbeta % \bibitem[\texttt{soul}]{soul} % Melchior Franz, \emph{The |soul| package}, % \newblock November 13, 2003. -% \newblock (Available from \ctan\ at \ctanurl{/macros/latex/contrib/soul/}) +% \newblock (Available from <CTAN> at \ctanurl{/macros/latex/contrib/soul/}) %\fi %\end{thebibliography} % -% +%\ifbeta\else\pagebreak\fi ^^A layout %\section{Short History}\label{sec:short-history} %\changes{v1.5}{2004/12/11}{add short history (section~\ref{sec:short-history})} % % The comprehensive list of changes can be % \expandafter\ifx\csname r@sec:changes\endcsname\relax % obtained by running `\texttt{makeindex \mbox{-s gglo.ist} -% \mbox{-o microtype.gls} microtype.glo}'^^A -% \else -% found in appendix~\ref{sec:changes}^^A -% \fi. +% \mbox{-o microtype.gls} microtype.glo}'\else +% found in appendix~\ref{sec:changes}\fi. % The following is a list of all changes relevant in the user land; bug fixes % are swept under the rug. % @@ -1921,9 +1995,9 @@ % %\begin{History} %\betastart -%\Version 2.0 (28.10.2005) -% \item Support for the new extensions of \pdftex\ version 1.3x: adjustment of -% interword spacing (glue), and additional kerning +%\Version 2.0 (05.05.2006) +% \item Support for the new experimental extensions of \pdftex\ version 1.40: +% adjustment of interword spacing (glue), and additional kerning % (new commands \cs{SetExtraSpacing} and \cs{SetExtraKerning}, % new options `\opt{spacing}', `\opt{kerning}'; % see section~\ref{sub:interword-spacing} and~\ref{sub:kerning}) @@ -1931,10 +2005,31 @@ % \pkg{babel} package % (see sections~\ref{sub:options-misc} and~\ref{sec:context}) % \item New commands \cs{textls} and \cs{lsstyle} for letterspacing -% (requires \pdftex\ version 1.3x; +% (requires \pdftex\ version 1.40; % see section~\ref{sec:lettersp}) %\betaend % +%\Version 1.9d (05.05.2006) +% \item Support for the Central European <QX> encoding (inheritance, +% generic protrusion settings, contributed by Maciej Eder; +% protrusion settings for Times) +% \item Protrusion settings for various Euro symbol fonts (Adobe, <ITC>, Marvosym) +% \item Support for Unicode input in the configuration (\pkg{inputenc}/|utf8|) +% \item Compatibility with the \pkg{tex4ht} package +% +%\Version 1.9c (02.02.2006) +% \item Protrusion settings for <URW> Garamond +% +%\Version 1.9b (20.01.2006) +% \item Compatibility with the \pkg{listings} package +% +%\Version 1.9a (05.12.2005) +% \item Defer setup until the end of the preamble; consequently, no need to +% change font defaults before loading \microtype, or to put it the other +% way round, \microtype\ may now be loaded at any time +% \item Inside the preamble, \cs{microtypesetup} accepts all package options +% \item Protrusion settings for <T5> encoded Charter +% %\Version 1.9 (28.10.2005) % \item New command \cs{DisableLigatures} to disable ligatures of fonts % (requires \pdftex\ version 1.30 or later; @@ -1947,9 +2042,9 @@ % \item New key `|preset|' to set all characters to the specified value before % loading the lists % \item Value `|relative|' renamed to `|character|' for `|unit|' keys -% \item Support for the Polish \otIV\ encoding (protrusion, expansion, inheritance) -% \item Support for the Vietnamese \tV\ encoding (protrusion, expansion, inheritance) -% \item `\opt{DVIoutput}' will work with \TeX Live 2004 +% \item Support for the Polish <OT4> encoding (protrusion, expansion, inheritance) +% \item Support for the Vietnamese <T5> encoding (protrusion, expansion, inheritance) +% \item `\opt{DVIoutput}' option will work with \TeX Live 2004 % %\Version 1.8 (23.06.2005) % \item If font substitution has occurred, the settings for the substitute will @@ -1962,10 +2057,10 @@ % dimension instead of the character width % (see section~\ref{sub:protrusion}) % \item Renamed commands from \cs{..MicroType..} to \cs{..Microtype..} -% \item Protrusion settings for \ams\ math fonts -% \item Protrusion settings for Times in \lyI\ encoding completed -% \item The `|allmath|' font set also includes \U\ encoding -% \item 8-bit characters in the configuration files finally work as advertised, +% \item Protrusion settings for <AMS> math fonts +% \item Protrusion settings for Times in <LY1> encoding completed +% \item The `|allmath|' font set also includes <U> encoding +% \item 8-bit characters in the configuration finally work as advertised, % even if made active by the \pkg{csquotes} package % \item When using the \pkg{ledmac} package, character protrusion will work % for the first time ever (requires \pdftex\ version 1.30 or later) @@ -1999,7 +2094,7 @@ % \item Use \etex\ extensions, if available % %\Version 1.5 (15.12.2004) -% \item When output mode is \dvi, font expansion has to be enabled +% \item When output mode is <DVI>, font expansion has to be enabled % explicitly, automatic expansion will be disabled % (see section~\ref{sub:options-microtype}) % \item New option `\opt{selected}' to enable selected expansion @@ -2013,11 +2108,11 @@ %\Version 1.4b (26.11.2004) % \item \cs{UseMicrotypeSet} requires the set to be declared % (see section~\ref{sec:font-sets}) -% \item Internal optimization -%^^A\Version 1.4a (17.11.2004) % +%^^A\Version 1.4a (17.11.2004) %^^A \item Bug fix update (font setup inside |tabular|s) %\VersionDate{1.4a}{2004/11/17} +% %\Version 1.4 (12.11.2004) % \item Set up fonts independently from \LaTeX\ font loading % (therefore, no risk of overlooking fonts anymore, and the package may @@ -2033,7 +2128,7 @@ % \item New font sets: `|allmath|' and `|basicmath|' % (see section~\ref{sec:font-sets} and table~\ref{tab:predefined-font-sets}) % \item Protrusion settings for Computer Modern Roman math symbols -% \item Protrusion settings for \tsI\ encoding completed for Computer Modern +% \item Protrusion settings for <TS1> encoding completed for Computer Modern % Roman and Adobe Garamond % \item If an alias font name is specified, it will be used as an alternative, % not as a replacement (see section~\ref{sub:config-file}) @@ -2049,35 +2144,60 @@ % \item Configuration file names in lowercase (see section~\ref{sub:config-file}) % %\Version 1.0 (11.09.2004) -% \item First \ctan\ release +% \item First <CTAN> release %\end{History} % -% \GeneralChanges! -% -% \StopEventually{ -% \typeout{:?1000} ^^A tell WinEdt not to bother about overfull boxes -% \appendix -% \PrintChanges -% \PrintIndex -% \typeout{:?1111} -% } +% \GeneralChanges* % +%\StopEventually{ +% \typeout{:?1000} ^^A tell WinEdt not to bother about overfull boxes +% \appendix +% ^^A\AppendixSettings +% \PrintChanges +% \PrintIndex +% \typeout{:?1111} +%} % % ^^A ========================================================================= % +%\makeatletter +% ^^A Heiko Oberdiek's fix from latexbugs (latex/3540): +%\begingroup +% \def\x\begingroup#1\@nil{\endgroup +% \def\DoNotIndex{\begingroup +% \@tfor\@tempa:=\#\$\&\^\_\|\~\ \<\do{\expandafter\@makeother\@tempa}#1}} +%\expandafter\x\DoNotIndex\@nil +%\def\PercentIndex{}\def\LeftBraceIndex{}\def\RightBraceIndex{} +% ^^A also index newifs: +%\def\@newif{newif}\newif\if@newif +%\def\macro@finish{\macro@namepart +% \ifx\macro@namepart\@newif\@tempswatrue\else\@tempswafalse\fi +% \ifnot@excluded +% \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}\@tempa +% \fi +% \if@newif +% \edef\@tempa{\noexpand\SpecialMainIndex +% {\bslash\expandafter\@gobbletwo\macro@namepart true}}\@tempa +% \edef\@tempa{\noexpand\SpecialMainIndex +% {\bslash\expandafter\@gobbletwo\macro@namepart false}}\@tempa +% \fi +% \if@tempswa\@newiftrue\else\@newiffalse\fi +%} +%\makeatother +% %\DoNotIndex{\!,\",\',\(,\),\*,\+,\,,\-,\.,\/,\:,\;,\<,\=,\>,\?,\[,\\,\],\`, -% \#,\$,\%,\&,\^,\_,\|,\~,\ } ^^A won't work: \{,\} +% \#,\$,\&,\^,\_,\|,\~,\ } %\DoNotIndex{\advance,\aftergroup,\begingroup,\catcode,\char,\chardef, ^^A TeX % \csname,\def,\divide,\edef,\else,\endcsname,\endgroup,\endinput,\escapechar, -% \expandafter,\fi,\gdef,\global,\hbox,\if,\ifcase,\ifdim,\iffalse,\ifhbox,\ifnum, -% \iftrue,\ifx,\input,\inputlineno,\kern,\let,\meaning,\multiply,\newcount, -% \newdimen,\newif,\newtoks,\noexpand,\number,\or,\relax,\romannumeral,\setbox, +% \expandafter,\fi,\gdef,\global,\hbox,\if,\ifcase,\ifcat,\ifdim,\iffalse,\ifhbox, +% \ifnum,\iftrue,\ifx,\input,\inputlineno,\jobname,\kern,\let,\meaning,\multiply, +% \newcount,\newdimen,\newif,\newtoks,\noexpand,\number,\or,\relax,\setbox, % \space,\string,\the,\uppercase,\wd,\xdef} %^^A\DoNotIndex{\font,\fontdimen,\nullfont} %\DoNotIndex{\@backslashchar,\@cclv,\@cclvi,\@classoptionslist,\@currext, ^^A LaTeX % \@currname,\@defaultunits,\@empty,\@expandtwoargs,\@firstofone,\@firstoftwo, -% \@gobble,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded,\@ifpackagewith,\@ifstar, -% \@m,\@makeother,\@nameuse,\@ne,\@nil,\@nnil,\@nodocument,\@onelevel@sanitize, +% \@gobble,\@gobbletwo,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded,\@ifpackagewith, +% \@ifstar,\@m,\@makeother,\@nameuse,\@ne,\@nil,\@nnil,\@onelevel@sanitize, % \@onlypreamble,\@ptionlist,\@removeelement,\@secondoftwo,\@spaces,\@tempa, % \@tempb,\@tempc,\@tempcnta,\@tempcntb,\@tempdima,\@tempswafalse,\@tempswatrue, % \@undefined,\@unprocessedoptions,\@unusedoptionlist,\g@addto@macro,\if@tempswa, @@ -2089,23 +2209,26 @@ %^^A\DoNotIndex{\@@enc@update,\add@accent,\cf@encoding,\curr@fontshape, %^^A \define@newfont,\do@subst@correction,\f@encoding,\f@size,\font@name, %^^A \normalfont,\pickup@font,\selectfont,\set@fontsize} -%\DoNotIndex{\detokenize,\dimexpr,\eTeXversion,\ifcsname,\ifdefined,\numexpr} ^^A e-TeX +%\DoNotIndex{\detokenize,\eTeXversion,\ifcsname,\ifdefined,\numexpr} ^^A e-TeX %^^A\DoNotIndex{\fontcharwd,\iffontchar} %^^A\DoNotIndex{\{ef,lp,rp}code,\{left,right}marginkern,\{kn{bc,ac},{kn,st,sh}bs}code,\pdf*} ^^A pdfTeX %\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision} ^^A TeXLive -%\DoNotIndex{\@inpenc@undefined@,\IeC} ^^A inputenc -%\DoNotIndex{\@disablequotes} ^^A csquotes -%\DoNotIndex{\foreign@language,\languagename,\select@language} ^^A babel -%\DoNotIndex{\percentsign} ^^A Spanish babel -%\DoNotIndex{\NoAutoSpaceBeforeFDP} ^^A French babel -%\DoNotIndex{\l@dunhbox@line} ^^A ledmac/ledpar -%\DoNotIndex{\pdfstringdefDisableCommands} ^^A hyperref -%\DoNotIndex{\define@key,\KV@@sp@def,\setkeys} ^^A keyval +%\DoNotIndex{\languagename,\foreign@language,\select@language} ^^A babel +%\DoNotIndex{\NoAutoSpaceBeforeFDP} ^^A babel/french +%\DoNotIndex{\percentsign} ^^A babel/spanish +%\DoNotIndex{\@disablequotes} ^^A csquotes +%\DoNotIndex{\pdfstringdefDisableCommands} ^^A hyperref +%\DoNotIndex{\@inpenc@undefined@,\IeC} ^^A inputenc +%\DoNotIndex{\UTFviii@defined} ^^A inputenc/utf8 +%\DoNotIndex{\define@key,\KV@@sp@def,\setkeys} ^^A keyval +%\DoNotIndex{\lst@ProcessLetter} ^^A listings +%\DoNotIndex{\l@dunhbox@line} ^^A ledmac,ledpar +%\DoNotIndex{\soulregister} ^^A soul %\DoNotIndex{\color@begingroup,\color@endgroup,\everypar,\hbadness,\hsize, ^^A \showhyphens % \maxdimen,\parfillskip,\pretolerance,\showboxdepth,\tolerance,\vbox,\z@skip} %\DoNotIndex{\CHAR,\KVo@tempa,\MT@dinfo,\MT@dinfo@nl,\tracingmicrotype,\x,\y} ^^A microtype -%\DoNotIndex{\DeclareMicroTypeSet,\UseMicroTypeSet,\DeclareMicroTypeAlias, ^^A ... old commands -% \LoadMicroTypeFile,\MicroType@Hook} +%\DoNotIndex{\DeclareMicroTypeSet,\DeclareMicroTypeAlias, ^^A ... old commands +% \LoadMicroTypeFile,\MicroType@Hook,\UseMicroTypeSet} % % ^^A ------------------------------------------------------------------------- % @@ -2115,36 +2238,46 @@ %\section{Implementation} % % The \pkg{docstrip} modules in this file are: -%\begin{description} -% \item[|driver|:] The documentation driver, only visible in the \file{dtx} file. -% \item[|package|:] The code for the \microtype\ package (\file{microtype.sty}). -% \begin{description} -% \item[|debug|:] Code for additional output in the log file.\\ +% \begin{description} +% \item[|driver|] The documentation driver, only visible in the \file{dtx} file. +% \item[|package|] The code for the \microtype\ package (\file{microtype.sty}). +% \begin{description} +% \item[|debug|] Code for additional output in the log file.\\ % Used for -- surprise! -- debugging purposes. -% \end{description} -% \item[|config|:] Surrounds all configuration modules. -% \begin{description} -% \item[|m-t|:] The main configuration file (\file{microtype.cfg}). -% \item[|bch|:] Settings for Bitstream Charter (\file{mt-bch.cfg}). -% \item[|cmr|:] Settings for Computer Modern Roman (\file{mt-cmr.cfg}). -% \item[|pad|:] Settings for Adobe Garamond (\file{mt-pad.cfg}). -% \item[|ppl|:] Settings for Palatino (\file{mt-ppl.cfg}). -% \item[|ptm|:] Settings for Times (\file{mt-ptm.cfg}). -% \item[|pmn|:] Settings for Adobe Minion (\file{mt-pmn.cfg}). \\ -% Contributed by Harald Harders. -% \item[|cfg-u|:] Surrounds non-text configurations (\U\ encoding). -% \begin{description} -% \item[|msa|:] Settings for \ams\ `a' symbol font (\file{mt-msa.cfg}). -% \item[|msb|:] Settings for \ams\ `b' symbol font (\file{mt-msb.cfg}). -% \item[|euf|:] Settings for \ams\ Euler Fraktur font (\file{mt-euf.cfg}). -% \item[|eus|:] Settings for \ams\ Euler script font (\file{mt-eus.cfg}). -% \end{description} -% \end{description} -% \item[|test|:] A helper file that may be used to create and test -% protrusion settings (\file{test-microtype.tex}). -% \item[|beta|:] Support for features not yet included in an official +% \item[|beta|] Support for features not yet included in an official % release of \pdftex. -%\end{description} +% \end{description} +% \item[|config|] Surrounds all configuration modules. +% \begin{description} +% \item[|cfg-t|] Surrounds latin text configurations. +% \begin{description} +% \item[|m-t|] The main configuration file (\file{microtype.cfg}). +% \item[|bch|] Settings for Bitstream Charter (\file{mt-bch.cfg}). +% \item[|cmr|] Settings for Computer Modern Roman (\file{mt-cmr.cfg}). +% \item[|pad|] Settings for Adobe Garamond (\file{mt-pad.cfg}). +% \item[|ppl|] Settings for Palatino (\file{mt-ppl.cfg}). +% \item[|ptm|] Settings for Times (\file{mt-ptm.cfg}). +% \item[|pmn|] Settings for Adobe Minion (\file{mt-pmn.cfg}).\\ +% Contributed by Harald Harders. +% \item[|ugm|] Settings for <URW> Garamond (\file{mt-ugm.cfg}). +% \end{description} +% \item[|cfg-u|] Surrounds non-text configurations (<U> encoding). +% \begin{description} +% \item[|msa|] Settings for <AMS> `a' symbol font (\file{mt-msa.cfg}). +% \item[|msb|] Settings for <AMS> `b' symbol font (\file{mt-msb.cfg}). +% \item[|euf|] Settings for <AMS> Euler Fraktur font (\file{mt-euf.cfg}). +% \item[|eus|] Settings for <AMS> Euler script font (\file{mt-eus.cfg}). +% \end{description} +% \item[|cfg-e|] Surrounds Euro symbol configurations. +% \begin{description} +% \item[|zpeu|] Settings for Adobe Euro symbol fonts (\file{mt-zpeu.cfg}). +% \item[|euroitc|] Settings for <ITC> Euro symbol fonts (\file{mt-euroitc.cfg}). +% \item[|mvs|] Settings for Marvosym Euro symbol (\file{mt-mvs.cfg}). +% \end{description} +% \end{description} +% \item[|test|] A helper file that may be used to create and test +% protrusion settings (\file{test-microtype.tex}). +% \end{description} % And now for something completely different. % % \begin{macrocode} @@ -2168,27 +2301,24 @@ \newcommand*\SetExtraSpacing[3][]{} \newcommand*\SetExtraKerning[3][]{} \newcommand*\DeclareMicrotypeBabelHook[2]{} +\newcommand*\lsstyle{} \newcommand\textls[2][]{#2} -\newcommand\lsstyle{} %</beta> % \end{macrocode} % This command also has a starred version. % \begin{macrocode} -\def\DeclareMicrotypeSet{% - \@ifstar - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% -} -\def\MT@DeclareSet[#1]#2#3{} +\def\DeclareMicrotypeSet#1#{\@gobbletwo} % \end{macrocode} % Set declarations are only allowed in the preamble (resp. the main -% configuration file). All the other commands, on the other hand, must be +% configuration file). The configuration commands, on the other hand, must be % allowed in the document, too, since they may be called inside font -% configuration files. +% configuration files, which, in principle, may be loaded at any time. % \begin{macrocode} \@onlypreamble{\DeclareMicrotypeSet} \@onlypreamble{\UseMicrotypeSet} +\@onlypreamble{\DeclareMicrotypeSetDefault} \@onlypreamble{\DisableLigatures} +%<beta>\@onlypreamble{\DeclareMicrotypeBabelHook} % \end{macrocode} %\begin{macro}{\MT@old@cmd} % The old command names had one more hunch. @@ -2196,25 +2326,24 @@ % \cs{..Microtype..}} % \begin{macrocode} \def\MT@old@cmd#1#2{% - \MT@warning{\string#1 is deprecated. Please use\MessageBreak - \string#2 instead}% - \let#1#2#2} + \newcommand*#1{\MT@warning{% + \string#1 is deprecated. Please use\MessageBreak + \string#2 instead}% + \let #1#2#2}} % \end{macrocode} %\end{macro} % \begin{macrocode} -\newcommand*\DeclareMicroTypeSet{% - \MT@old@cmd\DeclareMicroTypeSet - \DeclareMicrotypeSet} -\newcommand*\UseMicroTypeSet{% - \MT@old@cmd\UseMicroTypeSet - \UseMicrotypeSet} -\newcommand*\DeclareMicroTypeAlias{% - \MT@old@cmd\DeclareMicroTypeAlias - \DeclareMicrotypeAlias} -\newcommand*\LoadMicroTypeFile{% - \MT@old@cmd\LoadMicroTypeFile - \LoadMicrotypeFile} +\MT@old@cmd\DeclareMicroTypeSet\DeclareMicrotypeSet +\MT@old@cmd\UseMicroTypeSet\UseMicrotypeSet +\MT@old@cmd\DeclareMicroTypeAlias\DeclareMicrotypeAlias +\MT@old@cmd\LoadMicroTypeFile\LoadMicrotypeFile +% \end{macrocode} +%\begin{macro}{\MT@MT} +% This is us. +% \begin{macrocode} +\def\MT@MT{microtype} % \end{macrocode} +%\end{macro} %\begin{macro}{\MT@error} %\begin{macro}{\MT@warning} %\begin{macro}{\MT@warning@nl} @@ -2226,14 +2355,14 @@ %\changes{v1.6}{2005/01/06}{new macro: used instead of \cs{ifMT@verbose}} % Communicate. % \begin{macrocode} -\def\MT@error{\PackageError{microtype}} -\def\MT@warning{\PackageWarning{microtype}} +\def\MT@error{\PackageError{\MT@MT}} +\def\MT@warning{\PackageWarning{\MT@MT}} \def\MT@warning@nl#1{\MT@warning{#1\@gobble}} \def\MT@warn@err#1{\MT@error{#1}{% - This error message appears because you loaded the `microtype'\MessageBreak + This error message appears because you loaded the `\MT@MT'\MessageBreak package with the option `verbose=errors'. Consult the documentation\MessageBreak - in microtype.(pdf,dvi) to find out what went wrong.}} -\def\MT@info{\PackageInfo{microtype}} + in \MT@MT.(pdf,dvi) to find out what went wrong.}} +\def\MT@info{\PackageInfo{\MT@MT}} \def\MT@info@nl#1{\MT@info{#1\@gobble}} %<!debug>\let\MT@vinfo\@gobble % \end{macrocode} @@ -2244,6 +2373,9 @@ %\end{macro} %\end{macro} %\end{macro} +%\begin{macro}{\tracingmicrotype} +%\begin{macro}{\MT@dinfo} +%\begin{macro}{\MT@dinfo@nl} % Debug. Cases for \cs{tracingmicrotype}: %\begin{itemize} % \item[|0|:] almost none @@ -2261,6 +2393,9 @@ \def\MT@dinfo@nl#1#2{\ifnum\tracingmicrotype<#1\relax\else\MT@info@nl{#2}\fi} %</debug> % \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} % %\subsection{Requirements} % @@ -2277,20 +2412,28 @@ % \item[|1|:] \pdftex\ (\textless\ 0.14f) % \item[|2|:] + micro-typographic extensions (0.14f, 0.14g) % \item[|3|:] + protrusion relative to 1em (\textgeq\ 0.14h) -% \item[|4|:] + automatic font expansion; default \cmd{\efcode}\,=\,1000 (\textgeq\ 1.20) +% \item[|4|:] + automatic font expansion; +% default \cmd{\efcode}\,=\,1000 (\textgeq\ 1.20) %\changes{v1.8}{2005/04/15}{case 5: \pdftex\ 1.30} -% \item[|5|:] + \cmd{\(left\textbar right)marginkern}; \cmd{\pdfnoligatures} (\textgeq\ 1.30) -%\changes{v2.0}{2005/08/20}{case 6: \pdftex\ 1.3x} -% \item[|6|:] + \cmd{\(knbs\textbar stbs\textbar shbs\textbar knbc\textbar knac)code} (\textgeq\ 1.3x) +% \item[|5|:] + \cmd{\(left,right)marginkern}; +% \cmd{\pdfnoligatures}; +% \cmd{\pdfstrcmp} (\textgeq\ 1.30) +%\changes{v2.0}{2005/08/20}{case 6: \pdftex\ 1.40} +% \item[|6|:] + adjustment of interword spacing; +% extra kerning; +% \cmd{\pdfmatch}\footnote{This command was actually introduced +% in 1.30, however, \pdftex\ ran in a buffer overflow with +% strings larger than 1024 bytes.} +% (\textgeq\ 1.40) %\end{itemize} -%\changes{v1.1}{2004/09/13}{bug fix concerning version check -% (reported by Harald Harders)} +%\changes{v1.1}{2004/09/13}{fix concerning version check +% (reported by \contributor Harald Harders <h.harders\at tu-bs.de>)} % \begin{macrocode} \let\MT@pdftex@no\z@ % \end{macrocode} %\changes{v1.9}{2005/08/29}{compatibility with \TeX Live hack -% (reported by Herbert Vo\ss)} ^^A <Herbert.Voss\at gmx.net> -% ^^A in <MID:deprh8$c69$00$1@news.t-online.com> +% (reported by \contributor Herbert Vo\ss{} <Herbert.Voss\at gmx.net>)} +% ^^A in <MID:deprh8$c69$00$1@news.t-online.com> % A hack circumventing the \TeX Live 2004 hack which undefines the \pdftex\ % primitives in the format in order to hide the fact that \pdftex\ is being run % from the user. This has been \emph{fixed} in \TeX Live 2005. @@ -2301,19 +2444,14 @@ \let\pdfoutput \normalpdfoutput \fi % \end{macrocode} -% Old packages might have defined \cmd{\pdftexversion} to \cmd{\relax}. +% Old packages might have let \cmd{\pdftexversion} to \cmd{\relax}. % \begin{macrocode} \ifx\pdftexversion\@undefined \else \ifx\pdftexversion\relax \else -%<debug>\MT@dinfo@nl{0}{running pdftex \the\pdftexversion(\pdftexrevision)} -%<!beta> \def\MT@pdftex@no{5} -%<*beta> - \ifx\knbccode\@undefined +%<debug> \MT@dinfo@nl{0}{running pdftex \the\pdftexversion(\pdftexrevision)} +%<beta> \def\MT@pdftex@no{6} +%<beta> \ifnum\pdftexversion < 140 \def\MT@pdftex@no{5} - \else - \def\MT@pdftex@no{6} - \fi -%</beta> \ifnum\pdftexversion < 130 \def\MT@pdftex@no{4} \ifnum\pdftexversion < 120 @@ -2332,6 +2470,7 @@ \fi \fi \fi +%<beta> \fi \fi \fi %<debug>\MT@dinfo@nl{0}{pdftex no: \number\MT@pdftex@no} @@ -2341,20 +2480,18 @@ % and exit here. % \begin{macrocode} \ifnum\MT@pdftex@no<\tw@ - \AtEndOfPackage{\let\@unprocessedoptions\relax}% + \AtEndOfPackage{\let\@unprocessedoptions\relax} \let\CurrentOption\@empty \MT@warning@nl{% \ifcase\MT@pdftex@no You don't seem to be using pdftex.\MessageBreak \or You are using a pdftex version older than 0.14f.\MessageBreak - microtype won't work with such antiquated versions.\MessageBreak + `\MT@MT' won't work with such antiquated versions.\MessageBreak Please install a newer version of pdftex.\MessageBreak \fi All micro-typographic features will be disabled} - \expandafter - \endinput -\fi +\endinput\fi % \end{macrocode} % Still there? Then we can begin: %\begin{macro}{\MT@catcodes} @@ -2375,7 +2512,7 @@ \@makeother\`% \@makeother\'% \@makeother\"% - \@makeother\|% + \@makeother\!% } % \end{macrocode} %\end{macro} @@ -2388,51 +2525,47 @@ \expandafter\MT@restore@catcodes \fi } -\edef\MT@restore@catcodes{% - \MT@restore@catcodes\^\-\=\*\,\/\`\'\"\|\relax -} +\edef\MT@restore@catcodes{\MT@restore@catcodes\^\-\=\*\,\/\`\'\"\!\relax} % \end{macrocode} %\end{macro} % \begin{macrocode} \MT@catcodes \AtEndOfPackage{\MT@restore@catcodes} % \end{macrocode} -% We need the \pkg{keyval} package, including the new \cmd{\KV@@sp@def} +% We need the \pkg{keyval} package, including the `new' \cmd{\KV@@sp@def} % implementation. % \begin{macrocode} \RequirePackage{keyval}[1997/11/10] % \end{macrocode} -%\begin{macro}{\mt@toks} +%\begin{macro}{\MT@toks} % We need a token register. -%\changes{v1.9}{2005/09/28}{no longer use \cmd{\toks@}} +%\changes{v1.9}{2005/09/28}{use instead of \cmd{\toks@}} % \begin{macrocode} -\newtoks\mt@toks +\newtoks\MT@toks % \end{macrocode} %\end{macro} -%\begin{macro}{\ifMT@protrusion} \IndexNewif{MT@protrusion} -%\begin{macro}{\ifMT@expansion} \IndexNewif{MT@expansion} -%\begin{macro}{\ifMT@auto} \IndexNewif{MT@auto} -%\begin{macro}{\ifMT@selected} \IndexNewif{MT@selected} -%\begin{macro}{\ifMT@spacing} \IndexNewif{MT@spacing} -%\begin{macro}{\ifMT@kerning} \IndexNewif{MT@kerning} -%\begin{macro}{\ifMT@noligatures}\IndexNewif{MT@noligatures} -%\begin{macro}{\ifMT@DVIoutput} \IndexNewif{MT@DVIoutput} -%\begin{macro}{\ifMT@draft} \IndexNewif{MT@draft} -%\begin{macro}{\ifMT@babel} \IndexNewif{MT@babel} +%\begin{macro}{\ifMT@protrusion} +%\begin{macro}{\ifMT@expansion} +%\begin{macro}{\ifMT@auto} +%\begin{macro}{\ifMT@selected} +%\begin{macro}{\ifMT@noligatures} +%\begin{macro}{\ifMT@draft} +%\begin{macro}{\ifMT@spacing} +%\begin{macro}{\ifMT@kerning} +%\begin{macro}{\ifMT@babel} % These are the global switches~\dots % \begin{macrocode} \newif\ifMT@protrusion \newif\ifMT@expansion \newif\ifMT@auto \newif\ifMT@selected +\newif\ifMT@noligatures +\newif\ifMT@draft %<*beta> \newif\ifMT@spacing \newif\ifMT@kerning +\newif\ifMT@babel %</beta> -\newif\ifMT@noligatures -\newif\ifMT@DVIoutput -\newif\ifMT@draft -%<beta>\newif\ifMT@babel % \end{macrocode} %\end{macro} %\end{macro} @@ -2443,6 +2576,11 @@ %\end{macro} %\end{macro} %\end{macro} +%\begin{macro}{\ifMT@document} +% Our private test whether we're still in the preamble. +% \begin{macrocode} +\newif\ifMT@document +% \end{macrocode} %\end{macro} %\begin{macro}{\MT@pr@level} %\begin{macro}{\MT@pr@factor} @@ -2471,8 +2609,8 @@ \let\MT@sp@factor\@m \let\MT@kn@factor\@m % \end{macrocode} -% Default unit for spacing settings is |space|, default unit for kerning is -% 1em. +% Default unit for spacing settings is |space|, +% default unit for kerning is 1em. % \begin{macrocode} \let\MT@sp@unit\m@ne \def\MT@kn@unit{1em} @@ -2522,12 +2660,16 @@ %\end{macro} %\end{macro} %\begin{macro}{\MT@factor@default} +% Default factor. +% \begin{macrocode} +\def\MT@factor@default{1000 } +% \end{macrocode} +%\end{macro} %\begin{macro}{\MT@stretch@default} %\begin{macro}{\MT@shrink@default} %\begin{macro}{\MT@step@default} % Default values for expansion. % \begin{macrocode} -\def\MT@factor@default{1000 } \def\MT@stretch@default{20 } \def\MT@shrink@default{20 } \def\MT@step@default{4 } @@ -2535,7 +2677,6 @@ %\end{macro} %\end{macro} %\end{macro} -%\end{macro} %\begin{macro}{\MT@letterspacing@default} % Default value for letterspacing (in thousandths of 1em). % \begin{macrocode} @@ -2543,211 +2684,35 @@ % \end{macrocode} %\end{macro} % -% \subsection{Compatibility} -% -% For the record, the following \LaTeX\ commands will be modified by \microtype: -%\begin{itemize} -% \item \cmd{\pickup@font} -% \item \cmd{\do@subst@correction} -% \item \cmd{\add@accent} -% \item \cmd{\showhyphens} -%\end{itemize} -% -%\begin{macro}{\MT@pdfcprot@error} -%\changes{v1.4}{2004/11/04}{check for \pkg{pdfcprot}} -% Our competitor, the \pkg{pdfcprot} package, must not be tolerated! -% \begin{macrocode} -\def\MT@pdfcprot@error{% - \MT@error{Detected the `pdfcprot' package!\MessageBreak - `microtype' and `pdfcprot' may not be used together}{% -The `pdfcprot' package provides an interface to character protrusion.\MessageBreak -So does the `microtype' package. Using both packages at the same\MessageBreak -time will almost certainly lead to undesired results. Have your choice!}% - \let\MT@pdfcprot@error\relax -} -\@ifpackageloaded{pdfcprot}\MT@pdfcprot@error\relax -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@ledmac@setup} -%\begin{macro}{\MT@led@unhbox@line} -%\begin{macro}{\MT@led@kern} -% The \pkg{ledmac} package first saves each paragraph in a box, from which it -% then splits off the lines one by one. This will destroy character protrusion. -% (There aren't any problems with the \pkg{lineno} package, since it takes a -% different approach.) -%\iffalse -% We issue a warning, so that nobody can say they didn't know. -%\changes{v1.6}{2004/12/29}{warning when using the \pkg{ledmac} package} -% --- This is fixed in \pdftex\ 1.21a, so we no longer warn. -%\changes{v1.6a}{2004/02/02}{no warning when using the \pkg{ledmac} package} -% --- Actually, it was completely broken in 1.21a, but 1.21b provides a work-around. -%\fi -% ---~\dots~--- -%\changes{v1.8}{2005/04/15}{character protrusion with \pkg{ledmac}} -% After much to and fro, the situation has finally settled and there is a fix. -% Beginning with \pdftex\ version 1.21b together with \file{ledpatch.sty} as of -% 2005/06/02 (v0.4), character protrusion will work at last. +%\subsection{Auxiliary macros} % -% Peter Wilson was so kind to provide the \cmd{\l@dunhbox@line} hook in -% \pkg{ledmac} to allow for protrusion. \cmd{\leftmarginkern} and -% \cmd{\rightmarginkern} are new primitives of \pdftex\ 1.21b (aka 1.30.0). +%\begin{macro}{\MT@requires@etex} +% For definitions that depend on \etex\ features. % \begin{macrocode} -\def\MT@ledmac@setup{% - \ifMT@protrusion - \ifnum\MT@pdftex@no > 4 - \MT@ifdefined@c\l@dunhbox@line{% - \MT@info@nl{Patching ledmac to enable character protrusion}% - \newdimen\MT@led@kern - \let\MT@led@unhbox@line\l@dunhbox@line - \renewcommand*{\l@dunhbox@line}[1]{% - \ifhbox##1% - \MT@led@kern=\rightmarginkern##1% - \kern\leftmarginkern##1% - \MT@led@unhbox@line##1% - \kern\MT@led@kern - \fi - }% - }{% - \MT@warning@nl{% - Character protrusion in paragraphs with line\MessageBreak - numbering will only work if you update ledmac}% - }% - \else - \MT@warning@nl{% - The pdftex version you are using does not allow\MessageBreak - character protrusion in paragraphs with line\MessageBreak - numbering by the `ledmac' package.\MessageBreak - Upgrade pdftex to version 1.30 or later}% - \fi +\expandafter\let\expandafter\MT@requires@etex + \ifcase 0% + \ifx\eTeXversion\@undefined 1\else + \ifx\eTeXversion\relax 1\else + \ifcase\eTeXversion 1\fi + \fi + \fi\space + \@firstoftwo + \else + \@secondoftwo \fi -} +%<debug>\MT@dinfo@nl{0}{\MT@requires@etex{}{not }running etex} % \end{macrocode} %\end{macro} -%\end{macro} -%\end{macro} -%\begin{macro}{\MT@setupfont@hook} -% This hook will be executed every time a font is set up (inside a group). -% -% In the preamble, we check for the packages each time a font is set up. -% Thus, it will work regardless when the packages are loaded. -% -% Even for packages that don't activate any characters in the preamble (like -% \pkg{babel} and \pkg{csquotes}), we have to check here, too, in case they were -% loaded before \microtype, and a font is loaded \cmd{\AtBeginDocument}, before -% \microtype. +%\begin{macro}{\MT@requires@pdftex} +% For definitions that depend on a particular \pdftex\ version. % \begin{macrocode} -\def\MT@setupfont@hook{% -% \end{macrocode} -%^^A\changes{v1.7}{2005/02/06}{compatibility with the \pkg{chemsym} package} -% The \pkg{chemsym} package redefines, among other commands, the Hungarian -% umlaut \cmd{\H} in a way that cannot be parsed by \microtype. As a work-around, -% we restore the usual definition of \cmd{\H} before setting up the font (which -% will be done inside a group). -%^^A\changes{v1.8}{2005/03/24}{remove superfluous \pkg{chemsym} hook} -% --- Since version 1.7, this is no longer needed, since our character parsing -% is robust enough now. -% -%^^A\changes{v1.7}{2005/03/10}{compatibility with the \pkg{statex} package} -% Same for \pkg{statex}. -%^^A\changes{v1.8}{2005/03/24}{remove superfluous \pkg{statex} hook} -% --- No longer needed, either. -% -% Spanish \pkg{babel} modifies the percent character, storing the original -% meaning in \cmd{\percentsign}. -%\changes{v1.8}{2005/03/30}{restore percent character if Spanish \pkg{babel} is loaded} -% \begin{macrocode} - \@ifpackagewith{babel}{spanish}{% - \MT@ifdefined@c\percentsign - {\let\%\percentsign}\relax - }\relax -% \end{macrocode} -%\changes{v1.8}{2005/04/22}{restore \pkg{csquotes}'s active characters} -% Using \cmd{\@disablequotes}, we can restore the original meaning of all -% characters made active by \pkg{csquotes}. -% (It would be doable for older versions, too, but we won't bother.) -% \begin{macrocode} - \@ifpackageloaded{csquotes}{% - \@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax - }\relax -% \end{macrocode} -% \pkg{hyperref} redefines \cmd{\%} and \cmd{\#} inside a \cmd{\url}. We restore -% the original meanings (which we can only hope are correct). -%\changes{v1.8}{2005/05/20}{restore \cmd{\%} and \cmd{\#} when \pkg{hyperref} is loaded} -% \begin{macrocode} - \@ifpackageloaded{hyperref}{% - \chardef\%`\% - \chardef\#`\# - }\relax -} -% \end{macrocode} -%\end{macro} -% Check again at the end of the preamble. -% \begin{macrocode} -\AtBeginDocument{% - \@ifpackageloaded{pdfcprot}\MT@pdfcprot@error\relax - \@ifpackageloaded{ledmac}\MT@ledmac@setup\relax -% \end{macrocode} -% We can clean up \cs{MT@setupfont@hook} now. -% \begin{macrocode} - \let\MT@setupfont@hook\@empty - \@ifpackagewith{babel}{spanish}{% - \g@addto@macro\MT@setupfont@hook{% - \MT@ifdefined@c\percentsign - {\let\%\percentsign}\relax}% - }\relax - \@ifpackageloaded{csquotes}{% - \@ifpackagelater{csquotes}{2005/05/11}{% - \g@addto@macro\MT@setupfont@hook\@disablequotes - }{% - \MT@warning@nl{% - Should you receive warnings about unknown slot\MessageBreak - numbers, try upgrading the `csquotes' package}% - }% - }\relax - \@ifpackageloaded{hyperref}{% - \g@addto@macro\MT@setupfont@hook{% - \chardef\%`\% - \chardef\#`\# - }% -% \end{macrocode} -% We disable \microtype's additions inside \pkg{hyperref}'s \cmd{\pdfstringdef}, -% which redefines lots of commands. -%\changes{v1.9}{2005/09/10}{disable \microtype\ setup inside \pkg{hyperref}'s -% \cmd{\pdfstringdef} (reported by \thanh)} ^^A private mail, 10/9/05 -% \begin{macrocode} - \pdfstringdefDisableCommands{% - \let\pickup@font\MT@orig@pickupfont -%<*beta> - \let\lsstyle\@empty - \let\textls\@firstofone -%</beta> - }% - }\relax -} -% \end{macrocode} -%\changes{v1.6}{2005/01/19}{load a font, if none is active} -% We need a font (the \pkg{minimal} class doesn't load one). -% \begin{macrocode} -\expandafter\ifx\the\font\nullfont\normalfont\fi -% \end{macrocode} -% -%\subsection{Auxiliary macros} -% -%\begin{macro}{\MT@etex@no} -% Test whether we are using \etex. Cases: -%\begin{itemize} -% \item[|0|:] not running \etex -% \item[|1|:] running \etex -%\end{itemize} -% \begin{macrocode} -\let\MT@etex@no\z@ -\ifx\eTeXversion\@undefined \else - \ifx\eTeXversion\relax \else - \ifnum\eTeXversion>\z@ - \let\MT@etex@no\@ne - \fi +\def\MT@requires@pdftex#1{% + \ifnum\MT@pdftex@no<#1\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo \fi -\fi +} % \end{macrocode} %\end{macro} %\changes{v1.4b}{2004/11/21}{optimization: use less \cmd{\csname}s and \cmd{\expandafter}s} @@ -2803,74 +2768,114 @@ time will almost certainly lead to undesired results. Have your choice!}% %\changes{v1.9}{2005/09/28}{new macros: less \cmd{\expandafter}s} % Expand the next two tokens after \meta{\#1} once and enclose them in braces. % \begin{macrocode} -\def\MT@exp@two@n#1#2#3{\expandafter\expandafter\expandafter - #1\expandafter\expandafter\expandafter - {\expandafter#2\expandafter}\expandafter{#3}} +\def\MT@exp@two@n#1#2#3{% + \expandafter\expandafter\expandafter + #1\expandafter\expandafter\expandafter + {\expandafter#2\expandafter}\expandafter{#3}} % \end{macrocode} %\end{macro} % You do not wonder why \cmd{\MT@exp@one@c} doesn't exist, do you? -%\begin{macro}{\MT@hop@fi} -%\begin{macro}{\MT@hop@else@fi} -% We need this a couple of lines down to mask \cs{ifcsname}~\dots\ \cs{fi} and -% \cs{ifdefined}~\dots\ \cs{fi}, if \cs{ifcsname} and \cs{ifdefined} aren't -% defined. -% \begin{macrocode} -\def\MT@hop@fi#1\fi{\fi#1} -\def\MT@hop@else@fi#1\else#2\fi{\fi#1} -% \end{macrocode} -%\end{macro} -%\end{macro} %\changes{v1.6}{2005/01/19}{use \etex's \cs{ifcsname} and \cs{ifdefined} if defined} -%\begin{macro}{\MT@ifdefined@c} -%\begin{macro}{\MT@ifdefined@n} +%\begin{macro}{\MT@ifdefined@c@T} +%\changes{v1.9a}{2005/11/08}{new macros: TRUE case only} +%\begin{macro}{\MT@ifdefined@c@TF} +%\begin{macro}{\MT@ifdefined@n@T} +%\begin{macro}{\MT@ifdefined@n@TF} % Wrapper for testing whether command resp. \cmd{\csname} sequence is defined. +% If we are running \etex, we will use its primitives \cs{ifdefined} and +% \cs{ifcsname}, which decreases memory use substantially. % \begin{macrocode} -\ifcase\MT@etex@no \MT@hop@else@fi{% -%<debug>\MT@dinfo@nl{0}{not running etex}% - \def\MT@ifdefined@c#1{% - \ifx#1\@undefined - \expandafter\@secondoftwo +\MT@requires@etex{ + \def\MT@ifdefined@c@T#1{% + \ifdefined#1% + \expandafter\@firstofone \else - \expandafter\@firstoftwo + \expandafter\@gobble \fi } - \def\MT@ifdefined@n#1{% - \begingroup\MT@exp@two@c\endgroup - \ifx\csname #1\endcsname\relax + \def\MT@ifdefined@c@TF#1{% + \ifdefined#1% + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + } + \def\MT@ifdefined@n@T#1{% + \ifcsname#1\endcsname + \expandafter\@firstofone \else - \expandafter\@firstoftwo + \expandafter\@gobble \fi } -}\else\MT@hop@fi{% -% \end{macrocode} -% If we are running \etex, we will use its primitives \cs{ifdefined} and -% \cs{ifcsname}, which decreases memory use substantially. -% \begin{macrocode} -%<debug>\MT@dinfo@nl{0}{running etex}% - \def\MT@ifdefined@c#1{% - \ifdefined#1% + \def\MT@ifdefined@n@TF#1{% + \ifcsname#1\endcsname \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } - \def\MT@ifdefined@n#1{% - \ifcsname#1\endcsname +}{ + \def\MT@ifdefined@c@T#1{% + \ifx#1\@undefined + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + } + \def\MT@ifdefined@c@TF#1{% + \ifx#1\@undefined + \expandafter\@secondoftwo + \else \expandafter\@firstoftwo + \fi + } + \def\MT@ifdefined@n@T#1{% + \begingroup\MT@exp@two@c\endgroup + \ifx\csname #1\endcsname\relax + \expandafter\@gobble \else + \expandafter\@firstofone + \fi + } + \def\MT@ifdefined@n@TF#1{% + \begingroup\MT@exp@two@c\endgroup + \ifx\csname #1\endcsname\relax \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo \fi } -}\fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@detokenize@n} +%\changes{v1.9d}{2006/03/08}{new macro: use \cmd{\detokenize} if available} +%\begin{macro}{\MT@detokenize@c} +%\changes{v1.9}{2005/08/17}{fix the non-\etex\ version} +% Translate a macro into a token list. With \etex, we can use \cmd{\detokenize} +% (and \cmd{\expandafter}\cmd{\string} to get rid of the trailing space). The +% non-\etex\ version requires some more fiddling (and the \cmd{\string} isn't +% perfect, of course). +% \begin{macrocode} +\MT@requires@etex{ + \def\MT@detokenize@n#1{\detokenize\expandafter{\string#1}} + \def\MT@detokenize@c#1{\detokenize + \expandafter\expandafter\expandafter{\expandafter\string#1}} +}{ + \def\MT@detokenize@n#1{\string#1} + \def\MT@detokenize@c#1{\MT@exp@two@c\zap@space\strip@prefix\meaning#1 \@empty} +} % \end{macrocode} %\end{macro} %\end{macro} %\begin{macro}{\MT@ifempty} % Test whether argument is empty. -%\changes{v1.1}{2004/09/15}{bug fix: use category code 12 for the percent character -% (reported by Tom Kink)} ^^A <kink\at hia.rwth-aachen.de> -% ^^A in <MID:2qrkp9F134l6lU1@uni-berlin.de> +%\changes{v1.1}{2004/09/15}{fix: use category code 12 for the percent character +% (reported by \contributor Tom Kink <kink\at hia.rwth-aachen.de>)} +% ^^A in <MID:2qrkp9F134l6lU1@uni-berlin.de> % \begin{macrocode} \begingroup \catcode`\%=12 @@ -2885,54 +2890,66 @@ time will almost certainly lead to undesired results. Have your choice!}% \endgroup % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@ifnumber} -% Test whether argument is a number [0-9] (using an old trick by Mr. Arseneau). +%\begin{macro}{\MT@ifint} +% Test whether argument is an integer, using an old trick by Mr. Arseneau, +%\changes{v1.9a}{2005/11/03}{use \cmd{\pdfmatch} if available} +% or the latest and greatest from \pdftex. % \begin{macrocode} -\def\MT@ifnumber#1{% - \if!\ifnum9<1#1!\else?\fi - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi +\MT@requires@pdftex6{ + \def\MT@ifint#1{% + \ifcase\pdfmatch{^[0-9]+ *$}{#1}\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + } +}{ + \def\MT@ifint#1{% + \if!\ifnum9<1#1!\else?\fi + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@ifdimen} % Test whether argument is dimension (or number). %\changes{v1.4b}{2004/11/22}{don't set \cs{MT@count} globally (save stack problem)} -% \begin{macrocode} -\def\MT@ifdimen#1{% - \setbox\z@=\hbox{% - \MT@count=1#1\relax - \ifnum\MT@count=\@ne - \aftergroup\@secondoftwo +%\changes{v1.7}{2005/03/15}{comparison with 1 to allow size smaller than 1 +% (suggested by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)} +% ^^A private mail, 15/03/2005 +%\changes{v1.9b}{2006/01/05}{use \cmd{\pdfmatch} if available} +% \begin{macrocode} +\MT@requires@pdftex6{ + \def\MT@ifdimen#1{% + \ifcase\pdfmatch{^([0-9]+([.,][0-9]+)?|[.,][0-9]+)% + (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc)? *$}{#1}\relax + \expandafter\@secondoftwo \else - \aftergroup\@firstoftwo - \fi}% + \expandafter\@firstoftwo + \fi + } +}{ + \def\MT@ifdimen#1{% + \setbox\z@=\hbox{% + \MT@count=1#1\relax + \ifnum\MT@count=\@ne + \aftergroup\@secondoftwo + \else + \aftergroup\@firstoftwo + \fi + }% + } } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@ifgt} -%\begin{macro}{\MT@iflt} -%\begin{macro}{\MT@ifeq} -% Test whether dimensions are smaller, larger or equal. +%\begin{macro}{\MT@ifdim} +% Test floating point numbers. % \begin{macrocode} -\def\MT@ifgt#1#2{% - \ifdim #1\p@ > #2\p@ - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\def\MT@iflt#1#2{% - \ifdim #1\p@ < #2\p@ - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\def\MT@ifeq#1#2{% - \ifdim #1\p@ = #2\p@ +\def\MT@ifdim#1#2#3{% + \ifdim #1\p@ #2 #3\p@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo @@ -2940,19 +2957,28 @@ time will almost certainly lead to undesired results. Have your choice!}% } % \end{macrocode} %\end{macro} -%\end{macro} -%\end{macro} %\begin{macro}{\MT@ifstreq} % Test whether two strings (fully expanded) are equal. +%\changes{v1.9a}{2005/11/03}{use \cmd{\pdfstrcmp} if available} % \begin{macrocode} -\def\MT@ifstreq#1#2{% - \edef\x{#1}% - \edef\y{#2}% - \ifx\x\y - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi +\MT@requires@pdftex5{ + \def\MT@ifstreq#1#2{% + \ifcase\pdfstrcmp{#1}{#2}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } +}{ + \def\MT@ifstreq#1#2{% + \edef\x{#1}% + \edef\y{#2}% + \ifx\x\y + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } } % \end{macrocode} %\end{macro} @@ -2983,6 +3009,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\begin{macro}{\MT@map@clist@n} %\changes{v1.8}{2005/04/17}{new macro: used instead of \cmd{\@for}} +%\changes{v1.9a}{2005/11/03}{following \LaTeX3} %\begin{macro}{\MT@map@clist@c} %\begin{macro}{\MT@map@clist@} %\begin{macro}{\MT@clist@function} @@ -2993,20 +3020,19 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@map@clist@n#1#2{% \ifx\@empty#1\else \def\MT@clist@function##1{#2}% - \expandafter\MT@map@clist@ - \expandafter#1,\@nil,\@nnil,% + \MT@map@clist@#1,\@nil,\@nnil \fi } -\def\MT@map@clist@c#1{\expandafter\MT@map@clist@n\expandafter{#1}} +\def\MT@map@clist@c#1{\MT@exp@one@n\MT@map@clist@n#1} \def\MT@map@clist@#1,{% \ifx\@nil#1% - \MT@clist@break - \else - \MT@clist@function{#1}% - \expandafter\MT@map@clist@ + \expandafter\MT@clist@break \fi + \MT@clist@function{#1}% + \MT@map@clist@ } -\def\MT@clist@break#1\@nnil,{\fi} +\let\MT@clist@function\@gobble +\def\MT@clist@break#1\@nnil{} % \end{macrocode} %\end{macro} %\end{macro} @@ -3021,13 +3047,8 @@ time will almost certainly lead to undesired results. Have your choice!}% % Execute \meta{\#2} on all elements of the token list \meta{\#1}. % \cs{MT@tlist@break} can be used to jump out of the loop. % \begin{macrocode} -\def\MT@map@tlist@n#1#2{% - \MT@map@tlist@#2#1\@nnil -} -\def\MT@map@tlist@c#1#2{% - \expandafter\MT@map@tlist@ - \expandafter#2#1\@nnil -} +\def\MT@map@tlist@n#1#2{\MT@map@tlist@#2#1\@nnil} +\def\MT@map@tlist@c#1#2{\expandafter\MT@map@tlist@\expandafter#2#1\@nnil} \def\MT@map@tlist@#1#2{% \ifx\@nnil#2\else #1{#2}% @@ -3041,45 +3062,54 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\end{macro} -%\begin{macro}{\ifMT@inlist@}\IndexNewif{MT@inlist@} +%\begin{macro}{\ifMT@inlist@} %\begin{macro}{\MT@in@clist} % Test whether item \meta{\#1} is in comma list \meta{\#2}. -%\changes{v1.4b}{2004/11/22}{bug fix: compare with \cmd{\\} instead of \cmd{\relax} -% (discovered by Herb Schulz)} ^^A <herbs\at wideopenwest.com> -% ^^A in <MID:BDBFA967.C01F%herbs@wideopenwest.com> +%^^A\changes{v1.4b}{2004/11/22}{bug fix: compare with \cmd{\\} instead of \cmd{\relax} +%^^A (discovered by \contributor Herb Schulz <herbs\at wideopenwest.com>)} +%^^A ^^A in <MID:BDBFA967.C01F%herbs@wideopenwest.com> +%\changes{v1.9a}{2005/11/03}{fix} +% Using \cmd{\pdfmatch} would be slower. % \begin{macrocode} \newif\ifMT@inlist@ \def\MT@in@clist#1#2{% - \MT@inlist@false - \def\x##1#1,##2\@nnil{% - \ifx\\##2\\\else + \def\x##1,#1,##2##3\@nnil{% + \ifx##2\@empty + \MT@inlist@false + \else \MT@inlist@true \fi }% - \expandafter\x#2,#1,\@nnil + \expandafter\x\expandafter,#2,#1,\@empty\@nnil } % \end{macrocode} %\end{macro} %\end{macro} -%\begin{macro}{\MT@rem@from@list} -% Remove item \meta{\#1} from comma list \meta{\#2}. +%\begin{macro}{\MT@rem@from@clist} +% Remove item \meta{\#1} from comma list \meta{\#2}. Doesn't work if the item to +% be removed is included more than once in the list. %\changes{v1.9}{2005/10/28}{new macro: remove an item from a comma list} -% \begin{macrocode} -\def\MT@rem@from@list#1#2{% - \def\x##1#1,##2\@nnil{% - \ifx\\##2\\\else - \def\x####1,#1,####2\@nnil{% - \gdef#2{##1####1}% - }% - \x##2,#1,\@nnil +%\changes{v1.9a}{2005/11/03}{fix} +% Using \cmd{\pdfmatch} and \cmd{\pdflastmatch} here would be really slow! +% \begin{macrocode} +\def\MT@rem@from@clist#1#2{% + \def\x##1,#1,##2##3\@nnil{% + \ifx##2\@empty\else + \ifx\\##1\\\global\let#2\@gobble + \else\xdef#2{\@gobble##1}\fi + \def\x####1,#1,####2####3\@nnil{\xdef#2{#2####1}}% + \x,##2##3,#1,\@nnil \fi }% - \expandafter\x#2,#1,\@nnil + \expandafter\x\expandafter,#2,#1,\@empty\@nnil } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@in@tlist} -% Test whether item is in token list. +%\begin{macro}{\MT@in@tlist@} +% Test whether item is in token list. Since this isn't too elegant, I thought +% that at least here, \cmd{\pdfmatch} would be more efficient -- however, it +% turned out to be even slower than this solution. % \begin{macrocode} \def\MT@in@tlist#1#2{% \MT@inlist@false @@ -3095,6 +3125,7 @@ time will almost certainly lead to undesired results. Have your choice!}% } % \end{macrocode} %\end{macro} +%\end{macro} %\begin{macro}{\MT@in@rlist} %\changes{v1.8}{2005/04/20}{made recursive} %\begin{macro}{\MT@in@rlist@} @@ -3107,17 +3138,15 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@inlist@false \MT@map@tlist@c#1\MT@in@rlist@ } -\def\MT@in@rlist@#1{% - \expandafter\MT@in@rlist@@#1% -} +\def\MT@in@rlist@#1{\expandafter\MT@in@rlist@@#1} \def\MT@in@rlist@@#1#2#3{% - \MT@ifeq{#2}\m@ne{% - \MT@ifeq{#1}\MT@size + \MT@ifdim{#2}=\m@ne{% + \MT@ifdim{#1}=\MT@size \MT@inlist@true \relax }{% - \MT@iflt\MT@size{#1}\relax{% - \MT@iflt\MT@size{#2}% + \MT@ifdim\MT@size<{#1}\relax{% + \MT@ifdim\MT@size<{#2}% \MT@inlist@true \relax }% @@ -3133,16 +3162,15 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\begin{macro}{\MT@loop} -%\changes{v1.2}{2004/09/23}{bug fix: new macro, used instead of \cmd{\loop}} +%\changes{v1.2}{2004/09/23}{fix: new macro, used instead of \cmd{\loop}} %\begin{macro}{\MT@iterate} %\begin{macro}{\MT@repeat} -% This is the same as \LaTeX's \cmd{\loop}, which we mustn't use, since this could -% confuse an outer \cmd{\loop} in the document. +% This is the same as \LaTeX's \cmd{\loop}, which we mustn't use, since this +% could confuse an outer \cmd{\loop} in the document. % \begin{macrocode} \def\MT@loop#1\MT@repeat{% \def\MT@iterate{#1\relax\expandafter\MT@iterate\fi}% - \MT@iterate - \let\MT@iterate\relax + \MT@iterate \let\MT@iterate\relax } \let\MT@repeat\fi % \end{macrocode} @@ -3150,9 +3178,20 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\begin{macro}{\MT@while@num} -% Sweetness. +% Execute \meta{\#3} from \meta{\#1} up to (excluding) \meta{\#2}. % \begin{macrocode} -\def\MT@while@num#1#2{\MT@loop #2\ifnum#1\MT@repeat} +\def\MT@while@num#1#2#3{% + \@tempcnta#1\relax + \MT@loop #3% + \advance\@tempcnta \@ne + \ifnum\@tempcnta < #2\MT@repeat +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@do@font} +% Execute \meta{\#1} 256 times. +% \begin{macrocode} +\def\MT@do@font{\MT@while@num\z@\@cclvi} % \end{macrocode} %\end{macro} %\changes{v1.4}{2004/11/12}{use one instead of five counters} @@ -3160,44 +3199,33 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@increment} % Increment macro \meta{\#1} by one. Saves using up too many counters. %\changes{v1.7}{2005/03/07}{use \etex's \cmd{\numexpr} if available} +% The \etex\ way is slightly faster. % \begin{macrocode} \newcount\MT@count -\ifcase\MT@etex@no +\MT@requires@etex{ + \def\MT@increment#1{\edef#1{\number\numexpr #1 + 1\relax}} +}{ \def\MT@increment#1{% \MT@count=#1\relax \advance\MT@count \@ne \edef#1{\number\MT@count}% } -\else -% \end{macrocode} -% The \etex\ way is slightly faster. -% \begin{macrocode} - \def\MT@increment#1{% - \edef#1{\number\numexpr #1 + 1\relax}% - } -\fi +} % \end{macrocode} %\end{macro} %\end{macro} %\begin{macro}{\MT@scale} %\changes{v1.7}{2005/02/12}{new macro: use \etex's \cs{numexpr} if available} -%\changes{v1.8}{2005/03/30}{bug fix: remove spaces in non-\etex\ variant -% (reported by Mark Rossi)} ^^A <mark.rossi\at de.bosch.com> -% ^^A in <d6uhag$qoi$1@ns2.fe.internet.bosch.com> +%\changes{v1.8}{2005/03/30}{fix: remove spaces in non-\etex\ variant +% (reported by \contributor Mark Rossi <mark.rossi\at de.bosch.com>)} +% ^^A in <MID:d6uhag$qoi$1@ns2.fe.internet.bosch.com> % Multiply and divide a counter. If we are using \etex, we will use its % \cmd{\numexpr} primitive. This has the advantage that it is less likely to % run into arithmetic overflow. The result of the division will be rounded % instead of truncated. Therefore, we'll get a different (more accurate) % result in about half of the cases. % \begin{macrocode} -\ifcase\MT@etex@no - \def\MT@scale#1#2#3{% - \multiply #1 #2\relax - \ifnum #3 = \z@ \else - \divide #1 #3\relax - \fi - } -\else +\MT@requires@etex{ \def\MT@scale#1#2#3{% \ifnum #3 = \z@ #1=\numexpr #1 * #2\relax @@ -3205,14 +3233,14 @@ time will almost certainly lead to undesired results. Have your choice!}% #1=\numexpr #1 * #2 / #3\relax \fi } -\fi -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@remove@spaces} -% Remove spaces around \meta{\#1} (\cmd{\KV@@sp@def} is from \pkg{keyval}). -% It will be neutralized in \cs{MT@begin@catcodes}. -% \begin{macrocode} -\def\MT@remove@spaces#1{\expandafter\KV@@sp@def\expandafter#1\expandafter{#1}} +}{ + \def\MT@scale#1#2#3{% + \multiply #1 #2\relax + \ifnum #3 = \z@ \else + \divide #1 #3\relax + \fi + } +} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@make@string} @@ -3230,12 +3258,6 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@abbr@pr@inh} %\begin{macro}{\MT@abbr@ex@inh} %\begin{macro}{\MT@abbr@nl} -%\begin{macro}{\MT@abbr@sp} -%\begin{macro}{\MT@abbr@sp@c} -%\begin{macro}{\MT@abbr@sp@inh} -%\begin{macro}{\MT@abbr@kn} -%\begin{macro}{\MT@abbr@kn@c} -%\begin{macro}{\MT@abbr@kn@inh} % Some abbreviations. Thus, we can have short command names but full-length % log output. % \begin{macrocode} @@ -3246,6 +3268,22 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@abbr@pr@inh{protrusion inheritance} \def\MT@abbr@ex@inh{expansion inheritance} \def\MT@abbr@nl{noligatures} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@abbr@sp} +%\begin{macro}{\MT@abbr@sp@c} +%\begin{macro}{\MT@abbr@sp@inh} +%\begin{macro}{\MT@abbr@kn} +%\begin{macro}{\MT@abbr@kn@c} +%\begin{macro}{\MT@abbr@kn@inh} +% Also for the experimental features. +% \begin{macrocode} %<*beta> \def\MT@abbr@sp{spacing} \def\MT@abbr@sp@c{interword spacing codes} @@ -3261,13 +3299,6 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} %\begin{macro}{\MT@rbba@protrusion} %\begin{macro}{\MT@rbba@expansion} %\begin{macro}{\MT@rbba@spacing} @@ -3285,6 +3316,306 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\end{macro} +%\begin{macro}{\MT@features} +%\changes{v1.9b}{2006/01/17}{use throughout the package to adjust to beta-ness} +%\begin{macro}{\MT@features@long} +% We can work on these lists to save some guards in the \file{dtx} file. +% \begin{macrocode} +\def\MT@features{pr,ex% +%<beta>,sp,kn% +} +\def\MT@features@long{protrusion,expansion% +%<beta>,spacing,kerning% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@is@feature} +%\changes{v1.9a}{2005/11/03}{new macro: check for \pdftex\ feature} +% Whenever an optional argument accepts a list of features, we can use this +% command to check whether a feature exists in order to prevent a rather +% confusing `|Missing \endcsname inserted|' error message. The feature (long +% form) must be in \cmd{\@tempa}, the type of list to ignore in \meta{\#1}, +% then comes the action. +% \begin{macrocode} +\def\MT@is@feature#1{% + \MT@exp@one@n\MT@in@clist\@tempa\MT@features@long + \ifMT@inlist@ + \expandafter\@firstofone + \else + \MT@error{`\@tempa' is not an available micro-typographic\MessageBreak + feature. Ignoring #1}{Available features are: `\MT@features@long'.}% + \expandafter\@gobble + \fi +} +% \end{macrocode} +%\end{macro} +% +% \subsection{Compatibility}\label{sub:compatibility} +% +% For the record, the following \LaTeX\ commands will be modified by \microtype: +%\begin{itemize} +% \item \cmd{\pickup@font} +% \item \cmd{\do@subst@correction} +% \item \cmd{\add@accent} +% \item \cmd{\showhyphens} +%\end{itemize} +% +%\begin{macro}{\MT@setup@} +%\changes{v1.9a}{2005/11/21}{defer setup until the end of the preamble} +% The setup is deferred until the end of the preamble. This has a couple of +% advantages: \cs{microtypesetup} can be used to change options later on in the +% preamble, and fonts don't have to be set up before \microtype. +% \begin{macrocode} +\let\MT@setup@\@empty +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@addto@setup} +% We use our private hook to have better control over the timing. +% \begin{macrocode} +\def\MT@addto@setup#1{% + \begingroup + \MT@toks\expandafter{\MT@setup@#1}% + \xdef\MT@setup@{\the\MT@toks}% + \endgroup +} +% \end{macrocode} +%\end{macro} +% It will be executed at the end of the preamble. +% \begin{macrocode} +\AtBeginDocument{\MT@setup@} +% \end{macrocode} +%\begin{macro}{\MT@with@package} +% We almost never do anything if a package is not loaded. +% \begin{macrocode} +\def\MT@with@package#1{\@ifpackageloaded{#1}\@firstofone\@gobble} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@pdfcprot@error} +%\changes{v1.4}{2004/11/04}{check for \pkg{pdfcprot}} +% Our competitor, the \pkg{pdfcprot} package, must not be tolerated! +% \begin{macrocode} +\def\MT@pdfcprot@error{% + \MT@error{Detected the `pdfcprot' package!\MessageBreak + `\MT@MT' and `pdfcprot' may not be used together}{% +The `pdfcprot' package provides an interface to character protrusion.\MessageBreak +So does the `\MT@MT' package. Using both packages at the same\MessageBreak +time will almost certainly lead to undesired results. Have your choice!}% + \let\MT@pdfcprot@error\relax +} +\MT@with@package{pdfcprot}\MT@pdfcprot@error +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ledmac@setup} +%\begin{macro}{\MT@led@unhbox@line} +%\begin{macro}{\MT@led@kern} +% The \pkg{ledmac} package first saves each paragraph in a box, from which it +% then splits off the lines one by one. This will destroy character protrusion. +% (There aren't any problems with the \pkg{lineno} package, since it takes a +% different approach.) +%\iffalse +% We issue a warning, so that nobody can say they didn't know. +%\changes{v1.6}{2004/12/29}{warning when using the \pkg{ledmac} package} +% --- This is fixed in \pdftex\ 1.21a, so we no longer warn. +%\changes{v1.6a}{2005/02/02}{no warning when using the \pkg{ledmac} package} +% --- Actually, it was completely broken in 1.21a, but 1.21b provides a work-around. +%\fi +% ---~\dots~--- +%\changes{v1.8}{2005/04/15}{character protrusion with \pkg{ledmac}} +% After much to and fro, the situation has finally settled and there is a fix. +% Beginning with \pdftex\ version 1.21b together with \file{ledpatch.sty} as of +% 2005/06/02 (v0.4), character protrusion will work at last. +% +% Peter Wilson was so kind to provide the \cmd{\l@dunhbox@line} hook in +% \pkg{ledmac} to allow for protrusion. \cmd{\leftmarginkern} and +% \cmd{\rightmarginkern} are new primitives of \pdftex\ 1.21b (aka. 1.30.0). +% \begin{macrocode} +\def\MT@ledmac@setup{% + \ifMT@protrusion + \MT@requires@pdftex5{% + \MT@ifdefined@c@TF\l@dunhbox@line{% + \MT@info@nl{Patching ledmac to enable character protrusion}% + \newdimen\MT@led@kern + \let\MT@led@unhbox@line\l@dunhbox@line + \renewcommand*{\l@dunhbox@line}[1]{% + \ifhbox##1% + \MT@led@kern=\rightmarginkern##1% + \kern\leftmarginkern##1% + \MT@led@unhbox@line##1% + \kern\MT@led@kern + \fi + }% + }{% + \MT@warning@nl{% + Character protrusion in paragraphs with line\MessageBreak + numbering will only work if you update ledmac}% + }% + }{% + \MT@warning@nl{% + The pdftex version you are using does not allow\MessageBreak + character protrusion in paragraphs with line\MessageBreak + numbering by the `ledmac' package.\MessageBreak + Upgrade pdftex to version 1.30 or later}% + }% + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@restore@p@h} +% Restore meaning of \cmd{\#} and \cmd{\%}. +% \begin{macrocode} +\def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@setupfont@hook} +% This hook will be executed every time a font is set up (inside a group). +% +% In the preamble, we check for the packages each time a font is set up. +% Thus, it will work regardless when the packages are loaded. +% +% Even for packages that don't activate any characters in the preamble (like +% \pkg{babel} and \pkg{csquotes}), we have to check here, too, in case they were +% loaded before \microtype, and a font is loaded \cmd{\AtBeginDocument}, before +% \microtype. +% (This is no longer needed, since the complete setup is now deferred until the +% end of the preamble. However, it is still necessary for \opt{defersetup}|=false|.) +% \begin{macrocode} +\def\MT@setupfont@hook{% +% \end{macrocode} +%\iffalse +%\changes{v1.7}{2005/02/06}{compatibility with the \pkg{chemsym} package} +% The \pkg{chemsym} package redefines, among other commands, the Hungarian +% umlaut \cmd{\H} in a way that cannot be parsed by \microtype. As a work-around, +% we restore the usual definition of \cmd{\H} before setting up the font (which +% will be done inside a group). +%\changes{v1.8}{2005/03/24}{remove superfluous \pkg{chemsym} hook} +% --- Since version 1.7, this is no longer needed, since our character parsing +% is robust enough now. +% +%\changes{v1.7}{2005/03/10}{compatibility with the \pkg{statex} package} +% Same for \pkg{statex}. +%\changes{v1.8}{2005/03/24}{remove superfluous \pkg{statex} hook} +% --- No longer needed, either. +%\fi +%\changes{v1.8}{2005/03/30}{restore percent character if Spanish \pkg{babel} is loaded} +% Spanish \pkg{babel} modifies \cmd{\%}, storing the original meaning in +% \cmd{\percentsign}. +% \begin{macrocode} + \@ifpackagewith{babel}{spanish}{% + \MT@ifdefined@c@T\percentsign{\let\%\percentsign}% + }\relax +% \end{macrocode} +%\changes{v1.8}{2005/04/22}{restore \pkg{csquotes}'s active characters} +% Using \cmd{\@disablequotes}, we can restore the original meaning of all +% characters made active by \pkg{csquotes}. +% (It would be doable for older versions, too, but we won't bother.) +% \begin{macrocode} + \MT@with@package{csquotes}{% + \@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax + }% +% \end{macrocode} +% \pkg{hyperref} redefines \cmd{\%} and \cmd{\#} inside a \cmd{\url}. We restore +% the original meanings (which we can only hope are correct). +%\changes{v1.8}{2005/05/20}{restore \cmd{\%} and \cmd{\#} when \pkg{hyperref} is loaded} +% Same for \pkg{tex4ht}. +%\changes{v1.9d}{2006/02/27}{restore \cmd{\%} and \cmd{\#} when \pkg{tex4ht} is loaded +% (reported by \contributor Peter Dyballa <Peter_Dyballa\at Web.DE>)} +% ^^A private mail, 26/2/2006 +% \begin{macrocode} + \@ifpackageloaded{hyperref}\MT@restore@p@h{% + \MT@with@package{tex4ht}\MT@restore@p@h + }% +} +% \end{macrocode} +%\end{macro} +% Check again at the end of the preamble. +% \begin{macrocode} +\MT@addto@setup{% + \MT@with@package{pdfcprot}\MT@pdfcprot@error + \MT@with@package{ledmac}\MT@ledmac@setup +% \end{macrocode} +% We can clean up \cs{MT@setupfont@hook} now. +% \begin{macrocode} + \let\MT@setupfont@hook\@empty + \@ifpackagewith{babel}{spanish}{% + \g@addto@macro\MT@setupfont@hook{% + \MT@ifdefined@c@T\percentsign{\let\%\percentsign}}% + }\relax + \MT@with@package{csquotes}{% + \@ifpackagelater{csquotes}{2005/05/11}{% + \g@addto@macro\MT@setupfont@hook\@disablequotes + }{% + \MT@warning@nl{% + Should you receive warnings about unknown slot\MessageBreak + numbers, try upgrading the `csquotes' package}% + }% + }% + \@ifpackageloaded{hyperref}{% + \g@addto@macro\MT@setupfont@hook\MT@restore@p@h +% \end{macrocode} +% We disable \microtype's additions inside \pkg{hyperref}'s \cmd{\pdfstringdef}, +% which redefines lots of commands. +%\changes{v1.9}{2005/09/10}{disable \microtype\ setup inside \pkg{hyperref}'s \cmd{\pdfstringdef} +% (reported by \contributor\thanh{} <hanthethanh\at gmail.com>)} +% ^^A private mail, 10/09/05 +% \begin{macrocode} + \pdfstringdefDisableCommands{% + \let\pickup@font\MT@orig@pickupfont +%<*beta> + \let\lsstyle\@empty + \def\textls#1#{\@firstofone}% +%</beta> + }% + }{% + \MT@with@package{tex4ht}{% + \g@addto@macro\MT@setupfont@hook\MT@restore@p@h + }% + }% +% \end{macrocode} +%\changes{v1.9b}{2005/12/19}{compatibility with the \pkg{listings} package +% (reported by \contributor Holger Uhr <huhr\at uni-paderborn.de>)} +% ^^A in: <MID:do4gvo$tv$1@news.uni-paderborn.de> +% The \pkg{listings} package makes numbers and letters active. +% \begin{macrocode} + \MT@with@package{listings}{% + \g@addto@macro\MT@begin@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}% + }% +% \end{macrocode} +%\changes{v1.9b}{2005/12/23}{compatibility with the \texttt{extendedchar} option of +% the \pkg{listings} package} +% When loaded with the |extendedchar| option, \pkg{listings} will also redefine +% 8-bit active characters (\pkg{inputenc}). Luckily, this simple redefinition +% will make them expand to their original definition, so that they could be used +% in the configuration. +% \begin{macrocode} + \g@addto@macro\MT@setupfont@hook{% + \let\lst@ProcessLetter\@empty + }% + }% +% \end{macrocode} +%\changes{v1.9b}{2005/12/21}{register with the \pkg{soul} package} +% 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. +% \begin{macrocode} +%<*beta> + \MT@with@package{soul}{% + \soulregister\lsstyle 0% + \soulregister\textls 1% + }% +%</beta> +} +% \end{macrocode} +%\changes{v1.6}{2005/01/19}{load a font, if none is active} +% We need a font (the \pkg{minimal} class doesn't load one). +% \begin{macrocode} +\expandafter\ifx\the\font\nullfont\normalfont\fi +% \end{macrocode} % %\subsection{Setting up a font} % @@ -3313,11 +3644,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \ifx\MT@familyalias\@empty \else \MT@exp@one@n\MT@find@file\MT@familyalias\fi % \end{macrocode} -%\changes{v1.2}{2004/09/26}{bug fix: call \cmd{\@@enc@update} if necessary} +%\changes{v1.2}{2004/09/26}{fix: call \cmd{\@@enc@update} if necessary} % We have to make sure that \cmd{\cf@encoding} expands to the correct value (for % later, in \cs{MT@get@slot}), which isn't the case when \cmd{\selectfont} % chooses a new encoding (this would be done a second later in % \cmd{\selectfont}, anyway -- three lines, to be exact). +% (I think, I do not need this anymore -- however, I'm too afraid to remove it.) % \begin{macrocode} \ifx\f@encoding\cf@encoding\else\@@enc@update\fi % \end{macrocode} @@ -3325,7 +3657,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % are \cmd{\let} to \cmd{\relax} if the respective feature is generally % disabled. % -% Protrusion has to be set up first, says Thành! +% Protrusion has to be set up first, says Th\`anh! % \begin{macrocode} \MT@protrusion \MT@expansion @@ -3364,7 +3696,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\changes{v1.2}{2004/09/29}{define alias font name as an alternative, not % as a replacement} % \begin{macrocode} - \MT@ifdefined@n{MT@\MT@family @alias}% + \MT@ifdefined@n@TF{MT@\MT@family @alias}% {\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}% {\let\MT@familyalias\@empty}% } @@ -3376,7 +3708,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\end{macro} -%\begin{macro}{\ifMT@do}\IndexNewif{MT@do} +%\begin{macro}{\ifMT@do} %\begin{macro}{\MT@feat} %\begin{macro}{\MT@maybe@do} % We check all features of the current font against the lists of the currently @@ -3398,7 +3730,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \MT@dotrue \MT@map@clist@n{font,encoding,family,series,shape,size}{% - \MT@ifdefined@n{MT@checklist@##1}% + \MT@ifdefined@n@TF{MT@checklist@##1}% {\csname MT@checklist@##1\endcsname}% {\MT@checklist@{##1}}% {#1}% @@ -3425,15 +3757,16 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@checklist@#1#2{% \edef\@tempa{\csname MT@#2@setname\endcsname}% - \MT@ifdefined@n{MT@#2list@#1@\@tempa}{% +%<!debug> \MT@ifdefined@n@T +%<debug> \MT@ifdefined@n@TF + {MT@#2list@#1@\@tempa}{% % \end{macrocode} -% Begin a \cmd{\expandafter} orgy to test whether the font characteristic is in +% Begin a \cmd{\expandafter} orgy to test whether the font attribute is in % the list. % \begin{macrocode} - \expandafter\expandafter\expandafter - \MT@in@clist\expandafter\expandafter\expandafter - {\csname MT@#1\expandafter\endcsname\expandafter}% - \csname MT@#2list@#1@\@tempa\endcsname + \expandafter\MT@exp@one@n\expandafter\MT@in@clist + \csname MT@#1\expandafter\endcsname + \csname MT@#2list@#1@\@tempa\endcsname \ifMT@inlist@ %<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#2}: #1 `\@nameuse{MT@#1}' in list}% \MT@dotrue @@ -3442,13 +3775,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@dofalse \expandafter\MT@clist@break \fi - }{% + }% % \end{macrocode} -% If no limitations have been specified, i.e. the list for a font characteristic +% If no limitations have been specified, i.e. the list for a font attribute % has not been defined at all, the font should be expanded resp. protruded. % \begin{macrocode} -%<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#2}: #1 list empty}% - }% +%<debug> {\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#2}: #1 list empty}}% } % \end{macrocode} %\end{macro} @@ -3457,9 +3789,21 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@checklist@font#1{% \edef\@tempa{\csname MT@#1@setname\endcsname}% - \MT@ifdefined@n{MT@#1list@font@\@tempa}{% - \MT@exp@two@n\MT@in@clist - \MT@font{\csname MT@#1list@font@\@tempa\endcsname}% +%<!debug> \MT@ifdefined@n@T +%<debug> \MT@ifdefined@n@TF + {MT@#1list@font@\@tempa}{% +% \end{macrocode} +% There mustn't be a space after the font name, hence we have to stringify it. +% There surely is a better way than this silly chain, however, I'm beginning to +% be haunted by \cmd{\expandafter}s in my dreams, so I have to leave it at +% that. +% \begin{macrocode} + \expandafter\expandafter\expandafter\MT@exp@one@n + \expandafter\expandafter\expandafter\MT@in@clist + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\string + \expandafter\MT@font\expandafter}% + \csname MT@#1list@font@\@tempa\endcsname \ifMT@inlist@ %<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: font `\MT@font' in list}% \expandafter\MT@clist@break @@ -3467,20 +3811,21 @@ time will almost certainly lead to undesired results. Have your choice!}% %<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: font `\MT@font' not in list}% \MT@dofalse \fi - }{% -%<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: font list empty}% }% +%<debug> {\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: font list empty}}% } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@checklist@family} % Also test for the alias font, if the original font is not in the list. -%\changes{v1.4b}{2004/11/22}{bug fix: don't try alias family name if encoding failed} -%\changes{v1.9}{2005/07/12}{bug fix: add two missing \cmd{\expandafter}s} +%\changes{v1.4b}{2004/11/22}{fix: don't try alias family name if encoding failed} +%\changes{v1.9}{2005/07/12}{fix: add two missing \cmd{\expandafter}s} % \begin{macrocode} \def\MT@checklist@family#1{% \edef\@tempa{\csname MT@#1@setname\endcsname}% - \MT@ifdefined@n{MT@#1list@family@\@tempa}{% +%<!debug> \MT@ifdefined@n@T +%<debug> \MT@ifdefined@n@TF + {MT@#1list@family@\@tempa}{% \MT@exp@two@n\MT@in@clist \MT@family{\csname MT@#1list@family@\@tempa\endcsname}% \ifMT@inlist@ @@ -3502,9 +3847,8 @@ time will almost certainly lead to undesired results. Have your choice!}% \ifMT@do \else \expandafter\MT@clist@break \fi - }{% -%<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: family list empty}% }% +%<debug> {\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: family list empty}}% } % \end{macrocode} %\end{macro} @@ -3513,7 +3857,9 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@checklist@size#1{% \edef\@tempa{\csname MT@#1@setname\endcsname}% - \MT@ifdefined@n{MT@#1list@size@\@tempa}{% +%<!debug> \MT@ifdefined@n@T +%<debug> \MT@ifdefined@n@TF + {MT@#1list@size@\@tempa}{% \expandafter\MT@in@rlist \csname MT@#1list@size@\@tempa\endcsname \ifMT@inlist@ @@ -3524,9 +3870,8 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@dofalse \expandafter\MT@clist@break \fi - }{% -%<debug>\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: size list empty}% }% +%<debug> {\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: size list empty}}% } % \end{macrocode} %\end{macro} @@ -3547,13 +3892,13 @@ time will almost certainly lead to undesired results. Have your choice!}% %\changes{v1.6}{2004/12/18}{introduce \texttt{factor} option} % \begin{macrocode} \def\MT@set@pr@codes{% - \MT@reset@pr@codes % \end{macrocode} % Check whether and if, which list should be applied to the current font. % \begin{macrocode} \MT@if@list@exists{% \MT@get@dimen@six \MT@get@opt + \MT@reset@pr@codes % \end{macrocode} % Get the name of the inheritance list and parse it. % \begin{macrocode} @@ -3561,14 +3906,14 @@ time will almost certainly lead to undesired results. Have your choice!}% % \end{macrocode} % Load additional lists? % \begin{macrocode} - \MT@load@list{\MT@pr@c@name}% + \MT@load@list\MT@pr@c@name + \MT@set@listname % \end{macrocode} % Load the main list. % \begin{macrocode} - \edef\MT@curr@list@name{protrusion list `\MT@pr@c@name'}% \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% \expandafter\MT@pr@do\@tempc,\relax,% - }\relax + }\MT@reset@pr@codes } % \end{macrocode} %\end{macro} @@ -3577,11 +3922,9 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@set@all@pr#1#2{% %<debug>\MT@dinfo@nl{3}{-- lp/rp: setting all to \number#1/\number#2}% - \@tempcnta=\z@ - \MT@while@num{\@tempcnta < \@cclvi}{% + \MT@do@font{% \lpcode\MT@font\@tempcnta=#1\relax \rpcode\MT@font\@tempcnta=#2\relax - \advance\@tempcnta \@ne }% } % \end{macrocode} @@ -3600,8 +3943,8 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@gobble@settings} %\begin{macro}{\MT@dimen@six} %\begin{macro}{\MT@get@dimen@six} -%\changes{v1.8}{2005/05/03}{new macro: test whether \cmd{\fontdimen}6 is defined} -% If \cmd{\fontdimen}\,6 is zero, character protrusion won't work, and we can +%\changes{v1.8}{2005/05/03}{new macro: test whether \fontdim6 is defined} +% If \fontdim6 is zero, character protrusion won't work, and we can % skip the settings (for example, the \pkg{dsfont} fonts don't specify this % dimension; this is probably a bug). % \begin{macrocode} @@ -3633,7 +3976,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % \end{macrocode} %\end{macro} %\begin{macro}{\MT@pr@split} -%\changes{v1.1}{2004/09/13}{bug fix: allow zero and negative values} +%\changes{v1.1}{2004/09/13}{fix: allow zero and negative values} %\changes{v1.8}{2005/05/25}{get character width once only} % The \pkg{keyval} package would remove spaces here, which we needn't do since % \cs{SetProtrusion} ignores spaces in the protrusion list anyway. @@ -3657,25 +4000,25 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@ifempty\@tempb\relax{% \MT@scale@to@em \lpcode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; lp (\MT@char): \number\lpcode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; lp (\MT@char): \number\lpcode\MT@font\MT@char: [#1]}% }% \def\@tempb{#2}% \MT@ifempty\@tempb\relax{% \MT@scale@to@em \rpcode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; rp (\MT@char): \number\rpcode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; rp (\MT@char): \number\rpcode\MT@font\MT@char: [#2]}% }% % \end{macrocode} % Now we can set the values for the inheriting characters. Their slot numbers % are saved in the macro |\MT@inh@|\meta{list name}|@|\meta{slot number}|@|. % \begin{macrocode} - \MT@ifdefined@c\MT@pr@inh@name{% - \MT@ifdefined@n{MT@inh@\MT@pr@inh@name @\MT@char @}{% + \MT@ifdefined@c@T\MT@pr@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{% \expandafter\MT@map@tlist@c \csname MT@inh@\MT@pr@inh@name @\MT@char @\endcsname \MT@set@pr@heirs - }\relax - }\relax + }% + }% } % \end{macrocode} %\end{macro} @@ -3695,7 +4038,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % The unit is in \cs{MT@count}, the desired factor in \cmd{\@tempb}, and the % result will be returned in \cmd{\@tempcntb}. % \begin{macrocode} -\ifnum\MT@pdftex@no > \tw@ +\MT@requires@pdftex3{ \def\MT@scale@to@em{% \@tempcntb=\MT@count\relax % \end{macrocode} @@ -3717,23 +4060,23 @@ time will almost certainly lead to undesired results. Have your choice!}% %\changes{v1.6}{2005/01/19}{use \etex's \cmd{\fontcharwd}, if available} %\changes{v1.8}{2005/05/25}{warning for missing (resp. zero-width) characters} % \begin{macrocode} - \ifcase\MT@etex@no + \MT@requires@etex{ \def\MT@get@charwd{% - \setbox\z@=\hbox{\MT@font \char\MT@char}% - \MT@count=\wd\z@\relax - \ifnum\MT@count=\z@ \MT@warn@missing@char \fi + \MT@count=\fontcharwd\MT@font\MT@char\relax + \ifnum\MT@count=\z@ \MT@info@missing@char \fi } - \else + }{ \def\MT@get@charwd{% - \MT@count=\number\fontcharwd\MT@font\MT@char\relax - \ifnum\MT@count=\z@ \MT@warn@missing@char \fi + \setbox\z@=\hbox{\MT@font \char\MT@char}% + \MT@count=\wd\z@\relax + \ifnum\MT@count=\z@ \MT@info@missing@char \fi } - \fi + } % \end{macrocode} %\end{macro} % No adjustment with versions 0.14f and 0.14g. % \begin{macrocode} -\else +}{ \def\MT@scale@to@em{% \MT@count=\@tempb\relax \ifnum\MT@count=\z@ \else @@ -3744,33 +4087,45 @@ time will almost certainly lead to undesired results. Have your choice!}% % We need this in \cs{MT@warn@code@too@large} (neutralized). % \begin{macrocode} \def\MT@get@charwd{\MT@count=\MT@dimen@six} -\fi +} % \end{macrocode} %\begin{macro}{\MT@get@font@dimen} % For the |space| unit. +%\changes{v1.9d}{2006/02/13}{warning for zero fontdimen} % \begin{macrocode} \def\MT@get@font@dimen#1{% - \MT@count=\number\fontdimen#1\MT@font + \ifnum\fontdimen#1\MT@font=\z@ + \MT@warning@nl{Font \font@name does not specify its\MessageBreak + \@backslashchar fontdimen \number#1 (it's zero).\MessageBreak + You should use a different `unit' for \MT@curr@list@name}% + \else + \MT@count=\fontdimen#1\MT@font + \fi } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@warn@missing@char} -% Warning for missing characters, or characters with zero width. +%\begin{macro}{\MT@info@missing@char} +%\changes{v1.9a}{2005/11/17}{info instead of warning +% (after \contributor Michael Hoppe <mh\at michael-hoppe.de> reported that +% the `fl' ligature is missing in Palatino SC)} +% ^^A in: <MID:1h64d0x.16xsx9n1151dieN%mh@michael-hoppe.de> +% Info about missing characters, or characters with zero width. % \begin{macrocode} -\ifcase\MT@etex@no \MT@hop@else@fi{% - \def\MT@warn@missing@char{% - \MT@warning@nl{% - Character `\the\mt@toks' has a width of 0pt\MessageBreak - (it's probably missing) in font `\MT@exp@string\MT@font'.\MessageBreak - It cannot be protruded}% +\MT@requires@etex{ + \def\MT@info@missing@char{% + \MT@info@nl{Character `\the\MT@toks' \iffontchar\MT@font\MT@char + has a width of 0pt \else is missing \fi in font\MessageBreak + `\MT@exp@string\MT@font'. Ignoring protrusion settings\MessageBreak + for this character}% } -}\else\MT@hop@fi{% - \def\MT@warn@missing@char{% - \MT@warning@nl{Character `\the\mt@toks' - \iffontchar\MT@font\MT@char has a width of 0pt \else is missing \fi - in font\MessageBreak `\MT@exp@string\MT@font'. It cannot be protruded}% +}{ + \def\MT@info@missing@char{% + \MT@info@nl{% + Character `\the\MT@toks' has a width of 0pt\MessageBreak + (it's probably missing) in font `\MT@exp@string\MT@font'.\MessageBreak + Ignoring protrusion settings for this character}% } -}\fi +} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@scale@factor} @@ -3783,13 +4138,11 @@ time will almost certainly lead to undesired results. Have your choice!}% \expandafter\MT@scale\expandafter \@tempcntb \csname MT@\MT@feat @factor@\endcsname \@m \fi - \ifnum\@tempcntb > \csname MT@\MT@feat @max\endcsname\relax - \@tempcnta=\csname MT@\MT@feat @max\endcsname - \MT@warn@code@too@large + \ifnum\@tempcntb>\csname MT@\MT@feat @max\endcsname\relax + \expandafter\MT@warn@code@too@large\csname MT@\MT@feat @max\endcsname \else \ifnum\@tempcntb<\csname MT@\MT@feat @min\endcsname\relax - \@tempcnta=\csname MT@\MT@feat @min\endcsname - \MT@warn@code@too@large + \expandafter\MT@warn@code@too@large\csname MT@\MT@feat @min\endcsname \fi \fi } @@ -3798,10 +4151,12 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@warn@code@too@large} % Type out a warning if a chosen protrusion factor is too large after the % conversion. As a special service, we also type out the maximum amount that -% may be specified in the configuration file. +% may be specified in the configuration. %\changes{v1.7}{2005/02/17}{new macro: type out maximum protrusion factor} +%\changes{v1.9b}{2006/01/03}{fix calculation with present factor} % \begin{macrocode} -\def\MT@warn@code@too@large{% +\def\MT@warn@code@too@large#1{% + \@tempcnta=#1\relax \ifnum\csname MT@\MT@feat @factor@\endcsname=\@m \else \expandafter\MT@scale\expandafter\@tempcnta\expandafter\@m \csname MT@\MT@feat @factor@\endcsname @@ -3809,16 +4164,15 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@scale\@tempcnta \MT@dimen@six \MT@count \MT@warning@nl{The \@nameuse{MT@abbr@\MT@feat} code \@tempb\space is too large for character\MessageBreak - `\the\mt@toks' in \MT@curr@list@name.\MessageBreak + `\the\MT@toks' in \MT@curr@list@name.\MessageBreak Setting it to the maximum of \number\@tempcnta}% - \@tempcntb=\@tempcnta + \@tempcntb=#1\relax } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@get@opt} -% The optional argument to \cs{SetProtrusion}, \cs{SetExtraSpacing} and -% \cs{SetExtraKerning} (\cs{SetExpansion} is being dealt with in -% \cs{MT@get@ex@opt}). +% The optional argument to the configuration commands (except for +% \cs{SetExpansion} which is being dealt with in \cs{MT@get@ex@opt}). % \begin{macrocode} \def\MT@get@opt{% % \end{macrocode} @@ -3827,7 +4181,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@kn@factor@} % Apply a factor? % \begin{macrocode} - \MT@ifdefined@n{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}{% + \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}{% \MT@let@nn{MT@\MT@feat @factor@} {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}% \MT@vinfo{... : Multiplying \@nameuse{MT@abbr@\MT@feat} codes by @@ -3846,7 +4200,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % If it's \cmd{\@empty}, it's relative to character widths, if it's -1, relative % to space dimensions. % \begin{macrocode} - \MT@ifdefined@n{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{% + \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{% \MT@let@nn{MT@\MT@feat @unit@}% {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}% \expandafter\ifx\csname MT@\MT@feat @unit@\endcsname\@empty @@ -3886,13 +4240,17 @@ time will almost certainly lead to undesired results. Have your choice!}% % \end{macrocode} %\end{macro} %\end{macro} -% Preset all characters? +% Preset all characters? If so, we surely don't need to reset, too. %\changes{v1.9}{2005/10/08}{new key `\texttt{preset}' to set all characters to % the specified value before loading the lists} +%\changes{v1.9d}{2006/02/13}{set list name before presetting} +%\changes{v1.9d}{2006/02/18}{optimize: don't reset when \texttt{preset} option is set} % \begin{macrocode} - \MT@ifdefined@n{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{% + \MT@ifdefined@n@T{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{% + \MT@set@listname \csname MT@preset@\MT@feat\endcsname - }\relax + \MT@let@nc{MT@reset@\MT@feat @codes}\relax + }% } % \end{macrocode} %\end{macro} @@ -3918,7 +4276,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \else \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} factors relative to \the\@tempdima}% - \MT@count=\number\@tempdima\relax + \MT@count=\@tempdima\relax \fi } \def\MT@get@unit@#1e#2#3\@nil{% @@ -3951,6 +4309,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\begin{macro}{\MT@preset@pr} %\begin{macro}{\MT@preset@pr@} +% Preset characters. Presetting them relative to their widths is not allowed. % \begin{macrocode} \def\MT@preset@pr{% \expandafter\expandafter\expandafter\MT@preset@pr@ @@ -3958,10 +4317,7 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@preset@pr@#1,#2\@nil{% \ifx\MT@pr@unit@\@empty - \MT@warning@nl{% - Cannot preset characters relative to their widths\MessageBreak - for protrusion list `\MT@pr@c@name'. Presetting them\MessageBreak - relative to 1em instead}% + \MT@warn@preset@towidth{pr}% \let\MT@preset@aux\MT@preset@aux@factor \else \let\MT@preset@aux\MT@preset@aux@space @@ -3993,6 +4349,16 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\end{macro} +%\begin{macro}{\MT@warn@preset@towidth} +% \begin{macrocode} +\def\MT@warn@preset@towidth#1{% + \MT@warning@nl{% + Cannot preset characters relative to their widths\MessageBreak + for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'. Presetting them% + \MessageBreak relative to 1em instead}% +} +% \end{macrocode} +%\end{macro} % %\subsubsection{Expansion} % @@ -4014,8 +4380,8 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@get@ex@opt \MT@reset@ef@codes \MT@get@inh@list - \MT@load@list{\MT@ex@c@name}% - \edef\MT@curr@list@name{expansion list `\MT@ex@c@name'}% + \MT@load@list\MT@ex@c@name + \MT@set@listname \MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}% \expandafter\MT@ex@do\@tempc,\relax,% \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax @@ -4027,7 +4393,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@set@ex@codes@n} % If, on the other hand, all characters should be expanded by the same amount, % we only take the first optional argument to \cs{SetExpansion} into account. -%\begin{macro}{\ifMT@nonselected}\IndexNewif{MT@nonselected} +%\begin{macro}{\ifMT@nonselected} % We need this boolean in \cs{MT@if@list@exists} so that no warning for missing % lists will be issued. % \begin{macrocode} @@ -4068,11 +4434,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@set@all@ex#1{% %<debug>\MT@dinfo@nl{3}{-- ex: setting all to \number#1}% - \@tempcnta=\z@ - \MT@while@num{\@tempcnta < \@cclvi}{% - \efcode\MT@font\@tempcnta=#1\relax - \advance\@tempcnta \@ne - }% + \MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}% } \def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@} % \end{macrocode} @@ -4082,15 +4444,15 @@ time will almost certainly lead to undesired results. Have your choice!}% % However, this is only necessary for versions prior to~1.20. %\changes{v1.6a}{2005/01/30}{only reset \cmd{\efcode}s for older \pdftex\ versions} % \begin{macrocode} -\ifnum\MT@pdftex@no < 4 - \let\MT@reset@ef@codes\MT@reset@ef@codes@ -\else +\MT@requires@pdftex4{ \def\MT@reset@ef@codes{% \ifnum\MT@ex@factor@=\@m \else \MT@reset@ef@codes@ \fi } -\fi +}{ + \let\MT@reset@ef@codes\MT@reset@ef@codes@ +} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@ex@do} @@ -4126,17 +4488,17 @@ time will almost certainly lead to undesired results. Have your choice!}% \fi \fi \efcode\MT@font\MT@char=\@tempcntb -%<debug> \MT@dinfo@nl{4}{::: ef (\MT@char): \number\efcode\MT@font\MT@char}% +%<debug> \MT@dinfo@nl{4}{::: ef (\MT@char): \number\efcode\MT@font\MT@char: [#2]}% % \end{macrocode} % Heirs, heirs, I love thy heirs. % \begin{macrocode} - \MT@ifdefined@c\MT@ex@inh@name{% - \MT@ifdefined@n{MT@inh@\MT@ex@inh@name @\MT@char @}{% + \MT@ifdefined@c@T\MT@ex@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{% \expandafter\MT@map@tlist@c \csname MT@inh@\MT@ex@inh@name @\MT@char @\endcsname \MT@set@ex@heirs - }\relax - }\relax + }% + }% \fi \fi } @@ -4145,15 +4507,15 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@warn@ex@too@large} % \begin{macrocode} \def\MT@warn@ex@too@large#1{% - \MT@warning@nl{Expansion factor - \number\@tempcntb\space too large for character\MessageBreak - `\the\mt@toks' in \MT@curr@list@name.\MessageBreak + \MT@warning@nl{Expansion factor \number\@tempcntb\space too large for + character\MessageBreak `\the\MT@toks' in \MT@curr@list@name.\MessageBreak Setting it to the maximum of \number#1}% \@tempcntb=#1\relax } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@get@ex@opt} +%\changes{v1.9d}{2006/02/13}{fix: evaluate \texttt{preset}} %\begin{macro}{\MT@ex@factor@} %\begin{macro}{\MT@stretch@} %\begin{macro}{\MT@shrink@} @@ -4162,37 +4524,21 @@ time will almost certainly lead to undesired results. Have your choice!}% % Apply different values to this font? % \begin{macrocode} \def\MT@get@ex@opt{% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @factor}{% + \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{% \MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}% \MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}% }{% \let\MT@ex@factor@\MT@ex@factor }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @stretch}{% - \MT@let@cn\MT@stretch@{MT@ex@c@\MT@ex@c@name @stretch}% - \MT@vinfo{... : Setting stretch limit to \number\MT@stretch@}% - }{% - \let\MT@stretch@\MT@stretch - }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @shrink}{% - \MT@let@cn\MT@shrink@{MT@ex@c@\MT@ex@c@name @shrink}% - \MT@vinfo{... : Setting shrink limit to \number\MT@shrink@}% - }{% - \let\MT@shrink@\MT@shrink - }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @step}{% - \MT@let@cn\MT@step@{MT@ex@c@\MT@ex@c@name @step}% - \MT@vinfo{... : Setting expansion step to \number\MT@step@}% - }{% - \let\MT@step@\MT@step - }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @auto}{% - \MT@let@cn\MT@auto@{MT@ex@c@\MT@ex@c@name @auto}% - \def\@tempa{autoexpand}% - \MT@vinfo{... : \ifx\@tempa\MT@auto@ En\else Dis\fi - abling automatic expansion}% - }{% - \let\MT@auto@\MT@auto + \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}% + \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}% + \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}% + \def\@tempa{autoexpand}% + \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}% + \MT@ifdefined@n@T{MT@ex@c@\csname MT@ex@c@name\endcsname @preset}{% + \MT@set@listname + \MT@preset@ex + \let\MT@reset@ef@codes\relax }% } % \end{macrocode} @@ -4202,6 +4548,18 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\end{macro} +%\begin{macro}{\MT@get@ex@opt@} +% \begin{macrocode} +\def\MT@get@ex@opt@#1#2{% + \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{% + \MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}% + \MT@vinfo{... : #2}% + }{% + \MT@let@nn{MT@#1@}{MT@#1}% + }% +} +% \end{macrocode} +%\end{macro} %\begin{macro}{\MT@set@ex@heirs} % \begin{macrocode} \def\MT@set@ex@heirs#1{% @@ -4232,27 +4590,27 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@spacing} % Adjustment of interword spacing? Only for sufficiently new versions of \pdftex. % \begin{macrocode} -\ifnum\MT@pdftex@no > 5 +\MT@requires@pdftex6{ \def\MT@spacing{\MT@maybe@do{sp}} -\else +}{ \let\MT@spacing\relax -\fi +} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@set@sp@codes} % This is all the same. % \begin{macrocode} \def\MT@set@sp@codes{% - \MT@reset@sp@codes \MT@if@list@exists{% \MT@get@dimen@six \MT@get@opt + \MT@reset@sp@codes \MT@get@inh@list - \MT@load@list{\MT@sp@c@name}% - \edef\MT@curr@list@name{spacing list `\MT@sp@c@name'}% + \MT@load@list\MT@sp@c@name + \MT@set@listname \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}% \expandafter\MT@sp@do\@tempc,\relax,% - }\relax + }\MT@reset@sp@codes } % \end{macrocode} %\end{macro} @@ -4291,29 +4649,29 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@get@space@unit\tw@ \MT@scale@to@em \knbscode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; knbs (\MT@char): \number\knbscode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; knbs (\MT@char): \number\knbscode\MT@font\MT@char: [#1]}% }% \def\@tempb{#2}% \MT@ifempty\@tempb\relax{% \MT@get@space@unit\thr@@ \MT@scale@to@em \stbscode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; stbs (\MT@char): \number\stbscode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; stbs (\MT@char): \number\stbscode\MT@font\MT@char: [#2]}% }% \def\@tempb{#3}% \MT@ifempty\@tempb\relax{% \MT@get@space@unit4% \MT@scale@to@em \shbscode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; shbs (\MT@char): \number\shbscode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; shbs (\MT@char): \number\shbscode\MT@font\MT@char: [#3]}% }% - \MT@ifdefined@c\MT@sp@inh@name{% - \MT@ifdefined@n{MT@inh@\MT@sp@inh@name @\MT@char @}{% + \MT@ifdefined@c@T\MT@sp@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@sp@inh@name @\MT@char @}{% \expandafter\MT@map@tlist@c \csname MT@inh@\MT@sp@inh@name @\MT@char @\endcsname \MT@set@sp@heirs - }\relax - }\relax + }% + }% } % \end{macrocode} %\end{macro} @@ -4338,12 +4696,10 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@set@all@sp#1#2#3{% %<debug>\MT@dinfo@nl{3}{-- knbs/stbs/shbs: setting all to \number#1/\number#2/\number#3}% - \@tempcnta=\z@ - \MT@while@num{\@tempcnta < \@cclvi}{% + \MT@do@font{% \knbscode\MT@font\@tempcnta=#1\relax \stbscode\MT@font\@tempcnta=#2\relax \shbscode\MT@font\@tempcnta=#3\relax - \advance\@tempcnta \@ne }% } \def\MT@reset@sp@codes@{\MT@set@all@sp\z@\z@\z@} @@ -4361,10 +4717,7 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@preset@sp@#1,#2,#3\@nil{% \ifx\MT@sp@unit@\@empty - \MT@warning@nl{% - Cannot preset characters relative to their widths\MessageBreak - for spacing list `\MT@sp@c@name'. Presetting them\MessageBreak - relative to 1em instead}% + \MT@warn@preset@towidth{sp}% \MT@preset@aux@factor{#1}\@tempa \MT@preset@aux@factor{#2}\@tempc \MT@preset@aux@factor{#3}\@tempb @@ -4390,26 +4743,27 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@kerning} % Again, only check for additional kerning for new versions of \pdftex. % \begin{macrocode} -\ifnum\MT@pdftex@no > 5 +\MT@requires@pdftex6{ \def\MT@kerning{\MT@maybe@do{kn}} -\else +}{ \let\MT@kerning\relax -\fi +} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@set@kn@codes} +% It's getting boring, I know. % \begin{macrocode} \def\MT@set@kn@codes{% - \MT@reset@kn@codes \MT@if@list@exists{% \MT@get@dimen@six \MT@get@opt + \MT@reset@kn@codes \MT@get@inh@list - \MT@load@list{\MT@kn@c@name}% - \edef\MT@curr@list@name{kerning list `\MT@kn@c@name'}% + \MT@load@list\MT@kn@c@name + \MT@set@listname \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}% \expandafter\MT@kn@do\@tempc,\relax,% - }\relax + }\MT@reset@kn@codes } % \end{macrocode} %\end{macro} @@ -4439,7 +4793,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\begin{macro}{\MT@kn@split@val} % Again, the unit may be measured in the space dimension; this time only -% \cmd{\fontdimen}\,2. +% \fontdim2. % \begin{macrocode} \def\MT@kn@split@val#1,#2\relax{% \def\@tempb{#1}% @@ -4447,22 +4801,22 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@get@space@unit\tw@ \MT@scale@to@em \knbccode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; knbc (\MT@char): \number\knbccode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; knbc (\MT@char): \number\knbccode\MT@font\MT@char: [#1]}% }% \def\@tempb{#2}% \MT@ifempty\@tempb\relax{% \MT@get@space@unit\tw@ \MT@scale@to@em \knaccode\MT@font\MT@char=\@tempcntb -%<debug>\MT@dinfo@nl{4}{;;; knac (\MT@char): \number\knaccode\MT@font\MT@char}% +%<debug>\MT@dinfo@nl{4}{;;; knac (\MT@char): \number\knaccode\MT@font\MT@char: [#2]}% }% - \MT@ifdefined@c\MT@kn@inh@name{% - \MT@ifdefined@n{MT@inh@\MT@kn@inh@name @\MT@char @}{% + \MT@ifdefined@c@T\MT@kn@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@kn@inh@name @\MT@char @}{% \expandafter\MT@map@tlist@c \csname MT@inh@\MT@kn@inh@name @\MT@char @\endcsname \MT@set@kn@heirs - }\relax - }\relax + }% + }% } % \end{macrocode} %\end{macro} @@ -4485,11 +4839,9 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@set@all@kn#1#2{% %<debug>\MT@dinfo@nl{3}{-- knac/knbc: setting all to \number#1/\number#2}% - \@tempcnta=\z@ - \MT@while@num{\@tempcnta < \@cclvi}{% + \MT@do@font{% \knbccode\MT@font\@tempcnta=#1\relax \knaccode\MT@font\@tempcnta=#2\relax - \advance\@tempcnta \@ne }% } \def\MT@reset@kn@codes@{\MT@set@all@kn\z@\z@} @@ -4507,10 +4859,7 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@preset@kn@#1,#2\@nil{% \ifx\MT@kn@unit@\@empty - \MT@warning@nl{% - Cannot preset characters relative to their widths\MessageBreak - for kerning list `\MT@kn@c@name'. Presetting them\MessageBreak - relative to 1em instead}% + \MT@warn@preset@towidth{kn}% \let\MT@preset@aux\MT@preset@aux@factor \else \let\MT@preset@aux\MT@preset@aux@space @@ -4536,53 +4885,53 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\lsstyle} % Letterspacing is a special case of extra kerning. It will temporarily switch % kerning on, activate the |all| font set and load the |letterspacing| context. -% The list must have the name |letterspacing|, so that the factor will be -% applied. % \begin{macrocode} -\ifnum\MT@pdftex@no > 5 +\MT@requires@pdftex6{ \DeclareRobustCommand\lsstyle{% \ifMT@kerning % \end{macrocode} -% We have to add the current font to the active kerning font set, so that the -% letterspacing will be reset. This will fail for font switches inside -% \cs{lsstyle}. +% We have to add the current font to the active kerning font set, so that it is +% guaranteed to be reset. This will fail for font switches inside \cs{lsstyle}. %\todo{fix font switch} +%\changes{v1.9d}{2006/02/20}{fix: font was always added to list} % \begin{macrocode} \begingroup - \escapechar\m@ne - \expandafter\MT@exp@two@n\expandafter\MT@in@clist - \csname\curr@fontshape/\f@size\expandafter\endcsname - \csname MT@knlist@font@\MT@kn@setname\endcsname - \ifMT@inlist@ \else - \expandafter\MT@xadd - \csname MT@knlist@font@\MT@kn@setname\endcsname - {\csname\curr@fontshape/\f@size\endcsname,}% - \fi + \escapechar\m@ne + \expandafter\MT@exp@two@n\expandafter\MT@in@clist\expandafter + {\expandafter\string\expandafter + \csname\curr@fontshape/\f@size\expandafter\endcsname}% + {\csname MT@knlist@font@\MT@kn@setname\endcsname}% + \ifMT@inlist@ \else + \expandafter\MT@xadd + \csname MT@knlist@font@\MT@kn@setname\endcsname + {\MT@exp@string\csname\curr@fontshape/\f@size\endcsname,}% + \fi \endgroup \fi \MT@kerningtrue \pdfappendkern\@ne \pdfprependkern\@ne \def\MT@kn@setname{all}% - \MT@ifdefined@c\MT@letterspacing@\relax{% + \MT@ifdefined@c@TF\MT@letterspacing@\relax{% \let\MT@letterspacing@\MT@letterspacing }% \microtypecontext{kerning=letterspacing}% } -\else +}{ \DeclareRobustCommand\lsstyle{% - \MT@warning{Letterspacing only works with pdftex version 1.3x\MessageBreak + \MT@warning{Letterspacing only works with pdftex version 1.40\MessageBreak or newer. You might want to use the `soul' package\MessageBreak instead}% \global\let\lsstyle\relax } -\fi +} % \end{macrocode} %\end{macro} %\begin{macro}{\textls} +%\changes{v2.0}{2005/09/21}{new command: letterspacing} +%\begin{macro}{\MT@letterspacing@} % This command may be used like the other text commands. The optional argument % may be used to change the letterspacing factor. -%\changes{v2.0}{2005/09/21}{new command: letterspacing} % \begin{macrocode} \DeclareRobustCommand\textls[2][]{% \MT@ifempty{#1}{% @@ -4595,20 +4944,19 @@ time will almost certainly lead to undesired results. Have your choice!}% %</beta> % \end{macrocode} %\end{macro} +%\end{macro} % %\subsubsection{Disabling Ligatures} % %\begin{macro}{\MT@noligatures} -% The possibility to disable ligatures is a new features of \pdftex\ 1.30.0. +% The possibility to disable ligatures is a new features of \pdftex\ 1.30. % \begin{macrocode} -\ifnum\MT@pdftex@no < 5 \MT@hop@else@fi{% - \let\MT@noligatures\relax -}\else\MT@hop@fi{% +\MT@requires@pdftex5{ \def\MT@noligatures{% - \csname ifMT@\MT@abbr@nl\endcsname + \ifMT@noligatures \MT@dotrue \MT@map@clist@n{font,encoding,family,series,shape,size}{% - \MT@ifdefined@n{MT@checklist@##1}% + \MT@ifdefined@n@TF{MT@checklist@##1}% {\csname MT@checklist@##1\endcsname}% {\MT@checklist@{##1}}% {nl}% @@ -4621,7 +4969,9 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@vinfo{... Disabling ligatures}% \fi } -}\fi +}{ + \let\MT@noligatures\relax +} % \end{macrocode} %\end{macro} % @@ -4639,12 +4989,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@warning{\@nameuse{MT@abbr@\MT@feat} list `\@tempa' cannot load itself}% }{% \ifx\@tempb\relax \else - \MT@ifdefined@n{MT@\MT@feat @c@\@tempb}{% + \MT@ifdefined@n@TF{MT@\MT@feat @c@\@tempb}{% \MT@vinfo{... : First loading \@nameuse{MT@abbr@\MT@feat} list `\@tempb'}% \begingroup - \MT@load@list{\@tempb}% + \MT@load@list\@tempb \endgroup - \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list `\@tempb'}% + \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\MessageBreak`\@tempb'}% \MT@let@cn\@tempc{MT@\MT@feat @c@\@tempb}% \expandafter\csname MT@\MT@feat @do\expandafter\endcsname\@tempc,\relax,% }{% @@ -4657,9 +5007,9 @@ time will almost certainly lead to undesired results. Have your choice!}% % \end{macrocode} %\end{macro} %\changes{v1.1}{2004/09/13}{configuration file names in lowercase -% (suggested by Harald Harders)} +% (suggested by \contributor Harald Harders <h.harders\at tu-bs.de>)} %\begin{macro}{\MT@find@file} -%\changes{v1.1}{2004/09/14}{bug fix: also check whether the file for the base +%\changes{v1.1}{2004/09/14}{fix: also check whether the file for the base % font family has already been loaded} % Micro-typographic settings may be written into a file |mt-|\meta{font family}|.cfg|. %\changes{v1.8}{2005/04/16}{no longer wrap names in commands} @@ -4679,24 +5029,26 @@ time will almost certainly lead to undesired results. Have your choice!}% % commands that may be used there have to be defined globally. % \begin{macrocode} \MT@begin@catcodes - \let\MT@begin@catcodes\relax - \let\MT@end@catcodes\relax - \InputIfFileExists{mt-#1.cfg}{% - \MT@vinfo{... Loading configuration file mt-#1.cfg}% - \MT@xadd\MT@file@list{#1,}% - }{% - \expandafter\MT@get@basefamily#1\relax\relax\relax - \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list - \ifMT@inlist@\else - \InputIfFileExists{mt-\@tempa.cfg}{% - \MT@vinfo{... Loading configuration file mt-\@tempa.cfg}% - \MT@xadd\MT@file@list{\@tempa,#1,}% - }{% - \MT@vinfo{... No configuration file mt-#1.cfg}% - \MT@xadd\MT@file@list{#1,}% - }% - \fi - }% + \let\MT@begin@catcodes\relax + \let\MT@end@catcodes\relax + \InputIfFileExists{mt-#1.cfg}{% + \edef\MT@curr@file{mt-#1.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + \MT@xadd\MT@file@list{#1,}% + }{% + \expandafter\MT@get@basefamily#1\relax\relax\relax + \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list + \ifMT@inlist@\else + \InputIfFileExists{mt-\@tempa.cfg}{% + \edef\MT@curr@file{mt-\@tempa.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + \MT@xadd\MT@file@list{\@tempa,#1,}% + }{% + \MT@vinfo{... No configuration file mt-#1.cfg}% + \MT@xadd\MT@file@list{#1,}% + }% + \fi + }% \endgroup \fi } @@ -4707,9 +5059,9 @@ time will almost certainly lead to undesired results. Have your choice!}% % Especially, new lines and spaces should be ignored, since files might be % loaded in the middle of the document. This is basically \cmd{\nfss@catcodes} % (from the \LaTeX\ kernel). I've added: -%\changes{v1.4a}{2004/11/16}{bug fix: reset some more catcodes when reading files -% (reported by Michael Hoppe)} ^^A <mh\at michael-hoppe.de> -% ^^A in <MID:p06002000bdbff1f93eb7@[192.168.0.34]> +%\changes{v1.4a}{2004/11/16}{fix: reset some more catcodes when reading files +% (reported by \contributor Michael Hoppe <mh\at michael-hoppe.de>)} +% ^^A in <MID:p06002000bdbff1f93eb7@[192.168.0.34]> % |&| (in |tabular|s), |!|, |?|, |;|, %\changes{v1.7}{2005/02/06}{reset catcode of `\texttt{:}' % (compatibility with \pkg{french}* packages)} @@ -4718,9 +5070,10 @@ time will almost certainly lead to undesired results. Have your choice!}% % (compatibility with Turkish \pkg{babel})} % and |=| (Turkish \pkg{babel}). % -%\changes{v1.8}{2005/03/29}{reset catcodes of the remaining \ascii\ characters} +%\changes{v1.8}{2005/03/29}{reset catcodes of the remaining <ASCII> characters} % OK, now all printable characters up to 127 are `other'. We hope that letters -% are always letters and numbers other. +% are always letters and numbers other. (\pkg{listings} makes them active, see +% section~\ref{sub:compatibility}.) % % We leave |^| at catcode 7, so that stuff like `|^^ff|' remains possible. % @@ -4748,7 +5101,6 @@ time will almost certainly lead to undesired results. Have your choice!}% % \end{macrocode} % Inside the configuration files, we don't have to bother about spaces. % \begin{macrocode} - \def\MT@remove@spaces##1{}% \let\KV@@sp@def\def } % \end{macrocode} @@ -4767,9 +5119,9 @@ time will almost certainly lead to undesired results. Have your choice!}% % or for swash capitals (|x|, |j| or |w|). We mustn't simply remove the last % letter, as this would make for instance |cms| out of |cmss| \textit{and} % |cmsy| (OK, |cmex| will still become |cme|~\dots). -%\changes{v1.4b}{2004/11/25}{bug fix: failed for font names of the form \texttt{abczz} -% (reported by Georg Verweyen)} ^^A <Georg.Verweyen\at WEB.DE> -% ^^A in: <MID:41A64DC7.7040404@web.de> +%\changes{v1.4b}{2004/11/25}{fix: failed for font names of the form \texttt{abczz} +% (reported by \contributor Georg Verweyen <Georg.Verweyen\at WEB.DE>)} +% ^^A in: <MID:41A64DC7.7040404@web.de> % \begin{macrocode} \def\MT@get@basefamily#1#2#3#4\relax{% \ifx#2\relax \def\@tempa{#1}\else @@ -4788,9 +5140,10 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@get@listname@} % Try all combinations of font family, series, shape and size to get a list for % the current font. -%\changes{v1.1}{2004/09/15}{don't check for empty characteristics list} +%\changes{v1.1}{2004/09/15}{don't check for empty attributes list} %\changes{v1.2}{2004/09/30}{alternatively check for alias font name} -%\changes{v1.7}{2005/03/15}{use \cmd{\@tfor} (Andreas B\"uhmann's idea)} +%\changes{v1.7}{2005/03/15}{use \cmd{\@tfor} +% (\contributor Andreas B\"uhmann <andreas.buehmann\at web.de>'s idea)} %\changes{v1.8}{2005/04/16}{made recursive} % \begin{macrocode} \def\MT@get@listname#1{% @@ -4810,30 +5163,29 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} %\begin{macro}{\MT@try@order} -%\changes{v1.7}{2005/03/11}{bug fix: also check for //\meta{series}/\meta{shape}// -% (reported by Andreas B\"uhmann)} ^^A <andreas.buehmann\at web.de> -% ^^A private mail, 10/3/2005 +%\changes{v1.7}{2005/03/11}{fix: also check for //\meta{series}/\meta{shape}// +% (reported by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)} +% ^^A private mail, 10/03/2005 %\changes{v1.7}{2005/03/11}{always check for size, too -% (suggested by Andreas B\"uhmann)} ^^A <andreas.buehmann\at web.de> -% ^^A private mail, 10/3/2005 +% (suggested by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)} +% ^^A private mail, 10/03/2005 % %\begin{table}\footnotesize %\caption{Order for matching font attributes}\label{tab:match-order} %\catcode`\!=13 \let!\match %\begin{tabular}{@{}L{38pt}*{16}{p{19.5pt}<{\centering}@{}}} -%\ifbooktabs\addlinespace\toprule\addlinespace\else\hline\fi +%\addlinespace\toprule\addlinespace % & 1.& 2.& 3.& 4.& 5.& 6.& 7.& 8.& 9.&10.&11.&12.&13.&14.&15.&16.\\ -%\ifbooktabs\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5} -% \cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule(r){9-9} -% \cmidrule(r){10-10}\cmidrule(r){11-11}\cmidrule(r){12-12}\cmidrule(r){13-13} -% \cmidrule(r){14-14}\cmidrule(r){15-15}\cmidrule(r){16-16}\cmidrule{17-17} -%\else\hline\fi +%\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5} +%\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule(r){9-9} +%\cmidrule(r){10-10}\cmidrule(r){11-11}\cmidrule(r){12-12}\cmidrule(r){13-13} +%\cmidrule(r){14-14}\cmidrule(r){15-15}\cmidrule(r){16-16}\cmidrule{17-17} % Encoding & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! \\ % Family & ! & ! & ! & ! & ! & ! & ! & ! & - & - & - & - & - & - & - & - \\ % Series & ! & ! & ! & ! & - & - & - & - & ! & ! & ! & ! & - & - & - & - \\ % Shape & ! & ! & - & - & ! & ! & - & - & ! & ! & - & - & ! & ! & - & - \\ % Size & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - \\ -%\ifbooktabs\bottomrule\else\hline\fi +%\bottomrule %\end{tabular} %\end{table} % @@ -4860,7 +5212,7 @@ time will almost certainly lead to undesired results. Have your choice!}% /\ifnum#4=\@ne *\fi \MT@context}% %<debug>\MT@dinfo@nl{1}{trying \@tempa}% - \MT@ifdefined@n{MT@\@tempb @\@tempa}{% + \MT@ifdefined@n@TF{MT@\@tempb @\@tempa}{% \MT@next@listname@#4% }{% % \end{macrocode} @@ -4875,9 +5227,9 @@ time will almost certainly lead to undesired results. Have your choice!}% /\ifnum#4=\@ne *\fi \MT@context}% %<debug>\MT@dinfo@nl{1}{(alias) \@tempa}% - \MT@ifdefined@n{MT@\@tempb @\@tempa}{% + \MT@ifdefined@n@T{MT@\@tempb @\@tempa}{% \MT@next@listname@#4% - }\relax + }% \fi \fi }% @@ -4905,9 +5257,10 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@context} % \begin{macrocode} \def\MT@if@list@exists{% - \expandafter\let\expandafter\MT@context\csname MT@\MT@feat @context\endcsname + \MT@let@cn\MT@context{MT@\MT@feat @context}% + \MT@ifstreq{@}\MT@context{\let\MT@context\@empty}\relax \MT@get@listname{\MT@feat @c}% - \MT@ifdefined@c\MT@listname{% + \MT@ifdefined@c@TF\MT@listname{% \MT@edef@n{MT@\MT@feat @c@name}{\MT@listname}% \ifMT@nonselected \MT@vinfo{... Applying non-selected expansion (list `\MT@ex@c@name')}% @@ -4947,7 +5300,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@get@inh@list{% \let\MT@context\@empty \MT@get@listname{\MT@feat @inh}% - \MT@ifdefined@c\MT@listname{% + \MT@ifdefined@c@TF\MT@listname{% \MT@edef@n{MT@\MT@feat @inh@name}{\MT@listname}% %<*debug> \MT@dinfo@nl{1}{... Using \@nameuse{MT@abbr@\MT@feat} inheritance list @@ -4956,12 +5309,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@let@cn\@tempc{MT@\MT@feat @inh@\csname MT@\MT@feat @inh@name\endcsname}% % \end{macrocode} % If the list is \cmd{\@empty}, it has already been parsed. -%\changes{v1.2}{2004/09/26}{bug fix: set inheritance list \cmd{\global}ly to \cmd{\@empty}} +%\changes{v1.2}{2004/09/26}{fix: set inheritance list \cmd{\global}ly to \cmd{\@empty}} % \begin{macrocode} \ifx\@tempc\@empty \else %<debug>\MT@dinfo@nl{1}{parsing inheritance list ...}% \MT@let@cn\MT@inh@name{MT@\MT@feat @inh@name}% - \def\MT@curr@list@name{inheritance list}% + \edef\MT@curr@list@name{inheritance list\MessageBreak`\MT@inh@name'}% \expandafter\MT@inh@do\@tempc,\relax,% \global\MT@let@nc{MT@\MT@feat @inh@\csname MT@\MT@feat @inh@name\endcsname}\@empty \fi @@ -4973,21 +5326,21 @@ time will almost certainly lead to undesired results. Have your choice!}% %\end{macro} %\end{macro} % -% \subsubsection{Translating Characters} +% \subsubsection{Translating Characters into Slots} % %\changes{v1.4}{2004/11/04}{don't use scratch registers in global definitions} % Get the slot number of the character in the current encoding. % %\begin{macro}{\MT@get@slot} -%\changes{v1.2}{2004/09/26}{bug fix: group must also include \cs{MT@get@composite}} +%\changes{v1.2}{2004/09/26}{fix: group must also include \cs{MT@get@composite}} %\changes{v1.4b}{2004/11/22}{don't define \cs{MT@char} globally (save stack problem)} %\changes{v1.6a}{2005/01/30}{completely redone, hopefully more robust -% (compatible with \pkg{frenchpro}; -% problem reported by Bernard Gaulle)} ^^A <gaulle\at idris.fr> -% ^^A private mail, 28/1/2005 +% (compatible with \pkg{frenchpro}; problem reported by +% \contributor Bernard Gaulle <gaulle\at idris.fr>)} +% ^^A private mail, 28/01/2005 %\changes{v1.7}{2005/03/21}{remove backslash hack} %\begin{macro}{\MT@char} -%\begin{macro}{\Mt@char} +%\begin{macro}{\MT@char@} % There are lots of possibilities how a character may be specified in the % configuration files, which makes translating them into slot numbers quite % expensive. Also, we want to have this as robust as possible, so that the user @@ -4997,26 +5350,25 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@get@slot{% \escapechar`\\ - \let\Mt@char\m@ne + \let\MT@char@\m@ne \MT@noresttrue % \end{macrocode} %\end{macro} %\end{macro} % Save unexpanded string in case we need to issue a warning message. % \begin{macrocode} - \mt@toks=\expandafter\expandafter\expandafter{\expandafter\string\@tempa}% - \edef\MT@char{\expandafter\meaning\@tempa}% + \MT@toks=\expandafter{\@tempa}% % \end{macrocode} % Now, let's walk through (hopefully all) possible cases. %\begin{itemize} % \item It's a letter, a character or a number. % \begin{macrocode} \expandafter\MT@is@letter\@tempa\relax\relax - \ifnum\Mt@char < \z@ + \ifnum\MT@char@ < \z@ % \end{macrocode} -%\changes{v1.8}{2005/03/30}{bug fix: expand active characters} +%\changes{v1.8}{2005/03/30}{fix: expand active characters} % \item It might be an active character, \ie, an 8-bit character defined by -% \pkg{inputenc}. +% \pkg{inputenc}. If so, we will expand it here to its <LICR> form. % \begin{macrocode} \MT@exp@two@c\MT@is@active\string\@tempa\@nil % \end{macrocode} @@ -5025,32 +5377,35 @@ time will almost certainly lead to undesired results. Have your choice!}% % % If |\|\meta{encoding}|\|\meta{command} (that's \emph{one} command) is % defined, we try to extract the slot number. -%\changes{v1.7}{2005/02/27}{test whether \cs{}\meta{encoding}\cs{\meta{..}} is defined} -%\changes{v1.8}{2005/04/05}{test whether \cs{}\meta{encoding}\cs{\meta{..}} is defined +%\changes{v1.7}{2005/02/27}{test whether \cs{}\meta{encoding}\cs{}\meta{...} is defined} +%\changes{v1.8}{2005/04/04}{test whether \cs{}\meta{encoding}\cs{}\meta{...} is defined % made more robust} +% +% We must be cautious not to stumble over accented characters consisting +% of two commands, like \cmd{\`}\cmd{\i} or \cmd{\U}\cmd{\CYRI}, hence, +% \cmd{\string} wouldn't be safe enough. % \begin{macrocode} - \MT@ifdefined@n{\MT@encoding\MT@detokenize\@tempa}% + \MT@ifdefined@n@TF{\MT@encoding\MT@detokenize@c\@tempa}% \MT@is@symbol - {% % \end{macrocode} % \item Now, we'll catch the rest, which hopefully is an accented character % (\eg~|\"a|). % \begin{macrocode} - \expandafter\MT@is@composite\@tempa\relax\relax - }% - \ifnum\Mt@char < \z@ + {\expandafter\MT@is@composite\@tempa\relax\relax}% + \ifnum\MT@char@ < \z@ % \end{macrocode} % \item It could also be a \cmd{\chardef}ed command (\eg\ the percent character). % This seems the least likely case, so it's last. %\changes{v1.7}{2005/03/20}{test for \cmd{\chardef}ed commands} % \begin{macrocode} - \MT@exp@two@c\MT@is@char\MT@char\MT@charstring\relax\relax\relax + \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter + \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax \fi \fi % \end{macrocode} %\end{itemize} % \begin{macrocode} - \let\MT@char\Mt@char + \let\MT@char\MT@char@ \ifnum\MT@char < \z@ \MT@warn@unknown \else @@ -5060,7 +5415,7 @@ time will almost certainly lead to undesired results. Have your choice!}% % this case, we issue a warning and forget the complete string. % \begin{macrocode} \ifMT@norest \else - \MT@warn@unknown@i + \MT@warn@rest \let\MT@char\m@ne \fi \fi @@ -5068,37 +5423,35 @@ time will almost certainly lead to undesired results. Have your choice!}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\ifMT@norest}\IndexNewif{MT@norest} +%\begin{macro}{\ifMT@norest} %\begin{macro}{\MT@testrest} % Switch and test whether all of the string has been used up. % \begin{macrocode} \newif\ifMT@norest -\def\MT@testrest#1#2{% - \MT@ifstreq{#1}{#2}\relax\MT@norestfalse -} +\def\MT@testrest#1#2{\MT@ifstreq{#1}{#2}\relax\MT@norestfalse} % \end{macrocode} %\end{macro} %\end{macro} %\begin{macro}{\MT@is@letter} % Input is a letter, a character or a number. -%\changes{v1.8}{2005/04/04}{warning for non-\ascii\ characters} +%\changes{v1.8}{2005/04/04}{warning for non-<ASCII> characters} %\changes{v1.9}{2005/10/22}{using \cmd{\catcode} should be more efficient than % inspecting the \cmd{\meaning}} % \begin{macrocode} \def\MT@is@letter#1#2\relax{% \ifcat a\noexpand#1\relax - \edef\Mt@char{\number`#1}% + \edef\MT@char@{\number`#1}% \ifx\\#2\\% -%<debug>\MT@dinfo@nl{3}{> `\the\mt@toks' is a letter (\Mt@char)}% +%<debug>\MT@dinfo@nl{3}{> `\the\MT@toks' is a letter (\MT@char@)}% \else \MT@norestfalse \fi \else - \ifcat 1\noexpand#1\relax - \edef\Mt@char{\number`#1}% -%<debug>\MT@dinfo@nl{3}{> `\the\mt@toks' is a character (\Mt@char)}% + \ifcat !\noexpand#1\relax + \edef\MT@char@{\number`#1}% +%<debug>\MT@dinfo@nl{3}{> `\the\MT@toks' is a character (\MT@char@)}% \ifx\\#2\\% - \ifnum\Mt@char>127 \Mt@warn@ascii \fi + \ifnum\MT@char@>127 \MT@warn@ascii \fi \else \MT@norestfalse \expandafter\MT@is@number#1#2\relax\relax @@ -5111,7 +5464,7 @@ time will almost certainly lead to undesired results. Have your choice!}% %\begin{macro}{\MT@is@number} % Numbers may be specified as a three-digit decimal number (|029|), %\changes{v1.1}{2004/09/13}{numbers may also be specified in hexadecimal or octal -% (suggested by Harald Harders)} +% (suggested by \contributor Harald Harders <h.harders\at tu-bs.de>)} % as a hexadecimal number (prefixed with~|"|: |"1D|) or as a octal number % (prefixed with~|'|: |'35|). They must consist of at least three characters % (including the prefix), that is, |"F| is not permitted. @@ -5121,22 +5474,22 @@ time will almost certainly lead to undesired results. Have your choice!}% \ifx\relax#2\relax \else \MT@noresttrue \if#1"\relax - \def\x{\uppercase{\edef\Mt@char{\number#1#2#3}}}\x -%<debug>\MT@dinfo@nl{3}{> ... a hexadecimal number: \Mt@char}% + \def\x{\uppercase{\edef\MT@char@{\number#1#2#3}}}\x +%<debug>\MT@dinfo@nl{3}{> ... a hexadecimal number: \MT@char@}% \else \if#1'\relax - \def\Mt@char{\number#1#2#3}% -%<debug> \MT@dinfo@nl{3}{> ... an octal number: \Mt@char}% + \def\MT@char@{\number#1#2#3}% +%<debug>\MT@dinfo@nl{3}{> ... an octal number: \MT@char@}% \else - \MT@ifnumber{#1#2#3}{% - \def\Mt@char{\number#1#2#3}% -%<debug> \MT@dinfo@nl{3}{> ... a decimal number: \Mt@char}% + \MT@ifint{#1#2#3}{% + \def\MT@char@{\number#1#2#3}% +%<debug>\MT@dinfo@nl{3}{> ... a decimal number: \MT@char@}% }\MT@norestfalse \fi \fi - \ifnum\Mt@char > \@cclv + \ifnum\MT@char@ > \@cclv \MT@warn@number@too@large{\noexpand#1\noexpand#2\noexpand#3}% - \let\Mt@char\m@ne + \let\MT@char@\m@ne \fi \fi \fi @@ -5148,45 +5501,91 @@ time will almost certainly lead to undesired results. Have your choice!}% % Expand an active character. (This was completely broken in v1.7, and only % worked by chance before.) %\changes{v1.9}{2005/09/08}{redone: use \cmd{\set@display@protect}} -% We \cmd{\set@display@protect} to translate, \eg, |Ä| into |\"A|, that is to -% whatever it is defined in the \pkg{inputenc} encoding file. +% We \cmd{\set@display@protect} to translate, \eg, \expandafter|\"A| into |\"A|, +% that is to whatever it is defined in the \pkg{inputenc} encoding file. % -% Unfortunately, the \pkg{inputenc} definitions prefer the protected/generic -% variants (\eg, \cmd{\copyright} instead of \cmd{\textcopyright}), which our -% parser won't be able to understand. -% (I'm fed up now, so you have to complain if you really, really want to be -% able to write `|©|' instead of \cmd{\textcopyright}, thus rendering your -% configuration files unportable.) +% Previous solution, slightly more robust (but doesn't understand Unicode): +%\begin{verbatim} +%\def\MT@is@active#1#2\@nil{% +% \ifx\\#2\\% +% \ifnum\catcode`#1 = \active +% \toks@=\expandafter\expandafter\expandafter{\@tempa}% +% \expandafter\MT@active@inpenc\the\toks@\relax\relax +% \edef\@tempa{\the\toks@}% +% \edef\x{\MT@toks={\the\MT@toks\space(= \the\toks@)}}\x +% \fi +% \fi +%} +%\def\MT@active@inpenc#1#2#3\relax{% +% \ifx#1\IeC +% \def\IeC##1{\toks@={##1}}% +% \the\toks@ +% \expandafter\MT@active@inpenc\the\toks@\relax\relax +% \fi +% \ifx#1\@tabacckludge +% \def\@tabacckludge##1##2{% +% \toks@=\expandafter{\csname\string##1\endcsname#3}}% +% \the\toks@ +% \fi +% \ifx#1\@inpenc@undefined@ +% \def\@inpenc@undefined@##1{% +% \edef\x{\toks@={% +% undefined^^J(\MT@MT)\@spaces\@spaces\@spaces\@spaces +% in input encoding ``##1''}}\x}% +% \the\toks@ +% \fi +%} +%\end{verbatim} % -%\todo{Make \microtype\ Unicode-savvy?} -% Unicode characters (\pkg{inputenc}/|utf8|) are currently not supported. +% Unfortunately, the (older) \pkg{inputenc} definitions prefer the +% protected/generic variants (\eg, \cmd{\copyright} instead of +% \cmd{\textcopyright}), which our parser won't be able to understand. +% (I'm fed up now, so you have to complain if you really, really want to be able +% to write `\expandafter|\textcopyright|' instead of \cmd{\textcopyright}, thus +% rendering your configuration files unportable.) +% +% Unicode characters (\pkg{inputenc}/|utf8|) are also supported (however, not +% \pkg{ucs}, aka. \pkg{inputenc}/|utf8x|). +%\changes{v1.9d}{2006/03/06}{support for Unicode (\pkg{inputenc}/\texttt{utf8})} +% +% We presume that only one input encoding is being used throughout the entire +% document. We could of course save the input encoding together with the list, +% but this would entail a couple of problems: (1)~the overhead of resetting the +% input encoding every time, (2)~the problem (or rather, impossibility) to +% decide which input encoding should be chosen -- the one active when the list +% was declared or the one active when the font is selected, and (3)~the +% improbability of multiple input encodings being used at all. % \begin{macrocode} \def\MT@is@active#1#2\@nil{% - \ifx\\#2\\% - \ifnum\catcode`#1 = \active - \begingroup - \set@display@protect - \def\IeC##1{##1}% + \ifnum\catcode`#1 = \active + \begingroup + \set@display@protect + \let\IeC\@firstofone + \let\@inpenc@undefined@\MT@undefined@char % \end{macrocode} -% The character is undefined in the encoding. +% We refrain from checking whether there is a sufficient number of octets. % \begin{macrocode} - \def\@inpenc@undefined@##1{undefined^^J% - (microtype)\@spaces\@spaces\@spaces\@spaces - in input encoding ``##1''}% - \edef\x{% - \def\noexpand\@tempa{\@tempa}% + \def\UTFviii@defined##1{\ifx ##1\relax + \MT@undefined@char{utf8}\else\expandafter##1\fi}% + \edef\x{% + \def\noexpand\@tempa{\@tempa}% % \end{macrocode} % Append what we think the translation is to the token register we use for the % log. % \begin{macrocode} - \mt@toks={\the\mt@toks\space (= \@tempa)}% - }% - \expandafter\endgroup\x - \fi + \MT@toks={\the\MT@toks\space(= \@tempa)}% + }% + \expandafter\endgroup\x \fi } % \end{macrocode} %\end{macro} +%\begin{macro}{\MT@undefined@char} +% For characters not defined in the current input encoding. +% \begin{macrocode} +\def\MT@undefined@char#1{undefined in input encoding ``#1''} +% \end{macrocode} +%\end{macro} %\begin{macro}{\MT@is@symbol} % The symbol commands might expand to funny stuff, depending on context. % Instead of simply expanding |\|\meta{command}, we construct the command @@ -5195,30 +5594,24 @@ time will almost certainly lead to undesired results. Have your choice!}% % been defined with \cs{DeclareTextSymbol} in the encoding definition files. % \begin{macrocode} \def\MT@is@symbol{% - \edef\@tempa{\expandafter - \csname\expandafter - \MT@encoding\expandafter - \string\@tempa - \endcsname}% + \edef\MT@char{\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}% \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter - \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax - \ifnum\Mt@char < \z@ + \meaning\expandafter\MT@char\MT@charstring\relax\relax\relax + \ifnum\MT@char@ < \z@ % \end{macrocode} % \dots~or, if it hasn't been defined by \cs{DeclareTextSymbol}, a letter -% (\eg\ \cmd{\i}, when using \pkg{frenchpro}). ^^A as noted by Bernard Gaulle <gaulle\at idris.fr> -% ^^A private mail, 28/1/2005 +% (\eg\ \cmd{\i}, when using \pkg{frenchpro}). ^^A as noted by Bernard Gaulle +% ^^A private mail, 28/01/2005 % \begin{macrocode} - \expandafter\MT@is@letter\@tempa\relax\relax + \expandafter\MT@is@letter\MT@char\relax\relax \fi } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@is@char} %\begin{macro}{\MT@charstring} -% Here we define a helper macro that inspect the \cmd{\meaning} of its -% argument. +% A helper macro that inspects the \cmd{\meaning} of its argument. % \begin{macrocode} -%<debug>\def\Mt@info{\MT@dinfo@nl{3}} \begingroup \catcode`\/=0 /MT@map@tlist@n{/\/C/H/A/R}/@makeother @@ -5228,13 +5621,13 @@ time will almost certainly lead to undesired results. Have your choice!}% /def/MT@is@char##1\CHAR"##2##3##4/relax{% /ifx/relax##1/relax /if##3\/relax - /edef/Mt@char{/number"##2}% + /edef/MT@char@{/number"##2}% /MT@testrest/MT@charstring{##3##4}% /else - /edef/Mt@char{/number"##2##3}% + /edef/MT@char@{/number"##2##3}% /MT@testrest/MT@charstring{##4}% /fi -%<debug> /Mt@info{> `/the/mt@toks' is a \char (/Mt@char)}% +%<debug> /MT@dinfo@nl{3}{> `/the/MT@toks' is a \char (/MT@char@)}% /fi }% }% @@ -5254,50 +5647,41 @@ time will almost certainly lead to undesired results. Have your choice!}% % Again, we construct a control sequence, this time of the form: % |\\|\meta{encoding}\hskip0pt|\|\meta{accent}|-|\meta{character}, \eg\ % |\\T1\"-a|, which expands to a letter if it has been defined by -% \cs{DeclareTextComposite}. This should be robust, finally. -% \begin{macrocode} - \edef\@tempa{\expandafter +% \cs{DeclareTextComposite}. This should be robust, finally, especially, since +% we also \cmd{\detokenize} the input instead of only \cmd{\string}ifying it. +% Thus, we will die gracefully even on wrong Unicode input without |utf8|. +%\begin{macrocode} + \edef\MT@char{\expandafter \csname\expandafter \string\csname\MT@encoding\endcsname - \string#1-% - \string#2% + \MT@detokenize@n{#1}-% + \MT@detokenize@n{#2}% \endcsname}% - \expandafter\MT@is@letter\@tempa\relax\relax + \expandafter\MT@is@letter\MT@char\relax\relax \fi } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@detokenize} -%\changes{v1.9}{2005/08/17}{fix the non-\etex\ version} -% Translate a macro into a token list. We must be cautious not to stumble over -% accented characters consisting of two commands, like \cmd{\`}\cmd{\i} or -% \cmd{\U}\cmd{\CYRI}. With \etex, we can use \cmd{\detokenize} (and -% \cmd{\expandafter}\cmd{\string} to get rid of the trailing space). The -% non-\etex\ version requires some more fiddling. -% \begin{macrocode} -\ifcase\MT@etex@no - \def\MT@detokenize#1{\MT@exp@two@c\zap@space\strip@prefix\meaning#1 \@empty} -\else - \def\MT@detokenize#1{\detokenize - \expandafter\expandafter\expandafter{\expandafter\string#1}} -\fi -% \end{macrocode} -%\end{macro} % Some warning messages, for performance reasons separated here. %\begin{macro}{\MT@curr@list@name} %\changes{v1.8}{2005/06/08}{new macro: current list type and name} +%\begin{macro}{\MT@set@listname} % The type and name of the current list, defined at various places. % \begin{macrocode} -\let\MT@curr@list@name\@empty +\def\MT@set@listname{% + \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\MessageBreak + `\@nameuse{MT@\MT@feat @c@name}'}% +} % \end{macrocode} %\end{macro} -%\begin{macro}{\Mt@warn@ascii} +%\end{macro} +%\begin{macro}{\MT@warn@ascii} % For characters with character code \textgreater\ 127, we issue a warning % (\pkg{inputenc} probably hasn't been loaded), since correspondence with % the slot numbers would be purely coincidental. % \begin{macrocode} -\def\Mt@warn@ascii{% - \MT@warning@nl{Character `\the\mt@toks' (= \Mt@char) +\def\MT@warn@ascii{% + \MT@warning@nl{Character `\the\MT@toks' (= \MT@char@) is outside of ASCII range.\MessageBreak You must load the `inputenc' package before using\MessageBreak 8-bit characters in \MT@curr@list@name}% @@ -5314,13 +5698,13 @@ time will almost certainly lead to undesired results. Have your choice!}% } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@warn@unknown@i} +%\begin{macro}{\MT@warn@rest} % Not all of the string has been parsed. % \begin{macrocode} -\def\MT@warn@unknown@i{% +\def\MT@warn@rest{% \MT@warning@nl{% - Unknown slot number of character `\the\mt@toks' in\MessageBreak - font encoding `\MT@encoding'. Make sure it's a single\MessageBreak + Unknown slot number of character\MessageBreak`\the\MT@toks'\MessageBreak + in font encoding `\MT@encoding'. Make sure it's a single\MessageBreak character (or a number) in \MT@curr@list@name}% } % \end{macrocode} @@ -5330,8 +5714,8 @@ time will almost certainly lead to undesired results. Have your choice!}% % \begin{macrocode} \def\MT@warn@unknown{% \MT@warning@nl{% - Unknown slot number of character `\the\mt@toks' in\MessageBreak - font encoding `\MT@encoding' in \MT@curr@list@name}% + Unknown slot number of character\MessageBreak`\the\MT@toks'\MessageBreak + in font encoding `\MT@encoding' in \MT@curr@list@name}% } % \end{macrocode} %\end{macro} @@ -5385,36 +5769,46 @@ time will almost certainly lead to undesired results. Have your choice!}% % overhead isn't too large. %\changes{v1.8}{2005/05/15}{if font substitution has occurred, set up the % substitute font, not the selected one} +%\changes{v1.9}{2005/10/03}{allow context-specific font setup} +%\begin{macro}{\MT@font@list} +% We use a comma separated list. +% \begin{macrocode} +\let\MT@font@list\@empty +% \end{macrocode} +%\end{macro} %\begin{macro}{\MT@font} % Additionally, we hook into \cmd{\do@subst@correction}, which is called if % a substitution has taken place, to record the name of the ersatz font. % Unfortunately, this will only work for one-level substitutions. +% +% All this is done at the beginning of the document. % \begin{macrocode} \let\MT@font\@empty -\g@addto@macro\do@subst@correction{% - \xdef\MT@font{\csname \curr@fontshape/\f@size\endcsname}% -} +\MT@addto@setup{% + \g@addto@macro\do@subst@correction{% + \xdef\MT@font{\csname \curr@fontshape/\f@size\endcsname}% + } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@orig@pickupfont} % Check whether \cmd{\pickup@font} is defined as expected. % The warning issued by \cmd{\CheckCommand*} would be a bit too generic. % \begin{macrocode} -\def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi} -\ifx\pickup@font\MT@orig@pickupfont \else - \MT@warning@nl{% - Command \string\pickup@font\space is not defined as expected.\MessageBreak - Double-check whether micro-typography is indeed\MessageBreak - applied to the document.\MessageBreak (Hint: Turn on `verbose' mode)% - } -\fi + \def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi} + \ifx\pickup@font\MT@orig@pickupfont \else + \MT@warning@nl{% + Command \string\pickup@font\space is not defined as expected.\MessageBreak + Double-check whether micro-typography is indeed\MessageBreak + applied to the document.\MessageBreak (Hint: Turn on `verbose' mode)% + } + \fi % \end{macrocode} %\end{macro} % Then we append our stuff. % \begin{macrocode} -\g@addto@macro\pickup@font{% - \begingroup - \escapechar\m@ne + \g@addto@macro\pickup@font{% + \begingroup + \escapechar\m@ne % \end{macrocode} % If \cs{MT@font@name} is empty, no substitution has taken place, hence % \cmd{\font@name} is correct. Otherwise, if they are different, @@ -5422,96 +5816,261 @@ time will almost certainly lead to undesired results. Have your choice!}% % catch one-level substitutions, like |bx| to |b|, but it will still fail if % the substituting font is itself substituted. % \begin{macrocode} - \ifx\MT@font\@empty - \let\MT@font\font@name - \else - \ifx\MT@font\font@name \else - \expandafter\MT@xadd - \csname MT@\MT@curr@contexts font@list\endcsname{\font@name,}% + \ifx\MT@font\@empty + \let\MT@font\font@name + \else + \ifx\MT@font\font@name \else + \MT@register@subst@font + \fi \fi - \fi + \MT@check@font + \ifMT@inlist@ \else + \MT@setupfont + \MT@register@font + \fi + \endgroup + \global\let\MT@font\@empty + } % \end{macrocode} -% Comma-separated lists are used to remember the fonts we've already set up. -% There is one list for each combination of contexts. -%\changes{v1.9}{2005/10/03}{allow context-specific font setup} +%\begin{macro}{\MT@pickupfont} +% Remember the patched command for later. +% \begin{macrocode} + \let\MT@pickupfont\pickup@font +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@orig@add@accent} +%\changes{v1.8}{2005/06/14}{fix: disable micro-typographic setup inside \cmd{\add@accent} +% (reported by \contributor Stephan Hennig <stephanhennig\at arcor.de>)} +% ^^A in <MID:42adb0e3$0$27784$9b4e6d93@newsread2.arcor-online.net> +% Inside \cmd{\add@accent}, we have to disable \microtype's setup, since the +% grouping in the patched \cmd{\pickup@font} would break the accent if +% different fonts are used for the base character and the accent. Fortunately, +% \LaTeX\ takes care that the fonts used for the \cmd{\accent} are already set +% up, so that we cannot be overlooking them. +% At first, I was going to change \cmd{\hmode@bgroup} only, but that is also +% used in the commands defined by \cmd{\DeclareTextFontCommand}, \ie, +% \cmd{\textit} etc. % \begin{macrocode} + \let\MT@orig@add@accent\add@accent + \def\add@accent#1#2{% + \let\pickup@font\MT@orig@pickupfont + \MT@orig@add@accent{#1}{#2}% + \let\pickup@font\MT@pickupfont + } +} +% \end{macrocode} +%\end{macro} +% Consequently, we are the last one to change these commands, therefore there +% is no need to check whether our definition has survived.\footnote{ +% If \pkg{CJK} is loaded, \microtype\ will overwrite its definition. Sorry, Asia!} +%\changes{v1.6}{2004/12/29}{test whether \cmd{\pickup@font} has changed} +%\changes{v1.9a}{2005/11/21}{remove superfluous test whether \cmd{\pickup@font} has changed} +% +%\begin{macro}{\MT@check@font} +% Check whether we've already seen the current font. +% \begin{macrocode} +\def\MT@check@font{\MT@exp@one@n\MT@in@clist\MT@font\MT@font@list} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@subst@font} +% Register the substituted font. +% \begin{macrocode} +\def\MT@register@subst@font{\xdef\MT@font@list{\MT@font@list\font@name,}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@font} +% Register the current font. +% \begin{macrocode} +\def\MT@register@font{\xdef\MT@font@list{\MT@font@list\MT@font,}} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Context-sensitive Setup} +% +% Here are the variants for context-sensitive setup. +%\begin{macro}{\MT@active@features} +% The activated features are stored in this command. +% \begin{macrocode} +\let\MT@active@features\@empty +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@check@font@cx} +% Every feature has its own list of fonts that have already been dealt with. If +% the font needn't be set up for a feature, we temporarily disable the +% corresponding setup command. +%\changes{v1.9a}{2005/11/14}{optimize context-sensitive setup} +% This should be more efficient than book-keeping the fonts in lists associated +% with the combination of contexts, as we've done it before. +% \begin{macrocode} +\def\MT@check@font@cx{% + \@tempswatrue + \MT@map@clist@c\MT@active@features{% \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\MT@font - \csname MT@\MT@curr@contexts font@list\endcsname - \ifMT@inlist@ \else - \MT@setupfont + \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname + \ifMT@inlist@ + \MT@let@nc{MT@\@nameuse{MT@abbr@##1}}\relax + \else + \@tempswafalse + \fi + }% + \if@tempswa \MT@inlist@true \else \MT@inlist@false \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@subst@font@cx} +% Add the substituted font to each feature list. +%\todo{remove from other lists?} +% \begin{macrocode} +\def\MT@register@subst@font@cx{% + \MT@map@clist@c\MT@active@features{% + \expandafter\MT@xadd + \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname + {\font@name,}% + }% +} % \end{macrocode} -% Add the font to the current list and remove it from the other contexts' lists. +%\end{macro} +%\begin{macro}{\MT@register@font@cx} +% For each feature, add the current font to the list, unless we didn't set it +% up. % \begin{macrocode} - \expandafter\MT@xadd\csname MT@\MT@curr@contexts font@list\endcsname{\MT@font,}% - \MT@map@tlist@c\MT@doc@contexts\MT@rem@from@lists +\def\MT@register@font@cx{% + \MT@map@clist@c\MT@active@features{% + \expandafter\ifx\csname MT@\@nameuse{MT@abbr@##1}\endcsname\relax\else + \expandafter\MT@xadd + \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname + {\MT@font,}% + \def\@tempa{##1}% + \expandafter\MT@map@tlist@c + \csname MT@##1@doc@contexts\endcsname + \MT@rem@from@lists \fi - \endgroup - \global\let\MT@font\@empty + }% } % \end{macrocode} +%\end{macro} %\begin{macro}{\MT@rem@from@lists} % Recurse through all context font lists of the document and remove the font, % unless it's the current context. % \begin{macrocode} \def\MT@rem@from@lists#1{% - \MT@ifstreq{#1}\MT@curr@contexts\relax{% - \expandafter\MT@exp@one@n\expandafter\MT@rem@from@list - \expandafter\MT@font\csname MT@#1font@list\endcsname + \MT@ifstreq{\@tempa/#1}{\@tempa/\csname MT@\@tempa @context\endcsname}\relax{% + \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist + \expandafter\MT@font\csname MT@\@tempa @#1font@list\endcsname }% } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@pickupfont} -% Remember the patched command for later. +% +%\begin{macro}{\microtypecontext} +%\changes{v1.9}{2005/10/03}{new command: change setup context in the document} +% 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 +% later. +% \begin{macrocode} +\def\microtypecontext#1{\MT@addto@setup{\microtypecontext{#1}}} +\MT@addto@setup{% + \def\microtypecontext#1{% + \MT@setup@contexts + \setkeys{MTC}{#1}% + \selectfont + \aftergroup\MT@reset@context + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@reset@context} +% We have to reset the font at the end of the group. % \begin{macrocode} -\let\MT@pickupfont\pickup@font +\def\MT@reset@context{% + \MT@vinfo{Resetting contexts on line \the\inputlineno +%<debug> \MessageBreak= \MT@pr@context/\MT@ex@context +%<debug&beta> /\MT@kn@context/\MT@sp@context + }% + \selectfont +} % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@add@accent} -%\changes{v1.8}{2005/06/14}{bug fix: disable micro-typographic setup inside \cmd{\add@accent} -% (reported by Stephan Hennig)}% ^^A <stephanhennig\at arcor.de> -% ^^A in <MID: <42adb0e3$0$27784$9b4e6d93@newsread2.arcor-online.net> -% Inside \cmd{\add@accent}, we have to disable \microtype's setup, since the -% grouping in the patched \cmd{\pickup@font} would break the accent if -% different fonts are used for the base character and the accent. Fortunately, -% \LaTeX\ takes care that the fonts used for the \cmd{\accent} are already set -% up, so that we cannot be overlooking them. -% At first, I was going to change \cmd{\hmode@bgroup} only, but that is also -% used in the commands defined by \cmd{\DeclareTextFontCommand}, \ie, -% \cmd{\textit} etc. +%\begin{macro}{\MT@setup@contexts} +% The first time \cs{microtypecontext} is called, we initialize the context +% lists and redefine the commands used in \cmd{\pickup@font}. % \begin{macrocode} -\let\MT@add@accent\add@accent -\def\add@accent#1#2{% - \let\pickup@font\MT@orig@pickupfont - \MT@add@accent{#1}{#2}% - \let\pickup@font\MT@pickupfont +\def\MT@setup@contexts{% + \MT@map@clist@c\MT@active@features + {\global\MT@let@nc{MT@##1@@font@list}\MT@font@list}% + \global\let\MT@check@font\MT@check@font@cx + \global\let\MT@register@font\MT@register@font@cx + \global\let\MT@register@subst@font\MT@register@subst@font@cx + \global\let\MT@setup@contexts\relax } % \end{macrocode} %\end{macro} -%\changes{v1.6}{2004/12/29}{test whether \cmd{\pickup@font} has changed} -% We also test whether our definition has survived (\cmd{\pickup@font} is -% at least redefined by \pkg{CJK}\footnote{ -% Therefore, \microtype\ will probably not work together with \pkg{CJK}. -% However, I would be glad to be proven wrong.}). -% \begin{macrocode} -\AtBeginDocument{% - \ifx\MT@pickupfont\pickup@font \else - \MT@error{% - Another package has overwritten the definition\MessageBreak - of \string\pickup@font. I might not be able to\MessageBreak - apply any micro-typography. Please find the\MessageBreak - culprit, and load it before the microtype package - }{% -The microtype package attaches the micro-typographic setup to\MessageBreak -\string\pickup@font. If the other package has simply overwritten this\MessageBreak -command, nothing will work. If, on the other hand, it has changed\MessageBreak -the command in a cautious way, everything may be fine.\MessageBreak -In either case, please send a report to <w.m.l@gmx.net>. - }% - \fi +%\begin{macro}{\MT@define@context} +% \begin{macrocode} +\def\MT@define@context#1{% + \define@key{MTC}{#1}[]{% + \KV@@sp@def\@tempb{#1}% + \edef\@tempb{\@nameuse{MT@rbba@\@tempb}}% + \MT@exp@one@n\MT@in@clist\@tempb\MT@active@features + \ifMT@inlist@ +% \end{macrocode} +% Using an empty context is only asking for trouble, therefore we use the +% `|@|' instead. +% \begin{macrocode} + \MT@ifempty{##1}{\def\MT@val{@}}{\KV@@sp@def\MT@val{##1}}% + \expandafter\ifx\csname MT@\@tempb @context\endcsname\MT@val \else + \MT@vinfo{--- Changing #1 context to `\MT@val'}% +% \end{macrocode} +% The next time we see the font, we have to reset \emph{all} factors. +% \begin{macrocode} + \global\MT@let@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}% +% \end{macrocode} +% We must also keep track of all contexts in the document. +% \begin{macrocode} + \expandafter\MT@exp@one@n\expandafter\MT@in@tlist + \expandafter\MT@val\csname MT@\@tempb @doc@contexts\endcsname + \ifMT@inlist@ \else + \expandafter\MT@xadd\csname MT@\@tempb @doc@contexts\endcsname{{\MT@val}}% +%<debug> \MT@dinfo{2}{>>> added #1 context: \@nameuse{MT@\@tempb @doc@contexts}}% + \fi + \MT@edef@n{MT@\@tempb @context}{\MT@val}% + \fi + \fi + }% } % \end{macrocode} -% +%\end{macro} +% \begin{macrocode} +\MT@map@clist@c\MT@features@long{\MT@define@context{#1}} +% \end{macrocode} +%\begin{macro}{\MT@pr@context} +%\begin{macro}{\MT@ex@context} +%\begin{macro}{\MT@sp@context} +%\begin{macro}{\MT@kn@context} +%\begin{macro}{\MT@pr@doc@contexts} +%\begin{macro}{\MT@ex@doc@contexts} +%\begin{macro}{\MT@sp@doc@contexts} +%\begin{macro}{\MT@kn@doc@contexts} +%\begin{macro}{\MT@extra@context} +% Initialize the contexts. +% \begin{macrocode} +\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{% + \MT@def@n{MT@#1@context}{@}% + \MT@def@n{MT@#1@doc@contexts}{{@}}% +} +\let\MT@extra@context\@empty +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} % %\subsection{Configuration} % @@ -5520,12 +6079,12 @@ In either case, please send a report to <w.m.l@gmx.net>. % %\begin{macro}{\DeclareMicrotypeSet} %\begin{macro}{\DeclareMicrotypeSet*} -% Calling this macro will create a comma list for every font characteristic of -% the form: |\MT|\meta{feature}|list@|\meta{characteristic}|@|\meta{set name}. +% Calling this macro will create a comma list for every font attribute of +% the form: |\MT|\meta{feature}|list@|\meta{attribute}|@|\meta{set name}. % If the optional argument is empty, lists for both expansion and protrusion % will be created. % -% The third argument must be a list of |key=value| pairs. If a font characteristic +% The third argument must be a list of |key=value| pairs. If a font attribute % is not specified, we define the corresponding list to \cmd{\relax}, so that it % does not constitute a constraint. % \begin{macrocode} @@ -5558,19 +6117,17 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@DeclareSet@#1#2#3{% \KV@@sp@def\@tempa{#1}% \MT@ifempty\@tempa{% - \MT@declare@sets{pr}{#2}{#3}% - \MT@declare@sets{ex}{#2}{#3}% -%<*beta> - \MT@declare@sets{sp}{#2}{#3}% - \MT@declare@sets{kn}{#2}{#3}% -%</beta> + \MT@map@clist@c\MT@features{{\MT@declare@sets{##1}{#2}{#3}}}% }{% - \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@declare@sets - {\csname MT@rbba@\@tempa\endcsname}{#2}{#3}}}% - }% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{set declaration `#2'}{% + \MT@exp@one@n\MT@declare@sets + {\csname MT@rbba@\@tempa\endcsname}{#2}{#3}% + }% + }% + }}% }% } % \end{macrocode} @@ -5588,9 +6145,9 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \def\MT@declare@sets#1#2#3{% \KV@@sp@def\MT@curr@set@name{#2}% - \MT@ifdefined@n{MT@#1@set@@\MT@curr@set@name}{% + \MT@ifdefined@n@T{MT@#1@set@@\MT@curr@set@name}{% \MT@warning{Redefining set `\MT@curr@set@name'}% - }\relax + }% \global\MT@let@nc{MT@#1@set@@\MT@curr@set@name}\@empty %<debug>\MT@dinfo{1}{declaring \@nameuse{MT@abbr@#1} set `\MT@curr@set@name'}% \setkeys{MT@#1@set}{#3}% @@ -5598,7 +6155,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} %\end{macro} %\begin{macro}{\MT@define@set@keys} -% Define the \pkg{keyval} keys for expansion and protrusion sets. +% Define the \pkg{keyval} keys for font sets. % \begin{macrocode} \def\MT@define@set@keys#1{% \MT@define@set@key@{encoding}{#1}% @@ -5613,21 +6170,32 @@ In either case, please send a report to <w.m.l@gmx.net>. %\begin{macro}{\MT@define@set@key@} % \meta{\#1} = font axis, \meta{\#2} = feature. %\changes{v1.8}{2005/04/16}{use comma lists instead of token lists} +%\changes{v1.9a}{2005/11/21}{don't expand variables immediately +% (requested by \contributor Georg Verweyen <verweyen\at gmail.com>)} +% ^^A in <MID:437a522d$0$7419$9b4e6d93@newsread4.arcor-online.net> % \begin{macrocode} \def\MT@define@set@key@#1#2{% - \csname MT@#2list@#1@\MT@curr@set@name\endcsname \define@key{MT@#2@set}{#1}[]{% \global\MT@let@nc{MT@#2list@#1@\MT@curr@set@name}\@empty \MT@map@clist@n{##1}{% -% \end{macrocode} -% Get rid of spaces. -% \begin{macrocode} \KV@@sp@def\MT@val{####1}% \MT@get@highlevel{#1}% - \MT@make@string\MT@val - \expandafter\MT@xadd - \csname MT@#2list@#1@\MT@curr@set@name\endcsname{\MT@val,}% +% \end{macrocode} +% We do not add the expanded value to the list~\dots +% \begin{macrocode} + \MT@exp@two@n\g@addto@macro + {\csname MT@#2list@#1@\MT@curr@set@name\expandafter\endcsname}% + {\MT@val,}% }% +% \end{macrocode} +% \dots~but keep in mind that the list has to be expanded at the end of the +% preamble. +% \begin{macrocode} + \edef\x{% + \expandafter\noexpand\expandafter\MT@fix@font@spec + \expandafter\noexpand\csname MT@#2list@#1@\MT@curr@set@name\endcsname + }% + \MT@exp@one@n\MT@addto@setup\x %<debug>\MT@dinfo@nl{1}{-- #1: \@nameuse{MT@#2list@#1@\MT@curr@set@name}}% }% } @@ -5643,26 +6211,14 @@ In either case, please send a report to <w.m.l@gmx.net>. % And `|family = *|' will become \cmd{\familydefault}. % \begin{macrocode} \MT@ifempty\@tempa{\def\@tempa{#1}}\relax - \edef\MT@val{\csname \@tempa default\endcsname}% + \edef\MT@val{\expandafter\noexpand\csname \@tempa default\endcsname}% % \end{macrocode} -% Beware that \cmd{\rmdefault} etc. might change after this package has been -% loaded! Therefore, we check (once for each characteristic/list) at the -% beginning of the document. +% In contrast to earlier version, 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} +%\changes{v1.9a}{2005/11/21}{no longer check whether defaults have changed} % \begin{macrocode} - \ifx\@nodocument\relax \else - \expandafter\ifx - \csname MT@check@\MT@curr@set@name @\@tempa\endcsname\@empty - \else - \global\MT@edef@n{MT@\MT@curr@set@name @\@tempa @default}{\MT@val}% - \edef\x{{\MT@curr@set@name}{\@tempa}}% - \MT@exp@one@n\AtBeginDocument{% - \expandafter\MT@check@default\x - }% - \global\MT@let@nc{MT@check@\MT@curr@set@name @\@tempa}\@empty - \fi - \fi }% } % \end{macrocode} @@ -5679,20 +6235,12 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@check@default} -%\changes{v1.2}{2004/09/26}{new macro} +%\begin{macro}{\MT@fix@font@spec} +% Fully expand the font specification and fix catcodes. % \begin{macrocode} -\def\MT@check@default#1#2{% - \MT@let@cn\@tempa{MT@#1@#2@default}% - \edef\@tempb{\csname #2default\endcsname}% - \ifx\@tempa\@tempb \else - \MT@warning@nl{% - \expandafter\noexpand\csname #2default\endcsname - has changed (`\@tempa' <> `\@tempb')!\MessageBreak - This might affect the `#1' font set.\MessageBreak - Please make all relevant font changes *before*\MessageBreak - loading the `microtype' package}% - \fi +\def\MT@fix@font@spec#1{% + \xdef#1{#1}% + \global\MT@make@string#1% } % \end{macrocode} %\end{macro} @@ -5706,8 +6254,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \expandafter\MT@get@range\MT@val--\@nil \ifx\MT@val\relax \else \expandafter\MT@xadd - \csname MT@#1list@size@\MT@curr@set@name\endcsname - {{{\MT@lower}{\MT@upper}\relax}}% + \csname MT@#1list@size@\MT@curr@set@name\endcsname + {{{\MT@lower}{\MT@upper}\relax}}% \fi }% %<debug>\MT@dinfo@nl{1}{-- size: \@nameuse{MT@#1list@size@\MT@curr@set@name}}% @@ -5716,13 +6264,13 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} %\end{macro} %\changes{v1.7}{2005/03/11}{allow specification of size ranges -% (suggested by Andreas B\"uhmann)} ^^A <andreas.buehmann\at web.de> -% ^^A private mail, 10/3/2005 +% (suggested by \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)} +% ^^A private mail, 10/03/2005 % Font sizes may also be specified as ranges. This has been requested by Andreas % B\"uhmann, who has also offered valuable help in implementing this. Now, it % is for instance possible to set up different lists for fonts with optical % sizes. (The MinionPro project is trying to do this for the OpenType version -% of Adobe's Minion. See \url{http://developer.berlios.de/projects/minionpro/}.)% +% of Adobe's Minion. See \url{http://developer.berlios.de/projects/minionpro/}.) % %\begin{macro}{\MT@get@range} %\begin{macro}{\MT@upper} @@ -5750,13 +6298,16 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@ifempty{#3}{% \def\MT@upper{-1}% }{% +% \end{macrocode} +% 2048pt is \TeX's maximum font size. +% \begin{macrocode} \def\MT@upper{2048}% }% }{% \def\MT@val{#2}% \MT@get@size \ifx\MT@val\relax \else - \MT@ifgt\MT@lower\MT@val{% + \MT@ifdim\MT@lower>\MT@val{% \MT@warning{% Invalid size range (\MT@lower\space > \MT@val) in font set `\MT@curr@set@name'.\MessageBreak Swapping sizes}% @@ -5765,7 +6316,7 @@ In either case, please send a report to <w.m.l@gmx.net>. }{% \edef\MT@upper{\MT@val}% }% - \MT@ifeq\MT@lower\MT@upper{% + \MT@ifdim\MT@lower=\MT@upper{% \def\MT@upper{-1}% }\relax \fi @@ -5793,7 +6344,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \ifx\@tempa\relax \else % \end{macrocode} % The \pkg{relsize} solution of parsing \cmd{\@setfontsize} does not work with the -% \pkg{ams*} classes, among others. I hope my hijacking doesn't do any harm. +% <AMS> classes, among others. I hope my hijacking doesn't do any harm. %\changes{v1.2}{2004/09/26}{hijack \cmd{\set@fontsize} instead of \cmd{\@setfontsize}} % We redefine \cmd{\set@fontsize}, and not \cmd{\@setfontsize} because some classes % might define the size selection commands by simply using \cmd{\fontsize} @@ -5808,9 +6359,6 @@ In either case, please send a report to <w.m.l@gmx.net>. % Test whether we finally got a number or dimension so that we can strip the % `|pt|' (\cmd{\@defaultunits} and \cmd{\strip@pt} are kernel macros). %\changes{v1.2}{2004/09/27}{additional magic to catch some errors} -%\changes{v1.7}{2005/03/15}{comparison with 1 to allow size smaller than 1 -% (suggested by Andreas B\"uhmann)} ^^A <andreas.buehmann\at web.de> -% ^^A private mail, 15/03/2005 % \begin{macrocode} \MT@ifdimen\MT@val{% \@defaultunits\@tempdima\MT@val pt\relax\@nnil @@ -5828,13 +6376,19 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \def\MT@define@set@key@font#1{% \define@key{MT@#1@set}{font}[]{% + \global\MT@let@nc{MT@#1list@font@\MT@curr@set@name}\@empty \MT@map@clist@n{##1}{% \KV@@sp@def\MT@val{####1}% \expandafter\MT@get@font\MT@val/////\@nil - \expandafter\MT@xadd - \csname MT@#1list@font@\MT@curr@set@name\endcsname - {\csname\MT@val\endcsname,}% + \MT@exp@two@n\g@addto@macro + {\csname MT@#1list@font@\MT@curr@set@name\expandafter\endcsname}% + {\MT@val,}% }% + \edef\x{% + \expandafter\noexpand\expandafter\MT@fix@font@spec + \expandafter\noexpand\csname MT@#1list@font@\MT@curr@set@name\endcsname + }% + \MT@exp@one@n\MT@addto@setup\x %<debug>\MT@dinfo@nl{1}{-- font: \@nameuse{MT@#1list@font@\MT@curr@set@name}}% }% } @@ -5852,15 +6406,15 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@get@axis{series}{#3}% \MT@get@axis{shape}{#4}% \MT@ifempty{#5}{% - \MT@warning{size axis is empty in font specification\MessageBreak - `\MT@temp'. Using \string\normalsize\space instead}% + \MT@warn@axis@empty{size}{\string\normalsize}% \def\MT@val{*}% }{% \def\MT@val{#5}% }% \MT@get@size \ifx\MT@val\relax\def\MT@val{0}\fi - \edef\MT@val{\expandafter\@gobble\@tempb/\MT@val}% + \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val}% + \let\MT@val\@tempb }% } % \end{macrocode} @@ -5871,24 +6425,25 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@val{#2}% \MT@get@highlevel{#1}% \MT@ifempty\MT@val{% - \MT@warning{#1 axis is empty in font specification\MessageBreak - `\MT@temp'. Using `\csname #1default\endcsname' instead}% - \edef\@tempb{\@tempb/\csname #1default\endcsname}% - }{% - \edef\@tempb{\@tempb/\MT@val}% - }% + \MT@warn@axis@empty{#1}{\csname #1default\endcsname}% + \expandafter\def\expandafter\MT@val\expandafter{\csname #1default\endcsname}% + }\relax + \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val/}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@axis@empty} +% \begin{macrocode} +\def\MT@warn@axis@empty#1#2{% + \MT@warning{#1 axis is empty in font specification\MessageBreak + `\MT@temp'. Using `#2' instead}% } % \end{macrocode} %\end{macro} % We have finally assembled all pieces to define \cs{DeclareMicrotypeSet}'s % keys. % \begin{macrocode} -\MT@define@set@keys{pr} -\MT@define@set@keys{ex} -%<*beta> -\MT@define@set@keys{sp} -\MT@define@set@keys{kn} -%</beta> +\MT@map@clist@c\MT@features{\MT@define@set@keys{#1}} % \end{macrocode} % It is also used for \cs{DisableLigatures}. % \begin{macrocode} @@ -5903,17 +6458,16 @@ In either case, please send a report to <w.m.l@gmx.net>. \renewcommand*\UseMicrotypeSet[2][]{% \KV@@sp@def\@tempa{#1}% \MT@ifempty\@tempa{% - \MT@use@set{pr}{#2}% - \MT@use@set{ex}{#2}% -%<*beta> - \MT@use@set{sp}{#2}% - \MT@use@set{kn}{#2}% -%</beta> + \MT@map@clist@c\MT@features{{\MT@use@set{##1}{#2}}}% }{% \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@use@set{\csname MT@rbba@\@tempa\endcsname}{#2}}}% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{activation of set `#2'}{% + \MT@exp@one@n\MT@use@set + {\csname MT@rbba@\@tempa\endcsname}{#2}% + }% + }% }% }% } @@ -5926,15 +6480,15 @@ In either case, please send a report to <w.m.l@gmx.net>. %\changes{v1.1}{2004/09/20}{remove spaces around set name} %\changes{v1.4b}{2004/11/25}{don't use undeclared font sets} %\changes{v1.6}{2005/01/19}{retain current set if new set is undeclared} -%\changes{v1.8}{2005/05/15}{bug fix: remove braces in first line} +%\changes{v1.8}{2005/05/15}{fix: remove braces in first line} % \begin{macrocode} \def\MT@use@set#1#2{% \KV@@sp@def\@tempa{#2}% - \MT@ifdefined@n{MT@#1@set@@\@tempa}{% + \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{% \global\MT@edef@n{MT@#1@setname}{\@tempa}% \MT@info{Using \@nameuse{MT@abbr@#1} set `\@tempa'}% }{% - \MT@ifdefined@n{MT@#1@setname}\relax{% + \MT@ifdefined@n@TF{MT@#1@setname}\relax{% \global\MT@edef@n{MT@#1@setname}{\@nameuse{MT@default@#1@set}}% }% \MT@warning{% @@ -5947,26 +6501,24 @@ In either case, please send a report to <w.m.l@gmx.net>. %\end{macro} %\end{macro} %\begin{macro}{\DeclareMicrotypeSetDefault} -%\changes{v1.8}{2005/05/15}{new macro: set fall back font set} +%\changes{v1.8}{2005/05/15}{new command: set default font set} % This command can be used in the main configuration file to declare the % default font set, in case no set is specified in the package options. % \begin{macrocode} \renewcommand*\DeclareMicrotypeSetDefault[2][]{% \KV@@sp@def\@tempa{#1}% \MT@ifempty\@tempa{% - \MT@set@default@set{pr}{#2}% - \MT@set@default@set{ex}{#2}% -%<*beta> - \MT@set@default@set{sp}{#2}% - \MT@set@default@set{kn}{#2}% -%</beta> + \MT@map@clist@c\MT@features{{\MT@set@default@set{##1}{#2}}}% }{% - \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@set@default@set - {\csname MT@rbba@\@tempa\endcsname}{#2}}}% - }% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{declaration of default set `#2'}{% + \MT@exp@one@n\MT@set@default@set + {\csname MT@rbba@\@tempa\endcsname}{#2}% + }% + }% + }}% }% } % \end{macrocode} @@ -5979,7 +6531,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \def\MT@set@default@set#1#2{% \KV@@sp@def\@tempa{#2}% - \MT@ifdefined@n{MT@#1@set@@\@tempa}{% + \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{% %<debug>\MT@dinfo{1}{declaring default \@nameuse{MT@abbr@#1} set `\@tempa'}% \global\MT@edef@n{MT@default@#1@set}{\@tempa}% }{% @@ -6005,10 +6557,10 @@ In either case, please send a report to <w.m.l@gmx.net>. \KV@@sp@def\@tempa{#1}% \KV@@sp@def\@tempb{#2}% \MT@make@string\@tempb - \MT@ifdefined@n{MT@\@tempa @alias}{% + \MT@ifdefined@n@T{MT@\@tempa @alias}{% \MT@warning{Alias font family `\@tempb' will override alias `\@nameuse{MT@\@tempa @alias}'\MessageBreak - for font family `\@tempa'}}\relax + for font family `\@tempa'}}% \global\MT@edef@n{MT@\@tempa @alias}{\@tempb}% % \end{macrocode} % If we encounter this command while a font is being set up, we also set the @@ -6017,17 +6569,17 @@ In either case, please send a report to <w.m.l@gmx.net>. % will be loaded, too. %\changes{v1.7}{2005/03/23}{may also be used inside configuration files} % \begin{macrocode} - \MT@ifdefined@c\MT@family{% + \MT@ifdefined@c@T\MT@family{% %<debug>\MT@dinfo{1}{Activating alias font `\@tempb' for `\MT@family'}% \global\let\MT@familyalias\@tempb - }\relax + }% } % \end{macrocode} %\end{macro} %\begin{macro}{\LoadMicrotypeFile} -%\changes{v1.7}{2005/03/22}{new macro (suggested by Andreas B\"uhmann)} -% ^^A <andreas.buehmann\at web.de> -% ^^A private mail, 21/3/2005 +%\changes{v1.7}{2005/03/22}{new command (suggested by +% \contributor Andreas B\"uhmann <andreas.buehmann\at web.de>)} +% ^^A private mail, 21/03/2005 % May be used to load a configuration file manually. % \begin{macrocode} \def\LoadMicrotypeFile#1{% @@ -6040,7 +6592,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@xadd\MT@file@list{\@tempa,}% \MT@begin@catcodes \InputIfFileExists{mt-\@tempa.cfg}{% - \MT@vinfo{... Loading configuration file mt-\@tempa.cfg}% + \edef\MT@curr@file{mt-\@tempa.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% }{% \MT@warning{... Configuration file mt-\@tempa.cfg\MessageBreak does not exist}% @@ -6051,28 +6604,29 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} %\end{macro} %\begin{macro}{\DisableLigatures} -%\changes{v1.9}{2005/07/11}{new macro: disable ligatures (requires \pdftex\ 1.30)} +%\changes{v1.9}{2005/07/11}{new command: disable ligatures (requires \pdftex\ 1.30)} % This is really simple now: We can re-use the set definitions of -% \cs{DeclareMicrotypeSet}; there can only be one set, which we'll call `no -% ligatures'. +% \cs{DeclareMicrotypeSet}; there can only be one set, which we'll call +% `|no ligatures|'. % \begin{macrocode} -\ifnum\MT@pdftex@no > 4 +\MT@requires@pdftex5{ \renewcommand*\DisableLigatures[1]{% + \edef\MT@active@features{\MT@active@features,nl}% \MT@noligaturestrue \MT@declare@sets{nl}{no ligatures}{#1}% \gdef\MT@nl@setname{no ligatures}% } -\else +}{ % \end{macrocode} % If \pdftex\ is too old, we issue a warning and neutralize the command. % \begin{macrocode} \renewcommand*\DisableLigatures[1]{% \MT@warning{Disabling ligatures of a font is only possible\MessageBreak - with pdftex version 1.30 or later.\MessageBreak + with pdftex version 1.30 or newer.\MessageBreak Ignoring \string\DisableLigatures}% - \let\DisableLigatures\@gobble + \global\let\DisableLigatures\@gobble } -\fi +} % \end{macrocode} %\end{macro} % @@ -6080,8 +6634,9 @@ In either case, please send a report to <w.m.l@gmx.net>. % %\begin{macro}{\DeclareMicrotypeBabelHook} % Declare the context that should be loaded when a \pkg{babel} language -% is selected. -%\changes{v2.0}{2005/10/05}{new command: interaction with \pkg{babel}} +% is selected. The command will not check whether a previous declaration will +% be overwritten. +%\changes{v2.0}{2005/10/04}{new command: interaction with \pkg{babel}} % \begin{macrocode} %<*beta> \def\DeclareMicrotypeBabelHook#1#2{% @@ -6090,128 +6645,10 @@ In either case, please send a report to <w.m.l@gmx.net>. \global\MT@def@n{MT@babel@\@tempa}{#2}% }% } -\@onlypreamble{\DeclareMicrotypeBabelHook} %</beta> % \end{macrocode} %\end{macro} -% \begin{macrocode} -%</package> -% \end{macrocode} % -%\subsubsection{Declarations} -%\GeneralChanges{Font Sets} -%\NoIndexing -% -% We now set up some default sets (in the main configuration file). -%\changes{v1.2}{2004/10/02}{new: \texttt{allmath} and \texttt{basicmath}} -%\changes{v1.8}{2005/05/25}{add \U\ encoding to \texttt{allmath}} -%\changes{v1.9}{2005/08/17}{add \otIV\ encoding to text sets} -%\changes{v1.9}{2005/08/17}{add \tV\ encoding to text sets} -% -% \begin{macrocode} -%<*config&m-t> - -%%% ---------------------------------------------------------------------- -%%% FONT SETS - -\DeclareMicrotypeSet{all} - { } - -\DeclareMicrotypeSet{allmath} - { encoding = {T1,LY1,OT1,OT4,T5,TS1,OML,OMS,U} } - -\DeclareMicrotypeSet{alltext} - { encoding = {T1,LY1,OT1,OT4,T5,TS1} } - -\DeclareMicrotypeSet{basicmath} - { encoding = {T1,LY1,OT1,OT4,T5,OML,OMS}, - family = {rm*,sf*}, - series = {m}, - size = {normalsize,footnotesize,small,large} - } - -\DeclareMicrotypeSet{basictext} - { encoding = {T1,LY1,OT1,OT4,T5}, - family = {rm*,sf*}, - series = {m}, - size = {normalsize,footnotesize,small,large} - } - -\DeclareMicrotypeSet{normalfont} - { font = */*/*/*/* } - -% \end{macrocode} -% The default sets. -% \begin{macrocode} -%%% ---------------------------------------------------------------------- -%%% DEFAULT SETS - -\DeclareMicrotypeSetDefault[protrusion]{alltext} -\DeclareMicrotypeSetDefault[expansion] {basictext} -%<*beta> -\DeclareMicrotypeSetDefault[spacing] {basictext} -\DeclareMicrotypeSetDefault[kerning] {alltext} -%</beta> - -% \end{macrocode} -% The Latin Modern fonts, the virtual fonts from the \pkg{ae} and \pkg{zefonts}, -% and the \pkg{eco} and \pkg{hfoldsty} packages (oldstyle numerals) all inherit -% the (basic) settings from Computer Modern Roman. Some of them are in part -% overwritten later. -%\changes{v1.2}{2004/10/03}{declare \texttt{cmr} as an alias for \texttt{cmor}} -%\changes{v1.3}{2004/10/22}{declare \texttt{cmr} as an alias for -% \texttt{aer}, \texttt{zer} and \texttt{hfor}} -% The packages \pkg{pxfonts} and \pkg{txfonts} fonts inherit Palatino and Times -% settings respectively. -%\changes{v1.8}{2005/04/19}{declare \texttt{ppl} and \texttt{ptm} as alias fonts -% for \texttt{pxr} resp. \texttt{txr}} -%\changes{v1.9}{2005/08/16}{declare \texttt{qpl} and \texttt{qtm} (\pkg{qfonts}) -% as alias fonts for \texttt{ppl} resp. \texttt{ptm}} -% \begin{macrocode} -%%% ---------------------------------------------------------------------- -%%% FONT ALIASES - -\DeclareMicrotypeAlias{lmr} {cmr} % lmodern -\DeclareMicrotypeAlias{aer} {cmr} % ae -\DeclareMicrotypeAlias{zer} {cmr} % zefonts -\DeclareMicrotypeAlias{cmor}{cmr} % eco -\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty -\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts -\DeclareMicrotypeAlias{qpl} {ppl} % qfonts/QuasiPalatino -\DeclareMicrotypeAlias{txr} {ptm} % txfonts -\DeclareMicrotypeAlias{qtm} {ptm} % qfonts/QuasiTimes - -% \end{macrocode} -%\todo{check Times variants} -% More Times variants, to be checked: |pns|, |mns| (TimesNewRomanPS); |mnt| -% (TimesNewRomanMT), |mntx| (TimesNRExpertMT); |mtm| (TimesSmallTextMT); |pte| -% (Times\-Europa); |ptt|, |pttj| (TimesTen); TimesEighteen; TimesModernEF. -% \begin{macrocode} -%<*beta> -% \end{macrocode} -% Interaction with \pkg{babel}. -% \begin{macrocode} -%%% ---------------------------------------------------------------------- -%%% INTERACTION WITH THE `babel' PACKAGE - -\DeclareMicrotypeBabelHook - {french,francais} - {kerning=french, spacing=} - -\DeclareMicrotypeBabelHook - {english,american,USenglish,british,UKenglish} - {kerning=, spacing=nonfrench} - -\DeclareMicrotypeBabelHook - {turkish} - {kerning=turkish, spacing=} - -%</beta> -%</config&m-t> -% \end{macrocode} -% -%\GeneralChanges! -%\Indexing % %\subsubsection{Fine Tuning} % @@ -6220,26 +6657,25 @@ In either case, please send a report to <w.m.l@gmx.net>. % set of fonts. % %\begin{macro}{\SetProtrusion} +%\changes{v1.9d}{2006/02/23}{(et al.) split keys of optional and mandatory argument} +%\changes{v1.9d}{2006/02/23}{(et al.) optimize: unify keys for mandatory argument} %\begin{macro}{\MT@pr@c@name} -%\begin{macro}{\MT@load} +%\begin{macro}{\MT@extra@load} %\begin{macro}{\MT@extra@factor} %\begin{macro}{\MT@extra@preset} %\begin{macro}{\MT@extra@unit} %\begin{macro}{\MT@extra@context} -% This macro accepts three arguments: [options,] set of font characteristics and +%\begin{macro}{\MT@permutelist} +% This macro accepts three arguments: [options,] set of font attributes and % list of character protrusion factors. % % A new macro called |\MT@pr@c@|\meta{name} will be defined to be \meta{\#3} % (i.e. the list of characters, not expanded). % \begin{macrocode} -%<*package> \renewcommand*\SetProtrusion[2][]{% \let\MT@pr@c@name\@undefined - \let\MT@load\@undefined - \let\MT@extra@factor\@undefined - \let\MT@extra@unit\@undefined - \let\MT@extra@preset\@undefined \let\MT@extra@context\@empty + \MT@map@clist@n{load,factor,unit,preset}{\MT@let@nc{MT@extra@##1}\@undefined}% % \end{macrocode} % Parse the optional first argument: % \begin{macrocode} @@ -6248,15 +6684,16 @@ In either case, please send a report to <w.m.l@gmx.net>. % If the user hasn't specified a name, we will create one. % \begin{macrocode} \MT@get@codes@name{pr}% - \MT@set@pr@opt +% \end{macrocode} +% Extra options. +% \begin{macrocode} + \MT@map@clist@n{factor,unit,preset}{\MT@set@opt{pr}{##1}}% %<debug>\MT@dinfo{1}{creating protrusion list `\MT@pr@c@name'}% \def\MT@permutelist{pr@c}% - \setkeys{MT@pr@c}{#2}% + \setkeys{MT@cfg}{#2}% % \end{macrocode} -%\begin{macro}{\MT@permutelist} % We have parsed the second argument, and can now define macros for all -% permutations of the font characteristics to point to -% |\MT@pr@c@|\meta{name},~\dots +% permutations of the font attributes to point to |\MT@pr@c@|\meta{name},~\dots % \begin{macrocode} \MT@permute % \end{macrocode} @@ -6286,8 +6723,10 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} %\end{macro} %\begin{macro}{\SetExpansion} +%\changes{v1.4}{2004/11/10}{fix: specifying extra options does no +% longer require to give a \texttt{name}, too} %\begin{macro}{\MT@ex@c@name} -%\begin{macro}{\MT@load} +%\begin{macro}{\MT@extra@load} %\begin{macro}{\MT@extra@factor} %\begin{macro}{\MT@extra@stretch} %\begin{macro}{\MT@extra@shrink} @@ -6300,20 +6739,28 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \renewcommand*\SetExpansion[2][]{% \let\MT@ex@c@name\@undefined - \let\MT@load\@undefined - \let\MT@extra@factor\@undefined - \let\MT@extra@stretch\@undefined - \let\MT@extra@shrink\@undefined - \let\MT@extra@step\@undefined - \let\MT@extra@auto\@undefined - \let\MT@extra@preset\@undefined \let\MT@extra@context\@empty + \MT@map@clist@n{load,factor,preset,stretch,shrink,step,auto}% + {\MT@let@nc{MT@extra@##1}\@undefined}% \setkeys{MT@ex@c}{#1}% \MT@get@codes@name{ex}% - \MT@set@ex@opt +% \end{macrocode} +% The extra options to \cs{SetExpansion} also have to be dealt with only after +% we know the name. +% \begin{macrocode} + \MT@map@clist@n{preset,stretch,shrink,step,auto}{\MT@set@opt{ex}{##1}}% + \MT@ifdefined@c@T\MT@extra@factor{% + \ifnum\MT@extra@factor>\@m + \MT@warning@nl{Expansion factor \number\MT@extra@factor\space too + large in list\MessageBreak `\MT@ex@c@name'. Setting it to the + maximum of 1000}% + \let\MT@extra@factor\@m + \fi + \global\MT@let@nc{MT@ex@c@\MT@ex@c@name @factor}\MT@extra@factor + }% %<debug>\MT@dinfo{1}{creating expansion list `\MT@ex@c@name'}% \def\MT@permutelist{ex@c}% - \setkeys{MT@ex@c}{#2}% + \setkeys{MT@cfg}{#2}% \MT@permute \MT@begin@catcodes \MT@set@ex@list @@ -6342,8 +6789,9 @@ In either case, please send a report to <w.m.l@gmx.net>. %<*beta> % \end{macrocode} %\begin{macro}{\SetExtraSpacing} +%\changes{v2.0}{2005/09/28}{new command: adjustment of interword spacing} %\begin{macro}{\MT@sp@c@name} -%\begin{macro}{\MT@load} +%\begin{macro}{\MT@extra@load} %\begin{macro}{\MT@extra@factor} %\begin{macro}{\MT@extra@unit} %\begin{macro}{\MT@extra@preset} @@ -6351,17 +6799,14 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \renewcommand*\SetExtraSpacing[2][]{% \let\MT@sp@c@name\@undefined - \let\MT@load\@undefined - \let\MT@extra@factor\@undefined - \let\MT@extra@unit\@undefined - \let\MT@extra@preset\@undefined \let\MT@extra@context\@empty + \MT@map@clist@n{load,factor,unit,preset}{\MT@let@nc{MT@extra@##1}\@undefined}% \setkeys{MT@sp@c}{#1}% \MT@get@codes@name{sp}% - \MT@set@sp@opt -%<debug>\MT@dinfo{1}{creating space list `\MT@sp@c@name'}% + \MT@map@clist@n{factor,unit,preset}{\MT@set@opt{sp}{##1}}% +%<debug>\MT@dinfo{1}{creating spacing list `\MT@sp@c@name'}% \def\MT@permutelist{sp@c}% - \setkeys{MT@sp@c}{#2}% + \setkeys{MT@cfg}{#2}% \MT@permute \MT@begin@catcodes \MT@set@sp@list @@ -6382,9 +6827,11 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} %\end{macro} +%\todo{command to inhibit kerning etc.} %\begin{macro}{\SetExtraKerning} +%\changes{v2.0}{2005/09/28}{new command: additional kerning} %\begin{macro}{\MT@kn@c@name} -%\begin{macro}{\MT@load} +%\begin{macro}{\MT@extra@load} %\begin{macro}{\MT@extra@factor} %\begin{macro}{\MT@extra@unit} %\begin{macro}{\MT@extra@preset} @@ -6392,17 +6839,14 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \renewcommand*\SetExtraKerning[2][]{% \let\MT@kn@c@name\@undefined - \let\MT@load\@undefined - \let\MT@extra@factor\@undefined - \let\MT@extra@unit\@undefined - \let\MT@extra@preset\@undefined \let\MT@extra@context\@empty + \MT@map@clist@n{load,factor,unit,preset}{\MT@let@nc{MT@extra@##1}\@undefined}% \setkeys{MT@kn@c}{#1}% \MT@get@codes@name{kn}% - \MT@set@kn@opt + \MT@map@clist@n{factor,unit,preset}{\MT@set@opt{kn}{##1}}% %<debug>\MT@dinfo{1}{creating kerning list `\MT@kn@c@name'}% \def\MT@permutelist{kn@c}% - \setkeys{MT@kn@c}{#2}% + \setkeys{MT@cfg}{#2}% \MT@permute \MT@begin@catcodes \MT@set@kn@list @@ -6427,106 +6871,43 @@ In either case, please send a report to <w.m.l@gmx.net>. %</beta> % \end{macrocode} %\begin{macro}{\MT@get@codes@name} -% Simply use a roman number as the list name if the user didn't bother creating -% one. +%\changes{v1.9a}{2005/11/21}{`\meta{file name}\texttt{/}\meta{line number}' as default list name} +% Use file name and line number as the list name if the user didn't bother +% creating one. % \begin{macrocode} \def\MT@get@codes@name#1{% - \MT@ifdefined@n{MT@#1@c@name}{% - \MT@ifdefined@n{MT@#1@c@\csname MT@#1@c@name\endcsname}{% + \MT@ifdefined@n@TF{MT@#1@c@name}{% + \MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{% \MT@warning{Redefining list `\@nameuse{MT@#1@c@name}'}% - }\relax - }{% - \@tempcnta=\@ne - \MT@while@num{\@tempcnta > \z@}{% - \MT@ifdefined@n{MT@#1@c@#1-\romannumeral\@tempcnta}{% - \advance \@tempcnta \@ne - }{% - \MT@edef@n{MT@#1@c@name}{#1-\romannumeral\@tempcnta}% - \@tempcnta=\z@ - }% }% + }{% + \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}% }% \MT@let@cn\MT@curr@set@name{MT@#1@c@name}% % \end{macrocode} -%\changes{v1.3}{2004/10/27}{bug fix: specifying \texttt{load} option does no +%\changes{v1.3}{2004/10/27}{fix: specifying \texttt{load} option does no % longer require to give a \texttt{name}, too} % Now that we know the name, we can cater for any set to be loaded by this list. % \begin{macrocode} - \MT@ifdefined@c\MT@load{% - \global\MT@let@nc{MT@#1@c@\MT@curr@set@name load}\MT@load - }\relax -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@set@pr@opt} -% Three extra option for protrusion: |factor|, |unit| and |preset|. -% \begin{macrocode} -\def\MT@set@pr@opt{% - \MT@set@opt@{pr}{factor}% - \MT@set@opt@{pr}{unit}% - \MT@set@opt@{pr}{preset}% -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@set@ex@opt} -% The extra options to \cs{SetExpansion} also have to be dealt with only after -% we know the name. -%\changes{v1.4}{2004/11/10}{bug fix: specifying extra options does no -% longer require to give a \texttt{name}, too} -% \begin{macrocode} -\def\MT@set@ex@opt{% - \MT@ifdefined@c\MT@extra@factor{% - \ifnum\MT@extra@factor>\@m - \MT@warning@nl{Expansion factor \number\MT@extra@factor\space too - large in list\MessageBreak `\MT@ex@c@name'. Setting it to the - maximum of 1000}% - \let\MT@extra@factor\@m - \fi - \global\MT@let@nc{MT@ex@c@\MT@ex@c@name @factor}\MT@extra@factor - }\relax - \MT@set@opt@{ex}{stretch}% - \MT@set@opt@{ex}{shrink}% - \MT@set@opt@{ex}{step}% - \MT@set@opt@{ex}{auto}% - \MT@set@opt@{ex}{preset}% -} -% \end{macrocode} -%\end{macro} -% \begin{macrocode} -%<*beta> -% \end{macrocode} -%\begin{macro}{\MT@set@sp@opt} -% \begin{macrocode} -\def\MT@set@sp@opt{% - \MT@set@opt@{sp}{factor}% - \MT@set@opt@{sp}{unit}% - \MT@set@opt@{sp}{preset}% -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@set@kn@opt} -% \begin{macrocode} -\def\MT@set@kn@opt{% - \MT@set@opt@{kn}{factor}% - \MT@set@opt@{kn}{unit}% - \MT@set@opt@{kn}{preset}% + \MT@ifdefined@c@T\MT@extra@load{% + \global\MT@let@nc{MT@#1@c@\MT@curr@set@name load}\MT@extra@load + }% } % \end{macrocode} %\end{macro} +%\begin{macro}{\MT@set@opt} +% The additional options can also only be dealt with after we know the list name. % \begin{macrocode} -%</beta> -% \end{macrocode} -%\begin{macro}{\MT@set@opt@} -% \begin{macrocode} -\def\MT@set@opt@#1#2{% - \MT@ifdefined@n{MT@extra@#2}{% +\def\MT@set@opt#1#2{% + \MT@ifdefined@n@T{MT@extra@#2}{% \global\MT@let@nn{MT@#1@c@\csname MT@#1@c@name\endcsname @#2}{MT@extra@#2}% - }\relax + }% } % \end{macrocode} %\end{macro} %\begin{macro}{\MT@define@code@key} -% Define the keys for expansion and protrusion character code lists. +% Define the keys for the configuration lists (which are setting the codes, in +% \pdftex\ speak). % \begin{macrocode} \def\MT@define@code@key#1#2{% \define@key{MT@#2}{#1}[]{% @@ -6538,7 +6919,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % immediately. % \begin{macrocode} \MT@get@highlevel{#1}% - \MT@edef@n{MT@temp#1\romannumeral\@tempcnta}{\MT@val}% + \MT@edef@n{MT@temp#1\the\@tempcnta}{\MT@val}% \advance\@tempcnta \@ne }% }% @@ -6546,6 +6927,10 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} %\end{macro} %\begin{macro}{\MT@define@code@key@size} +%\changes{v1.9c}{2006/01/25}{fix: embrace \cs{MT@tempsize} in \cmd{\csname} +% (bug introduced in 1.9b)} +% \cs{MT@tempsize} must be in a \cmd{\csname}, so that it is at least +% \cmd{\relax}, not undefined. % \begin{macrocode} \def\MT@define@code@key@size#1{% \define@key{MT@#1}{size}[]{% @@ -6553,9 +6938,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \KV@@sp@def\MT@val{####1}% \expandafter\MT@get@range\MT@val--\@nil \ifx\MT@val\relax \else - \expandafter\MT@xadd - \csname MT@tempsize\endcsname - {{{\MT@lower}{\MT@upper}{\csname MT@#1@name\endcsname}}}% + \expandafter\MT@xadd\csname MT@tempsize\endcsname + {{{\MT@lower}{\MT@upper}{\MT@curr@set@name}}}% \fi }% }% @@ -6564,17 +6948,23 @@ In either case, please send a report to <w.m.l@gmx.net>. %\end{macro} %\changes{v1.9}{2005/07/13}{\cs{SetProtrusion} and \cs{SetExpansion}: new key: \texttt{font}} %\begin{macro}{\MT@define@code@key@font} +%\changes{v1.9c}{2006/01/25}{fix: context was ignored} % \begin{macrocode} \def\MT@define@code@key@font#1{% \define@key{MT@#1}{font}[]{% \MT@map@clist@n{##1}{% \KV@@sp@def\MT@val{####1}% \expandafter\MT@get@font@and@size\MT@val/////\@nil - \global\MT@edef@n{MT@\MT@permutelist @\@tempb}% + \global\MT@edef@n{MT@\MT@permutelist @\@tempb\MT@extra@context}% {\csname MT@\MT@permutelist @name\endcsname}% +%<*debug> + \MT@dinfo@nl{1}{initializing: use list for font \@tempb=\MT@val + \ifx\MT@extra@context\@empty\else\MessageBreak + (context: \MT@extra@context)\fi}% +%</debug> \expandafter\MT@xaddb - \csname MT@\MT@permutelist @\@tempb @sizes\endcsname - {{{\MT@val}{\m@ne}{\csname MT@#1@name\endcsname}}}% + \csname MT@\MT@permutelist @\@tempb\MT@extra@context @sizes\endcsname + {{{\MT@val}{\m@ne}{\MT@curr@set@name}}}% }% }% } @@ -6592,12 +6982,11 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@get@axis{series}{#3}% \MT@get@axis{shape}{#4}% % \end{macrocode} -% Remove leading slash and append an asterisk for the size. +% Append an asterisk for the size. % \begin{macrocode} - \edef\@tempb{\expandafter\@gobble\@tempb/*}% + \edef\@tempb{\@tempb*}% \MT@ifempty{#5}{% - \MT@warning{size axis is empty in font specification\MessageBreak - `\MT@temp'. Using \string\normalsize\space instead}% + \MT@warn@axis@empty{size}{\string\normalsize}% \def\MT@val{*}% }{% \def\MT@val{#5}% @@ -6607,53 +6996,38 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} %\end{macro} +% \begin{macrocode} +\MT@define@code@key{encoding}{cfg} +\MT@define@code@key{family}{cfg} +\MT@define@code@key{series}{cfg} +\MT@define@code@key{shape}{cfg} +\MT@define@code@key@size{cfg} +\MT@define@code@key@font{cfg} +% \end{macrocode} +%\todo{use \pkg{xkeyval} instead of \pkg{keyval}?} %\begin{macro}{\MT@declare@codes} +% The options in the optional first argument. We wouldn't need to define these +% keys for each feature, if we were using the \pkg{xkeyval} package. % \begin{macrocode} \def\MT@declare@codes#1{% \define@key{MT@#1@c}{name}[]{% - \MT@ifempty{##1}\relax{% - \MT@def@n{MT@#1@c@name}{##1}% - }% - }% + \MT@ifempty{##1}\relax{\MT@def@n{MT@#1@c@name}{##1}}}% \define@key{MT@#1@c}{load}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@load{##1}% - }% - }% + \MT@ifempty{##1}\relax{\def\MT@extra@load{##1}}}% \define@key{MT@#1@c}{factor}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@extra@factor{##1 }% - }% - }% - \MT@define@code@key{encoding}{#1@c}% - \MT@define@code@key{family}{#1@c}% - \MT@define@code@key{series}{#1@c}% - \MT@define@code@key{shape}{#1@c}% - \MT@define@code@key@size{#1@c}% - \MT@define@code@key@font{#1@c}% + \MT@ifempty{##1}\relax{\def\MT@extra@factor{##1 }}}% \define@key{MT@#1@c}{preset}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@extra@preset{##1}% - }% - }% + \MT@ifempty{##1}\relax{\def\MT@extra@preset{##1}}}% % \end{macrocode} % Only one context is allowed. This might change in the future. % \begin{macrocode} \define@key{MT@#1@c}{context}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@extra@context{##1}% - }% - }% + \MT@ifempty{##1}\relax{\def\MT@extra@context{##1}}}% } % \end{macrocode} %\end{macro} % \begin{macrocode} -\MT@declare@codes{pr} -\MT@declare@codes{ex} -%<*beta> -\MT@declare@codes{sp} -\MT@declare@codes{kn} -%</beta> +\MT@map@clist@c\MT@features{\MT@declare@codes{#1}} % \end{macrocode} % Protrusion codes may be relative to character width, or to any dimension. %\changes{v1.8}{2005/04/14}{\cs{SetProtrusion}: new option: \texttt{unit}} @@ -6684,8 +7058,6 @@ In either case, please send a report to <w.m.l@gmx.net>. }% } % \end{macrocode} -%\changes{v2.0}{2005/09/28}{\cs{SetExtraKerning}/\cs{SetExtraSpacing}: -% new key `\texttt{space}' for option \texttt{unit}} %\begin{macro}{\MT@define@key@unit} % Spacing and kerning codes may additionally be relative to space dimensions. % \begin{macrocode} @@ -6694,12 +7066,6 @@ In either case, please send a report to <w.m.l@gmx.net>. \define@key{MT@#1@c}{unit}[space]{% \let\MT@extra@unit\@empty \KV@@sp@def\@tempa{##1}% - \MT@ifstreq\@tempa{relative}{% - \MT@warning{Value `relative' for key `unit' is deprecated.\MessageBreak - Use `unit=character' instead. For now, I'll do it\MessageBreak - for you}% - \def\@tempa{character}% - }\relax \MT@ifstreq\@tempa{character}\relax{% \let\MT@extra@unit\m@ne \MT@ifstreq\@tempa{space}\relax{% @@ -6727,7 +7093,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@define@ex@c@key#1{% \define@key{MT@ex@c}{#1}[]{% \MT@ifempty{##1}\relax{% - \MT@ifnumber{##1}{% + \MT@ifint{##1}{% % \end{macrocode} % A space terminates the number. % \begin{macrocode} @@ -6756,15 +7122,15 @@ In either case, please send a report to <w.m.l@gmx.net>. %\changes{v1.7}{2005/03/07}{\cs{SetExpansion}: don't allow automatic % expansion for old \pdftex\ versions} % \begin{macrocode} - \ifnum\MT@pdftex@no > \thr@@ + \MT@requires@pdftex4{% \def\MT@extra@auto{autoexpand}% - \else + }{% \MT@warning{pdfTeX too old for automatic font expansion}% - \fi + } \else - \ifnum\MT@pdftex@no > \thr@@ + \MT@requires@pdftex4{% \let\MT@extra@auto\@empty - \fi + }\relax \fi } % \end{macrocode} @@ -6772,7 +7138,8 @@ In either case, please send a report to <w.m.l@gmx.net>. %\subsubsection{Character Inheritance} % %\begin{macro}{\DeclareCharacterInheritance} -%\changes{v1.1}{2004/09/15}{new macro: possibility to specify character inheritance} +%\changes{v1.1}{2004/09/15}{new command: possibility to specify character inheritance} +%\changes{v1.9d}{2006/02/09}{fix: empty context} % This macro may be used in the configuration files to declare characters that % should inherit protrusion resp. expansion values from other characters. Thus, % there is no need to define all accented characters (\eg\ |\`a|, |\'a|, @@ -6782,6 +7149,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % simply override it. % \begin{macrocode} \renewcommand*\DeclareCharacterInheritance[1][]{% + \let\MT@extra@context\@empty \KV@@sp@def\@tempa{#1}% \MT@begin@catcodes \MT@set@inh@list @@ -6793,19 +7161,17 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \def\MT@set@inh@list#1#2{% \MT@ifempty\@tempa{% - \MT@declare@char@inh{pr}{#1}{#2}% - \MT@declare@char@inh{ex}{#1}{#2}% -%<*beta> - \MT@declare@char@inh{sp}{#1}{#2}% - \MT@declare@char@inh{kn}{#1}{#2}% -%</beta> + \MT@map@clist@c\MT@features{{\MT@declare@char@inh{##1}{#1}{#2}}}% }{% - \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@declare@char@inh - {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}}}% - }% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{inheritance declaration for `#1'}{% + \MT@exp@one@n\MT@declare@char@inh + {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}% + }% + }% + }}% }% \MT@end@catcodes } @@ -6813,50 +7179,31 @@ In either case, please send a report to <w.m.l@gmx.net>. %\end{macro} %\begin{macro}{\MT@declare@char@inh} % The optional argument may be used to restrict the inheritance list to -% protrusion or expansion. +% a feature. The lists cannot be given a name by the user. % \begin{macrocode} \def\MT@declare@char@inh#1#2#3{% - \MT@let@nc{MT@#1@inh@name}\@undefined - \MT@get@inh@name{#1}% + \MT@edef@n{MT@#1@inh@name}% + {\MT@curr@file/\the\inputlineno (\@nameuse{MT@abbr@#1})}% + \MT@let@cn\MT@curr@set@name{MT@#1@inh@name}% %<debug>\MT@dinfo{1}{creating inheritance list `\@nameuse{MT@#1@inh@name}'}% \global\MT@def@n{MT@#1@inh@\csname MT@#1@inh@name\endcsname}{#3}% \def\MT@permutelist{#1@inh}% - \setkeys{MT@#1@inh}{#2}% + \setkeys{MT@inh}{#2}% \MT@permute } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@get@inh@name} -% The inheritance lists cannot be named by the user. -% \begin{macrocode} -\def\MT@get@inh@name#1{% - \@tempcnta=\@ne - \MT@while@num{\@tempcnta > \z@}{% - \MT@ifdefined@n{MT@#1@inh@#1-inh-\romannumeral\@tempcnta}{% - \advance \@tempcnta \@ne - }{% - \MT@edef@n{MT@#1@inh@name}{#1-inh-\romannumeral\@tempcnta}% - \@tempcnta=\z@ - }% - }% -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@define@inh@key@encoding} -% Parse the first argument. \cs{DeclareCharacterInheritance} may also be set +% Parse the second argument. \cs{DeclareCharacterInheritance} may also be set % up for various combinations. %\changes{v1.2}{2004/09/29}{check whether only one encoding specified} % \begin{macrocode} -\def\MT@define@inh@key@encoding#1{% - \define@key{MT@#1}{encoding}[]{% - \def\MT@val{##1}% - \expandafter\MT@encoding@check\MT@val,\@nil - \MT@get@highlevel{encoding}% - \MT@edef@n{MT@tempencoding\romannumeral1}{\MT@val}% - }% +\define@key{MT@inh}{encoding}[]{% + \def\MT@val{#1}% + \expandafter\MT@encoding@check\MT@val,\@nil + \MT@get@highlevel{encoding}% + \MT@edef@n{MT@tempencoding1}{\MT@val}% } % \end{macrocode} -%\end{macro} %\begin{macro}{\MT@encoding@check} % But we only allow \emph{one} encoding. % \begin{macrocode} @@ -6869,30 +7216,17 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} %\end{macro} -%\begin{macro}{\MT@define@inh@keys} +% For the rest, we can reuse the key setup from the configuration lists +% (|\Set...|). % \begin{macrocode} -\def\MT@define@inh@keys#1{% - \MT@define@inh@key@encoding{#1@inh}% +\MT@define@code@key{family}{inh} +\MT@define@code@key{series}{inh} +\MT@define@code@key{shape}{inh} +\MT@define@code@key@size{inh} +\MT@define@code@key@font{inh} % \end{macrocode} -% For the rest, we can reuse the key setup from \cs{SetProtrusion} resp. -% \cs{SetExpansion}. -% \begin{macrocode} - \MT@define@code@key{family}{#1@inh}% - \MT@define@code@key{series}{#1@inh}% - \MT@define@code@key{shape}{#1@inh}% - \MT@define@code@key@size{#1@inh}% - \MT@define@code@key@font{#1@inh}% -} -\MT@define@inh@keys{pr} -\MT@define@inh@keys{ex} -%<*beta> -\MT@define@inh@keys{sp} -\MT@define@inh@keys{kn} -%</beta> -% \end{macrocode} -%\end{macro} %\begin{macro}{\MT@inh@do} -% Parse the second argument, the inheritance lists. We define the commands +% Now parse the third argument, the inheritance lists. We define the commands % |\MT@inh@|\meta{name}|@|\meta{slot}|@|, containing the inheriting characters. % They will also be translated to slot numbers here, to save some time. The % following will be executed only once, namely the first time this inheritance @@ -6945,9 +7279,8 @@ In either case, please send a report to <w.m.l@gmx.net>. %\begin{macro}{\MT@permute@@} %\begin{macro}{\MT@permute@@@} %\begin{macro}{\MT@permute@@@@} -%\begin{macro}{\MT@permute@@@@@} % Calling \cs{MT@permute} will define commands for all permutations -% of the specified font characteristics of the form +% of the specified font attributes of the form % |\MT@|\meta{list type}|@/|\meta{encoding}|/|\meta{family}|/|^^A % \meta{series}|/|\hskip0pt\meta{shape}|/|\meta{\textbar*} % to be the expansion of |\MT@|\meta{list type}|@name|, \ie, the name of @@ -6967,35 +7300,55 @@ In either case, please send a report to <w.m.l@gmx.net>. \let\MT@cnt@family\@ne \MT@permute@@ \MT@increment\MT@cnt@encoding - \MT@ifdefined@n{MT@tempencoding\romannumeral\MT@cnt@encoding}% + \MT@ifdefined@n@T{MT@tempencoding\MT@cnt@encoding}% \MT@permute@ - \relax } \def\MT@permute@@{% \let\MT@cnt@series\@ne \MT@permute@@@ \MT@increment\MT@cnt@family - \MT@ifdefined@n{MT@tempfamily\romannumeral\MT@cnt@family}% + \MT@ifdefined@n@T{MT@tempfamily\MT@cnt@family}% \MT@permute@@ - \relax } \def\MT@permute@@@{% \let\MT@cnt@shape\@ne \MT@permute@@@@ \MT@increment\MT@cnt@series - \MT@ifdefined@n{MT@tempseries\romannumeral\MT@cnt@series}% + \MT@ifdefined@n@T{MT@tempseries\MT@cnt@series}% \MT@permute@@@ - \relax } \def\MT@permute@@@@{% \MT@permute@@@@@ \MT@increment\MT@cnt@shape - \MT@ifdefined@n{MT@tempshape\romannumeral\MT@cnt@shape}% + \MT@ifdefined@n@T{MT@tempshape\MT@cnt@shape}% \MT@permute@@@@ - \relax } +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@permute@@@@@} +%\changes{v1.9a}{2005/12/05}{don't define permutations for unused encodings} +% In order to save some memory, we can ignore unused encodings (inside the +% document). +% \begin{macrocode} \def\MT@permute@@@@@{% \MT@permute@define{encoding}% + \ifMT@document + \ifx\MT@tempencoding\@empty \else + \MT@ifdefined@n@TF{T@\MT@tempencoding}\relax + {\expandafter\expandafter\expandafter\@gobble}% + \fi + \fi + \MT@permute@@@@@@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@permute@@@@@@} +% \begin{macrocode} +\def\MT@permute@@@@@@{% \MT@permute@define{family}% \MT@permute@define{series}% \MT@permute@define{shape}% @@ -7003,7 +7356,7 @@ In either case, please send a report to <w.m.l@gmx.net>. /\MT@tempfamily /\MT@tempseries /\MT@tempshape - /\MT@ifdefined@c\MT@tempsize *\@empty}% + /\MT@ifdefined@c@T\MT@tempsize *}% % \end{macrocode} %\changes{v1.2}{2004/09/29}{more sanity checks for \cs{SetProtrusion} and % \cs{SetExpansion}} @@ -7018,34 +7371,35 @@ In either case, please send a report to <w.m.l@gmx.net>. `\@nameuse{MT@\MT@permutelist @name}'.\MessageBreak Ignoring it}% \else - \MT@ifdefined@c\MT@tempsize{% + \MT@ifdefined@c@TF\MT@tempsize{% % \end{macrocode} % Add the list of ranges to the beginning of the current combination, after % checking for conflicts. %\changes{v1.8}{2005/04/20}{add ranges to the beginning of the lists} % \begin{macrocode} - \MT@ifdefined@n{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{% + \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{% \MT@map@tlist@c \MT@tempsize \MT@check@rlist - }\relax + }% \expandafter\MT@xaddb \csname MT@\MT@permutelist @\@tempa\MT@extra@context @sizes\endcsname \MT@tempsize %<*debug> - \MT@dinfo@nl{1}{initializing: use list for font \@tempa,\MessageBreak - sizes: \csname MT@\MT@permutelist @\@tempa\MT@extra@context - @sizes\endcsname}% + \MT@dinfo@nl{1}{initializing: use list for font \@tempa,\MessageBreak + sizes: \csname MT@\MT@permutelist @\@tempa\MT@extra@context + @sizes\endcsname}% %</debug> }{% % \end{macrocode} % Only one list should apply to a given combination. % \begin{macrocode} - \MT@ifdefined@n{MT@\MT@permutelist @\@tempa\MT@extra@context}{% + \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context}{% \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list `\@nameuse{MT@\MT@permutelist @name}' will override list\MessageBreak - `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}' for font `\@tempa'}% - }\relax + `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}' + for font `\@tempa'}% + }% %<*debug> \MT@dinfo@nl{1}{initializing: use list for font \@tempa \ifx\MT@extra@context\@empty\else\MessageBreak @@ -7059,18 +7413,13 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} %\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} %\begin{macro}{\MT@permute@define} % Define the commands. % \begin{macrocode} \def\MT@permute@define#1{% \expandafter\@tempcnta=\csname MT@cnt@#1\endcsname\relax - \MT@ifdefined@n{MT@temp#1\romannumeral\@tempcnta}% - {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\romannumeral\@tempcnta\endcsname}}% + \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}% + {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\the\@tempcnta\endcsname}}% {\MT@let@nc{MT@temp#1}\@empty}% } % \end{macrocode} @@ -7092,9 +7441,9 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@permute@reset@#1{% \@tempcnta=\@ne \MT@loop - \MT@let@nc{MT@temp#1\romannumeral\@tempcnta}\@undefined + \MT@let@nc{MT@temp#1\the\@tempcnta}\@undefined \advance\@tempcnta\@ne - \MT@ifdefined@n{MT@temp#1\romannumeral\@tempcnta}% + \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}% \iftrue \iffalse \MT@repeat @@ -7106,9 +7455,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % For every new range item in \cs{MT@tempsize}, check whether it overlaps with % ranges in the existing list. % \begin{macrocode} -\def\MT@check@rlist#1{% - \expandafter\MT@check@rlist@#1% -} +\def\MT@check@rlist#1{\expandafter\MT@check@rlist@ #1} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@check@rlist@} @@ -7127,9 +7474,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %\begin{macro}{\MT@check@range} % \dots~recurse through the list of existing ranges. % \begin{macrocode} -\def\MT@check@range#1{% - \expandafter\MT@check@range@#1% -} +\def\MT@check@range#1{\expandafter\MT@check@range@ #1} % \end{macrocode} %\end{macro} %\begin{macro}{\MT@check@range@} @@ -7137,38 +7482,38 @@ In either case, please send a report to <w.m.l@gmx.net>. % \meta{\#2} and \meta{\#3} those of the existing range. % \begin{macrocode} \def\MT@check@range@#1#2#3{% - \MT@ifeq{#2}\m@ne{% - \MT@ifeq\@tempc\m@ne{% + \MT@ifdim{#2}=\m@ne{% + \MT@ifdim\@tempc=\m@ne{% % \end{macrocode} %\begin{itemize} % \item Both items are simple sizes. % \begin{macrocode} - \MT@ifeq\@tempb{#1}\@tempswatrue\relax + \MT@ifdim\@tempb={#1}\@tempswatrue\relax }{% % \end{macrocode} % \item Item in list is a simple size, new item is a range. % \begin{macrocode} - \MT@ifgt\@tempb{#1}\relax{% - \MT@ifgt\@tempc{#1}{% + \MT@ifdim\@tempb>{#1}\relax{% + \MT@ifdim\@tempc>{#1}{% \@tempswatrue \edef\@tempb{#1 (with range: \@tempb\space to \@tempc)}% }\relax }% }% }{% - \MT@ifeq\@tempc\m@ne{% + \MT@ifdim\@tempc=\m@ne{% % \end{macrocode} % \item Item in list is a range, new item is a simple size. % \begin{macrocode} - \MT@iflt\@tempb{#2}{% - \MT@iflt\@tempb{#1}\relax\@tempswatrue + \MT@ifdim\@tempb<{#2}{% + \MT@ifdim\@tempb<{#1}\relax\@tempswatrue }\relax }{% % \end{macrocode} % \item Both items are ranges. % \begin{macrocode} - \MT@iflt\@tempb{#2}{% - \MT@ifgt\@tempc{#1}{% + \MT@ifdim\@tempb<{#2}{% + \MT@ifdim\@tempc>{#1}{% \@tempswatrue \edef\@tempb{#1 to #2 (with range: \@tempb\space to \@tempc)}% }\relax @@ -7190,256 +7535,22 @@ In either case, please send a report to <w.m.l@gmx.net>. %\end{itemize} %\end{macro} % -%\subsection{User Command} -% -%\begin{macro}{\microtypesetup} -%\changes{v1.4}{2004/11/04}{bug fix: set the correct levels, and remember them; -% warning when enabling an option disabled in package options} -%\changes{v1.7}{2005/02/17}{bug fix: warning also when setting to \texttt{(no)compatibility}} -%\begin{macro}{\MT@define@optionX} -% This command may be used anywhere in the document. It accepts the options: -% |protrusion|, |expansion| and |activate|, and |spacing| and |kerning|. -% Specifying font sets is not allowed. -% \begin{macrocode} -\def\microtypesetup{\setkeys{MTX}} -\def\MT@define@optionX#1#2{% - \define@key{MTX}{#1}[true]{% - \KV@@sp@def\@tempb{#1}% - \MT@map@clist@n{##1}{% - \KV@@sp@def\MT@val{####1}% - \edef\@tempb{\csname MT@rbba@\@tempb\endcsname}% - \MT@ifempty\MT@val\relax{% - \@tempcnta=\m@ne - \MT@ifstreq\MT@val{true}{% -% \end{macrocode} -% Enabling micro-typography in the middle of the document is not allowed if it -% has been disabled in the package options since fonts might already have been -% loaded and hence wouldn't be set up. -% \begin{macrocode} - \MT@checksetup\@tempb{% - \expandafter\@tempcnta=\csname MT@\@tempb @level\endcsname - \MT@info{Enabling #1 - (level \number\csname MT@\@tempb @level\endcsname)}% - }% - }{% - \MT@ifstreq\MT@val{false}{% - \@tempcnta=\z@ - \MT@info{Disabling #1}% - }{% - \MT@ifstreq\MT@val{compatibility}{% - \MT@checksetup\@tempb{% - \@tempcnta=\@ne - \MT@let@nc{MT@\@tempb @level}\@ne - \MT@info{Setting #1 to level 1}% - }% - }{% - \MT@ifstreq\MT@val{nocompatibility}{% - \MT@checksetup\@tempb{% - \@tempcnta=\tw@ - \MT@let@nc{MT@\@tempb @level}\tw@ - \MT@info{Setting #1 to level 2}% - }% - }{% - \MT@warning{% - Value `\MT@val' for key `#1' not recognized.\MessageBreak - Use any of `true', `false', `compatibility' or\MessageBreak - `nocompatibility'}% - }% - }% - }% - }% - \ifnum\@tempcnta>\m@ne - #2\@tempcnta\relax - \fi - }% - }% - }% -} -% \end{macrocode} -%\end{macro} -%\end{macro} -%\begin{macro}{\MT@checksetup} -% Test whether the feature wasn't disabled in the package options. -% \begin{macrocode} -\def\MT@checksetup#1{% - \expandafter\csname ifMT@\csname MT@abbr@#1\endcsname\endcsname - \expandafter\@firstofone - \else - \MT@warning{% - You cannot enable \@nameuse{MT@abbr@#1} if it was disabled\MessageBreak - in the package options,}% - \expandafter\@gobble - \fi -} -% \end{macrocode} -%\end{macro} -% \begin{macrocode} -\MT@define@optionX{protrusion}\pdfprotrudechars -\MT@define@optionX{expansion}\pdfadjustspacing -%<*beta> -% \end{macrocode} -%\begin{macro}{\MT@define@optionX@} -% The same for |spacing| and |kerning|, which do not have a |nocompatibility| level. -% \begin{macrocode} -\def\MT@define@optionX@#1#2{% - \define@key{MTX}{#1}[true]{% - \KV@@sp@def\@tempb{#1}% - \MT@map@clist@n{##1}{% - \KV@@sp@def\MT@val{####1}% - \edef\@tempb{\csname MT@rbba@\@tempb\endcsname}% - \MT@ifempty\MT@val\relax{% - \@tempcnta=\m@ne - \MT@ifstreq\MT@val{true}{% - \MT@checksetup\@tempb{% - \@tempcnta=\@ne - \MT@info{Enabling #1}% - }% - }{% - \MT@ifstreq\MT@val{false}{% - \@tempcnta=\z@ - \MT@info{Disabling #1}% - }{% - \MT@warning{% - Value `\MT@val' for key `#1' not recognized.\MessageBreak - Use either `true' or `false'}% - }% - }% - \ifnum\@tempcnta>\m@ne - #2\relax - \fi - }% - }% - }% -} -% \end{macrocode} -%\end{macro} -% \begin{macrocode} -\MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta} -\MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta - \pdfappendkern \@tempcnta} -%</beta> -\define@key{MTX}{activate}[]{% - \setkeys{MTX}{protrusion={#1}}% - \setkeys{MTX}{expansion={#1}}% -} -% \end{macrocode} -%\begin{macro}{\microtypecontext} -%\changes{v1.9}{2005/10/03}{new macro: change setup context in the document} -% The user may now also change the context, so that different setups are -% possible. This is especially useful for multi-lingual documents. -% \begin{macrocode} -\def\microtypecontext#1{% - \setkeys{MTC}{#1}% - \edef\MT@curr@contexts{\MT@pr@context|% - \MT@ex@context|% - \MT@sp@context|% - \MT@kn@context}% -%<debug>\MT@dinfo{2}{>>> current context: \MT@curr@contexts}% -% \end{macrocode} -% Keep track of all contexts in the document. -% \begin{macrocode} - \MT@exp@one@n\MT@in@tlist\MT@curr@contexts\MT@doc@contexts - \ifMT@inlist@ \else - \MT@xadd\MT@doc@contexts{{\MT@curr@contexts}}% -%<debug>\MT@dinfo{2}{>>> document contexts: \MT@doc@contexts}% - \fi - \selectfont - \aftergroup\MT@reset@context -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@reset@context} -% We have to reset the font at the end of the group. -% \begin{macrocode} -\def\MT@reset@context{% - \MT@vinfo{Resetting contexts on line \the\inputlineno}% - \selectfont -} -% \end{macrocode} -%\end{macro} -%\begin{macro}{\MT@define@context} -% \begin{macrocode} -\def\MT@define@context#1{% - \define@key{MTC}{#1}[]{% - \KV@@sp@def\@tempb{#1}% - \edef\@tempb{\@nameuse{MT@rbba@\@tempb}}% - \KV@@sp@def\MT@val{##1}% - \MT@vinfo{--- Changing #1 context to `\MT@val'}% - \MT@edef@n{MT@\@tempb @context}{\MT@val}% -% \end{macrocode} -% We have to reset \emph{all} factors the next time we see the font. -% \begin{macrocode} - \MT@ifempty\MT@val\relax{% - \global\MT@let@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}% - }% - }% -} -% \end{macrocode} -%\end{macro} -% \begin{macrocode} -\MT@define@context{protrusion} -\MT@define@context{expansion} -%<*beta> -\MT@define@context{spacing} -\MT@define@context{kerning} -%</beta> -% \end{macrocode} -%\begin{macro}{\MT@pr@context} -%\begin{macro}{\MT@ex@context} -%\begin{macro}{\MT@sp@context} -%\begin{macro}{\MT@kn@context} -%\begin{macro}{\MT@curr@contexts} -%\begin{macro}{\MT@doc@contexts} -%\begin{macro}{\MT@extra@context} -% Initialize the contexts. -% \begin{macrocode} -\let\MT@pr@context\@empty -\let\MT@ex@context\@empty -%<*beta> -\let\MT@sp@context\@empty -\let\MT@kn@context\@empty -%</beta> -\def\MT@curr@contexts{|||} -\def\MT@doc@contexts{{|||}} -\let\MT@extra@context\@empty -% \end{macrocode} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -%\end{macro} -% \begin{macrocode} -% \end{macrocode} -% Disable everything -- may be used as a work-around in case setting up fonts -% doesn't work in certain environments. \emph{(Undocumented.)} -% \begin{macrocode} -\def\MT@gobblethree#1#2#3{} -\let\MT@saved@setupfont\MT@setupfont -\define@key{MTX}{disable}[]{% - \MT@info{Inactivate microtype package}% - \let\MT@setupfont\MT@gobblethree -} -\define@key{MTX}{enable}[]{% - \MT@info{Reactivate microtype package}% - \let\MT@setupfont\MT@saved@setupfont -} -% \end{macrocode} -% %\subsection{Package Options} % %\subsubsection{Declaring the Options} % -%\begin{macro}{\ifMT@opt@expansion}\IndexNewif{MT@opt@expansion} -%\begin{macro}{\ifMT@opt@auto}\IndexNewif{MT@opt@auto} +%\begin{macro}{\ifMT@opt@expansion} +%\begin{macro}{\ifMT@opt@auto} +%\begin{macro}{\ifMT@opt@DVI} % Keep track of whether the user explicitly set these options. % \begin{macrocode} \newif\ifMT@opt@expansion \newif\ifMT@opt@auto +\newif\ifMT@opt@DVI % \end{macrocode} %\end{macro} %\end{macro} +%\end{macro} %\begin{macro}{\MT@define@option} % \opt{expansion} and \opt{protrusion} may be |true|, |false|, |compatibility|, % |nocompatibility| and/or a \meta{set name}. @@ -7467,7 +7578,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} % If everything failed, it should be a set name. % \begin{macrocode} - \MT@ifdefined@n{MT@\@tempb @set@@\MT@val}{% + \MT@ifdefined@n@TF{MT@\@tempb @set@@\MT@val}{% \global\MT@edef@n{MT@\@tempb @setname}{\MT@val}% }{% \global\MT@edef@n{MT@\@tempb @setname}% @@ -7490,9 +7601,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@define@option{protrusion} \MT@define@option{expansion} % \end{macrocode} -% \opt{activate} is a shortcut for \opt{protrusion} and \opt{expansion} (and -% \opt{spacing}?). -%\todo{add spacing to activate, when the feature has stabilized in \pdftex} +% \opt{activate} is a shortcut for \opt{protrusion} and \opt{expansion}. +%\todo{add \opt{spacing} to \opt{activate}, when the feature has stabilized in \pdftex?} % \begin{macrocode} \define@key{MT}{activate}[]{% \setkeys{MT}{protrusion={#1}}% @@ -7501,6 +7611,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<*beta> % \end{macrocode} %\begin{macro}{\MT@define@option@} +% \opt{spacing} and \opt{kerning} do not have a compatibility level. % \begin{macrocode} \def\MT@define@option@#1{% \define@key{MT}{#1}[true]{% @@ -7515,7 +7626,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@ifstreq\MT@val{false}{% \csname MT@#1false\endcsname }{% - \MT@ifdefined@n{MT@\@tempb @set@@\MT@val}{% + \MT@ifdefined@n@TF{MT@\@tempb @set@@\MT@val}{% \global\MT@edef@n{MT@\@tempb @setname}{\MT@val}% }{% \global\MT@edef@n{MT@\@tempb @setname}% @@ -7538,20 +7649,20 @@ In either case, please send a report to <w.m.l@gmx.net>. %</beta> % \end{macrocode} %\changes{v1.5}{2004/12/02}{new option: \opt{selected}, by default false -% (suggested by \thanh)} ^^A <hanthethanh\at gmx.net> -% ^^A private mail, 30/11/2004 +% (suggested by \contributor \thanh{} <hanthethanh\at gmx.net>)} +% ^^A private mail, 30/11/2004 %\changes{v2.0}{2005/10/04}{new option: \opt{babel}, by default false -% (language-dependant setup suggested by Ulrich Dirr)} -% ^^A <ud\at satz-art.de> +% (language-dependant setup suggested by \contributor Ulrich Dirr <ud\at satz-art.de>)} %\begin{macro}{\MT@def@bool@opt} % The |true|/|false| options: -% \opt{draft} (may be inherited from the class options), -% \opt{DVIoutput}, +% \opt{draft}, \opt{final} (may be inherited from the class options), % \opt{auto}, % \opt{selected}, -% \opt{babel}. +% \opt{babel}, +% \opt{DVIoutput}, +% \opt{defersetup}. % \begin{macrocode} -\def\MT@def@bool@opt#1{% +\def\MT@def@bool@opt#1#2{% \define@key{MT}{#1}[]{% \MT@ifempty{##1}% {\def\@tempa{true}}% @@ -7564,34 +7675,64 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\@tempa{false}% }% }% - \csname MT@#1\@tempa\endcsname + #2% }% } % \end{macrocode} %\end{macro} +%\begin{macro}{\MT@def@simple@bool@opt} +% Boolean options that only set the switch. % \begin{macrocode} -\MT@map@tlist@n{{draft}{DVIoutput}{auto}{selected}% -%<beta>{babel}% -}\MT@def@bool@opt +\def\MT@def@simple@bool@opt#1{\MT@def@bool@opt{#1}{\csname MT@#1\@tempa\endcsname}} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@map@tlist@n{{draft}{auto}{selected}% +%<beta> {babel}% +}\MT@def@simple@bool@opt +% \end{macrocode} +% The \opt{DVIoutput} option will change \cmd{\pdfoutput} immediately to minimize +% the risk of confusing other packages. +% \begin{macrocode} +\MT@def@bool@opt{DVIoutput}{% + \csname if\@tempa\endcsname + \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi + \pdfoutput\z@ + \else + \ifnum\pdfoutput<\@ne \MT@opt@DVItrue \fi + \pdfoutput\@ne + \fi +} +% \end{macrocode} +%\changes{v1.9a}{2005/11/21}{new option: \opt{defersetup}, by default true} +% Setting the \opt{defersetup} option to false will restore the old behaviour, +% where the setup took place at the time when the package was loaded. This is +% undocumented, since I would like to learn about the cases where this is +% necessary. +% +% The only problem with the new deferred setup I can think of is when a box +% is being constructed inside the preamble and this box contains a font that is +% not loaded before the box is being used. +% \begin{macrocode} +\MT@def@bool@opt{defersetup}{% + \csname if\@tempa\endcsname \else + \AtEndOfPackage{% + \MT@setup@ + \let\MT@setup@\@empty + \let\MT@addto@setup\@firstofone + }% + \fi +} % \end{macrocode} % \opt{final} is the opposite to \opt{draft}. %\changes{v1.4a}{2004/11/16}{new option: \opt{final}} % \begin{macrocode} -\define@key{MT}{final}[]{% - \MT@draftfalse - \MT@ifempty{#1}% - {\def\@tempa{true}}% - {\def\@tempa{#1}}% - \MT@ifstreq\@tempa{true}\relax{% - \MT@ifstreq\@tempa{false}% - \MT@drafttrue - {% - \MT@warning@nl{% - `#1' is not an admissible value for option\MessageBreak - `final'. Assuming `true'}% - \MT@draftfalse - }% - }% +\MT@def@bool@opt{final}{% + \csname if\@tempa\endcsname + \MT@draftfalse + \else + \MT@drafttrue + \fi } % \end{macrocode} % For \opt{verbose} output, we simply redefine \cs{MT@vinfo}. @@ -7621,8 +7762,8 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} %\changes{v1.5}{2004/12/02}{defaults: \opt{step}: 4 -% (suggested by \thanh)} ^^A <hanthethanh\at gmx.net> -% ^^A private mail, 30/11/2004 +% (suggested by \contributor \thanh{} <hanthethanh\at gmx.net>)} +% ^^A private mail, 30/11/2004 %\changes{v1.6}{2004/12/18}{new option: \opt{factor}, by default 1000} %\changes{v2.0}{2005/09/21}{new option: \opt{letterspacing}, by default 100} %\begin{macro}{\MT@def@num@opt} @@ -7643,7 +7784,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %\changes{v1.6}{2005/01/06}{test whether numeric options receive a number} % A space terminates the number. % \begin{macrocode} - \MT@ifnumber\@tempa{% + \MT@ifint\@tempa{% \MT@edef@n{MT@#1}{\@tempa}% }{\MT@warning@nl{% Value `##1' for option `#1' is not a number.\MessageBreak @@ -7655,18 +7796,17 @@ In either case, please send a report to <w.m.l@gmx.net>. %\end{macro} % \begin{macrocode} \MT@map@tlist@n{{stretch}{shrink}{step}% -%<beta>{letterspacing}% +%<beta> {letterspacing}% }\MT@def@num@opt % \end{macrocode} % \opt{factor} will define the protrusion factor only. -%\todo{factor option for which extensions?} % \begin{macrocode} \define@key{MT}{factor}[]{% \MT@ifempty{#1}% {\let\@tempa\MT@factor@default}% {\def\@tempa{#1 }}% - \MT@ifnumber\@tempa{% - \MT@edef@n{MT@pr@factor}{\@tempa}% + \MT@ifint\@tempa{% + \edef\MT@pr@factor{\@tempa}% }{\MT@warning@nl{% Value `#1' for option `factor' is not a number.\MessageBreak Using default value of \number\MT@factor@default}% @@ -7697,24 +7837,26 @@ In either case, please send a report to <w.m.l@gmx.net>. }% } % \end{macrocode} +% \subsubsection{Reading the Configuration File} +% % The package should just work if called without any options. Therefore, -% expansion will be switched off by default if output is \dvi, since it isn't +% expansion will be switched off by default if output is <DVI>, since it isn't % likely that expanded fonts are available. (This grows more important as \TeX\ -% systems are switching to the \pdftex\ engine even for \dvi\ output, so that +% systems are switching to the \pdftex\ engine even for <DVI> output, so that % the user might not even be aware of the fact that she's running \pdftex.) % \begin{macrocode} \MT@protrusiontrue -\ifnum\pdfoutput=\z@ \else +\ifnum\pdfoutput<\@ne \else % \end{macrocode} % Also, we only enable expansion by default if \pdftex\ can expand the fonts % automatically. %\changes{v1.6}{2004/12/23}{defaults: turn off expansion for old \pdftex\ versions} -%\todo{should spacing be enabled by default?} +%\todo{should \opt{spacing} be enabled by default?} % \begin{macrocode} - \ifnum\MT@pdftex@no > \thr@@ + \MT@requires@pdftex4{ \MT@expansiontrue \MT@autotrue - \fi + }\relax \fi % \end{macrocode} % The main configuration file will be loaded before processing the package @@ -7729,7 +7871,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \define@key{MT}{config}[]{\relax} \def\MT@get@config#1config=#2,#3\@nil{% \MT@ifempty{#2}% - {\def\MT@config@file{microtype.cfg}}% + {\def\MT@config@file{\MT@MT.cfg}}% {\KV@@sp@def\MT@config@file{#2.cfg}}% } \expandafter\expandafter\expandafter\MT@get@config @@ -7737,20 +7879,20 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} %\end{macro} %\end{macro} -%\changes{v1.4b}{2004/11/25}{bug fix: set catcodes before reading global configuration file -% (reported by Christoph Bier)} ^^A <christoph.bier\at web.de> -% ^^A in: <MID:30k2tqF30v483U1@uni-berlin.de> +%\changes{v1.4b}{2004/11/25}{fix: set catcodes before reading global configuration file +% (reported by \contributor Christoph Bier <christoph.bier\at web.de>)} +% ^^A in: <MID:30k2tqF30v483U1@uni-berlin.de> % Load the file. % \begin{macrocode} \IfFileExists{\MT@config@file}{% \MT@info@nl{Loading configuration file \MT@config@file}% \MT@begin@catcodes - \let\MT@begin@catcodes\relax - \let\MT@end@catcodes\relax - \input{\MT@config@file}% + \let\MT@begin@catcodes\relax + \let\MT@end@catcodes\relax + \let\MT@curr@file\MT@config@file + \input{\MT@config@file}% \endgroup -}{% - \MT@warning@nl{% +}{\MT@warning@nl{% Could not find configuration file `\MT@config@file'!\MessageBreak This will almost certainly cause undesired results.\MessageBreak Please fix your installation}% @@ -7758,21 +7900,10 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} % If no default font set has been declared in the main configuration file, % we use the (empty, possibly non-existent) `|all|' set. -%\changes{v1.9}{2005/08/05}{disable \cs{DeclareMicrotypeSetDefault} after -% configuration file has been loaded} -% We also disable the command. % \begin{macrocode} -\MT@ifdefined@c\MT@default@pr@set\relax{\gdef\MT@default@pr@set{all}} -\MT@ifdefined@c\MT@default@ex@set\relax{\gdef\MT@default@ex@set{all}} -%<*beta> -\MT@ifdefined@c\MT@default@sp@set\relax{\gdef\MT@default@sp@set{all}} -\MT@ifdefined@c\MT@default@kn@set\relax{\gdef\MT@default@kn@set{all}} -%</beta> -\renewcommand*\DeclareMicrotypeSetDefault[2][]{% - \MT@warning{% - The command \string\DeclareMicrotypeSetDefault\space may only\MessageBreak - be used inside the main configuration file.\MessageBreak - Ignoring it}% +\MT@map@clist@c\MT@features{% + \MT@ifdefined@n@TF{MT@default@#1@set}\relax + {\global\MT@def@n{MT@default@#1@set}{all}}% } % \end{macrocode} % @@ -7783,38 +7914,195 @@ In either case, please send a report to <w.m.l@gmx.net>. % {\let\special@index\index\SpecialIndex@{\Microtype@Hook}{\encapchar usage}} %\makeatother %\begin{macro}{\Microtype@Hook} -%\changes{v1.7}{2005/03/22}{new macro for font package authors} +%\changes{v1.7}{2005/03/22}{new command for font package authors} % This hook may be used by font package authors, \eg\ to declare alias fonts. If % it is defined, it will be executed here, \ie, after the main configuration % file has been loaded, and before the package options are evaluated. % -% This hook overcomes the situation that (1) the \microtype\ package should be -% loaded after all font defaults have been set up (hence, using -% \cmd{\@ifpackageloaded} in the font package is not viable), and (2) checking -% \cmd{\AtBeginDocument} can be too late, since fonts might already have been -% loaded, and consequently set up, in the preamble. +% This hook was needed in versions prior to 1.9a to overcome the situation that +% (1)~the \microtype\ package should be loaded after all font defaults have +% been set up (hence, using \cmd{\@ifpackageloaded} in the font package has not +% been viable), and (2)~checking \cmd{\AtBeginDocument} could be too late, +% since fonts might already have been loaded, and consequently set up, in the +% preamble. With the new deferred setup, one could live without this command, +% however, it remains here since it's simpler than testing whether the package +% was loaded both in the preamble as well as at the beginning of the document +% (which is what one would have to do). % % Package authors should check whether the command is already defined so that % existing definitions by other packages aren't overwritten. Example: %\begin{verbatim} -%\def\MinionPro@MT@Hook -% {\DeclareMicrotypeAlias{MinionPro-LF}{MinionPro}} -%\@ifundefined{Microtype@Hook} -% {\let\Microtype@Hook\MinionPro@MT@Hook} -% {\g@addto@macro\Microtype@Hook{\MinionPro@MT@Hook}} +%\def\MinionPro@MT@Hook{\DeclareMicrotypeAlias{MinionPro-LF}{MinionPro}} +%\@ifpackageloaded{microtype} +% \MinionPro@MT@Hook +% {\@ifundefined{Microtype@Hook} +% {\let\Microtype@Hook\MinionPro@MT@Hook} +% {\g@addto@macro\Microtype@Hook{\MinionPro@MT@Hook}}} %\end{verbatim} -% \cs{MicroType@Hook} with a capital |T| is provided for compatibility reasons. -% At some point in the future, it will no longer be available, hence it should -% not be used. +% \cs{MicroType@Hook} with a capital |T| (which only existed in version 1.7) is +% provided for compatibility reasons. At some point in the future, it will no +% longer be available, hence it should not be used. % \begin{macrocode} -\MT@ifdefined@c\MicroType@Hook{% - \MT@warning@nl{% +\MT@ifdefined@c@T\MicroType@Hook{% + \MT@warning{% Command \string\MicroType@Hook\space is deprecated.\MessageBreak - Use \string\Microtype@Hook\space instead}\MicroType@Hook}\relax -\MT@ifdefined@c\Microtype@Hook\Microtype@Hook\relax + Use \string\Microtype@Hook\space instead}\MicroType@Hook} +\MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook % \end{macrocode} %\end{macro} % +%\subsubsection{Changing Options Later} +% +%\begin{macro}{\microtypesetup} +%\changes{v1.4}{2004/11/04}{fix: set the correct levels, and remember them; +% warning when enabling an option disabled in package options} +%\changes{v1.7}{2005/02/17}{fix: warning also when setting to \texttt{(no)compatibility}} +%\changes{v1.9a}{2005/11/21}{inside the preamble, accepts all package options} +%\begin{macro}{\MT@define@optionX} +% Inside the preamble, \cs{microtypesetup} accepts the same options as the +% package (unless \opt{defersetup}|=false|). +% In the document body, it accepts the options: +% |protrusion|, |expansion| and |activate|, and |spacing| and |kerning|. +% Specifying font sets is not allowed. +% \begin{macrocode} +\def\microtypesetup{\setkeys{MT}} +\MT@addto@setup{\def\microtypesetup{\setkeys{MTX}}} +\def\MT@define@optionX#1#2{% + \define@key{MTX}{#1}[true]{% + \KV@@sp@def\@tempb{#1}% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \edef\@tempb{\csname MT@rbba@\@tempb\endcsname}% + \MT@ifempty\MT@val\relax{% + \@tempcnta=\m@ne + \MT@ifstreq\MT@val{true}{% +% \end{macrocode} +% Enabling micro-typography in the middle of the document is not allowed if it +% has been disabled in the package options since fonts might already have been +% loaded and hence wouldn't be set up. +% \begin{macrocode} + \MT@checksetup\@tempb{% + \expandafter\@tempcnta=\csname MT@\@tempb @level\endcsname + \MT@info{Enabling #1 + (level \number\csname MT@\@tempb @level\endcsname)}% + }% + }{% + \MT@ifstreq\MT@val{false}{% + \@tempcnta=\z@ + \MT@info{Disabling #1}% + }{% + \MT@ifstreq\MT@val{compatibility}{% + \MT@checksetup\@tempb{% + \@tempcnta=\@ne + \MT@let@nc{MT@\@tempb @level}\@ne + \MT@info{Setting #1 to level 1}% + }% + }{% + \MT@ifstreq\MT@val{nocompatibility}{% + \MT@checksetup\@tempb{% + \@tempcnta=\tw@ + \MT@let@nc{MT@\@tempb @level}\tw@ + \MT@info{Setting #1 to level 2}% + }% + }{% + \MT@warning{% + Value `\MT@val' for key `#1' not recognized.\MessageBreak + Use any of `true', `false', `compatibility' or\MessageBreak + `nocompatibility'}% + }% + }% + }% + }% + \ifnum\@tempcnta>\m@ne + #2\@tempcnta\relax + \fi + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@checksetup} +% Test whether the feature wasn't disabled in the package options. +% \begin{macrocode} +\def\MT@checksetup#1{% + \expandafter\csname ifMT@\csname MT@abbr@#1\endcsname\endcsname + \expandafter\@firstofone + \else + \MT@warning{% + You cannot enable \@nameuse{MT@abbr@#1} if it was disabled\MessageBreak + in the package options,}% + \expandafter\@gobble + \fi +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@define@optionX{protrusion}\pdfprotrudechars +\MT@define@optionX{expansion}\pdfadjustspacing +%<*beta> +% \end{macrocode} +%\begin{macro}{\MT@define@optionX@} +% The same for |spacing| and |kerning|, which do not have a |nocompatibility| level. +% \begin{macrocode} +\def\MT@define@optionX@#1#2{% + \define@key{MTX}{#1}[true]{% + \KV@@sp@def\@tempb{#1}% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \edef\@tempb{\csname MT@rbba@\@tempb\endcsname}% + \MT@ifempty\MT@val\relax{% + \@tempcnta=\m@ne + \MT@ifstreq\MT@val{true}{% + \MT@checksetup\@tempb{% + \@tempcnta=\@ne + \MT@info{Enabling #1}% + }% + }{% + \MT@ifstreq\MT@val{false}{% + \@tempcnta=\z@ + \MT@info{Disabling #1}% + }{% + \MT@warning{% + Value `\MT@val' for key `#1' not recognized.\MessageBreak + Use either `true' or `false'}% + }% + }% + \ifnum\@tempcnta>\m@ne + #2\relax + \fi + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta} +\MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta + \pdfappendkern \@tempcnta} +%</beta> +\define@key{MTX}{activate}[]{% + \setkeys{MTX}{protrusion={#1}}% + \setkeys{MTX}{expansion={#1}}% +} +% \end{macrocode} +% Disable everything -- may be used as a work-around in case setting up fonts +% doesn't work in certain environments. \emph{(Undocumented.)} +% \begin{macrocode} +\def\MT@gobblethree#1#2#3{} +\let\MT@saved@setupfont\MT@setupfont +\define@key{MTX}{disable}[]{% + \MT@info{Inactivate `\MT@MT' package}% + \let\MT@setupfont\MT@gobblethree +} +\define@key{MTX}{enable}[]{% + \MT@info{Reactivate `\MT@MT' package}% + \let\MT@setupfont\MT@saved@setupfont +} +% \end{macrocode} +% %\subsubsection{Processing the Options} % %\begin{macro}{\MT@ProcessOptionsWithKV} @@ -7825,11 +8113,11 @@ In either case, please send a report to <w.m.l@gmx.net>. \let\KVo@tempa\@empty \MT@map@clist@c\@classoptionslist{% \def\CurrentOption{##1}% - \MT@ifdefined@n{KV@#1@\CurrentOption}{% + \MT@ifdefined@n@T{KV@#1@\CurrentOption}{% \edef\KVo@tempa{\KVo@tempa,\CurrentOption,}% \@expandtwoargs\@removeelement\CurrentOption \@unusedoptionlist\@unusedoptionlist - }\relax + }% }% \edef\KVo@tempa{% \noexpand\setkeys{#1}{% @@ -7845,46 +8133,16 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \MT@ProcessOptionsWithKV{MT} % \end{macrocode} -% Now we can take the appropriate actions: -% -% \pdftex\ can create \dvi\ output, too. However, both the \dvi\ viewer and -% dvips need to find actual fonts. Therefore, expansion will only work if the -% fonts for different degrees of expansion are readily available. -% -%\changes{v1.4b}{2004/11/19}{new message if \cmd{\pdfoutput} is changed} -% Some packages depend on the value of \cmd{\pdfoutput} and will get confused if -% it is changed after they have been loaded. These packages are, among others: -% \pkg{color}, \pkg{graphics}, \pkg{hyperref}, \pkg{crop}, \pkg{contour}, -% \pkg{pstricks} and, as a matter of course, \pkg{ifpdf}. Instead of testing -% for each package (that's not our job), we issue a different message if -% \cmd{\pdfoutput} is actually changed by \opt{DVIoutput}. That must be -% sufficient! -% \begin{macrocode} -\ifMT@DVIoutput - \ifnum\pdfoutput=\z@ - \MT@info@nl{Generating DVI output} - \else - \pdfoutput\z@ - \MT@info@nl{Changing output mode to DVI} -% \end{macrocode} -% 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} +% Now we can take the appropriate actions. We also tell the log file which +% options the user has chosen (in case it's interested). % \begin{macrocode} - \ifMT@opt@expansion \else - \MT@expansionfalse - \fi - \fi -\else - \MT@info@nl{Generating \ifnum\pdfoutput=\z@ DVI \else PDF \fi output} -\fi +\MT@addto@setup{% +\ifMT@draft % \end{macrocode} -% Tell the log file which options the user has chosen (in case it's interested). % We disable most of what we've just defined in the \arabic{CodelineNo} lines % above if we are running in draft mode. %\changes{v1.7}{2005/02/06}{warning when running in draft mode} % \begin{macrocode} -\ifMT@draft \MT@warning@nl{`draft' option active.\MessageBreak Disabling all micro-typographic extensions.\MessageBreak This might lead to different line and page breaks} @@ -7893,14 +8151,10 @@ In either case, please send a report to <w.m.l@gmx.net>. %<*beta> \MT@spacingfalse \MT@kerningfalse + \MT@babelfalse %</beta> \let\MT@setupfont\relax - \def\DeclareMicrotypeSet{% - \@ifstar - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% - } - \def\MT@DeclareSet[#1]#2#3{} + \def\DeclareMicrotypeSet#1#{\@gobbletwo} \renewcommand*\UseMicrotypeSet[2][]{} \renewcommand*\SetProtrusion[3][]{} \renewcommand*\SetExpansion[3][]{} @@ -7913,49 +8167,77 @@ In either case, please send a report to <w.m.l@gmx.net>. \renewcommand*\LoadMicrotypeFile[1]{} \renewcommand*\microtypesetup[1]{} \renewcommand*\microtypecontext[1]{} - \expandafter - \endinput -\fi -\ifMT@protrusion - \pdfprotrudechars\MT@pr@level - \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)% - \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak - factor: \number\MT@pr@factor\fi - \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi} -% \end{macrocode} -% We have to make sure that font sets are active at the end of the package. If -% the user didn't activate any in the package options, we use those sets declared -% by \cs{DeclareMicrotypeSetDefault}. They can still be overridden later on, of -% course. -% \begin{macrocode} - \MT@ifdefined@c\MT@pr@setname{% - \MT@info@nl{Using protrusion set `\MT@pr@setname'}% - }{% - \global\let\MT@pr@setname\MT@default@pr@set - \MT@info@nl{Using default protrusion set `\MT@pr@setname'}% - } \else - \let\MT@protrusion\relax - \MT@info@nl{No character protrusion} -\fi -\ifMT@expansion +% \end{macrocode} +% 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} +% \begin{macrocode} + \ifnum\pdfoutput<\@ne + \ifMT@opt@expansion \else + \MT@expansionfalse + \fi + \fi +% \end{macrocode} +% \pdftex\ can create <DVI> output, too. However, both the <DVI> viewer and +% dvips need to find actual fonts. Therefore, expansion will only work if the +% fonts for different degrees of expansion are readily available. +% +%\changes{v1.4b}{2004/11/19}{new message if \cmd{\pdfoutput} is changed} +% Some packages depend on the value of \cmd{\pdfoutput} and will get confused if +% it is changed after they have been loaded. These packages are, among others: +% \pkg{color}, \pkg{graphics}, \pkg{hyperref}, \pkg{crop}, \pkg{contour}, +% \pkg{pstricks} and, as a matter of course, \pkg{ifpdf}. Instead of testing +% for each package (that's not our job), we only say that it was \microtype\ +% that changed it. This must be sufficient! +% \begin{macrocode} + \MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output% + \ifMT@opt@DVI\space (changed by \MT@MT)\fi}% +% \end{macrocode} +% Protrusion. +% \begin{macrocode} + \ifMT@protrusion + \edef\MT@active@features{\MT@active@features,pr} + \pdfprotrudechars\MT@pr@level + \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)% + \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak + factor: \number\MT@pr@factor\fi + \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi} +% \end{macrocode} +% We have to make sure that font sets are active. If the user didn't activate +% any, we use those sets declared by \cs{DeclareMicrotypeSetDefault}. +% \begin{macrocode} + \MT@ifdefined@c@TF\MT@pr@setname{% + \MT@info@nl{Using protrusion set `\MT@pr@setname'}% + }{% + \global\let\MT@pr@setname\MT@default@pr@set + \MT@info@nl{Using default protrusion set `\MT@pr@setname'}% + } + \else + \let\MT@protrusion\relax + \MT@info@nl{No character protrusion} + \fi +% \end{macrocode} +% Expansion. +% \begin{macrocode} + \ifMT@expansion % \end{macrocode} % Set up the values for font expansion: If \opt{stretch} has not been specified, we % take the default value of 20. % \begin{macrocode} - \ifnum\MT@stretch=\m@ne - \let\MT@stretch\MT@stretch@default - \fi + \ifnum\MT@stretch=\m@ne + \let\MT@stretch\MT@stretch@default + \fi % \end{macrocode} % If \opt{shrink} has not been specified, it will inherit the value from \opt{stretch}. % \begin{macrocode} - \ifnum\MT@shrink=\m@ne - \ifnum\MT@stretch>\z@ - \let\MT@shrink\MT@stretch - \else - \let\MT@shrink\MT@shrink@default + \ifnum\MT@shrink=\m@ne + \ifnum\MT@stretch>\z@ + \let\MT@shrink\MT@stretch + \else + \let\MT@shrink\MT@shrink@default + \fi \fi - \fi % \end{macrocode} % If \opt{step} has not been specified, we will set it to min(\opt{stretch},\opt{shrink})/5, % rounded off, minimum value 1. @@ -7963,247 +8245,275 @@ In either case, please send a report to <w.m.l@gmx.net>. % min(\texttt{stretch},\texttt{shrink})/5} %\changes{v1.9}{2005/07/08}{warning if user requested zero \opt{step}} % \begin{macrocode} - \ifnum\MT@step=\m@ne - \ifnum\MT@stretch>\MT@shrink - \ifnum\MT@shrink=\z@ - \@tempcnta=\MT@stretch + \ifnum\MT@step=\m@ne + \ifnum\MT@stretch>\MT@shrink + \ifnum\MT@shrink=\z@ + \@tempcnta=\MT@stretch + \else + \@tempcnta=\MT@shrink + \fi \else - \@tempcnta=\MT@shrink + \ifnum\MT@stretch=\z@ + \@tempcnta=\MT@shrink + \else + \@tempcnta=\MT@stretch + \fi \fi + \divide\@tempcnta 5\relax \else - \ifnum\MT@stretch=\z@ - \@tempcnta=\MT@shrink - \else - \@tempcnta=\MT@stretch + \@tempcnta=\MT@step + \ifnum\@tempcnta=\z@ + \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak + Setting it to one} \fi \fi - \divide\@tempcnta 5\relax - \else - \@tempcnta=\MT@step - \ifnum\@tempcnta=\z@ - \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak - Setting it to one} - \fi - \fi - \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi - \edef\MT@step{\number\@tempcnta\space} + \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi + \edef\MT@step{\number\@tempcnta\space} % \end{macrocode} %\begin{macro}{\MT@auto} % Automatic expansion of the font? This new feature of \pdftex\ 1.20 makes the % \textit{hz}-algorithm really usable. It must be either `|autoexpand|' or % empty (or `|1000|' for older versions of \pdftex). % \begin{macrocode} - \let\MT@auto\@empty - \ifMT@auto - \ifnum\MT@pdftex@no > \thr@@ + \let\MT@auto\@empty + \ifMT@auto + \MT@requires@pdftex4{% % \end{macrocode} %\end{macro} -% We turn off automatic expansion if output mode is \dvi. -%\changes{v1.5}{2004/12/02}{disable automatic expansion for \dvi\ output} +% We turn off automatic expansion if output mode is <DVI>. +%\changes{v1.5}{2004/12/02}{disable automatic expansion for <DVI> output} % \begin{macrocode} - \ifnum\pdfoutput=\z@ - \ifMT@opt@auto - \MT@warning@nl{% - Automatic font expansion only works for PDF output.\MessageBreak - However, you are creating a DVI file. I will switch\MessageBreak - automatic font expansion off and hope that expanded\MessageBreak - fonts are available} + \ifnum\pdfoutput<\@ne + \ifMT@opt@auto + \MT@warning@nl{% + Automatic font expansion only works for PDF output.\MessageBreak + However, you are creating a DVI file. I will switch\MessageBreak + automatic font expansion off and hope that expanded\MessageBreak + fonts are available} + \fi + \MT@autofalse + \else + \def\MT@auto{autoexpand} \fi - \MT@autofalse - \else - \def\MT@auto{autoexpand} - \fi % \end{macrocode} % Also, if \pdftex\ is too old. %\changes{v1.1}{2004/09/13}{issue an error instead of a warning, when \pdftex\ % version is too old for \texttt{autoexpand}} %\changes{v1.6}{2004/12/23}{disable automatic expansion for old \pdftex\ versions} % \begin{macrocode} - \else - \ifMT@opt@auto - \MT@warning@nl{% - The pdftex you are using is too old for automatic\MessageBreak - font expansion. I will switch it off and hope that\MessageBreak - expanded fonts are available on your system.\MessageBreak - Install pdftex version 1.20 or newer} - \fi - \MT@autofalse - \def\MT@auto{1000 } - \fi + }{% + \ifMT@opt@auto + \MT@warning@nl{% + The pdftex you are using is too old for automatic\MessageBreak + font expansion. I will switch it off and hope that\MessageBreak + expanded fonts are available on your system.\MessageBreak + Install pdftex version 1.20 or newer} + \fi + \MT@autofalse + \def\MT@auto{1000 } + } % \end{macrocode} % No automatic expansion. % \begin{macrocode} - \else - \ifnum\MT@pdftex@no < 4 - \def\MT@auto{1000 } + \else + \ifnum\MT@pdftex@no < 4 + \def\MT@auto{1000 } + \fi \fi - \fi % \end{macrocode} % Choose the appropriate macro for selected expansion. % \begin{macrocode} - \ifMT@selected - \let\MT@set@ex@codes\MT@set@ex@codes@s - \else - \let\MT@set@ex@codes\MT@set@ex@codes@n - \fi + \ifMT@selected + \let\MT@set@ex@codes\MT@set@ex@codes@s + \else + \let\MT@set@ex@codes\MT@set@ex@codes@n + \fi % \end{macrocode} % Filter out |stretch=0,shrink=0|, since it would result in an \pdftex\ error. %\changes{v1.9}{2005/07/08}{disable expansion if both \opt{step} and \opt{shrink} are zero} % \begin{macrocode} - \ifnum\MT@stretch=\z@ - \ifnum\MT@shrink=\z@ - \MT@warning@nl{% - Both the stretch and shrink limit are set to zero.\MessageBreak - Disabling font expansion} - \MT@expansionfalse + \ifnum\MT@stretch=\z@ + \ifnum\MT@shrink=\z@ + \MT@warning@nl{% + Both the stretch and shrink limit are set to zero.\MessageBreak + Disabling font expansion} + \MT@expansionfalse + \fi \fi \fi -\fi -\ifMT@expansion - \pdfadjustspacing\MT@ex@level - \MT@info@nl{\ifMT@auto Automatic f\else F\fi ont expansion enabled - (level \number\MT@ex@level),\MessageBreak - stretch: \number\MT@stretch, shrink: \number\MT@shrink, - step: \number\MT@step, \ifMT@selected\else non-\fi selected} - \MT@ifdefined@c\MT@ex@setname{% - \MT@info@nl{Using expansion set `\MT@ex@setname'}% - }{% - \global\let\MT@ex@setname\MT@default@ex@set - \MT@info@nl{Using default expansion set `\MT@ex@setname'}% - } + \ifMT@expansion + \edef\MT@active@features{\MT@active@features,ex}% + \pdfadjustspacing\MT@ex@level + \MT@info@nl{\ifMT@auto\else Non-\fi Automatic font expansion enabled + (level \number\MT@ex@level),\MessageBreak + stretch: \number\MT@stretch, shrink: \number\MT@shrink, + step: \number\MT@step, \ifMT@selected\else non-\fi selected} + \MT@ifdefined@c@TF\MT@ex@setname{% + \MT@info@nl{Using expansion set `\MT@ex@setname'}% + }{% + \global\let\MT@ex@setname\MT@default@ex@set + \MT@info@nl{Using default expansion set `\MT@ex@setname'}% + } % \end{macrocode} %\changes{v1.7}{2005/03/02}{modify \cmd{\showhyphens}} % Inside \cmd{\showhyphens}, font expansion should be disabled. % \begin{macrocode} - \CheckCommand*{\showhyphens}[1]{% - \setbox0\vbox{\color@begingroup\everypar{}\parfillskip\z@skip - \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne - \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}} + \CheckCommand*\showhyphens[1]{\setbox0\vbox{% + \color@begingroup\everypar{}\parfillskip\z@skip + \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne + \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}} % \end{macrocode} %\begin{macro}{\showhyphens} % I wonder why it's defined globally (in \file{ltfssbas.dtx})? % \begin{macrocode} - \gdef\showhyphens#1{% - \setbox0\vbox{% - \color@begingroup - \pdfadjustspacing\z@ - \everypar{}% - \parfillskip\z@skip\hsize\maxdimen - \normalfont - \pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1% - \color@endgroup}} -\else - \let\MT@expansion\relax - \MT@info@nl{No font expansion} -\fi -%<*beta> -\ifnum\MT@pdftex@no > 5 - \ifMT@spacing - \pdfadjustinterwordglue\@ne + \gdef\showhyphens#1{\setbox0\vbox{% + \color@begingroup\pdfadjustspacing\z@\everypar{}\parfillskip\z@skip + \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne + \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}} % \end{macrocode} -% Warning if \cmd{\nonfrenchspacing} is active, since space factors will be -% ignored with \cmd{\pdfadjustinterwordglue}\,|>|\,0. Why 1500? Because some -% packages redefine \cmd{\frenchspacing}. See the |c.t.t| thread `\cmd{\frenchspacing} -% with AMS packages and babel', started by this message from Philipp Lehman: -% \nolinkurl{<ddtbaj$rob$1@online.de>} on August 16, 2005. +%\end{macro} % \begin{macrocode} - \AtBeginDocument{% - \ifnum\sfcode`\. > 1500 - \MT@ifstreq\MT@sp@context{nonfrench}\relax{% - \MT@warning@nl{% - \string\nonfrenchspacing\space is active. Adjustment of\MessageBreak - interword spacing will disable it. You might want\MessageBreak - to add `\string\microtypecontext{spacing=nonfrench}'\MessageBreak - to your preamble}% - }% - \fi - } - \MT@info@nl{Adjustment of interword spacing enabled} - \MT@ifdefined@c\MT@sp@setname{% - \MT@info@nl{Using spacing set `\MT@sp@setname'}% - }{% - \global\let\MT@sp@setname\MT@default@sp@set - \MT@info@nl{Using default spacing set `\MT@sp@setname'}% - } \else - \let\MT@spacing\relax - \MT@info@nl{No adjustment of interword spacing} + \let\MT@expansion\relax + \MT@info@nl{No font expansion} \fi - \ifMT@kerning - \pdfprependkern\@ne - \pdfappendkern\@ne - \MT@info@nl{Adjustment of character kerning enabled} - \MT@ifdefined@c\MT@kn@setname{% - \MT@info@nl{Using kerning set `\MT@kn@setname'}% - }{% - \global\let\MT@kn@setname\MT@default@kn@set - \MT@info@nl{Using default kerning set `\MT@kn@setname'}% - } - \else +\fi +} +%<*beta> +\MT@requires@pdftex6{ + \MT@addto@setup{% % \end{macrocode} -% We do \emph{not} set \cs{MT@kerning} to \cmd{\relax} since it is also used by -% \cs{textls}. +% Spacing. % \begin{macrocode} - \MT@info@nl{No adjustment of character kerning} - \fi - \ifnum\MT@letterspacing=\m@ne - \let\MT@letterspacing\MT@letterspacing@default - \fi + \ifMT@spacing + \edef\MT@active@features{\MT@active@features,sp} + \pdfadjustinterwordglue\@ne + \MT@info@nl{Adjustment of interword spacing enabled} + \MT@ifdefined@c@TF\MT@sp@setname{% + \MT@info@nl{Using spacing set `\MT@sp@setname'}% + }{% + \global\let\MT@sp@setname\MT@default@sp@set + \MT@info@nl{Using default spacing set `\MT@sp@setname'}% + } + \else + \let\MT@spacing\relax + \MT@info@nl{No adjustment of interword spacing} + \fi % \end{macrocode} -% If \pdftex\ is too old, we disable everything. +% Kerning is always active (because of letterspacing). +% Hence, we also don't set \cs{MT@kerning} to \cmd{\relax}. % \begin{macrocode} -\else - \ifMT@spacing - \MT@warning@nl{Adjustment of interword spacing only works with\MessageBreak - pdftex version 1.3x or newer. Switching it off}% - \else - \MT@info@nl{No adjustment of interword spacing} - \fi - \MT@spacingfalse - \let\MT@spacing\relax - \ifMT@kerning - \MT@warning@nl{Character kerning only works with\MessageBreak - pdftex version 1.3x or newer. Switching it off}% - \else - \MT@info@nl{No adjustment of character kerning} - \fi - \MT@kerningfalse - \let\MT@kerning\relax -\fi + \edef\MT@active@features{\MT@active@features,kn} + \ifMT@kerning + \pdfprependkern\@ne + \pdfappendkern\@ne + \MT@info@nl{Adjustment of character kerning enabled} + \MT@ifdefined@c@TF\MT@kn@setname{% + \MT@info@nl{Using kerning set `\MT@kn@setname'}% + }{% + \global\let\MT@kn@setname\MT@default@kn@set + \MT@info@nl{Using default kerning set `\MT@kn@setname'}% + } + \else + \MT@info@nl{No adjustment of character kerning} + \fi + \ifnum\MT@letterspacing=\m@ne + \let\MT@letterspacing\MT@letterspacing@default + \fi + } % \end{macrocode} -% Interaction with \pkg{babel}. We hook into the language switching commands -% to enable language-dependent setup. +% If \pdftex\ is too old, we disable spacing and kerning. % \begin{macrocode} -\ifMT@babel - \MT@info@nl{Redefining babel's language switching commands} - \let\MT@orig@select@language\select@language - \def\select@language#1{% - \MT@orig@select@language{#1}% - \MT@ifdefined@n{MT@babel@#1}{% - \MT@vinfo{Changing to language `#1' on line \the\inputlineno}% - \expandafter\MT@exp@one@n\expandafter\microtypecontext - \csname MT@babel@#1\endcsname - }{% - \microtypecontext{protrusion=,expansion=,spacing=,kerning=}% - }% +}{ + \MT@addto@setup{% + \ifMT@spacing + \MT@warning@nl{Adjustment of interword spacing only works with\MessageBreak + pdftex version 1.40 or newer. Switching it off}% + \else + \MT@info@nl{No adjustment of interword spacing} + \fi + \MT@spacingfalse + \let\MT@spacing\relax + \ifMT@kerning + \MT@warning@nl{Character kerning only works with\MessageBreak + pdftex version 1.40 or newer. Switching it off}% + \else + \MT@info@nl{No adjustment of character kerning} + \fi + \MT@kerningfalse + \let\MT@kerning\relax } - \let\MT@orig@foreign@language\foreign@language - \def\foreign@language#1{% - \MT@orig@foreign@language{#1}% - \MT@ifdefined@n{MT@babel@#1}{% - \MT@vinfo{Changing to context `#1' on line \the\inputlineno}% - \expandafter\MT@exp@one@n\expandafter\microtypecontext - \csname MT@babel@#1\endcsname - }{% - \microtypecontext{protrusion=,expansion=,spacing=,kerning=}% - }% +} +% \end{macrocode} +% Warning if \cmd{\nonfrenchspacing} is active, since space factors will be +% ignored with \cmd{\pdfadjustinterwordglue}\,|>|\,0. Why 1500? Because some +% packages redefine \cmd{\frenchspacing}. See the |c.t.t| thread +% `\cmd{\frenchspacing} with AMS packages and babel', started by this message +% from Philipp Lehman: \nolinkurl{<ddtbaj$rob$1@online.de>} on August 16, 2005. +% \begin{macrocode} +\MT@requires@pdftex6{ + \AtBeginDocument{% + \ifMT@spacing + \ifMT@babel \else + \ifnum\sfcode`\. > 1500 + \MT@ifstreq\MT@sp@context{nonfrench}\relax{% + \MT@warning@nl{% + \string\nonfrenchspacing\space is active. Adjustment of\MessageBreak + interword spacing will disable it. You might want\MessageBreak + to add `\@backslashchar\MT@MT context{spacing=nonfrench}'\MessageBreak + to your preamble}% + }% + \fi + \fi + \fi } +}\relax +%</beta> +% \end{macrocode} +% Remove the leading comma in \cs{MT@active@features}, and set the +% document switch to true. +% \begin{macrocode} +\MT@addto@setup{% + \ifx\MT@active@features\@empty \else + \edef\MT@active@features{\expandafter\@gobble\MT@active@features} + \fi + \MT@documenttrue +} +% \end{macrocode} +% Interaction with \pkg{babel}. We patch the language switching commands +% to enable language-dependent setup. +% \begin{macrocode} +%<*beta> +\MT@addto@setup{% + \ifMT@babel + \@ifpackageloaded{babel}{% + \MT@info@nl{Redefining babel's language switching commands} + \let\MT@orig@select@language\select@language + \def\select@language#1{% + \MT@orig@select@language{#1}% + \MT@ifdefined@n@TF{MT@babel@#1}{% + \MT@vinfo{Changing to language `#1' on line \the\inputlineno}% + \expandafter\MT@exp@one@n\expandafter\microtypecontext + \csname MT@babel@#1\endcsname + }{% + \microtypecontext{protrusion=,expansion=,spacing=,kerning=}% + }% + } + \let\MT@orig@foreign@language\foreign@language + \def\foreign@language#1{% + \MT@orig@foreign@language{#1}% + \MT@ifdefined@n@TF{MT@babel@#1}{% + \MT@vinfo{Changing to context `#1' on line \the\inputlineno}% + \expandafter\MT@exp@one@n\expandafter\microtypecontext + \csname MT@babel@#1\endcsname + }{% + \microtypecontext{protrusion=,expansion=,spacing=,kerning=}% + }% + } % \end{macrocode} -% Disable \pkg{babel}s active characters. +% Disable \pkg{babel}'s active characters. % \begin{macrocode} - \ifMT@kerning - \AtBeginDocument{% - \@ifpackageloaded{babel}{% + \ifMT@kerning \@tempswafalse \@ifpackagewith{babel}{french}\@tempswatrue\relax \@ifpackagewith{babel}{frenchb}\@tempswatrue\relax @@ -8212,19 +8522,41 @@ In either case, please send a report to <w.m.l@gmx.net>. \NoAutoSpaceBeforeFDP \MT@warning@nl{Switching off French babel's active punctuation characters}% \fi - }{}% - }% + \fi +% \end{macrocode} +% In case \pkg{babel} was loaded before \microtype: +% \begin{macrocode} + \MT@ifdefined@n@T{MT@babel@\languagename}{% + \MT@vinfo{Changing to context `\languagename' on line \the\inputlineno}% + \expandafter\MT@exp@one@n\expandafter\microtypecontext + \csname MT@babel@\languagename\endcsname + }% + }{% + \MT@warning@nl{You did not load the babel package.\MessageBreak + The `babel' option won't have any effect} + } \fi -\fi +} %</beta> -%</package> +% \end{macrocode} +% Set up the current font, most likely the normal font. This has to come after +% all of the setup (including anything from the preamble) has been dealt with. +% \begin{macrocode} +\AtBeginDocument\selectfont +% \end{macrocode} +%\begin{macro}{\MT@curr@file} +% This is the current file (hopefully with the correct extension). +% \begin{macrocode} +\edef\MT@curr@file{\jobname.tex} % \end{macrocode} %\end{macro} % That was that. +% \begin{macrocode} +%</package> +% \end{macrocode} % % ^^A ------------------------------------------------------------------------- -% ^^A From now on, don't bother indexing: -%\NoIndexing +%\NoIndexing ^^A from now on, don't bother indexing % %\section{Configuration Files} %\changes{v1.6}{2005/01/24}{restructure \file{dtx} file} @@ -8234,7 +8566,147 @@ In either case, please send a report to <w.m.l@gmx.net>. %<*config> % \end{macrocode} -% The following characters must not appear verbatim: +%\subsection{Font Sets} +%\GeneralChanges{Font Sets} +% +% We first declare some sets in the main configuration file. +%\changes{v1.2}{2004/10/02}{new: \texttt{allmath} and \texttt{basicmath}} +%\changes{v1.8}{2005/05/25}{add <U> encoding to \texttt{allmath}} +%\changes{v1.9}{2005/08/17}{add <OT4> encoding to text sets} +%\changes{v1.9}{2005/08/17}{add <T5> encoding to text sets} +%\changes{v1.9d}{2006/02/22}{\texttt{md*} instead of \texttt{m} series in basic sets} +%\changes{v1.9d}{2006/04/20}{add <QX> encoding to text sets} +% +% \begin{macrocode} +%<*m-t> +%%% ---------------------------------------------------------------------- +%%% FONT SETS + +\DeclareMicrotypeSet{all} + { } + +\DeclareMicrotypeSet{allmath} + { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1,OML,OMS,U} } + +\DeclareMicrotypeSet{alltext} + { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1} } + +\DeclareMicrotypeSet{basicmath} + { encoding = {OT1,T1,LY1,OT4,QX,T5,OML,OMS}, + family = {rm*,sf*}, + series = {md*}, + size = {normalsize,footnotesize,small,large} + } + +\DeclareMicrotypeSet{basictext} + { encoding = {OT1,T1,LY1,OT4,QX,T5}, + family = {rm*,sf*}, + series = {md*}, + size = {normalsize,footnotesize,small,large} + } + +\DeclareMicrotypeSet{normalfont} + { font = */*/*/*/* } + +% \end{macrocode} +% The default sets. +% \begin{macrocode} +%%% ---------------------------------------------------------------------- +%%% DEFAULT SETS + +\DeclareMicrotypeSetDefault[protrusion]{alltext} +\DeclareMicrotypeSetDefault[expansion] {basictext} +%<*beta> +\DeclareMicrotypeSetDefault[spacing] {basictext} +\DeclareMicrotypeSetDefault[kerning] {alltext} +%</beta> + +% \end{macrocode} +% +%\subsection{Font Aliases} +% +% Fonts that are `the same'. +% \begin{macrocode} +%%% ---------------------------------------------------------------------- +%%% FONT ALIASES + +% \end{macrocode} +% The Latin Modern fonts, the virtual fonts from the \pkg{ae} and \pkg{zefonts}, +% and the \pkg{eco} and \pkg{hfoldsty} packages (oldstyle numerals) all inherit +% the (basic) settings from Computer Modern Roman. Some of them are in part +% overwritten later. +%\changes{v1.2}{2004/10/03}{declare \texttt{cmor} as an alias of \texttt{cmr}} +%\changes{v1.3}{2004/10/22}{declare \texttt{aer}, \texttt{zer} and \texttt{hfor} +% as an alias of \texttt{cmr}} +% \begin{macrocode} +\DeclareMicrotypeAlias{lmr} {cmr} % lmodern +\DeclareMicrotypeAlias{aer} {cmr} % ae +\DeclareMicrotypeAlias{zer} {cmr} % zefonts +\DeclareMicrotypeAlias{cmor}{cmr} % eco +\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty +% \end{macrocode} +% The packages \pkg{pxfonts} and \pkg{txfonts} fonts inherit Palatino and Times +% settings respectively, +%\changes{v1.8}{2005/04/19}{declare \texttt{pxr} and \texttt{txr} as aliases of +% \texttt{ppl} resp. \texttt{ptm}} +% also the \pkg{qfonts} package, which provides both font families. +%\changes{v1.9}{2005/08/16}{declare \texttt{qpl} and \texttt{qtm} (\pkg{qfonts}) +% as aliases of \texttt{ppl} resp. \texttt{ptm}} +% \begin{macrocode} +\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts +\DeclareMicrotypeAlias{qpl} {ppl} % qfonts/QuasiPalatino +\DeclareMicrotypeAlias{txr} {ptm} % txfonts +\DeclareMicrotypeAlias{qtm} {ptm} % qfonts/QuasiTimes +% \end{macrocode} +%\todo{check Times variants} +% More Times variants, to be checked: |pns|, |mns| (TimesNewRomanPS); |mnt| +% (TimesNewRomanMT), |mntx| (TimesNRExpertMT); |mtm| (TimesSmallTextMT); |pte| +% (Times\-Europa); |ptt|, |pttj| (TimesTen); TimesEighteen; TimesModernEF. +% +% The \pkg{mathdesign} package provides math fonts matching Bitstream Charter +%\changes{v1.9a}{2005/10/31}{declare \texttt{mdbch} (\pkg{mathdesign}) as an +% alias of Charter} +% and <URW> Garamond. +% \begin{macrocode} +\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter +\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond +% \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 + +% \end{macrocode} +% +%\subsection{Interaction with \pkg{babel}} +% +% Contexts that are to be set when switching to a language. +% \begin{macrocode} +%<*beta> +%%% ---------------------------------------------------------------------- +%%% INTERACTION WITH THE `babel' PACKAGE + +\DeclareMicrotypeBabelHook + {french,francais} + {kerning=french, spacing=} + +\DeclareMicrotypeBabelHook + {english,american,USenglish,british,UKenglish} + {kerning=, spacing=nonfrench} + +\DeclareMicrotypeBabelHook + {turkish} + {kerning=turkish, spacing=} + +%</beta> +% \end{macrocode} +%\GeneralChanges* +% +% \subsection{Note on Admissible Characters} +% +% All printable <ASCII> characters are allowed in the settings, with the +% following exceptions (on the left hand side, the replacements on the right): % %\begin{tabular}{l@{\quad:\quad}l} % |\| & \cmd{\textbackslash}\\ @@ -8246,13 +8718,22 @@ In either case, please send a report to <w.m.l@gmx.net>. %\end{tabular} % %\noindent -% Comma and equal sign must be guarded with braces (`|{,}|', `|{=}|'). -% Of course, numerical identification is possible in any case. -% Ligatures and \cmd{\mathchardef}ed symbols always have to be specified -% numerically. +% Comma and equal sign must be guarded with braces (`|{,}|', `|{=}|') to keep +% \pkg{keyval} happy. +% +% Character commands are allowed as far as they have been defined in the proper +% \LaTeX\ way, that is, when they have been assigned a slot in the font +% 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. +% 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 -% (suggested by Harald Harders)} +% (suggested by \contributor Harald Harders <h.harders\at tu-bs.de>)} +% 8-bit characters are also admissible, provided they have been declared in the +% input encoding file. They should, however, only be used in private +% configuration files, where the proper input encoding is guaranteed. % %\subsection{Character Inheritance} %\GeneralChanges{Inheritance} @@ -8260,13 +8741,16 @@ In either case, please send a report to <w.m.l@gmx.net>. % First the lists of inheriting characters. We only declare those characters % that are the same on \emph{both} sides, \ie, not \OE\ for O. % \begin{macrocode} -%<*m-t> +%</m-t> +%<*m-t|zpeu|mvs> %%% ---------------------------------------------------------------------- %%% CHARACTER INHERITANCE +%</m-t|zpeu|mvs> +%<*m-t> % \end{macrocode} % -%\subsubsection{\otI} +%\subsubsection{<OT1>} % Glyphs that should possibly inherit settings on one side only: % |012|~(`fi' ligature), |013|~(`fl'), |014|~(`ffi'), |015|~(`ffl'), % \AE, \ae, \OE, \oe. @@ -8282,61 +8766,62 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} % -%\subsubsection{\tI} +%\subsubsection{<T1>} % Candidates here: |028|~(`fi'), |029|~(`fl'), |030|~(`ffi'), |031|~(`ffl'), -% |156| (`IJ'~ligature), |188|~(`ij'), \AE, \ae, \OE, \oe. -%\changes{v1.5}{2004/12/11}{remove \cmd{\ss} from \tI\ list, add \cmd{\DJ}} -%\changes{v1.8}{2005/04/26}{remove \cmd{\DJ} from \tI\ list (it's the same as \cmd{\DH})} +% |156| (`\IJ'~ligature, since \LaTeX\ 2005/12/01 accessible as |\IJ|), +% |188|~(`\ij', |\ij|), \AE, \ae, \OE, \oe. +%\changes{v1.5}{2004/12/11}{remove \cmd{\ss} from <T1> list, add \cmd{\DJ}} +%\changes{v1.8}{2005/04/26}{remove \cmd{\DJ} from <T1> list (it's the same as \cmd{\DH})} % \begin{macrocode} \DeclareCharacterInheritance { encoding = T1 } - { A = {\`A,\'A,\^A,\~A,\"A,\r{A},\k{A},\u{A}}, - a = {\`a,\'a,\^a,\~a,\"a,\r{a},\k{a},\u{a}}, - C = {\'C,\c{C},\v{C}}, - c = {\'c,\c{c},\v{c}}, - D = {\v{D},\DH}, - d = {\v{d},\dj}, - E = {\`E,\'E,\^E,\"E,\k{E},\v{E}}, - e = {\`e,\'e,\^e,\"e,\k{e},\v{e}}, + { A = {\`A,\'A,\^A,\~A,\"A,\r A,\k A,\u A}, + a = {\`a,\'a,\^a,\~a,\"a,\r a,\k a,\u a}, + C = {\'C,\c C,\v C}, + c = {\'c,\c c,\v c}, + D = {\v D,\DH}, + d = {\v d,\dj}, + E = {\`E,\'E,\^E,\"E,\k E,\v E}, + e = {\`e,\'e,\^e,\"e,\k e,\v e}, f = {027}, % ff - G = {\u{G}}, - g = {\u{g}}, + G = {\u G}, + g = {\u g}, I = {\`I,\'I,\^I,\"I,\.I}, i = {\`i,\'i,\^i,\"i,\i}, j = {\j}, - L = {\L,\'L,\v{L}}, - l = {\l,\'l,\v{l}}, - N = {\'N,\~N,\v{N}}, - n = {\'n,\~n,\v{n}}, - O = {\O,\`O,\'O,\^O,\~O,\"O,\H{O}}, - o = {\o,\`o,\'o,\^o,\~o,\"o,\H{o}}, - R = {\'R,\v{R}}, - r = {\'r,\v{r}}, - S = {\'S,\c{S},\v{S},\SS}, - s = {\'s,\c{s},\v{s}}, - T = {\c{T},\v{T}}, - t = {\c{t},\v{t}}, - U = {\`U,\'U,\^U,\"U,\H{U},\r{U}}, - u = {\`u,\'u,\^u,\"u,\H{u},\r{u}}, + L = {\L,\'L,\v L}, + l = {\l,\'l,\v l}, + N = {\'N,\~N,\v N}, + n = {\'n,\~n,\v n}, + O = {\O,\`O,\'O,\^O,\~O,\"O,\H O}, + o = {\o,\`o,\'o,\^o,\~o,\"o,\H o}, + R = {\'R,\v R}, + r = {\'r,\v r}, + S = {\'S,\c S,\v S,\SS}, + s = {\'s,\c s,\v s}, + T = {\c T,\v T}, + t = {\c t,\v t}, + U = {\`U,\'U,\^U,\"U,\H U,\r U}, + u = {\`u,\'u,\^u,\"u,\H u,\r u}, Y = {\'Y,\"Y}, y = {\'y,\"y}, - Z = {\'Z,\.Z,\v{Z}}, - z = {\'z,\.z,\v{z}}, + Z = {\'Z,\.Z,\v Z}, + z = {\'z,\.z,\v z}, - = {127}, } % \end{macrocode} % -%\subsubsection{\lyI} +%\subsubsection{<LY1>} % More characters: |008|~(`fl'), |012|~(`fi'), |014|~(`ffi'), |015|~(`ffl'), % \AE, \ae, \OE, \oe. % \begin{macrocode} \DeclareCharacterInheritance { encoding = LY1 } - { A = {\`A,\'A,\^A,\~A,\"A,\r{A}}, - a = {\`a,\'a,\^a,\~a,\"a,\r{a}}, - C = {\c{C}}, - c = {\c{c}}, + { A = {\`A,\'A,\^A,\~A,\"A,\r A}, + a = {\`a,\'a,\^a,\~a,\"a,\r a}, + C = {\c C}, + c = {\c c}, D = {\DH}, E = {\`E,\'E,\^E,\"E}, e = {\`e,\'e,\^e,\"e}, @@ -8349,32 +8834,32 @@ In either case, please send a report to <w.m.l@gmx.net>. n = {\~n}, O = {\`O,\'O,\^O,\~O,\"O,\O}, o = {\`o,\'o,\^o,\~o,\"o,\o}, - S = {\v{S}}, - s = {\v{s}}, + S = {\v S}, + s = {\v s}, U = {\`U,\'U,\^U,\"U}, u = {\`u,\'u,\^u,\"u}, Y = {\'Y,\"Y}, y = {\'y,\"y}, - Z = {\v{Z}}, - z = {\v{z}}, + Z = {\v Z}, + z = {\v z}, } % \end{macrocode} % -%\subsubsection{\otIV} -%\changes{v1.9}{2005/08/16}{add list for \otIV} -% The Polish \otI\ extension. More interesting characters here: +%\subsubsection{<OT4>} +%\changes{v1.9}{2005/08/16}{add list for <OT4>} +% The Polish <OT1> extension. More interesting characters here: % |009|~(`fk'), |012|~(`fi'), |013|~(`fl'), |014|~(`ffi'), |015|~(`ffl'), % \AE, \ae, \OE, \oe. % \begin{macrocode} \DeclareCharacterInheritance { encoding = OT4 } - { A = {\k{A}}, - a = {\k{a}}, + { A = {\k A}, + a = {\k a}, C = {\'C}, c = {\'c}, - E = {\k{E}}, - e = {\k{e}}, + E = {\k E}, + e = {\k e}, f = {011}, % ff i = {\i}, j = {\j}, @@ -8392,43 +8877,109 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} % -%\subsubsection{\tV} -%\changes{v1.9}{2005/08/17}{add list for \tV\ (requested by \thanh)} ^^A private email, 16/8/2005 -% The Vietnamese encoding \tV. It is so crowded with accented and double-accented +%\subsubsection{<QX>} +%\changes{v1.9d}{2006/04/20}{add list for <QX> encoding (contributed by +% \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>)} +% ^^A private mail, 19/04/2006 +% The Central European <QX> encoding. Ligatures: |009|~(`fk'), |012|~(`fi'), |013|~(`fl'), +% |014|~(`ffi'), |015|~(`ffl'), \AE, \ae, \OE, \oe. +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = QX } + { A = {\`A,\'A,\^A,\~A,\"A,\k A,\AA}, + a = {\`a,\'a,\^a,\~a,\"a,\k a,\aa}, + C = {\'C,\c C}, + c = {\'c,\c c}, + D = {\DH}, + E = {\`E,\'E,\^E,\"E,\k E}, + e = {\`e,\'e,\^e,\"e,\k e}, + f = {011}, % ff + I = {\`I,\'I,\^I,\"I,\k I}, + i = {\`i,\'i,\^i,\"i,\k i,\i}, + j = {\j}, + L = {\L}, + l = {\l}, + N = {\'N,\~N}, + n = {\'n,\~n}, + O = {\O,\`O,\'O,\^O,\~O,\"O}, + o = {\o,\`o,\'o,\^o,\~o,\"o}, + S = {\'S,\c S,\v S}, + s = {\'s,\c s,\v s}, + T = {\c T}, + t = {\c t}, + U = {\`U,\'U,\^U,\"U,\k U}, + u = {\`u,\'u,\^u,\"u,\k u}, + Y = {\'Y,\"Y}, + y = {\'y,\"y}, + Z = {\'Z,\.Z,\v Z}, + z = {\'z,\.z,\v z}, + . = \textellipsis + } + +% \end{macrocode} +% +%\subsubsection{<T5>} +%\changes{v1.9}{2005/08/17}{add list for <T5> +% (requested by \contributor \thanh{} <hanthethanh\at gmail.com>)} +% ^^A private email, 16/08/2005 +% The Vietnamese encoding <T5>. It is so crowded with accented and double-accented % characters that there is no room for any ligatures. % \begin{macrocode} \DeclareCharacterInheritance { encoding = T5 } - { A = {\`A,\'A,\~A,\h{A},\d{A},\^A,\u{A}, + { A = {\`A,\'A,\~A,\h A,\d A,\^A,\u A, \`\Acircumflex,\'\Acircumflex,\~\Acircumflex,\h\Acircumflex,\d\Acircumflex, \`\Abreve,\'\Abreve,\~\Abreve,\h\Abreve,\d\Abreve}, - a = {\`a,\'a,\~a,\h{a},\d{a},\^a,\u{a}, + a = {\`a,\'a,\~a,\h a,\d a,\^a,\u a, \`\acircumflex,\'\acircumflex,\~\acircumflex,\h\acircumflex,\d\acircumflex, \`\abreve,\'\abreve,\~\abreve,\h\abreve,\d\abreve}, D = {\DJ}, d = {\dj}, - E = {\`E,\'E,\~E,\h{E},\d{E},\^E, + E = {\`E,\'E,\~E,\h E,\d E,\^E, \`\Ecircumflex,\'\Ecircumflex,\~\Ecircumflex,\h\Ecircumflex,\d\Ecircumflex}, - e = {\`e,\'e,\~e,\h{e},\d{e},\^e, + e = {\`e,\'e,\~e,\h e,\d e,\^e, \`\ecircumflex,\'\ecircumflex,\~\ecircumflex,\h\ecircumflex,\d\ecircumflex}, - I = {\`I,\'I,\~I,\h{I},\d{I}}, - i = {\`i,\'i,\~i,\h{i},\d{i},\i}, - O = {\`O,\'O,\~O,\h{O},\d{O},\^O,\horn{O}, + I = {\`I,\'I,\~I,\h I,\d I}, + i = {\`i,\'i,\~i,\h i,\d i,\i}, + O = {\`O,\'O,\~O,\h O,\d O,\^O,\horn O, \`\Ocircumflex,\'\Ocircumflex,\~\Ocircumflex,\h\Ocircumflex,\d\Ocircumflex, \`\Ohorn,\'\Ohorn,\~\Ohorn,\h\Ohorn,\d\Ohorn}, - o = {\`o,\'o,\~o,\h{o},\d{o},\^o,\horn{o}, + o = {\`o,\'o,\~o,\h o,\d o,\^o,\horn o, \`\ocircumflex,\'\ocircumflex,\~\ocircumflex,\h\ocircumflex,\d\ocircumflex, \`\ohorn,\'\ohorn,\~\ohorn,\h\ohorn,\d\ohorn}, - U = {\`U,\'U,\~U,\h{U},\d{U},\horn{U}, + U = {\`U,\'U,\~U,\h U,\d U,\horn U, \`\Uhorn,\'\Uhorn,\~\Uhorn,\h\Uhorn,\d\Uhorn}, - u = {\`u,\'u,\~u,\h{u},\d{u},\horn{u}, + u = {\`u,\'u,\~u,\h u,\d u,\horn u, \`\uhorn,\'\uhorn,\~\uhorn,\h\uhorn,\d\uhorn}, - Y = {\`Y,\'Y,\~Y,\h{Y},\d{Y}}, - y = {\`y,\'y,\~y,\h{y},\d{y}}, + Y = {\`Y,\'Y,\~Y,\h Y,\d Y}, + y = {\`y,\'y,\~y,\h y,\d y}, } %</m-t> % \end{macrocode} +%\subsubsection{Euro symbols} +% Make Euro symbols settings simpler. +% \begin{macrocode} +%<*zpeu> +\DeclareCharacterInheritance + { encoding = U, + family = {zpeu,zpeus,eurosans} } + { + E = 128 + } + +%</zpeu> +%<*mvs> +\DeclareCharacterInheritance + { encoding = OT1, + family = mvs } + { + 164 = {099,100,101} % \EURhv,\EURcr,\EURtm + } + +%</mvs> +%<*m-t> +% \end{macrocode} % %\subsection{Font Expansion} %\GeneralChanges{Expansion} @@ -8436,26 +8987,12 @@ In either case, please send a report to <w.m.l@gmx.net>. % These are \thanh's original expansion settings. They are used for all fonts % (until somebody shows mercy and creates font-specific settings). % \begin{macrocode} -%<*m-t> %%% ---------------------------------------------------------------------- %%% EXPANSION SETTINGS \SetExpansion -%<m-t> [ name = default ] -%<bch> [ name = bch-default ] -%<cmr> [ name = cmr-default ] -%<pad> [ name = pad-default ] -%<pmn> [ name = pmn-default ] -%<ppl> [ name = ppl-default ] -%<ptm> [ name = ptm-default ] -%<m-t> { encoding = {OT1,OT4,T1,LY1} } -%<!m-t> { encoding = {OT1,T1,LY1}, -%<bch> family = bch } -%<cmr> family = cmr } -%<pad> family = {pad,padx,padj} } -%<pmn> family = {pmn,pmnx,pmnj} } -%<ppl> family = {ppl,pplx,pplj} } -%<ptm> family = {ptm,ptmx,ptmj} } + [ name = default ] + { encoding = {OT1,OT4,QX,T1,LY1} } { A = 500, a = 700, \AE = 500, \ae = 700, @@ -8486,7 +9023,7 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} -% \tV\ encoding does not contain \cmd{\AE}, \cmd{\ae}, \cmd{\OE} and \cmd{\oe}. +% <T5> encoding does not contain \cmd{\AE}, \cmd{\ae}, \cmd{\OE} and \cmd{\oe}. % \begin{macrocode} \SetExpansion [ name = T5 ] @@ -8527,9 +9064,10 @@ In either case, please send a report to <w.m.l@gmx.net>. %\changes{v1.1}{2004/09/14}{add factors for some more characters} %\changes{v1.4b}{2004/11/19}{harmonize dashes in upshape and italic % (\texttt{cmr}, \texttt{pad}, \texttt{ppl})} -%\changes{v1.9}{2005/08/16}{settings for \otIV\ encoding (Computer Modern Roman, +%\changes{v1.9}{2005/08/16}{settings for <OT4> encoding (Computer Modern Roman, % Palatino, Times)} -%\changes{v1.9}{2005/08/17}{settings for \tV\ encoding (Computer Modern Roman)} +%\changes{v1.9}{2005/08/17}{settings for <T5> encoding (Computer Modern Roman)} +%\changes{v1.9a}{2005/12/02}{settings for <T5> encoded Charter} % % \begin{macrocode} %%% ---------------------------------------------------------------------- @@ -8571,94 +9109,132 @@ In either case, please send a report to <w.m.l@gmx.net>. % } %\end{verbatim} % -% We also create configuration files for the fonts -%\changes{v1.5}{2004/11/28}{settings for Bitstream Charter} -% Bitstream Charter (\nfss\ code |bch|), -% Computer Modern Roman (|cmr|), -% Palatino (|ppl|, |pplx|, |pplj|), -% Times (|ptm|, |ptmx|, |ptmj|), -% Adobe Garamond (|pad|, |padx|, |padj|) and -%\changes{v1.1}{2004/09/14}{settings for Adobe Minion -% (contributed by Harald Harders)} -% Minion\footnote{ -% Contributed by Harald Harders (\mailto{h.harders@tu-bs.de})} -% (|pmnx|, |pmnj|), -%\changes{v1.8}{2005/06/01}{settings for \ams\ math fonts} -% and for the \ams\ math fonts (|msa|, |msb|, |euf|, |eus|). -% %\subsubsection{Default} % % The default settings always use the most moderate value. % \begin{macrocode} -%<*!cfg-u> +%<*cfg-t> \SetProtrusion %<m-t> [ name = default ] +% \end{macrocode} +% We also create configuration files for the fonts +%\changes{v1.5}{2004/11/28}{settings for Bitstream Charter} +% Bitstream Charter (<NFSS> code |bch|), +% \begin{macrocode} %<bch> [ name = bch-default ] +% \end{macrocode} +% Computer Modern Roman (|cmr|), +% \begin{macrocode} %<cmr> [ name = cmr-default ] +% \end{macrocode} +% Adobe Garamond (|pad|, |padx|, |padj|), +% \begin{macrocode} %<pad> [ name = pad-default ] +% \end{macrocode} +% Minion\footnote{ +% Contributed by Harald Harders (\mailto{h.harders@tu-bs.de})} +% (|pmnx|, |pmnj|), +%\changes{v1.1}{2004/09/14}{settings for Adobe Minion +% (contributed by \contributor Harald Harders <h.harders\at tu-bs.de>)} +% \begin{macrocode} %<pmn> [ name = pmnj-default ] +% \end{macrocode} +% Palatino (|ppl|, |pplx|, |pplj|), +% \begin{macrocode} %<ppl> [ name = ppl-default ] +% \end{macrocode} +% Times (|ptm|, |ptmx|, |ptmj|), +% \begin{macrocode} %<ptm> [ name = ptm-default ] +% \end{macrocode} +% and <URW> Garamond (|ugm|). +%\changes{v1.9c}{2006/01/26}{settings for <URW> Garamond} +% \begin{macrocode} +%<ugm> [ name = ugm-default ] %<m-t> { encoding = OT1 } %<cmr> { } -%<bch|pad|pmn> { encoding = OT1, +%<bch|pad|pmn|ugm> { encoding = OT1, %<ppl|ptm> { encoding = {OT1,OT4}, %<bch> family = bch } %<pad> family = {pad,padx,padj} } %<pmn> family = pmnj } %<ppl> family = {ppl,pplx,pplj} } %<ptm> family = {ptm,ptmx,ptmj} } +%<ugm> family = ugm } { - A = {50,50}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> A = {50,50}, +%<ugm> A = {50,100}, %<m-t|pad|ptm> \AE = {50, }, -%<bch|pad|pmn> C = {50, }, +%<ugm> \AE = {150,50}, +%<ugm> B = { ,50}, +%<bch|pad|pmn|ugm> C = {50, }, %<bch|pad|pmn> D = { ,50}, +%<ugm> D = { ,70}, +%<ugm> E = { ,50}, %<m-t|bch|cmr|pad|pmn|ptm> F = { ,50}, +%<ugm> F = { ,70}, %<bch|pad|pmn> G = {50, }, -%<m-t|cmr|pad|pmn|ppl|ptm> J = {50, }, +%<ugm> G = {50,50}, +%<m-t|cmr|pad|pmn|ppl|ptm|ugm> J = {50, }, %<bch> J = {100, }, K = { ,50}, %<m-t|bch|cmr|pad|pmn|ppl> L = { ,50}, %<ptm> L = { ,80}, -%<bch|pad|pmn> O = {50,50}, -%<bch|pad|pmn> \OE = {50, }, +%<ugm> L = { ,120}, +%<bch|pad|pmn|ugm> O = {50,50}, +%<pad|pmn> \OE = {50, }, +%<ugm> \OE = {50,50}, +%<ugm> P = { ,50}, %<bch|pad|pmn> Q = {50,70}, +%<ugm> Q = {50,50}, %<bch> R = { ,50}, - T = {50,50}, - V = {50,50}, - W = {50,50}, - X = {50,50}, +%<ugm> R = { ,70}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> T = {50,50}, +%<ugm> T = {70,70}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> V = {50,50}, +%<ugm> V = {70,70}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> W = {50,50}, +%<ugm> W = {70,70}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> X = {50,50}, +%<ugm> X = {50,70}, %<m-t|bch|cmr|pad|pmn|ppl> Y = {50,50}, -%<ptm> Y = {80,80}, - k = { ,50}, +%<ptm|ugm> Y = {80,80}, +%<ugm> Z = {50,50}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> k = { ,50}, +%<ugm> k = { ,70}, %<pmn> l = { ,-50}, %<pad|ppl> p = {50,50}, +%<ugm> p = { ,50}, %<pad|ppl> q = {50, }, r = { ,50}, %<cmr|pad|pmn> t = { ,70}, %<bch> t = { ,50}, - v = {50,50}, - w = {50,50}, +%<ugm> t = { ,100}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> v = {50,50}, +%<ugm> v = {50,70}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> w = {50,50}, +%<ugm> w = {50,70}, x = {50,50}, %<m-t|bch|pad|pmn> y = { ,50}, %<cmr|ppl|ptm> y = {50,70}, +%<ugm> y = { ,70}, % \end{macrocode} %\changes{v1.6}{2005/01/11}{improve settings for numbers -% (pointed out by Peter Muthesius)} ^^A <newsname\at gmx.de> -% ^^A in: <MID:34b1h7F48s44tU1@individual.net> +% (pointed out by \contributor Peter Muthesius <newsname\at gmx.de>)} +% ^^A in: <MID:34b1h7F48s44tU1@individual.net> % \begin{macrocode} %<cmr> 0 = { ,50}, %<m-t> 1 = {50,50}, -%<bch|pad|ptm> 1 = {150,150}, +%<bch|pad|ptm|ugm> 1 = {150,150}, %<cmr> 1 = {100,200}, %<pmn> 1 = { ,50}, %<ppl> 1 = {100,100}, -%<bch|cmr|pad> 2 = {50,50}, -%<cmr|pad> 3 = {50,50}, +%<bch|cmr|pad|ugm> 2 = {50,50}, +%<cmr|pad|ugm> 3 = {50,50}, %<bch|pmn> 3 = {50, }, %<m-t|pad> 4 = {50,50}, %<bch> 4 = {100,50}, -%<cmr> 4 = {70,70}, +%<cmr|ugm> 4 = {70,70}, %<pmn> 4 = {50, }, %<ptm> 4 = {70, }, %<cmr> 5 = { ,50}, @@ -8667,58 +9243,65 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> 6 = { ,50}, %<pad> 6 = {50,50}, %<m-t> 7 = {50,50}, -%<bch|pad|pmn> 7 = {50,80}, +%<bch|pad|pmn|ugm> 7 = {50,80}, %<cmr|ptm> 7 = {50,100}, -%<ppl> 7 = { ,50}, +%<ppl> 7 = { ,50}, %<cmr> 8 = { ,50}, %<bch|pad> 9 = {50,50}, %<cmr> 9 = { ,50}, -%<m-t|cmr|pad|pmn|ppl|ptm> . = { ,700}, +%<m-t|cmr|pad|pmn|ppl|ptm|ugm> . = { ,700}, %<bch> . = { ,600}, {,}= { ,500}, -%<m-t|cmr|pad|pmn|ppl|ptm> : = { ,500}, +%<m-t|cmr|pad|pmn|ppl|ptm|ugm> : = { ,500}, %<bch> : = { ,400}, %<m-t|bch|pad|pmn|ptm> ; = { ,300}, %<cmr|ppl> ; = { ,500}, +%<ugm> ; = { ,400}, ! = { ,100}, %<m-t|pad|pmn|ptm> ? = { ,100}, -%<bch|cmr|ppl> ? = { ,200}, +%<bch|cmr|ppl|ugm> ? = { ,200}, %<pmn> " = {300,300}, %<m-t|bch|cmr|pad|pmn|ppl> @ = {50,50}, %<ptm> @ = {100,100}, - ~ = {200,250}, -%<m-t|bch|pad|pmn|ppl|ptm> _ = {100,100}, -%<cmr> _ = {200,200}, +%<m-t|bch|cmr|pad|pmn|ppl|ptm> ~ = {200,250}, +%<ugm> ~ = {300,350}, %<pad|ppl|ptm> & = {50,100}, +%<ugm> & = { ,100}, %<m-t|cmr|pad|pmn> \% = {50,50}, %<bch> \% = { ,50}, %<ppl|ptm> \% = {100,100}, -%<m-t|ppl|ptm> * = {200,200}, +%<ugm> \% = {50,100}, +%<m-t|ppl|ptm|ugm> * = {200,200}, %<bch|pmn> * = {200,300}, %<cmr|pad> * = {300,300}, %<m-t|cmr|ppl|ptm> + = {250,250}, %<bch> + = {150,250}, %<pad> + = {300,300}, %<pmn> + = {150,200}, +%<ugm> + = {250,300}, +%<ugm> {=}= {200,200}, %<m-t|pad|pmn|ptm> ( = {100, }, ) = { ,200}, -%<bch> ( = {200, }, ) = { ,200}, +%<bch|ugm> ( = {200, }, ) = { ,200}, %<cmr|ppl> ( = {100, }, ) = { ,300}, %<bch|pmn> [ = {100, }, ] = { ,100}, % \end{macrocode} -%\changes{v1.7}{2005/03/15}{fix: remove \textbackslash\ from \otI, -% add \cmd{\textbackslash} to \tI\ encoding} +%\changes{v1.7}{2005/03/15}{fix: remove \textbackslash\ from <OT1>, +% add \cmd{\textbackslash} to <T1> encoding} % \begin{macrocode} %<m-t|pad|pmn|ptm> / = {100,200}, %<bch> / = { ,200}, %<cmr|ppl> / = {200,300}, +%<ugm> / = {100,300}, %<m-t|ptm> - = {500,500}, %<bch|cmr|ppl> - = {400,500}, %<pad> - = {300,500}, %<pmn> - = {200,400}, +%<ugm> - = {500,600}, %<m-t|pmn> \textendash = {200,200}, \textemdash = {150,150}, %<bch> \textendash = {200,300}, \textemdash = {150,250}, %<cmr> \textendash = {400,300}, \textemdash = {300,200}, %<pad|ppl|ptm> \textendash = {300,300}, \textemdash = {200,200}, +%<ugm> \textendash = {250,300}, \textemdash = {250,250}, % \end{macrocode} % Why settings for left \emph{and} right quotes? Because in some languages they % might be used like that (see the \pkg{csquotes} package for examples). @@ -8727,14 +9310,16 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> \textquoteleft = {500,700}, \textquoteright = {500,600}, %<pad|ppl> \textquoteleft = {500,700}, \textquoteright = {500,700}, %<ptm> \textquoteleft = {500,500}, \textquoteright = {300,500}, +%<ugm> \textquoteleft = {300,600}, \textquoteright = {300,600}, %<m-t|bch|pmn> \textquotedblleft = {300,300}, \textquotedblright = {300,300}, %<cmr> \textquotedblleft = {500,300}, \textquotedblright = {200,600}, %<pad|ppl|ptm> \textquotedblleft = {300,400}, \textquotedblright = {300,400}, +%<ugm> \textquotedblleft = {400,400}, \textquotedblright = {400,400}, } % \end{macrocode} -% Greek uppercase letters are in \otI\ encoding only. -%\changes{v1.9}{2005/07/10}{fix: remove uppercase Greek letters from \tI\ encoded CMR} +% Greek uppercase letters are in <OT1> encoding only. +%\changes{v1.9}{2005/07/10}{fix: remove uppercase Greek letters from <T1> encoded CMR} % \begin{macrocode} %<*cmr> \SetProtrusion @@ -8759,8 +9344,9 @@ In either case, please send a report to <w.m.l@gmx.net>. %</cmr> % \end{macrocode} -% \tI\ and \lyI\ encodings contain some more characters. The default list +% <T1> and <LY1> encodings contain some more characters. The default list % will be loaded first. +%\changes{v1.9a}{2005/11/07}{fix: remove \texttt{\_} from <OT1> encoding} % \begin{macrocode} \SetProtrusion %<m-t> [ name = T1-default, @@ -8770,6 +9356,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> [ name = pmnj-T1, %<ppl> [ name = ppl-T1, %<ptm> [ name = ptm-T1, +%<ugm> [ name = ugm-T1, %<m-t> load = default ] %<bch> load = bch-default ] %<cmr> load = cmr-default ] @@ -8777,43 +9364,52 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> load = pmnj-default ] %<ppl> load = ppl-default ] %<ptm> load = ptm-default ] +%<ugm> load = ugm-default ] %<m-t> { encoding = {T1,LY1} } %<bch|cmr|pad|pmn|ppl> { encoding = {T1,LY1}, -%<ptm> { encoding = {T1}, +%<ptm|ugm> { encoding = {T1}, %<bch> family = bch } %<cmr> family = cmr } %<pad> family = {pad,padx,padj} } %<pmn> family = pmnj } %<ppl> family = {ppl,pplx,pplj} } %<ptm> family = {ptm,ptmx,ptmj} } +%<ugm> family = ugm } { %<cmr> \AE = {50, }, +%<bch> \OE = {50, }, %<pmn> \TH = { ,50}, +%<m-t|bch|pad|pmn|ppl|ptm> _ = {100,100}, +%<cmr> _ = {200,200}, +%<ugm> _ = {100,200}, %<m-t|pad|pmn|ptm> \textbackslash = {100,200}, %<bch> \textbackslash = {150,200}, %<cmr|ppl> \textbackslash = {200,300}, +%<ugm> \textbackslash = {100,300}, +%<ugm> \textbar = {200,200}, %<cmr> \textquotedblleft = {200,600}, %<cmr> \textquotedbl = {300,300}, % \end{macrocode} %\changes{v1.4}{2004/10/30}{tweak quote characters for \texttt{cmr} -% variants (\otI, \tI, \texttt{lmr})} +% variants (<OT1>, <T1>, \texttt{lmr})} % The EC fonts do something weird: They insert an implicit kern between quote -% and boundary character. Therefore, we must override the settings from \otI. +% and boundary character. Therefore, we must override the settings from <OT1>. % \begin{macrocode} -%<m-t|cmr|pad|ppl|ptm> \quotesinglbase = {400,400}, \quotedblbase = {400,400}, +%<m-t|cmr|pad|ppl|ptm|ugm> \quotesinglbase = {400,400}, \quotedblbase = {400,400}, %<bch|pmn> \quotesinglbase = {400,400}, \quotedblbase = {300,300}, %<m-t|bch|pmn> \guilsinglleft = {400,300}, \guilsinglright = {300,400}, %<cmr|pad|ppl|ptm> \guilsinglleft = {400,400}, \guilsinglright = {300,500}, +%<ugm> \guilsinglleft = {400,400}, \guilsinglright = {300,600}, %<m-t> \guillemotleft = {200,200}, \guillemotright = {200,200}, %<cmr> \guillemotleft = {300,200}, \guillemotright = {100,400}, %<bch|pmn> \guillemotleft = {200,200}, \guillemotright = {150,300}, -%<pad> \guillemotleft = {300,300}, \guillemotright = {200,400}, -%<ppl|ptm> \guillemotleft = {300,300}, \guillemotright = {200,400}, -%<m-t|bch|cmr|pad|pmn|ppl> \textexclamdown = {100, }, \textquestiondown = {100, }, +%<pad|ppl|ptm> \guillemotleft = {300,300}, \guillemotright = {200,400}, +%<ugm> \guillemotleft = {300,400}, \guillemotright = {300,400}, +%<m-t|bch|cmr|pad|pmn|ppl|ugm> \textexclamdown = {100, }, \textquestiondown = {100, }, %<ptm> \textexclamdown = {200, }, \textquestiondown = {200, }, -%<m-t|cmr|pad|ppl|ptm> \textbraceleft = {400,200}, \textbraceright = {200,400}, +%<m-t|cmr|pad|ppl|ptm|ugm> \textbraceleft = {400,200}, \textbraceright = {200,400}, %<bch|pmn> \textbraceleft = {200, }, \textbraceright = { ,300}, -%<m-t|bch|cmr|pad|ppl|ptm> \textless = {200,100}, \textgreater = {100,200}, +%<m-t|bch|cmr|pad|ppl|ptm|ugm> \textless = {200,100}, \textgreater = {100,200}, %<pmn> \textless = {100, }, \textgreater = { ,100}, %<pmn> \textvisiblespace = {100,100}, % not in LY1 % \dh = { , }, @@ -8821,36 +9417,15 @@ In either case, please send a report to <w.m.l@gmx.net>. % \NG = { , }, % \ng = { , }, % \textasciicircum = { , }, -% \textbar = { , }, % \textsterling = { , }, % also in TS1 % \textsection = { , }, % also in TS1 } -%<*cmr> -% \end{macrocode} -% \tV\ is based on \otI; it shares some but not all extra characters of \tI. -% All accented characters are already taken care of by the inheritance list. -% \begin{macrocode} -\SetProtrusion - [ name = cmr-T5, - load = cmr-default ] - { encoding = T5, - family = cmr } - { - \textbackslash = {200,300}, - \textquotedblleft = {200,600}, - \textquotedbl = {300,300}, - \quotesinglbase = {400,400}, \quotedblbase = {400,400}, - \guilsinglleft = {400,400}, \guilsinglright = {300,500}, - \guillemotleft = {300,200}, \guillemotright = {100,400}, - \textbraceleft = {400,200}, \textbraceright = {200,400}, - \textless = {200,100}, \textgreater = {100,200}, - } - % \end{macrocode} % The \pkg{lmodern} fonts, on the other hand, restore the original kerning from -% the \otI\ fonts, and so do we. Silly, isn't it? +% the <OT1> fonts, and so do we. Silly, isn't it? % \begin{macrocode} +%<*cmr> \SetProtrusion [ name = lmr-T1, load = cmr-T1 ] @@ -8862,6 +9437,83 @@ In either case, please send a report to <w.m.l@gmx.net>. } %</cmr> +% \end{macrocode} +% Settings for the <QX> encoding (generic and Times). +%\changes{v1.9d}{2006/04/20}{settings for <QX> encoding (contributed by +% \contributor Maciej Eder <maciej_eder\at poczta.onet.pl>)} +% ^^A private mail, 19/04/2006 +% It also includes some glyphs otherwise in <TS1>. +% \begin{macrocode} +%<*m-t|ptm> +\SetProtrusion +%<m-t> [ name = QX-default, +%<ptm> [ name = ptm-QX, +%<m-t> load = default ] +%<ptm> load = ptm-default ] +%<m-t> { encoding = QX } +%<ptm> { encoding = QX, +%<ptm> family = {ptm,ptmx,ptmj} } + { +%<ptm> * = {200,200}, + {=} = {100,100}, + \textunderscore = {100,100}, + \textbackslash = {100,200}, + \quotedblbase = {400,400}, +%<m-t> \guillemotleft = {200,200}, \guillemotright = {200,200}, +%<ptm> \guillemotleft = {300,300}, \guillemotright = {200,400}, + \textexclamdown = {100, }, \textquestiondown = {100, }, +%<m-t> \textbraceleft = {400,200}, \textbraceright = {200,400}, +%<ptm> \textbraceleft = {200,200}, \textbraceright = {200,300}, + \textless = {200,100}, \textgreater = {100,200}, + \textminus = {200,200}, \textdegree = {300,300}, +%<m-t> \copyright = {100,100}, \textregistered = {100,100}, +%<ptm> \copyright = {100,150}, \textregistered = {100,150}, +%<ptm> \textxgeq = { ,100}, \textxleq = {100, }, +%<ptm> \textalpha = { , 50}, \textDelta = { 70, 70}, +%<ptm> \textpi = { 50, 80}, \textSigma = { , 70}, +%<ptm> \textmu = { , 80}, \texteuro = { 50, 50}, +%<ptm> \textellipsis = {175,175}, \textasciitilde = { 80, 80}, +%<ptm> \textapprox = { 50, 50}, \textinfty = {100,100}, +%<ptm> \textdagger = {150,150}, \textdaggerdbl = {100,100}, +%<ptm> \textdiv = { 50,150}, \textsection = { 80, 80}, +%<ptm> \texttimes = {100,150}, \textpm = { 50, 80}, +%<ptm> \textbullet = {150,150}, \textperiodcentered = {300,300}, +%<ptm> \textquotesingle = {500,500}, \textquotedbl = {300,300}, +%<ptm> \textperthousand = { ,50}, + } + +%</m-t|ptm> +%<*cmr|bch> +% \end{macrocode} +% <T5> is based on <OT1>; it shares some but not all extra characters of <T1>. +% All accented characters are already taken care of by the inheritance list. +% \begin{macrocode} +\SetProtrusion +%<cmr> [ name = cmr-T5, +%<cmr> load = cmr-default ] +%<bch> [ name = bch-T5, +%<bch> load = bch-default ] + { encoding = T5, +%<cmr> family = cmr } +%<bch> family = bch } + { +%<bch> _ = {100,100}, +%<bch> \textbackslash = {150,200}, +%<cmr> \textbackslash = {200,300}, +%<cmr> \textquotedblleft = {200,600}, +%<cmr> \textquotedbl = {300,300}, +%<bch> \quotesinglbase = {400,400}, \quotedblbase = {300,300}, +%<cmr> \quotesinglbase = {400,400}, \quotedblbase = {400,400}, +%<bch> \guilsinglleft = {400,300}, \guilsinglright = {300,400}, +%<cmr> \guilsinglleft = {400,400}, \guilsinglright = {300,500}, +%<bch> \guillemotleft = {200,200}, \guillemotright = {150,300}, +%<cmr> \guillemotleft = {300,200}, \guillemotright = {100,400}, +%<bch> \textbraceleft = {200, }, \textbraceright = { ,300}, +%<cmr> \textbraceleft = {400,200}, \textbraceright = {200,400}, + \textless = {200,100}, \textgreater = {100,200}, + } + +%</cmr|bch> %<*pmn> \SetProtrusion [ name = pmnx-OT1, @@ -8883,9 +9535,9 @@ In either case, please send a report to <w.m.l@gmx.net>. %</pmn> % \end{macrocode} -% Times is the default font for \lyI, therefore we provide settings for the +% Times is the default font for <LY1>, therefore we provide settings for the % additional characters in this encoding, too. -%\changes{v1.8}{2005/04/26}{add \lyI\ characters for Times} +%\changes{v1.8}{2005/04/26}{add <LY1> characters for Times} % \begin{macrocode} %<*ptm> \SetProtrusion @@ -8894,6 +9546,7 @@ In either case, please send a report to <w.m.l@gmx.net>. { encoding = LY1, family = {ptm,ptmx,ptmj} } { + _ = {100,100}, \texttrademark = {100,100}, \textregistered = {100,100}, \textcopyright = {100,100}, @@ -8947,25 +9600,29 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> [ name = pmnj-it ] %<ppl> [ name = ppl-it ] %<ptm> [ name = ptm-it ] -%<m-t|bch|pad|pmn> { encoding = OT1, -%<cmr> { } +%<ugm> [ name = ugm-it ] +%<m-t|bch|pad|pmn|ugm> { encoding = OT1, %<ppl|ptm> { encoding = {OT1,OT4}, %<bch> family = bch, %<pad> family = {pad,padx,padj}, %<pmn> family = pmnj, %<ppl> family = {ppl,pplx,pplj}, %<ptm> family = {ptm,ptmx,ptmj}, -%<!cmr> shape = {it,sl} } +%<ugm> family = ugm, +%<!(cmr|ugm)> shape = {it,sl} } +%<ugm> shape = it } +%<cmr> { } { %<cmr|ptm> A = {100,50}, %<pad|pmn> A = {50, }, +%<ugm> A = { ,150}, %<ppl> A = {50,50}, %<ptm> \AE = {100, }, %<pad|ppl> \AE = {50, }, %<pmn> \AE = { ,-50}, %<cmr|pad|ppl|ptm> B = {50, }, %<pmn> B = {20,-50}, -%<bch|ppl|ptm> C = {50, }, +%<bch|ppl|ptm|ugm> C = {50, }, %<cmr|pad> C = {100, }, %<pmn> C = {50,-50}, %<cmr|pad|ppl|ptm> D = {50,50}, @@ -8975,7 +9632,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr|pad|ptm> F = {100, }, %<pmn> F = {10, }, %<ppl> F = {50, }, -%<bch|ppl|ptm> G = {50, }, +%<bch|ppl|ptm|ugm> G = {50, }, %<cmr|pad> G = {100, }, %<pmn> G = {50,-50}, %<cmr|pad|ppl|ptm> H = {50, }, @@ -8988,31 +9645,34 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> K = {20, }, %<cmr|pad|ppl|ptm> L = {50, }, %<pmn> L = {20,50}, +%<ugm> L = { ,100}, %<cmr|ptm> M = {50, }, %<pmn> M = { ,-30}, %<cmr|ptm> N = {50, }, %<pmn> N = { ,-30}, %<bch|pmn|ppl|ptm> O = {50, }, %<cmr|pad> O = {100, }, -%<bch|pmn|ppl|ptm> \OE = {50, }, +%<ugm> O = {70,50}, +%<pmn|ppl|ptm> \OE = {50, }, %<pad> \OE = {100, }, %<cmr|pad|ppl|ptm> P = {50, }, %<pmn> P = {20,-50}, %<bch|pmn|ppl|ptm> Q = {50, }, %<cmr|pad> Q = {100, }, +%<ugm> Q = {70,50}, %<cmr|pad|ppl|ptm> R = {50, }, %<pmn> R = {20, }, %<bch|cmr|pad|ppl|ptm> S = {50, }, %<pmn> S = {20,-30}, %<bch|cmr|pad|ppl|ptm> $ = {50, }, %<pmn> $ = {20,-30}, -%<bch|pmn> T = {70, }, +%<bch|pmn|ugm> T = {70, }, %<cmr|pad|ppl|ptm> T = {100, }, %<cmr|pad|ppl|ptm> U = {50, }, %<pmn> U = {50,-50}, -%<cmr|pad|pmn> V = {100, }, +%<cmr|pad|pmn|ugm> V = {100, }, %<ppl|ptm> V = {100,50}, -%<cmr|pad|pmn> W = {100, }, +%<cmr|pad|pmn|ugm> W = {100, }, %<ppl> W = {50, }, %<ptm> W = {100,50}, %<cmr|ppl|ptm> X = {50, }, @@ -9031,9 +9691,9 @@ In either case, please send a report to <w.m.l@gmx.net>. %<bch> q = {50, }, %<pmn> r = { ,50}, %<bch> t = { ,50}, -%<pmn> v = {50, }, +%<pmn|ugm> v = {50, }, %<bch> w = { ,50}, -%<pmn> w = {50, }, +%<pmn|ugm> w = {50, }, %<bch> y = { ,50}, %<cmr> 0 = {100, }, %<bch|ptm> 1 = {150,100}, @@ -9041,6 +9701,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pad> 1 = {150, }, %<pmn> 1 = {50, }, %<ppl> 1 = {100, }, +%<ugm> 1 = {150,150}, %<cmr> 2 = {100,-100}, %<pad|ppl|ptm> 2 = {50, }, %<pmn> 2 = {-50, }, @@ -9062,16 +9723,16 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> 8 = {50,-50}, %<cmr> 9 = {100,-100}, %<m-t|cmr|pad|pmn|ppl> . = { ,500}, -%<bch|ptm> . = { ,700}, +%<bch|ptm|ugm> . = { ,700}, %<m-t|cmr|pad|pmn|ppl> {,}= { ,500}, -%<bch> {,}= { ,600}, +%<bch|ugm> {,}= { ,600}, %<ptm> {,}= { ,700}, %<m-t|cmr|pad|ppl> : = { ,300}, -%<bch> : = { ,400}, +%<bch|ugm> : = { ,400}, %<pmn> : = { ,200}, %<ptm> : = { ,500}, %<m-t|cmr|pad|ppl> ; = { ,300}, -%<bch> ; = { ,400}, +%<bch|ugm> ; = { ,400}, %<pmn> ; = { ,200}, %<ptm> ; = { ,500}, %<ptm> ! = { ,100}, @@ -9079,31 +9740,31 @@ In either case, please send a report to <w.m.l@gmx.net>. %<ptm> ? = { ,100}, %<ppl> ? = { ,300}, %<pmn> " = {400,200}, -%<m-t|bch|pmn> _ = { ,100}, -%<cmr> _ = {100,200}, -%<pad|ppl|ptm> _ = {100,100}, %<m-t|pad|pmn|ppl|ptm> & = {50,50}, %<bch> & = { ,80}, %<cmr> & = {100,50}, +%<ugm> & = {50,100}, %<m-t|cmr|pad|pmn> \% = {100, }, %<bch> \% = {50,50}, %<ppl|ptm> \% = {100,100}, +%<ugm> \% = {100,50}, %<m-t|pmn|ppl> * = {200,200}, %<bch> * = {300,200}, %<cmr> * = {400,100}, %<pad> * = {500,100}, -%<ptm> * = {400,200}, +%<ptm|ugm> * = {400,200}, %<m-t|cmr|pmn|ppl> + = {150,200}, -%<bch> + = {250,250}, +%<bch|ugm> + = {250,250}, %<pad|ptm> + = {250,200}, %<m-t|pad|pmn|ppl> @ = {50,50}, %<bch> @ = {80,50}, %<cmr> @ = {200,50}, %<ptm> @ = {150,150}, -%<m-t|bch> ~ = {150,150}, +%<m-t|bch|ugm> ~ = {150,150}, %<cmr|pad|pmn|ppl|ptm> ~ = {200,150}, +%<ugm> {=}= {200,200}, ( = {200, }, ) = { ,200}, -%<m-t|cmr|pad|ppl|ptm> / = {100,200}, +%<m-t|cmr|pad|ppl|ptm|ugm> / = {100,200}, %<bch> / = { ,150}, %<pmn> / = {100,150}, %<m-t> - = {300,300}, @@ -9112,11 +9773,12 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> - = {500,300}, %<ppl> - = {300,500}, %<ptm> - = {500,500}, +%<ugm> - = {400,700}, %<m-t|pmn> \textendash = {200,200}, \textemdash = {150,150}, %<bch> \textendash = {200,300}, \textemdash = {150,200}, %<cmr> \textendash = {500,300}, \textemdash = {400,200}, -%<pad|ppl|ptm> \textendash = {300,300}, \textemdash = {200,200}, -%<m-t|bch|pmn> \textquoteleft = {400,200}, \textquoteright = {400,200}, +%<pad|ppl|ptm|ugm> \textendash = {300,300}, \textemdash = {200,200}, +%<m-t|bch|pmn|ugm> \textquoteleft = {400,200}, \textquoteright = {400,200}, %<cmr|pad> \textquoteleft = {800,200}, \textquoteright = {800,200}, %<ppl> \textquoteleft = {700,400}, \textquoteright = {700,400}, %<ptm> \textquoteleft = {800,500}, \textquoteright = {800,500}, @@ -9125,6 +9787,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pad> \textquotedblleft = {700,200}, \textquotedblright = {700,200}, %<ppl> \textquotedblleft = {500,300}, \textquotedblright = {500,300}, %<ptm> \textquotedblleft = {700,400}, \textquotedblright = {700,400}, +%<ugm> \textquotedblleft = {600,200}, \textquotedblright = {600,200}, } %<*cmr> @@ -9159,6 +9822,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> [ name = pmnj-it-T1, %<ppl> [ name = ppl-it-T1, %<ptm> [ name = ptm-it-T1, +%<ugm> [ name = ugm-it-T1, %<m-t> load = OT1-it ] %<bch> load = bch-it ] %<cmr> load = cmr-it ] @@ -9166,47 +9830,57 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pad> load = pad-it ] %<ppl> load = ppl-it ] %<ptm> load = ptm-it ] +%<ugm> load = ugm-it ] %<m-t|bch|cmr|pad|pmn|ppl> { encoding = {T1,LY1}, -%<ptm> { encoding = {T1}, +%<ptm|ugm> { encoding = {T1}, %<bch> family = bch, %<cmr> family = cmr, %<pmn> family = pmnj, %<pad> family = {pad,padx,padj}, %<ppl> family = {ppl,pplx,pplj}, %<ptm> family = {ptm,ptmx,ptmj}, -%<!cmr> shape = {it,sl} } -%<cmr> shape = it } +%<ugm> family = ugm, +%<!(cmr|ugm)> shape = {it,sl} } +%<cmr|ugm> shape = it } { +%<m-t|bch|pmn> _ = { ,100}, +%<cmr|ugm> _ = {100,200}, +%<pad|ppl|ptm> _ = {100,100}, %<cmr> \AE = {100, }, +%<bch> \OE = { 50, }, %<cmr> \OE = {100, }, -%<m-t|pad|ppl|ptm> \textbackslash = {100,200}, -%<cmr> \textbackslash = {300,300}, -%<bch> \textbackslash = {150,150}, -%<pmn> \textbackslash = {100,150}, %<pmn> 031 = { ,-100}, % ffl %<cmr|ptm> 156 = {100, }, % IJ %<pad> 156 = {50, }, % IJ %<pmn> 156 = {20, }, % IJ %<pmn> 188 = { ,-30}, % ij -%<pmn> \v{t} = { ,100}, +%<pmn> \v t = { ,100}, +%<m-t|pad|ppl|ptm> \textbackslash = {100,200}, +%<cmr|ugm> \textbackslash = {300,300}, +%<bch> \textbackslash = {150,150}, +%<pmn> \textbackslash = {100,150}, +%<ugm> \textbar = {200,200}, %<cmr> \textquotedblleft = {500,300}, %<m-t|ptm> \quotesinglbase = {300,700}, \quotedblbase = {400,500}, %<cmr> \quotesinglbase = {300,700}, \quotedblbase = {200,600}, %<bch|pmn> \quotesinglbase = {200,500}, \quotedblbase = {150,500}, %<pad|ppl> \quotesinglbase = {500,500}, \quotedblbase = {400,400}, +%<ugm> \quotesinglbase = {300,700}, \quotedblbase = {300,500}, %<m-t|ppl|ptm> \guilsinglleft = {400,400}, \guilsinglright = {300,500}, %<bch|pmn> \guilsinglleft = {300,400}, \guilsinglright = {200,500}, %<cmr> \guilsinglleft = {500,300}, \guilsinglright = {400,400}, %<pad> \guilsinglleft = {500,400}, \guilsinglright = {300,500}, +%<ugm> \guilsinglleft = {400,400}, \guilsinglright = {300,600}, %<m-t|ppl> \guillemotleft = {300,300}, \guillemotright = {300,300}, %<bch|pmn> \guillemotleft = {200,300}, \guillemotright = {150,400}, %<cmr> \guillemotleft = {400,100}, \guillemotright = {200,300}, %<pad> \guillemotleft = {300,300}, \guillemotright = {200,400}, %<ptm> \guillemotleft = {300,400}, \guillemotright = {200,400}, -%<m-t|pad|ppl> \textexclamdown = {100, }, \textquestiondown = {200, }, +%<ugm> \guillemotleft = {300,400}, \guillemotright = {300,400}, +%<m-t|pad|ppl|ugm> \textexclamdown = {100, }, \textquestiondown = {200, }, %<cmr|ptm> \textexclamdown = {200, }, \textquestiondown = {200, }, %<pmn> \textexclamdown = {-50, }, \textquestiondown = {-50, }, -%<m-t|ppl> \textbraceleft = {200,100}, \textbraceright = {200,200}, +%<m-t|ppl|ugm> \textbraceleft = {200,100}, \textbraceright = {200,200}, %<bch|pmn> \textbraceleft = {200, }, \textbraceright = { ,200}, %<cmr|pad|ptm> \textbraceleft = {400,100}, \textbraceright = {200,200}, %<bch|pmn> \textless = {100, }, \textgreater = { ,100}, @@ -9214,26 +9888,78 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> \textvisiblespace = {100,100}, } -%<*cmr> +%<*m-t|ptm> +\SetProtrusion +%<m-t> [ name = QX-it-default, +%<ptm> [ name = ptm-it-QX, +%<m-t> load = OT1-it ] +%<ptm> load = ptm-it ] + { encoding = {QX}, +%<ptm> family = {ptm,ptmx,ptmj}, + shape = {it,sl} } + { +%<ptm> 009 = { , 50}, % fk + {=} = {100,100}, +%<m-t> \textunderscore = {100,100}, +%<ptm> \textunderscore = {100,150}, + \textbackslash = {100,200}, + \quotedblbase = {300,400}, +%<m-t> \guillemotleft = {300,300}, \guillemotright = {300,300}, +%<ptm> \guillemotleft = {200,400}, \guillemotright = {200,400}, + \textexclamdown = {200, }, \textquestiondown = {200, }, + \textbraceleft = {200,100}, \textbraceright = {200,200}, + \textless = {100,100}, \textgreater = {100,100}, + \textminus = {200,200}, \textdegree = {300,150}, +%<m-t> \copyright = {100,100}, \textregistered = {100,100}, +%<ptm> \textregistered = {100,150}, \copyright = {100,150}, +%<ptm> \textDelta = { 70, }, \textdelta = { , 50}, +%<ptm> \textpi = { 50, 80}, \textmu = { , 80}, +%<ptm> \texteuro = {200, }, \textellipsis = {100,150}, +%<ptm> \textquoteleft = {500,400}, \textquoteright = {500,400}, +%<ptm> \textquotedblleft = {500,300}, \textquotedblright = {400,400}, +%<ptm> \textapprox = { 50, 50}, \textinfty = {100,100}, +%<ptm> \textdagger = {150,150}, \textdaggerdbl = {100,100}, +%<ptm> \textdiv = {150,150}, \textasciitilde = { 80, 80}, +%<ptm> \texttimes = {100,150}, \textpm = { 50, 80}, +%<ptm> \textbullet = {300,100}, \textperiodcentered = {300,300}, +%<ptm> \textquotesingle = {500,500}, \textquotedbl = {300,300}, +%<ptm> \textperthousand = { ,50}, + } + +%</m-t|ptm> +%<*cmr|bch> \SetProtrusion - [ name = cmr-it-T5, - load = cmr-it ] +%<cmr> [ name = cmr-it-T5, +%<cmr> load = cmr-it ] +%<bch> [ name = bch-it-T5, +%<bch> load = bch-it ] { encoding = T5, - family = cmr, +%<bch> family = bch, +%<cmr> family = cmr, shape = it } { - \textbackslash = {300,300}, - \quotesinglbase = {300,700}, \quotedblbase = {200,600}, - \guilsinglleft = {500,300}, \guilsinglright = {400,400}, - \guillemotleft = {400,100}, \guillemotright = {200,300}, - \textbraceleft = {400,100}, \textbraceright = {200,200}, - \textless = {300,100}, \textgreater = {200,100}, +%<bch> _ = { ,100}, +%<cmr> _ = {100,200}, +%<bch> \textbackslash = {150,150}, +%<cmr> \textbackslash = {300,300}, +%<bch> \quotesinglbase = {200,500}, \quotedblbase = {150,500}, +%<cmr> \quotesinglbase = {300,700}, \quotedblbase = {200,600}, +%<bch> \guilsinglleft = {300,400}, \guilsinglright = {200,500}, +%<cmr> \guilsinglleft = {500,300}, \guilsinglright = {400,400}, +%<bch> \guillemotleft = {200,300}, \guillemotright = {150,400}, +%<cmr> \guillemotleft = {400,100}, \guillemotright = {200,300}, +%<bch> \textbraceleft = {200, }, \textbraceright = { ,200}, +%<cmr> \textbraceleft = {400,100}, \textbraceright = {200,200}, +%<bch> \textless = {100, }, \textgreater = { ,100}, +%<cmr> \textless = {300,100}, \textgreater = {200,100}, } +%</cmr|bch> % \end{macrocode} %\changes{v1.8}{2005/06/01}{verified settings for slanted Computer Modern Roman} % Slanted is very similar to italic. % \begin{macrocode} +%<*cmr> \SetProtrusion [ name = cmr-sl, load = cmr-it-OT1 ] @@ -9335,6 +10061,7 @@ In either case, please send a report to <w.m.l@gmx.net>. family = {ptm,ptmx,ptmj}, shape = {it,sl} } { + _ = {100,100}, \texttrademark = {100,100}, \textregistered = {100,100}, \textcopyright = {100,100}, @@ -9363,12 +10090,13 @@ In either case, please send a report to <w.m.l@gmx.net>. %</ptm> % \end{macrocode} % -%\subsubsection{Small caps} +%\subsubsection{Small Caps} % % Small caps should inherit the values from their big brothers. Since values are % relative to character width, we don't need to adjust them any further (but % we have to reset some characters). % \begin{macrocode} +%<*!ugm> \SetProtrusion %<m-t> [ name = OT1-sc, %<bch> [ name = bch-sc, @@ -9407,7 +10135,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<m-t|bch|cmr|pad|pmn|ppl> 013 = { ,50}, % fl %<ptm> 013 = { ,80}, % fl %<bch|pad|pmn> o = {50,50}, -%<bch|pad|pmn> \oe = {50, }, +%<pad|pmn> \oe = {50, }, %<ppl> p = { 0, 0}, %<bch|pad|pmn> q = {50,70}, %<ppl> q = { 0, }, @@ -9464,24 +10192,52 @@ In either case, please send a report to <w.m.l@gmx.net>. %<ptm> y = {80,80}, } -%<*cmr> +%</!ugm> +%<*m-t> \SetProtrusion - [ name = cmr-sc-T5, - load = cmr-T5 ] - { encoding = T5, - family = cmr, - shape = sc } + [ name = QX-sc, + load = QX-default ] + { encoding = QX, + shape = sc } { a = {50,50}, f = { ,50}, j = {50, }, l = { ,50}, + 013 = { ,50}, % fl r = { , 0}, t = {50,50}, y = {50,50}, } -%</cmr> +%</m-t> +%<*cmr|bch> +\SetProtrusion +%<bch> [ name = bch-sc-T5, +%<bch> load = bch-T5 ] +%<cmr> [ name = cmr-sc-T5, +%<cmr> load = cmr-T5 ] + { encoding = T5, +%<bch> family = bch, +%<cmr> family = cmr, + shape = sc } + { + a = {50,50}, +%<bch> c = {50, }, +%<bch> d = { ,50}, + f = { ,50}, +%<bch> g = {50, }, +%<bch> j = {100, }, +%<cmr> j = {50, }, + l = { ,50}, +%<bch> o = {50,50}, +%<bch> q = { 0, }, +%<cmr> r = { , 0}, + t = {50,50}, + y = {50,50}, + } + +%</cmr|bch> %<*pmn> \SetProtrusion [ name = pmnx-sc, @@ -9614,10 +10370,10 @@ In either case, please send a report to <w.m.l@gmx.net>. % %\subsubsection{\texttt{textcomp}} % -% Finally the \tsI\ encoding. +% Finally the <TS1> encoding. % Still quite incomplete for Times and especially Palatino. Anybody? %\changes{v1.2}{2004/09/28}{add settings for Adobe Garamond and -% Computer Modern Roman in \tsI\ encoding} +% Computer Modern Roman in <TS1> encoding} % \begin{macrocode} \SetProtrusion %<m-t> [ name = textcomp ] @@ -9627,6 +10383,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> [ name = pmn-textcomp ] %<ppl> [ name = ppl-textcomp ] %<ptm> [ name = ptm-textcomp ] +%<ugm> [ name = ugm-textcomp ] %<m-t> { encoding = TS1 } %<!m-t> { encoding = TS1, %<bch> family = bch } @@ -9635,18 +10392,22 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> family = {pmnx,pmnj} } %<ppl> family = {ppl,pplx,pplj} } %<ptm> family = {ptm,ptmx,ptmj} } +%<ugm> family = ugm } { %<cmr> \textquotestraightbase = {300,300}, %<pad|pmn> \textquotestraightbase = {400,400}, %<cmr|pmn> \textquotestraightdblbase = {300,300}, %<pad> \textquotestraightdblbase = {400,400}, -%<bch|cmr|pad|pmn> \texttwelveudash = {200,200}, +%<bch|cmr|pad|pmn|ugm> \texttwelveudash = {200,200}, %<bch|cmr|pad|pmn> \textthreequartersemdash = {150,150}, +%<ugm> \textthreequartersemdash = {200,200}, %<cmr|pmn> \textquotesingle = {300,400}, %<pad> \textquotesingle = {400,500}, %<ptm> \textquotesingle = {500,500}, +%<ugm> \textquotesingle = {300,500}, %<bch|cmr|pmn> \textasteriskcentered = {200,300}, %<pad> \textasteriskcentered = {300,300}, +%<ugm> \textasteriskcentered = {100,200}, %<pmn> \textfractionsolidus = {-200,-200}, %<cmr> \textoneoldstyle = {100,100}, %<pmn> \textoneoldstyle = { , 50}, @@ -9659,6 +10420,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> \textrangle = { ,400}, %<m-t|bch|pmn|ptm> \textminus = {200,200}, %<cmr|pad|ppl> \textminus = {300,300}, +%<ugm> \textminus = {250,300}, %<bch|pad|pmn> \textlbrackdbl = {100, }, %<bch|pad|pmn> \textrbrackdbl = { ,100}, %<pmn> \textasciigrave = {200,500}, @@ -9667,19 +10429,21 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pmn> \textasciicaron = {300,400}, %<pmn> \textacutedbl = {200,300}, %<pmn> \textgravedbl = {150,300}, -%<bch|pmn> \textdagger = { 80, 80}, +%<bch|pmn|ugm> \textdagger = { 80, 80}, %<cmr|pad> \textdagger = {100,100}, %<ptm> \textdagger = {150,150}, %<cmr|pad|pmn> \textdaggerdbl = { 80, 80}, %<ptm> \textdaggerdbl = {100,100}, %<bch> \textbardbl = {100,100}, +%<ugm> \textbardbl = {150,150}, %<bch> \textbullet = {200,200}, %<cmr|pad|pmn> \textbullet = { ,100}, %<ptm> \textbullet = {150,150}, +%<ugm> \textbullet = { 50,100}, %<bch|cmr|pmn> \textcelsius = { 50, }, %<pad> \textcelsius = { 80, }, %<bch> \textflorin = { 50, 50}, -%<pad> \textflorin = { ,100}, +%<pad|ugm> \textflorin = { ,100}, %<pmn> \textflorin = { 50,100}, %<ptm> \textflorin = { 50, 70}, %<cmr> \textcolonmonetary = { , 50}, @@ -9690,18 +10454,21 @@ In either case, please send a report to <w.m.l@gmx.net>. %<bch> \texttrademark = {150,150}, %<cmr|ppl> \texttrademark = {200,200}, %<pmn> \texttrademark = { 50, 50}, -%<bch> \textcent = { 50, }, +%<ugm> \texttrademark = {100,150}, +%<bch|ugm> \textcent = { 50, }, %<ptm> \textcent = {100,100}, %<bch> \textsterling = { 50, }, +%<ugm> \textsterling = { , 50}, %<bch> \textbrokenbar = {200,200}, +%<ugm> \textbrokenbar = {200,300}, %<pmn> \textasciidieresis = {300,400}, -%<m-t|bch|cmr|pad|ptm> \textcopyright = {100,100}, +%<m-t|bch|cmr|pad|ptm|ugm> \textcopyright = {100,100}, %<pmn> \textcopyright = {100,150}, %<ppl> \textcopyright = {200,200}, -%<bch|cmr> \textordfeminine = {100,200}, +%<bch|cmr|ugm> \textordfeminine = {100,200}, %<pad|pmn> \textordfeminine = {200,200}, -%<bch|cmr|pad|pmn> \textlnot = {200, }, -%<m-t|bch|cmr|pad|ptm> \textregistered = {100,100}, +%<bch|cmr|pad|pmn|ugm> \textlnot = {200, }, +%<m-t|bch|cmr|pad|ptm|ugm> \textregistered = {100,100}, %<pmn> \textregistered = { 50,150}, %<ppl> \textregistered = {200,200}, %<pmn> \textasciimacron = {150,200}, @@ -9709,25 +10476,27 @@ In either case, please send a report to <w.m.l@gmx.net>. %<bch> \textdegree = {150,200}, %<cmr|pad> \textdegree = {400,400}, %<pmn> \textdegree = {150,400}, -%<bch|cmr|pad|pmn> \textpm = {150,200}, +%<ugm> \textdegree = {200,200}, +%<bch|cmr|pad|pmn|ugm> \textpm = {150,200}, %<ptm> \textpm = { 50, 80}, -%<bch> \texttwosuperior = {100,200}, +%<bch|ugm> \texttwosuperior = {100,200}, %<cmr> \texttwosuperior = { 50,100}, %<pad|pmn> \texttwosuperior = {200,200}, %<ptm> \texttwosuperior = { 50, 50}, -%<bch> \textthreesuperior = {100,200}, +%<bch|ugm> \textthreesuperior = {100,200}, %<cmr> \textthreesuperior = { 50,100}, %<pad|pmn> \textthreesuperior = {200,200}, %<ptm> \textthreesuperior = { 50, 50}, %<pmn> \textasciiacute = {300,400}, -%<bch> \textmu = { ,100}, -%<bch|pad|pmn> \textparagraph = { ,100}, +%<bch|ugm> \textmu = { ,100}, +%<bch|pad|pmn> \textparagraph = { ,100}, %<bch|cmr|pad|pmn> \textperiodcentered = {300,400}, %<ptm> \textperiodcentered = {300,300}, -%<bch> \textonesuperior = {200,300}, +%<ugm> \textperiodcentered = {200,500}, +%<bch|ugm> \textonesuperior = {200,300}, %<cmr|pad|pmn> \textonesuperior = {200,200}, %<ptm> \textonesuperior = {100,100}, -%<bch|pad|pmn> \textordmasculine = {200,200}, +%<bch|pad|pmn|ugm> \textordmasculine = {200,200}, %<cmr> \textordmasculine = {100,200}, %<bch|cmr|pmn> \texteuro = {100, }, %<pad> \texteuro = { 50,100}, @@ -9735,19 +10504,22 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> \texttimes = {150,250}, %<pad> \texttimes = {100,150}, %<pmn> \texttimes = { 70,100}, +%<ugm> \texttimes = {200,300}, %<bch|pad|pmn> \textdiv = {150,200}, %<cmr> \textdiv = {150,250}, %<ptm> \textdiv = { 50,100}, +%<ugm> \textdiv = {200,300}, %<ptm> \textperthousand = { ,50}, +%<ugm> \textsection = { ,100}, +%<ugm> \textonehalf = { 50,100}, +%<ugm> \textonequarter = { 50,100}, +%<ugm> \textthreequarters = { 50,100}, +%<ugm> \textsurd = { ,100}, % \end{macrocode} % All remaining characters can be found in the source. %\iffalse %^^A ... namely, here: -% \textsection = { , }, % \textyen = { , }, -% \textonehalf = { , }, -% \textonequarter = { , }, -% \textthreequarters = { , }, % \texttwooldstyle = { , }, % \textfiveoldstyle = { , }, % \textsixoldstyle = { , }, @@ -9792,21 +10564,23 @@ In either case, please send a report to <w.m.l@gmx.net>. % \textcopyleft = { , }, % \textcircledP = { , }, % \textreferencemark = { , }, -% \textsurd = { , }, %\fi % \begin{macrocode} } -%<*cmr|pad|pmn> +%<*cmr|pad|pmn|ugm> \SetProtrusion %<cmr> [ name = cmr-textcomp-it ] %<pad> [ name = pad-textcomp-it ] %<pmn> [ name = pmn-textcomp-it ] +%<ugm> [ name = ugm-textcomp-it ] { encoding = TS1, %<cmr> family = cmr, %<pad> family = {pad,padx,padj}, %<pmn> family = {pmnx,pmnj}, - shape = {it,sl} } +%<ugm> family = ugm, +%<!ugm> shape = {it,sl} } +%<ugm> shape = it } { %<cmr> \textquotestraightbase = {300,600}, %<pad|pmn> \textquotestraightbase = {400,400}, @@ -9814,13 +10588,16 @@ In either case, please send a report to <w.m.l@gmx.net>. %<pad> \textquotestraightdblbase = {300,400}, %<pmn> \textquotestraightdblbase = {300,300}, \texttwelveudash = {200,200}, - \textthreequartersemdash = {150,150}, +%<cmr|pad|pmn> \textthreequartersemdash = {150,150}, +%<ugm> \textthreequartersemdash = {200,200}, %<cmr> \textquotesingle = {600,300}, %<pad> \textquotesingle = {800,100}, %<pmn> \textquotesingle = {300,200}, +%<ugm> \textquotesingle = {500,500}, %<cmr> \textasteriskcentered = {300,200}, %<pad> \textasteriskcentered = {500,100}, %<pmn> \textasteriskcentered = {200,300}, +%<ugm> \textasteriskcentered = {300,150}, %<pmn> \textfractionsolidus = {-200,-200}, %<cmr> \textoneoldstyle = {100, 50}, %<pad> \textoneoldstyle = {100, }, @@ -9838,10 +10615,11 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> \textrangle = { ,400}, %<cmr|pad> \textminus = {300,300}, %<pmn> \textminus = {200,200}, +%<ugm> \textminus = {250,300}, %<pad|pmn> \textlbrackdbl = {100, }, %<pad|pmn> \textrbrackdbl = { ,100}, %<pmn> \textasciigrave = {300,300}, - \texttildelow = {200,250}, +%<cmr|pad|pmn> \texttildelow = {200,250}, %<pmn> \textasciibreve = {300,300}, %<pmn> \textasciicaron = {300,300}, %<pmn> \textacutedbl = {200,300}, @@ -9849,65 +10627,89 @@ In either case, please send a report to <w.m.l@gmx.net>. %<cmr> \textdagger = {100,100}, %<pad> \textdagger = {200,100}, %<pmn> \textdagger = { 80, 50}, +%<ugm> \textdagger = { 80, 80}, %<cmr|pad> \textdaggerdbl = { 80, 80}, %<pmn> \textdaggerdbl = { 80, 50}, +%<ugm> \textbardbl = {150,150}, %<cmr> \textbullet = {200,100}, %<pad> \textbullet = {300, }, %<pmn> \textbullet = { 30, 70}, +%<ugm> \textbullet = { 50,100}, %<cmr> \textcelsius = {100, }, %<pad> \textcelsius = {200, }, %<pmn> \textcelsius = { 50,-50}, %<pad> \textflorin = {100, }, %<pmn> \textflorin = { 50,100}, +%<ugm> \textflorin = { ,100}, %<cmr> \textcolonmonetary = {150, }, %<pad> \textcolonmonetary = {100, }, %<pmn> \textcolonmonetary = { 50,-50}, %<cmr|pad> \texttrademark = {200, }, %<pmn> \texttrademark = { 50,100}, +%<ugm> \texttrademark = {150, 50}, +%<ugm> \textcent = { 50, }, +%<ugm> \textsterling = { , 50}, +%<ugm> \textbrokenbar = {200,300}, %<pmn> \textasciidieresis = {300,200}, %<cmr> \textcopyright = {100, }, %<pad> \textcopyright = {200,100}, %<pmn> \textcopyright = {100,150}, +%<ugm> \textcopyright = {300, }, %<cmr> \textordfeminine = {100,100}, %<pmn> \textordfeminine = {200,200}, +%<ugm> \textordfeminine = {100,200}, %<cmr|pad> \textlnot = {300, }, -%<pmn> \textlnot = {200, }, +%<pmn|ugm> \textlnot = {200, }, %<cmr> \textregistered = {100, }, %<pad> \textregistered = {200,100}, %<pmn> \textregistered = { 50,150}, +%<ugm> \textregistered = {300, }, %<pmn> \textasciimacron = {150,200}, %<cmr|pad> \textdegree = {500,100}, %<pmn> \textdegree = {150,150}, +%<ugm> \textdegree = {300,200}, %<cmr> \textpm = {150,100}, %<pad> \textpm = {200,150}, -%<pmn> \textpm = {150,200}, +%<pmn|ugm> \textpm = {150,200}, %<cmr> \textonesuperior = {400, }, %<pad> \textonesuperior = {300,100}, %<pmn> \textonesuperior = {200,100}, +%<ugm> \textonesuperior = {300,300}, %<cmr> \texttwosuperior = {400, }, %<pad> \texttwosuperior = {300, }, %<pmn> \texttwosuperior = {200,100}, +%<ugm> \texttwosuperior = {300,200}, %<cmr> \textthreesuperior = {400, }, %<pad> \textthreesuperior = {300, }, %<pmn> \textthreesuperior = {200,100}, +%<ugm> \textthreesuperior = {300,200}, +%<ugm> \textmu = { ,100}, %<pmn> \textasciiacute = {300,200}, %<cmr> \textparagraph = {200, }, %<pmn> \textparagraph = { ,100}, %<cmr> \textperiodcentered = {500,500}, -%<pad|pmn> \textperiodcentered = {300,400}, +%<pad|pmn|ugm> \textperiodcentered = {300,400}, %<cmr> \textordmasculine = {100,100}, %<pmn> \textordmasculine = {200,200}, +%<ugm> \textordmasculine = {300,200}, %<cmr> \texteuro = {200, }, %<pad> \texteuro = {100, }, %<pmn> \texteuro = {100,-50}, %<cmr> \texttimes = {200,200}, %<pad> \texttimes = {200,100}, %<pmn> \texttimes = { 70,100}, +%<ugm> \texttimes = {200,300}, %<cmr|pad> \textdiv = {200,200}, %<pmn> \textdiv = {150,200}, +%<ugm> \textdiv = {200,300}, +%<ugm> \textsection = { ,200}, +%<ugm> \textonehalf = { 50,100}, +%<ugm> \textonequarter = { 50,100}, +%<ugm> \textthreequarters = { 50,100}, +%<ugm> \textsurd = { ,100}, } -%</cmr|pad|pmn> +%</cmr|pad|pmn|ugm> % \end{macrocode} % %\subsubsection{Math} @@ -9935,7 +10737,7 @@ In either case, please send a report to <w.m.l@gmx.net>. %\DeclareSymbolFont{letters} {OML}{cmm} {m}{it} %\SetSymbolFont{letters} {bold}{OML}{cmm} {b}{it} %\end{verbatim} -%\changes{v1.6}{2004/12/26}{tune CMR math letters (OML encoding)} +%\changes{v1.6}{2004/12/26}{tune <CMR> math letters (<OML> encoding)} % \begin{macrocode} %<*cmr> \SetProtrusion @@ -9943,7 +10745,7 @@ In either case, please send a report to <w.m.l@gmx.net>. { encoding = OML, family = cmm, series = {m,b}, - shape = it } + shape = it } { A = {100, 50}, % \mathnormal B = { 50, }, @@ -10179,11 +10981,11 @@ In either case, please send a report to <w.m.l@gmx.net>. %\begin{verbatim} %\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n} %\end{verbatim} -% \begin{macrocode} +%\iffalse %\SetProtrusion % [ name = cmr-math-largesymbols ] % { encoding = OMX, -% family = {cmex,cmr} } +% family = cmex } % { % "00 % ( % "01 % ) @@ -10234,12 +11036,17 @@ In either case, please send a report to <w.m.l@gmx.net>. % "7E % \Uparrow % "7F % \Downarrow % } +%\fi +% \begin{macrocode} %</cmr> -%</!cfg-u> +%</cfg-t> % \end{macrocode} % -% \subsubsection{\ams\ fonts} +% \subsubsection{<AMS> fonts} % +% Settings for the <AMS> math fonts. +%\changes{v1.8}{2005/06/01}{settings for <AMS> math fonts} +%\changes{v1.9d}{2006/02/04}{tweak <AMS> settings} % \begin{macrocode} %<*cfg-u> % \end{macrocode} @@ -10251,7 +11058,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} %<*msa> \SetProtrusion - [ name = AMSa ] + [ name = AMS-a ] { encoding = U, family = msa } { @@ -10265,14 +11072,14 @@ In either case, please send a report to <w.m.l@gmx.net>. "07 = { 50, 50}, % \blacklozenge "08 = { 50, 50}, % \circlearrowright "09 = { 50, 50}, % \circlearrowleft - "0A = { 50, 50}, % \rightleftharpoons - "0B = { 50, 50}, % \leftrightharpoons + "0A = {100,100}, % \rightleftharpoons + "0B = {100,100}, % \leftrightharpoons % "0C = { , }, % \boxminus - "0D = {-50,150}, % \Vdash - "0E = {-50,150}, % \Vvdash + "0D = {-50,200}, % \Vdash + "0E = {-50,200}, % \Vvdash "0F = {-70,150}, % \vDash - "10 = {100,100}, % \twoheadrightarrow - "11 = { 50,150}, % \twoheadleftarrow + "10 = {100,150}, % \twoheadrightarrow + "11 = {100,150}, % \twoheadleftarrow "12 = { 50,100}, % \leftleftarrows "13 = { 50, 80}, % \rightrightarrows "14 = {120,120}, % \upuparrows @@ -10281,25 +11088,25 @@ In either case, please send a report to <w.m.l@gmx.net>. "17 = {200,200}, % \downharpoonright "18 = {200,200}, % \upharpoonleft "19 = {200,200}, % \downharpoonleft - "1A = { 50, 80}, % \rightarrowtail - "1B = { 50, 80}, % \leftarrowtail + "1A = { 80,100}, % \rightarrowtail + "1B = { 80,100}, % \leftarrowtail "1C = { 50, 50}, % \leftrightarrows "1D = { 50, 50}, % \rightleftarrows - "1E = {150, }, % \Lsh - "1F = { ,150}, % \Rsh - "20 = { 50,100}, % \rightsquigarrow - "21 = { 50, 50}, % \leftrightsquigarrow - "22 = { 50, 50}, % \looparrowleft - "23 = { 50, 50}, % \looparrowright - "24 = { , 50}, % \circeq + "1E = {250, }, % \Lsh + "1F = { ,250}, % \Rsh + "20 = {100,100}, % \rightsquigarrow + "21 = {100,100}, % \leftrightsquigarrow + "22 = {100, 50}, % \looparrowleft + "23 = { 50,100}, % \looparrowright + "24 = { 50, 80}, % \circeq "25 = { ,100}, % \succsim "26 = { ,100}, % \gtrsim "27 = { ,100}, % \gtrapprox - "28 = { 50, 50}, % \multimap + "28 = {150, 50}, % \multimap % "29 = { , }, % \therefore % "2A = { , }, % \because - "2B = { 50, 50}, % \doteqdot - "2C = { 50, 50}, % \triangleq + "2B = {100,150}, % \doteqdot + "2C = {100,150}, % \triangleq "2D = {100, 50}, % \precsim "2E = {100, 50}, % \lesssim "2F = { 50, 50}, % \lessapprox @@ -10312,7 +11119,7 @@ In either case, please send a report to <w.m.l@gmx.net>. "36 = { 50, }, % \leqslant % "37 = { , }, % \lessgtr "38 = { , 50}, % \backprime - "39 = {200,200}, % \dabar@ : the dash bar in \dash(left,right)arrow + "39 = {250,250}, % \dabar@ : the dash bar in \dash(left,right)arrow % "3A = { , }, % \risingdotseq % "3B = { , }, % \fallingdotseq "3C = { 50,100}, % \succcurlyeq @@ -10343,7 +11150,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % "55 = { , }, % \yen "56 = { ,150}, % \Rrightarrow "57 = {150, }, % \Lleftarrow - "58 = {100,200}, % \checkmark + "58 = {100,300}, % \checkmark % "59 = { , }, % \veebar % "5A = { , }, % \barwedge % "5B = { , }, % \doublebarwedge @@ -10357,9 +11164,9 @@ In either case, please send a report to <w.m.l@gmx.net>. "63 = { , 50}, % \Supset % "64 = { , }, % \Cup % "65 = { , }, % \Cap - "66 = {100,100}, % \curlywedge - "67 = {100,100}, % \curlyvee - "68 = { 50,100}, % \leftthreetimes + "66 = {150,150}, % \curlywedge + "67 = {150,150}, % \curlyvee + "68 = { 50,150}, % \leftthreetimes "69 = {100, 50}, % \rightthreetimes % "6A = { , }, % \subseteqq % "6B = { , }, % \supseteqq @@ -10372,7 +11179,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % "72 = { , }, % \circledR % "73 = { , }, % \circledS % "74 = { , }, % \pitchfork - "75 = {100,150}, % \dotplus + "75 = {150,200}, % \dotplus "76 = { 50,100}, % \backsim % "77 = { , }, % \backsimeq "78 = { 50,100}, % \llcorner @@ -10396,7 +11203,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} %<*msb> \SetProtrusion - [ name = AMSb ] + [ name = AMS-b ] { encoding = U, family = msb } { @@ -10580,30 +11387,86 @@ In either case, please send a report to <w.m.l@gmx.net>. V = { 50, 50}, W = { 50, 50}, X = { 50, 50}, + Y = { 50, }, Z = { 50,100}, } %</eus> %</cfg-u> -%<*beta> +% \end{macrocode} +%\subsubsection{Euro symbols} +%\changes{v1.9d}{2006/05/04}{settings for Euro symbols (Adobe, <ITC>, Marvosym)} +% Settings for various Euro symbols (Adobe Euro fonts (packages \pkg{eurosans}, +% \pkg{europs}), <ITC> Euro fonts (package \pkg{euroitc}) and \pkg{marvosym}). +% \begin{macrocode} +%<*cfg-e> +\SetProtrusion +%<zpeu|euroitc> { encoding = U, +%<mvs> { encoding = OT1, +%<zpeu> family = zpeu } +%<euroitc> family = {euroitc,euroitcs} } +%<mvs> family = mvs } + { +%<zpeu> E = {50, } +%<euroitc> E = {100,50} +%<mvs> 164 = {50,50} % \EUR +%<mvs> 068 = {50,-100}, % \EURdig + } + +%<*zpeu|euroitc> +\SetProtrusion +%<zpeu|euroitc> { encoding = U, +%<zpeu> family = zpeu, +%<euroitc> family = {euroitc,euroitcs}, + shape = it* } + { +%<zpeu> E = {100,-50} +%<euroitc> E = {100,} + } + +%</zpeu|euroitc> +%<*zpeu> +\SetProtrusion + { encoding = U, + family = {zpeus,eurosans} } + { + E = {100,50} + } + +\SetProtrusion + { encoding = U, + family = {zpeus,eurosans}, + shape = it* } + { + E = {200, } + } + +%</zpeu> +%</cfg-e> % \end{macrocode} % -% \subsection{Interword Spacing}\label{sub:conf-spacing} +%\subsection{Interword Spacing}\label{sub:conf-spacing} +%\GeneralChanges{Spacing} % % Default unit is space. % % \begin{macrocode} +%<*beta> +%<*m-t> %%% ---------------------------------------------------------------------- %%% INTERWORD SPACING SETTINGS \SetExtraSpacing [ name = default ] - { encoding = {OT1,T1,LY1,OT4,T5} } + { encoding = {OT1,T1,LY1,OT4,QX,T5} } { % \end{macrocode} % These settings are only a first approximation. The following reasoning is from % a mail from Ulrich Dirr. ^^A private mail, 14/06/2005 % I do not claim to have coped with the task. +% (\dots\ In fact, I~think these settings are wrong. They lead to more overfull +% boxes than without spacing adjustment. Needs to be fixed.) +%\todo{fix spacing settings} % %\begin{quote} % `The idea is -- analog to the tables for expansion and protrusion -- to @@ -10637,7 +11500,7 @@ In either case, please send a report to <w.m.l@gmx.net>. l = { ,-200,200}, t = { ,-200,200}, % \end{macrocode} -% \item before of after lowercase characters with x-heigth plus descender +% \item before of after lowercase characters with x-height plus descender % with additional optical space, \eg, `v', or `w' % \begin{macrocode} c = { ,-100,100}, @@ -10648,7 +11511,7 @@ In either case, please send a report to <w.m.l@gmx.net>. x = { ,-100,100}, y = { ,-100,100}, % ? % \end{macrocode} -% \item before of after lowercase characters with x-heigth plus descender +% \item before of after lowercase characters with x-height plus descender % without additional optical space % \begin{macrocode} i = { , 50, -50}, @@ -10682,6 +11545,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \item Should the first parameter also be used? (Probably.) %\end{itemize} % +% \subsubsection{Nonfrenchspacing} % The following settings simulate \cmd{\nonfrenchspacing} (since space factors % will be ignored when spacing adjustment is in effect). They may be used for % English contexts. @@ -10691,18 +11555,18 @@ In either case, please send a report to <w.m.l@gmx.net>. % `If the space factor \textit{f} is different from 1000, the interword glue is % computed as follows: Take the normal space glue for the current font, and % add the extra space if \textit{f}\,\textgeq\,2000. -% [...] +% [...] % Then the stretch component is multiplied by \textit{f}\,/\,1000, while the % shrink component is multiplied by 1000\,/\,\textit{f}.' %\end{quote} -% The `extra space' (\cmd{\fontdimen}7) for Computer Modern Roman is a third -% of \cmd{\fontdimen}\,2, \ie, 333. +% The `extra space' (\fontdim7) for Computer Modern Roman is a third of +% \fontdim2, \ie, 333. % \begin{macrocode} \SetExtraSpacing [ name = nonfrench-cmr, load = default, context = nonfrench ] - { encoding = {OT1,T1,LY1,OT4,T5}, + { encoding = {OT1,T1,LY1,OT4,QX,T5}, family = cmr } { % \end{macrocode} @@ -10752,14 +11616,14 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} % \pkg{fontinst}, however, which is also used to create the \pkg{PSNFSS} font -% metrics, sets it to 240 by default. Therefore, the fallback settings use this -% value for the first component. +% metrics, sets \fontdim7 to 240 by default. Therefore, the fallback settings +% use this value for the first component. % \begin{macrocode} \SetExtraSpacing [ name = nonfrench-default, load = default, context = nonfrench ] - { encoding = {OT1,T1,LY1,OT4,T5} } + { encoding = {OT1,T1,LY1,OT4,QX,T5} } { . = {240,2000,-667}, ? = {240,2000,-667}, @@ -10772,6 +11636,7 @@ In either case, please send a report to <w.m.l@gmx.net>. % \end{macrocode} % % \subsection{Additional Kerning} +%\GeneralChanges{Kerning} % % Default unit is 1em. % @@ -10784,9 +11649,13 @@ In either case, please send a report to <w.m.l@gmx.net>. % \begin{macrocode} \SetExtraKerning [ name = empty ] - { encoding = {OT1,T1,LY1,OT4,T5,TS1} } + { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1} } { } +% \end{macrocode} +%\subsubsection{French} +% For the French context. +% \begin{macrocode} \SetExtraKerning [ name = french-default, context = french, @@ -10800,7 +11669,7 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} -% This has the disadvantage that the word following a left guillemot will not be +% This has the disadvantage that the word following a left guillemet will not be % hyphenated. This might be fixed in \pdftex. % \begin{macrocode} \SetExtraKerning @@ -10814,6 +11683,10 @@ In either case, please send a report to <w.m.l@gmx.net>. \guillemotright = {800, }, } +% \end{macrocode} +%\subsubsection{Turkish} +% And for Turkish. +% \begin{macrocode} \SetExtraKerning [ name = turkish, context = turkish, @@ -10826,21 +11699,34 @@ In either case, please send a report to <w.m.l@gmx.net>. } % \end{macrocode} +%\subsubsection{Letterspacing} % The settings with the `|letterspacing|' context will be loaded whenever the % command \cs{textls} resp. \cs{lsstyle} are used. % \begin{macrocode} -%%% The settings for the commands \lsstyle and \textls. +%%% The following settings with `context=letterspacing' +%%% will be loaded by \lsstyle and \textls: + +% \end{macrocode} +% No additional kerning will be applied in math mode, but we don't want a +% confusing error messages (\eg, when writing \textls{\LaTeX}). +% \begin{macrocode} \SetExtraKerning - [ name = letterspacing-default, + [ name = letterspacing-all, context = letterspacing, - unit = 1em, preset = {1000,1000} ] - { encoding = {OT1,OT4} } - { + { encoding = {U,OML,OMS,OMX} } + { } + % \end{macrocode} -% The full stop and quotation marks should be spaced out less. +% The full stop should be spaced out less. % Numbers are not spaced out, according to \pkg{soul}. % \begin{macrocode} +\SetExtraKerning + [ name = letterspacing-text, + context = letterspacing, + preset = {1000,1000} ] + { } + { . = {0, }, 0 = {0,0}, 1 = {0,0}, @@ -10852,27 +11738,41 @@ In either case, please send a report to <w.m.l@gmx.net>. 7 = {0,0}, 8 = {0,0}, 9 = {0,0}, + } + +% \end{macrocode} +% Also, quotation marks receive only half the kerning. +% \begin{macrocode} +\SetExtraKerning + [ name = letterspacing-OT1, + context = letterspacing, + load = letterspacing-text, + preset = {1000,1000} ] + { encoding = {OT1,OT4,QX} } + { \textquoteleft = {0,0}, \textquoteright = {0,0}, \textquotedblleft = {0,0}, \textquotedblright = {0,0}, } \SetExtraKerning [ name = letterspacing-T1, - load = letterspacing-default, context = letterspacing, - unit = 1em, + load = letterspacing-text, preset = {1000,1000} ] { encoding = {T1,LY1,T5} } { + \textquoteleft = {0,0}, \textquoteright = {0,0}, + \textquotedblleft = {0,0}, \textquotedblright = {0,0}, \quotesinglbase = {0,0}, \quotedblbase = {0,0}, \guilsinglleft = {0,0}, \guilsinglright = {0,0}, \guillemotleft = {0,0}, \guillemotright = {0,0}, } +%</m-t> %</beta> %</config> % \end{macrocode} -%\GeneralChanges! +%\GeneralChanges* % %\section{Auxiliary File for Micro Fine Tuning} % @@ -10881,10 +11781,10 @@ In either case, please send a report to <w.m.l@gmx.net>. %<*test> \documentclass{article} -%% Here you can set the font you want to test, using +%% Here you can specify the font you want to test, using %% the commands \fontfamily, \fontseries, and \fontshape. %% Make sure to end all lines with a comment character! -\newcommand*{\TestFont}{% +\newcommand*\TestFont{% \fontfamily{ppl}% %% \fontseries{b}% %% \fontshape{it}% sc, sl @@ -10892,13 +11792,13 @@ In either case, please send a report to <w.m.l@gmx.net>. \usepackage{ifthen} \usepackage[T1]{fontenc} -%%\usepackage[latin1]{inputenc} +\usepackage[latin1]{inputenc} \usepackage[verbose,expansion=alltext,stretch=50]{microtype} \pagestyle{empty} \setlength{\parindent}{0pt} -\newcommand*{\crulefill}{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill} -\newcommand*{\testprotrusion}[2][]{% +\newcommand*\crulefill{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill} +\newcommand*\testprotrusion[2][]{% \ifthenelse{\equal{#1}{r}}{}{#2}% lorem ipsum dolor sit amet, \ifthenelse{\equal{#1}{r}}{\crulefill}{\leftarrowfill} #2 @@ -10912,7 +11812,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \selectfont Here is the beginning of a line, \dotfill and here is its end}\linebreak } -\newcommand*{\showTestFont}{\expandafter\stripprefix\meaning\TestFont} +\newcommand*\showTestFont{\expandafter\stripprefix\meaning\TestFont} \def\stripprefix#1>{} \newcount\charcount \begin{document} @@ -10969,26 +11869,24 @@ In either case, please send a report to <w.m.l@gmx.net>. \testprotrusion{\guillemotleft} \testprotrusion{\guillemotright} -\bigskip +\newpage The following displays the current font stretched by 5\%, normal, and shrunk by 5\%: -\microtypesetup{expansion=true} - \bigskip \newlength{\MTln} -\newcommand*{\teststring} +\newcommand*\teststring {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789} \settowidth{\MTln}{\teststring} +\microtypesetup{expansion=true} \parbox{1.05\MTln}{\teststring\linebreak\\ \teststring}\par\bigskip \parbox{0.95\MTln}{\teststring} + \end{document} %</test> % \end{macrocode} -% -% ^^A ------------------------------------------------------------------------- % Needless to say that things may always be improved. For suggestions, mail to % \mailtoRS. % @@ -11010,7 +11908,7 @@ normal, and shrunk by 5\%: % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% \CheckSum{7591} +% \CheckSum{7932} % % \Finale % diff --git a/Master/texmf-dist/source/latex/microtype/microtype.ins b/Master/texmf-dist/source/latex/microtype/microtype.ins index 0c700a5c05c..a1c1395231d 100644 --- a/Master/texmf-dist/source/latex/microtype/microtype.ins +++ b/Master/texmf-dist/source/latex/microtype/microtype.ins @@ -1,20 +1,19 @@ % -*- TeX:UK -*- -% $Id: microtype.ins,v 1.8 2005-10-28 16:22:21+02 schlicht Exp schlicht $ +% $Id: microtype.ins,v 1.11 2006-05-05 19:20:39+02 schlicht Exp schlicht $ % ----------------------------------------------------------------------- \newif\ifbeta %\betatrue \input docstrip \keepsilent \askonceonly - \preamble ----------------------------------------------------------------------- The `microtype' package An interface to the micro-typographic extensions of pdfTeX - Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> + Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> -This work may be distributed and/or modified under the conditions of +This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -34,66 +33,72 @@ derived file microtype.sty. {\catcode`\^^M=13 % \gdef\declarepreambleX#1#2 \endpreamble{\endgroup% - \def^^M{^^J\MetaPrefix\space}% - \edef#1{\firstpreamblepart\checkeoln#2\empty ------------------------------------------------------------------------^^M}}} - + \def^^M{^^J\MetaPrefix\space}% + \edef#1{\firstpreamblepart\checkeoln#2\lastpreamblepart\empty}}} +\def\defaultlastpreamblepart{^^J\MetaPrefix\space +----------------------------------------------------------------------- +^^J\MetaPrefix} \let\firstpreamblepart\defaultpreamble +\let\lastpreamblepart \defaultlastpreamblepart \declarepreamble\cfgpreamble - This is the main configuration file for the `microtype' package. - It contains settings for font expansion and character protrusion. - Please consult the documentation for details. - - You may customize these settings here, or in a different file. If - you think you have found improvements to the settings, please tell - me about them. - - When modifying this file, also change the identification line below. + This is the main configuration file for the `microtype' package. + It contains settings for font expansion and character protrusion, + as well as character inheritance and font set declarations. + Please consult the documentation for details.^^M + You may customize these settings here, or in a different file. If + you think you have found improvements to the settings, please let + me know.^^M + When modifying this file, also change the identification line below. \endpreamble -% --------------------------------------------------------------------- \declarepreamble\fontpreamble - This is a font-specific configuration file for the `microtype' - package. It contains settings for font expansion and character - protrusion. Please consult the documentation for details. - - If you think you have found improvements to these settings, please - tell me about them. - - When modifying this file, also change the identification line below. + This is a font-specific configuration file for the `microtype' + package. It contains settings for font expansion and character + protrusion. Please consult the documentation for details.^^M + If you think you have found improvements to these settings, please + let me know.^^M + When modifying this file, also change the identification line below. \endpreamble -% --------------------------------------------------------------------- \declarepreamble\testpreamble - This file might be useful to test protrusion settings for a font. - You can do whatever you want with it. + This file might be useful to test protrusion settings for a font. + You can do whatever you want with it. \endpreamble -% --------------------------------------------------------------------- \let\firstpreamblepart\fontpreamble +\let\lastpreamblepart \empty +\declarepreamble\contribpreamble^^M + These settings have been prepared by, and are copied with the + generous permission of: +\endpreamble +\let\firstpreamblepart\contribpreamble +\let\lastpreamblepart \defaultlastpreamblepart \declarepreamble\haraldpreamble - - These settings have been prepared by, and are copied with the - generous permission of, Harald Harders <h.harders{at}tu-bs.de>. - + Harald Harders <h.harders{at}tu-bs.de>.^^M \endpreamble -% --------------------------------------------------------------------- + +\def\makefile#1#2{\file{#1}{\from{microtype.dtx}{#2}}} +\def\makecfg#1#2{\makefile{mt-#2.cfg}{config,cfg-#1,#2}} \generate{ - \file{microtype.sty}{\from{microtype.dtx}{package\ifbeta,beta\fi}} - \usepreamble\cfgpreamble - \file{microtype.cfg}{\from{microtype.dtx}{config,m-t\ifbeta,beta\fi}} - \usepreamble\fontpreamble - \file{mt-bch.cfg}{\from{microtype.dtx}{config,bch}} - \file{mt-cmr.cfg}{\from{microtype.dtx}{config,cmr}} - \file{mt-pad.cfg}{\from{microtype.dtx}{config,pad}} - \file{mt-ppl.cfg}{\from{microtype.dtx}{config,ppl}} - \file{mt-ptm.cfg}{\from{microtype.dtx}{config,ptm}} - \file{mt-msa.cfg}{\from{microtype.dtx}{config,cfg-u,msa}} - \file{mt-msb.cfg}{\from{microtype.dtx}{config,cfg-u,msb}} - \file{mt-euf.cfg}{\from{microtype.dtx}{config,cfg-u,euf}} - \file{mt-eus.cfg}{\from{microtype.dtx}{config,cfg-u,eus}} - \usepreamble\haraldpreamble - \file{mt-pmn.cfg}{\from{microtype.dtx}{config,pmn}} - \usepreamble\testpreamble - \file{test-microtype.tex}{\from{microtype.dtx}{test}} + \makefile{microtype.sty}{package\ifbeta,beta\fi} + \usepreamble\cfgpreamble + \makefile{microtype.cfg}{config,cfg-t,m-t\ifbeta,beta\fi} + \usepreamble\fontpreamble + \makecfg{t}{bch} + \makecfg{t}{cmr} + \makecfg{t}{pad} + \makecfg{t}{ppl} + \makecfg{t}{ptm} + \makecfg{t}{ugm} + \makecfg{u}{msa} + \makecfg{u}{msb} + \makecfg{u}{euf} + \makecfg{u}{eus} + \makecfg{e}{zpeu} + \makecfg{e}{euroitc} + \makecfg{e}{mvs} + \usepreamble\haraldpreamble + \makecfg{t}{pmn} + \usepreamble\testpreamble + \makefile{test-microtype.tex}{test} } \obeyspaces diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.cfg b/Master/texmf-dist/tex/latex/microtype/microtype.cfg index e6b005186f2..ae5e4b57548 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.cfg +++ b/Master/texmf-dist/tex/latex/microtype/microtype.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,m-t') +%% microtype.dtx (with options: `config,cfg-t,m-t') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,19 +23,20 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is the main configuration file for the `microtype' package. -%% It contains settings for font expansion and character protrusion. -%% Please consult the documentation for details. +%% This is the main configuration file for the `microtype' package. +%% It contains settings for font expansion and character protrusion, +%% as well as character inheritance and font set declarations. +%% Please consult the documentation for details. %% -%% You may customize these settings here, or in a different file. If -%% you think you have found improvements to the settings, please tell -%% me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% You may customize these settings here, or in a different file. If +%% you think you have found improvements to the settings, please let +%% me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {microtype.cfg}[2005/08/16 v1.6 microtype main configuration file (RS)] + {microtype.cfg}[2006/04/20 v1.8 microtype main configuration file (RS)] %%% ---------------------------------------------------------------------- %%% FONT SETS @@ -44,22 +45,22 @@ { } \DeclareMicrotypeSet{allmath} - { encoding = {T1,LY1,OT1,OT4,T5,TS1,OML,OMS,U} } + { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1,OML,OMS,U} } \DeclareMicrotypeSet{alltext} - { encoding = {T1,LY1,OT1,OT4,T5,TS1} } + { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1} } \DeclareMicrotypeSet{basicmath} - { encoding = {T1,LY1,OT1,OT4,T5,OML,OMS}, + { encoding = {OT1,T1,LY1,OT4,QX,T5,OML,OMS}, family = {rm*,sf*}, - series = {m}, + series = {md*}, size = {normalsize,footnotesize,small,large} } \DeclareMicrotypeSet{basictext} - { encoding = {T1,LY1,OT1,OT4,T5}, + { encoding = {OT1,T1,LY1,OT4,QX,T5}, family = {rm*,sf*}, - series = {m}, + series = {md*}, size = {normalsize,footnotesize,small,large} } @@ -84,7 +85,11 @@ \DeclareMicrotypeAlias{qpl} {ppl} % qfonts/QuasiPalatino \DeclareMicrotypeAlias{txr} {ptm} % txfonts \DeclareMicrotypeAlias{qtm} {ptm} % qfonts/QuasiTimes - +\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter +\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond +\DeclareMicrotypeAlias{zpeus}{zpeu} % Adobe Euro sans -> serif +\DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif +\DeclareMicrotypeAlias{euroitcs}{euroitc} % ITC Euro sans -> serif %%% ---------------------------------------------------------------------- %%% CHARACTER INHERITANCE @@ -100,47 +105,47 @@ \DeclareCharacterInheritance { encoding = T1 } - { A = {\`A,\'A,\^A,\~A,\"A,\r{A},\k{A},\u{A}}, - a = {\`a,\'a,\^a,\~a,\"a,\r{a},\k{a},\u{a}}, - C = {\'C,\c{C},\v{C}}, - c = {\'c,\c{c},\v{c}}, - D = {\v{D},\DH}, - d = {\v{d},\dj}, - E = {\`E,\'E,\^E,\"E,\k{E},\v{E}}, - e = {\`e,\'e,\^e,\"e,\k{e},\v{e}}, + { A = {\`A,\'A,\^A,\~A,\"A,\r A,\k A,\u A}, + a = {\`a,\'a,\^a,\~a,\"a,\r a,\k a,\u a}, + C = {\'C,\c C,\v C}, + c = {\'c,\c c,\v c}, + D = {\v D,\DH}, + d = {\v d,\dj}, + E = {\`E,\'E,\^E,\"E,\k E,\v E}, + e = {\`e,\'e,\^e,\"e,\k e,\v e}, f = {027}, % ff - G = {\u{G}}, - g = {\u{g}}, + G = {\u G}, + g = {\u g}, I = {\`I,\'I,\^I,\"I,\.I}, i = {\`i,\'i,\^i,\"i,\i}, j = {\j}, - L = {\L,\'L,\v{L}}, - l = {\l,\'l,\v{l}}, - N = {\'N,\~N,\v{N}}, - n = {\'n,\~n,\v{n}}, - O = {\O,\`O,\'O,\^O,\~O,\"O,\H{O}}, - o = {\o,\`o,\'o,\^o,\~o,\"o,\H{o}}, - R = {\'R,\v{R}}, - r = {\'r,\v{r}}, - S = {\'S,\c{S},\v{S},\SS}, - s = {\'s,\c{s},\v{s}}, - T = {\c{T},\v{T}}, - t = {\c{t},\v{t}}, - U = {\`U,\'U,\^U,\"U,\H{U},\r{U}}, - u = {\`u,\'u,\^u,\"u,\H{u},\r{u}}, + L = {\L,\'L,\v L}, + l = {\l,\'l,\v l}, + N = {\'N,\~N,\v N}, + n = {\'n,\~n,\v n}, + O = {\O,\`O,\'O,\^O,\~O,\"O,\H O}, + o = {\o,\`o,\'o,\^o,\~o,\"o,\H o}, + R = {\'R,\v R}, + r = {\'r,\v r}, + S = {\'S,\c S,\v S,\SS}, + s = {\'s,\c s,\v s}, + T = {\c T,\v T}, + t = {\c t,\v t}, + U = {\`U,\'U,\^U,\"U,\H U,\r U}, + u = {\`u,\'u,\^u,\"u,\H u,\r u}, Y = {\'Y,\"Y}, y = {\'y,\"y}, - Z = {\'Z,\.Z,\v{Z}}, - z = {\'z,\.z,\v{z}}, + Z = {\'Z,\.Z,\v Z}, + z = {\'z,\.z,\v z}, - = {127}, } \DeclareCharacterInheritance { encoding = LY1 } - { A = {\`A,\'A,\^A,\~A,\"A,\r{A}}, - a = {\`a,\'a,\^a,\~a,\"a,\r{a}}, - C = {\c{C}}, - c = {\c{c}}, + { A = {\`A,\'A,\^A,\~A,\"A,\r A}, + a = {\`a,\'a,\^a,\~a,\"a,\r a}, + C = {\c C}, + c = {\c c}, D = {\DH}, E = {\`E,\'E,\^E,\"E}, e = {\`e,\'e,\^e,\"e}, @@ -153,24 +158,24 @@ n = {\~n}, O = {\`O,\'O,\^O,\~O,\"O,\O}, o = {\`o,\'o,\^o,\~o,\"o,\o}, - S = {\v{S}}, - s = {\v{s}}, + S = {\v S}, + s = {\v s}, U = {\`U,\'U,\^U,\"U}, u = {\`u,\'u,\^u,\"u}, Y = {\'Y,\"Y}, y = {\'y,\"y}, - Z = {\v{Z}}, - z = {\v{z}}, + Z = {\v Z}, + z = {\v z}, } \DeclareCharacterInheritance { encoding = OT4 } - { A = {\k{A}}, - a = {\k{a}}, + { A = {\k A}, + a = {\k a}, C = {\'C}, c = {\'c}, - E = {\k{E}}, - e = {\k{e}}, + E = {\k E}, + e = {\k e}, f = {011}, % ff i = {\i}, j = {\j}, @@ -187,33 +192,65 @@ } \DeclareCharacterInheritance + { encoding = QX } + { A = {\`A,\'A,\^A,\~A,\"A,\k A,\AA}, + a = {\`a,\'a,\^a,\~a,\"a,\k a,\aa}, + C = {\'C,\c C}, + c = {\'c,\c c}, + D = {\DH}, + E = {\`E,\'E,\^E,\"E,\k E}, + e = {\`e,\'e,\^e,\"e,\k e}, + f = {011}, % ff + I = {\`I,\'I,\^I,\"I,\k I}, + i = {\`i,\'i,\^i,\"i,\k i,\i}, + j = {\j}, + L = {\L}, + l = {\l}, + N = {\'N,\~N}, + n = {\'n,\~n}, + O = {\O,\`O,\'O,\^O,\~O,\"O}, + o = {\o,\`o,\'o,\^o,\~o,\"o}, + S = {\'S,\c S,\v S}, + s = {\'s,\c s,\v s}, + T = {\c T}, + t = {\c t}, + U = {\`U,\'U,\^U,\"U,\k U}, + u = {\`u,\'u,\^u,\"u,\k u}, + Y = {\'Y,\"Y}, + y = {\'y,\"y}, + Z = {\'Z,\.Z,\v Z}, + z = {\'z,\.z,\v z}, + . = \textellipsis + } + +\DeclareCharacterInheritance { encoding = T5 } - { A = {\`A,\'A,\~A,\h{A},\d{A},\^A,\u{A}, + { A = {\`A,\'A,\~A,\h A,\d A,\^A,\u A, \`\Acircumflex,\'\Acircumflex,\~\Acircumflex,\h\Acircumflex,\d\Acircumflex, \`\Abreve,\'\Abreve,\~\Abreve,\h\Abreve,\d\Abreve}, - a = {\`a,\'a,\~a,\h{a},\d{a},\^a,\u{a}, + a = {\`a,\'a,\~a,\h a,\d a,\^a,\u a, \`\acircumflex,\'\acircumflex,\~\acircumflex,\h\acircumflex,\d\acircumflex, \`\abreve,\'\abreve,\~\abreve,\h\abreve,\d\abreve}, D = {\DJ}, d = {\dj}, - E = {\`E,\'E,\~E,\h{E},\d{E},\^E, + E = {\`E,\'E,\~E,\h E,\d E,\^E, \`\Ecircumflex,\'\Ecircumflex,\~\Ecircumflex,\h\Ecircumflex,\d\Ecircumflex}, - e = {\`e,\'e,\~e,\h{e},\d{e},\^e, + e = {\`e,\'e,\~e,\h e,\d e,\^e, \`\ecircumflex,\'\ecircumflex,\~\ecircumflex,\h\ecircumflex,\d\ecircumflex}, - I = {\`I,\'I,\~I,\h{I},\d{I}}, - i = {\`i,\'i,\~i,\h{i},\d{i},\i}, - O = {\`O,\'O,\~O,\h{O},\d{O},\^O,\horn{O}, + I = {\`I,\'I,\~I,\h I,\d I}, + i = {\`i,\'i,\~i,\h i,\d i,\i}, + O = {\`O,\'O,\~O,\h O,\d O,\^O,\horn O, \`\Ocircumflex,\'\Ocircumflex,\~\Ocircumflex,\h\Ocircumflex,\d\Ocircumflex, \`\Ohorn,\'\Ohorn,\~\Ohorn,\h\Ohorn,\d\Ohorn}, - o = {\`o,\'o,\~o,\h{o},\d{o},\^o,\horn{o}, + o = {\`o,\'o,\~o,\h o,\d o,\^o,\horn o, \`\ocircumflex,\'\ocircumflex,\~\ocircumflex,\h\ocircumflex,\d\ocircumflex, \`\ohorn,\'\ohorn,\~\ohorn,\h\ohorn,\d\ohorn}, - U = {\`U,\'U,\~U,\h{U},\d{U},\horn{U}, + U = {\`U,\'U,\~U,\h U,\d U,\horn U, \`\Uhorn,\'\Uhorn,\~\Uhorn,\h\Uhorn,\d\Uhorn}, - u = {\`u,\'u,\~u,\h{u},\d{u},\horn{u}, + u = {\`u,\'u,\~u,\h u,\d u,\horn u, \`\uhorn,\'\uhorn,\~\uhorn,\h\uhorn,\d\uhorn}, - Y = {\`Y,\'Y,\~Y,\h{Y},\d{Y}}, - y = {\`y,\'y,\~y,\h{y},\d{y}}, + Y = {\`Y,\'Y,\~Y,\h Y,\d Y}, + y = {\`y,\'y,\~y,\h y,\d y}, } %%% ---------------------------------------------------------------------- @@ -221,7 +258,7 @@ \SetExpansion [ name = default ] - { encoding = {OT1,OT4,T1,LY1} } + { encoding = {OT1,OT4,QX,T1,LY1} } { A = 500, a = 700, \AE = 500, \ae = 700, @@ -316,7 +353,6 @@ ? = { ,100}, @ = {50,50}, ~ = {200,250}, - _ = {100,100}, \% = {50,50}, * = {200,200}, + = {250,250}, @@ -333,6 +369,7 @@ load = default ] { encoding = {T1,LY1} } { + _ = {100,100}, \textbackslash = {100,200}, \quotesinglbase = {400,400}, \quotedblbase = {400,400}, \guilsinglleft = {400,300}, \guilsinglright = {300,400}, @@ -343,6 +380,23 @@ } \SetProtrusion + [ name = QX-default, + load = default ] + { encoding = QX } + { + {=} = {100,100}, + \textunderscore = {100,100}, + \textbackslash = {100,200}, + \quotedblbase = {400,400}, + \guillemotleft = {200,200}, \guillemotright = {200,200}, + \textexclamdown = {100, }, \textquestiondown = {100, }, + \textbraceleft = {400,200}, \textbraceright = {200,400}, + \textless = {200,100}, \textgreater = {100,200}, + \textminus = {200,200}, \textdegree = {300,300}, + \copyright = {100,100}, \textregistered = {100,100}, + } + +\SetProtrusion [ name = OT1-it ] { encoding = OT1, shape = {it,sl} } @@ -351,7 +405,6 @@ {,}= { ,500}, : = { ,300}, ; = { ,300}, - _ = { ,100}, & = {50,50}, \% = {100, }, * = {200,200}, @@ -372,6 +425,7 @@ { encoding = {T1,LY1}, shape = {it,sl} } { + _ = { ,100}, \textbackslash = {100,200}, \quotesinglbase = {300,700}, \quotedblbase = {400,500}, \guilsinglleft = {400,400}, \guilsinglright = {300,500}, @@ -381,6 +435,24 @@ } \SetProtrusion + [ name = QX-it-default, + load = OT1-it ] + { encoding = {QX}, + shape = {it,sl} } + { + {=} = {100,100}, + \textunderscore = {100,100}, + \textbackslash = {100,200}, + \quotedblbase = {300,400}, + \guillemotleft = {300,300}, \guillemotright = {300,300}, + \textexclamdown = {200, }, \textquestiondown = {200, }, + \textbraceleft = {200,100}, \textbraceright = {200,200}, + \textless = {100,100}, \textgreater = {100,100}, + \textminus = {200,200}, \textdegree = {300,150}, + \copyright = {100,100}, \textregistered = {100,100}, + } + +\SetProtrusion [ name = OT1-sc, load = default ] { encoding = OT1, @@ -413,6 +485,22 @@ } \SetProtrusion + [ name = QX-sc, + load = QX-default ] + { encoding = QX, + shape = sc } + { + a = {50,50}, + f = { ,50}, + j = {50, }, + l = { ,50}, + 013 = { ,50}, % fl + r = { , 0}, + t = {50,50}, + y = {50,50}, + } + +\SetProtrusion [ name = textcomp ] { encoding = TS1 } { diff --git a/Master/texmf-dist/tex/latex/microtype/microtype.sty b/Master/texmf-dist/tex/latex/microtype/microtype.sty index 79c72384491..0780299e6e0 100644 --- a/Master/texmf-dist/tex/latex/microtype/microtype.sty +++ b/Master/texmf-dist/tex/latex/microtype/microtype.sty @@ -9,9 +9,9 @@ %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -25,8 +25,9 @@ %% ----------------------------------------------------------------------- %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{microtype} - [2005/10/28 v1.9 Micro-typography with pdfTeX (RS)] +\ProvidesPackage{microtype}[2006/05/05 + v1.9d + Micro-typography with pdfTeX (RS)] \newcommand*\DeclareMicrotypeSet[3][]{} \newcommand*\UseMicrotypeSet[2][]{} \newcommand*\DeclareMicrotypeSetDefault[2][]{} @@ -38,39 +39,29 @@ \newcommand*\LoadMicrotypeFile[1]{} \newcommand*\microtypesetup[1]{} \newcommand*\microtypecontext[1]{} -\def\DeclareMicrotypeSet{% - \@ifstar - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% -} -\def\MT@DeclareSet[#1]#2#3{} +\def\DeclareMicrotypeSet#1#{\@gobbletwo} \@onlypreamble{\DeclareMicrotypeSet} \@onlypreamble{\UseMicrotypeSet} +\@onlypreamble{\DeclareMicrotypeSetDefault} \@onlypreamble{\DisableLigatures} \def\MT@old@cmd#1#2{% - \MT@warning{\string#1 is deprecated. Please use\MessageBreak - \string#2 instead}% - \let#1#2#2} -\newcommand*\DeclareMicroTypeSet{% - \MT@old@cmd\DeclareMicroTypeSet - \DeclareMicrotypeSet} -\newcommand*\UseMicroTypeSet{% - \MT@old@cmd\UseMicroTypeSet - \UseMicrotypeSet} -\newcommand*\DeclareMicroTypeAlias{% - \MT@old@cmd\DeclareMicroTypeAlias - \DeclareMicrotypeAlias} -\newcommand*\LoadMicroTypeFile{% - \MT@old@cmd\LoadMicroTypeFile - \LoadMicrotypeFile} -\def\MT@error{\PackageError{microtype}} -\def\MT@warning{\PackageWarning{microtype}} + \newcommand*#1{\MT@warning{% + \string#1 is deprecated. Please use\MessageBreak + \string#2 instead}% + \let #1#2#2}} +\MT@old@cmd\DeclareMicroTypeSet\DeclareMicrotypeSet +\MT@old@cmd\UseMicroTypeSet\UseMicrotypeSet +\MT@old@cmd\DeclareMicroTypeAlias\DeclareMicrotypeAlias +\MT@old@cmd\LoadMicroTypeFile\LoadMicrotypeFile +\def\MT@MT{microtype} +\def\MT@error{\PackageError{\MT@MT}} +\def\MT@warning{\PackageWarning{\MT@MT}} \def\MT@warning@nl#1{\MT@warning{#1\@gobble}} \def\MT@warn@err#1{\MT@error{#1}{% - This error message appears because you loaded the `microtype'\MessageBreak + This error message appears because you loaded the `\MT@MT'\MessageBreak package with the option `verbose=errors'. Consult the documentation\MessageBreak - in microtype.(pdf,dvi) to find out what went wrong.}} -\def\MT@info{\PackageInfo{microtype}} + in \MT@MT.(pdf,dvi) to find out what went wrong.}} +\def\MT@info{\PackageInfo{\MT@MT}} \def\MT@info@nl#1{\MT@info{#1\@gobble}} \let\MT@vinfo\@gobble \let\MT@pdftex@no\z@ @@ -103,20 +94,18 @@ \fi \fi \ifnum\MT@pdftex@no<\tw@ - \AtEndOfPackage{\let\@unprocessedoptions\relax}% + \AtEndOfPackage{\let\@unprocessedoptions\relax} \let\CurrentOption\@empty \MT@warning@nl{% \ifcase\MT@pdftex@no You don't seem to be using pdftex.\MessageBreak \or You are using a pdftex version older than 0.14f.\MessageBreak - microtype won't work with such antiquated versions.\MessageBreak + `\MT@MT' won't work with such antiquated versions.\MessageBreak Please install a newer version of pdftex.\MessageBreak \fi All micro-typographic features will be disabled} - \expandafter - \endinput -\fi +\endinput\fi \def\MT@catcodes{% \catcode`\^7 % \@makeother\-% @@ -127,7 +116,7 @@ \@makeother\`% \@makeother\'% \@makeother\"% - \@makeother\|% + \@makeother\!% } \def\MT@restore@catcodes#1{% \ifx\relax#1\else @@ -135,20 +124,18 @@ \expandafter\MT@restore@catcodes \fi } -\edef\MT@restore@catcodes{% - \MT@restore@catcodes\^\-\=\*\,\/\`\'\"\|\relax -} +\edef\MT@restore@catcodes{\MT@restore@catcodes\^\-\=\*\,\/\`\'\"\!\relax} \MT@catcodes \AtEndOfPackage{\MT@restore@catcodes} \RequirePackage{keyval}[1997/11/10] -\newtoks\mt@toks +\newtoks\MT@toks \newif\ifMT@protrusion \newif\ifMT@expansion \newif\ifMT@auto \newif\ifMT@selected \newif\ifMT@noligatures -\newif\ifMT@DVIoutput \newif\ifMT@draft +\newif\ifMT@document \let\MT@pr@level\tw@ \let\MT@pr@factor\@m \let\MT@pr@unit\@empty @@ -165,94 +152,24 @@ \def\MT@stretch@default{20 } \def\MT@shrink@default{20 } \def\MT@step@default{4 } -\def\MT@pdfcprot@error{% - \MT@error{Detected the `pdfcprot' package!\MessageBreak - `microtype' and `pdfcprot' may not be used together}{% -The `pdfcprot' package provides an interface to character protrusion.\MessageBreak -So does the `microtype' package. Using both packages at the same\MessageBreak -time will almost certainly lead to undesired results. Have your choice!}% - \let\MT@pdfcprot@error\relax -} -\@ifpackageloaded{pdfcprot}\MT@pdfcprot@error\relax -\def\MT@ledmac@setup{% - \ifMT@protrusion - \ifnum\MT@pdftex@no > 4 - \MT@ifdefined@c\l@dunhbox@line{% - \MT@info@nl{Patching ledmac to enable character protrusion}% - \newdimen\MT@led@kern - \let\MT@led@unhbox@line\l@dunhbox@line - \renewcommand*{\l@dunhbox@line}[1]{% - \ifhbox##1% - \MT@led@kern=\rightmarginkern##1% - \kern\leftmarginkern##1% - \MT@led@unhbox@line##1% - \kern\MT@led@kern - \fi - }% - }{% - \MT@warning@nl{% - Character protrusion in paragraphs with line\MessageBreak - numbering will only work if you update ledmac}% - }% - \else - \MT@warning@nl{% - The pdftex version you are using does not allow\MessageBreak - character protrusion in paragraphs with line\MessageBreak - numbering by the `ledmac' package.\MessageBreak - Upgrade pdftex to version 1.30 or later}% - \fi +\expandafter\let\expandafter\MT@requires@etex + \ifcase 0% + \ifx\eTeXversion\@undefined 1\else + \ifx\eTeXversion\relax 1\else + \ifcase\eTeXversion 1\fi + \fi + \fi\space + \@firstoftwo + \else + \@secondoftwo \fi -} -\def\MT@setupfont@hook{% - \@ifpackagewith{babel}{spanish}{% - \MT@ifdefined@c\percentsign - {\let\%\percentsign}\relax - }\relax - \@ifpackageloaded{csquotes}{% - \@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax - }\relax - \@ifpackageloaded{hyperref}{% - \chardef\%`\% - \chardef\#`\# - }\relax -} -\AtBeginDocument{% - \@ifpackageloaded{pdfcprot}\MT@pdfcprot@error\relax - \@ifpackageloaded{ledmac}\MT@ledmac@setup\relax - \let\MT@setupfont@hook\@empty - \@ifpackagewith{babel}{spanish}{% - \g@addto@macro\MT@setupfont@hook{% - \MT@ifdefined@c\percentsign - {\let\%\percentsign}\relax}% - }\relax - \@ifpackageloaded{csquotes}{% - \@ifpackagelater{csquotes}{2005/05/11}{% - \g@addto@macro\MT@setupfont@hook\@disablequotes - }{% - \MT@warning@nl{% - Should you receive warnings about unknown slot\MessageBreak - numbers, try upgrading the `csquotes' package}% - }% - }\relax - \@ifpackageloaded{hyperref}{% - \g@addto@macro\MT@setupfont@hook{% - \chardef\%`\% - \chardef\#`\# - }% - \pdfstringdefDisableCommands{% - \let\pickup@font\MT@orig@pickupfont - }% - }\relax -} -\expandafter\ifx\the\font\nullfont\normalfont\fi -\let\MT@etex@no\z@ -\ifx\eTeXversion\@undefined \else - \ifx\eTeXversion\relax \else - \ifnum\eTeXversion>\z@ - \let\MT@etex@no\@ne - \fi +\def\MT@requires@pdftex#1{% + \ifnum\MT@pdftex@no<#1\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo \fi -\fi +} \def\MT@def@n#1{\expandafter\def\csname #1\endcsname} \def\MT@edef@n#1{\expandafter\edef\csname #1\endcsname} \def\MT@let@nc#1{\expandafter\let\csname #1\endcsname} @@ -261,43 +178,79 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@exp@string{\expandafter\string} \def\MT@exp@one@n#1#2{\expandafter#1\expandafter{#2}} \def\MT@exp@two@c#1{\expandafter\expandafter\expandafter#1\expandafter} -\def\MT@exp@two@n#1#2#3{\expandafter\expandafter\expandafter - #1\expandafter\expandafter\expandafter - {\expandafter#2\expandafter}\expandafter{#3}} -\def\MT@hop@fi#1\fi{\fi#1} -\def\MT@hop@else@fi#1\else#2\fi{\fi#1} -\ifcase\MT@etex@no \MT@hop@else@fi{% - \def\MT@ifdefined@c#1{% - \ifx#1\@undefined - \expandafter\@secondoftwo +\def\MT@exp@two@n#1#2#3{% + \expandafter\expandafter\expandafter + #1\expandafter\expandafter\expandafter + {\expandafter#2\expandafter}\expandafter{#3}} +\MT@requires@etex{ + \def\MT@ifdefined@c@T#1{% + \ifdefined#1% + \expandafter\@firstofone \else - \expandafter\@firstoftwo + \expandafter\@gobble \fi } - \def\MT@ifdefined@n#1{% - \begingroup\MT@exp@two@c\endgroup - \ifx\csname #1\endcsname\relax + \def\MT@ifdefined@c@TF#1{% + \ifdefined#1% + \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + } + \def\MT@ifdefined@n@T#1{% + \ifcsname#1\endcsname + \expandafter\@firstofone \else - \expandafter\@firstoftwo + \expandafter\@gobble \fi } -}\else\MT@hop@fi{% - \def\MT@ifdefined@c#1{% - \ifdefined#1% + \def\MT@ifdefined@n@TF#1{% + \ifcsname#1\endcsname \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } - \def\MT@ifdefined@n#1{% - \ifcsname#1\endcsname +}{ + \def\MT@ifdefined@c@T#1{% + \ifx#1\@undefined + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + } + \def\MT@ifdefined@c@TF#1{% + \ifx#1\@undefined + \expandafter\@secondoftwo + \else \expandafter\@firstoftwo + \fi + } + \def\MT@ifdefined@n@T#1{% + \begingroup\MT@exp@two@c\endgroup + \ifx\csname #1\endcsname\relax + \expandafter\@gobble \else + \expandafter\@firstofone + \fi + } + \def\MT@ifdefined@n@TF#1{% + \begingroup\MT@exp@two@c\endgroup + \ifx\csname #1\endcsname\relax \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo \fi } -}\fi +} +\MT@requires@etex{ + \def\MT@detokenize@n#1{\detokenize\expandafter{\string#1}} + \def\MT@detokenize@c#1{\detokenize + \expandafter\expandafter\expandafter{\expandafter\string#1}} +}{ + \def\MT@detokenize@n#1{\string#1} + \def\MT@detokenize@c#1{\MT@exp@two@c\zap@space\strip@prefix\meaning#1 \@empty} +} \begingroup \catcode`\%=12 \catcode`\&=14 @@ -309,51 +262,69 @@ time will almost certainly lead to undesired results. Have your choice!}% \fi } \endgroup -\def\MT@ifnumber#1{% - \if!\ifnum9<1#1!\else?\fi - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\def\MT@ifdimen#1{% - \setbox\z@=\hbox{% - \MT@count=1#1\relax - \ifnum\MT@count=\@ne - \aftergroup\@secondoftwo +\MT@requires@pdftex6{ + \def\MT@ifint#1{% + \ifcase\pdfmatch{^[0-9]+ *$}{#1}\relax + \expandafter\@secondoftwo \else - \aftergroup\@firstoftwo - \fi}% -} -\def\MT@ifgt#1#2{% - \ifdim #1\p@ > #2\p@ - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi + \expandafter\@firstoftwo + \fi + } +}{ + \def\MT@ifint#1{% + \if!\ifnum9<1#1!\else?\fi + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } } -\def\MT@iflt#1#2{% - \ifdim #1\p@ < #2\p@ - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi +\MT@requires@pdftex6{ + \def\MT@ifdimen#1{% + \ifcase\pdfmatch{^([0-9]+([.,][0-9]+)?|[.,][0-9]+)% + (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc)? *$}{#1}\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + } +}{ + \def\MT@ifdimen#1{% + \setbox\z@=\hbox{% + \MT@count=1#1\relax + \ifnum\MT@count=\@ne + \aftergroup\@secondoftwo + \else + \aftergroup\@firstoftwo + \fi + }% + } } -\def\MT@ifeq#1#2{% - \ifdim #1\p@ = #2\p@ +\def\MT@ifdim#1#2#3{% + \ifdim #1\p@ #2 #3\p@ \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi } -\def\MT@ifstreq#1#2{% - \edef\x{#1}% - \edef\y{#2}% - \ifx\x\y - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi +\MT@requires@pdftex5{ + \def\MT@ifstreq#1#2{% + \ifcase\pdfstrcmp{#1}{#2}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } +}{ + \def\MT@ifstreq#1#2{% + \edef\x{#1}% + \edef\y{#2}% + \ifx\x\y + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } } \def\MT@xadd#1#2{% \ifx#1\relax @@ -372,27 +343,21 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@map@clist@n#1#2{% \ifx\@empty#1\else \def\MT@clist@function##1{#2}% - \expandafter\MT@map@clist@ - \expandafter#1,\@nil,\@nnil,% + \MT@map@clist@#1,\@nil,\@nnil \fi } -\def\MT@map@clist@c#1{\expandafter\MT@map@clist@n\expandafter{#1}} +\def\MT@map@clist@c#1{\MT@exp@one@n\MT@map@clist@n#1} \def\MT@map@clist@#1,{% \ifx\@nil#1% - \MT@clist@break - \else - \MT@clist@function{#1}% - \expandafter\MT@map@clist@ + \expandafter\MT@clist@break \fi + \MT@clist@function{#1}% + \MT@map@clist@ } -\def\MT@clist@break#1\@nnil,{\fi} -\def\MT@map@tlist@n#1#2{% - \MT@map@tlist@#2#1\@nnil -} -\def\MT@map@tlist@c#1#2{% - \expandafter\MT@map@tlist@ - \expandafter#2#1\@nnil -} +\let\MT@clist@function\@gobble +\def\MT@clist@break#1\@nnil{} +\def\MT@map@tlist@n#1#2{\MT@map@tlist@#2#1\@nnil} +\def\MT@map@tlist@c#1#2{\expandafter\MT@map@tlist@\expandafter#2#1\@nnil} \def\MT@map@tlist@#1#2{% \ifx\@nnil#2\else #1{#2}% @@ -403,24 +368,25 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@tlist@break#1\@nnil{\fi} \newif\ifMT@inlist@ \def\MT@in@clist#1#2{% - \MT@inlist@false - \def\x##1#1,##2\@nnil{% - \ifx\\##2\\\else + \def\x##1,#1,##2##3\@nnil{% + \ifx##2\@empty + \MT@inlist@false + \else \MT@inlist@true \fi }% - \expandafter\x#2,#1,\@nnil + \expandafter\x\expandafter,#2,#1,\@empty\@nnil } -\def\MT@rem@from@list#1#2{% - \def\x##1#1,##2\@nnil{% - \ifx\\##2\\\else - \def\x####1,#1,####2\@nnil{% - \gdef#2{##1####1}% - }% - \x##2,#1,\@nnil +\def\MT@rem@from@clist#1#2{% + \def\x##1,#1,##2##3\@nnil{% + \ifx##2\@empty\else + \ifx\\##1\\\global\let#2\@gobble + \else\xdef#2{\@gobble##1}\fi + \def\x####1,#1,####2####3\@nnil{\xdef#2{#2####1}}% + \x,##2##3,#1,\@nnil \fi }% - \expandafter\x#2,#1,\@nnil + \expandafter\x\expandafter,#2,#1,\@empty\@nnil } \def\MT@in@tlist#1#2{% \MT@inlist@false @@ -438,17 +404,15 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@inlist@false \MT@map@tlist@c#1\MT@in@rlist@ } -\def\MT@in@rlist@#1{% - \expandafter\MT@in@rlist@@#1% -} +\def\MT@in@rlist@#1{\expandafter\MT@in@rlist@@#1} \def\MT@in@rlist@@#1#2#3{% - \MT@ifeq{#2}\m@ne{% - \MT@ifeq{#1}\MT@size + \MT@ifdim{#2}=\m@ne{% + \MT@ifdim{#1}=\MT@size \MT@inlist@true \relax }{% - \MT@iflt\MT@size{#1}\relax{% - \MT@iflt\MT@size{#2}% + \MT@ifdim\MT@size<{#1}\relax{% + \MT@ifdim\MT@size<{#2}% \MT@inlist@true \relax }% @@ -460,31 +424,27 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@loop#1\MT@repeat{% \def\MT@iterate{#1\relax\expandafter\MT@iterate\fi}% - \MT@iterate - \let\MT@iterate\relax + \MT@iterate \let\MT@iterate\relax } \let\MT@repeat\fi -\def\MT@while@num#1#2{\MT@loop #2\ifnum#1\MT@repeat} +\def\MT@while@num#1#2#3{% + \@tempcnta#1\relax + \MT@loop #3% + \advance\@tempcnta \@ne + \ifnum\@tempcnta < #2\MT@repeat +} +\def\MT@do@font{\MT@while@num\z@\@cclvi} \newcount\MT@count -\ifcase\MT@etex@no +\MT@requires@etex{ + \def\MT@increment#1{\edef#1{\number\numexpr #1 + 1\relax}} +}{ \def\MT@increment#1{% \MT@count=#1\relax \advance\MT@count \@ne \edef#1{\number\MT@count}% } -\else - \def\MT@increment#1{% - \edef#1{\number\numexpr #1 + 1\relax}% - } -\fi -\ifcase\MT@etex@no - \def\MT@scale#1#2#3{% - \multiply #1 #2\relax - \ifnum #3 = \z@ \else - \divide #1 #3\relax - \fi - } -\else +} +\MT@requires@etex{ \def\MT@scale#1#2#3{% \ifnum #3 = \z@ #1=\numexpr #1 * #2\relax @@ -492,8 +452,14 @@ time will almost certainly lead to undesired results. Have your choice!}% #1=\numexpr #1 * #2 / #3\relax \fi } -\fi -\def\MT@remove@spaces#1{\expandafter\KV@@sp@def\expandafter#1\expandafter{#1}} +}{ + \def\MT@scale#1#2#3{% + \multiply #1 #2\relax + \ifnum #3 = \z@ \else + \divide #1 #3\relax + \fi + } +} \let\MT@make@string\@onelevel@sanitize \def\MT@abbr@pr{protrusion} \def\MT@abbr@ex{expansion} @@ -504,6 +470,118 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@abbr@nl{noligatures} \def\MT@rbba@protrusion{pr} \def\MT@rbba@expansion{ex} +\def\MT@features{pr,ex% +} +\def\MT@features@long{protrusion,expansion% +} +\def\MT@is@feature#1{% + \MT@exp@one@n\MT@in@clist\@tempa\MT@features@long + \ifMT@inlist@ + \expandafter\@firstofone + \else + \MT@error{`\@tempa' is not an available micro-typographic\MessageBreak + feature. Ignoring #1}{Available features are: `\MT@features@long'.}% + \expandafter\@gobble + \fi +} +\let\MT@setup@\@empty +\def\MT@addto@setup#1{% + \begingroup + \MT@toks\expandafter{\MT@setup@#1}% + \xdef\MT@setup@{\the\MT@toks}% + \endgroup +} +\AtBeginDocument{\MT@setup@} +\def\MT@with@package#1{\@ifpackageloaded{#1}\@firstofone\@gobble} +\def\MT@pdfcprot@error{% + \MT@error{Detected the `pdfcprot' package!\MessageBreak + `\MT@MT' and `pdfcprot' may not be used together}{% +The `pdfcprot' package provides an interface to character protrusion.\MessageBreak +So does the `\MT@MT' package. Using both packages at the same\MessageBreak +time will almost certainly lead to undesired results. Have your choice!}% + \let\MT@pdfcprot@error\relax +} +\MT@with@package{pdfcprot}\MT@pdfcprot@error +\def\MT@ledmac@setup{% + \ifMT@protrusion + \MT@requires@pdftex5{% + \MT@ifdefined@c@TF\l@dunhbox@line{% + \MT@info@nl{Patching ledmac to enable character protrusion}% + \newdimen\MT@led@kern + \let\MT@led@unhbox@line\l@dunhbox@line + \renewcommand*{\l@dunhbox@line}[1]{% + \ifhbox##1% + \MT@led@kern=\rightmarginkern##1% + \kern\leftmarginkern##1% + \MT@led@unhbox@line##1% + \kern\MT@led@kern + \fi + }% + }{% + \MT@warning@nl{% + Character protrusion in paragraphs with line\MessageBreak + numbering will only work if you update ledmac}% + }% + }{% + \MT@warning@nl{% + The pdftex version you are using does not allow\MessageBreak + character protrusion in paragraphs with line\MessageBreak + numbering by the `ledmac' package.\MessageBreak + Upgrade pdftex to version 1.30 or later}% + }% + \fi +} +\def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# } +\def\MT@setupfont@hook{% + \@ifpackagewith{babel}{spanish}{% + \MT@ifdefined@c@T\percentsign{\let\%\percentsign}% + }\relax + \MT@with@package{csquotes}{% + \@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax + }% + \@ifpackageloaded{hyperref}\MT@restore@p@h{% + \MT@with@package{tex4ht}\MT@restore@p@h + }% +} +\MT@addto@setup{% + \MT@with@package{pdfcprot}\MT@pdfcprot@error + \MT@with@package{ledmac}\MT@ledmac@setup + \let\MT@setupfont@hook\@empty + \@ifpackagewith{babel}{spanish}{% + \g@addto@macro\MT@setupfont@hook{% + \MT@ifdefined@c@T\percentsign{\let\%\percentsign}}% + }\relax + \MT@with@package{csquotes}{% + \@ifpackagelater{csquotes}{2005/05/11}{% + \g@addto@macro\MT@setupfont@hook\@disablequotes + }{% + \MT@warning@nl{% + Should you receive warnings about unknown slot\MessageBreak + numbers, try upgrading the `csquotes' package}% + }% + }% + \@ifpackageloaded{hyperref}{% + \g@addto@macro\MT@setupfont@hook\MT@restore@p@h + \pdfstringdefDisableCommands{% + \let\pickup@font\MT@orig@pickupfont + }% + }{% + \MT@with@package{tex4ht}{% + \g@addto@macro\MT@setupfont@hook\MT@restore@p@h + }% + }% + \MT@with@package{listings}{% + \g@addto@macro\MT@begin@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}% + }% + \g@addto@macro\MT@setupfont@hook{% + \let\lst@ProcessLetter\@empty + }% + }% +} +\expandafter\ifx\the\font\nullfont\normalfont\fi \def\MT@setupfont{% \ifx\MT@vinfo\MT@info@nl \MT@info{Setting up font `\MT@exp@string\MT@font'}\fi @@ -523,7 +601,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@ifdefined@n{MT@\MT@family @alias}% + \MT@ifdefined@n@TF{MT@\MT@family @alias}% {\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}% {\let\MT@familyalias\@empty}% } @@ -532,7 +610,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \expandafter\csname ifMT@\csname MT@abbr@#1\endcsname\endcsname \MT@dotrue \MT@map@clist@n{font,encoding,family,series,shape,size}{% - \MT@ifdefined@n{MT@checklist@##1}% + \MT@ifdefined@n@TF{MT@checklist@##1}% {\csname MT@checklist@##1\endcsname}% {\MT@checklist@{##1}}% {#1}% @@ -549,36 +627,40 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@checklist@#1#2{% \edef\@tempa{\csname MT@#2@setname\endcsname}% - \MT@ifdefined@n{MT@#2list@#1@\@tempa}{% - \expandafter\expandafter\expandafter - \MT@in@clist\expandafter\expandafter\expandafter - {\csname MT@#1\expandafter\endcsname\expandafter}% - \csname MT@#2list@#1@\@tempa\endcsname + \MT@ifdefined@n@T + {MT@#2list@#1@\@tempa}{% + \expandafter\MT@exp@one@n\expandafter\MT@in@clist + \csname MT@#1\expandafter\endcsname + \csname MT@#2list@#1@\@tempa\endcsname \ifMT@inlist@ \MT@dotrue \else \MT@dofalse \expandafter\MT@clist@break \fi - }{% }% } \def\MT@checklist@font#1{% \edef\@tempa{\csname MT@#1@setname\endcsname}% - \MT@ifdefined@n{MT@#1list@font@\@tempa}{% - \MT@exp@two@n\MT@in@clist - \MT@font{\csname MT@#1list@font@\@tempa\endcsname}% + \MT@ifdefined@n@T + {MT@#1list@font@\@tempa}{% + \expandafter\expandafter\expandafter\MT@exp@one@n + \expandafter\expandafter\expandafter\MT@in@clist + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\string + \expandafter\MT@font\expandafter}% + \csname MT@#1list@font@\@tempa\endcsname \ifMT@inlist@ \expandafter\MT@clist@break \else \MT@dofalse \fi - }{% }% } \def\MT@checklist@family#1{% \edef\@tempa{\csname MT@#1@setname\endcsname}% - \MT@ifdefined@n{MT@#1list@family@\@tempa}{% + \MT@ifdefined@n@T + {MT@#1list@family@\@tempa}{% \MT@exp@two@n\MT@in@clist \MT@family{\csname MT@#1list@family@\@tempa\endcsname}% \ifMT@inlist@ @@ -596,12 +678,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \ifMT@do \else \expandafter\MT@clist@break \fi - }{% }% } \def\MT@checklist@size#1{% \edef\@tempa{\csname MT@#1@setname\endcsname}% - \MT@ifdefined@n{MT@#1list@size@\@tempa}{% + \MT@ifdefined@n@T + {MT@#1list@size@\@tempa}{% \expandafter\MT@in@rlist \csname MT@#1list@size@\@tempa\endcsname \ifMT@inlist@ @@ -610,28 +692,25 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@dofalse \expandafter\MT@clist@break \fi - }{% }% } \def\MT@protrusion{\MT@maybe@do{pr}} \def\MT@set@pr@codes{% - \MT@reset@pr@codes \MT@if@list@exists{% \MT@get@dimen@six \MT@get@opt + \MT@reset@pr@codes \MT@get@inh@list - \MT@load@list{\MT@pr@c@name}% - \edef\MT@curr@list@name{protrusion list `\MT@pr@c@name'}% + \MT@load@list\MT@pr@c@name + \MT@set@listname \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% \expandafter\MT@pr@do\@tempc,\relax,% - }\relax + }\MT@reset@pr@codes } \def\MT@set@all@pr#1#2{% - \@tempcnta=\z@ - \MT@while@num{\@tempcnta < \@cclvi}{% + \MT@do@font{% \lpcode\MT@font\@tempcnta=#1\relax \rpcode\MT@font\@tempcnta=#2\relax - \advance\@tempcnta \@ne }% } \def\MT@reset@pr@codes@{\MT@set@all@pr\z@\z@} @@ -675,15 +754,15 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@scale@to@em \rpcode\MT@font\MT@char=\@tempcntb }% - \MT@ifdefined@c\MT@pr@inh@name{% - \MT@ifdefined@n{MT@inh@\MT@pr@inh@name @\MT@char @}{% + \MT@ifdefined@c@T\MT@pr@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{% \expandafter\MT@map@tlist@c \csname MT@inh@\MT@pr@inh@name @\MT@char @\endcsname \MT@set@pr@heirs - }\relax - }\relax + }% + }% } -\ifnum\MT@pdftex@no > \tw@ +\MT@requires@pdftex3{ \def\MT@scale@to@em{% \@tempcntb=\MT@count\relax \MT@scale\@tempcntb \@tempb \MT@dimen@six @@ -691,19 +770,19 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@scale@factor \fi } - \ifcase\MT@etex@no + \MT@requires@etex{ \def\MT@get@charwd{% - \setbox\z@=\hbox{\MT@font \char\MT@char}% - \MT@count=\wd\z@\relax - \ifnum\MT@count=\z@ \MT@warn@missing@char \fi + \MT@count=\fontcharwd\MT@font\MT@char\relax + \ifnum\MT@count=\z@ \MT@info@missing@char \fi } - \else + }{ \def\MT@get@charwd{% - \MT@count=\number\fontcharwd\MT@font\MT@char\relax - \ifnum\MT@count=\z@ \MT@warn@missing@char \fi + \setbox\z@=\hbox{\MT@font \char\MT@char}% + \MT@count=\wd\z@\relax + \ifnum\MT@count=\z@ \MT@info@missing@char \fi } - \fi -\else + } +}{ \def\MT@scale@to@em{% \MT@count=\@tempb\relax \ifnum\MT@count=\z@ \else @@ -711,40 +790,46 @@ time will almost certainly lead to undesired results. Have your choice!}% \fi } \def\MT@get@charwd{\MT@count=\MT@dimen@six} -\fi +} \def\MT@get@font@dimen#1{% - \MT@count=\number\fontdimen#1\MT@font + \ifnum\fontdimen#1\MT@font=\z@ + \MT@warning@nl{Font \font@name does not specify its\MessageBreak + \@backslashchar fontdimen \number#1 (it's zero).\MessageBreak + You should use a different `unit' for \MT@curr@list@name}% + \else + \MT@count=\fontdimen#1\MT@font + \fi } -\ifcase\MT@etex@no \MT@hop@else@fi{% - \def\MT@warn@missing@char{% - \MT@warning@nl{% - Character `\the\mt@toks' has a width of 0pt\MessageBreak - (it's probably missing) in font `\MT@exp@string\MT@font'.\MessageBreak - It cannot be protruded}% +\MT@requires@etex{ + \def\MT@info@missing@char{% + \MT@info@nl{Character `\the\MT@toks' \iffontchar\MT@font\MT@char + has a width of 0pt \else is missing \fi in font\MessageBreak + `\MT@exp@string\MT@font'. Ignoring protrusion settings\MessageBreak + for this character}% } -}\else\MT@hop@fi{% - \def\MT@warn@missing@char{% - \MT@warning@nl{Character `\the\mt@toks' - \iffontchar\MT@font\MT@char has a width of 0pt \else is missing \fi - in font\MessageBreak `\MT@exp@string\MT@font'. It cannot be protruded}% +}{ + \def\MT@info@missing@char{% + \MT@info@nl{% + Character `\the\MT@toks' has a width of 0pt\MessageBreak + (it's probably missing) in font `\MT@exp@string\MT@font'.\MessageBreak + Ignoring protrusion settings for this character}% } -}\fi +} \def\MT@scale@factor{% \ifnum\csname MT@\MT@feat @factor@\endcsname=\@m \else \expandafter\MT@scale\expandafter \@tempcntb \csname MT@\MT@feat @factor@\endcsname \@m \fi - \ifnum\@tempcntb > \csname MT@\MT@feat @max\endcsname\relax - \@tempcnta=\csname MT@\MT@feat @max\endcsname - \MT@warn@code@too@large + \ifnum\@tempcntb>\csname MT@\MT@feat @max\endcsname\relax + \expandafter\MT@warn@code@too@large\csname MT@\MT@feat @max\endcsname \else \ifnum\@tempcntb<\csname MT@\MT@feat @min\endcsname\relax - \@tempcnta=\csname MT@\MT@feat @min\endcsname - \MT@warn@code@too@large + \expandafter\MT@warn@code@too@large\csname MT@\MT@feat @min\endcsname \fi \fi } -\def\MT@warn@code@too@large{% +\def\MT@warn@code@too@large#1{% + \@tempcnta=#1\relax \ifnum\csname MT@\MT@feat @factor@\endcsname=\@m \else \expandafter\MT@scale\expandafter\@tempcnta\expandafter\@m \csname MT@\MT@feat @factor@\endcsname @@ -752,12 +837,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@scale\@tempcnta \MT@dimen@six \MT@count \MT@warning@nl{The \@nameuse{MT@abbr@\MT@feat} code \@tempb\space is too large for character\MessageBreak - `\the\mt@toks' in \MT@curr@list@name.\MessageBreak + `\the\MT@toks' in \MT@curr@list@name.\MessageBreak Setting it to the maximum of \number\@tempcnta}% - \@tempcntb=\@tempcnta + \@tempcntb=#1\relax } \def\MT@get@opt{% - \MT@ifdefined@n{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}{% + \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}{% \MT@let@nn{MT@\MT@feat @factor@} {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}% \MT@vinfo{... : Multiplying \@nameuse{MT@abbr@\MT@feat} codes by @@ -765,7 +850,7 @@ time will almost certainly lead to undesired results. Have your choice!}% }{% \MT@let@nn{MT@\MT@feat @factor@}{MT@\MT@feat @factor}% }% - \MT@ifdefined@n{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{% + \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{% \MT@let@nn{MT@\MT@feat @unit@}% {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}% \expandafter\ifx\csname MT@\MT@feat @unit@\endcsname\@empty @@ -791,9 +876,11 @@ time will almost certainly lead to undesired results. Have your choice!}% \expandafter\MT@get@unit\csname MT@\MT@feat @unit@\endcsname \fi \fi - \MT@ifdefined@n{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{% + \MT@ifdefined@n@T{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{% + \MT@set@listname \csname MT@preset@\MT@feat\endcsname - }\relax + \MT@let@nc{MT@reset@\MT@feat @codes}\relax + }% } \def\MT@get@unit#1{% \expandafter\MT@get@unit@#1 e!\@nil @@ -809,7 +896,7 @@ time will almost certainly lead to undesired results. Have your choice!}% \else \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} factors relative to \the\@tempdima}% - \MT@count=\number\@tempdima\relax + \MT@count=\@tempdima\relax \fi } \def\MT@get@unit@#1e#2#3\@nil{% @@ -833,10 +920,7 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@preset@pr@#1,#2\@nil{% \ifx\MT@pr@unit@\@empty - \MT@warning@nl{% - Cannot preset characters relative to their widths\MessageBreak - for protrusion list `\MT@pr@c@name'. Presetting them\MessageBreak - relative to 1em instead}% + \MT@warn@preset@towidth{pr}% \let\MT@preset@aux\MT@preset@aux@factor \else \let\MT@preset@aux\MT@preset@aux@space @@ -856,14 +940,20 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@scale@to@em \edef#2{\number\@tempcntb}% } +\def\MT@warn@preset@towidth#1{% + \MT@warning@nl{% + Cannot preset characters relative to their widths\MessageBreak + for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'. Presetting them% + \MessageBreak relative to 1em instead}% +} \def\MT@expansion{\MT@maybe@do{ex}} \def\MT@set@ex@codes@s{% \MT@if@list@exists{% \MT@get@ex@opt \MT@reset@ef@codes \MT@get@inh@list - \MT@load@list{\MT@ex@c@name}% - \edef\MT@curr@list@name{expansion list `\MT@ex@c@name'}% + \MT@load@list\MT@ex@c@name + \MT@set@listname \MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}% \expandafter\MT@ex@do\@tempc,\relax,% \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax @@ -887,22 +977,18 @@ time will almost certainly lead to undesired results. Have your choice!}% } \let\MT@set@ex@codes\MT@set@ex@codes@n \def\MT@set@all@ex#1{% - \@tempcnta=\z@ - \MT@while@num{\@tempcnta < \@cclvi}{% - \efcode\MT@font\@tempcnta=#1\relax - \advance\@tempcnta \@ne - }% + \MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}% } \def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@} -\ifnum\MT@pdftex@no < 4 - \let\MT@reset@ef@codes\MT@reset@ef@codes@ -\else +\MT@requires@pdftex4{ \def\MT@reset@ef@codes{% \ifnum\MT@ex@factor@=\@m \else \MT@reset@ef@codes@ \fi } -\fi +}{ + \let\MT@reset@ef@codes\MT@reset@ef@codes@ +} \def\MT@ex@do#1,{% \ifx\relax#1\@empty \else \MT@ex@split #1==\relax @@ -926,55 +1012,46 @@ time will almost certainly lead to undesired results. Have your choice!}% \fi \fi \efcode\MT@font\MT@char=\@tempcntb - \MT@ifdefined@c\MT@ex@inh@name{% - \MT@ifdefined@n{MT@inh@\MT@ex@inh@name @\MT@char @}{% + \MT@ifdefined@c@T\MT@ex@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{% \expandafter\MT@map@tlist@c \csname MT@inh@\MT@ex@inh@name @\MT@char @\endcsname \MT@set@ex@heirs - }\relax - }\relax + }% + }% \fi \fi } \def\MT@warn@ex@too@large#1{% - \MT@warning@nl{Expansion factor - \number\@tempcntb\space too large for character\MessageBreak - `\the\mt@toks' in \MT@curr@list@name.\MessageBreak + \MT@warning@nl{Expansion factor \number\@tempcntb\space too large for + character\MessageBreak `\the\MT@toks' in \MT@curr@list@name.\MessageBreak Setting it to the maximum of \number#1}% \@tempcntb=#1\relax } \def\MT@get@ex@opt{% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @factor}{% + \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{% \MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}% \MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}% }{% \let\MT@ex@factor@\MT@ex@factor }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @stretch}{% - \MT@let@cn\MT@stretch@{MT@ex@c@\MT@ex@c@name @stretch}% - \MT@vinfo{... : Setting stretch limit to \number\MT@stretch@}% + \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}% + \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}% + \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}% + \def\@tempa{autoexpand}% + \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}% + \MT@ifdefined@n@T{MT@ex@c@\csname MT@ex@c@name\endcsname @preset}{% + \MT@set@listname + \MT@preset@ex + \let\MT@reset@ef@codes\relax + }% +} +\def\MT@get@ex@opt@#1#2{% + \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{% + \MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}% + \MT@vinfo{... : #2}% }{% - \let\MT@stretch@\MT@stretch - }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @shrink}{% - \MT@let@cn\MT@shrink@{MT@ex@c@\MT@ex@c@name @shrink}% - \MT@vinfo{... : Setting shrink limit to \number\MT@shrink@}% - }{% - \let\MT@shrink@\MT@shrink - }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @step}{% - \MT@let@cn\MT@step@{MT@ex@c@\MT@ex@c@name @step}% - \MT@vinfo{... : Setting expansion step to \number\MT@step@}% - }{% - \let\MT@step@\MT@step - }% - \MT@ifdefined@n{MT@ex@c@\MT@ex@c@name @auto}{% - \MT@let@cn\MT@auto@{MT@ex@c@\MT@ex@c@name @auto}% - \def\@tempa{autoexpand}% - \MT@vinfo{... : \ifx\@tempa\MT@auto@ En\else Dis\fi - abling automatic expansion}% - }{% - \let\MT@auto@\MT@auto + \MT@let@nn{MT@#1@}{MT@#1}% }% } \def\MT@set@ex@heirs#1{% @@ -985,14 +1062,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@scale@factor \MT@set@all@ex\@tempcntb } -\ifnum\MT@pdftex@no < 5 \MT@hop@else@fi{% - \let\MT@noligatures\relax -}\else\MT@hop@fi{% +\MT@requires@pdftex5{ \def\MT@noligatures{% - \csname ifMT@\MT@abbr@nl\endcsname + \ifMT@noligatures \MT@dotrue \MT@map@clist@n{font,encoding,family,series,shape,size}{% - \MT@ifdefined@n{MT@checklist@##1}% + \MT@ifdefined@n@TF{MT@checklist@##1}% {\csname MT@checklist@##1\endcsname}% {\MT@checklist@{##1}}% {nl}% @@ -1005,7 +1080,9 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@vinfo{... Disabling ligatures}% \fi } -}\fi +}{ + \let\MT@noligatures\relax +} \def\MT@load@list#1{% \edef\@tempa{#1}% \MT@let@cn\@tempb{MT@\MT@feat @c@\@tempa load}% @@ -1013,12 +1090,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@warning{\@nameuse{MT@abbr@\MT@feat} list `\@tempa' cannot load itself}% }{% \ifx\@tempb\relax \else - \MT@ifdefined@n{MT@\MT@feat @c@\@tempb}{% + \MT@ifdefined@n@TF{MT@\MT@feat @c@\@tempb}{% \MT@vinfo{... : First loading \@nameuse{MT@abbr@\MT@feat} list `\@tempb'}% \begingroup - \MT@load@list{\@tempb}% + \MT@load@list\@tempb \endgroup - \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list `\@tempb'}% + \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\MessageBreak`\@tempb'}% \MT@let@cn\@tempc{MT@\MT@feat @c@\@tempb}% \expandafter\csname MT@\MT@feat @do\expandafter\endcsname\@tempc,\relax,% }{% @@ -1033,24 +1110,26 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@in@clist{#1}\MT@file@list \ifMT@inlist@\else \MT@begin@catcodes - \let\MT@begin@catcodes\relax - \let\MT@end@catcodes\relax - \InputIfFileExists{mt-#1.cfg}{% - \MT@vinfo{... Loading configuration file mt-#1.cfg}% - \MT@xadd\MT@file@list{#1,}% - }{% - \expandafter\MT@get@basefamily#1\relax\relax\relax - \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list - \ifMT@inlist@\else - \InputIfFileExists{mt-\@tempa.cfg}{% - \MT@vinfo{... Loading configuration file mt-\@tempa.cfg}% - \MT@xadd\MT@file@list{\@tempa,#1,}% - }{% - \MT@vinfo{... No configuration file mt-#1.cfg}% - \MT@xadd\MT@file@list{#1,}% - }% - \fi - }% + \let\MT@begin@catcodes\relax + \let\MT@end@catcodes\relax + \InputIfFileExists{mt-#1.cfg}{% + \edef\MT@curr@file{mt-#1.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + \MT@xadd\MT@file@list{#1,}% + }{% + \expandafter\MT@get@basefamily#1\relax\relax\relax + \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list + \ifMT@inlist@\else + \InputIfFileExists{mt-\@tempa.cfg}{% + \edef\MT@curr@file{mt-\@tempa.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + \MT@xadd\MT@file@list{\@tempa,#1,}% + }{% + \MT@vinfo{... No configuration file mt-#1.cfg}% + \MT@xadd\MT@file@list{#1,}% + }% + \fi + }% \endgroup \fi } @@ -1069,7 +1148,6 @@ time will almost certainly lead to undesired results. Have your choice!}% \MT@map@tlist@n {\!\"\$\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\[\]\_\`\|\~}% \@makeother - \def\MT@remove@spaces##1{}% \let\KV@@sp@def\def } \let\MT@end@catcodes\endgroup @@ -1105,7 +1183,7 @@ time will almost certainly lead to undesired results. Have your choice!}% /\ifnum#3=\@ne \MT@shape\fi /\ifnum#4=\@ne *\fi \MT@context}% - \MT@ifdefined@n{MT@\@tempb @\@tempa}{% + \MT@ifdefined@n@TF{MT@\@tempb @\@tempa}{% \MT@next@listname@#4% }{% \ifnum#1=\@ne @@ -1116,9 +1194,9 @@ time will almost certainly lead to undesired results. Have your choice!}% /\ifnum#3=\@ne \MT@shape\fi /\ifnum#4=\@ne *\fi \MT@context}% - \MT@ifdefined@n{MT@\@tempb @\@tempa}{% + \MT@ifdefined@n@T{MT@\@tempb @\@tempa}{% \MT@next@listname@#4% - }\relax + }% \fi \fi }% @@ -1134,9 +1212,10 @@ time will almost certainly lead to undesired results. Have your choice!}% \fi } \def\MT@if@list@exists{% - \expandafter\let\expandafter\MT@context\csname MT@\MT@feat @context\endcsname + \MT@let@cn\MT@context{MT@\MT@feat @context}% + \MT@ifstreq{@}\MT@context{\let\MT@context\@empty}\relax \MT@get@listname{\MT@feat @c}% - \MT@ifdefined@c\MT@listname{% + \MT@ifdefined@c@TF\MT@listname{% \MT@edef@n{MT@\MT@feat @c@name}{\MT@listname}% \ifMT@nonselected \MT@vinfo{... Applying non-selected expansion (list `\MT@ex@c@name')}% @@ -1161,12 +1240,12 @@ time will almost certainly lead to undesired results. Have your choice!}% \def\MT@get@inh@list{% \let\MT@context\@empty \MT@get@listname{\MT@feat @inh}% - \MT@ifdefined@c\MT@listname{% + \MT@ifdefined@c@TF\MT@listname{% \MT@edef@n{MT@\MT@feat @inh@name}{\MT@listname}% \MT@let@cn\@tempc{MT@\MT@feat @inh@\csname MT@\MT@feat @inh@name\endcsname}% \ifx\@tempc\@empty \else \MT@let@cn\MT@inh@name{MT@\MT@feat @inh@name}% - \def\MT@curr@list@name{inheritance list}% + \edef\MT@curr@list@name{inheritance list\MessageBreak`\MT@inh@name'}% \expandafter\MT@inh@do\@tempc,\relax,% \global\MT@let@nc{MT@\MT@feat @inh@\csname MT@\MT@feat @inh@name\endcsname}\@empty \fi @@ -1176,49 +1255,45 @@ time will almost certainly lead to undesired results. Have your choice!}% } \def\MT@get@slot{% \escapechar`\\ - \let\Mt@char\m@ne + \let\MT@char@\m@ne \MT@noresttrue - \mt@toks=\expandafter\expandafter\expandafter{\expandafter\string\@tempa}% - \edef\MT@char{\expandafter\meaning\@tempa}% + \MT@toks=\expandafter{\@tempa}% \expandafter\MT@is@letter\@tempa\relax\relax - \ifnum\Mt@char < \z@ + \ifnum\MT@char@ < \z@ \MT@exp@two@c\MT@is@active\string\@tempa\@nil - \MT@ifdefined@n{\MT@encoding\MT@detokenize\@tempa}% + \MT@ifdefined@n@TF{\MT@encoding\MT@detokenize@c\@tempa}% \MT@is@symbol - {% - \expandafter\MT@is@composite\@tempa\relax\relax - }% - \ifnum\Mt@char < \z@ - \MT@exp@two@c\MT@is@char\MT@char\MT@charstring\relax\relax\relax + {\expandafter\MT@is@composite\@tempa\relax\relax}% + \ifnum\MT@char@ < \z@ + \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter + \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax \fi \fi - \let\MT@char\Mt@char + \let\MT@char\MT@char@ \ifnum\MT@char < \z@ \MT@warn@unknown \else \ifMT@norest \else - \MT@warn@unknown@i + \MT@warn@rest \let\MT@char\m@ne \fi \fi \escapechar\m@ne } \newif\ifMT@norest -\def\MT@testrest#1#2{% - \MT@ifstreq{#1}{#2}\relax\MT@norestfalse -} +\def\MT@testrest#1#2{\MT@ifstreq{#1}{#2}\relax\MT@norestfalse} \def\MT@is@letter#1#2\relax{% \ifcat a\noexpand#1\relax - \edef\Mt@char{\number`#1}% + \edef\MT@char@{\number`#1}% \ifx\\#2\\% \else \MT@norestfalse \fi \else - \ifcat 1\noexpand#1\relax - \edef\Mt@char{\number`#1}% + \ifcat !\noexpand#1\relax + \edef\MT@char@{\number`#1}% \ifx\\#2\\% - \ifnum\Mt@char>127 \Mt@warn@ascii \fi + \ifnum\MT@char@>127 \MT@warn@ascii \fi \else \MT@norestfalse \expandafter\MT@is@number#1#2\relax\relax @@ -1231,50 +1306,45 @@ time will almost certainly lead to undesired results. Have your choice!}% \ifx\relax#2\relax \else \MT@noresttrue \if#1"\relax - \def\x{\uppercase{\edef\Mt@char{\number#1#2#3}}}\x + \def\x{\uppercase{\edef\MT@char@{\number#1#2#3}}}\x \else \if#1'\relax - \def\Mt@char{\number#1#2#3}% + \def\MT@char@{\number#1#2#3}% \else - \MT@ifnumber{#1#2#3}{% - \def\Mt@char{\number#1#2#3}% + \MT@ifint{#1#2#3}{% + \def\MT@char@{\number#1#2#3}% }\MT@norestfalse \fi \fi - \ifnum\Mt@char > \@cclv + \ifnum\MT@char@ > \@cclv \MT@warn@number@too@large{\noexpand#1\noexpand#2\noexpand#3}% - \let\Mt@char\m@ne + \let\MT@char@\m@ne \fi \fi \fi } \def\MT@is@active#1#2\@nil{% - \ifx\\#2\\% - \ifnum\catcode`#1 = \active - \begingroup - \set@display@protect - \def\IeC##1{##1}% - \def\@inpenc@undefined@##1{undefined^^J% - (microtype)\@spaces\@spaces\@spaces\@spaces - in input encoding ``##1''}% - \edef\x{% - \def\noexpand\@tempa{\@tempa}% - \mt@toks={\the\mt@toks\space (= \@tempa)}% - }% - \expandafter\endgroup\x - \fi + \ifnum\catcode`#1 = \active + \begingroup + \set@display@protect + \let\IeC\@firstofone + \let\@inpenc@undefined@\MT@undefined@char + \def\UTFviii@defined##1{\ifx ##1\relax + \MT@undefined@char{utf8}\else\expandafter##1\fi}% + \edef\x{% + \def\noexpand\@tempa{\@tempa}% + \MT@toks={\the\MT@toks\space(= \@tempa)}% + }% + \expandafter\endgroup\x \fi } +\def\MT@undefined@char#1{undefined in input encoding ``#1''} \def\MT@is@symbol{% - \edef\@tempa{\expandafter - \csname\expandafter - \MT@encoding\expandafter - \string\@tempa - \endcsname}% + \edef\MT@char{\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}% \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter - \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax - \ifnum\Mt@char < \z@ - \expandafter\MT@is@letter\@tempa\relax\relax + \meaning\expandafter\MT@char\MT@charstring\relax\relax\relax + \ifnum\MT@char@ < \z@ + \expandafter\MT@is@letter\MT@char\relax\relax \fi } \begingroup @@ -1286,10 +1356,10 @@ time will almost certainly lead to undesired results. Have your choice!}% /def/MT@is@char##1\CHAR"##2##3##4/relax{% /ifx/relax##1/relax /if##3\/relax - /edef/Mt@char{/number"##2}% + /edef/MT@char@{/number"##2}% /MT@testrest/MT@charstring{##3##4}% /else - /edef/Mt@char{/number"##2##3}% + /edef/MT@char@{/number"##2##3}% /MT@testrest/MT@charstring{##4}% /fi /fi @@ -1299,24 +1369,21 @@ time will almost certainly lead to undesired results. Have your choice!}% /expandafter/endgroup/x \def\MT@is@composite#1#2\relax{% \ifx\\#2\\\else - \edef\@tempa{\expandafter + \edef\MT@char{\expandafter \csname\expandafter \string\csname\MT@encoding\endcsname - \string#1-% - \string#2% + \MT@detokenize@n{#1}-% + \MT@detokenize@n{#2}% \endcsname}% - \expandafter\MT@is@letter\@tempa\relax\relax + \expandafter\MT@is@letter\MT@char\relax\relax \fi } -\ifcase\MT@etex@no - \def\MT@detokenize#1{\MT@exp@two@c\zap@space\strip@prefix\meaning#1 \@empty} -\else - \def\MT@detokenize#1{\detokenize - \expandafter\expandafter\expandafter{\expandafter\string#1}} -\fi -\let\MT@curr@list@name\@empty -\def\Mt@warn@ascii{% - \MT@warning@nl{Character `\the\mt@toks' (= \Mt@char) +\def\MT@set@listname{% + \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\MessageBreak + `\@nameuse{MT@\MT@feat @c@name}'}% +} +\def\MT@warn@ascii{% + \MT@warning@nl{Character `\the\MT@toks' (= \MT@char@) is outside of ASCII range.\MessageBreak You must load the `inputenc' package before using\MessageBreak 8-bit characters in \MT@curr@list@name}% @@ -1326,79 +1393,148 @@ time will almost certainly lead to undesired results. Have your choice!}% Number #1 in encoding `\MT@encoding' too large!\MessageBreak Ignoring it in \MT@curr@list@name}% } -\def\MT@warn@unknown@i{% +\def\MT@warn@rest{% \MT@warning@nl{% - Unknown slot number of character `\the\mt@toks' in\MessageBreak - font encoding `\MT@encoding'. Make sure it's a single\MessageBreak + Unknown slot number of character\MessageBreak`\the\MT@toks'\MessageBreak + in font encoding `\MT@encoding'. Make sure it's a single\MessageBreak character (or a number) in \MT@curr@list@name}% } \def\MT@warn@unknown{% \MT@warning@nl{% - Unknown slot number of character `\the\mt@toks' in\MessageBreak - font encoding `\MT@encoding' in \MT@curr@list@name}% + Unknown slot number of character\MessageBreak`\the\MT@toks'\MessageBreak + in font encoding `\MT@encoding' in \MT@curr@list@name}% } +\let\MT@font@list\@empty \let\MT@font\@empty -\g@addto@macro\do@subst@correction{% - \xdef\MT@font{\csname \curr@fontshape/\f@size\endcsname}% -} -\def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi} -\ifx\pickup@font\MT@orig@pickupfont \else - \MT@warning@nl{% - Command \string\pickup@font\space is not defined as expected.\MessageBreak - Double-check whether micro-typography is indeed\MessageBreak - applied to the document.\MessageBreak (Hint: Turn on `verbose' mode)% +\MT@addto@setup{% + \g@addto@macro\do@subst@correction{% + \xdef\MT@font{\csname \curr@fontshape/\f@size\endcsname}% } -\fi -\g@addto@macro\pickup@font{% - \begingroup - \escapechar\m@ne - \ifx\MT@font\@empty - \let\MT@font\font@name - \else - \ifx\MT@font\font@name \else - \expandafter\MT@xadd - \csname MT@\MT@curr@contexts font@list\endcsname{\font@name,}% + \def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi} + \ifx\pickup@font\MT@orig@pickupfont \else + \MT@warning@nl{% + Command \string\pickup@font\space is not defined as expected.\MessageBreak + Double-check whether micro-typography is indeed\MessageBreak + applied to the document.\MessageBreak (Hint: Turn on `verbose' mode)% + } + \fi + \g@addto@macro\pickup@font{% + \begingroup + \escapechar\m@ne + \ifx\MT@font\@empty + \let\MT@font\font@name + \else + \ifx\MT@font\font@name \else + \MT@register@subst@font + \fi \fi - \fi + \MT@check@font + \ifMT@inlist@ \else + \MT@setupfont + \MT@register@font + \fi + \endgroup + \global\let\MT@font\@empty + } + \let\MT@pickupfont\pickup@font + \let\MT@orig@add@accent\add@accent + \def\add@accent#1#2{% + \let\pickup@font\MT@orig@pickupfont + \MT@orig@add@accent{#1}{#2}% + \let\pickup@font\MT@pickupfont + } +} +\def\MT@check@font{\MT@exp@one@n\MT@in@clist\MT@font\MT@font@list} +\def\MT@register@subst@font{\xdef\MT@font@list{\MT@font@list\font@name,}} +\def\MT@register@font{\xdef\MT@font@list{\MT@font@list\MT@font,}} +\let\MT@active@features\@empty +\def\MT@check@font@cx{% + \@tempswatrue + \MT@map@clist@c\MT@active@features{% \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\MT@font - \csname MT@\MT@curr@contexts font@list\endcsname - \ifMT@inlist@ \else - \MT@setupfont - \expandafter\MT@xadd\csname MT@\MT@curr@contexts font@list\endcsname{\MT@font,}% - \MT@map@tlist@c\MT@doc@contexts\MT@rem@from@lists + \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname + \ifMT@inlist@ + \MT@let@nc{MT@\@nameuse{MT@abbr@##1}}\relax + \else + \@tempswafalse \fi - \endgroup - \global\let\MT@font\@empty + }% + \if@tempswa \MT@inlist@true \else \MT@inlist@false \fi +} +\def\MT@register@subst@font@cx{% + \MT@map@clist@c\MT@active@features{% + \expandafter\MT@xadd + \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname + {\font@name,}% + }% +} +\def\MT@register@font@cx{% + \MT@map@clist@c\MT@active@features{% + \expandafter\ifx\csname MT@\@nameuse{MT@abbr@##1}\endcsname\relax\else + \expandafter\MT@xadd + \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname + {\MT@font,}% + \def\@tempa{##1}% + \expandafter\MT@map@tlist@c + \csname MT@##1@doc@contexts\endcsname + \MT@rem@from@lists + \fi + }% } \def\MT@rem@from@lists#1{% - \MT@ifstreq{#1}\MT@curr@contexts\relax{% - \expandafter\MT@exp@one@n\expandafter\MT@rem@from@list - \expandafter\MT@font\csname MT@#1font@list\endcsname - }% -} -\let\MT@pickupfont\pickup@font -\let\MT@add@accent\add@accent -\def\add@accent#1#2{% - \let\pickup@font\MT@orig@pickupfont - \MT@add@accent{#1}{#2}% - \let\pickup@font\MT@pickupfont -} -\AtBeginDocument{% - \ifx\MT@pickupfont\pickup@font \else - \MT@error{% - Another package has overwritten the definition\MessageBreak - of \string\pickup@font. I might not be able to\MessageBreak - apply any micro-typography. Please find the\MessageBreak - culprit, and load it before the microtype package - }{% -The microtype package attaches the micro-typographic setup to\MessageBreak -\string\pickup@font. If the other package has simply overwritten this\MessageBreak -command, nothing will work. If, on the other hand, it has changed\MessageBreak -the command in a cautious way, everything may be fine.\MessageBreak -In either case, please send a report to <w.m.l@gmx.net>. - }% - \fi + \MT@ifstreq{\@tempa/#1}{\@tempa/\csname MT@\@tempa @context\endcsname}\relax{% + \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist + \expandafter\MT@font\csname MT@\@tempa @#1font@list\endcsname + }% +} +\def\microtypecontext#1{\MT@addto@setup{\microtypecontext{#1}}} +\MT@addto@setup{% + \def\microtypecontext#1{% + \MT@setup@contexts + \setkeys{MTC}{#1}% + \selectfont + \aftergroup\MT@reset@context + }% +} +\def\MT@reset@context{% + \MT@vinfo{Resetting contexts on line \the\inputlineno + }% + \selectfont +} +\def\MT@setup@contexts{% + \MT@map@clist@c\MT@active@features + {\global\MT@let@nc{MT@##1@@font@list}\MT@font@list}% + \global\let\MT@check@font\MT@check@font@cx + \global\let\MT@register@font\MT@register@font@cx + \global\let\MT@register@subst@font\MT@register@subst@font@cx + \global\let\MT@setup@contexts\relax +} +\def\MT@define@context#1{% + \define@key{MTC}{#1}[]{% + \KV@@sp@def\@tempb{#1}% + \edef\@tempb{\@nameuse{MT@rbba@\@tempb}}% + \MT@exp@one@n\MT@in@clist\@tempb\MT@active@features + \ifMT@inlist@ + \MT@ifempty{##1}{\def\MT@val{@}}{\KV@@sp@def\MT@val{##1}}% + \expandafter\ifx\csname MT@\@tempb @context\endcsname\MT@val \else + \MT@vinfo{--- Changing #1 context to `\MT@val'}% + \global\MT@let@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}% + \expandafter\MT@exp@one@n\expandafter\MT@in@tlist + \expandafter\MT@val\csname MT@\@tempb @doc@contexts\endcsname + \ifMT@inlist@ \else + \expandafter\MT@xadd\csname MT@\@tempb @doc@contexts\endcsname{{\MT@val}}% + \fi + \MT@edef@n{MT@\@tempb @context}{\MT@val}% + \fi + \fi + }% } +\MT@map@clist@c\MT@features@long{\MT@define@context{#1}} +\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{% + \MT@def@n{MT@#1@context}{@}% + \MT@def@n{MT@#1@doc@contexts}{{@}}% +} +\let\MT@extra@context\@empty \def\DeclareMicrotypeSet{% \@ifstar {\@ifnextchar[\MT@DeclareSetAndUseIt @@ -1416,23 +1552,25 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@DeclareSet@#1#2#3{% \KV@@sp@def\@tempa{#1}% \MT@ifempty\@tempa{% - \MT@declare@sets{pr}{#2}{#3}% - \MT@declare@sets{ex}{#2}{#3}% + \MT@map@clist@c\MT@features{{\MT@declare@sets{##1}{#2}{#3}}}% }{% - \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@declare@sets - {\csname MT@rbba@\@tempa\endcsname}{#2}{#3}}}% - }% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{set declaration `#2'}{% + \MT@exp@one@n\MT@declare@sets + {\csname MT@rbba@\@tempa\endcsname}{#2}{#3}% + }% + }% + }}% }% } \let\MT@curr@set@name\@empty \def\MT@declare@sets#1#2#3{% \KV@@sp@def\MT@curr@set@name{#2}% - \MT@ifdefined@n{MT@#1@set@@\MT@curr@set@name}{% + \MT@ifdefined@n@T{MT@#1@set@@\MT@curr@set@name}{% \MT@warning{Redefining set `\MT@curr@set@name'}% - }\relax + }% \global\MT@let@nc{MT@#1@set@@\MT@curr@set@name}\@empty \setkeys{MT@#1@set}{#3}% } @@ -1445,34 +1583,26 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@define@set@key@font{#1}% } \def\MT@define@set@key@#1#2{% - \csname MT@#2list@#1@\MT@curr@set@name\endcsname \define@key{MT@#2@set}{#1}[]{% \global\MT@let@nc{MT@#2list@#1@\MT@curr@set@name}\@empty \MT@map@clist@n{##1}{% \KV@@sp@def\MT@val{####1}% \MT@get@highlevel{#1}% - \MT@make@string\MT@val - \expandafter\MT@xadd - \csname MT@#2list@#1@\MT@curr@set@name\endcsname{\MT@val,}% + \MT@exp@two@n\g@addto@macro + {\csname MT@#2list@#1@\MT@curr@set@name\expandafter\endcsname}% + {\MT@val,}% }% + \edef\x{% + \expandafter\noexpand\expandafter\MT@fix@font@spec + \expandafter\noexpand\csname MT@#2list@#1@\MT@curr@set@name\endcsname + }% + \MT@exp@one@n\MT@addto@setup\x }% } \def\MT@get@highlevel#1{% \expandafter\MT@test@ast\MT@val*\@nil{% \MT@ifempty\@tempa{\def\@tempa{#1}}\relax - \edef\MT@val{\csname \@tempa default\endcsname}% - \ifx\@nodocument\relax \else - \expandafter\ifx - \csname MT@check@\MT@curr@set@name @\@tempa\endcsname\@empty - \else - \global\MT@edef@n{MT@\MT@curr@set@name @\@tempa @default}{\MT@val}% - \edef\x{{\MT@curr@set@name}{\@tempa}}% - \MT@exp@one@n\AtBeginDocument{% - \expandafter\MT@check@default\x - }% - \global\MT@let@nc{MT@check@\MT@curr@set@name @\@tempa}\@empty - \fi - \fi + \edef\MT@val{\expandafter\noexpand\csname \@tempa default\endcsname}% }% } \def\MT@test@ast#1*#2\@nil{% @@ -1481,17 +1611,9 @@ In either case, please send a report to <w.m.l@gmx.net>. \@gobble \@firstofone } -\def\MT@check@default#1#2{% - \MT@let@cn\@tempa{MT@#1@#2@default}% - \edef\@tempb{\csname #2default\endcsname}% - \ifx\@tempa\@tempb \else - \MT@warning@nl{% - \expandafter\noexpand\csname #2default\endcsname - has changed (`\@tempa' <> `\@tempb')!\MessageBreak - This might affect the `#1' font set.\MessageBreak - Please make all relevant font changes *before*\MessageBreak - loading the `microtype' package}% - \fi +\def\MT@fix@font@spec#1{% + \xdef#1{#1}% + \global\MT@make@string#1% } \def\MT@define@set@key@size#1{% \define@key{MT@#1@set}{size}[]{% @@ -1500,8 +1622,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \expandafter\MT@get@range\MT@val--\@nil \ifx\MT@val\relax \else \expandafter\MT@xadd - \csname MT@#1list@size@\MT@curr@set@name\endcsname - {{{\MT@lower}{\MT@upper}\relax}}% + \csname MT@#1list@size@\MT@curr@set@name\endcsname + {{{\MT@lower}{\MT@upper}\relax}}% \fi }% }% @@ -1531,7 +1653,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@val{#2}% \MT@get@size \ifx\MT@val\relax \else - \MT@ifgt\MT@lower\MT@val{% + \MT@ifdim\MT@lower>\MT@val{% \MT@warning{% Invalid size range (\MT@lower\space > \MT@val) in font set `\MT@curr@set@name'.\MessageBreak Swapping sizes}% @@ -1540,7 +1662,7 @@ In either case, please send a report to <w.m.l@gmx.net>. }{% \edef\MT@upper{\MT@val}% }% - \MT@ifeq\MT@lower\MT@upper{% + \MT@ifdim\MT@lower=\MT@upper{% \def\MT@upper{-1}% }\relax \fi @@ -1571,13 +1693,19 @@ In either case, please send a report to <w.m.l@gmx.net>. } \def\MT@define@set@key@font#1{% \define@key{MT@#1@set}{font}[]{% + \global\MT@let@nc{MT@#1list@font@\MT@curr@set@name}\@empty \MT@map@clist@n{##1}{% \KV@@sp@def\MT@val{####1}% \expandafter\MT@get@font\MT@val/////\@nil - \expandafter\MT@xadd - \csname MT@#1list@font@\MT@curr@set@name\endcsname - {\csname\MT@val\endcsname,}% + \MT@exp@two@n\g@addto@macro + {\csname MT@#1list@font@\MT@curr@set@name\expandafter\endcsname}% + {\MT@val,}% }% + \edef\x{% + \expandafter\noexpand\expandafter\MT@fix@font@spec + \expandafter\noexpand\csname MT@#1list@font@\MT@curr@set@name\endcsname + }% + \MT@exp@one@n\MT@addto@setup\x }% } \def\MT@get@font#1/#2/#3/#4/#5/#6\@nil{% @@ -1589,51 +1717,55 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@get@axis{series}{#3}% \MT@get@axis{shape}{#4}% \MT@ifempty{#5}{% - \MT@warning{size axis is empty in font specification\MessageBreak - `\MT@temp'. Using \string\normalsize\space instead}% + \MT@warn@axis@empty{size}{\string\normalsize}% \def\MT@val{*}% }{% \def\MT@val{#5}% }% \MT@get@size \ifx\MT@val\relax\def\MT@val{0}\fi - \edef\MT@val{\expandafter\@gobble\@tempb/\MT@val}% + \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val}% + \let\MT@val\@tempb }% } \def\MT@get@axis#1#2{% \def\MT@val{#2}% \MT@get@highlevel{#1}% \MT@ifempty\MT@val{% - \MT@warning{#1 axis is empty in font specification\MessageBreak - `\MT@temp'. Using `\csname #1default\endcsname' instead}% - \edef\@tempb{\@tempb/\csname #1default\endcsname}% - }{% - \edef\@tempb{\@tempb/\MT@val}% - }% + \MT@warn@axis@empty{#1}{\csname #1default\endcsname}% + \expandafter\def\expandafter\MT@val\expandafter{\csname #1default\endcsname}% + }\relax + \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val/}% +} +\def\MT@warn@axis@empty#1#2{% + \MT@warning{#1 axis is empty in font specification\MessageBreak + `\MT@temp'. Using `#2' instead}% } -\MT@define@set@keys{pr} -\MT@define@set@keys{ex} +\MT@map@clist@c\MT@features{\MT@define@set@keys{#1}} \MT@define@set@keys{nl} \renewcommand*\UseMicrotypeSet[2][]{% \KV@@sp@def\@tempa{#1}% \MT@ifempty\@tempa{% - \MT@use@set{pr}{#2}% - \MT@use@set{ex}{#2}% + \MT@map@clist@c\MT@features{{\MT@use@set{##1}{#2}}}% }{% \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@use@set{\csname MT@rbba@\@tempa\endcsname}{#2}}}% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{activation of set `#2'}{% + \MT@exp@one@n\MT@use@set + {\csname MT@rbba@\@tempa\endcsname}{#2}% + }% + }% }% }% } \def\MT@use@set#1#2{% \KV@@sp@def\@tempa{#2}% - \MT@ifdefined@n{MT@#1@set@@\@tempa}{% + \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{% \global\MT@edef@n{MT@#1@setname}{\@tempa}% \MT@info{Using \@nameuse{MT@abbr@#1} set `\@tempa'}% }{% - \MT@ifdefined@n{MT@#1@setname}\relax{% + \MT@ifdefined@n@TF{MT@#1@setname}\relax{% \global\MT@edef@n{MT@#1@setname}{\@nameuse{MT@default@#1@set}}% }% \MT@warning{% @@ -1644,20 +1776,22 @@ In either case, please send a report to <w.m.l@gmx.net>. \renewcommand*\DeclareMicrotypeSetDefault[2][]{% \KV@@sp@def\@tempa{#1}% \MT@ifempty\@tempa{% - \MT@set@default@set{pr}{#2}% - \MT@set@default@set{ex}{#2}% + \MT@map@clist@c\MT@features{{\MT@set@default@set{##1}{#2}}}% }{% - \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@set@default@set - {\csname MT@rbba@\@tempa\endcsname}{#2}}}% - }% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{declaration of default set `#2'}{% + \MT@exp@one@n\MT@set@default@set + {\csname MT@rbba@\@tempa\endcsname}{#2}% + }% + }% + }}% }% } \def\MT@set@default@set#1#2{% \KV@@sp@def\@tempa{#2}% - \MT@ifdefined@n{MT@#1@set@@\@tempa}{% + \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{% \global\MT@edef@n{MT@default@#1@set}{\@tempa}% }{% \MT@warning{% @@ -1670,14 +1804,14 @@ In either case, please send a report to <w.m.l@gmx.net>. \KV@@sp@def\@tempa{#1}% \KV@@sp@def\@tempb{#2}% \MT@make@string\@tempb - \MT@ifdefined@n{MT@\@tempa @alias}{% + \MT@ifdefined@n@T{MT@\@tempa @alias}{% \MT@warning{Alias font family `\@tempb' will override alias `\@nameuse{MT@\@tempa @alias}'\MessageBreak - for font family `\@tempa'}}\relax + for font family `\@tempa'}}% \global\MT@edef@n{MT@\@tempa @alias}{\@tempb}% - \MT@ifdefined@c\MT@family{% + \MT@ifdefined@c@T\MT@family{% \global\let\MT@familyalias\@tempb - }\relax + }% } \def\LoadMicrotypeFile#1{% \KV@@sp@def\@tempa{#1}% @@ -1689,7 +1823,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@xadd\MT@file@list{\@tempa,}% \MT@begin@catcodes \InputIfFileExists{mt-\@tempa.cfg}{% - \MT@vinfo{... Loading configuration file mt-\@tempa.cfg}% + \edef\MT@curr@file{mt-\@tempa.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% }{% \MT@warning{... Configuration file mt-\@tempa.cfg\MessageBreak does not exist}% @@ -1697,32 +1832,30 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@end@catcodes \fi } -\ifnum\MT@pdftex@no > 4 +\MT@requires@pdftex5{ \renewcommand*\DisableLigatures[1]{% + \edef\MT@active@features{\MT@active@features,nl}% \MT@noligaturestrue \MT@declare@sets{nl}{no ligatures}{#1}% \gdef\MT@nl@setname{no ligatures}% } -\else +}{ \renewcommand*\DisableLigatures[1]{% \MT@warning{Disabling ligatures of a font is only possible\MessageBreak - with pdftex version 1.30 or later.\MessageBreak + with pdftex version 1.30 or newer.\MessageBreak Ignoring \string\DisableLigatures}% - \let\DisableLigatures\@gobble + \global\let\DisableLigatures\@gobble } -\fi +} \renewcommand*\SetProtrusion[2][]{% \let\MT@pr@c@name\@undefined - \let\MT@load\@undefined - \let\MT@extra@factor\@undefined - \let\MT@extra@unit\@undefined - \let\MT@extra@preset\@undefined \let\MT@extra@context\@empty + \MT@map@clist@n{load,factor,unit,preset}{\MT@let@nc{MT@extra@##1}\@undefined}% \setkeys{MT@pr@c}{#1}% \MT@get@codes@name{pr}% - \MT@set@pr@opt + \MT@map@clist@n{factor,unit,preset}{\MT@set@opt{pr}{##1}}% \def\MT@permutelist{pr@c}% - \setkeys{MT@pr@c}{#2}% + \setkeys{MT@cfg}{#2}% \MT@permute \MT@begin@catcodes \MT@set@pr@list @@ -1733,19 +1866,23 @@ In either case, please send a report to <w.m.l@gmx.net>. } \renewcommand*\SetExpansion[2][]{% \let\MT@ex@c@name\@undefined - \let\MT@load\@undefined - \let\MT@extra@factor\@undefined - \let\MT@extra@stretch\@undefined - \let\MT@extra@shrink\@undefined - \let\MT@extra@step\@undefined - \let\MT@extra@auto\@undefined - \let\MT@extra@preset\@undefined \let\MT@extra@context\@empty + \MT@map@clist@n{load,factor,preset,stretch,shrink,step,auto}% + {\MT@let@nc{MT@extra@##1}\@undefined}% \setkeys{MT@ex@c}{#1}% \MT@get@codes@name{ex}% - \MT@set@ex@opt + \MT@map@clist@n{preset,stretch,shrink,step,auto}{\MT@set@opt{ex}{##1}}% + \MT@ifdefined@c@T\MT@extra@factor{% + \ifnum\MT@extra@factor>\@m + \MT@warning@nl{Expansion factor \number\MT@extra@factor\space too + large in list\MessageBreak `\MT@ex@c@name'. Setting it to the + maximum of 1000}% + \let\MT@extra@factor\@m + \fi + \global\MT@let@nc{MT@ex@c@\MT@ex@c@name @factor}\MT@extra@factor + }% \def\MT@permutelist{ex@c}% - \setkeys{MT@ex@c}{#2}% + \setkeys{MT@cfg}{#2}% \MT@permute \MT@begin@catcodes \MT@set@ex@list @@ -1755,51 +1892,22 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@end@catcodes } \def\MT@get@codes@name#1{% - \MT@ifdefined@n{MT@#1@c@name}{% - \MT@ifdefined@n{MT@#1@c@\csname MT@#1@c@name\endcsname}{% + \MT@ifdefined@n@TF{MT@#1@c@name}{% + \MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{% \MT@warning{Redefining list `\@nameuse{MT@#1@c@name}'}% - }\relax - }{% - \@tempcnta=\@ne - \MT@while@num{\@tempcnta > \z@}{% - \MT@ifdefined@n{MT@#1@c@#1-\romannumeral\@tempcnta}{% - \advance \@tempcnta \@ne - }{% - \MT@edef@n{MT@#1@c@name}{#1-\romannumeral\@tempcnta}% - \@tempcnta=\z@ - }% }% + }{% + \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}% }% \MT@let@cn\MT@curr@set@name{MT@#1@c@name}% - \MT@ifdefined@c\MT@load{% - \global\MT@let@nc{MT@#1@c@\MT@curr@set@name load}\MT@load - }\relax -} -\def\MT@set@pr@opt{% - \MT@set@opt@{pr}{factor}% - \MT@set@opt@{pr}{unit}% - \MT@set@opt@{pr}{preset}% + \MT@ifdefined@c@T\MT@extra@load{% + \global\MT@let@nc{MT@#1@c@\MT@curr@set@name load}\MT@extra@load + }% } -\def\MT@set@ex@opt{% - \MT@ifdefined@c\MT@extra@factor{% - \ifnum\MT@extra@factor>\@m - \MT@warning@nl{Expansion factor \number\MT@extra@factor\space too - large in list\MessageBreak `\MT@ex@c@name'. Setting it to the - maximum of 1000}% - \let\MT@extra@factor\@m - \fi - \global\MT@let@nc{MT@ex@c@\MT@ex@c@name @factor}\MT@extra@factor - }\relax - \MT@set@opt@{ex}{stretch}% - \MT@set@opt@{ex}{shrink}% - \MT@set@opt@{ex}{step}% - \MT@set@opt@{ex}{auto}% - \MT@set@opt@{ex}{preset}% -} -\def\MT@set@opt@#1#2{% - \MT@ifdefined@n{MT@extra@#2}{% +\def\MT@set@opt#1#2{% + \MT@ifdefined@n@T{MT@extra@#2}{% \global\MT@let@nn{MT@#1@c@\csname MT@#1@c@name\endcsname @#2}{MT@extra@#2}% - }\relax + }% } \def\MT@define@code@key#1#2{% \define@key{MT@#2}{#1}[]{% @@ -1807,7 +1915,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@map@clist@n{##1}{% \KV@@sp@def\MT@val{####1}% \MT@get@highlevel{#1}% - \MT@edef@n{MT@temp#1\romannumeral\@tempcnta}{\MT@val}% + \MT@edef@n{MT@temp#1\the\@tempcnta}{\MT@val}% \advance\@tempcnta \@ne }% }% @@ -1818,9 +1926,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \KV@@sp@def\MT@val{####1}% \expandafter\MT@get@range\MT@val--\@nil \ifx\MT@val\relax \else - \expandafter\MT@xadd - \csname MT@tempsize\endcsname - {{{\MT@lower}{\MT@upper}{\csname MT@#1@name\endcsname}}}% + \expandafter\MT@xadd\csname MT@tempsize\endcsname + {{{\MT@lower}{\MT@upper}{\MT@curr@set@name}}}% \fi }% }% @@ -1830,11 +1937,11 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@map@clist@n{##1}{% \KV@@sp@def\MT@val{####1}% \expandafter\MT@get@font@and@size\MT@val/////\@nil - \global\MT@edef@n{MT@\MT@permutelist @\@tempb}% + \global\MT@edef@n{MT@\MT@permutelist @\@tempb\MT@extra@context}% {\csname MT@\MT@permutelist @name\endcsname}% \expandafter\MT@xaddb - \csname MT@\MT@permutelist @\@tempb @sizes\endcsname - {{{\MT@val}{\m@ne}{\csname MT@#1@name\endcsname}}}% + \csname MT@\MT@permutelist @\@tempb\MT@extra@context @sizes\endcsname + {{{\MT@val}{\m@ne}{\MT@curr@set@name}}}% }% }% } @@ -1846,10 +1953,9 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@get@axis{family}{#2}% \MT@get@axis{series}{#3}% \MT@get@axis{shape}{#4}% - \edef\@tempb{\expandafter\@gobble\@tempb/*}% + \edef\@tempb{\@tempb*}% \MT@ifempty{#5}{% - \MT@warning{size axis is empty in font specification\MessageBreak - `\MT@temp'. Using \string\normalsize\space instead}% + \MT@warn@axis@empty{size}{\string\normalsize}% \def\MT@val{*}% }{% \def\MT@val{#5}% @@ -1857,41 +1963,25 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@get@size }% } +\MT@define@code@key{encoding}{cfg} +\MT@define@code@key{family}{cfg} +\MT@define@code@key{series}{cfg} +\MT@define@code@key{shape}{cfg} +\MT@define@code@key@size{cfg} +\MT@define@code@key@font{cfg} \def\MT@declare@codes#1{% \define@key{MT@#1@c}{name}[]{% - \MT@ifempty{##1}\relax{% - \MT@def@n{MT@#1@c@name}{##1}% - }% - }% + \MT@ifempty{##1}\relax{\MT@def@n{MT@#1@c@name}{##1}}}% \define@key{MT@#1@c}{load}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@load{##1}% - }% - }% + \MT@ifempty{##1}\relax{\def\MT@extra@load{##1}}}% \define@key{MT@#1@c}{factor}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@extra@factor{##1 }% - }% - }% - \MT@define@code@key{encoding}{#1@c}% - \MT@define@code@key{family}{#1@c}% - \MT@define@code@key{series}{#1@c}% - \MT@define@code@key{shape}{#1@c}% - \MT@define@code@key@size{#1@c}% - \MT@define@code@key@font{#1@c}% + \MT@ifempty{##1}\relax{\def\MT@extra@factor{##1 }}}% \define@key{MT@#1@c}{preset}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@extra@preset{##1}% - }% - }% + \MT@ifempty{##1}\relax{\def\MT@extra@preset{##1}}}% \define@key{MT@#1@c}{context}[]{% - \MT@ifempty{##1}\relax{% - \def\MT@extra@context{##1}% - }% - }% + \MT@ifempty{##1}\relax{\def\MT@extra@context{##1}}}% } -\MT@declare@codes{pr} -\MT@declare@codes{ex} +\MT@map@clist@c\MT@features{\MT@declare@codes{#1}} \define@key{MT@pr@c}{unit}[character]{% \let\MT@extra@unit\@empty \KV@@sp@def\@tempa{#1}% @@ -1914,7 +2004,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@define@ex@c@key#1{% \define@key{MT@ex@c}{#1}[]{% \MT@ifempty{##1}\relax{% - \MT@ifnumber{##1}{% + \MT@ifint{##1}{% \MT@def@n{MT@extra@#1}{##1 }% }{% \MT@warning{% @@ -1930,62 +2020,53 @@ In either case, please send a report to <w.m.l@gmx.net>. \define@key{MT@ex@c}{auto}[true]{% \KV@@sp@def\@tempa{#1}% \csname if\@tempa\endcsname - \ifnum\MT@pdftex@no > \thr@@ + \MT@requires@pdftex4{% \def\MT@extra@auto{autoexpand}% - \else + }{% \MT@warning{pdfTeX too old for automatic font expansion}% - \fi + } \else - \ifnum\MT@pdftex@no > \thr@@ + \MT@requires@pdftex4{% \let\MT@extra@auto\@empty - \fi + }\relax \fi } \renewcommand*\DeclareCharacterInheritance[1][]{% + \let\MT@extra@context\@empty \KV@@sp@def\@tempa{#1}% \MT@begin@catcodes \MT@set@inh@list } \def\MT@set@inh@list#1#2{% \MT@ifempty\@tempa{% - \MT@declare@char@inh{pr}{#1}{#2}% - \MT@declare@char@inh{ex}{#1}{#2}% + \MT@map@clist@c\MT@features{{\MT@declare@char@inh{##1}{#1}{#2}}}% }{% - \MT@map@clist@c\@tempa{% - {\KV@@sp@def\@tempa{##1}% - \MT@ifempty\@tempa\relax{% - \MT@exp@one@n\MT@declare@char@inh - {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}}}% - }% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{inheritance declaration for `#1'}{% + \MT@exp@one@n\MT@declare@char@inh + {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}% + }% + }% + }}% }% \MT@end@catcodes } \def\MT@declare@char@inh#1#2#3{% - \MT@let@nc{MT@#1@inh@name}\@undefined - \MT@get@inh@name{#1}% + \MT@edef@n{MT@#1@inh@name}% + {\MT@curr@file/\the\inputlineno (\@nameuse{MT@abbr@#1})}% + \MT@let@cn\MT@curr@set@name{MT@#1@inh@name}% \global\MT@def@n{MT@#1@inh@\csname MT@#1@inh@name\endcsname}{#3}% \def\MT@permutelist{#1@inh}% - \setkeys{MT@#1@inh}{#2}% + \setkeys{MT@inh}{#2}% \MT@permute } -\def\MT@get@inh@name#1{% - \@tempcnta=\@ne - \MT@while@num{\@tempcnta > \z@}{% - \MT@ifdefined@n{MT@#1@inh@#1-inh-\romannumeral\@tempcnta}{% - \advance \@tempcnta \@ne - }{% - \MT@edef@n{MT@#1@inh@name}{#1-inh-\romannumeral\@tempcnta}% - \@tempcnta=\z@ - }% - }% -} -\def\MT@define@inh@key@encoding#1{% - \define@key{MT@#1}{encoding}[]{% - \def\MT@val{##1}% - \expandafter\MT@encoding@check\MT@val,\@nil - \MT@get@highlevel{encoding}% - \MT@edef@n{MT@tempencoding\romannumeral1}{\MT@val}% - }% +\define@key{MT@inh}{encoding}[]{% + \def\MT@val{#1}% + \expandafter\MT@encoding@check\MT@val,\@nil + \MT@get@highlevel{encoding}% + \MT@edef@n{MT@tempencoding1}{\MT@val}% } \def\MT@encoding@check#1,#2\@nil{% \MT@ifempty{#2}\relax{% @@ -1994,16 +2075,11 @@ In either case, please send a report to <w.m.l@gmx.net>. inheritance lists. Ignoring encoding(s) #2}% }% } -\def\MT@define@inh@keys#1{% - \MT@define@inh@key@encoding{#1@inh}% - \MT@define@code@key{family}{#1@inh}% - \MT@define@code@key{series}{#1@inh}% - \MT@define@code@key{shape}{#1@inh}% - \MT@define@code@key@size{#1@inh}% - \MT@define@code@key@font{#1@inh}% -} -\MT@define@inh@keys{pr} -\MT@define@inh@keys{ex} +\MT@define@code@key{family}{inh} +\MT@define@code@key{series}{inh} +\MT@define@code@key{shape}{inh} +\MT@define@code@key@size{inh} +\MT@define@code@key@font{inh} \def\MT@inh@do#1,{% \ifx\relax#1\@empty \else \MT@inh@split #1==\relax @@ -2039,35 +2115,40 @@ In either case, please send a report to <w.m.l@gmx.net>. \let\MT@cnt@family\@ne \MT@permute@@ \MT@increment\MT@cnt@encoding - \MT@ifdefined@n{MT@tempencoding\romannumeral\MT@cnt@encoding}% + \MT@ifdefined@n@T{MT@tempencoding\MT@cnt@encoding}% \MT@permute@ - \relax } \def\MT@permute@@{% \let\MT@cnt@series\@ne \MT@permute@@@ \MT@increment\MT@cnt@family - \MT@ifdefined@n{MT@tempfamily\romannumeral\MT@cnt@family}% + \MT@ifdefined@n@T{MT@tempfamily\MT@cnt@family}% \MT@permute@@ - \relax } \def\MT@permute@@@{% \let\MT@cnt@shape\@ne \MT@permute@@@@ \MT@increment\MT@cnt@series - \MT@ifdefined@n{MT@tempseries\romannumeral\MT@cnt@series}% + \MT@ifdefined@n@T{MT@tempseries\MT@cnt@series}% \MT@permute@@@ - \relax } \def\MT@permute@@@@{% \MT@permute@@@@@ \MT@increment\MT@cnt@shape - \MT@ifdefined@n{MT@tempshape\romannumeral\MT@cnt@shape}% + \MT@ifdefined@n@T{MT@tempshape\MT@cnt@shape}% \MT@permute@@@@ - \relax } \def\MT@permute@@@@@{% \MT@permute@define{encoding}% + \ifMT@document + \ifx\MT@tempencoding\@empty \else + \MT@ifdefined@n@TF{T@\MT@tempencoding}\relax + {\expandafter\expandafter\expandafter\@gobble}% + \fi + \fi + \MT@permute@@@@@@ +} +\def\MT@permute@@@@@@{% \MT@permute@define{family}% \MT@permute@define{series}% \MT@permute@define{shape}% @@ -2075,7 +2156,7 @@ In either case, please send a report to <w.m.l@gmx.net>. /\MT@tempfamily /\MT@tempseries /\MT@tempshape - /\MT@ifdefined@c\MT@tempsize *\@empty}% + /\MT@ifdefined@c@T\MT@tempsize *}% \def\@tempb{////}% \ifx\@tempa\@tempb \else \ifx\MT@tempencoding\@empty @@ -2085,21 +2166,22 @@ In either case, please send a report to <w.m.l@gmx.net>. `\@nameuse{MT@\MT@permutelist @name}'.\MessageBreak Ignoring it}% \else - \MT@ifdefined@c\MT@tempsize{% - \MT@ifdefined@n{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{% + \MT@ifdefined@c@TF\MT@tempsize{% + \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{% \MT@map@tlist@c \MT@tempsize \MT@check@rlist - }\relax + }% \expandafter\MT@xaddb \csname MT@\MT@permutelist @\@tempa\MT@extra@context @sizes\endcsname \MT@tempsize }{% - \MT@ifdefined@n{MT@\MT@permutelist @\@tempa\MT@extra@context}{% + \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context}{% \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list `\@nameuse{MT@\MT@permutelist @name}' will override list\MessageBreak - `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}' for font `\@tempa'}% - }\relax + `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}' + for font `\@tempa'}% + }% }% \global\MT@edef@n{MT@\MT@permutelist @\@tempa\MT@extra@context}% {\csname MT@\MT@permutelist @name\endcsname}% @@ -2108,8 +2190,8 @@ In either case, please send a report to <w.m.l@gmx.net>. } \def\MT@permute@define#1{% \expandafter\@tempcnta=\csname MT@cnt@#1\endcsname\relax - \MT@ifdefined@n{MT@temp#1\romannumeral\@tempcnta}% - {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\romannumeral\@tempcnta\endcsname}}% + \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}% + {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\the\@tempcnta\endcsname}}% {\MT@let@nc{MT@temp#1}\@empty}% } \def\MT@permute@reset{% @@ -2122,16 +2204,14 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\MT@permute@reset@#1{% \@tempcnta=\@ne \MT@loop - \MT@let@nc{MT@temp#1\romannumeral\@tempcnta}\@undefined + \MT@let@nc{MT@temp#1\the\@tempcnta}\@undefined \advance\@tempcnta\@ne - \MT@ifdefined@n{MT@temp#1\romannumeral\@tempcnta}% + \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}% \iftrue \iffalse \MT@repeat } -\def\MT@check@rlist#1{% - \expandafter\MT@check@rlist@#1% -} +\def\MT@check@rlist#1{\expandafter\MT@check@rlist@ #1} \def\MT@check@rlist@#1#2#3{% \def\@tempb{#1}% \def\@tempc{#2}% @@ -2140,29 +2220,27 @@ In either case, please send a report to <w.m.l@gmx.net>. \csname MT@\MT@permutelist @\@tempa\MT@extra@context @sizes\endcsname \MT@check@range } -\def\MT@check@range#1{% - \expandafter\MT@check@range@#1% -} +\def\MT@check@range#1{\expandafter\MT@check@range@ #1} \def\MT@check@range@#1#2#3{% - \MT@ifeq{#2}\m@ne{% - \MT@ifeq\@tempc\m@ne{% - \MT@ifeq\@tempb{#1}\@tempswatrue\relax + \MT@ifdim{#2}=\m@ne{% + \MT@ifdim\@tempc=\m@ne{% + \MT@ifdim\@tempb={#1}\@tempswatrue\relax }{% - \MT@ifgt\@tempb{#1}\relax{% - \MT@ifgt\@tempc{#1}{% + \MT@ifdim\@tempb>{#1}\relax{% + \MT@ifdim\@tempc>{#1}{% \@tempswatrue \edef\@tempb{#1 (with range: \@tempb\space to \@tempc)}% }\relax }% }% }{% - \MT@ifeq\@tempc\m@ne{% - \MT@iflt\@tempb{#2}{% - \MT@iflt\@tempb{#1}\relax\@tempswatrue + \MT@ifdim\@tempc=\m@ne{% + \MT@ifdim\@tempb<{#2}{% + \MT@ifdim\@tempb<{#1}\relax\@tempswatrue }\relax }{% - \MT@iflt\@tempb{#2}{% - \MT@ifgt\@tempc{#1}{% + \MT@ifdim\@tempb<{#2}{% + \MT@ifdim\@tempc>{#1}{% \@tempswatrue \edef\@tempb{#1 to #2 (with range: \@tempb\space to \@tempc)}% }\relax @@ -2176,119 +2254,9 @@ In either case, please send a report to <w.m.l@gmx.net>. \expandafter\MT@tlist@break \fi } -\def\microtypesetup{\setkeys{MTX}} -\def\MT@define@optionX#1#2{% - \define@key{MTX}{#1}[true]{% - \KV@@sp@def\@tempb{#1}% - \MT@map@clist@n{##1}{% - \KV@@sp@def\MT@val{####1}% - \edef\@tempb{\csname MT@rbba@\@tempb\endcsname}% - \MT@ifempty\MT@val\relax{% - \@tempcnta=\m@ne - \MT@ifstreq\MT@val{true}{% - \MT@checksetup\@tempb{% - \expandafter\@tempcnta=\csname MT@\@tempb @level\endcsname - \MT@info{Enabling #1 - (level \number\csname MT@\@tempb @level\endcsname)}% - }% - }{% - \MT@ifstreq\MT@val{false}{% - \@tempcnta=\z@ - \MT@info{Disabling #1}% - }{% - \MT@ifstreq\MT@val{compatibility}{% - \MT@checksetup\@tempb{% - \@tempcnta=\@ne - \MT@let@nc{MT@\@tempb @level}\@ne - \MT@info{Setting #1 to level 1}% - }% - }{% - \MT@ifstreq\MT@val{nocompatibility}{% - \MT@checksetup\@tempb{% - \@tempcnta=\tw@ - \MT@let@nc{MT@\@tempb @level}\tw@ - \MT@info{Setting #1 to level 2}% - }% - }{% - \MT@warning{% - Value `\MT@val' for key `#1' not recognized.\MessageBreak - Use any of `true', `false', `compatibility' or\MessageBreak - `nocompatibility'}% - }% - }% - }% - }% - \ifnum\@tempcnta>\m@ne - #2\@tempcnta\relax - \fi - }% - }% - }% -} -\def\MT@checksetup#1{% - \expandafter\csname ifMT@\csname MT@abbr@#1\endcsname\endcsname - \expandafter\@firstofone - \else - \MT@warning{% - You cannot enable \@nameuse{MT@abbr@#1} if it was disabled\MessageBreak - in the package options,}% - \expandafter\@gobble - \fi -} -\MT@define@optionX{protrusion}\pdfprotrudechars -\MT@define@optionX{expansion}\pdfadjustspacing -\define@key{MTX}{activate}[]{% - \setkeys{MTX}{protrusion={#1}}% - \setkeys{MTX}{expansion={#1}}% -} -\def\microtypecontext#1{% - \setkeys{MTC}{#1}% - \edef\MT@curr@contexts{\MT@pr@context|% - \MT@ex@context|% - \MT@sp@context|% - \MT@kn@context}% - \MT@exp@one@n\MT@in@tlist\MT@curr@contexts\MT@doc@contexts - \ifMT@inlist@ \else - \MT@xadd\MT@doc@contexts{{\MT@curr@contexts}}% - \fi - \selectfont - \aftergroup\MT@reset@context -} -\def\MT@reset@context{% - \MT@vinfo{Resetting contexts on line \the\inputlineno}% - \selectfont -} -\def\MT@define@context#1{% - \define@key{MTC}{#1}[]{% - \KV@@sp@def\@tempb{#1}% - \edef\@tempb{\@nameuse{MT@rbba@\@tempb}}% - \KV@@sp@def\MT@val{##1}% - \MT@vinfo{--- Changing #1 context to `\MT@val'}% - \MT@edef@n{MT@\@tempb @context}{\MT@val}% - \MT@ifempty\MT@val\relax{% - \global\MT@let@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}% - }% - }% -} -\MT@define@context{protrusion} -\MT@define@context{expansion} -\let\MT@pr@context\@empty -\let\MT@ex@context\@empty -\def\MT@curr@contexts{|||} -\def\MT@doc@contexts{{|||}} -\let\MT@extra@context\@empty -\def\MT@gobblethree#1#2#3{} -\let\MT@saved@setupfont\MT@setupfont -\define@key{MTX}{disable}[]{% - \MT@info{Inactivate microtype package}% - \let\MT@setupfont\MT@gobblethree -} -\define@key{MTX}{enable}[]{% - \MT@info{Reactivate microtype package}% - \let\MT@setupfont\MT@saved@setupfont -} \newif\ifMT@opt@expansion \newif\ifMT@opt@auto +\newif\ifMT@opt@DVI \def\MT@define@option#1{% \define@key{MT}{#1}[true]{% \csname MT@opt@#1true\endcsname @@ -2308,7 +2276,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@ifstreq\MT@val{nocompatibility}{% \MT@let@nc{MT@\@tempb @level}\tw@ }{% - \MT@ifdefined@n{MT@\@tempb @set@@\MT@val}{% + \MT@ifdefined@n@TF{MT@\@tempb @set@@\MT@val}{% \global\MT@edef@n{MT@\@tempb @setname}{\MT@val}% }{% \global\MT@edef@n{MT@\@tempb @setname}% @@ -2331,7 +2299,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \setkeys{MT}{protrusion={#1}}% \setkeys{MT}{expansion={#1}}% } -\def\MT@def@bool@opt#1{% +\def\MT@def@bool@opt#1#2{% \define@key{MT}{#1}[]{% \MT@ifempty{##1}% {\def\@tempa{true}}% @@ -2344,26 +2312,36 @@ In either case, please send a report to <w.m.l@gmx.net>. \def\@tempa{false}% }% }% - \csname MT@#1\@tempa\endcsname + #2% }% } -\MT@map@tlist@n{{draft}{DVIoutput}{auto}{selected}% -}\MT@def@bool@opt -\define@key{MT}{final}[]{% - \MT@draftfalse - \MT@ifempty{#1}% - {\def\@tempa{true}}% - {\def\@tempa{#1}}% - \MT@ifstreq\@tempa{true}\relax{% - \MT@ifstreq\@tempa{false}% - \MT@drafttrue - {% - \MT@warning@nl{% - `#1' is not an admissible value for option\MessageBreak - `final'. Assuming `true'}% - \MT@draftfalse +\def\MT@def@simple@bool@opt#1{\MT@def@bool@opt{#1}{\csname MT@#1\@tempa\endcsname}} +\MT@map@tlist@n{{draft}{auto}{selected}% +}\MT@def@simple@bool@opt +\MT@def@bool@opt{DVIoutput}{% + \csname if\@tempa\endcsname + \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi + \pdfoutput\z@ + \else + \ifnum\pdfoutput<\@ne \MT@opt@DVItrue \fi + \pdfoutput\@ne + \fi +} +\MT@def@bool@opt{defersetup}{% + \csname if\@tempa\endcsname \else + \AtEndOfPackage{% + \MT@setup@ + \let\MT@setup@\@empty + \let\MT@addto@setup\@firstofone }% - }% + \fi +} +\MT@def@bool@opt{final}{% + \csname if\@tempa\endcsname + \MT@draftfalse + \else + \MT@drafttrue + \fi } \define@key{MT}{verbose}[]{% \let\MT@vinfo\MT@info@nl @@ -2389,7 +2367,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@ifempty{##1}% {\MT@let@cn\@tempa{MT@#1@default}}% {\def\@tempa{##1 }}% - \MT@ifnumber\@tempa{% + \MT@ifint\@tempa{% \MT@edef@n{MT@#1}{\@tempa}% }{\MT@warning@nl{% Value `##1' for option `#1' is not a number.\MessageBreak @@ -2403,8 +2381,8 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@ifempty{#1}% {\let\@tempa\MT@factor@default}% {\def\@tempa{#1 }}% - \MT@ifnumber\@tempa{% - \MT@edef@n{MT@pr@factor}{\@tempa}% + \MT@ifint\@tempa{% + \edef\MT@pr@factor{\@tempa}% }{\MT@warning@nl{% Value `#1' for option `factor' is not a number.\MessageBreak Using default value of \number\MT@factor@default}% @@ -2430,16 +2408,16 @@ In either case, please send a report to <w.m.l@gmx.net>. }% } \MT@protrusiontrue -\ifnum\pdfoutput=\z@ \else - \ifnum\MT@pdftex@no > \thr@@ +\ifnum\pdfoutput<\@ne \else + \MT@requires@pdftex4{ \MT@expansiontrue \MT@autotrue - \fi + }\relax \fi \define@key{MT}{config}[]{\relax} \def\MT@get@config#1config=#2,#3\@nil{% \MT@ifempty{#2}% - {\def\MT@config@file{microtype.cfg}}% + {\def\MT@config@file{\MT@MT.cfg}}% {\KV@@sp@def\MT@config@file{#2.cfg}}% } \expandafter\expandafter\expandafter\MT@get@config @@ -2447,39 +2425,111 @@ In either case, please send a report to <w.m.l@gmx.net>. \IfFileExists{\MT@config@file}{% \MT@info@nl{Loading configuration file \MT@config@file}% \MT@begin@catcodes - \let\MT@begin@catcodes\relax - \let\MT@end@catcodes\relax - \input{\MT@config@file}% + \let\MT@begin@catcodes\relax + \let\MT@end@catcodes\relax + \let\MT@curr@file\MT@config@file + \input{\MT@config@file}% \endgroup -}{% - \MT@warning@nl{% +}{\MT@warning@nl{% Could not find configuration file `\MT@config@file'!\MessageBreak This will almost certainly cause undesired results.\MessageBreak Please fix your installation}% } -\MT@ifdefined@c\MT@default@pr@set\relax{\gdef\MT@default@pr@set{all}} -\MT@ifdefined@c\MT@default@ex@set\relax{\gdef\MT@default@ex@set{all}} -\renewcommand*\DeclareMicrotypeSetDefault[2][]{% - \MT@warning{% - The command \string\DeclareMicrotypeSetDefault\space may only\MessageBreak - be used inside the main configuration file.\MessageBreak - Ignoring it}% +\MT@map@clist@c\MT@features{% + \MT@ifdefined@n@TF{MT@default@#1@set}\relax + {\global\MT@def@n{MT@default@#1@set}{all}}% } -\MT@ifdefined@c\MicroType@Hook{% - \MT@warning@nl{% +\MT@ifdefined@c@T\MicroType@Hook{% + \MT@warning{% Command \string\MicroType@Hook\space is deprecated.\MessageBreak - Use \string\Microtype@Hook\space instead}\MicroType@Hook}\relax -\MT@ifdefined@c\Microtype@Hook\Microtype@Hook\relax + Use \string\Microtype@Hook\space instead}\MicroType@Hook} +\MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook +\def\microtypesetup{\setkeys{MT}} +\MT@addto@setup{\def\microtypesetup{\setkeys{MTX}}} +\def\MT@define@optionX#1#2{% + \define@key{MTX}{#1}[true]{% + \KV@@sp@def\@tempb{#1}% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \edef\@tempb{\csname MT@rbba@\@tempb\endcsname}% + \MT@ifempty\MT@val\relax{% + \@tempcnta=\m@ne + \MT@ifstreq\MT@val{true}{% + \MT@checksetup\@tempb{% + \expandafter\@tempcnta=\csname MT@\@tempb @level\endcsname + \MT@info{Enabling #1 + (level \number\csname MT@\@tempb @level\endcsname)}% + }% + }{% + \MT@ifstreq\MT@val{false}{% + \@tempcnta=\z@ + \MT@info{Disabling #1}% + }{% + \MT@ifstreq\MT@val{compatibility}{% + \MT@checksetup\@tempb{% + \@tempcnta=\@ne + \MT@let@nc{MT@\@tempb @level}\@ne + \MT@info{Setting #1 to level 1}% + }% + }{% + \MT@ifstreq\MT@val{nocompatibility}{% + \MT@checksetup\@tempb{% + \@tempcnta=\tw@ + \MT@let@nc{MT@\@tempb @level}\tw@ + \MT@info{Setting #1 to level 2}% + }% + }{% + \MT@warning{% + Value `\MT@val' for key `#1' not recognized.\MessageBreak + Use any of `true', `false', `compatibility' or\MessageBreak + `nocompatibility'}% + }% + }% + }% + }% + \ifnum\@tempcnta>\m@ne + #2\@tempcnta\relax + \fi + }% + }% + }% +} +\def\MT@checksetup#1{% + \expandafter\csname ifMT@\csname MT@abbr@#1\endcsname\endcsname + \expandafter\@firstofone + \else + \MT@warning{% + You cannot enable \@nameuse{MT@abbr@#1} if it was disabled\MessageBreak + in the package options,}% + \expandafter\@gobble + \fi +} +\MT@define@optionX{protrusion}\pdfprotrudechars +\MT@define@optionX{expansion}\pdfadjustspacing +\define@key{MTX}{activate}[]{% + \setkeys{MTX}{protrusion={#1}}% + \setkeys{MTX}{expansion={#1}}% +} +\def\MT@gobblethree#1#2#3{} +\let\MT@saved@setupfont\MT@setupfont +\define@key{MTX}{disable}[]{% + \MT@info{Inactivate `\MT@MT' package}% + \let\MT@setupfont\MT@gobblethree +} +\define@key{MTX}{enable}[]{% + \MT@info{Reactivate `\MT@MT' package}% + \let\MT@setupfont\MT@saved@setupfont +} \def\MT@ProcessOptionsWithKV#1{% \let\@tempc\relax \let\KVo@tempa\@empty \MT@map@clist@c\@classoptionslist{% \def\CurrentOption{##1}% - \MT@ifdefined@n{KV@#1@\CurrentOption}{% + \MT@ifdefined@n@T{KV@#1@\CurrentOption}{% \edef\KVo@tempa{\KVo@tempa,\CurrentOption,}% \@expandtwoargs\@removeelement\CurrentOption \@unusedoptionlist\@unusedoptionlist - }\relax + }% }% \edef\KVo@tempa{% \noexpand\setkeys{#1}{% @@ -2491,19 +2541,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \let\CurrentOption\@empty } \MT@ProcessOptionsWithKV{MT} -\ifMT@DVIoutput - \ifnum\pdfoutput=\z@ - \MT@info@nl{Generating DVI output} - \else - \pdfoutput\z@ - \MT@info@nl{Changing output mode to DVI} - \ifMT@opt@expansion \else - \MT@expansionfalse - \fi - \fi -\else - \MT@info@nl{Generating \ifnum\pdfoutput=\z@ DVI \else PDF \fi output} -\fi +\MT@addto@setup{% \ifMT@draft \MT@warning@nl{`draft' option active.\MessageBreak Disabling all micro-typographic extensions.\MessageBreak @@ -2511,12 +2549,7 @@ In either case, please send a report to <w.m.l@gmx.net>. \MT@protrusionfalse \MT@expansionfalse \let\MT@setupfont\relax - \def\DeclareMicrotypeSet{% - \@ifstar - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% - {\@ifnextchar[\MT@DeclareSet{\MT@DeclareSet[]}}% - } - \def\MT@DeclareSet[#1]#2#3{} + \def\DeclareMicrotypeSet#1#{\@gobbletwo} \renewcommand*\UseMicrotypeSet[2][]{} \renewcommand*\SetProtrusion[3][]{} \renewcommand*\SetExpansion[3][]{} @@ -2525,134 +2558,146 @@ In either case, please send a report to <w.m.l@gmx.net>. \renewcommand*\LoadMicrotypeFile[1]{} \renewcommand*\microtypesetup[1]{} \renewcommand*\microtypecontext[1]{} - \expandafter - \endinput -\fi -\ifMT@protrusion - \pdfprotrudechars\MT@pr@level - \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)% - \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak - factor: \number\MT@pr@factor\fi - \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi} - \MT@ifdefined@c\MT@pr@setname{% - \MT@info@nl{Using protrusion set `\MT@pr@setname'}% - }{% - \global\let\MT@pr@setname\MT@default@pr@set - \MT@info@nl{Using default protrusion set `\MT@pr@setname'}% - } \else - \let\MT@protrusion\relax - \MT@info@nl{No character protrusion} -\fi -\ifMT@expansion - \ifnum\MT@stretch=\m@ne - \let\MT@stretch\MT@stretch@default - \fi - \ifnum\MT@shrink=\m@ne - \ifnum\MT@stretch>\z@ - \let\MT@shrink\MT@stretch - \else - \let\MT@shrink\MT@shrink@default + \ifnum\pdfoutput<\@ne + \ifMT@opt@expansion \else + \MT@expansionfalse \fi \fi - \ifnum\MT@step=\m@ne - \ifnum\MT@stretch>\MT@shrink - \ifnum\MT@shrink=\z@ - \@tempcnta=\MT@stretch + \MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output% + \ifMT@opt@DVI\space (changed by \MT@MT)\fi}% + \ifMT@protrusion + \edef\MT@active@features{\MT@active@features,pr} + \pdfprotrudechars\MT@pr@level + \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)% + \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak + factor: \number\MT@pr@factor\fi + \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi} + \MT@ifdefined@c@TF\MT@pr@setname{% + \MT@info@nl{Using protrusion set `\MT@pr@setname'}% + }{% + \global\let\MT@pr@setname\MT@default@pr@set + \MT@info@nl{Using default protrusion set `\MT@pr@setname'}% + } + \else + \let\MT@protrusion\relax + \MT@info@nl{No character protrusion} + \fi + \ifMT@expansion + \ifnum\MT@stretch=\m@ne + \let\MT@stretch\MT@stretch@default + \fi + \ifnum\MT@shrink=\m@ne + \ifnum\MT@stretch>\z@ + \let\MT@shrink\MT@stretch \else - \@tempcnta=\MT@shrink + \let\MT@shrink\MT@shrink@default \fi - \else - \ifnum\MT@stretch=\z@ - \@tempcnta=\MT@shrink + \fi + \ifnum\MT@step=\m@ne + \ifnum\MT@stretch>\MT@shrink + \ifnum\MT@shrink=\z@ + \@tempcnta=\MT@stretch + \else + \@tempcnta=\MT@shrink + \fi \else - \@tempcnta=\MT@stretch + \ifnum\MT@stretch=\z@ + \@tempcnta=\MT@shrink + \else + \@tempcnta=\MT@stretch + \fi + \fi + \divide\@tempcnta 5\relax + \else + \@tempcnta=\MT@step + \ifnum\@tempcnta=\z@ + \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak + Setting it to one} \fi \fi - \divide\@tempcnta 5\relax - \else - \@tempcnta=\MT@step - \ifnum\@tempcnta=\z@ - \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak - Setting it to one} - \fi - \fi - \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi - \edef\MT@step{\number\@tempcnta\space} - \let\MT@auto\@empty - \ifMT@auto - \ifnum\MT@pdftex@no > \thr@@ - \ifnum\pdfoutput=\z@ + \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi + \edef\MT@step{\number\@tempcnta\space} + \let\MT@auto\@empty + \ifMT@auto + \MT@requires@pdftex4{% + \ifnum\pdfoutput<\@ne + \ifMT@opt@auto + \MT@warning@nl{% + Automatic font expansion only works for PDF output.\MessageBreak + However, you are creating a DVI file. I will switch\MessageBreak + automatic font expansion off and hope that expanded\MessageBreak + fonts are available} + \fi + \MT@autofalse + \else + \def\MT@auto{autoexpand} + \fi + }{% \ifMT@opt@auto \MT@warning@nl{% - Automatic font expansion only works for PDF output.\MessageBreak - However, you are creating a DVI file. I will switch\MessageBreak - automatic font expansion off and hope that expanded\MessageBreak - fonts are available} + The pdftex you are using is too old for automatic\MessageBreak + font expansion. I will switch it off and hope that\MessageBreak + expanded fonts are available on your system.\MessageBreak + Install pdftex version 1.20 or newer} \fi \MT@autofalse - \else - \def\MT@auto{autoexpand} + \def\MT@auto{1000 } + } + \else + \ifnum\MT@pdftex@no < 4 + \def\MT@auto{1000 } \fi + \fi + \ifMT@selected + \let\MT@set@ex@codes\MT@set@ex@codes@s \else - \ifMT@opt@auto + \let\MT@set@ex@codes\MT@set@ex@codes@n + \fi + \ifnum\MT@stretch=\z@ + \ifnum\MT@shrink=\z@ \MT@warning@nl{% - The pdftex you are using is too old for automatic\MessageBreak - font expansion. I will switch it off and hope that\MessageBreak - expanded fonts are available on your system.\MessageBreak - Install pdftex version 1.20 or newer} + Both the stretch and shrink limit are set to zero.\MessageBreak + Disabling font expansion} + \MT@expansionfalse \fi - \MT@autofalse - \def\MT@auto{1000 } - \fi - \else - \ifnum\MT@pdftex@no < 4 - \def\MT@auto{1000 } \fi \fi - \ifMT@selected - \let\MT@set@ex@codes\MT@set@ex@codes@s + \ifMT@expansion + \edef\MT@active@features{\MT@active@features,ex}% + \pdfadjustspacing\MT@ex@level + \MT@info@nl{\ifMT@auto\else Non-\fi Automatic font expansion enabled + (level \number\MT@ex@level),\MessageBreak + stretch: \number\MT@stretch, shrink: \number\MT@shrink, + step: \number\MT@step, \ifMT@selected\else non-\fi selected} + \MT@ifdefined@c@TF\MT@ex@setname{% + \MT@info@nl{Using expansion set `\MT@ex@setname'}% + }{% + \global\let\MT@ex@setname\MT@default@ex@set + \MT@info@nl{Using default expansion set `\MT@ex@setname'}% + } + \CheckCommand*\showhyphens[1]{\setbox0\vbox{% + \color@begingroup\everypar{}\parfillskip\z@skip + \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne + \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}} + \gdef\showhyphens#1{\setbox0\vbox{% + \color@begingroup\pdfadjustspacing\z@\everypar{}\parfillskip\z@skip + \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne + \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}} \else - \let\MT@set@ex@codes\MT@set@ex@codes@n - \fi - \ifnum\MT@stretch=\z@ - \ifnum\MT@shrink=\z@ - \MT@warning@nl{% - Both the stretch and shrink limit are set to zero.\MessageBreak - Disabling font expansion} - \MT@expansionfalse - \fi + \let\MT@expansion\relax + \MT@info@nl{No font expansion} \fi \fi -\ifMT@expansion - \pdfadjustspacing\MT@ex@level - \MT@info@nl{\ifMT@auto Automatic f\else F\fi ont expansion enabled - (level \number\MT@ex@level),\MessageBreak - stretch: \number\MT@stretch, shrink: \number\MT@shrink, - step: \number\MT@step, \ifMT@selected\else non-\fi selected} - \MT@ifdefined@c\MT@ex@setname{% - \MT@info@nl{Using expansion set `\MT@ex@setname'}% - }{% - \global\let\MT@ex@setname\MT@default@ex@set - \MT@info@nl{Using default expansion set `\MT@ex@setname'}% - } - \CheckCommand*{\showhyphens}[1]{% - \setbox0\vbox{\color@begingroup\everypar{}\parfillskip\z@skip - \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne - \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}} - \gdef\showhyphens#1{% - \setbox0\vbox{% - \color@begingroup - \pdfadjustspacing\z@ - \everypar{}% - \parfillskip\z@skip\hsize\maxdimen - \normalfont - \pretolerance\m@ne\tolerance\m@ne\hbadness\z@\showboxdepth\z@\ #1% - \color@endgroup}} -\else - \let\MT@expansion\relax - \MT@info@nl{No font expansion} -\fi +} +\MT@addto@setup{% + \ifx\MT@active@features\@empty \else + \edef\MT@active@features{\expandafter\@gobble\MT@active@features} + \fi + \MT@documenttrue +} +\AtBeginDocument\selectfont +\edef\MT@curr@file{\jobname.tex} \endinput %% %% End of file `microtype.sty'. diff --git a/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg b/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg index 0f59b327594..8695686c58a 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-bch.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,bch') +%% microtype.dtx (with options: `config,cfg-t,bch') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,18 +23,18 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-bch.cfg}[2005/03/15 v1.3 microtype config. file: Bitstream Charter (RS)] + {mt-bch.cfg}[2005/12/02 v1.4 microtype config. file: Bitstream Charter (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -53,7 +53,6 @@ K = { ,50}, L = { ,50}, O = {50,50}, - \OE = {50, }, Q = {50,70}, R = { ,50}, T = {50,50}, @@ -83,7 +82,6 @@ ? = { ,200}, @ = {50,50}, ~ = {200,250}, - _ = {100,100}, \% = { ,50}, * = {200,300}, + = {150,250}, @@ -102,6 +100,8 @@ { encoding = {T1,LY1}, family = bch } { + \OE = {50, }, + _ = {100,100}, \textbackslash = {150,200}, \quotesinglbase = {400,400}, \quotedblbase = {300,300}, \guilsinglleft = {400,300}, \guilsinglright = {300,400}, @@ -112,6 +112,21 @@ } \SetProtrusion + [ name = bch-T5, + load = bch-default ] + { encoding = T5, + family = bch } + { + _ = {100,100}, + \textbackslash = {150,200}, + \quotesinglbase = {400,400}, \quotedblbase = {300,300}, + \guilsinglleft = {400,300}, \guilsinglright = {300,400}, + \guillemotleft = {200,200}, \guillemotright = {150,300}, + \textbraceleft = {200, }, \textbraceright = { ,300}, + \textless = {200,100}, \textgreater = {100,200}, + } + +\SetProtrusion [ name = bch-it ] { encoding = OT1, family = bch, @@ -120,7 +135,6 @@ C = {50, }, G = {50, }, O = {50, }, - \OE = {50, }, Q = {50, }, S = {50, }, $ = {50, }, @@ -141,7 +155,6 @@ : = { ,400}, ; = { ,400}, ? = { ,200}, - _ = { ,100}, & = { ,80}, \% = {50,50}, * = {300,200}, @@ -163,6 +176,24 @@ family = bch, shape = {it,sl} } { + _ = { ,100}, + \OE = { 50, }, + \textbackslash = {150,150}, + \quotesinglbase = {200,500}, \quotedblbase = {150,500}, + \guilsinglleft = {300,400}, \guilsinglright = {200,500}, + \guillemotleft = {200,300}, \guillemotright = {150,400}, + \textbraceleft = {200, }, \textbraceright = { ,200}, + \textless = {100, }, \textgreater = { ,100}, + } + +\SetProtrusion + [ name = bch-it-T5, + load = bch-it ] + { encoding = T5, + family = bch, + shape = it } + { + _ = { ,100}, \textbackslash = {150,150}, \quotesinglbase = {200,500}, \quotedblbase = {150,500}, \guilsinglleft = {300,400}, \guilsinglright = {200,500}, @@ -187,7 +218,6 @@ l = { ,50}, 013 = { ,50}, % fl o = {50,50}, - \oe = {50, }, q = {50,70}, t = {50,50}, y = {50,50}, @@ -216,6 +246,26 @@ } \SetProtrusion + [ name = bch-sc-T5, + load = bch-T5 ] + { encoding = T5, + family = bch, + shape = sc } + { + a = {50,50}, + c = {50, }, + d = { ,50}, + f = { ,50}, + g = {50, }, + j = {100, }, + l = { ,50}, + o = {50,50}, + q = { 0, }, + t = {50,50}, + y = {50,50}, + } + +\SetProtrusion [ name = bch-textcomp ] { encoding = TS1, family = bch } @@ -245,7 +295,7 @@ \texttwosuperior = {100,200}, \textthreesuperior = {100,200}, \textmu = { ,100}, - \textparagraph = { ,100}, + \textparagraph = { ,100}, \textperiodcentered = {300,400}, \textonesuperior = {200,300}, \textordmasculine = {200,200}, diff --git a/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg b/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg index a7e81ffb93f..5f5a9a9c8e5 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-cmr.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,cmr') +%% microtype.dtx (with options: `config,cfg-t,cmr') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,18 +23,18 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-cmr.cfg}[2005/08/16 v1.8 microtype config. file: Computer Modern (RS)] + {mt-cmr.cfg}[2005/11/07 v1.9 microtype config. file: Computer Modern (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -78,7 +78,6 @@ ? = { ,200}, @ = {50,50}, ~ = {200,250}, - _ = {200,200}, \% = {50,50}, * = {300,300}, + = {250,250}, @@ -114,6 +113,7 @@ family = cmr } { \AE = {50, }, + _ = {200,200}, \textbackslash = {200,300}, \textquotedblleft = {200,600}, \textquotedbl = {300,300}, @@ -126,8 +126,18 @@ } \SetProtrusion - [ name = cmr-T5, - load = cmr-default ] + [ name = lmr-T1, + load = cmr-T1 ] + { encoding = {T1,LY1}, + family = lmr } + { + \textquotedblleft = {500,300}, + \quotedblbase = {500,300}, + } + +\SetProtrusion + [ name = cmr-T5, + load = cmr-default ] { encoding = T5, family = cmr } { @@ -142,16 +152,6 @@ } \SetProtrusion - [ name = lmr-T1, - load = cmr-T1 ] - { encoding = {T1,LY1}, - family = lmr } - { - \textquotedblleft = {500,300}, - \quotedblbase = {500,300}, - } - -\SetProtrusion [ name = cmr-it ] { } { @@ -195,7 +195,6 @@ {,}= { ,500}, : = { ,300}, ; = { ,300}, - _ = {100,200}, & = {100,50}, \% = {100, }, * = {400,100}, @@ -239,10 +238,11 @@ family = cmr, shape = it } { + _ = {100,200}, \AE = {100, }, \OE = {100, }, - \textbackslash = {300,300}, 156 = {100, }, % IJ + \textbackslash = {300,300}, \textquotedblleft = {500,300}, \quotesinglbase = {300,700}, \quotedblbase = {200,600}, \guilsinglleft = {500,300}, \guilsinglright = {400,400}, @@ -259,6 +259,7 @@ family = cmr, shape = it } { + _ = {100,200}, \textbackslash = {300,300}, \quotesinglbase = {300,700}, \quotedblbase = {200,600}, \guilsinglleft = {500,300}, \guilsinglright = {400,400}, @@ -475,7 +476,7 @@ { encoding = OML, family = cmm, series = {m,b}, - shape = it } + shape = it } { A = {100, 50}, % \mathnormal B = { 50, }, diff --git a/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg b/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg index 08848a35e72..2b868f9b4e7 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-euf.cfg @@ -9,9 +9,9 @@ %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,16 +23,16 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile {mt-euf.cfg}[2005/06/01 v1.0 microtype config. file: AMS Euler Fraktur (RS)] diff --git a/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg b/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg new file mode 100644 index 00000000000..3da4c547a44 --- /dev/null +++ b/Master/texmf-dist/tex/latex/microtype/mt-euroitc.cfg @@ -0,0 +1,59 @@ +%% +%% This is file `mt-euroitc.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% microtype.dtx (with options: `config,cfg-e,euroitc') +%% +%% ----------------------------------------------------------------------- +%% The `microtype' package +%% An interface to the micro-typographic extensions of pdfTeX +%% Copyright (c) 2004--2006 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.3 of this license or +%% (at your option) any later version. The latest version of this license +%% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later +%% is part of all distributions of LaTeX version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of the files microtype.dtx and microtype.ins and the +%% derived file microtype.sty. +%% +%% ----------------------------------------------------------------------- +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. +%% +%% If you think you have found improvements to these settings, please +%% let me know. +%% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% +\ProvidesFile + {mt-euroitc.cfg}[2006/05/04 v1.0 microtype config. file: ITC Euro (RS)] + +%%% ---------------------------------------------------------------------- +%%% PROTRUSION SETTINGS + +\SetProtrusion + { encoding = U, + family = {euroitc,euroitcs} } + { + E = {100,50} + } + +\SetProtrusion + { encoding = U, + family = {euroitc,euroitcs}, + shape = it* } + { + E = {100,} + } + +\endinput +%% +%% End of file `mt-euroitc.cfg'. diff --git a/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg b/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg index 03fac392fe5..ffd4fefe6cf 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-eus.cfg @@ -9,9 +9,9 @@ %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,18 +23,18 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-eus.cfg}[2005/06/01 v1.0 microtype config. file: AMS Euler script (RS)] + {mt-eus.cfg}[2006/02/04 v1.1 microtype config. file: AMS Euler script (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -63,6 +63,7 @@ V = { 50, 50}, W = { 50, 50}, X = { 50, 50}, + Y = { 50, }, Z = { 50,100}, } diff --git a/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg b/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg index a37c5010e68..31ccb357031 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-msa.cfg @@ -9,9 +9,9 @@ %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,24 +23,24 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-msa.cfg}[2005/06/01 v1.0 microtype config. file: AMS (a) (RS)] + {mt-msa.cfg}[2006/02/04 v1.1 microtype config. file: AMS (a) (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS \SetProtrusion - [ name = AMSa ] + [ name = AMS-a ] { encoding = U, family = msa } { @@ -49,13 +49,13 @@ "07 = { 50, 50}, % \blacklozenge "08 = { 50, 50}, % \circlearrowright "09 = { 50, 50}, % \circlearrowleft - "0A = { 50, 50}, % \rightleftharpoons - "0B = { 50, 50}, % \leftrightharpoons - "0D = {-50,150}, % \Vdash - "0E = {-50,150}, % \Vvdash + "0A = {100,100}, % \rightleftharpoons + "0B = {100,100}, % \leftrightharpoons + "0D = {-50,200}, % \Vdash + "0E = {-50,200}, % \Vvdash "0F = {-70,150}, % \vDash - "10 = {100,100}, % \twoheadrightarrow - "11 = { 50,150}, % \twoheadleftarrow + "10 = {100,150}, % \twoheadrightarrow + "11 = {100,150}, % \twoheadleftarrow "12 = { 50,100}, % \leftleftarrows "13 = { 50, 80}, % \rightrightarrows "14 = {120,120}, % \upuparrows @@ -64,23 +64,23 @@ "17 = {200,200}, % \downharpoonright "18 = {200,200}, % \upharpoonleft "19 = {200,200}, % \downharpoonleft - "1A = { 50, 80}, % \rightarrowtail - "1B = { 50, 80}, % \leftarrowtail + "1A = { 80,100}, % \rightarrowtail + "1B = { 80,100}, % \leftarrowtail "1C = { 50, 50}, % \leftrightarrows "1D = { 50, 50}, % \rightleftarrows - "1E = {150, }, % \Lsh - "1F = { ,150}, % \Rsh - "20 = { 50,100}, % \rightsquigarrow - "21 = { 50, 50}, % \leftrightsquigarrow - "22 = { 50, 50}, % \looparrowleft - "23 = { 50, 50}, % \looparrowright - "24 = { , 50}, % \circeq + "1E = {250, }, % \Lsh + "1F = { ,250}, % \Rsh + "20 = {100,100}, % \rightsquigarrow + "21 = {100,100}, % \leftrightsquigarrow + "22 = {100, 50}, % \looparrowleft + "23 = { 50,100}, % \looparrowright + "24 = { 50, 80}, % \circeq "25 = { ,100}, % \succsim "26 = { ,100}, % \gtrsim "27 = { ,100}, % \gtrapprox - "28 = { 50, 50}, % \multimap - "2B = { 50, 50}, % \doteqdot - "2C = { 50, 50}, % \triangleq + "28 = {150, 50}, % \multimap + "2B = {100,150}, % \doteqdot + "2C = {100,150}, % \triangleq "2D = {100, 50}, % \precsim "2E = {100, 50}, % \lesssim "2F = { 50, 50}, % \lessapprox @@ -91,7 +91,7 @@ "34 = {100, 50}, % \preccurlyeq "36 = { 50, }, % \leqslant "38 = { , 50}, % \backprime - "39 = {200,200}, % \dabar@ : the dash bar in \dash(left,right)arrow + "39 = {250,250}, % \dabar@ : the dash bar in \dash(left,right)arrow "3C = { 50,100}, % \succcurlyeq "3E = { , 50}, % \geqslant "40 = { , 50}, % \sqsubset @@ -112,7 +112,7 @@ "50 = { 50, 50}, % \eqcirc "56 = { ,150}, % \Rrightarrow "57 = {150, }, % \Lleftarrow - "58 = {100,200}, % \checkmark + "58 = {100,300}, % \checkmark "5C = { 50, 50}, % \angle "5D = { 50, 50}, % \measuredangle "5E = { 50, 50}, % \sphericalangle @@ -121,9 +121,9 @@ "61 = {100,100}, % \smallfrown "62 = { 50, }, % \Subset "63 = { , 50}, % \Supset - "66 = {100,100}, % \curlywedge - "67 = {100,100}, % \curlyvee - "68 = { 50,100}, % \leftthreetimes + "66 = {150,150}, % \curlywedge + "67 = {150,150}, % \curlyvee + "68 = { 50,150}, % \leftthreetimes "69 = {100, 50}, % \rightthreetimes "6C = { 50, 50}, % \bumpeq "6D = { 50, 50}, % \Bumpeq @@ -131,7 +131,7 @@ "6F = { ,100}, % \ggg "70 = { 50,100}, % \ulcorner "71 = {100, 50}, % \urcorner - "75 = {100,150}, % \dotplus + "75 = {150,200}, % \dotplus "76 = { 50,100}, % \backsim "78 = { 50,100}, % \llcorner "79 = {100, 50}, % \lrcorner diff --git a/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg b/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg index 0dbf369f6f0..a94bf45b07f 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-msb.cfg @@ -9,9 +9,9 @@ %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,16 +23,16 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile {mt-msb.cfg}[2005/06/01 v1.0 microtype config. file: AMS (b) (RS)] @@ -40,7 +40,7 @@ %%% PROTRUSION SETTINGS \SetProtrusion - [ name = AMSb ] + [ name = AMS-b ] { encoding = U, family = msb } { diff --git a/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg b/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg new file mode 100644 index 00000000000..ab2f1aa2893 --- /dev/null +++ b/Master/texmf-dist/tex/latex/microtype/mt-mvs.cfg @@ -0,0 +1,62 @@ +%% +%% This is file `mt-mvs.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% microtype.dtx (with options: `config,cfg-e,mvs') +%% +%% ----------------------------------------------------------------------- +%% The `microtype' package +%% An interface to the micro-typographic extensions of pdfTeX +%% Copyright (c) 2004--2006 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.3 of this license or +%% (at your option) any later version. The latest version of this license +%% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later +%% is part of all distributions of LaTeX version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of the files microtype.dtx and microtype.ins and the +%% derived file microtype.sty. +%% +%% ----------------------------------------------------------------------- +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. +%% +%% If you think you have found improvements to these settings, please +%% let me know. +%% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% +\ProvidesFile + {mt-mvs.cfg}[2006/05/04 v1.0 microtype config. file: Marvosym Euro (RS)] + +%%% ---------------------------------------------------------------------- +%%% CHARACTER INHERITANCE + +\DeclareCharacterInheritance + { encoding = OT1, + family = mvs } + { + 164 = {099,100,101} % \EURhv,\EURcr,\EURtm + } + +%%% ---------------------------------------------------------------------- +%%% PROTRUSION SETTINGS + +\SetProtrusion + { encoding = OT1, + family = mvs } + { + 164 = {50,50} % \EUR + 068 = {50,-100}, % \EURdig + } + +\endinput +%% +%% End of file `mt-mvs.cfg'. diff --git a/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg b/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg index e98e28cc8ef..fd96b49f5dc 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-pad.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,pad') +%% microtype.dtx (with options: `config,cfg-t,pad') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,18 +23,18 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-pad.cfg}[2005/03/15 v1.4a microtype config. file: Adobe Garamond (RS)] + {mt-pad.cfg}[2005/11/07 v1.5 microtype config. file: Adobe Garamond (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -86,7 +86,6 @@ ? = { ,100}, @ = {50,50}, ~ = {200,250}, - _ = {100,100}, & = {50,100}, \% = {50,50}, * = {300,300}, @@ -105,6 +104,7 @@ { encoding = {T1,LY1}, family = {pad,padx,padj} } { + _ = {100,100}, \textbackslash = {100,200}, \quotesinglbase = {400,400}, \quotedblbase = {400,400}, \guilsinglleft = {400,400}, \guilsinglright = {300,500}, @@ -153,7 +153,6 @@ {,}= { ,500}, : = { ,300}, ; = { ,300}, - _ = {100,100}, & = {50,50}, \% = {100, }, * = {500,100}, @@ -175,8 +174,9 @@ family = {pad,padx,padj}, shape = {it,sl} } { - \textbackslash = {100,200}, + _ = {100,100}, 156 = {50, }, % IJ + \textbackslash = {100,200}, \quotesinglbase = {500,500}, \quotedblbase = {400,400}, \guilsinglleft = {500,400}, \guilsinglright = {300,500}, \guillemotleft = {300,300}, \guillemotright = {200,400}, @@ -264,7 +264,7 @@ \textpm = {150,200}, \texttwosuperior = {200,200}, \textthreesuperior = {200,200}, - \textparagraph = { ,100}, + \textparagraph = { ,100}, \textperiodcentered = {300,400}, \textonesuperior = {200,200}, \textordmasculine = {200,200}, diff --git a/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg b/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg index dc164f85af2..24005a06a21 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-pmn.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,pmn') +%% microtype.dtx (with options: `config,cfg-t,pmn') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,23 +23,23 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. +%% If you think you have found improvements to these settings, please +%% let me know. %% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- -%% -%% These settings have been prepared by, and are copied with the -%% generous permission of, Harald Harders <h.harders{at}tu-bs.de>. -%% -%% ----------------------------------------------------------------------- +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% +%% These settings have been prepared by, and are copied with the +%% generous permission of: Harald Harders <h.harders{at}tu-bs.de>. %% +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-pmn.cfg}[2004/03/15 v1.1b microtype config. file: Adobe Minion (HH)] + {mt-pmn.cfg}[2004/11/07 v1.2 microtype config. file: Adobe Minion (HH)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -86,7 +86,6 @@ " = {300,300}, @ = {50,50}, ~ = {200,250}, - _ = {100,100}, \% = {50,50}, * = {200,300}, + = {150,200}, @@ -106,6 +105,7 @@ family = pmnj } { \TH = { ,50}, + _ = {100,100}, \textbackslash = {100,200}, \quotesinglbase = {400,400}, \quotedblbase = {300,300}, \guilsinglleft = {400,300}, \guilsinglright = {300,400}, @@ -185,7 +185,6 @@ : = { ,200}, ; = { ,200}, " = {400,200}, - _ = { ,100}, & = {50,50}, \% = {100, }, * = {200,200}, @@ -207,11 +206,12 @@ family = pmnj, shape = {it,sl} } { - \textbackslash = {100,150}, + _ = { ,100}, 031 = { ,-100}, % ffl 156 = {20, }, % IJ 188 = { ,-30}, % ij - \v{t} = { ,100}, + \v t = { ,100}, + \textbackslash = {100,150}, \quotesinglbase = {200,500}, \quotedblbase = {150,500}, \guilsinglleft = {300,400}, \guilsinglright = {200,500}, \guillemotleft = {200,300}, \guillemotright = {150,400}, @@ -451,7 +451,7 @@ \texttwosuperior = {200,200}, \textthreesuperior = {200,200}, \textasciiacute = {300,400}, - \textparagraph = { ,100}, + \textparagraph = { ,100}, \textperiodcentered = {300,400}, \textonesuperior = {200,200}, \textordmasculine = {200,200}, diff --git a/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg b/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg index 35722d5598f..45d1f93dad4 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-ppl.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,ppl') +%% microtype.dtx (with options: `config,cfg-t,ppl') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,18 +23,18 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-ppl.cfg}[2005/08/16 v1.5 microtype config. file: Palatino (RS)] + {mt-ppl.cfg}[2005/11/16 v1.6 microtype config. file: Palatino (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -62,7 +62,7 @@ x = {50,50}, y = {50,70}, 1 = {100,100}, - 7 = { ,50}, + 7 = { ,50}, . = { ,700}, {,}= { ,500}, : = { ,500}, @@ -71,7 +71,6 @@ ? = { ,200}, @ = {50,50}, ~ = {200,250}, - _ = {100,100}, & = {50,100}, \% = {100,100}, * = {200,200}, @@ -90,6 +89,7 @@ { encoding = {T1,LY1}, family = {ppl,pplx,pplj} } { + _ = {100,100}, \textbackslash = {200,300}, \quotesinglbase = {400,400}, \quotedblbase = {400,400}, \guilsinglleft = {400,400}, \guilsinglright = {300,500}, @@ -138,7 +138,6 @@ : = { ,300}, ; = { ,300}, ? = { ,300}, - _ = {100,100}, & = {50,50}, \% = {100,100}, * = {200,200}, @@ -160,6 +159,7 @@ family = {ppl,pplx,pplj}, shape = {it,sl} } { + _ = {100,100}, \textbackslash = {100,200}, \quotesinglbase = {500,500}, \quotedblbase = {400,400}, \guilsinglleft = {400,400}, \guilsinglright = {300,500}, diff --git a/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg b/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg index 0cd7e9dc06b..db5283e7526 100644 --- a/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg +++ b/Master/texmf-dist/tex/latex/microtype/mt-ptm.cfg @@ -4,14 +4,14 @@ %% %% The original source files were: %% -%% microtype.dtx (with options: `config,ptm') +%% microtype.dtx (with options: `config,cfg-t,ptm') %% %% ----------------------------------------------------------------------- %% The `microtype' package %% An interface to the micro-typographic extensions of pdfTeX -%% Copyright (c) 2004, 2005 R Schlicht <w.m.l@gmx.net> +%% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net> %% -%% This work may be distributed and/or modified under the conditions of +%% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license or %% (at your option) any later version. The latest version of this license %% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later @@ -23,18 +23,18 @@ %% derived file microtype.sty. %% %% ----------------------------------------------------------------------- -%% This is a font-specific configuration file for the `microtype' -%% package. It contains settings for font expansion and character -%% protrusion. Please consult the documentation for details. +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. %% -%% If you think you have found improvements to these settings, please -%% tell me about them. -%% -%% When modifying this file, also change the identification line below. -%% ----------------------------------------------------------------------- +%% If you think you have found improvements to these settings, please +%% let me know. %% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% \ProvidesFile - {mt-ptm.cfg}[2005/08/16 v1.5 microtype config. file: Times (RS)] + {mt-ptm.cfg}[2006/04/20 v1.7 microtype config. file: Times (RS)] %%% ---------------------------------------------------------------------- %%% PROTRUSION SETTINGS @@ -72,7 +72,6 @@ ? = { ,100}, @ = {100,100}, ~ = {200,250}, - _ = {100,100}, & = {50,100}, \% = {100,100}, * = {200,200}, @@ -91,6 +90,7 @@ { encoding = {T1}, family = {ptm,ptmx,ptmj} } { + _ = {100,100}, \textbackslash = {100,200}, \quotesinglbase = {400,400}, \quotedblbase = {400,400}, \guilsinglleft = {400,400}, \guilsinglright = {300,500}, @@ -100,12 +100,44 @@ \textless = {200,100}, \textgreater = {100,200}, } +\SetProtrusion + [ name = ptm-QX, + load = ptm-default ] + { encoding = QX, + family = {ptm,ptmx,ptmj} } + { + * = {200,200}, + {=} = {100,100}, + \textunderscore = {100,100}, + \textbackslash = {100,200}, + \quotedblbase = {400,400}, + \guillemotleft = {300,300}, \guillemotright = {200,400}, + \textexclamdown = {100, }, \textquestiondown = {100, }, + \textbraceleft = {200,200}, \textbraceright = {200,300}, + \textless = {200,100}, \textgreater = {100,200}, + \textminus = {200,200}, \textdegree = {300,300}, + \copyright = {100,150}, \textregistered = {100,150}, + \textxgeq = { ,100}, \textxleq = {100, }, + \textalpha = { , 50}, \textDelta = { 70, 70}, + \textpi = { 50, 80}, \textSigma = { , 70}, + \textmu = { , 80}, \texteuro = { 50, 50}, + \textellipsis = {175,175}, \textasciitilde = { 80, 80}, + \textapprox = { 50, 50}, \textinfty = {100,100}, + \textdagger = {150,150}, \textdaggerdbl = {100,100}, + \textdiv = { 50,150}, \textsection = { 80, 80}, + \texttimes = {100,150}, \textpm = { 50, 80}, + \textbullet = {150,150}, \textperiodcentered = {300,300}, + \textquotesingle = {500,500}, \textquotedbl = {300,300}, + \textperthousand = { ,50}, + } + \SetProtrusion [ name = ptm-LY1, load = ptm-T1 ] { encoding = LY1, family = {ptm,ptmx,ptmj} } { + _ = {100,100}, \texttrademark = {100,100}, \textregistered = {100,100}, \textcopyright = {100,100}, @@ -175,7 +207,6 @@ ; = { ,500}, ! = { ,100}, ? = { ,100}, - _ = {100,100}, & = {50,50}, \% = {100,100}, * = {400,200}, @@ -197,8 +228,9 @@ family = {ptm,ptmx,ptmj}, shape = {it,sl} } { - \textbackslash = {100,200}, + _ = {100,100}, 156 = {100, }, % IJ + \textbackslash = {100,200}, \quotesinglbase = {300,700}, \quotedblbase = {400,500}, \guilsinglleft = {400,400}, \guilsinglright = {300,500}, \guillemotleft = {300,400}, \guillemotright = {200,400}, @@ -208,12 +240,45 @@ } \SetProtrusion + [ name = ptm-it-QX, + load = ptm-it ] + { encoding = {QX}, + family = {ptm,ptmx,ptmj}, + shape = {it,sl} } + { + 009 = { , 50}, % fk + {=} = {100,100}, + \textunderscore = {100,150}, + \textbackslash = {100,200}, + \quotedblbase = {300,400}, + \guillemotleft = {200,400}, \guillemotright = {200,400}, + \textexclamdown = {200, }, \textquestiondown = {200, }, + \textbraceleft = {200,100}, \textbraceright = {200,200}, + \textless = {100,100}, \textgreater = {100,100}, + \textminus = {200,200}, \textdegree = {300,150}, + \textregistered = {100,150}, \copyright = {100,150}, + \textDelta = { 70, }, \textdelta = { , 50}, + \textpi = { 50, 80}, \textmu = { , 80}, + \texteuro = {200, }, \textellipsis = {100,150}, + \textquoteleft = {500,400}, \textquoteright = {500,400}, + \textquotedblleft = {500,300}, \textquotedblright = {400,400}, + \textapprox = { 50, 50}, \textinfty = {100,100}, + \textdagger = {150,150}, \textdaggerdbl = {100,100}, + \textdiv = {150,150}, \textasciitilde = { 80, 80}, + \texttimes = {100,150}, \textpm = { 50, 80}, + \textbullet = {300,100}, \textperiodcentered = {300,300}, + \textquotesingle = {500,500}, \textquotedbl = {300,300}, + \textperthousand = { ,50}, + } + +\SetProtrusion [ name = ptm-it-LY1, load = ptm-it-T1 ] { encoding = {LY1}, family = {ptm,ptmx,ptmj}, shape = {it,sl} } { + _ = {100,100}, \texttrademark = {100,100}, \textregistered = {100,100}, \textcopyright = {100,100}, diff --git a/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg b/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg new file mode 100644 index 00000000000..ab9eb03ee07 --- /dev/null +++ b/Master/texmf-dist/tex/latex/microtype/mt-ugm.cfg @@ -0,0 +1,253 @@ +%% +%% This is file `mt-ugm.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% microtype.dtx (with options: `config,cfg-t,ugm') +%% +%% ----------------------------------------------------------------------- +%% The `microtype' package +%% An interface to the micro-typographic extensions of pdfTeX +%% Copyright (c) 2004--2006 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.3 of this license or +%% (at your option) any later version. The latest version of this license +%% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later +%% is part of all distributions of LaTeX version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of the files microtype.dtx and microtype.ins and the +%% derived file microtype.sty. +%% +%% ----------------------------------------------------------------------- +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. +%% +%% If you think you have found improvements to these settings, please +%% let me know. +%% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% +\ProvidesFile + {mt-ugm.cfg}[2006/01/26 v1.0 microtype config. file: URW Garamond (RS)] + +%%% ---------------------------------------------------------------------- +%%% PROTRUSION SETTINGS + +\SetProtrusion + [ name = ugm-default ] + { encoding = OT1, + family = ugm } + { + A = {50,100}, + \AE = {150,50}, + B = { ,50}, + C = {50, }, + D = { ,70}, + E = { ,50}, + F = { ,70}, + G = {50,50}, + J = {50, }, + K = { ,50}, + L = { ,120}, + O = {50,50}, + \OE = {50,50}, + P = { ,50}, + Q = {50,50}, + R = { ,70}, + T = {70,70}, + V = {70,70}, + W = {70,70}, + X = {50,70}, + Y = {80,80}, + Z = {50,50}, + k = { ,70}, + p = { ,50}, + r = { ,50}, + t = { ,100}, + v = {50,70}, + w = {50,70}, + x = {50,50}, + y = { ,70}, + 1 = {150,150}, + 2 = {50,50}, + 3 = {50,50}, + 4 = {70,70}, + 7 = {50,80}, + . = { ,700}, + {,}= { ,500}, + : = { ,500}, + ; = { ,400}, + ! = { ,100}, + ? = { ,200}, + ~ = {300,350}, + & = { ,100}, + \% = {50,100}, + * = {200,200}, + + = {250,300}, + {=}= {200,200}, + ( = {200, }, ) = { ,200}, + / = {100,300}, + - = {500,600}, + \textendash = {250,300}, \textemdash = {250,250}, + \textquoteleft = {300,600}, \textquoteright = {300,600}, + \textquotedblleft = {400,400}, \textquotedblright = {400,400}, + } + +\SetProtrusion + [ name = ugm-T1, + load = ugm-default ] + { encoding = {T1}, + family = ugm } + { + _ = {100,200}, + \textbackslash = {100,300}, + \textbar = {200,200}, + \quotesinglbase = {400,400}, \quotedblbase = {400,400}, + \guilsinglleft = {400,400}, \guilsinglright = {300,600}, + \guillemotleft = {300,400}, \guillemotright = {300,400}, + \textexclamdown = {100, }, \textquestiondown = {100, }, + \textbraceleft = {400,200}, \textbraceright = {200,400}, + \textless = {200,100}, \textgreater = {100,200}, + } + +\SetProtrusion + [ name = ugm-it ] + { encoding = OT1, + family = ugm, + shape = it } + { + A = { ,150}, + C = {50, }, + G = {50, }, + L = { ,100}, + O = {70,50}, + Q = {70,50}, + T = {70, }, + V = {100, }, + W = {100, }, + v = {50, }, + w = {50, }, + 1 = {150,150}, + . = { ,700}, + {,}= { ,600}, + : = { ,400}, + ; = { ,400}, + & = {50,100}, + \% = {100,50}, + * = {400,200}, + + = {250,250}, + ~ = {150,150}, + {=}= {200,200}, + ( = {200, }, ) = { ,200}, + / = {100,200}, + - = {400,700}, + \textendash = {300,300}, \textemdash = {200,200}, + \textquoteleft = {400,200}, \textquoteright = {400,200}, + \textquotedblleft = {600,200}, \textquotedblright = {600,200}, + } + +\SetProtrusion + [ name = ugm-it-T1, + load = ugm-it ] + { encoding = {T1}, + family = ugm, + shape = it } + { + _ = {100,200}, + \textbackslash = {300,300}, + \textbar = {200,200}, + \quotesinglbase = {300,700}, \quotedblbase = {300,500}, + \guilsinglleft = {400,400}, \guilsinglright = {300,600}, + \guillemotleft = {300,400}, \guillemotright = {300,400}, + \textexclamdown = {100, }, \textquestiondown = {200, }, + \textbraceleft = {200,100}, \textbraceright = {200,200}, + } + +\SetProtrusion + [ name = ugm-textcomp ] + { encoding = TS1, + family = ugm } + { + \texttwelveudash = {200,200}, + \textthreequartersemdash = {200,200}, + \textquotesingle = {300,500}, + \textasteriskcentered = {100,200}, + \textminus = {250,300}, + \textdagger = { 80, 80}, + \textbardbl = {150,150}, + \textbullet = { 50,100}, + \textflorin = { ,100}, + \texttrademark = {100,150}, + \textcent = { 50, }, + \textsterling = { , 50}, + \textbrokenbar = {200,300}, + \textcopyright = {100,100}, + \textordfeminine = {100,200}, + \textlnot = {200, }, + \textregistered = {100,100}, + \textdegree = {200,200}, + \textpm = {150,200}, + \texttwosuperior = {100,200}, + \textthreesuperior = {100,200}, + \textmu = { ,100}, + \textperiodcentered = {200,500}, + \textonesuperior = {200,300}, + \textordmasculine = {200,200}, + \texttimes = {200,300}, + \textdiv = {200,300}, + \textsection = { ,100}, + \textonehalf = { 50,100}, + \textonequarter = { 50,100}, + \textthreequarters = { 50,100}, + \textsurd = { ,100}, + } + +\SetProtrusion + [ name = ugm-textcomp-it ] + { encoding = TS1, + family = ugm, + shape = it } + { + \texttwelveudash = {200,200}, + \textthreequartersemdash = {200,200}, + \textquotesingle = {500,500}, + \textasteriskcentered = {300,150}, + \textminus = {250,300}, + \textdagger = { 80, 80}, + \textbardbl = {150,150}, + \textbullet = { 50,100}, + \textflorin = { ,100}, + \texttrademark = {150, 50}, + \textcent = { 50, }, + \textsterling = { , 50}, + \textbrokenbar = {200,300}, + \textcopyright = {300, }, + \textordfeminine = {100,200}, + \textlnot = {200, }, + \textregistered = {300, }, + \textdegree = {300,200}, + \textpm = {150,200}, + \textonesuperior = {300,300}, + \texttwosuperior = {300,200}, + \textthreesuperior = {300,200}, + \textmu = { ,100}, + \textperiodcentered = {300,400}, + \textordmasculine = {300,200}, + \texttimes = {200,300}, + \textdiv = {200,300}, + \textsection = { ,200}, + \textonehalf = { 50,100}, + \textonequarter = { 50,100}, + \textthreequarters = { 50,100}, + \textsurd = { ,100}, + } + +\endinput +%% +%% End of file `mt-ugm.cfg'. diff --git a/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg b/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg new file mode 100644 index 00000000000..3399715a3fe --- /dev/null +++ b/Master/texmf-dist/tex/latex/microtype/mt-zpeu.cfg @@ -0,0 +1,84 @@ +%% +%% This is file `mt-zpeu.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% microtype.dtx (with options: `config,cfg-e,zpeu') +%% +%% ----------------------------------------------------------------------- +%% The `microtype' package +%% An interface to the micro-typographic extensions of pdfTeX +%% Copyright (c) 2004--2006 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.3 of this license or +%% (at your option) any later version. The latest version of this license +%% is in: http://www.latex-project.org/lppl.txt, and version 1.3 or later +%% is part of all distributions of LaTeX version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This work consists of the files microtype.dtx and microtype.ins and the +%% derived file microtype.sty. +%% +%% ----------------------------------------------------------------------- +%% This is a font-specific configuration file for the `microtype' +%% package. It contains settings for font expansion and character +%% protrusion. Please consult the documentation for details. +%% +%% If you think you have found improvements to these settings, please +%% let me know. +%% +%% When modifying this file, also change the identification line below. +%% ----------------------------------------------------------------------- +%% +\ProvidesFile + {mt-zpeu.cfg}[2006/05/04 v1.0 microtype config. file: Adobe Euro (RS)] + +%%% ---------------------------------------------------------------------- +%%% CHARACTER INHERITANCE + +\DeclareCharacterInheritance + { encoding = U, + family = {zpeu,zpeus,eurosans} } + { + E = 128 + } + +%%% ---------------------------------------------------------------------- +%%% PROTRUSION SETTINGS + +\SetProtrusion + { encoding = U, + family = zpeu } + { + E = {50, } + } + +\SetProtrusion + { encoding = U, + family = zpeu, + shape = it* } + { + E = {100,-50} + } + +\SetProtrusion + { encoding = U, + family = {zpeus,eurosans} } + { + E = {100,50} + } + +\SetProtrusion + { encoding = U, + family = {zpeus,eurosans}, + shape = it* } + { + E = {200, } + } + +\endinput +%% +%% End of file `mt-zpeu.cfg'. diff --git a/Master/texmf-dist/tpm/microtype.tpm b/Master/texmf-dist/tpm/microtype.tpm index 14528b54e26..bc9e4bfe2ec 100644 --- a/Master/texmf-dist/tpm/microtype.tpm +++ b/Master/texmf-dist/tpm/microtype.tpm @@ -3,7 +3,7 @@ <rdf:Description about="http://texlive.dante.de/texlive/Package/microtype.zip"> <TPM:Name>microtype</TPM:Name> <TPM:Type>Package</TPM:Type> - <TPM:Date>2006/01/11 23:55:09</TPM:Date> + <TPM:Date>2006/06/01 22:56:38</TPM:Date> <TPM:Version>1.8</TPM:Version> <TPM:Creator>rahtz</TPM:Creator> <TPM:Title> @@ -26,27 +26,31 @@ needed for automatic font expansion. <TPM:Author>R Schlicht</TPM:Author> <TPM:Size>1407293</TPM:Size> <TPM:Build/> - <TPM:RunFiles size="170414"> + <TPM:RunFiles size="194897"> texmf-dist/tex/latex/microtype/microtype.cfg texmf-dist/tex/latex/microtype/microtype.sty texmf-dist/tex/latex/microtype/mt-bch.cfg texmf-dist/tex/latex/microtype/mt-cmr.cfg texmf-dist/tex/latex/microtype/mt-euf.cfg +texmf-dist/tex/latex/microtype/mt-euroitc.cfg texmf-dist/tex/latex/microtype/mt-eus.cfg texmf-dist/tex/latex/microtype/mt-msa.cfg texmf-dist/tex/latex/microtype/mt-msb.cfg +texmf-dist/tex/latex/microtype/mt-mvs.cfg texmf-dist/tex/latex/microtype/mt-pad.cfg texmf-dist/tex/latex/microtype/mt-pmn.cfg texmf-dist/tex/latex/microtype/mt-ppl.cfg texmf-dist/tex/latex/microtype/mt-ptm.cfg +texmf-dist/tex/latex/microtype/mt-ugm.cfg +texmf-dist/tex/latex/microtype/mt-zpeu.cfg texmf-dist/tpm/microtype.tpm </TPM:RunFiles> - <TPM:DocFiles size="849310"> + <TPM:DocFiles size="948768"> texmf-dist/doc/latex/microtype/README texmf-dist/doc/latex/microtype/microtype.pdf texmf-dist/doc/latex/microtype/test-microtype.tex </TPM:DocFiles> - <TPM:SourceFiles size="387569"> + <TPM:SourceFiles size="430299"> texmf-dist/source/latex/microtype/microtype.dtx texmf-dist/source/latex/microtype/microtype.ins </TPM:SourceFiles> diff --git a/Master/texmf/lists/microtype b/Master/texmf/lists/microtype index 6ba9946fb58..677a47f5ee9 100644 --- a/Master/texmf/lists/microtype +++ b/Master/texmf/lists/microtype @@ -8,13 +8,17 @@ texmf-dist/tex/latex/microtype/microtype.sty texmf-dist/tex/latex/microtype/mt-bch.cfg texmf-dist/tex/latex/microtype/mt-cmr.cfg texmf-dist/tex/latex/microtype/mt-euf.cfg +texmf-dist/tex/latex/microtype/mt-euroitc.cfg texmf-dist/tex/latex/microtype/mt-eus.cfg texmf-dist/tex/latex/microtype/mt-msa.cfg texmf-dist/tex/latex/microtype/mt-msb.cfg +texmf-dist/tex/latex/microtype/mt-mvs.cfg texmf-dist/tex/latex/microtype/mt-pad.cfg texmf-dist/tex/latex/microtype/mt-pmn.cfg texmf-dist/tex/latex/microtype/mt-ppl.cfg texmf-dist/tex/latex/microtype/mt-ptm.cfg +texmf-dist/tex/latex/microtype/mt-ugm.cfg +texmf-dist/tex/latex/microtype/mt-zpeu.cfg texmf-dist/tpm/microtype.tpm texmf/lists/microtype |