summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/microtype
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-01-16 11:45:23 +0000
committerNorbert Preining <preining@logic.at>2007-01-16 11:45:23 +0000
commit7e1e5a2f4a65fad2b4f6f8367897aeadb14b0cea (patch)
tree3fe85692b77f9ca75bfb983637db73d1fea622dd /Master/texmf-dist/source/latex/microtype
parentbd7a8738375593f4943cc05c7e3175144b2200d1 (diff)
microtype 2.0
git-svn-id: svn://tug.org/texlive/trunk@3526 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/microtype')
-rw-r--r--Master/texmf-dist/source/latex/microtype/microtype.dtx2642
-rw-r--r--Master/texmf-dist/source/latex/microtype/microtype.ins28
2 files changed, 1523 insertions, 1147 deletions
diff --git a/Master/texmf-dist/source/latex/microtype/microtype.dtx b/Master/texmf-dist/source/latex/microtype/microtype.dtx
index a8ec464b6f5..d78418c3d82 100644
--- a/Master/texmf-dist/source/latex/microtype/microtype.dtx
+++ b/Master/texmf-dist/source/latex/microtype/microtype.dtx
@@ -2,13 +2,13 @@
% ^^A messages to WinEdt:
% -*- TeX:DTX:UK -*-
% smartQuote: English
-% DTXversion: 1.9f
+% DTXversion: 2.0
% ------------------------------------------------------------------------
-% $Id: microtype.dtx,v 1.37 2006-09-09 20:07:46+02 schlicht Exp schlicht $
+% $Id: microtype.dtx,v 1.39 2007-01-14 18:14:29+01 schlicht Exp schlicht $
% ------------------------------------------------------------------------
% The `microtype' package
% An interface to the micro-typographic extensions of pdfTeX
-% Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net>
+% Copyright (c) 2004--2007 R Schlicht <w.m.l@gmx.net>
%
% This work may be distributed and/or modified under the conditions of the
% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -19,26 +19,27 @@
% 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.
+% derived files microtype.sty and letterspace.sty.
%
% 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.
% ------------------------------------------------------------------------
%
+%<package|letterspace>\NeedsTeXFormat{LaTeX2e}
%<*driver>
-\expandafter\newif\csname ifbeta\endcsname
-%\betatrue
-\ProvidesFile{microtype.dtx}[2006/09/09 v\ifbeta 2.0-beta:7 \else 1.9f \fi]
+\ProvidesFile{microtype.dtx}
%</driver>
-%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{microtype}[2006/09/09
-%<package&beta> v2.0-beta:7
-%<package&!beta> v1.9f
-%<package> Micro-typography with pdfTeX (RS)]
+%<package|letterspace>\ProvidesPackage
+%<package> {microtype}
+%<letterspace> {letterspace}
+%<*package>
+ [2007/01/14 v2.0 Micro-typography with pdfTeX (RS)]
+%</package>
+%<letterspace> [2007/01/14 v1.0 Robust letterspacing (RS)]
%<*config>
%<config>\ProvidesFile
-%<m-t> {microtype.cfg}[2006/04/20 v1.8 microtype main configuration file (RS)]
+%<m-t> {microtype.cfg}[2007/01/14 v2.0 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 Roman (RS)]
%<pad> {mt-pad.cfg}[2005/11/07 v1.5 microtype config. file: Adobe Garamond (RS)]
@@ -64,13 +65,11 @@
% \def\ttdefault{blg}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
-\usepackage[expansion=false]{microtype} % it's a web document
+\usepackage[expansion=false,kerning=true]{microtype} % it's a web document
\DeclareMicrotypeSet*[protrusion]{doc}
{ encoding = {*, TS1, OMS},
family = {rm*, tt*, cmsy},
size = {footnotesize, small, normalsize} }
-\ifbeta
- \microtypesetup{kerning=true}
\DeclareMicrotypeSet*[kerning]{lettergothic}
{ encoding = T1,
family = blg }
@@ -78,23 +77,17 @@
{ encoding = T1,
family = blg }
{ _ = {100,100} } % underscores shouldn't touch
-\else
- \newcommand\textls[2][]{#2}
- \let\lsstyle\relax
-\fi
-\usepackage{ifpdf}
\makeatletter
+\usepackage{ifpdf}
\tolerance=700
-\let\textmatrix@patch0
\ifpdf\ifnum\pdftexversion<140 \else
-\if\textmatrix@patch1 % we're using Hartmut's textmatrix.ch patch ...
- \microtypesetup{expansion=alltext,step=1}
- \tolerance=300 % ... so that we can apply almost TeX's default tolerance
- \g@addto@macro\macrocode{\pdfadjustspacing\z@}
- \AtBeginDocument{\def\@pdfproducer{pdftex 1.40.0-beta with textmatrix.ch patch}}
+ \ifx\pdfcolorstack\@undefined\else % pdftex 1.40.0, including textmatrix patch
+ \microtypesetup{expansion=alltext,step=1} % hence we can activate expansion ...
+ \tolerance=300 % ... and can apply almost TeX's default tolerance
+ \g@addto@macro\macrocode{\pdfadjustspacing\z@}
\fi\fi\fi
\let\printlogo\@empty
-\ifbeta\else\ifpdf\InputIfFileExists{microtype-logo.dtx}\relax\relax\fi\fi
+\ifpdf\InputIfFileExists{microtype-logo.dtx}\relax\relax\fi
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{L}[1]{p{#1}<{\raggedright}}
@@ -104,15 +97,7 @@
\definecolor{thegreen}{rgb}{0.06,0.44,0.08}
\definecolor{thegrey} {gray}{0.5}
\definecolor{theshade}{gray}{0.94}
-\ifbeta
- \usepackage[color]{changebar}
- \cbcolor{thered}
- \def\betastart{\ifbeta\cbstart}
- \def\betaend{\cbend\fi}
-\else
- \let\betastart\ifbeta
- \let\betaend\fi
-\fi
+ \definecolor{theframe}{gray}{0.75}
% general layout
\frenchspacing
\expandafter\newif\csname ifcharter\endcsname
@@ -155,7 +140,7 @@
}}\hss}
\let\@oddfoot\@empty
\let\@mkboth\markboth
- \def\sectionmark##1{\markboth{\textls[30]{\MakeUppercase{##1}}}{}}
+ \def\sectionmark##1{\markboth{\textls*[50]{\MakeUppercase{##1}}}{}}
\def\subsectionmark##1{\markright{: ##1}}}
\pagestyle{MTheadings}
% toc
@@ -170,11 +155,19 @@
{\let\numberline\@gobble{\small[#1~--~#2]}}}
\def\l@table{\@dottedtocline{1}{0pt}{1.5em}}
\def\@pnumwidth{1.7em}
-\def\special@outlines{attr{/F 01}} % /C [0.85 0.04 0.07]
-\def\defspecial@toc#1#2#3{%
- \long\def#1{\ifpdf\hypertarget{section.#3}{}\fi
- \section*{#2}\@mkboth{\textls[30]{\MakeUppercase{#2}}}{}\@starttoc{#3}}%
- \ifpdf\pdfoutline \special@outlines goto name {section.#3}{#2}\fi}
+\ifpdf
+ \let\ORIGpdfoutline\pdfoutline
+ \def\special@outlines{attr{/F 01}} % /C [0.85 0.04 0.07]
+ \def\normaloutline{\protected@write\@outlinefile{}%
+ {\let\pdfoutline\ORIGpdfoutline}}
+ \def\specialoutline{\protected@write\@outlinefile{}%
+ {\def\pdfoutline{\ORIGpdfoutline \special@outlines}}}
+ \g@addto@macro\appendix{\specialoutline}
+\fi
+\def\defspecial@toc#1#2#3{\long\def#1{%
+ \ifpdf\phantomsection\specialoutline\pdfbookmark[1]{#2}{#3}\normaloutline\fi
+ \section*{#2}\@mkboth{\textls*[50]{\MakeUppercase{#2}}}{}%
+ \@starttoc{#3}}}
\defspecial@toc\tableofcontents\contentsname{toc}
\defspecial@toc\listoftables\listtablename{lot}
% bibliography
@@ -218,9 +211,9 @@
\vskip 6pt}
% index and change log
\IndexPrologue{\section{Index}%
- 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.}
+ Links refer to the page where the corresponding entry is described (bold face)
+ 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}
@@ -239,7 +232,7 @@
% macrocode
\MacroTopsep=0pt
\MacrocodeTopsep=3pt
-\settowidth\MacroIndent{\scriptsize 000\ }
+\settowidth\MacroIndent{\scriptsize 0000}
\def\theCodelineNo{\reset@font\color{thegrey}\scriptsize\arabic{CodelineNo}}
\def\MacroFont{\ttfamily\small}
\def\AltMacroFont{\ttfamily\footnotesize}
@@ -274,20 +267,17 @@
\else\def\@tempb{\normalsize\{\Variable{#1#2}\}}\fi}
\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\PrintValues[#1]{{\MacroFont\expandafter\@gobble\@tempa\hfill #1}\\*[.25\baselineskip]}
\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}
-\def\SpecialUsageIndex#1{\@bsphack
- {\index{\quotechar!User Commands
+\def\SpecialUsageIndex#1{\@bsphack{\index{\quotechar!User Commands
\actualchar{\protect\indexspace\protect\bfseries User Commands:}%
\levelchar\expandafter\@gobble\string#1\actualchar\string\verb
\quotechar*\verbatimchar\string#1\verbatimchar\encapchar usage}%
- \let\special@index\index\SpecialIndex@{#1}{\encapchar usage}}%
- \@esphack}
+ \let\special@index\index\SpecialIndex@{#1}{\encapchar usage}}\@esphack}
\def\PrintDescribeMacro#1{\strut\MacroFont\color{thegreen}\string #1}
\def\PrintDescribeOption#1{\strut\MacroFont\color{thered}#1}
\def\Indexing{\let\special@index\codeline@wrindex}
@@ -298,49 +288,47 @@
\DeclareRobustCommand\opt[1]{{\ttfamily#1}\@bsphack\CatIndex{#1}{option}\@esphack}
\DeclareRobustCommand\file[1]{{\ttfamily#1}}
% ... and whistles
-\expandafter\newif\csname iflistings\endcsname
+{\catcode`\"\active
+ \gdef\verbatim#1
+ {\catcode`\"\active \def"##1"{\colorbox{theshade}{%
+ \textrm{Text lost! Please install the \pkg{listings} package.}}}%
+ \@beginparpenalty\predisplaypenalty\@verbatim\MacroFont
+ \frenchspacing\@vobeyspaces\expandafter\@xverbatim\@gobble}}
\IfFileExists{listings.sty}{
\usepackage{listings}
\lstset{
- gobble=1,columns=flexible,keepspaces,upquote,
+ gobble=1,columns=flexible,keepspaces,upquote,escapechar=",
basicstyle=\MacroFont,
keywords=[0]{\microtypesetup,\DeclareMicrotypeSet,\UseMicrotypeSet,
\DeclareMicrotypeSetDefault,\SetProtrusion,\SetExpansion,\DisableLigatures,
\DeclareCharacterInheritance,\DeclareMicrotypeAlias,\LoadMicrotypeFile,
- \microtypecontext,\Microtype@Hook},
+ \microtypecontext,\Microtype@Hook,\SetExtraSpacing,\SetExtraKerning,
+ \SetTracking,\textls,\lsstyle,\DeclareMicrotypeBabelHook},
keywordstyle=[0]\color{thegreen},
keywords=[1]{protrusion,expansion,activate,DVIoutput,draft,final,verbose,
- config,factor,auto,stretch,shrink,step,selected,unit,context}, % defersetup
+ config,factor,auto,stretch,shrink,step,selected,unit,context,
+ tracking,spacing,kerning,letterspace,babel}, % defersetup
keywordstyle=[1]\color{thered},
comment=[l]\%,
commentstyle=\color{thegrey}\itshape,
- escapeinside=<>,
- frame=single,backgroundcolor=\color{theshade},rulecolor=\color[gray]{0.75},
+ frame=single,backgroundcolor=\color{theshade},rulecolor=\color{theframe},
xleftmargin=3.4pt,xrightmargin=3.4pt,belowskip=\smallskipamount
}
\let\verbatim\relax
- \lstnewenvironment{verbatim}{}{}
- \listingstrue
+ \lstnewenvironment{verbatim}[1][]{\lstset{##1}}{}
}{
\let\lstset\@gobble
}
-\ifbeta
- \lstset{
- morekeywords=[0]{\SetExtraSpacing,\SetExtraKerning,\DeclareMicrotypeBabelHook,
- \textls,\lsstyle},
- morekeywords=[1]{spacing,kerning,letterspacing,babel}
- }
- \def\todo{\changes{zTo Do}{0000/00/00}}
-\else
- \let\todo\@gobble
-\fi
+\def\todo{\changes{zTo Do}{0000/00/00}}
+\let\todo\@gobble
\newcommand\microtypesample[1]{\begin{quote}#1\end{quote}}
\let\emptypdfpageresources\relax
% fancy PDF document
\ifpdf
- \ifx\eTeXversion\undefined \else % errors when not using etex (conflict with multicol)
- \usepackage{pdfcolmk}
- \fi
+ \ifx\eTeXversion\@undefined \else % errors when not using etex (conflict with multicol)
+ \ifx\pdfcolorstack\@undefined % no longer required with pdftex 1.40
+ \usepackage{pdfcolmk}
+ \fi\fi
\usepackage[bookmarks,pdfdisplaydoctitle,colorlinks,
linkcolor=theblue,urlcolor=theblue,citecolor=theblue,
hyperindex=false,hyperfootnotes=false,
@@ -348,10 +336,12 @@
pdfauthor={R Schlicht <w.m.l@gmx.net>},
pdfsubject={An interface to the micro-typographic extensions of pdfTeX},
pdfkeywords={TeX, LaTeX, pdftex, typography, micro-typography,
- character protrusion, margin kerning, font expansion, font scaling, hz,
- kerning, spacing, letterspacing},
+ character protrusion, margin kerning, font expansion, font scaling,
+ hz, kerning, spacing, interword glue, letterspacing, tracking}
]{hyperref}
\pdfcatalog{/Lang(en-GB)}
+ \ifnum\pdftexversion < 130 \else
+ \IfFileExists{hypdestopt.sty}{\usepackage{hypdestopt}}\relax\fi
\IfFileExists{hyperxmp.sty}{
\usepackage{hyperxmp}
\hypersetup{%
@@ -362,7 +352,7 @@
This work has the LPPL maintenance status `author-maintained'.},
pdflicenseurl={http://www.latex-project.org/lppl/}}
}\relax
- \def\usage#1{\textbf{\textit{\hyperpage{#1}}}}% for indexing of \DescribeMacro ...
+ \def\usage#1{\textbf{\hyperpage{#1}}}% for indexing of \DescribeMacro ...
\def\changes@#1#2#3{% ... the changes ...
\protected@edef\@tempa{\noexpand\glossary{#1\levelchar
\ifx\saved@macroname\@empty \space\actualchar\generalname
@@ -383,34 +373,31 @@
% \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\ctanurl#1{\href{http://www.ctan.org/tex-archive/#1}{\nolinkurl{/#1}}}
+ \DeclareRobustCommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}}
{% 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}}}}
- \let\ORIGpdfoutline\pdfoutline % since hyperref v6.75a, this must be \AtBeginDocument:
- \AtBeginDocument{\protected@write\@outlinefile{}{\let\pdfoutline\ORIGpdfoutline}}
- \g@addto@macro\appendix{\protected@write\@outlinefile{}%
- {\def\pdfoutline{\ORIGpdfoutline \special@outlines}}}
- % the samples on the first page, utilizing nested optional content groups (aka. layers):
- \ifpdf\ifnum\pdftexversion<140 \else \if\textmatrix@patch1
+ % the samples on the first page, utilising nested optional content groups (aka. layers):
+ \ifnum\pdftexversion<140 \else \ifx\pdfcolorstack\@undefined \else
\def\mt@layer#1#2{\pdfliteral{/OC/#1 BDC}#2\pdfliteral{EMC}}
- \let\mt@objects\@empty \let\mt@resources\@empty
+ \ifx\mt@objects\@undefined\let\mt@objects\@empty\fi
+ \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{Protrusion}{true}\mt@register{Protrusion}{false}
+ \mt@register{Expansion} {true}\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] >> >>}
+ /BaseState/ON
+ /OFF [\mt@Protrusion@true \mt@Expansion@true \mt@invisible@] >> >>}
\newbox\mt@box
\def\mt@place#1{%
\setbox\mt@box\vbox{#1}%
@@ -419,24 +406,26 @@
\def\mt@pseudo@marg#1{%
\mt@place{\llap{\vbox{%
\hsize\marginparwidth
- \rightskip 15pt plus 1em
- \leavevmode \footnotesize\itshape #1}}}}
+ \rightskip \marginparsep plus 1em
+ \leavevmode\itshape\footnotesize #1}}}}
\def\mt@show@sample#1#2{%
- \mt@layer{Protrusion#1}{\mt@layer{Expansion#2}{%
- \mt@place{\microtypesetup{protrusion=#1,expansion=#2}%
- \mt@sample@text}}}}
- \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] >>}
+ \mt@layer{Protrusion#1}{%
+ \mt@layer{Expansion#2}{%
+ \mt@place{\microtypesetup{protrusion=#1,expansion=#2}%
+ \mt@sample@text}}}}
+ \def\mt@toggle@sample#1{%
+ \pdfstartlink user{/Subtype/Link
+ /BS << /Type/Border/W 1 /S/D /D[4 1] >>
+ /H/O /C[0.65 0.04 0.07] /Contents(Click to Toggle #1!)
+ %/OC << /Type/OCMD /VE[/Not \mt@invisible@] >> % not honoured by older viewers
+ /A << /S/SetOCGState /State[/Toggle \csname mt@#1@false\endcsname
+ \csname mt@#1@true\endcsname] >>}
#1 \hfill\pdfendlink & \mt@layer{#1true}{\rlap{on}}\mt@layer{#1false}{off}}
\renewcommand\microtypesample[1]{%
\begingroup
\leftskip 15pt \rightskip 15pt
- \parskip 4pt \parindent 0pt
- \vskip 8pt ^^A = \topsep without vertical stretchability
+ \parskip 4pt \parindent 0pt
+ \vskip 8pt % = \topsep without vertical stretchability
\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
@@ -446,7 +435,7 @@
\mt@toggle@sample{Protrusion}\\\addlinespace
\mt@toggle@sample{Expansion}
\end{tabular}}\\[0.3\baselineskip]
- Both features are enabled in this document.}
+ Both features are enabled throughout this document.}
\mt@show@sample{false}{false}
\mt@show@sample{false}{true}
\mt@show@sample{true} {false}
@@ -457,17 +446,18 @@
\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
+ If you had a \acronym{PDF} viewer that understands
+ \acronym{PDF}\,{\smaller1.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.}}
+ \\[0.3\baselineskip] Both features are enabled throughout this document.}}
\def\mt@place##1{\setbox\mt@box\vbox{##1}\unvbox\mt@box}
\mt@show@sample{true}{true}
\vskip 4pt
\endgroup
\edef\x{\pdfpageresources{/Properties <<\mt@resources>>}}\x}
- \def\emptypdfpageresources{\pdfpageresources{}}
- \fi\fi\fi
+ \def\emptypdfpageresources{\pdfpageresources{}}
+ \fi\fi
\else
\usepackage{url}
\newcommand\hyperref[2][]{#2}
@@ -490,16 +480,16 @@
\def\fontdim{\cmd\fontdimen\,}
\def\eg{e.\,g.}
\def\ie{i.\,e.}
-\DeclareRobustCommand\acronym[1]{\texorpdfstring{{%
- \setbox\z@\hbox{\@tempcnta=\f@size \edef\x{\@tempcnta=\the\@tempcnta}\expandafter}\x
+\DeclareRobustCommand\smaller{\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}}
-\makeatother
+ \footnotesize\or\small\or\or\normalsize\or\or\large\or\or\or\Large\fi}
+\DeclareRobustCommand\acronym[1]{\texorpdfstring
+ {{\smaller\ifcharter\textls[60]{#1}\else#1\fi}}{#1}}
+{\catcode`\<=\active
+ \AtBeginDocument{\catcode`\<=\active
+ \def<#1>{\acronym{#1}}
+ \def\contributor#1 <#2\at#3>{\textit{#1}}}}
\CodelineIndex
\EnableCrossrefs
\RecordChanges
@@ -513,12 +503,13 @@
% ^^A -------------------------------------------------------------------------
%\GeneralChanges*
%\changes{v1.0}{2004/09/11}{Initial version}
+%\changes{v2.0}{2006/12/29}{new package \pkg{letterspace}: a stripped-down version}
%\GeneralChanges{Documentation}
%\changes{v1.9b}{2006/01/13}{activate expansion in the distributed <PDF>}
%
% \GetFileInfo{microtype.dtx}
% \title{\printlogo
-% \textls[30]{The \microtype\ package}\\[.3\baselineskip]\large
+% \textls{The \microtype\ package}\\[.3\baselineskip]\large
% An interface to the micro-typographic extensions of \pdftex}
% \author{R Schlicht\quad\mailtoRS}
% \date{\fileversion\ --- \filedate}
@@ -529,46 +520,40 @@
%\noindent
% The \microtype\ package provides an interface to the micro-typographic
% extensions of \pdftex: most prominently, character protrusion and font
-% expansion, furthermore
-%\betastart
-% the adjustment of interword spacing and additional kerning, as well as
-%\betaend
-% the possibility to disable all ligatures of a font.\ifbeta\else\footnote{
-% A preview of the next version with support for even more micro-typographical
-% extensions is also included in this package. Footnote~\ref{fn:beta} on
-% page~\pageref{fn:beta} contains the details.}\fi\
-% It allows to apply these features to customizable sets of fonts, and to
+% expansion, furthermore the adjustment of interword spacing and additional
+% kerning, as well as hyphenatable letterspacing (tracking) and the possibility
+% to disable all ligatures of a font.
+% It allows to apply these features to customisable sets of fonts, and to
% 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, <URW> Garamond, Adobe Garamond and Minion, Bitstream
-% Charter, and the <AMS> symbols and Euler 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 requires \pdftex\ 1.30^^A
-%\betastart,
-% 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.
-%
-%\betastart
-%\bigskip\noindent
-%\textbf{This is a beta version! New features are marked with a red bar.}
-%\betaend
+% Currently, this package provides protrusion settings for Computer Modern
+% Roman, Palatino, Times, <URW> Garamond, Adobe Garamond and Minion,
+% Bitstream Charter, and the <AMS> symbols and Euler 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 requires \pdftex\ 1.30, letterspacing and
+% the adjustment of interword spacing and of kerning requires version 1.40. The
+% package will by default enable protrusion and expansion if they can safely be
+% assumed to work.
+%
+% The alternative package \pkg{letterspace} provides the user commands for
+% letterspacing only, omitting support for all other extensions.
%
%\bigskip\noindent
-% This work may be distributed and/or modified under the conditions of the
-% \IfFileExists{lppl.tex}{\hyperref[LPPL:LPPL]}\relax{\LaTeX\ Project Public License},
+% This package is copyright \textcopyright\ 2004\kern1pt--2007 R Schlicht.
+% It may be distributed and/or modified under the conditions of the
+% \IfFileExists{lppl.tex}{\hyperref[LPPL:LPPL]}\relax
+% {\LaTeX\ Project Public License},
% either version 1.3c of this license or (at your option) any later version.
% This work has the <LPPL> maintenance status `author-maintained'.
%\end{abstract}
%
%
%\newpage
+%\emptypdfpageresources
%\tableofcontents
%\listoftables
%
@@ -576,11 +561,12 @@
%\newpage
%\section{Micro-Typography with \pdftex}\label{sec:micro-type}
%
-% \pdftex, the \TeX\ extension written by \thanh, introduces two features that
-% make it the tool of choice not only for the creation of electronic documents
-% but also of works of outstanding time-honoured typography: \textit{character
-% protrusion} (also known as margin kerning) and \textit{font expansion}.
-% Quoting \thanh's thesis:
+% \pdftex, the \TeX\ extension written by \thanh, introduces a number of
+% micro-typographic features that make it the tool of choice not only for the
+% creation of electronic documents but also of works of outstanding
+% time-honoured typography: most prominently, \textit{character protrusion}
+% (also known as margin kerning) and \textit{font expansion}. Quoting \thanh's
+% thesis:
%
%\changes{v1.9b}{2006/01/13}{add samples of micro-typographic features}
%\microtypesample{\small
@@ -609,7 +595,7 @@
% 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
+% Font expansion, however, was still most difficult to utilise, since it
% required that the font metrics are available for all levels of expansion.
% Therefore, anybody who wanted to make use of this feature had to create
% multiple instances of the fonts in advance. Shell scripts to partly relieve
@@ -622,27 +608,36 @@
% place automatically. That is, \pdftex\ no longer needs the expanded font
% metrics but will calculate them at run-time and completely in memory.
%
-%\betastart
-%\bigskip
+%\bigskip\noindent
% 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.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
+% 1.30 introduced the possibility to \emph{disable all ligatures}, version 1.40
+% a robust \emph{letterspacing} command, the \emph{adjustment of interword
+% spacing} and the possibility to specify \emph{additional character kerning}.
+%
+% Robust and hyphenatable \emph{letterspacing} (tracking) has always been
+% extremely difficult to achieve in \TeX. Although the \cite{soul} package
+% undertook great efforts in making this possible, it could still fail in
+% certain circumstances; even to adjust the tracking of a font throughout the
+% document remained impossible. Employing \pdftex's new extension, this doesn't
+% pose a problem any longer. The \microtype\ package provides the possibility
+% to change the tracking of customisable sets of fonts, \eg, small capitals. It
+% also introduces two new commands \cs{textls} and \cs{lsstyle} for ad-hoc
+% letterspacing, which can be used like the normal text commands.
+%
+% \emph{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
% depend on the surrounding characters. For example, if a words ends with an
% `r', the following space should be a tiny bit smaller than that following an,
% say, `m'. You can think of this concept as an extension to \TeX's `space
% factors'. However, while space factors will influence all three parameters of
-% interword space (or glue) by the same amount -- the kerning, the maximum
+% 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 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.
-%
% Emphasis in the last sentence is on the word `may': this extension is still
% highly experimental -- in particular, only ending characters will currently
% have an influence on the interword space. Also, the settings that are shipped
@@ -650,58 +645,34 @@
% corrections and improvements very much. I suggest reading the reasoning
% behind the settings in section~\ref{sub:conf-spacing}.
%
-% Setting additional kerning for characters of a font is especially useful for
-% languages whose typographical tradition requires certain characters to be
-% separated by a space. For example, it is customary in French typography to
-% add a small space before question mark, exclamation mark and semi-colon, and
-% a bigger space before the colon and the guillemets. Until now, this could
-% only be achieved by making these characters active (for example by the
-% \pkg{babel} package), which may not always be a robust solution. In contrast
-% to the standard kerning that is built into the fonts (and will of course
-% apply as usual), this additional kerning is based on single characters, not
-% on character pairs.
-%
-% Another application for this feature is letterspacing, which was even more
-% difficult to achieve on the macro level. This package introduces a new
-% command \cs{textls}, which can be used much like the normal text commands.
-%\betaend
-%
-% 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. The
-% \microtype\ package 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 percent signs
-% before `\texttt{\textbackslash betatrue}' near the beginning of
-% \file{microtype.ins} resp. \file{microtype.dtx}.}\fi
-%
-%\ifbeta\else\pagebreak\fi ^^A layout
-%\emptypdfpageresources
+% Setting \emph{additional kerning} for characters of a font is especially
+% useful for languages whose typographical tradition requires certain
+% characters to be separated by a space. For example, it is customary in French
+% typography to add a small space before question mark, exclamation mark and
+% semi-colon, and a bigger space before the colon and the guillemets. Until
+% now, this could only be achieved by making these characters active (for
+% example by the \pkg{babel} package), which may not always be a robust
+% solution. In contrast to the standard kerning that is built into the fonts
+% (and will of course apply as usual), this additional kerning is based on
+% single characters, not on character pairs.
+%
+% The possibility, finally, to \emph{disable all ligatures} of a font may be
+% useful for typewriter fonts.
+%
+%\emptypdfpageresources ^^A layout
%\bigskip\noindent
% The \microtype\ package provides an interface to all these micro-typographic
-% extensions.\footnote{
-% Therefore, it is an alternative, not a supplement, to the \pkg{pdfcprot}
-% package, which provides an interface to character protrusion.}
-% All micro-typographic aspects may be customized to your taste and needs in a
-% straightforward manner. The next chapters will present a survey of all
-% options and customization possibilities.
+% extensions. All micro-typographic aspects may be customised to your taste and
+% needs in a straight-forward manner. The next chapters will present a survey
+% of all options and customisation possibilities.
%
%
%\section{Invoking the Package}
%
% There is nothing surprising in loading this package:
-%{\lstset{morekeywords=[1]{microtype}}
-%\begin{verbatim}
+%\begin{verbatim}[morekeywords={[1]{microtype}}]
%\usepackage{microtype}
-%\end{verbatim}}
-%\noindent
+%\end{verbatim}
% This will be sufficient in most cases, and if you are not interested in
% fine-tuning the micro-typographic appearance of your document (which would
% seem unlikely, since using this package is proof of your interest in
@@ -761,15 +732,14 @@
% section~\ref{sec:font-sets} for a detailed discussion. Specifying a font set
% for a feature implies activating this feature.
%
-%\betastart
%\bigskip
-%\Describe{Option}{spacing}{true,!false,:font set name}
+%\Describe{Option}{tracking}{true,!false,:font set name}
+%\DescribeOption{spacing}
%\DescribeOption{kerning}
-% The new extensions of interword spacing and additional kerning adjustment do
-% not feature a compatibility layer. Therefore, they can only be switched on or
+% The new extensions of tracking, interword spacing, and additional kerning do
+% not have a compatibility level. 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 feature is enabled.
-%\betaend
%
%\bigskip\noindent
% Whether ligatures should be disabled cannot be controlled via a package option
@@ -777,7 +747,6 @@
% section~\ref{sec:disable-ligatures}.
%
%
-%\ifbeta\pagebreak\fi ^^A layout
%\subsection{Options for Character Protrusion}\label{sub:options-protrusion}
%
%\Describe{Option}{factor}{:integer}[1000]
@@ -807,7 +776,7 @@
% 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},
-% \eg, \file{cmr12+10}, as described in the \cite[p.~20]{pdftexman}). If expanded
+% \eg, \file{cmr12+10}, as described in the \cite{pdftexman}). If expanded
% instances of the fonts are available, they will be used regardless whether
% \opt{auto} is true or not.
%
@@ -820,7 +789,6 @@
% 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}
@@ -864,12 +832,21 @@
% See section~\ref{sub:expansion} for a more detailed discussion.
%
%
+%\subsection{Option for Tracking/Letterspacing}\label{sub:option-tracking}
+%
+%\Describe{Option}{letterspace}{:integer}[100]
+% This option changes the default amount for tracking (see
+% section~\ref{sub:tracking}) resp. letterspacing (see
+% section~\ref{sec:lettersp}). The amount is specified in thousandth of 1em;
+% admissible values are in the range of \textminus1000 to +1000.
+%
+%
%\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>
% files.\footnote{
-% Modern \TeX\ systems are using pdfe\TeX\ as the default engine even for
+% Recent \TeX\ systems are using pdfe\TeX\ as the default engine even for
% <DVI> output.}
% The latter can be ordered with the option \opt{DVIoutput}, which will set
% \cmd\pdfoutput\ to zero.
@@ -887,14 +864,18 @@
% \emph{Automatic} font expansion will not work because dvips (resp. the <DVI>
% viewer) is not able to generate the expanded fonts on the fly.
%
-%\ifbeta\else\pagebreak\fi ^^A layout
+%\changes{v2.0}{2006/11/28}{add remark about `\opt{draft}' option disabling \microtype\
+% (noted by \contributor Michalis Miatidis <miatidis\at informatik.rwth-aachen.de>)}
%\bigskip
%\Describe{Option}{draft}{true,!false}
%\DescribeOption{final}
% If the \opt{draft} option is passed to the package, \emph{all
-% micro-typographic extensions will be disabled}. The \opt{draft} and
-% \opt{final} options may also be inherited from the class options; of course,
-% you can override them in the package options.
+% micro-typographic extensions will be disabled}, which may lead to different
+% line, and hence page, breaks. The \opt{draft} and \opt{final} options may
+% also be inherited from the class options; of course, you can override them in
+% the package options. E.\,g., if you are using the class option |draft| to
+% show any overfull boxes, you should load \microtype\ with the |final|
+% option.
%
%\bigskip
%\Describe{Option}{verbose}{true,!false,errors}
@@ -907,7 +888,6 @@
% will turn all warnings into errors, so that you can be sure that no problem
% will go unnoticed.
%
-%\ifbeta\pagebreak\fi ^^A layout
%\bigskip
%\Describe{Option}{config}{:file name}[microtype]
% Various settings for this package will be loaded from a main configuration
@@ -929,21 +909,14 @@
% |defersetup=false|. Then, however, the aforementioned restrictions apply.
%\fi
%
-%\betastart
-%\bigskip
-%\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 the text. The
-% amount is specified in thousandth of 1em.
-%
%\bigskip
%\Describe{Option}{babel}{true,!false}
% Loading the package with the \opt{babel} option will adjust the typesetting
% according to the respective selected language. Read section~\ref{sec:context}
% for further information.
-%\betaend
%
%
+%\markright{} ^^A layout
%\subsection{Changing Options Later}\label{sec:options-cmd}
%
%\Describe{Macro}{\microtypesetup}{key\,|=|\,value list}
@@ -955,10 +928,8 @@
% \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
-% Since there is no compatibility level for \key{spacing} and \key{kerning},
-% only the values |true| and |false| are admissible here.
-%\fi
+% Since there is no compatibility level for \key{tracking}, \key{spacing} and
+% \key{kerning}, only the values |true| and |false| are admissible here.
% Using this command, you could for instance temporarily disable font expansion
% by saying:
%\begin{verbatim}
@@ -970,7 +941,7 @@
%
% 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 subject to font
-% expansion. You may want to customize which fonts should get the benefit of
+% expansion. You may want to customise 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.
@@ -997,11 +968,9 @@
% }
%\end{verbatim}
% If you now call
-%{\lstset{deletekeywords=[1]{protrusion}}
-%\begin{verbatim}
+%\begin{verbatim}[deletekeywords={[1]{protrusion}}]
%\UseMicrotypeSet[protrusion]{basictext}
-%\end{verbatim}}
-%\noindent
+%\end{verbatim}
% 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,
@@ -1020,14 +989,9 @@
%\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
+% If a value is followed by an asterisk (like `|rm*|' and `|sf*|' in the above
+% example), 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|').
-%\fi
% A single asterisk means |\|\meta{attribute}|default|, \eg,
% \cmd\encodingdefault, respectively \cmd\normalsize\ for the size axis.
%
@@ -1048,8 +1012,7 @@
% 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}
+%\begin{verbatim}[deletekeywords={[1]{protrusion}}]
%\DeclareMicrotypeSet
% [ protrusion ]
% { myset }
@@ -1057,8 +1020,7 @@
% family = rm*,
% font = {T1/tt*/m/n/*,
% T1/tt*/m/it/*} }
-%\end{verbatim}}
-%\noindent
+%\end{verbatim}
% As you can tell from the example, the asterisk notation is also allowed for
% the |font| key. Size selection commands are possible, too, however, ranges are
% not allowed.
@@ -1084,24 +1046,36 @@
% & --
% & -- \\
%\cmidrule(r){1-1}
-% |alltext|\linebreak\linebreak(|allmath|)
-% & <OT1>, <T1>, <LY1>, <OT4>,\linebreak
-% <QX>, <T5>, <TS1>\linebreak
+% |alltext|\linebreak(|allmath|)
+% & Text encodings, <TS1>\linebreak
% (<OML>, <OMS>, <U>)
% & --
% & --
% & --
% & -- \\
%\cmidrule(r){1-1}
-% |basictext|\linebreak\linebreak(|basicmath|)
-% & <OT1>, <T1>, <LY1>, <OT4>,\linebreak
-% <QX>, <T5> \linebreak
+% |basictext|\linebreak(|basicmath|)
+% & Text encodings \linebreak
% (<OML>, <OMS>)
% & |\rm*|,\linebreak |\sf*|
% & |\md*|
% & --
% & \cmd\normalsize, \cmd\footnotesize, \cmd\small, \cmd\large\\
%\cmidrule(r){1-1}
+% |smallcaps|
+% & Text encodings
+% & --
+% & --
+% & sc
+% & -- \\
+%\cmidrule(r){1-1}
+% |footnotesize|\linebreak(|scriptsize|)
+% & Text encodings, <TS1>
+% & --
+% & --
+% & --
+% & |-\small|\linebreak(|-\footnotesize|) \\
+%\cmidrule(r){1-1}
% |normalfont|
% & |\encoding*|
% & |\family*|
@@ -1110,19 +1084,17 @@
% & |\normalsize| \\
%\bottomrule
%\end{tabular}
-% \vskip8pt
-% `|*|' = `|default|'
+% \vskip8pt\footnotesize
+% `Text encodings' = <OT1>, <T1>, <LY1>, <OT4>, <QX>, <T5>\hfill
+% `\dots|*|' = `\dots|default|'
%\end{table}
%
-% Table~\ref{tab:predefined-font-sets} lists the six predefined font sets. They
-% may also be activated by passing their name to the feature options
-% \opt{expansion} and \opt{protrusion}
-%\ifbeta
-% and \opt{spacing} and \opt{kerning}
-%\fi
-% when loading the package, for example:
+% Table~\ref{tab:predefined-font-sets} lists the nine predefined font sets.
+% They may also be activated by passing their name to the feature options
+% \opt{protrusion}, \opt{expansion}, \opt{tracking}, \opt{spacing} and
+% \opt{kerning} when loading the package, for example:
%\begin{verbatim}
-%\usepackage[protrusion=allmath,expansion=basicmath]{microtype}
+%\usepackage[protrusion=allmath,tracking=smallcaps]{microtype}
%\end{verbatim}
%
%\bigskip
@@ -1136,9 +1108,8 @@
%\Describe{Macro}{\DeclareMicrotypeSetDefault}{?features,set name}
% 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.
+% set will be used for character protrusion and additional kerning, the
+% `|basictext|' set for font expansion and interword spacing.
%
%\bigskip\noindent
% These commands may only be used in the preamble or in the main configuration
@@ -1148,11 +1119,34 @@
%
%\section{Micro Fine Tuning}\label{sec:fine-tuning}
%
-% Every character asks for a particular amount of protrusion. It may also be
-% desirable to restrict the maximum expansion of certain characters.
-% Furthermore, since every font looks different, settings have to be specific
-% to a font or set of fonts. This package offers flexible and straight-forward
-% methods of customizing these finer aspects of micro-typography.
+% Every character asks for a particular protrusion, spacing or kerning amount.
+% It may also be desirable to restrict the maximum expansion of certain
+% characters. Furthermore, since every font looks different, settings have to
+% be specific to a font or set of fonts. This package offers flexible and
+% straight-forward methods of customising these finer aspects of
+% micro-typography.
+%
+% All fine-tuning commands follow basically the same syntax: They all take
+% three arguments; the first one is optional and may contain additional
+% options; in the second argument, you specify the set of fonts to which the
+% settings should apply; the third argument contains the actual settings.
+%
+% 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} (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
+% combinations of font encoding, family, series, shape and size, with
+% decreasing significance in this order. For instance, if both settings for the
+% current family (say, |T1/cmr///|) and settings for italic fonts in the normal
+% weight (|T1//m/it/|) exist, those for the Computer Modern Roman font would
+% apply.\footnote{
+% For the interested, table~\ref{tab:match-order} on
+% page~\pageref{tab:match-order} presents the exact order.}
+% The encoding must always match.
%
%\subsection{Character Protrusion}\label{sub:protrusion}
%
@@ -1195,24 +1189,6 @@
% can omit either number if the character should not be protruded on that side,
% but must not drop the separating comma.
%
-%\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} (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
-% combinations of font encoding, family, series, shape and size, with
-% decreasing significance in this order. For instance, if both settings for the
-% current family (say, |T1/cmr///|) and settings for italic fonts in the normal
-% weight (|T1//m/it/|) exist, those for the Computer Modern Roman font would
-% apply.\footnote{
-% For the interested, table~\ref{tab:match-order} on
-% page~\pageref{tab:match-order} presents the exact order.}
-% The encoding must always match.
-%
%\paragraph{Options:}
%\begin{options}
% \item[\key{name}] You may assign a name to the protrusion settings, so that you
@@ -1261,7 +1237,7 @@
% \item[\key{inputenc}] Select an input encoding that should apply to this
% list, regardless of what the document's input encoding is. You may specify
% any encoding that can be loaded via the \pkg{inputenc} package, \eg,
-% |ansinew|, |koi8-r|, |utf8|.
+% |ansinew|, |koi8-r|, |utf8|, with the exception of |uft8x|.
% \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}
@@ -1291,9 +1267,6 @@
% for expansion is 1000, which means that all characters would be expanded by
% the same amount.
%
-%\paragraph{The set of fonts}
-% is declared in the same way as for \cs{SetProtrusion}.
-%
%\paragraph{Options:}
%\begin{options}
% \item[\key{name}, \key{load}, \key{preset}, \key{inputenc}, \key{context}]
@@ -1310,7 +1283,6 @@
% either one of |stretch|, |shrink| and |step|, their respective global
% value will be used (that is, no calculation will take place).
%
-%\enlargethispage\baselineskip ^^A layout
% 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
@@ -1321,15 +1293,8 @@
% \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.}
-%{\lstset{gobble=2}
-%\begin{verbatim}
+% document typeset in 10pt:
+%\begin{verbatim}[gobble=2]
% \SetExpansion
% [ stretch = 30,
% shrink = 60,
@@ -1337,11 +1302,17 @@
% { encoding = *,
% size = 10.001 }
% { }
-% \newcommand{\expandpar}[1]{{%
+% \newcommand{\expandpar}[1]{{%"^^A
+% \footnote{Note that the \cmd\expandpar\ command can only be applied to ^^A
+% complete paragraphs. If you are using Computer Modern Roman, you ^^A
+% have to load the \pkg{fix-cm} package to be able to select fonts ^^A
+% in arbitrary sizes. Finally, the reason I suggest to use a larger ^^A
+% font, and not a smaller one, is to prevent a different design size ^^A
+% being selected.}"
% \fontsize{10.001}{\baselineskip}\selectfont #1\par}}
% % ...
% \expandpar{This paragraph contains an `unnecessary' widow.}
-%\end{verbatim}}
+%\end{verbatim}
% \item[\key{factor}]
% This option provides a different method to alter expansion settings for
% certain fonts, working around another restriction of \pdftex: it does
@@ -1377,13 +1348,61 @@
% or shrunk by the same amount, you would have to declare an empty list for
% these fonts.
%
-%\betastart
+%
+%\subsection{Tracking}\label{sub:tracking}
+%\Describe{Macro}{\SetTracking}{?options,set of fonts,tracking amount}
+% An important typographic technique -- which was missing in \TeX\ for a long
+% time -- is tracking, \ie, the uniform addition or subtraction of letter space
+% to/from all the characters in a font. For example, it is good typographic
+% practice to slightly space out pieces of text set in all capitals or small
+% capitals (as in this document), and to increase letter spacing of smaller and
+% decrease that of larger type.\footnote{
+% For full-featured fonts like Computer Modern, this is usually not
+% necessary, though, since they come in optical sizes, and the tracking of
+% the small-capitals font is already adjusted.}
+% With \pdftex\ 1.40 and \microtype, this is now possible, and moreover, easy
+% to achieve. For instance, to increase the letter spacing of all fonts smaller
+% than \cmd\small, and also space out the small-caps font, you could specify
+% something like the following:
+%\begin{verbatim}
+%\usepackage[tracking=true]{microtype}
+%\DeclareMicrotypeSet*[tracking]{my}
+% { encoding = *,
+% size = -small,
+% font = */*/*/sc/* }
+%\SetTracking{ encoding = *, shape = sc }{ 50 }
+%\SetTracking{ encoding = *, size = footnotesize }{ 70 }
+%\SetTracking{ encoding = *, size = -footnotesize }{ 100 }
+%\end{verbatim}
+% In the above example, the small-caps font would be spaced out by 50/1000em
+% (0.025em on each side of each character), fonts in \cmd\footnotesize\ would
+% be spaced out by 0.07em, and even smaller type by 0.1em. The amount of letter
+% spacing is given in thousandth of 1em. The interword space will be scaled
+% accordingly.
+%
+% Letterspaced fonts for which you do not specify an amount will be spaced out
+% by the default of 0.1em (adjustable with the package option \opt{letterspace},
+% see section~\ref{sub:options-misc}). Suppose your editor wants you to shorten
+% your 1000 pages chef-d'\oe uvre by 20 pages, you could load \microtype\ with
+% (fingers crossed):
+%\begin{verbatim}
+%\usepackage[tracking=alltext,letterspace=-40]{microtype}
+%\end{verbatim}
+%
+%\paragraph{Options:}
+%\begin{options}
+% \item[\key{name}, \key{unit}, \key{context}]
+% These options serve the same function as in the previous configuration
+% commands. The unit may be any dimension, default is 1em.
+%\end{options}
+%
+%
%\subsection{Interword Spacing}\label{sub:interword-spacing}
%
%\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 on what a `space' is may be in order: Between two
-% words, \TeX\ will insert a so called glue, which is characterized by three
+% words, \TeX\ will insert a so called glue, which is characterised 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
@@ -1405,8 +1424,6 @@
% Not all values have to be specified, however, the settings must contain the
% two separating commas.
%
-%\paragraph{The set of fonts} is declared in the usual way.
-%
%\paragraph{Options:}
%\begin{options}
% \item[\key{name}, \key{load}, \key{factor}, \key{inputenc}, \key{context}]
@@ -1423,7 +1440,7 @@
% [ unit = space ] % default
% { font = */*/*/*/* }
% {
-% . = {1000,1000,1000},
+% . = {1000,1000,1000},
% }
%\end{verbatim}
% the space inserted after a full stop would be doubled (technically
@@ -1436,23 +1453,27 @@
% |character|).
%\end{options}
%
+%
%\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
+% is always associated with a \emph{pair} of characters, and to tracking, which
+% specifies the space between all characters of a font, the additional kerning
% 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.
%
+% I should not neglect to mention a limitation of this additional kerning:
+% hyphenation \emph{after} the insertion will be inhibited. This restriction of
+% \pdftex\ will hopefully be lifted one day.
+%
%\paragraph{The kerning settings}
% 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.
%
-%\paragraph{The set of fonts}\dots\ well, you know by now~\dots
-%
%\paragraph{Options:}
%\begin{options}
% \item[\key{name}, \key{load}, \key{factor}, \key{preset}, \key{inputenc}]
@@ -1464,26 +1485,26 @@
% especially useful, since it allows to apply settings depending on the
% current language (see section~\ref{sec:context}).
%\end{options}
-%\betaend
+%
%
%\subsection{Character Inheritance}\label{sub:inherit}
%
% \Describe{Macro}{\DeclareCharacterInheritance}
% {?features,set of fonts,inheritance lists}
-% In most cases, accented characters should inherit the protrusion resp.
-% 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 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. Additionally, it accepts the |inputenc|
-% key to set the input encoding for this 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 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
-% to change the default character inheritance settings.
+% In most cases, accented characters should inherit the settings 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 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. Additionally, it accepts the |inputenc| key to set the input encoding
+% for this 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 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 to change the default character
+% inheritance settings.
%
%\bigskip\noindent
% In the main configuration file \file{microtype.cfg} and the other
@@ -1492,12 +1513,11 @@
%
%\subsection{Configuration Files}\label{sub:config-file}
%
-% The default configuration, consisting of inheritance settings, declarations of
-% font sets and alias fonts, and generic protrusion\ifbeta, \else\space and \fi
-% expansion\ifbeta, spacing and kerning\fi\space settings, will be loaded from the
-% file \file{microtype.cfg}. You may extend this file with custom settings (or
-% load a different configuration file with the `\opt{config}' option, see
-% section~\ref{sub:options-misc}).
+% The default configuration, consisting of inheritance settings, declarations
+% of font sets and alias fonts, and generic protrusion, expansion, spacing and
+% kerning settings, will be loaded from the file \file{microtype.cfg}. You may
+% extend this file with custom settings (or load a different configuration file
+% with the `\opt{config}' option, see section~\ref{sub:options-misc}).
%
% 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:
@@ -1578,10 +1598,6 @@
% fonts (Adobe, <ITC> and \pkg{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
-% of this package.
-%
%\bigskip
%\Describe{Macro}{\DeclareMicrotypeAlias}{font name,alias font}
% You may use this command for fonts that are very similar, or actually the same
@@ -1596,7 +1612,6 @@
% not find settings for it, also try the font |cmr|. In fact, you will find
% 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
@@ -1619,9 +1634,9 @@
%\Describe{Macro}{\microtypecontext}{context assignments}
% This command may be used anywhere in the document (also in the preamble) to
% 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.
+% \key{expansion}, \key{tracking}, \key{spacing} and \key{kerning}), 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>)}
@@ -1655,7 +1670,6 @@
%\end{verbatim}
% For other classes, the command would have to be changed in a similar way.
%
-%\betastart
%\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:
@@ -1684,7 +1698,7 @@
% contains among others the following declaration:
%\begin{verbatim}
%\DeclareMicrotypeBabelHook
-% {french,francais}
+% {french,francais,acadian,canadien}
% {kerning=french, spacing=}
%\end{verbatim}
% Consequently, whenever you switch to the French language, the kerning context
@@ -1694,58 +1708,56 @@
% Currently, \microtype\ supports French and Turkish kerning and English
% spacing (aka. \cmd\nonfrenchspacing). For unknown languages, all contexts
% will be reset.
-%\betaend
+%
+%
+%\section{\textls*[150]{Letterspacing}\, revisited}\label{sec:lettersp}
+%
+%\Describe{Macro}{\textls}{?amount,general text}
+%\DescribeMacro{\textls*}
+%\DescribeMacro{\lsstyle}
+% While the \opt{tracking} feature, described in section~\ref{sub:tracking},
+% will apply to sets of fonts, you may also want to letterspace shorter pieces
+% of text, regardless of the font in which they are typeset. Therefore, the
+% \microtype\ package also introduces two commands for such ad-hoc
+% letterspacing.\footnote{
+% Letterspacing should be used cautiously. Renowned typographers have
+% compared letterspacing lower-case text to stealing sheep (a capital offence
+% in Britain in the 19th century). Unless you know what you are doing, you
+% should probably only letterspace small-capitals or all-capitals. Another
+% just cause may be emphasis in texts typeset in Fraktur fonts.}
+%
+% By default, each character will be spaced out by 100/1000em (0.05em on each
+% side); this amount may be altered in the optional argument to \cs{textls},
+% using the \cs{SetTracking} command, or globally with the \opt{letterspace}
+% package option (see section~\ref{sub:options-misc}).
+%
+% The starred version of \cs{textls} will not add any extra space before or
+% after the text, which may be useful, \eg, for section titles.
+%
+%\bigskip\noindent
+% These two commands (plus the \opt{letterspace} option) are also available
+% with the \pkg{letterspace} package, which is in fact a much stripped-down
+% version of \microtype, omitting support for all the other extensions. If you
+% find that you don't need \microtype's specialties and it is only slowing down
+% the compilation, you should use the \pkg{letterspace} package instead (which
+% won't work together with \microtype; it does not contain anything that
+% \microtype\ doesn't).
%
%
%\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:
+% While completely disabling all ligatures of a font (which will also switch
+% off kerning for this font), 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
+% This command may only be used in the preamble.
%
%
%\section{Hints and Caveats}\label{sec:caveats}
@@ -1770,14 +1782,16 @@
% If you are so lucky as to be in the possession of multiple instances of a
% 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,
-% 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
-% electronically.
+%\changes{v2.0}{2006/12/13}{qualify hint about web documents with regard to older \pdftex\ versions}
+%\paragraph{Don't use font expansion for web documents (with older \pdftex\ versions).}
+% With \pdftex\ older than 1.40, each expanded instance of the font will be
+% embedded in the <PDF> file, hence 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 electronically. With \pdftex\ 1.40, which
+% uses a different technique of expansion, the file size increase can be
+% neglected.
%
-%\betastart
%\paragraph{Only employ kerning adjustment if it is customary in the language's
%typographic tradition.}
% In contrast to protrusion and expansion (and possibly adjustment of interword spacing),
@@ -1786,10 +1800,9 @@
% 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.9e}{2006/07/10}{add hint about unknown encodings}
-%\paragraph{Settings for Cyrillic/Greek/Thai etc. encodings. are currently not included.}
+%\paragraph{Settings for Cyrillic/Greek/Thai etc. encodings are currently not included.}
% The default sets of fonts for which the micro-typographic features will be
% enabled (see table~\ref{tab:predefined-font-sets}) only contain those
% encodings for which configurations exist. Therefore, if you are using any
@@ -1801,7 +1814,7 @@
% contributions for these encodings are more than welcome.
%
%\changes{v1.9}{2005/07/10}{add hint about \texttt{verbatim} environment}
-%\paragraph{You might want to disable protrusion in \textup{\texttt{verbatim}} environments.}
+%\paragraph{You might want to disable protrusion in \texttt{verbatim} environments.}
% As you know by now, \microtype\ will by default apply character protrusion to
% all fonts contained in the font set `|alltext|'. This also includes the
% typewriter font. Although it does make sense to protrude the typewriter font
@@ -1847,50 +1860,76 @@
%\begin{itemize}
%\lstset{belowskip=-\smallskipamount,frame=none,xleftmargin=0pt,backgroundcolor=,
% basicstyle=\MacroFont\footnotesize}
+%\changes{v1.9a}{2005/11/15}{add explanation for error message in <DVI> mode}
% \item
%\begin{verbatim}
-%Warning: pdflatex: font ptmr8r cannot be expanded (not an included Type1 font)
+%! Font csnameendcsname=cmr10+20 at 10.0pt not loadable: Metric (TFM) file not found.
%\end{verbatim}
-% and the <PDF> viewer complains about a missing font, \eg, Adobe Reader:
-%{\lstset{aboveskip=\smallskipamount}
+% This error message will occur if you are trying to employ font expansion
+% while creating <DVI> output. Remember, that \emph{automatic} font expansion
+% only works when running \pdftex\ in <PDF> mode. Although expansion is also
+% possible in <DVI> mode, it requires that all instances of the expanded fonts
+% exist on your \TeX\ system.
+%
+%\changes{v2.0}{2006/12/13}{qualify hints about expansion error messages with regard to older \pdftex\ versions}
+% \item
%\begin{verbatim}
+%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 thusly:
+%\begin{verbatim}[aboveskip=\smallskipamount]
%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
-% 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.
-%\changes{v1.9a}{2005/11/15}{add explanation for error message with bitmap fonts}
+%\end{verbatim}
+% With \pdftex\ versions older than 1.40, font expansion can only be applied if
+% the font is actually embedded in the <PDF> file. If you get 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|.
+%
+%\changes{v1.9a}{2005/11/15}{add explanation for error message with non-Type\,1 fonts}
% \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 (yet) possible, unless you manually
-% create expanded instances of the fonts.
-%\changes{v1.9a}{2005/11/15}{add explanation for error message in <DVI> mode}
+% Furthermore, \pdftex\ older than 1.40 requires Type\,1 fonts for automatic
+% font expansion. When you receive a message like the above, you are probably
+% trying to apply font expansion to a bitmap or TrueType font. With older
+% \pdftex\ versions, this is only possible if you manually create expanded
+% instances of the fonts.
+%
+%\changes{v2.0}{2006/11/05}{add hint about how to increase \texttt{font\textunderscore max}
+% and \texttt{font\textunderscore mem\textunderscore size}}
% \item
%\begin{verbatim}
-%! Font csnameendcsname=cmr10+20 at 10.0pt not loadable: Metric (TFM) file not found.
+%! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loaded: Not enough room left.
%\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.
+% Memory parameter `|font_mem_size|' too small.
+% \item
+%\begin{verbatim}
+%! TeX capacity exceeded, sorry [maximum internal font number (font_max)=2000].
+%\end{verbatim}
+% Memory parameter `|font_max|' too small.
% \item
%\begin{verbatim}
%! TeX capacity exceeded, sorry [PDF memory size (pdf_mem_size)=65536].
%\end{verbatim}
+% Memory parameter `|pdf_mem_size|' too small (\pdftex\ versions older than 1.30).
+%
% 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.
+% fonts, \pdftex\ may be running out of some kind of memory. It may be
+% increased by setting the respective parameter to a larger value. For
+% web2c-based systems, change the settings in \file{texmf.cnf}, for MiK\TeX, in
+% the file \file{miktex.ini} (2.4) resp. \file{pdflatex.ini} (2.5).
+%
+%\changes{v2.0}{2007/01/05}{add hint about warning when tracking \emph{and}
+% expansion is applied to a font}
+% \item
+%\begin{verbatim}[deletekeywords={[1]{expansion}}]
+%pdfTeX warning (font expansion): font should be expanded before its first use
+%\end{verbatim}
+% This warning will occur if tracking \emph{and} expansion is applied to a font.
+% It is harmless and can be ignored.
%\end{itemize}
%
%
@@ -1911,10 +1950,12 @@
%\section{Acknowledgments}
%
% 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.
+% hadn't created the \pdftex\ programme in the first place, which introduced
+% the micro-typographic extensions and made them available to the \TeX\ world.
% Furthermore, I thank him for helping me to improve this package, and not
-% least for promoting it in [\cite{ThanhPracTeX}].
+% least for promoting it in [\cite{ThanhPracTeX}]. I also thank him and the
+% rest of the \pdftex\ team for refuting the idea that \TeX\ is dead, and for
+% fixing the bugs I find.
%
% \contributor Harald Harders <h.harders\at tu-bs.de> has contributed protrusion
% settings for Adobe Minion. I~would also like to thank him for a number of bug
@@ -1923,11 +1964,9 @@
% possibility to specify ranges of font sizes, and resourcefully assisted in
% 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,
% 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.
%
@@ -1939,11 +1978,8 @@
% hook in his \pkg{ledmac}/\pkg{ledpar} packages, so that critical editions can
% finally also benefit from character protrusion.
%
-% Additionally, the following people have reported bugs or helped otherwise
-% (in chronological order):
-%\ifbeta\else
-% \contributor Ulrich Dirr <ud\at art-satz.de>,
-%\fi
+% Additionally, the following people have reported bugs, made suggestions or
+% helped otherwise (in chronological order):
% \contributor Tom Kink <kink\at hia.rwth-aachen.de>,
% \contributor Herb Schulz <herbs\at wideopenwest.com>,
% \contributor Michael Hoppe <mh\at michael-hoppe.de>,
@@ -1958,9 +1994,12 @@
% \contributor Michael Zedler <Michael.Zedler\at tum.de>,
% \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>
+% \contributor Holger Uhr <huhr\at uni-paderborn.de>,
+% \contributor Peter Dyballa <Peter_Dyballa\at Web.DE>,
+% \contributor Steven Bath <steven128\at iname.com>,
+% \contributor Daniel Flipo <daniel.flipo\at univ-lille1.fr>
% and
-% \contributor Peter Dyballa <Peter_Dyballa\at Web.DE>.
+% \contributor Michalis Miatidis <miatidis\at informatik.rwth-aachen.de>.
%
%
%\begin{thebibliography}{}
@@ -1970,7 +2009,7 @@
% \newblock in: \textit{TUGBoat}, vol.~21(2000), no.~4, pp.~317--434.
% \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb21-4/tb69thanh.pdf})
%
-%\iffalse
+%\iffalse ^^A obsolete
% \bibitem[Th\`anh 2001]{ThanhTUG}
% \thanh, \emph{Margin Kerning and Font Expansion with \pdftex},
% \newblock in: \textit{TUGBoat}, vol.~22(2001), no.~3 -- Proceedings of the
@@ -1991,13 +2030,14 @@
% Meeting of the European \TeX\ Users, March~7 -- March~11, 2005,
% Abbaye des Pr\'emontr\'es, Pont-\`a-Mousson, pp.~81--88.
% \newblock (Online at \url{http://www.dante.de/dante/events/eurotex/papers/TUT07.pdf})
+% ^^A \url{https://www.tug.org/members/TUGboat/tb27-0/thanh.pdf} ^^A is this the same?
%\fi
%
% \bibitem[\pdftex\ manual]{pdftexman}
-% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski,
+% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder,
% \emph{The \pdftex\ user manual},
-% \newblock 16 February 2006.
-% \newblock (Available from <CTAN> at \ctanurl{systems/pdftex/manual/};
+% \newblock 1 January 2007.
+% \newblock (Available from <CTAN> at \ctanurl{systems/pdftex/};
% latest version at \url{http://sarovar.org/projects/pdftex/})
%
% \bibitem[\LaTeXe\ font selection]{fntguide}
@@ -2010,12 +2050,10 @@
% \newblock 10 June 2005.
% \newblock (Available from <CTAN> at \ctanurl{macros/latex/contrib/pdfcprot/})
%
-%\ifbeta
% \bibitem[\texttt{soul}]{soul}
% Melchior Franz, \emph{The |soul| package},
% \newblock 17 November 2003.
% \newblock (Available from <CTAN> at \ctanurl{macros/latex/contrib/soul/})
-%\fi
%\end{thebibliography}
%
%\section{Short History}\label{sec:short-history}
@@ -2026,74 +2064,75 @@
% obtained by running `\texttt{makeindex \mbox{-s gglo.ist}
% \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.
+% The following is a list of all changes relevant in the user land; bug and
+% compatibility fixes are swept under the rug.
%
%\newenvironment{History}
-% {\list{}{\leftmargin 15pt
-% \itemindent-15pt
-% \labelwidth 22pt
-% \labelsep 0pt
-% \parsep 0pt
-% \itemsep 0pt plus 2pt
-% \def\makelabel##1{##1\hss}}}
+% {\list{}
+% {\leftmargin 15pt
+% \itemindent-15pt
+% \labelwidth 22pt
+% \labelsep 0pt
+% \parsep 0pt
+% \def\makelabel##1{##1\hss}}}
% {\endlist}
-%\def\Version #1 (#2){
-% \vskip 1ex plus 1pt
-% \pagebreak[2]
+%\newcommand\Version[2]{
% \VersionDate{#1}{#2}
+% \vskip\topsep
+% \pagebreak[2]
% \item[#1](#2)
-% \nopagebreak[4]
-%}
-%\def\VersionDate#1#2{^^A needed in the Change History
+% \vskip\topsep
+% \nopagebreak}
+%\newcommand\VersionDate[2]{^^A needed in the Change History
% \global\expandafter\def\csname MTversiondate#1\endcsname{#2}}
%
%\begin{History}
-%\VersionDate{2.0}{<N/A>}
-%\betastart
-%\Version 2.0 (\filedate)
-% \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})
-% \item New option `\opt{babel}' to activate automatic adjustment to the
-% \pkg{babel} package
+%\Version{2.0}{\filedate}
+% \item Support for the new extensions of \pdftex\ version 1.40:
+% tracking/letterspacing, adjustment of interword spacing (glue),
+% and additional kerning
+% (new commands \cs{SetTracking}, \cs{SetExtraSpacing}, \cs{SetExtraKerning};
+% new options `\opt{tracking}', `\opt{spacing}', `\opt{kerning}';
+% see sections~\ref{sub:tracking}, \ref{sub:interword-spacing} and~\ref{sub:kerning})
+% \item New commands \cs{textls} and \cs{lsstyle} for letterspacing,
+% new option `\opt{letterspace}'
+% (see sections~\ref{sub:option-tracking} and~\ref{sec:lettersp})
+% \item New option `\opt{babel}' for automatic micro-typographic adjustment to
+% the selected language
% (see sections~\ref{sub:options-misc} and~\ref{sec:context})
-% \item New commands \cs{textls} and \cs{lsstyle} for letterspacing
-% (requires \pdftex\ version 1.40;
-% see section~\ref{sec:lettersp})
-%\betaend
+% \item New font sets: `|smallcaps|', `|footnotesize|', `|scriptsize|'
+% (see section~\ref{sec:font-sets} and table~\ref{tab:predefined-font-sets})
+% \item New package `\pkg{letterspace}' providing the commands for robust and
+% hyphenatable letterspacing
%
-%\VersionDate{1.9f}{\filedate}
+%\VersionDate{1.9f}{2006/09/09}
%
-%\Version 1.9e (2006/07/28)
+%\Version{1.9e}{2006/07/28}
% \item New key `|inputenc|' to specify the lists' input encodings
+% (see section~\ref{sec:fine-tuning})
% \item Protrusion settings for Euler math fonts
%
-%\Version 1.9d (2006/05/05)
+%\Version{1.9d}{2006/05/05}
% \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>, \pkg{marvosym})
% \item Support for Unicode input in the configuration (\pkg{inputenc}/|utf8|)
-%^^A \item Compatibility with the \pkg{tex4ht} package
%
-%\Version 1.9c (2006/02/02)
+%\Version{1.9c}{2006/02/02}
% \item Protrusion settings for <URW> Garamond
%
%\VersionDate{1.9b}{2006/01/20}
-%^^A\Version 1.9b (2006/01/20)
-%^^A \item Compatibility with the \pkg{listings} package
%
-%\Version 1.9a (2005/12/05)
+%\Version{1.9a}{2005/12/05}
% \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
+% (see section~\ref{sec:options-cmd})
% \item Protrusion settings for <T5> encoded Charter
%
-%\Version 1.9 (2005/10/28)
+%\Version{1.9}{2005/10/28}
% \item New command \cs{DisableLigatures} to disable ligatures of fonts
% (requires \pdftex\ version 1.30 or later;
% see section~\ref{sec:disable-ligatures})
@@ -2109,7 +2148,7 @@
% \item Support for the Vietnamese <T5> encoding (protrusion, expansion, inheritance)
% \item `\opt{DVIoutput}' option will work with \TeX Live 2004
%
-%\Version 1.8 (2005/06/23)
+%\Version{1.8}{2005/06/23}
% \item If font substitution has occurred, the settings for the substitute will
% be used instead of those for the selected font
% \item New command \cs{DeclareMicrotypeSetDefault} to declare the default font
@@ -2128,7 +2167,7 @@
% \item When using the \pkg{ledmac} package, character protrusion will work
% for the first time ever (requires \pdftex\ version 1.30 or later)
%
-%\Version 1.7 (2005/03/23)
+%\Version{1.7}{2005/03/23}
% \item Possibility to specify ranges of font sizes in the set declarations
% and protrusion and expansion settings
% (see sections~\ref{sec:font-sets} and~\ref{sec:fine-tuning})
@@ -2139,15 +2178,12 @@
% manually (see section~\ref{sub:config-file})
% \item Hook \cs{Microtype@Hook} for font package authors (see section~\ref{sub:hook})
% \item New option `\opt{verbose}|=errors|' to turn all warnings into errors
-%^^A \item Compatibility with the \pkg{chemsym} and \pkg{statex} packages
% \item Disable expansion inside \cmd\showhyphens
% \item Warning when running in draft mode
%
%\VersionDate{1.6a}{2005/02/02}
-%^^A\Version 1.6a (2005/02/02)
-%^^A \item Compatibility with the \pkg{frenchpro} package
%
-%\Version 1.6 (2005/01/24)
+%\Version{1.6}{2005/01/24}
% \item New option `\opt{factor}' to influence protrusion resp. expansion of
% all characters of a font or font set
% (see sections~\ref{sub:options-protrusion} and~\ref{sec:fine-tuning})
@@ -2157,9 +2193,9 @@
% \item Protrusion settings of digits improved
% \item Use \etex\ extensions, if available
%
-%\Version 1.5 (2004/12/15)
-% \item When output mode is <DVI>, font expansion has to be enabled
-% explicitly, automatic expansion will be disabled
+%\Version{1.5}{2004/12/15}
+% \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
% (see sections~\ref{sub:options-expansion} and \ref{sub:expansion});
@@ -2167,17 +2203,14 @@
% \item New default for expansion option `\opt{step}': 4 (min(\opt{stretch},\opt{shrink})/5)
% (see section~\ref{sub:options-expansion})
% \item Protrusion settings for Bitstream Charter
-%^^A \item Compatibility with Turkish \pkg{babel}
%
-%\Version 1.4b (2004/11/26)
+%\Version{1.4b}{2004/11/26}
% \item \cs{UseMicrotypeSet} requires the set to be declared
% (see section~\ref{sec:font-sets})
%
%\VersionDate{1.4a}{2004/11/17}
-%^^A\Version 1.4a (2004/11/17)
-%^^A \item Bug fix update (font setup inside |tabular|s)
%
-%\Version 1.4 (2004/11/12)
+%\Version{1.4}{2004/11/12}
% \item Set up fonts independently from \LaTeX\ font loading
% (therefore, no risk of overlooking fonts anymore, and the package may
% be loaded at any time)
@@ -2186,10 +2219,8 @@
% \item New option: `\opt{final}'
%
%\VersionDate{1.3}{2004/10/27}
-%^^A\Version 1.3 (2004/10/27)
-%^^A \item Compatibility with the \pkg{german} and \pkg{ngerman} packages
%
-%\Version 1.2 (2004/10/03)
+%\Version{1.2}{2004/10/03}
% \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
@@ -2197,10 +2228,8 @@
% 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})
-% \item More tests for sanity of settings and whether all fonts will be set up
-% \item More robust parsing of sizes in font sets
%
-%\Version 1.1 (2004/09/21)
+%\Version{1.1}{2004/09/21}
% \item Protrusion settings for Adobe Minion, contributed by Harald Harders
% \item New command: \cs{DeclareCharacterInheritance}
% (see section~\ref{sub:inherit})
@@ -2208,7 +2237,7 @@
% (see section~\ref{sec:fine-tuning})
% \item Configuration file names in lowercase (see section~\ref{sub:config-file})
%
-%\Version 1.0 (2004/09/11)
+%\Version{1.0}{2004/09/11}
% \item First <CTAN> release
%\end{History}
%
@@ -2253,7 +2282,6 @@
%
% ^^A =========================================================================
%
-%\makeatletter
% ^^A Heiko Oberdiek's fix from latexbugs (latex/3540):
%\begingroup
% \def\x\begingroup#1\@nil{\endgroup
@@ -2261,7 +2289,7 @@
% \@tfor\@tempa:=\#\$\&\^\_\|\~\ \<\do{\expandafter\@makeother\@tempa}#1}}
%\expandafter\x\DoNotIndex\@nil
%\def\PercentIndex{}\def\LeftBraceIndex{}\def\RightBraceIndex{}
-% ^^A also index newifs:
+% ^^A also index new ifs:
%\def\@newif{newif}\newif\if@newif
%\def\macro@finish{\macro@namepart
% \ifx\macro@namepart\@newif\@tempswatrue\else\@tempswafalse\fi
@@ -2276,7 +2304,6 @@
% \fi
% \if@tempswa\@newiftrue\else\@newiffalse\fi
%}
-%\makeatother
%
%\DoNotIndex{\!,\",\',\(,\),\*,\+,\,,\-,\.,\/,\:,\;,\<,\=,\>,\?,\[,\\,\],\`,
% \#,\$,\&,\^,\_,\|,\~,\ ,
@@ -2294,10 +2321,11 @@
% \@defaultunits,\@empty,\@expandtwoargs,\@firstofone,\@firstoftwo,\@gobble,
% \@gobbletwo,\@ifnextchar,\@ifpackagelater,\@ifpackageloaded,\@ifpackagewith,
% \@ifstar,\@m,\@makeother,\@nameuse,\@ne,\@nil,\@nnil,\@onelevel@sanitize,
-% \@onlypreamble,\@ptionlist,\@removeelement,\@secondoftwo,\@tempa,\@tempb,\@tempc,
-% \@tempcnta,\@tempcntb,\@tempdima,\@undefined,\@unprocessedoptions,\@unusedoptionlist,
-% \g@addto@macro,\m@ne,\on@line,\p@,\set@display@protect,\strip@prefix,\strip@pt,\thr@@,
-% \tw@,\z@,\zap@space,\active,\makeatletter,\newcommand,\nonfrenchspacing,\normalsize,
+% \@onlypreamble,\@ptionlist,\@removeelement,\@secondoftwo,\@spaces,\@tempa,
+% \@tempb,\@tempc,\@tempcnta,\@tempcntb,\@tempdima,\@undefined,\@unprocessedoptions,
+% \@unusedoptionlist,\g@addto@macro,\m@ne,\on@line,\p@,\set@display@protect,
+% \strip@prefix,\strip@pt,\thr@@,\tw@,\z@,\zap@space,
+% \active,\leavevmode,\makeatletter,\newcommand,\nonfrenchspacing,\normalsize,
% \renewcommand,\AtBeginDocument,\AtEndOfPackage,\CheckCommand,\CurrentOption,
% \DeclareRobustCommand,\IfFileExists,\InputIfFileExists,\MessageBreak,
% \PackageError,\PackageInfo,\PackageWarning,\RequirePackage}
@@ -2305,8 +2333,7 @@
%^^A \define@newfont,\do@subst@correction,\f@encoding,\f@size,\font@name,
%^^A \normalfont,\pickup@font,\selectfont,\set@fontsize} ^^A LaTeX
%\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision} ^^A TeXLive
-%\DoNotIndex{\foreign@language,\languagename,\select@language} ^^A babel
-%\DoNotIndex{\NoAutoSpaceBeforeFDP} ^^A babel/french
+%\DoNotIndex{\foreign@language,\languagename,\select@language,\shorthandoff} ^^A babel
%\DoNotIndex{\percentsign} ^^A babel/spanish
%\DoNotIndex{\@disablequotes} ^^A csquotes
%\DoNotIndex{\pdfstringdefDisableCommands} ^^A hyperref
@@ -2319,9 +2346,10 @@
%\DoNotIndex{\conditionally@traceoff} ^^A trace
%\DoNotIndex{\color@begingroup,\color@endgroup,\everypar,\hbadness,\hsize,\maxdimen,
% \parfillskip,\pretolerance,\showboxdepth,\tolerance,\vbox,\z@skip} ^^A \showhyphens
-%\DoNotIndex{\CHAR,\KVo@tempa,\MT@dinfo,\MT@dinfo@nl,\tracingmicrotype,\x,\y,
-% \DeclareMicroTypeSet,\DeclareMicroTypeAlias,\LoadMicroTypeFile,\MicroType@Hook,
-% \UseMicroTypeSet} ^^A microtype
+%\DoNotIndex{\x,\y,\C,\H,\A,\R,\MT@dinfo,\MT@dinfo@nl,\tracingmicrotype,\tracingmicrotypeinpdf,
+% \iftracingmicrotypeinpdfall,\tracingmicrotypeinpdfalltrue,\tracingmicrotypeinpdfallfalse,
+% \MT@pdf@annot,\ifMT@inannot,\MT@inannottrue,\MT@inannotfalse,\MT@addto@annot,\MT@show@pdfannot,
+% \DeclareMicroTypeSet,\DeclareMicroTypeAlias,\LoadMicroTypeFile,\MicroType@Hook,\UseMicroTypeSet} ^^A microtype
%
% ^^A -------------------------------------------------------------------------
%
@@ -2338,11 +2366,13 @@
% \item[|debug|] Code for additional output in the log file.\\
% Used for -- surprise! -- debugging purposes.
% \item[|beta|] Support for features not yet included in an official
-% release of \pdftex.
+% release of \pdftex\ (currently none).
+% \item[|letterspace|] The code for the \pkg{letterspace} package
+% (\file{letterspace.sty}).
% \end{description}
% \item[|config|] Surrounds all configuration modules.
% \begin{description}
-% \item[|cfg-t|] Surrounds latin text configurations.
+% \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}).
@@ -2375,9 +2405,13 @@
% And now for something completely different.
%
% \begin{macrocode}
+%<*package|letterspace>
%<*package>
% \end{macrocode}
-% These are all commands for the outside world. We define them here as dummy
+%
+%\subsection{Preliminaries}
+%
+% These are all commands for the outside world. We define them here as blank
% commands, so that they won't generate an error if we are not running \pdftex.
% \begin{macrocode}
\newcommand*\DeclareMicrotypeSet[3][]{}
@@ -2391,13 +2425,17 @@
\newcommand*\LoadMicrotypeFile[1]{}
\newcommand*\microtypesetup[1]{}
\newcommand*\microtypecontext[1]{}
-%<*beta>
\newcommand*\SetExtraSpacing[3][]{}
\newcommand*\SetExtraKerning[3][]{}
+\newcommand*\SetTracking[3][]{}
\newcommand*\DeclareMicrotypeBabelHook[2]{}
+\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{%
+%</package>
\newcommand*\lsstyle{}
-\newcommand\textls[2][]{#2}
-%</beta>
+\newcommand\textls[2][]{}
+\def\textls#1#{\@firstofone}
+%<*package>
+}
% \end{macrocode}
% This command also has a starred version.
% \begin{macrocode}
@@ -2412,7 +2450,7 @@
\@onlypreamble\UseMicrotypeSet
\@onlypreamble\DeclareMicrotypeSetDefault
\@onlypreamble\DisableLigatures
-%<beta>\@onlypreamble\DeclareMicrotypeBabelHook
+\@onlypreamble\DeclareMicrotypeBabelHook
% \end{macrocode}
%\begin{macro}{\MT@old@cmd}
% The old command names had one more hunch.
@@ -2438,27 +2476,35 @@
\def\MT@MT{microtype}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\MT@error}
-%\begin{macro}{\MT@warning}
-%\begin{macro}{\MT@warning@nl}
-%\begin{macro}{\MT@warn@err}
-%\changes{v1.7}{2005/03/16}{new macro: for \opt{verbose}\texttt{\quotechar=errors}}
%\begin{macro}{\MT@info}
%\begin{macro}{\MT@info@nl}
%\begin{macro}{\MT@vinfo}
%\changes{v1.6}{2005/01/06}{new macro: used instead of \cs{ifMT@verbose}}
+%\begin{macro}{\MT@warning}
+%\begin{macro}{\MT@warning@nl}
+%\begin{macro}{\MT@warn@err}
+%\changes{v1.7}{2005/03/16}{new macro: for \opt{verbose}\texttt{\quotechar=errors}}
+%\begin{macro}{\MT@error}
% Communicate.
% \begin{macrocode}
-\def\MT@error{\PackageError\MT@MT}
+%<*!debug>
+\def\MT@info{\PackageInfo\MT@MT}
+\def\MT@info@nl#1{\MT@info{#1\@gobble}}
+\let\MT@vinfo\@gobble
\def\MT@warning{\PackageWarning\MT@MT}
\def\MT@warning@nl#1{\MT@warning{#1\@gobble}}
+%</!debug>
+%</package>
+%<*letterspace>
+\def\MT@warning{\PackageWarning{letterspace}}
+\def\MT@warning@nl#1{\MT@warning{#1\@gobble}}
+%</letterspace>
+%<*package>
\def\MT@warn@err#1{\MT@error{#1}{%
This error message appears because you loaded the `\MT@MT'\MessageBreak
package with the option `verbose=errors'. Consult the documentation\MessageBreak
- 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
+ in \MT@MT.pdf to find out what went wrong.}}
+\def\MT@error{\PackageError\MT@MT}
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -2467,10 +2513,13 @@
%\end{macro}
%\end{macro}
%\end{macro}
+%
+%\subsubsection{Debugging}
+%
%\begin{macro}{\tracingmicrotype}
%\begin{macro}{\MT@dinfo}
%\begin{macro}{\MT@dinfo@nl}
-% Debug. Cases for \cs{tracingmicrotype}:
+% Cases for \cs{tracingmicrotype}:
%\begin{itemize}
% \item[|0|:] almost none
% \item[|1|:] + sets \& lists
@@ -2480,18 +2529,98 @@
%\end{itemize}
% \begin{macrocode}
%<*debug>
-\let\MT@vinfo\MT@info@nl
\newcount\tracingmicrotype
\tracingmicrotype=\tw@
-\def\MT@dinfo#1#2{\ifnum\tracingmicrotype<#1\relax\else\MT@info{#2}\fi}
-\def\MT@dinfo@nl#1#2{\ifnum\tracingmicrotype<#1\relax\else\MT@info@nl{#2}\fi}
-%</debug>
+\def\MT@info#1{\PackageInfo\MT@MT{#1}\MT@addto@annot{#1}}%
+\def\MT@info@nl#1{\PackageInfo\MT@MT{#1\@gobble}\MT@addto@annot{#1}}%
+\let\MT@vinfo\MT@info@nl
+\def\MT@warning#1{\PackageWarning\MT@MT{#1}\MT@addto@annot{Warning: #1}}%
+\def\MT@warning@nl#1{\PackageWarning\MT@MT{#1\@gobble}\MT@addto@annot{Warning: #1}}%
+\def\MT@dinfo#1#2{\ifnum\tracingmicrotype<#1 \else\MT@info{#2}\fi}
+\def\MT@dinfo@nl#1#2{\ifnum\tracingmicrotype<#1 \else\MT@info@nl{#2}\fi}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
+%\begin{macro}{\tracingmicrotypeinpdf}
+%\changes{v2.0}{2006/09/21}{new debug method: mark all fonts with <PDF> annotations}
+% Another debug method: font switches can be marked in the <PDF> file with a
+% small caret, an accompanying popup text box displaying all debug messages.
%
-%\subsection{Requirements}
+% Cases for \cs{tracingmicrotypeinpdf}:
+%\begin{itemize}
+% \item[|1|:] show new fonts
+% \item[|2|:] + show known fonts
+%\end{itemize}
+% \begin{macrocode}
+\newcount\tracingmicrotypeinpdf
+% \end{macrocode}
+%\end{macro}
+%\ifpdf\ifx\tracingmicrotypeinpdf\undefined
+% [If \file{microtype.sty} had been generated with the |debug| option, this
+% method would be demonstrated here.]
+%\else
+% Let's see how it works~\dots
+%\begin{verbatim}
+%\tracingmicrotypeinpdf=2
+%\end{verbatim}
+% \tracingmicrotypeinpdf2
+% \tracingmicrotype0
+%\fi\fi
+%\begin{macro}{\MT@pdf@annot}
+%\begin{macro}{\MT@addto@annot}
+%\begin{macro}{\ifMT@inannot}
+% During font setup, we save the text for the popup in \cs{MT@pdf@annot}.
+% (This requires \pdftex\ \textgeq\ 1.30.)
+% \begin{macrocode}
+\newif\ifMT@inannot \MT@inannottrue
+\let\MT@pdf@annot\@empty
+\def\MT@addto@annot#1{\ifnum\tracingmicrotypeinpdf>\z@ \ifMT@inannot
+ {\def\MessageBreak{^^J\@spaces}%
+ \MT@xadd\MT@pdf@annot{\pdfescapestring{#1^^J}}}\fi\fi}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\iftracingmicrotypeinpdfall}
+% With \cs{tracingmicrotypeinpdfallfalse}, the <PDF> output is (hopefully)
+% identical, but some font switches are not displayed; otherwise the output
+% is affected, but \emph{all} font switches are visible. In the latter
+% case, we also insert a small kern so that multiple font switches are
+% discernable.
+% \begin{macrocode}
+\newif\iftracingmicrotypeinpdfall
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@show@pdfannot}
+% A red caret is shown for fonts which are actually set up, a green one marks
+% fonts that have already been seen. The |/Caret| annotation requires a viewer
+% for <PDF> version 1.5 (you could use |/Text| if you're using an older <PDF>
+% viewer).
+% \begin{macrocode}
+\def\MT@show@pdfannot#1{%
+ \ifnum\tracingmicrotypeinpdf<#1 \else
+ \iftracingmicrotypeinpdfall\leavevmode\fi
+ \pdfannot height 4pt width 4pt depth 2pt {%
+ /Subtype/Caret
+ /T(\expandafter\string\font@name)
+ \ifcase#1\or /Subj(New font)/C[1 0 0]
+ \else /Subj(Known font)/C[0 1 0]
+ \fi
+ /Contents(\MT@pdf@annot)
+ }%
+ \iftracingmicrotypeinpdfall\kern1pt \fi
+ \global\MT@inannotfalse
+ \fi
+}
+%</debug>
+% \end{macrocode}
+%\end{macro}
+%\ifpdf\ifx\tracingmicrotypeinpdf\undefined\else
+% \tracingmicrotypeinpdf0
+%\fi\fi
+%
+%\subsubsection{Requirements}
%
%\begin{macro}{\MT@pdftex@no}
%\changes{v1.6a}{2005/02/02}{new macro}
@@ -2500,7 +2629,7 @@
% test which \pdftex\ we're using, if any. \cs{MT@pdftex@no} will be used
% throughout the package to respectively do the right thing.
%
-% Currently, there are six cases for \pdftex:
+% Currently, we have to distinguish between six cases for \pdftex:
%\begin{itemize}
% \item[|0|:] not running \pdftex
% \item[|1|:] \pdftex\ (\textless\ 0.14f)
@@ -2511,18 +2640,20 @@
%\changes{v1.8}{2005/04/15}{case 5: \pdftex\ 1.30}
% \item[|5|:] + \cmd{\(left,right)marginkern};
% \cmd\pdfnoligatures;
-% \cmd\pdfstrcmp\ (\textgeq\ 1.30)
-%\changes{v2.0}{2005/08/20}{case 6: \pdftex\ 1.40}
+% \cmd\pdfstrcmp;
+% \cmd\pdfescapestring\ (\textgeq\ 1.30)
+%\changes{v2.0}{2005/08/20}{case 6: \pdftex\ 1.40 (beta:1)}
% \item[|6|:] + adjustment of interword spacing;
% extra kerning;
+% \cmd\letterspacefont;
% \cmd\pdfmatch\footnote{This command was actually introduced
-% in 1.30, however, \pdftex\ ran in a buffer overflow with
-% strings larger than 1024 bytes.}
+% in 1.30, but was still buggy then.}
% (\textgeq\ 1.40)
%\end{itemize}
%\changes{v1.1}{2004/09/13}{fix concerning version check
% (reported by \contributor Harald Harders <h.harders\at tu-bs.de>)}
% \begin{macrocode}
+%</package>
\def\MT@pdftex@no{0}
% \end{macrocode}
%\changes{v1.9}{2005/08/29}{compatibility with \TeX Live hack
@@ -2543,28 +2674,30 @@
\ifx\pdftexversion\@undefined \else
\ifx\pdftexversion\relax \else
%<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}
- \ifnum\pdftexversion < 130
- \def\MT@pdftex@no{4}
- \ifnum\pdftexversion < 120
- \def\MT@pdftex@no{3}
- \ifnum\pdftexversion = 14
- \ifnum \expandafter`\pdftexrevision < `h
- \def\MT@pdftex@no{2}
- \ifnum \expandafter`\pdftexrevision < `f
+ \def\MT@pdftex@no{6}
+ \ifnum\pdftexversion < 140
+ \def\MT@pdftex@no{5}
+%<*package>
+ \ifnum\pdftexversion < 130
+ \def\MT@pdftex@no{4}
+ \ifnum\pdftexversion < 120
+ \def\MT@pdftex@no{3}
+ \ifnum\pdftexversion = 14
+ \ifnum \expandafter`\pdftexrevision < `h
+ \def\MT@pdftex@no{2}
+ \ifnum \expandafter`\pdftexrevision < `f
+ \def\MT@pdftex@no{1}
+ \fi
+ \fi
+ \else
+ \ifnum\pdftexversion < 14
\def\MT@pdftex@no{1}
\fi
\fi
- \else
- \ifnum\pdftexversion < 14
- \def\MT@pdftex@no{1}
- \fi
\fi
\fi
+%</package>
\fi
-%<beta> \fi
\fi
\fi
%<debug>\MT@dinfo@nl{0}{pdftex no.: \number\MT@pdftex@no}
@@ -2573,19 +2706,29 @@
% If we are not using \pdftex\ or in case it is too old, we disable everything
% and exit here.
% \begin{macrocode}
-\ifnum\MT@pdftex@no<\tw@
+%<letterspace>\ifnum\MT@pdftex@no<6
+%<package>\ifnum\MT@pdftex@no<2
\AtEndOfPackage{\let\@unprocessedoptions\relax}
\let\CurrentOption\@empty
\MT@warning@nl{%
\ifcase\MT@pdftex@no
You don't seem to be using pdftex.\MessageBreak
- \or
+ \else
+%<*package>
You are using a pdftex version older than 0.14f.\MessageBreak
`\MT@MT' won't work with such antiquated versions.\MessageBreak
Please install a newer version of pdftex.\MessageBreak
+%</package>
+%<*letterspace>
+ You are using a pdftex version older than 1.40.\MessageBreak
+ Sorry, but robust letterspacing doesn't work with\MessageBreak
+ this version. Please upgrade%
+%</letterspace>
\fi
- All micro-typographic features will be disabled}
+%<package> All micro-typographic features will be disabled%
+ }
\endinput\fi
+%<*package>
% \end{macrocode}
% Still there? Then we can begin:
%\begin{macro}{\MT@catcodes}
@@ -2601,6 +2744,7 @@
\@makeother\-%
\@makeother\=%
\@makeother\*%
+ \@makeother\+%
\@makeother\,%
\@makeother\/%
\@makeother\`%
@@ -2619,21 +2763,21 @@
\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}
% We need a token register.
-%\changes{v1.9}{2005/09/28}{use instead of \cmd{\toks@}}
+%\changes{v1.9}{2005/09/28}{use instead of \cmd\toks@}
% \begin{macrocode}
\newtoks\MT@toks
% \end{macrocode}
@@ -2644,6 +2788,9 @@
\newif\ifMT@if@
% \end{macrocode}
%\end{macro}
+%
+%\subsubsection{Declarations}
+%
%\begin{macro}{\ifMT@protrusion}
%\begin{macro}{\ifMT@expansion}
%\begin{macro}{\ifMT@auto}
@@ -2652,6 +2799,7 @@
%\begin{macro}{\ifMT@draft}
%\begin{macro}{\ifMT@spacing}
%\begin{macro}{\ifMT@kerning}
+%\begin{macro}{\ifMT@tracking}
%\begin{macro}{\ifMT@babel}
% These are the global switches~\dots
% \begin{macrocode}
@@ -2661,11 +2809,10 @@
\newif\ifMT@selected
\newif\ifMT@noligatures
\newif\ifMT@draft
-%<*beta>
\newif\ifMT@spacing
\newif\ifMT@kerning
+\newif\ifMT@tracking
\newif\ifMT@babel
-%</beta>
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -2676,6 +2823,7 @@
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@pr@level}
%\begin{macro}{\MT@pr@factor}
%\begin{macro}{\MT@pr@unit}
@@ -2688,7 +2836,6 @@
%\begin{macro}{\MT@sp@unit}
%\begin{macro}{\MT@kn@factor}
%\begin{macro}{\MT@kn@unit}
-%\begin{macro}{\MT@letterspacing}
% \dots~and numbers.
% \begin{macrocode}
\let\MT@pr@level\tw@
@@ -2699,7 +2846,6 @@
\let\MT@stretch\m@ne
\let\MT@shrink \m@ne
\let\MT@step \m@ne
-%<*beta>
\let\MT@sp@factor\@m
\let\MT@kn@factor\@m
% \end{macrocode}
@@ -2708,8 +2854,6 @@
% \begin{macrocode}
\let\MT@sp@unit\m@ne
\def\MT@kn@unit{1em}
-\let\MT@letterspacing\m@ne
-%</beta>
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -2723,7 +2867,6 @@
%\end{macro}
%\end{macro}
%\end{macro}
-%\end{macro}
%\begin{macro}{\MT@pr@min}
%\begin{macro}{\MT@pr@max}
%\begin{macro}{\MT@ex@min}
@@ -2732,18 +2875,20 @@
%\begin{macro}{\MT@sp@max}
%\begin{macro}{\MT@kn@min}
%\begin{macro}{\MT@kn@max}
+%\begin{macro}{\MT@tr@min}
+%\begin{macro}{\MT@tr@max}
% Minimum and maximum values allowed by \pdftex.
% \begin{macrocode}
\def\MT@pr@min{-\@m}
\let\MT@pr@max\@m
\let\MT@ex@min\z@
\let\MT@ex@max\@m
-%<*beta>
\def\MT@sp@min{-\@m}
\let\MT@sp@max\@m
\def\MT@kn@min{-\@m}
\let\MT@kn@max\@m
-%</beta>
+\def\MT@tr@min{-\@m}
+\let\MT@tr@max\@m
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -2753,6 +2898,8 @@
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@factor@default}
% Default factor.
% \begin{macrocode}
@@ -2771,12 +2918,17 @@
%\end{macro}
%\end{macro}
%\end{macro}
-%\begin{macro}{\MT@letterspacing@default}
+%\begin{macro}{\MT@letterspace}
+%\begin{macro}{\MT@letterspace@default}
% Default value for letterspacing (in thousandths of 1em).
% \begin{macrocode}
-%<beta>\def\MT@letterspacing@default{100 }
+%</package>
+\let\MT@letterspace\m@ne
+\def\MT@letterspace@default{100}
+%<*package>
% \end{macrocode}
%\end{macro}
+%\end{macro}
%\begin{macro}{\ifMT@document}
% Our private test whether we're still in the preamble.
% \begin{macrocode}
@@ -2784,7 +2936,7 @@
% \end{macrocode}
%\end{macro}
%
-%\subsection{Auxiliary macros}
+%\subsubsection{Auxiliary Macros}
%
%\begin{macro}{\MT@requires@etex}
% For definitions that depend on \etex\ features.
@@ -2807,7 +2959,7 @@
% For definitions that depend on a particular \pdftex\ version.
% \begin{macrocode}
\def\MT@requires@pdftex#1{%
- \ifnum\MT@pdftex@no<#1\relax
+ \ifnum\MT@pdftex@no<#1
\expandafter\@secondoftwo
\else
\expandafter\@firstoftwo
@@ -2819,14 +2971,16 @@
%\changes{v1.9f}{2006/08/09}{new macro}
% The forgotten primitive.
% \begin{macrocode}
+%</package>
\def\MT@glet{\global\let}
+%<*package>
% \end{macrocode}
%\end{macro}
-%\changes{v1.4b}{2004/11/21}{optimization: use less \cmd\csname s and \cmd\expandafter s}
+%\changes{v1.4b}{2004/11/21}{optimisation: use less \cmd\expandafter s and \cmd\csname s}
%\begin{macro}{\MT@def@n}
%\begin{macro}{\MT@gdef@n}
%\changes{v1.9f}{2006/08/09}{new macros: global variants}
-% This is \cmd{\@namedef} and global.
+% This is \cmd\@namedef\ and global.
% \begin{macrocode}
\def\MT@def@n#1{\expandafter\def\csname #1\endcsname}
\def\MT@gdef@n#1{\expandafter\gdef\csname #1\endcsname}
@@ -2837,7 +2991,9 @@
%\begin{macro}{\MT@xdef@n}
% Its expanding versions.
% \begin{macrocode}
+%</package>
\def\MT@edef@n#1{\expandafter\edef\csname #1\endcsname}
+%<*package>
\def\MT@xdef@n#1{\expandafter\xdef\csname #1\endcsname}
% \end{macrocode}
%\end{macro}
@@ -2869,6 +3025,7 @@
%\begin{macro}{\MT@exp@one@n}
% Expand the second token once and enclose it in braces.
% \begin{macrocode}
+%</package>
\def\MT@exp@one@n#1#2{\expandafter#1\expandafter{#2}}
% \end{macrocode}
%\end{macro}
@@ -2876,6 +3033,7 @@
% Expand the next two tokens after \meta{\#1} once.
% \begin{macrocode}
\def\MT@exp@two@c#1{\expandafter\expandafter\expandafter#1\expandafter}
+%<*package>
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@exp@two@n}
@@ -2888,7 +3046,7 @@
{\expandafter#2\expandafter}\expandafter{#3}}
% \end{macrocode}
%\end{macro}
-% You do not wonder why \cmd{\MT@exp@one@c} doesn't exist, do you?
+% You do not wonder why |\MT@exp@one@c| doesn't exist, do you?
%\changes{v1.6}{2005/01/19}{use \etex's \cs{ifcsname} and \cs{ifdefined} if defined}
%\begin{macro}{\MT@ifdefined@c@T}
%\changes{v1.9a}{2005/11/08}{new macros: true case only}
@@ -2903,9 +3061,11 @@
\def\MT@ifdefined@c@T#1{\ifdefined#1%
\expandafter\@firstofone\else\expandafter\@gobble\fi
}
+%</package>
\def\MT@ifdefined@c@TF#1{\ifdefined#1%
\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
}
+%<*package>
\def\MT@ifdefined@n@T#1{\ifcsname#1\endcsname
\expandafter\@firstofone\else\expandafter\@gobble\fi
}
@@ -2959,6 +3119,7 @@
% (reported by \contributor Tom Kink <kink\at hia.rwth-aachen.de>)}
% ^^A in <MID:2qrkp9F134l6lU1@uni-berlin.de>
% \begin{macrocode}
+%</package>
\begingroup
\catcode`\%=12
\catcode`\&=14
@@ -2975,16 +3136,18 @@
%\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.
+% or the latest and greatest from \pdftex\ (which also allows negative numbers,
+% as required by the \opt{letterspace} option).
% \begin{macrocode}
-\MT@requires@pdftex6{
+%<package>\MT@requires@pdftex6{
\def\MT@ifint#1{%
- \ifcase\pdfmatch{^[0-9]+ *$}{#1}\relax
+ \ifcase\pdfmatch{^-*[0-9]+ *$}{#1}\relax
\expandafter\@secondoftwo
\else
\expandafter\@firstoftwo
\fi
}
+%<*package>
}{
\def\MT@ifint#1{%
\if!\ifnum9<1#1!\else?\fi
@@ -3091,7 +3254,7 @@
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@map@clist@n}
-%\changes{v1.8}{2005/04/17}{new macro: used instead of \cmd{\@for}}
+%\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@}
@@ -3100,6 +3263,7 @@
% Run \meta{\#2} on all elements of the comma list \meta{\#1}. This and the
% following is modelled after \LaTeX3 commands.
% \begin{macrocode}
+%</package>
\def\MT@map@clist@n#1#2{%
\ifx\@empty#1\else
\def\MT@clist@function##1{#2}%
@@ -3116,6 +3280,7 @@
}
\let\MT@clist@function\@gobble
\def\MT@clist@break#1\@nnil{}
+%<*package>
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -3123,7 +3288,7 @@
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@map@tlist@n}
-%\changes{v1.8}{2005/04/16}{new macro: used instead of \cmd{\@tfor}}
+%\changes{v1.8}{2005/04/16}{new macro: used instead of \cmd\@tfor}
%\begin{macro}{\MT@map@tlist@c}
%\begin{macro}{\MT@map@tlist@}
%\begin{macro}{\MT@tlist@break}
@@ -3170,10 +3335,10 @@
%\end{macro}
%\begin{macro}{\MT@rem@from@clist}
% Remove item \meta{\#1} from comma list \meta{\#2}. This is basically
-% \cmd{\@removeelement} from \file{ltcntrl.dtx}.
+% \cmd\@removeelement\ from \file{ltcntrl.dtx}.
%\changes{v1.9}{2005/10/28}{new macro: remove an item from a comma list}
%\changes{v1.9a}{2005/11/03}{fix}
-%\changes{v1.9e}{2006/07/26}{model after \cmd{\@removeelement}}
+%\changes{v1.9e}{2006/07/26}{model after \cmd\@removeelement}
% Using \cmd\pdfmatch\ and \cmd\pdflastmatch\ here would be really slow!
% \begin{macrocode}
\def\MT@rem@from@clist#1#2{%
@@ -3322,7 +3487,7 @@
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@make@string}
-%\changes{v1.8}{2005/05/07}{use \cmd{\@onelevel@sanitize}}
+%\changes{v1.8}{2005/05/07}{use \cmd\@onelevel@sanitize}
% Set the category code of all characters to 12.
% \begin{macrocode}
\let\MT@make@string\@onelevel@sanitize
@@ -3336,6 +3501,14 @@
%\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}
+%\begin{macro}{\MT@abbr@tr}
+%\begin{macro}{\MT@abbr@tr@c}
% Some abbreviations. Thus, we can have short command names but full-length
% log output.
% \begin{macrocode}
@@ -3346,6 +3519,14 @@
\def\MT@abbr@pr@inh{protrusion inheritance}
\def\MT@abbr@ex@inh{expansion inheritance}
\def\MT@abbr@nl{noligatures}
+\def\MT@abbr@sp{spacing}
+\def\MT@abbr@sp@c{interword spacing codes}
+\def\MT@abbr@sp@inh{interword spacing inheritance}
+\def\MT@abbr@kn{kerning}
+\def\MT@abbr@kn@c{kerning codes}
+\def\MT@abbr@kn@inh{kerning inheritance}
+\def\MT@abbr@tr{tracking}
+\def\MT@abbr@tr@c{tracking amount}
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -3354,23 +3535,8 @@
%\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}
-\def\MT@abbr@sp@inh{interword spacing inheritance}
-\def\MT@abbr@kn{kerning}
-\def\MT@abbr@kn@c{kerning codes}
-\def\MT@abbr@kn@inh{kerning inheritance}
-%</beta>
-% \end{macrocode}
+%\end{macro}
+%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
@@ -3381,30 +3547,27 @@
%\begin{macro}{\MT@rbba@expansion}
%\begin{macro}{\MT@rbba@spacing}
%\begin{macro}{\MT@rbba@kerning}
+%\begin{macro}{\MT@rbba@tracking}
% These we also need the other way round.
% \begin{macrocode}
\def\MT@rbba@protrusion{pr}
\def\MT@rbba@expansion{ex}
-%<*beta>
\def\MT@rbba@spacing{sp}
\def\MT@rbba@kerning{kn}
-%</beta>
+\def\MT@rbba@tracking{tr}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\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%
-}
+\def\MT@features{pr,ex,sp,kn,tr}
+\def\MT@features@long{protrusion,expansion,spacing,kerning,tracking}
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -3413,7 +3576,7 @@
% 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},
+% 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{%
@@ -3429,23 +3592,25 @@
% \end{macrocode}
%\end{macro}
%
-% \subsection{Compatibility}\label{sub:compatibility}
+%\subsubsection{Compatibility}\label{sub:compatibility}
%
-% For the record, the following \LaTeX\ commands will be modified by \microtype:
+% For the record, the following \LaTeX\ kernel commands will be modified by
+% \microtype:
%\begin{itemize}
-% \item \cmd{\pickup@font}
-% \item \cmd{\do@subst@correction}
-% \item \cmd{\add@accent}
+% \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}
-%\changes{v1.9e}{2006/07/06}{compatibility with the \pkg{combine} class}
+%\changes{v1.9e}{2006/07/06}{empty \cs{MT@setup@} after use (compatibility with the \pkg{combine} class)}
% 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}
+%</package>
\let\MT@setup@\@empty
% \end{macrocode}
%\end{macro}
@@ -3456,16 +3621,20 @@
% \end{macrocode}
%\end{macro}
% It will be executed at the end of the preamble, and emptied (the \pkg{combine}
-% class will call it repeatedly).
+% class calls it repeatedly).
% \begin{macrocode}
\AtBeginDocument{\MT@setup@ \MT@glet\MT@setup@\@empty}
% \end{macrocode}
%\begin{macro}{\MT@with@package}
+%\begin{macro}{\MT@with@babel@and}
% We almost never do anything if a package is not loaded.
% \begin{macrocode}
\def\MT@with@package#1{\@ifpackageloaded{#1}\@firstofone\@gobble}
+%<*package>
+\def\MT@with@babel@and#1{\@ifpackagewith{babel}{#1}\@firstofone\@gobble}
% \end{macrocode}
%\end{macro}
+%\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!
@@ -3481,6 +3650,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@with@package{pdfcprot}\MT@pdfcprot@error
% \end{macrocode}
%\end{macro}
+% Don't load \pkg{letterspace}.
+% \begin{macrocode}
+\MT@let@nc{ver@letterspace.sty}\@empty
+% \end{macrocode}
%\begin{macro}{\MT@ledmac@setup}
%\begin{macro}{\MT@led@unhbox@line}
%\begin{macro}{\MT@led@kern}
@@ -3501,7 +3674,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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
+% 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}
@@ -3582,18 +3755,15 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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
+ \MT@with@babel@and{spanish}{\MT@ifdefined@c@T\percentsign{\let\%\percentsign}}%
% \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
+% 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
- }%
+ \@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).
@@ -3604,24 +3774,25 @@ time will almost certainly lead to undesired results. Have your choice!}%
% ^^A private mail, 26/2/2006
% \begin{macrocode}
\@ifpackageloaded{hyperref}\MT@restore@p@h{%
- \MT@with@package{tex4ht}\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}
+%</package>
\MT@addto@setup{%
+%<*package>
\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}{%
+ \MT@with@babel@and{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
@@ -3631,8 +3802,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
numbers, try upgrading the `csquotes' package}%
}%
}%
+%</package>
\@ifpackageloaded{hyperref}{%
- \g@addto@macro\MT@setupfont@hook\MT@restore@p@h
+%<package> \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.
@@ -3641,30 +3813,39 @@ time will almost certainly lead to undesired results. Have your choice!}%
% ^^A private mail, 10/09/05
% \begin{macrocode}
\pdfstringdefDisableCommands{%
- \let\pickup@font\MT@orig@pickupfont
-%<*beta>
- \let\lsstyle\@empty
- \def\textls#1#{\@firstofone}%
-%</beta>
+%<package> \let\pickup@font\MT@orig@pickupfont
+ \def\lsstyle{\pdfstringdefWarn\lsstyle}%
+ \def\textls#1#{\pdfstringdefWarn\textls}%
}%
}{%
+%<*package>
\MT@with@package{tex4ht}{%
\g@addto@macro\MT@setupfont@hook\MT@restore@p@h
}%
+%</package>
}%
+%<*package>
% \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.
+%\changes{v1.9b}{2005/12/19}{compatibility with \pkg{listings}: sanitise more catcodes
+% (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{%
+ \g@addto@macro\MT@normal@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}
+% \dots~and the backslash (which would lead to problems in \cs{MT@get@slot}).
+%\changes{v2.0}{2006/09/15}{compatibility with \pkg{listings}: set catcode of backslash to zero
+% (reported by \contributor Steven Bath <steven128\at iname.com>)}
+% ^^A private mail, 15/09/2006
+% \begin{macrocode}
+ \g@addto@macro\MT@setupfont@hook{%
+ \catcode`\\\z@
+% \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
@@ -3672,23 +3853,23 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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}
+%\changes{v2.0}{2005/12/21}{compatibility with \pkg{soul}: register \cs{textls} and \cs{lsstyle} (beta:3)}
% 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>
+%
+%</package>
\MT@with@package{soul}{%
\soulregister\lsstyle 0%
\soulregister\textls 1%
}%
-%</beta>
}
+%<*package>
% \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).
@@ -3696,25 +3877,22 @@ time will almost certainly lead to undesired results. Have your choice!}%
\expandafter\ifx\the\font\nullfont\normalfont\fi
% \end{macrocode}
%
-%\subsection{Setting up a font}
+%\subsection{Font Setup}
%
%\begin{macro}{\MT@setupfont}
-% Setting up a font entails checking whether protrusion/expansion is desired for
-% the current font (\cs{MT@font}), and if so, adjusting \cmd\lpcode\ and
-% \cmd\rpcode\ (protrusion) and \cmd\efcode\ (expansion) for each character.
+% Setting up a font entails checking for each feature whether it should be
+% applied to the current font (\cs{MT@font}).
% \begin{macrocode}
\def\MT@setupfont{%
- \ifx\MT@vinfo\MT@info@nl
- \MT@info{Setting up font `\MT@@font'}\fi
% \end{macrocode}
% We might have to disable stuff when used together with adventurous packages.
% \begin{macrocode}
\MT@setupfont@hook
% \end{macrocode}
% The font properties must be extracted from \cs{MT@font}, since the current
-% value of \cmd{\f@encoding} and friends may be wrong!
+% value of \cmd\f@encoding\ and friends may be wrong!
% \begin{macrocode}
- \MT@exp@two@c\MT@split@name\string\MT@font\@nil
+ \MT@exp@two@c\MT@split@name\string\MT@font/\@nil
% \end{macrocode}
% Try to find a configuration file for the current font family.
%\changes{v1.2}{2004/09/29}{also search for alias font file}
@@ -3723,8 +3901,8 @@ 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}{fix: call \cmd{\@@enc@update} if necessary}
-% We have to make sure that \cmd{\cf@encoding} expands to the correct value (for
+%\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).
@@ -3732,43 +3910,61 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\ifx\f@encoding\cf@encoding\else\@@enc@update\fi
% \end{macrocode}
+% Tracking has to come first, since it means actually loading a different font.
+% \begin{macrocode}
+ \MT@tracking
+ \MT@check@font
+ \ifMT@inlist@
+%<debug>\MT@show@pdfannot2%
+ \else
+ \MT@vinfo{Setting up font `\MT@@font'\on@line}%
+% \end{macrocode}
% Now we can begin setting up the font for all features. The following commands
% are \cmd\let\ to \cmd\relax\ if the respective feature is generally
% disabled.
%
% Protrusion has to be set up first, says Th\`anh!
% \begin{macrocode}
- \MT@protrusion
- \MT@expansion
+ \MT@protrusion
+ \MT@expansion
% \end{macrocode}
% Interword spacing and kerning.
% \begin{macrocode}
-%<*beta>
- \MT@spacing
- \MT@kerning
-%</beta>
+ \MT@spacing
+ \MT@kerning
% \end{macrocode}
% Disable ligatures?
% \begin{macrocode}
- \MT@noligatures
+ \MT@noligatures
+% \end{macrocode}
+% Debugging.
+% \begin{macrocode}
+%<debug>\MT@show@pdfannot1%
+% \end{macrocode}
+% Finally, register the font so that we don't set it up anew each time.
+% \begin{macrocode}
+ \MT@register@font
+ \fi
+ \MT@glet\MT@font\@empty
}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@split@name}
%\changes{v1.7}{2005/02/27}{don't define \cs{MT@encoding} \&c. \cmd\global ly}
+%\changes{v2.0}{2006/12/19}{adjust to possible letterspacing}
%\begin{macro}{\MT@encoding}
%\begin{macro}{\MT@family}
%\begin{macro}{\MT@series}
%\begin{macro}{\MT@shape}
%\begin{macro}{\MT@size}
-% Split up the font name.
+% Split up the font name (\meta{\#6} may be the tracking amount).
% \begin{macrocode}
-\def\MT@split@name#1/#2/#3/#4/#5\@nil{%
+\def\MT@split@name#1/#2/#3/#4/#5/#6\@nil{%
\def\MT@encoding{#1}%
- \def\MT@family{#2}%
- \def\MT@series{#3}%
- \def\MT@shape{#4}%
- \def\MT@size{#5}%
+ \def\MT@family {#2}%
+ \def\MT@series {#3}%
+ \def\MT@shape {#4}%
+ \def\MT@size {#5}%
% \end{macrocode}
%\begin{macro}{\MT@familyalias}
% Alias family?
@@ -3857,7 +4053,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
% \end{macrocode}
% If no limitations have been specified, \ie, the list for a font attribute
-% has not been defined at all, the font should be expanded resp. protruded.
+% has not been defined at all, the font should be set up.
% \begin{macrocode}
%<debug> {\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#2}: #1 list empty}}%
}
@@ -3975,7 +4171,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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@font@dimen@six
\MT@get@opt
\MT@reset@pr@codes
% \end{macrocode}
@@ -4025,13 +4221,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@gobble@settings}
%\begin{macro}{\MT@dimen@six}
-%\begin{macro}{\MT@get@dimen@six}
+%\begin{macro}{\MT@get@font@dimen@six}
%\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}
-\def\MT@get@dimen@six{%
+\def\MT@get@font@dimen@six{%
\ifnum\fontdimen6\MT@font=\z@
\MT@warning@nl{%
Font `\MT@@font' does not specify its\MessageBreak
@@ -4118,8 +4314,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% larger than the character width (since \cs{[lr]pcode}'s limit is 1000). Now,
% the maximum protrusion is 1em of the font.
%
-% The unit is in \cs{MT@count}, the desired factor in \cmd{\@tempb}, and the
-% result will be returned in \cmd{\@tempcntb}.
+% The unit is in \cs{MT@count}, the desired factor in \cmd\@tempb, and the
+% result will be returned in \cmd\@tempcntb.
% \begin{macrocode}
\MT@requires@pdftex3{
\def\MT@scale@to@em{%
@@ -4167,7 +4363,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
}
% \end{macrocode}
-% We need this in \cs{MT@warn@code@too@large} (neutralized).
+% We need this in \cs{MT@warn@code@too@large} (neutralised).
% \begin{macrocode}
\def\MT@get@charwd{\MT@count=\MT@dimen@six}
}
@@ -4178,8 +4374,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\def\MT@get@font@dimen#1{%
\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
+ \MT@warning@nl{Font `\MT@@font' 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
@@ -4213,13 +4409,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@scale@factor}
%\changes{v1.5}{2004/12/10}{warning for factors outside limits}
-%\changes{v1.9}{2005/09/28}{generalized}
+%\changes{v1.9}{2005/09/28}{generalised}
% Furthermore, we might have to multiply with a factor.
% \begin{macrocode}
\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
+ \expandafter\MT@scale\expandafter \@tempcntb
+ \csname MT@\MT@feat @factor@\endcsname \@m
\fi
\ifnum\@tempcntb>\csname MT@\MT@feat @max\endcsname\relax
\expandafter\MT@warn@code@too@large\csname MT@\MT@feat @max\endcsname
@@ -4241,8 +4437,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
\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
+ \expandafter\MT@scale\expandafter\@tempcnta\expandafter
+ \@m \csname MT@\MT@feat @factor@\endcsname
\fi
\MT@scale\@tempcnta \MT@dimen@six \MT@count
\MT@warning@nl{The \@nameuse{MT@abbr@\MT@feat} code \@tempb\space
@@ -4255,7 +4451,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@get@opt}
% The optional argument to the configuration commands (except for
-% \cs{SetExpansion} which is being dealt with in \cs{MT@get@ex@opt}).
+% \cs{SetExpansion}, which is being dealt with in \cs{MT@get@ex@opt}).
% \begin{macrocode}
\def\MT@get@opt{%
\MT@set@listname
@@ -4281,7 +4477,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@sp@unit@}
%\begin{macro}{\MT@kn@unit@}
% The |unit| can only be evaluated here, since it might be font-specific.
-% If it's \cmd{\@empty}, it's relative to character widths, if it's -1, relative
+% If it's \cmd\@empty, it's relative to character widths, if it's -1, relative
% to space dimensions.
% \begin{macrocode}
\MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{%
@@ -4328,7 +4524,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\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}
+%\changes{v1.9d}{2006/02/18}{optimise: don't reset when \texttt{preset} option is set}
% \begin{macrocode}
\MT@ifdefined@n@T{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @preset}{%
\csname MT@preset@\MT@feat\endcsname
@@ -4380,14 +4576,26 @@ time will almost certainly lead to undesired results. Have your choice!}%
% The configurations may be under the regime of an input encoding.
%\changes{v1.9f}{2006/08/03}{fix: input encoding must be set after the inheritance
% list has been parsed}
+% \begin{macrocode}
+\def\MT@set@inputenc#1{%
+% \end{macrocode}
%\begin{macro}{\MT@cat}
% We remember the current category (|c| or |inh|), in case of warnings later.
% \begin{macrocode}
-\def\MT@set@inputenc#1{%
\def\MT@cat{#1}%
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
\MT@ifdefined@n@T{%
MT@\MT@feat @#1@\csname MT@\MT@feat @#1@name\endcsname @inputenc}{%
\MT@ifdefined@c@TF\inputencoding{%
+% \end{macrocode}
+% Set up normal catcodes, since, \eg, \pkg{listings} would otherwise want to
+% typeset the \pkg{inputenc} file when it is loaded inside a listing.
+%\changes{v2.0}{2006/09/15}{sanitise catcodes before loading input encoding
+% (problem with \pkg{listings})}
+% \begin{macrocode}
+ \MT@normal@catcodes
%<debug>\MT@dinfo@nl{1}{input encoding: \@nameuse{%
%<debug>MT@\MT@feat @#1@\csname MT@\MT@feat @#1@name\endcsname @inputenc}}%
\inputencoding{\@nameuse{%
@@ -4401,7 +4609,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
-%\end{macro}
%\begin{macro}{\MT@set@pr@heirs}
% Set the inheriting characters.
% \begin{macrocode}
@@ -4691,20 +4898,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%
-% \begin{macrocode}
-%<*beta>
-% \end{macrocode}
-%
-%\subsubsection{Interword Space (Glue)}
+%\subsubsection{Interword Spacing (Glue)}
%
%\begin{macro}{\MT@spacing}
-% Adjustment of interword spacing? Only for sufficiently new versions of \pdftex.
+% Adjustment of interword spacing?
% \begin{macrocode}
\MT@requires@pdftex6{
- \def\MT@spacing{\MT@maybe@do{sp}}
-}{
- \let\MT@spacing\relax
-}
+\def\MT@spacing{\MT@maybe@do{sp}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@sp@codes}
@@ -4712,7 +4912,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\def\MT@set@sp@codes{%
\MT@if@list@exists{%
- \MT@get@dimen@six
+ \MT@get@font@dimen@six
\MT@get@opt
\MT@reset@sp@codes
\MT@get@inh@list
@@ -4848,6 +5048,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\end{macro}
+% Only for sufficiently new versions of \pdftex.
+% \begin{macrocode}
+}{
+ \let\MT@spacing\relax
+}
+% \end{macrocode}
%
%\subsubsection{Additional Kerning}
%
@@ -4855,10 +5061,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Again, only check for additional kerning for new versions of \pdftex.
% \begin{macrocode}
\MT@requires@pdftex6{
- \def\MT@kerning{\MT@maybe@do{kn}}
-}{
- \let\MT@kerning\relax
-}
+\def\MT@kerning{\MT@maybe@do{kn}}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@set@kn@codes}
@@ -4866,7 +5069,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\def\MT@set@kn@codes{%
\MT@if@list@exists{%
- \MT@get@dimen@six
+ \MT@get@font@dimen@six
\MT@get@opt
\MT@reset@kn@codes
\MT@get@inh@list
@@ -4976,14 +5179,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\else
\let\MT@preset@aux\MT@preset@aux@space
\fi
-% \end{macrocode}
-% Letterspacing factor.
-% \begin{macrocode}
- \MT@ifstreq\MT@kn@context{letterspacing}{%
- \@tempcnta\MT@kn@factor@\relax
- \MT@scale\@tempcnta \MT@letterspacing@ \@m
- \edef\MT@kn@factor@{\number\@tempcnta}%
- }\relax
\MT@preset@aux{#1}\@tempa
\MT@preset@aux{#2}\@tempb
\MT@set@all@kn\@tempa\@tempb
@@ -4991,45 +5186,124 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\end{macro}
+% \begin{macrocode}
+}{
+ \let\MT@kerning\relax
+}
+%</package>
+% \end{macrocode}
%
-%\subsubsection{\lsstyle Letterspacing}
+%\subsubsection{\lsstyle Tracking}
%
%\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.
+% This only works with \pdftex\ 1.40.
+%\changes{v2.0}{2005/09/21}{new command: letterspacing (beta:1)}
+%\changes{v2.0}{2006/09/19}{fix: font switches don't pose a problem anymore (beta:8)}
+%\changes{v2.0}{2006/09/21}{fix: letterspacing commands may be nested (beta:8)}
+%\changes{v2.0}{2006/12/28}{totally redone, using the new \cmd\letterspacefont}
+% \begin{macrocode}
+%<package>\MT@requires@pdftex6{
+\DeclareRobustCommand\lsstyle{%
+%<*package>
+ \MT@trackingtrue
+ \def\MT@tr@setname{all}%
+%</package>
+ \let\MT@tracking\MT@tracking@
+ \selectfont
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@tracking}
+%\begin{macro}{\MT@tracking@}
+% We do not check whether we've already seen the font!
% \begin{macrocode}
-\MT@requires@pdftex6{
- \DeclareRobustCommand\lsstyle{%
- \ifMT@kerning
+\def\MT@tracking@{%
+%<package> \ifMT@tracking\MT@maybe@do{tr}\fi
+%<letterspace> \MT@set@tr@codes
+}
+%<package>\let\MT@tracking\MT@tracking@
+%<letterspace>\let\MT@tracking\relax
% \end{macrocode}
-% 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}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\MT@set@tr@codes}
+% The tracking amount is determined by the optional argument to \cs{textls},
+% settings from \cs{SetTracking}, or the global \opt{letterspace} option,
+% in this order.
% \begin{macrocode}
- \begingroup
- \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
- {\expandafter\string\csname\curr@fontshape/\f@size\endcsname,}%
+\def\MT@set@tr@codes{%
+ \MT@ifdefined@c@TF\MT@letterspace@\relax{%
+ \let\MT@letterspace@\MT@letterspace
+%<*package>
+ \MT@if@list@exists{%
+ \MT@set@listname
+ \MT@let@cn\MT@letterspace@{MT@tr@c@\MT@tr@c@name}%
+% \end{macrocode}
+% Different unit?
+% \begin{macrocode}
+ \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @unit}{%
+ \MT@let@cn\MT@tr@unit@{MT@tr@c@\MT@tr@c@name @unit}%
+ \ifdim\MT@tr@unit@=1em\else
+ \MT@get@font@dimen@six
+ \MT@let@cn\@tempb{MT@tr@c@\MT@tr@c@name}%
+ \MT@get@unit\MT@tr@unit@
+ \let\MT@tr@factor@\@m
+ \MT@scale@to@em
+ \edef\MT@letterspace@{\number\@tempcntb}%
\fi
- \endgroup
+ }%
+ }\relax
+%</package>
+ }%
+ \ifnum\MT@letterspace@=\z@\else
+% \end{macrocode}
+%\begin{macro}{\MT@lsfont}
+% The letterspaced font instances are saved in macros
+% |\|\meta{font name}|/|\meta{letterspacing amount}|ls|.
+% \begin{macrocode}
+ \xdef\MT@lsfont{%
+%<package> \expandafter\csname\expandafter\string\MT@font
+%<letterspace> \csname\curr@fontshape\f@size
+ /\number\MT@letterspace@ ls\endcsname}%
+ \expandafter\ifx\MT@lsfont\relax
+% \end{macrocode}
+%\end{macro}
+% In case of nested letterspacing with different amounts, we have to extract
+% the base font again.
+% \begin{macrocode}
+ \expandafter\MT@exp@two@c\expandafter\MT@is@letterspaced\expandafter
+ \meaning\expandafter\font@name\MT@lsstring+/\@nil
+%<debug>\MT@dinfo@nl{1}{... new letterspacing instance}%
+ \global\expandafter\letterspacefont\MT@lsfont\font@name \MT@letterspace@
+% \end{macrocode}
+% Scale interword spacing (\fontdim2).
+% \begin{macrocode}
+ \fontdimen2\MT@lsfont=\dimexpr\numexpr1000+\MT@letterspace@\relax
+ \fontdimen2\MT@lsfont/1000\relax
\fi
- \MT@kerningtrue
- \pdfappendkern\@ne
- \pdfprependkern\@ne
- \def\MT@kn@setname{all}%
- \MT@ifdefined@c@TF\MT@letterspacing@\relax{%
- \let\MT@letterspacing@\MT@letterspacing
- }%
- \microtypecontext{kerning=letterspacing}%
- }
+%<*package>
+ \MT@vinfo{Tracking font `\MT@@font' by \number\MT@letterspace@
+ \space\on@line}%
+ \let\MT@font\MT@lsfont
+ \aftergroup
+%</package>
+ \MT@set@lsfont
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@set@lsfont}
+% Redefine \cmd\font@name, which will be called a second later (in
+% \cmd\selectfont).
+% \begin{macrocode}
+\def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont}
+%<*package>
+% \end{macrocode}
+%\end{macro}
+% For older \pdftex\ versions, let it relax.
+% \begin{macrocode}
}{
+ \let\MT@tracking\relax
\DeclareRobustCommand\lsstyle{%
\MT@warning{Letterspacing only works with pdftex version 1.40\MessageBreak
or newer. You might want to use the `soul' package\MessageBreak
@@ -5037,24 +5311,78 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@glet\lsstyle\relax
}
}
+%</package>
+% \end{macrocode}
+%\begin{macro}{\MT@lsstring}
+%\begin{macro}{\MT@is@letterspaced}
+% \pdftex\ cannot letterspace fonts that are already letterspaced. Therefore,
+% we have to extract the base font, if we find by inspecting the meaning of
+% \cmd\font@name\ that it contains a `|+|' or a `|-|'.
+% \begin{macrocode}
+\begingroup
+ \@makeother{L}%
+ \@makeother{S}%
+ \lowercase{%
+ \def\x{%
+ \def\MT@lsstring{+LS}%
+ \def\MT@is@letterspaced##1 ##2 ##3+##4LS##5+##6/\@nil{%
+ \MT@ifempty{##4}{\MT@is@letterspaced@##3-LS-\@nil}{%
+%<debug>\MT@dinfo@nl{1}{... fixing base font}%
+ \global\expandafter\font\font@name ##3##5\relax
+ }%
+ }%
+ \def\MT@is@letterspaced@##1-##2LS##3-##4\@nil{%
+ \MT@ifempty{##2}\relax{%
+%<debug>\MT@dinfo@nl{1}{... fixing base font}%
+ \global\expandafter\font\font@name ##1##3\relax
+ }%
+ }%
+ }%
+ }
+\expandafter\endgroup\x
% \end{macrocode}
%\end{macro}
+%\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 (beta:1)}
+%\changes{v2.0}{2006/12/28}{starred version: remove spaces around text}
+%\begin{macro}{\MT@ls@adjust@}
+% This command may be used like the other text commands.
% \begin{macrocode}
-\DeclareRobustCommand\textls[2][]{%
- \MT@ifempty{#1}%
- {\let\MT@letterspacing@\@undefined}%
- {\KV@@sp@def\MT@letterspacing@{#1 }}%
- {\lsstyle #2}%
+\DeclareRobustCommand\textls{%
+ \@ifstar{\let\MT@ls@adjust@\MT@ls@adjust\MT@textls}%
+ {\let\MT@ls@adjust@\relax \MT@textls}%
}
-%</beta>
% \end{macrocode}
%\end{macro}
%\end{macro}
+%\begin{macro}{\MT@textls}
+%\begin{macro}{\MT@letterspace@}
+% The optional argument may be used to change the letterspacing factor.
+% \begin{macrocode}
+\newcommand\MT@textls[2][]{%
+ {\MT@ifempty{#1}%
+ {\let\MT@letterspace@\@undefined}%
+ {\KV@@sp@def\MT@letterspace@{#1}}%
+ \MT@ls@adjust@
+ \lsstyle #2%
+ \MT@ls@adjust@}%
+}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\MT@ls@adjust}
+% Remove extra space for the starred version.
+% \begin{macrocode}
+\def\MT@ls@adjust{%
+ \@tempdima=\MT@ifdefined@c@TF\MT@letterspace@
+ \MT@letterspace@ \MT@letterspace em
+ \divide\@tempdima 2000
+ \kern-\@tempdima\relax
+}
+%<*package>
+% \end{macrocode}
+%\end{macro}
%
%\subsubsection{Disabling Ligatures}
%
@@ -5063,17 +5391,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\MT@requires@pdftex5{
\def\MT@noligatures{%
- \ifMT@noligatures
- \MT@dotrue
- \MT@map@clist@n{font,encoding,family,series,shape,size}{%
- \MT@ifdefined@n@TF{MT@checklist@##1}%
- {\csname MT@checklist@##1\endcsname}%
- {\MT@checklist@{##1}}%
- {nl}%
- }%
- \else
- \MT@dofalse
- \fi
+ \MT@dotrue
+ \MT@map@clist@n{font,encoding,family,series,shape,size}{%
+ \MT@ifdefined@n@TF{MT@checklist@##1}%
+ {\csname MT@checklist@##1\endcsname}%
+ {\MT@checklist@{##1}}%
+ {nl}%
+ }%
\ifMT@do
\pdfnoligatures\MT@font
\MT@vinfo{... Disabling ligatures}%
@@ -5134,7 +5458,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Check for existence of the file only once.
% \begin{macrocode}
\MT@in@clist{#1}\MT@file@list
- \ifMT@inlist@\else
+ \ifMT@inlist@ \else
% \end{macrocode}
% Don't forget that because reading the files takes place inside a group, all
% commands that may be used there have to be defined globally.
@@ -5165,10 +5489,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\MT@begin@catcodes}
+%\begin{macro}{\MT@normal@catcodes}
% We have to make sure that all characters have the correct category code.
% 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}
+% 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}{fix: reset some more catcodes when reading files
% (reported by \contributor Michael Hoppe <mh\at michael-hoppe.de>)}
@@ -5187,15 +5511,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% section~\ref{sub:compatibility}.)
%
% We leave |^| at catcode 7, so that stuff like `|^^ff|' remains possible.
-%
-% This will be used before reading the files as well as in the configuration
-% commands \cs{Set...}, and \cs{DeclareCharacterInheritance}, so that the
-% catcodes are also harmless when these commands are used outside the
-% configuration files.
-%\changes{v1.7}{2005/02/17}{also use inside configuration commands}
% \begin{macrocode}
-\def\MT@begin@catcodes{%
- \begingroup
+\def\MT@normal@catcodes{%
\makeatletter
\catcode`\^7%
\catcode`\ 9%
@@ -5209,6 +5526,19 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@map@tlist@n
{\!\"\$\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\[\]\_\`\|\~}%
\@makeother
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@begin@catcodes}
+% This will be used before reading the files as well as in the configuration
+% commands \cs{Set...}, and \cs{DeclareCharacterInheritance}, so that the
+% catcodes are also harmless when these commands are used outside the
+% configuration files.
+%\changes{v1.7}{2005/02/17}{also use inside configuration commands}
+% \begin{macrocode}
+\def\MT@begin@catcodes{%
+ \begingroup
+ \MT@normal@catcodes
% \end{macrocode}
% Inside the configuration files, we don't have to bother about spaces.
% \begin{macrocode}
@@ -5253,7 +5583,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% the current font.
%\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}
+%\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}
@@ -5381,7 +5711,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\@firstoftwo
}{%
% \end{macrocode}
-% Since the name cannot be \cmd{\@empty}, this is a sound proof that no matching
+% Since the name cannot be \cmd\@empty, this is a sound proof that no matching
% list exists.
% \begin{macrocode}
\MT@let@nc{MT@\MT@feat @c@name}\@empty
@@ -5389,12 +5719,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Don't warn if \opt{selected}|=false|.
% \begin{macrocode}
\ifMT@nonselected
- \MT@vinfo{... Applying non-selected expansion}%
+ \MT@vinfo{... Applying non-selected expansion (no list)}%
\else
- \MT@warning{I cannot find a \@nameuse{MT@abbr@\MT@feat} list
- for font\MessageBreak`\MT@@font'%
- \ifx\MT@context\@empty\else\space(context: `\MT@context')\fi.
- Switching off\MessageBreak\@nameuse{MT@abbr@\MT@feat} for this font}%
+% \end{macrocode}
+% Tracking doesn't require a list, either.
+% \begin{macrocode}
+ \MT@ifstreq\MT@feat{tr}\relax{%
+ \MT@warning{I cannot find a \@nameuse{MT@abbr@\MT@feat} list
+ for font\MessageBreak`\MT@@font'%
+ \ifx\MT@context\@empty\else\space(context: `\MT@context')\fi.
+ Switching off\MessageBreak\@nameuse{MT@abbr@\MT@feat} for this font}%
+ }%
\fi
\@secondoftwo
}%
@@ -5418,8 +5753,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%</debug>
\MT@let@cn\@tempc{MT@\MT@feat @inh@\MT@listname}%
% \end{macrocode}
-% If the list is \cmd{\@empty}, it has already been parsed.
-%\changes{v1.2}{2004/09/26}{fix: set inheritance list \cmd\global ly to \cmd{\@empty}}
+% If the list is \cmd\@empty, it has already been parsed.
+%\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 ...}%
@@ -5454,13 +5789,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \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@}
% 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
% does not have to solve a sphinx's riddle if anything goes wrong.
%
+%\begin{macro}{\MT@char}
+%\begin{macro}{\MT@char@}
% The character is in \cs{@tempa}, we want its slot number in \cs{MT@char}.
% \begin{macrocode}
\def\MT@get@slot{%
@@ -5566,7 +5901,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\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
@@ -5615,10 +5950,11 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\changes{v1.8}{2005/03/30}{new macro: translate \pkg{inputenc}-defined characters}
% 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, \expandafter|\"A| into |\"A|,
+%\changes{v1.9}{2005/09/08}{redone: use \cmd\set@display@protect}
+% 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.
%
+%\iffalse
% Previous solution, slightly more robust (but doesn't understand Unicode):
%\begin{verbatim}
%\def\MT@is@active#1#2\@nil{%
@@ -5651,6 +5987,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \fi
%}
%\end{verbatim}
+%\fi
%
% Unfortunately, the (older) \pkg{inputenc} definitions prefer the
% protected/generic variants (\eg, \cmd\copyright\ instead of
@@ -5661,8 +5998,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
%
% 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}/\hskip0pt\texttt{utf8})}
+%\changes{v1.9d}{2006/03/06}{support for Unicode (\pkg{inputenc}/\allowbreak\texttt{utf8})}
%
+%\iffalse ^^A obsolete because of `inputenc' key
% 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
@@ -5670,6 +6008,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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.
+%\fi
% \begin{macrocode}
\def\MT@is@active#1#2\@nil{%
\ifnum\catcode`#1 = \active
@@ -5707,9 +6046,11 @@ time will almost certainly lead to undesired results. Have your choice!}%
% |\|\meta{encoding}|\|\meta{command} and see whether its meaning is
% \cmd\char|"|\meta{hex number}, which is the case for everything that has
% been defined with \cs{DeclareTextSymbol} in the encoding definition files.
+%\changes{v2.0}{2006/09/15}{made even more robust}
% \begin{macrocode}
\def\MT@is@symbol{%
- \edef\MT@char{\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}%
+ \expandafter\def\expandafter\MT@char\expandafter
+ {\csname\MT@encoding\MT@detokenize@c\@tempa\endcsname}%
\expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter
\meaning\expandafter\MT@char\MT@charstring\relax\relax\relax
\ifnum\MT@char@ < \z@
@@ -5729,7 +6070,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\begingroup
\catcode`\/=0
- /MT@map@tlist@n{/\/C/H/A/R}/@makeother
+% \end{macrocode}
+%\SpecialEscapechar{\/}
+% \begin{macrocode}
+ /MT@map@tlist@n{/\CHAR}/@makeother
/lowercase{%
/def/x{%
/def/MT@charstring{\CHAR"}%
@@ -5760,18 +6104,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
\ifx\\#2\\\else
% \end{macrocode}
% Again, we construct a control sequence, this time of the form:
-% |\\|\meta{encoding}\hskip0pt|\|\meta{accent}|-|\meta{character}, \eg,
+% |\\|\meta{encoding}\allowbreak|\|\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, 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
- \MT@detokenize@n{#1}-%
- \MT@detokenize@n{#2}%
- \endcsname}%
+ \edef\MT@char{\expandafter\csname\expandafter
+ \string\csname\MT@encoding\endcsname
+ \MT@detokenize@n{#1}-%
+ \MT@detokenize@n{#2}%
+ \endcsname}%
\expandafter\MT@is@letter\MT@char\relax\relax
\fi
}
@@ -5813,9 +6156,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\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.
+% For `other' characters \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@)
@@ -5873,7 +6216,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%
%\subsubsection{Hook into \LaTeX's font selection}
%
-% We append \cs{MT@setupfont} to \cmd{\pickup@font}, which is called by \LaTeX\
+% We append \cs{MT@setupfont} to \cmd\pickup@font, which is called by \LaTeX\
% every time a font is selected. We then check whether we've already seen this
% font, and if not, set it up for micro-typography.
% This ensures that we will catch all fonts, and that we will not set up fonts
@@ -5886,24 +6229,24 @@ time will almost certainly lead to undesired results. Have your choice!}%
%
% For my reference:
%\begin{itemize}
-% \item \cmd{\pickup@font} is called by \cmd\selectfont, \cmd{\wrong@fontshape},
-% or \\ \cmd{\getanddefine@fonts} (for math).
-% \item \cmd{\pickup@font} calls \cmd{\define@newfont}.
-% \item \cmd{\define@newfont} may call (inside a group!)
+% \item \cmd\pickup@font\ is called by \cmd\selectfont, \cmd\wrong@fontshape,
+% or \\ \cmd\getanddefine@fonts\ (for math).
+% \item \cmd\pickup@font\ calls \cmd\define@newfont.
+% \item \cmd\define@newfont\ may call (inside a group!)
% \begin{itemize}
-% \item \cmd{\wrong@fontshape}, which in turn will call \cmd{\pickup@font},
-% and thus \\ \cmd{\define@newfont} again, or
-% \item \cmd{\extract@font}.
+% \item \cmd\wrong@fontshape, which in turn will call \cmd\pickup@font,
+% and thus \\ \cmd\define@newfont\ again, or
+% \item \cmd\extract@font.
% \end{itemize}
-% \item \cmd{\get@external@font} is called by \cmd{\extract@font}, by itself,
+% \item \cmd\get@external@font\ is called by \cmd\extract@font, by itself,
% and by the substitution macros
%\end{itemize}
%
%\changes{v1.2}{2004/10/02}{check for packages that might load fonts}
%\changes{v1.4}{2004/11/04}{no need to check for packages that might load fonts anymore}
-%\changes{v1.4}{2004/11/04}{use \cmd{\pickup@font} instead of \cmd{\define@newfont}
+%\changes{v1.4}{2004/11/04}{use \cmd\pickup@font\ instead of \cmd\define@newfont\
% as the hook for \cs{MT@setupfont}}
-% Up to version 1.3 of this package, we were using \cmd{\define@newfont} as the
+% Up to version 1.3 of this package, we were using \cmd\define@newfont\ as the
% hook, which is only called for \emph{new} fonts, and therefore seemed the natural
% choice.
% However, this meant that we had to take special care to catch all fonts: we
@@ -5915,7 +6258,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% loads all fonts in the class file itself (to fine tune inter-word spacing).
% Then I learned that even my favourite class, \pkg{memoir}, loads fonts. To cut
% this short: it seemed to get out of hand, and I decided that it would be
-% better to use \cmd{\pickup@font} and decide for ourselves whether we've
+% better to use \cmd\pickup@font\ and decide for ourselves whether we've
% already seen that font. I hope the 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}
@@ -5927,34 +6270,40 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@font}
-% Additionally, we hook into \cmd{\do@subst@correction}, which is called if
+% 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
+%</package>
\MT@addto@setup{%
+%<*package>
\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.
+% Check whether \cmd\pickup@font\ is defined as expected.
% The warning issued by \cmd{\CheckCommand*} would be a bit too generic.
% \begin{macrocode}
+%</package>
\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
+ Command \string\pickup@font\space is not defined as expected.%
+%<*package>
+ \MessageBreak Double-check whether micro-typography is indeed\MessageBreak
applied to the document.\MessageBreak (Hint: Turn on `verbose' mode)%
+%</package>
}
\fi
% \end{macrocode}
%\end{macro}
% Then we append our stuff. Everything is done inside a group.
+%<*package>
% \begin{macrocode}
\g@addto@macro\pickup@font{\begingroup}
% \end{macrocode}
@@ -5963,12 +6312,20 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\changes{v1.9e}{2006/05/25}{no tracing with \pkg{trace} package}
% \begin{macrocode}
\MT@with@package{trace}{\g@addto@macro\pickup@font{\conditionally@traceoff}}
+%</package>
\g@addto@macro\pickup@font{%
+%<letterspace> \MT@tracking
+%<*package>
+%<*debug>
+ \global\MT@inannottrue
+ \MT@glet\MT@pdf@annot\@empty
+ \MT@addto@annot{(line \number\inputlineno)}%
+%</debug>
\escapechar\m@ne
% \end{macrocode}
% If \cs{MT@font} is empty, no substitution has taken place, hence
-% \cmd{\font@name} is correct. Otherwise, if they are different,
-% \cmd{\font@name} does not describe the font actually used. This test will
+% \cmd\font@name\ is correct. Otherwise, if they are different,
+% \cmd\font@name\ does not describe the font actually used. This test will
% catch first order substitutions, like |bx| to |b|, but it will still fail if
% the substituting font is itself substituted.
% \begin{macrocode}
@@ -5976,23 +6333,15 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\MT@font\font@name
\else
\ifx\MT@font\font@name \else
+%<debug> \MT@addto@annot{= substituted with \MT@@font}%
\MT@register@subst@font
\fi
\fi
-% \end{macrocode}
-% Then, check whether we've already seen the font.
-% \begin{macrocode}
- \MT@check@font
-% \end{macrocode}
-% If not, set it up and register it.
-% \begin{macrocode}
- \ifMT@inlist@ \else
- \MT@setupfont
- \MT@register@font
- \fi
- \MT@glet\MT@font\@empty
+ \MT@setupfont
\endgroup
+%</package>
}
+%<*package>
% \end{macrocode}
%\begin{macro}{\MT@pickupfont}
% Remember the patched command for later.
@@ -6001,15 +6350,15 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \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}
+%\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
+% 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
+% 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}
@@ -6019,14 +6368,16 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@orig@add@accent{#1}{#2}%
\let\pickup@font\MT@pickupfont
}
+%</package>
}
+%<*package>
% \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{
% I still don't know whether \microtype\ works together with \pkg{CJK}.}
-%\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}
+%\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.
@@ -6060,15 +6411,15 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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}
+%\changes{v1.9a}{2005/11/14}{optimise 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{%
\MT@if@true
\MT@map@clist@c\MT@active@features{%
- \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter\MT@font
- \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
+ \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter
+ \MT@font \csname MT@##1@\csname MT@##1@context\endcsname font@list\endcsname
\ifMT@inlist@
\MT@let@nc{MT@\@nameuse{MT@abbr@##1}}\relax
\else
@@ -6117,8 +6468,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\def\MT@rem@from@lists#1{%
\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
+ \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter
+ \MT@font \csname MT@\@tempa @#1font@list\endcsname
}%
}
% \end{macrocode}
@@ -6153,7 +6504,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\def\MT@reset@context@{%
\MT@vinfo{<<< Resetting contexts\on@line
%<debug> \MessageBreak= \MT@pr@context/\MT@ex@context
-%<debug&beta> /\MT@kn@context/\MT@sp@context
+%<debug> /\MT@tr@context/\MT@kn@context/\MT@sp@context
}%
\selectfont
}
@@ -6161,8 +6512,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\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}.
+% The first time \cs{microtypecontext} is called, we initialise the context
+% lists and redefine the commands used in \cmd\pickup@font.
% \begin{macrocode}
\def\MT@setup@contexts{%
\MT@map@clist@c\MT@active@features
@@ -6201,8 +6552,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \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
+ \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{1}{||| added #1 context: \@nameuse{MT@\@tempb @doc@contexts}}%
@@ -6219,14 +6570,16 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\begin{macro}{\MT@pr@context}
%\begin{macro}{\MT@ex@context}
+%\begin{macro}{\MT@tr@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@tr@doc@contexts}
%\begin{macro}{\MT@sp@doc@contexts}
%\begin{macro}{\MT@kn@doc@contexts}
%\begin{macro}{\MT@extra@context}
-% Initialize the contexts.
+% Initialise the contexts.
% \begin{macrocode}
\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{%
\MT@def@n{MT@#1@context}{@}%
@@ -6243,6 +6596,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
+%\end{macro}
%
%\subsection{Configuration}
%
@@ -6313,12 +6668,14 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Define the current set name and parse the keys.
%\changes{v1.1}{2004/09/20}{remove spaces around set name}
%\changes{v1.8}{2005/05/15}{warning when redefining a set}
+%\changes{v2.0}{2006/10/16}{fix: empty size list when redefining set}
%\todo{share one set between features}
% \begin{macrocode}
\def\MT@declare@sets#1#2#3{%
\KV@@sp@def\MT@curr@set@name{#2}%
\MT@ifdefined@n@T{MT@#1@set@@\MT@curr@set@name}{%
- \MT@warning{Redefining set `\MT@curr@set@name'}%
+ \MT@warning{Redefining \@nameuse{MT@abbr@#1} set `\MT@curr@set@name'}%
+ \global\MT@let@nc{MT@#1list@size@\MT@curr@set@name}\@empty
}%
\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'}%
@@ -6363,11 +6720,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \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
+ \expandafter\g@addto@macro\expandafter\MT@font@sets
+ \csname MT@#2list@#1@\MT@curr@set@name\endcsname
%<debug>\MT@dinfo@nl{1}{-- #1: \@nameuse{MT@#2list@#1@\MT@curr@set@name}}%
}%
}
@@ -6405,15 +6759,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\MT@fix@font@spec}
-% Fully expand the font specification and fix catcodes.
+%\begin{macro}{\MT@font@sets}
+%\begin{macro}{\MT@fix@font@set}
+% Fully expand the font specification and fix catcodes for all font sets.
% \begin{macrocode}
-\def\MT@fix@font@spec#1{%
- \xdef#1{#1}%
- \global\MT@make@string#1%
+\let\MT@font@sets\@empty
+\def\MT@fix@font@set#1{%
+ \xdef#1{#1}%
+ \global\MT@make@string#1%
}
% \end{macrocode}
%\end{macro}
+%\end{macro}
%\begin{macro}{\MT@define@set@key@size}
% |size| requires special treatment.
% \begin{macrocode}
@@ -6445,8 +6802,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@get@range}
%\begin{macro}{\MT@upper}
%\begin{macro}{\MT@lower}
-% Ranges will be stored as triples of
-% |{|\meta{lower bound}|}{|\meta{upper bound}|}{|\meta{list name}|}|.
+% Ranges will be stored as triplets of |{|\meta{lower bound}|}|\allowbreak
+% |{|\meta{upper bound}|}|\allowbreak|{|\meta{list name}|}|.
% For simple sizes, the upper boundary is -1.
% \begin{macrocode}
\def\MT@get@range#1-#2-#3\@nil{%
@@ -6497,7 +6854,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\begin{macro}{\MT@get@size}
-% Translate a size selection command and normalize it.
+% Translate a size selection command and normalise it.
% \begin{macrocode}
\def\MT@get@size{%
% \end{macrocode}
@@ -6511,10 +6868,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
\ifx\@tempa\relax \else
% \end{macrocode}
-% The \pkg{relsize} solution of parsing \cmd{\@setfontsize} does not work with the
+% The \pkg{relsize} solution of parsing \cmd\@setfontsize\ does not work with the
% <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
+%\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\
% (\eg, the \pkg{a0poster} class).
% \begin{macrocode}
@@ -6525,7 +6882,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
% \end{macrocode}
% 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).
+% `|pt|' (\cmd\@defaultunits\ and \cmd\strip@pt\ are kernel macros).
%\changes{v1.2}{2004/09/27}{additional magic to catch some errors}
% \begin{macrocode}
\MT@ifdimen\MT@val{%
@@ -6552,11 +6909,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
{\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
+ \expandafter\g@addto@macro\expandafter\MT@font@sets
+ \csname MT@#1list@font@\MT@curr@set@name\endcsname
%<debug>\MT@dinfo@nl{1}{-- font: \@nameuse{MT@#1list@font@\MT@curr@set@name}}%
}%
}
@@ -6643,6 +6997,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@pr@setname}
%\begin{macro}{\MT@ex@setname}
+%\begin{macro}{\MT@tr@setname}
+%\begin{macro}{\MT@sp@setname}
+%\begin{macro}{\MT@kn@setname}
%\begin{macro}{\MT@use@set}
% Only use sets that have been declared.
%\changes{v1.1}{2004/09/20}{remove spaces around set name}
@@ -6668,6 +7025,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
%\begin{macro}{\DisableLigatures}
%\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
@@ -6683,7 +7043,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
}{
% \end{macrocode}
-% If \pdftex\ is too old, we issue a warning and neutralize the command.
+% If \pdftex\ is too old, we issue a warning and neutralise the command.
% \begin{macrocode}
\renewcommand*\DisableLigatures[1]{%
\MT@warning{Disabling ligatures of a font is only possible\MessageBreak
@@ -6719,8 +7079,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@default@pr@set}
%\begin{macro}{\MT@default@ex@set}
-%\begin{macro}{\MT@default@kn@set}
+%\begin{macro}{\MT@default@tr@set}
%\begin{macro}{\MT@default@sp@set}
+%\begin{macro}{\MT@default@kn@set}
%\begin{macro}{\MT@set@default@set}
% \begin{macrocode}
\def\MT@set@default@set#1#2{%
@@ -6741,6 +7102,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
%\begin{macro}{\DeclareMicrotypeAlias}
% This can be used to set an alias name for a font, so that the file (and the
% settings) for the aliased font will be loaded.
@@ -6804,29 +7166,26 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Declare the context that should be loaded when a \pkg{babel} language
% 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}}
+%\changes{v2.0}{2005/10/04}{new command: interaction with \pkg{babel} (beta:1)}
% \begin{macrocode}
-%<*beta>
\def\DeclareMicrotypeBabelHook#1#2{%
\MT@map@clist@n{#1}{%
\KV@@sp@def\@tempa{##1}%
\MT@gdef@n{MT@babel@\@tempa}{#2}%
}%
}
-%</beta>
% \end{macrocode}
%\end{macro}
%
%
%\subsubsection{Fine Tuning}
%
-% The macros \cs{SetExpansion} and \cs{SetProtrusion} provide a similar
-% interface for setting the character protrusion resp. expansion factors for a
-% set of fonts.
+% The commands \cs{SetExpansion} and \cs{SetProtrusion} provide an interface for
+% setting the character protrusion resp. expansion factors for a 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}
+%\changes{v1.9d}{2006/02/23}{(et al.) optimise: unify keys for mandatory argument}
%\changes{v1.9e}{2006/07/26}{new key: \texttt{inputenc}}
%\changes{v1.9f}{2006/08/10}{(et al.) set catcodes before parsing optional argument}
% This macro accepts three arguments: [options,] set of font attributes and
@@ -6897,7 +7256,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\MT@extra@context\@empty
\MT@set@named@keys{MT@ex@c}{#1}%
\MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @factor}{%
- \ifnum\csname MT@ex@c@\MT@ex@c@name @factor\endcsname>\@m
+ \ifnum\csname MT@ex@c@\MT@ex@c@name @factor\endcsname > \@m
\MT@warning@nl{Expansion factor \number\@nameuse{MT@ex@c@\MT@ex@c@name @factor}
too large in list\MessageBreak `\MT@ex@c@name'. Setting it to the
maximum of 1000}%
@@ -6916,11 +7275,31 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\end{macro}
+%\begin{macro}{\SetTracking}
+%\changes{v2.0}{2006/12/28}{new command: tracking}
% \begin{macrocode}
-%<*beta>
+\def\SetTracking{%
+ \MT@begin@catcodes
+ \MT@SetTracking
+}
% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\MT@SetTracking}
+% \begin{macrocode}
+\newcommand*\MT@SetTracking[3][]{%
+ \let\MT@extra@context\@empty
+ \MT@set@named@keys{MT@tr@c}{#1}%
+%<debug>\MT@dinfo{1}{creating tracking list `\MT@tr@c@name'}%
+ \def\MT@permutelist{tr@c}%
+ \setkeys{MT@cfg}{#2}%
+ \MT@permute
+ \MT@gdef@n{MT@tr@c@\MT@tr@c@name}{#3}%
+ \MT@end@catcodes
+}
+% \end{macrocode}
+%\end{macro}
%\begin{macro}{\SetExtraSpacing}
-%\changes{v2.0}{2005/09/28}{new command: adjustment of interword spacing}
+%\changes{v2.0}{2005/09/28}{new command: adjustment of interword spacing (beta:1)}
% \begin{macrocode}
\def\SetExtraSpacing{%
\MT@begin@catcodes
@@ -6950,7 +7329,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\todo{command to inhibit kerning etc.}
%\begin{macro}{\SetExtraKerning}
-%\changes{v2.0}{2005/09/28}{new command: additional kerning}
+%\changes{v2.0}{2005/09/28}{new command: additional kerning (beta:1)}
% \begin{macrocode}
\def\SetExtraKerning{%
\MT@begin@catcodes
@@ -6978,9 +7357,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\end{macro}
%\end{macro}
-% \begin{macrocode}
-%</beta>
-% \end{macrocode}
%\begin{macro}{\MT@set@named@keys}
%\changes{v1.9f}{2006/08/10}{new macro: set name first, simplify parsing of
% optional argument}
@@ -7053,7 +7429,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@xdef@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
+ \MT@dinfo@nl{1}{initialising: use list for font \@tempb=\MT@val
\ifx\MT@extra@context\@empty\else\MessageBreak
(context: \MT@extra@context)\fi}%
%</debug>
@@ -7117,7 +7493,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}{%
\MT@edef@n{MT@#1@c@name}{##1}%
\MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{%
- \MT@warning{Redefining list `\@nameuse{MT@#1@c@name}'}%
+ \MT@warning{Redefining \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'}%
}%
}%
\MT@let@cn\MT@curr@set@name{MT@#1@c@name}%
@@ -7148,16 +7524,12 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\changes{v1.8}{2005/04/14}{\cs{SetProtrusion}: new key: \texttt{unit}}
%\changes{v1.9}{2005/09/28}{\cs{SetProtrusion}: value `\texttt{relative}' renamed
% to `\texttt{character}' for key \texttt{unit}}
+%\changes{v2.0}{2006/09/30}{option `\opt{unit}', \cs{SetProtrusion}:
+% deprecate value `\texttt{relative}' completely}
% \begin{macrocode}
\define@key{MT@pr@c}{unit}[character]{%
\global\MT@let@nc{MT@pr@c@\MT@curr@set@name @unit}\@empty
\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{%
% \end{macrocode}
% Test whether it's a dimension, but do not translate it into its final
@@ -7173,10 +7545,24 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}
% \end{macrocode}
+% Tracking may only be relative to a dimension.
+% \begin{macrocode}
+\define@key{MT@tr@c}{unit}[1em]{%
+ \global\MT@let@nc{MT@tr@c@\MT@curr@set@name @unit}\@empty
+ \def\@tempa{#1}%
+ \MT@ifdimen\@tempa{%
+ \global\MT@let@nc{MT@tr@c@\MT@curr@set@name @unit}\@tempa
+ }{%
+ \MT@warning{`\@tempa' is not a dimension.\MessageBreak
+ Ignoring it and setting values relative to\MessageBreak
+ 1em}%
+ \MT@gdef@n{MT@tr@c@\MT@curr@set@name @unit}{1em}%
+ }%
+}
+% \end{macrocode}
%\begin{macro}{\MT@define@key@unit}
% Spacing and kerning codes may additionally be relative to space dimensions.
% \begin{macrocode}
-%<*beta>
\def\MT@define@key@unit#1{%
\define@key{MT@#1@c}{unit}[space]{%
\global\MT@let@nc{MT@#1@c@\MT@curr@set@name @unit}\@empty
@@ -7200,7 +7586,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\MT@define@key@unit{sp}
\MT@define@key@unit{kn}
-%</beta>
% \end{macrocode}
%\begin{macro}{\MT@define@ex@opt@key}
% The first argument to \cs{SetExpansion} accepts some more options.
@@ -7361,7 +7746,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% |\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
-% list is encountered (in \cs{MT@set@\meta{feature}@codes}).
+% list is encountered (in |\MT@set@|\meta{feature}|@codes|).
% \begin{macrocode}
\def\MT@inh@do#1,{%
\ifx\relax#1\@empty \else
@@ -7373,7 +7758,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
%\begin{macro}{\MT@inh@split}
% Only gather the inheriting characters here. Their codes will actually be set
-% in \cs{MT@set@\meta{feature}@codes}),
+% in |\MT@set@|\meta{feature}|@codes|.
% \begin{macrocode}
\def\MT@inh@split#1=#2=#3\relax{%
\def\@tempa{#1}%
@@ -7412,12 +7797,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@permute@@@@}
% Calling \cs{MT@permute} will define commands for all permutations
% 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
-% the currently defined list. Size ranges are held in a separate macro called
-% |\MT@|\meta{list type}|@/|\meta{font axes}|@sizes|, which in turn contains
-% the respective \meta{list name}s attached to the ranges.
+% |\MT@|\meta{list type}|@/|\allowbreak\meta{encoding}|/|\allowbreak
+% \meta{family}|/|\allowbreak\meta{series}|/|\allowbreak
+% \meta{shape}|/|\allowbreak\meta{|\textbar*|}
+% to be the expansion of |\MT@|\meta{list type}|@name|, \ie, the name of the
+% currently defined list. Size ranges are held in a separate macro called
+% |\MT@|\meta{list type}|@/|\allowbreak\meta{font axes}|@sizes|, which in turn
+% contains the respective \meta{list name}s attached to the ranges.
% \begin{macrocode}
\def\MT@permute{%
\let\MT@cnt@encoding\@ne
@@ -7425,7 +7811,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
% Undefine commands for the next round.
% \begin{macrocode}
- \MT@permute@reset
+ \MT@map@tlist@n{{encoding}{family}{series}{shape}}\MT@permute@reset
+ \MT@glet\MT@tempsize\@undefined
}
\def\MT@permute@{%
\let\MT@cnt@family\@ne
@@ -7517,13 +7904,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
\csname MT@\MT@permutelist @\@tempa\MT@extra@context @sizes\endcsname
\MT@tempsize
%<*debug>
- \MT@dinfo@nl{1}{initializing: use list for font \@tempa,\MessageBreak
+ \MT@dinfo@nl{1}{initialising: 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.
+% Only one list can apply to a given combination.
% \begin{macrocode}
\MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context}{%
\MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list
@@ -7532,7 +7919,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
for font `\@tempa'}%
}%
%<*debug>
- \MT@dinfo@nl{1}{initializing: use list for font \@tempa
+ \MT@dinfo@nl{1}{initialising: use list for font \@tempa
\ifx\MT@extra@context\@empty\else\MessageBreak
(context: \MT@extra@context)\fi}%
%</debug>
@@ -7558,18 +7945,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@permute@reset}
% Reset the commands.
% \begin{macrocode}
-\def\MT@permute@reset{%
- \MT@permute@reset@{encoding}%
- \MT@permute@reset@{family}%
- \MT@permute@reset@{series}%
- \MT@permute@reset@{shape}%
- \MT@glet\MT@tempsize\@undefined
-}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\MT@permute@reset@}
-% \begin{macrocode}
-\def\MT@permute@reset@#1{%
+\def\MT@permute@reset#1{%
\@tempcnta=\@ne
\MT@loop
\MT@let@nc{MT@temp#1\the\@tempcnta}\@undefined
@@ -7609,7 +7985,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
%\begin{macro}{\MT@check@range@}
-% \cmd{\@tempb} and \cmd{\@tempc} are lower resp. upper bound of the new range,
+% \cmd\@tempb\ and \cmd\@tempc\ are lower resp. upper bound of the new range,
% \meta{\#2} and \meta{\#3} those of the existing range.
% \begin{macrocode}
\def\MT@check@range@#1#2#3{%
@@ -7734,16 +8110,15 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
% \opt{activate} is a shortcut for \opt{protrusion} and \opt{expansion}.
%\changes{v1.9e}{2006/07/18}{fix: default value for \opt{activate}: \texttt{true}}
-%\todo{add \opt{spacing} to \opt{activate}, when the feature has stabilized in \pdftex?}
+%\todo{add \opt{spacing} to \opt{activate}, when the feature has stabilised in \pdftex?}
% \begin{macrocode}
\define@key{MT}{activate}[true]{%
\setkeys{MT}{protrusion={#1}}%
\setkeys{MT}{expansion={#1}}%
}
-%<*beta>
% \end{macrocode}
%\begin{macro}{\MT@define@option@}
-% \opt{spacing} and \opt{kerning} do not have a compatibility level.
+% \opt{spacing}, \opt{kerning} and \opt{tracking} do not have a compatibility level.
% \begin{macrocode}
\def\MT@define@option@#1{%
\define@key{MT}{#1}[true]{%
@@ -7778,13 +8153,13 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \begin{macrocode}
\MT@define@option@{spacing}
\MT@define@option@{kerning}
-%</beta>
+\MT@define@option@{tracking}
% \end{macrocode}
%\changes{v1.5}{2004/12/02}{new option: \opt{selected}, by default false
% (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-dependent setup suggested by \contributor Ulrich Dirr <ud\at art-satz.de>)}
+% (language-dependent setup suggested by \contributor Ulrich Dirr <ud\at art-satz.de>) (beta:1)}
%\begin{macro}{\MT@def@bool@opt}
% The |true|/|false| options:
% \opt{draft}, \opt{final} (may be inherited from the class options),
@@ -7819,11 +8194,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
% \begin{macrocode}
-\MT@map@tlist@n{{draft}{auto}{selected}%
-%<beta> {babel}%
-}\MT@def@simple@bool@opt
+\MT@map@tlist@n{{draft}{auto}{selected}{babel}}\MT@def@simple@bool@opt
% \end{macrocode}
-% The \opt{DVIoutput} option will change \cmd\pdfoutput\ immediately to minimize
+% The \opt{DVIoutput} option will change \cmd\pdfoutput\ immediately to minimise
% the risk of confusing other packages.
% \begin{macrocode}
\MT@def@bool@opt{DVIoutput}{%
@@ -7897,15 +8270,17 @@ time will almost certainly lead to undesired results. Have your choice!}%
% (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}
+%\changes{v2.0}{2005/09/21}{new option: \opt{letterspace}, by default 100 (beta:1)}
+%\changes{v2.0}{2007/01/05}{option `\texttt{letterspacing}' renamed to `\opt{letterspace}'}
%\begin{macro}{\MT@def@num@opt}
% Options with numerical keys:
% \opt{factor},
% \opt{stretch},
% \opt{shrink},
% \opt{step},
-% \opt{letterspacing}.
+% \opt{letterspace}.
% \begin{macrocode}
+%</package>
\def\MT@def@num@opt#1{%
\define@key{MT}{#1}[]{%
\MT@ifempty{##1}%
@@ -7927,9 +8302,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%\end{macro}
% \begin{macrocode}
-\MT@map@tlist@n{{stretch}{shrink}{step}%
-%<beta> {letterspacing}%
-}\MT@def@num@opt
+%<package>\MT@map@tlist@n{{stretch}{shrink}{step}{letterspace}}\MT@def@num@opt
+%<letterspace>\MT@def@num@opt{letterspace}
+%<*package>
% \end{macrocode}
% \opt{factor} will define the protrusion factor only.
% \begin{macrocode}
@@ -7945,7 +8320,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}
% \end{macrocode}
-% Unit for codes.
+% Unit for protrusion codes.
%\changes{v1.8}{2005/04/14}{new option: \opt{unit}, by default \texttt{character}}
%\changes{v1.9}{2005/09/28}{option \opt{unit}: rename value \texttt{relative} to \texttt{character}}
% \begin{macrocode}
@@ -7953,12 +8328,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@ifempty{#1}%
{\def\@tempa{character}}%
{\KV@@sp@def\@tempa{#1}}%
- \MT@ifstreq\@tempa{relative}{%
- \MT@warning{Value `relative' for option `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{%
\MT@ifdimen\@tempa{%
\let\MT@pr@unit\@tempa
@@ -8038,13 +8407,25 @@ time will almost certainly lead to undesired results. Have your choice!}%
{\MT@gdef@n{MT@default@#1@set}{all}}%
}
% \end{macrocode}
-%
+%\begin{macro}{\MT@check@active@set}
+% 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} (this
+% is done at the end of the preamble).
+% \begin{macrocode}
+\def\MT@check@active@set#1{%
+ \MT@ifdefined@n@TF{MT@#1@setname}{%
+ \MT@info@nl{Using \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}'}%
+ }{%
+ \global\MT@let@nn{MT@#1@setname}{MT@default@#1@set}%
+ \MT@info@nl{Using default \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}'}%
+ }
+}
+% \end{macrocode}
+%\end{macro}
%
%\subsubsection{Hook for Other Packages}\label{sub:hook}
%
-%\makeatletter
% {\let\special@index\index\SpecialIndex@{\Microtype@Hook}{\encapchar usage}}
-%\makeatother
%\begin{macro}{\Microtype@Hook}
%\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
@@ -8053,7 +8434,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%
% 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 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,
@@ -8093,7 +8474,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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|.
+% |protrusion|, |expansion|, |activate|, |tracking|, |spacing| and |kerning|.
% Specifying font sets is not allowed.
% \begin{macrocode}
\def\microtypesetup{\setkeys{MT}}
@@ -8137,7 +8518,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
}%
}{%
\MT@warning{%
- Value `\MT@val' for key `#1' not recognized.\MessageBreak
+ Value `\MT@val' for key `#1' not recognised.\MessageBreak
Use any of `true', `false', `compatibility' or\MessageBreak
`nocompatibility'}%
}%
@@ -8172,48 +8553,58 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \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.
+% The same for |tracking|, |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@requires@pdftex6{
+ \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@warning{%
- Value `\MT@val' for key `#1' not recognized.\MessageBreak
- Use either `true' or `false'}%
+ \MT@ifstreq\MT@val{false}{%
+ \@tempcnta=\z@
+ \MT@info{Disabling #1}%
+ }{%
+ \MT@warning{%
+ Value `\MT@val' for key `#1' not recognised.\MessageBreak
+ Use either `true' or `false'}%
+ }%
}%
+ \ifnum\@tempcnta>\m@ne
+ #2\relax
+ \fi
}%
- \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>
+ \MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@
+ \MT@trackingfalse\else\MT@trackingtrue\fi}
+ \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta}
+ \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta
+ \pdfappendkern \@tempcnta}
+}{
+% \end{macrocode}
+% Disable for older \pdftex\ versions.
+% \begin{macrocode}
+ \define@key{MTX}{tracking}[true]{\MT@warning{Ignoring tracking setup}}
+ \define@key{MTX}{kerning}[true]{\MT@warning{Ignoring kerning setup}}
+ \define@key{MTX}{spacing}[true]{\MT@warning{Ignoring spacing setup}}
+}
\define@key{MTX}{activate}[true]{%
\setkeys{MTX}{protrusion={#1}}%
\setkeys{MTX}{expansion={#1}}%
@@ -8238,23 +8629,24 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@ProcessOptionsWithKV}
% Parse options.
% \begin{macrocode}
+%</package>
\def\MT@ProcessOptionsWithKV#1{%
\let\@tempc\relax
- \let\KVo@tempa\@empty
+ \let\MT@temp\@empty
\MT@map@clist@c\@classoptionslist{%
\def\CurrentOption{##1}%
\MT@ifdefined@n@T{KV@#1@\CurrentOption}{%
- \edef\KVo@tempa{\KVo@tempa,\CurrentOption,}%
+ \edef\MT@temp{\MT@temp,\CurrentOption,}%
\@expandtwoargs\@removeelement\CurrentOption
\@unusedoptionlist\@unusedoptionlist
}%
}%
- \edef\KVo@tempa{%
+ \edef\MT@temp{%
\noexpand\setkeys{#1}{%
- \KVo@tempa\@ptionlist{\@currname.\@currext}%
+ \MT@temp\@ptionlist{\@currname.\@currext}%
}%
}%
- \KVo@tempa
+ \MT@temp
\AtEndOfPackage{\let\@unprocessedoptions\relax}%
\let\CurrentOption\@empty
}
@@ -8262,6 +8654,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\end{macro}
% \begin{macrocode}
\MT@ProcessOptionsWithKV{MT}
+%<*package>
% \end{macrocode}
% Now we can take the appropriate actions. We also tell the log file which
% options the user has chosen (in case it's interested).
@@ -8278,20 +8671,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
This might lead to different line and page breaks}
\MT@protrusionfalse
\MT@expansionfalse
-%<*beta>
+ \MT@trackingfalse
\MT@spacingfalse
\MT@kerningfalse
\MT@babelfalse
-%</beta>
\let\MT@setupfont\relax
\def\DeclareMicrotypeSet#1#{\@gobbletwo}
\renewcommand*\UseMicrotypeSet[2][]{}
\renewcommand*\SetProtrusion[3][]{}
\renewcommand*\SetExpansion[3][]{}
-%<*beta>
+ \renewcommand*\SetTracking[3][]{}
\renewcommand*\SetExtraSpacing[3][]{}
\renewcommand*\SetExtraKerning[3][]{}
-%</beta>
\renewcommand*\DeclareCharacterInheritance[3][]{}
\renewcommand*\DeclareMicrotypeAlias[2]{}
\renewcommand*\LoadMicrotypeFile[1]{}
@@ -8324,6 +8715,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
\MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output%
\ifMT@opt@DVI\space (changed by \MT@MT)\fi}%
% \end{macrocode}
+% Fix the font sets.
+% \begin{macrocode}
+ \MT@map@tlist@c\MT@font@sets\MT@fix@font@set
+% \end{macrocode}
% Protrusion.
% \begin{macrocode}
\ifMT@protrusion
@@ -8333,16 +8728,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
\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'}%
- }{%
- \MT@glet\MT@pr@setname\MT@default@pr@set
- \MT@info@nl{Using default protrusion set `\MT@pr@setname'}%
- }
+ \MT@check@active@set{pr}
\else
\let\MT@protrusion\relax
\MT@info@nl{No character protrusion}
@@ -8476,12 +8862,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
(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'}%
- }{%
- \MT@glet\MT@ex@setname\MT@default@ex@set
- \MT@info@nl{Using default expansion set `\MT@ex@setname'}%
- }
+ \MT@check@active@set{ex}
% \end{macrocode}
%\changes{v1.7}{2005/03/02}{modify \cmd\showhyphens}
% Inside \cmd\showhyphens, font expansion should be disabled.
@@ -8505,55 +8886,60 @@ time will almost certainly lead to undesired results. Have your choice!}%
\let\MT@expansion\relax
\MT@info@nl{No font expansion}
\fi
-\fi
}
-%<*beta>
\MT@requires@pdftex6{
- \MT@addto@setup{%
+%</package>
+\MT@addto@setup{%
+%<*package>
% \end{macrocode}
-% Spacing.
+% Tracking, spacing and kerning.
% \begin{macrocode}
+ \ifMT@tracking
+ \edef\MT@active@features{\MT@active@features,tr}
+ \MT@info@nl{Tracking enabled}
+ \MT@check@active@set{tr}
+ \else
+ \let\MT@tracking\relax
+ \MT@info@nl{No tracking}
+ \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'}%
- }{%
- \MT@glet\MT@sp@setname\MT@default@sp@set
- \MT@info@nl{Using default spacing set `\MT@sp@setname'}%
- }
+ \MT@check@active@set{sp}
\else
\let\MT@spacing\relax
\MT@info@nl{No adjustment of interword spacing}
\fi
-% \end{macrocode}
-% Kerning is always active (because of letterspacing).
-% Hence, we also don't set \cs{MT@kerning} to \cmd\relax.
-% \begin{macrocode}
- \edef\MT@active@features{\MT@active@features,kn}
\ifMT@kerning
+ \edef\MT@active@features{\MT@active@features,kn}
\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'}%
- }{%
- \MT@glet\MT@kn@setname\MT@default@kn@set
- \MT@info@nl{Using default kerning set `\MT@kn@setname'}%
- }
+ \MT@check@active@set{kn}
\else
+ \let\MT@kerning\relax
\MT@info@nl{No adjustment of character kerning}
\fi
- \ifnum\MT@letterspacing=\m@ne
- \let\MT@letterspacing\MT@letterspacing@default
+%</package>
+ \ifnum\MT@letterspace=\m@ne
+ \let\MT@letterspace\MT@letterspace@default
\fi
}
% \end{macrocode}
-% If \pdftex\ is too old, we disable spacing and kerning.
+% If \pdftex\ is too old, we disable tracking, spacing and kerning.
% \begin{macrocode}
+%<*package>
}{
\MT@addto@setup{%
+ \ifMT@tracking
+ \MT@warning@nl{Tracking only works with pdftex version 1.40\MessageBreak
+ or newer. Switching it off}%
+ \else
+ \MT@info@nl{No tracking (pdftex too old)}
+ \fi
+ \MT@trackingfalse
+ \let\MT@tracking\relax
\ifMT@spacing
\MT@warning@nl{Adjustment of interword spacing only works with\MessageBreak
pdftex version 1.40 or newer. Switching it off}%
@@ -8576,8 +8962,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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.
+% `\cmd\frenchspacing\ with <AMS> packages and babel', started by Philipp
+% Lehman on August 16, 2005: \nolinkurl{<ddtbaj$rob$1@online.de>}.
% \begin{macrocode}
\MT@requires@pdftex6{
\AtBeginDocument{%
@@ -8596,7 +8982,18 @@ time will almost certainly lead to undesired results. Have your choice!}%
\fi
}
}\relax
-%</beta>
+% \end{macrocode}
+% \cs{DisableLigatures} is only admissible in the preamble, therefore we can
+% now disable the corresponding macro, if it was never called.
+%\changes{v2.0}{2006/12/14}{maybe disable \cs{MT@noligatures} after the preamble}
+% \begin{macrocode}
+\MT@requires@pdftex5{
+ \MT@addto@setup{%
+ \ifMT@noligatures \else
+ \let\MT@noligatures\relax
+ \fi
+ }
+}\relax
% \end{macrocode}
% Remove the leading comma in \cs{MT@active@features}, and set the
% document switch to true.
@@ -8611,7 +9008,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\begin{macro}{\MT@set@babel@context}
% Interaction with \pkg{babel}.
% \begin{macrocode}
-%<*beta>
\def\MT@set@babel@context#1{%
\MT@ifdefined@n@TF{MT@babel@#1}{%
\MT@vinfo{*** Changing to language context `#1'\MessageBreak\on@line}%
@@ -8623,6 +9019,22 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\MT@shorthandoff}
+% Active characters can only be switched off if \pkg{babel} isn't loaded after
+% \microtype.
+% \begin{macrocode}
+\@ifpackageloaded{babel}{
+ \def\MT@shorthandoff#1#2{%
+ \MT@info@nl{Switching off #1 babel's active characters}%
+ \shorthandoff{#2}}
+}{
+ \def\MT@shorthandoff#1#2{%
+ \MT@error{You must load the `babel' package before microtype}
+ {Otherwise, I cannot switch off the active characters
+ for #1 babel.}}
+}
+% \end{macrocode}
+%\end{macro}
% We patch the language switching commands to enable language-dependent setup.
% \begin{macrocode}
\MT@addto@setup{%
@@ -8641,16 +9053,25 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
% \end{macrocode}
% Disable French \pkg{babel}'s active characters.
+%\changes{v2.0}{2006/10/10}{option `\opt{babel}': fix: switch off French
+% \pkg{babel}'s active characters with \cmd\shorthandoff\
+% instead of \cmd\NoAutoSpaceBeforeFDP\
+% (reported by \contributor Daniel Flipo <daniel.flipo\at univ-lille1.fr>) (beta:8)}
+% ^^A private mail, 2006/10/09
% \begin{macrocode}
\ifMT@kerning
\MT@if@false
- \@ifpackagewith{babel}{french}\MT@if@true\relax
- \@ifpackagewith{babel}{frenchb}\MT@if@true\relax
- \@ifpackagewith{babel}{francais}\MT@if@true\relax
- \ifMT@if@
- \MT@info@nl{Switching off French babel's active punctuation characters}%
- \NoAutoSpaceBeforeFDP
- \fi
+ \MT@with@babel@and{french} \MT@if@true
+ \MT@with@babel@and{frenchb} \MT@if@true
+ \MT@with@babel@and{francais}\MT@if@true
+ \MT@with@babel@and{acadian} \MT@if@true
+ \MT@with@babel@and{canadien}\MT@if@true
+ \ifMT@if@\MT@shorthandoff{French}{;:!?}\fi
+% \end{macrocode}
+% Disable Turkish \pkg{babel}'s active characters.
+%\changes{v2.0}{2006/10/10}{option `\opt{babel}': disable Turkish \pkg{babel}'s active characters (beta:8)}
+% \begin{macrocode}
+ \MT@with@babel@and{turkish}{\MT@shorthandoff{Turkish}{:!=}}
\fi
% \end{macrocode}
% In case \pkg{babel} was loaded before \microtype:
@@ -8662,7 +9083,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
}
\fi
}
-%</beta>
+% \end{macrocode}
+% Now we close the \cs{fi} from \cs{ifMT@draft}.
+% \begin{macrocode}
+\MT@addto@setup\fi
% \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.
@@ -8678,6 +9102,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
% That was that.
% \begin{macrocode}
%</package>
+%</package|letterspace>
% \end{macrocode}
%
% ^^A -------------------------------------------------------------------------
@@ -8701,6 +9126,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\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}
+%\changes{v2.0}{2006/12/21}{add \texttt{footnotesize} and \texttt{scriptsize} sets}
+%\changes{v2.0}{2006/12/28}{add \texttt{smallcaps} set}
%
% \begin{macrocode}
%<*m-t>
@@ -8730,6 +9157,21 @@ time will almost certainly lead to undesired results. Have your choice!}%
size = {normalsize,footnotesize,small,large}
}
+\DeclareMicrotypeSet{smallcaps}
+ { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1},
+ shape = {sc}
+ }
+
+\DeclareMicrotypeSet{footnotesize}
+ { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1},
+ size = {-small}
+ }
+
+\DeclareMicrotypeSet{scriptsize}
+ { encoding = {OT1,T1,LY1,OT4,QX,T5,TS1},
+ size = {-footnotesize}
+ }
+
\DeclareMicrotypeSet{normalfont}
{ font = */*/*/*/* }
@@ -8741,10 +9183,9 @@ time will almost certainly lead to undesired results. Have your choice!}%
\DeclareMicrotypeSetDefault[protrusion]{alltext}
\DeclareMicrotypeSetDefault[expansion] {basictext}
-%<*beta>
\DeclareMicrotypeSetDefault[spacing] {basictext}
\DeclareMicrotypeSetDefault[kerning] {alltext}
-%</beta>
+\DeclareMicrotypeSetDefault[tracking] {normalfont}
% \end{macrocode}
%
@@ -8772,8 +9213,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \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}}
+%\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}}
@@ -8796,8 +9237,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
\DeclareMicrotypeAlias{zeus}{eus}
% \end{macrocode}
% 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}
+%\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
@@ -8815,12 +9256,11 @@ time will almost certainly lead to undesired results. Have your choice!}%
%
% Contexts that are to be set when switching to a language.
% \begin{macrocode}
-%<*beta>
%%% -----------------------------------------------------------------------
%%% INTERACTION WITH THE `babel' PACKAGE
\DeclareMicrotypeBabelHook
- {french,francais}
+ {french,francais,acadian,canadien}
{kerning=french, spacing=}
\DeclareMicrotypeBabelHook
@@ -8831,7 +9271,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
{turkish}
{kerning=turkish, spacing=}
-%</beta>
% \end{macrocode}
%\GeneralChanges*
%
@@ -9052,8 +9491,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% \end{macrocode}
%
%\subsubsection{<T5>}
-%\changes{v1.9}{2005/08/17}{add list for <T5>
-% (requested by \contributor \thanh{} <hanthethanh\at gmail.com>)}
+%\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.
@@ -9203,11 +9642,11 @@ time will almost certainly lead to undesired results. Have your choice!}%
%\GeneralChanges{Protrusion}
%
%\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.4b}{2004/11/19}{harmonise dashes in upshape and italic
+% (\texttt{cmr}, \texttt{pad}, \texttt{ppl})}
%\changes{v1.9}{2005/08/16}{settings for <OT4> encoding (Computer Modern Roman,
% Palatino, Times)}
-%\changes{v1.9}{2005/08/17}{settings for <T5> encoding (Computer Modern Roman)}
+%\changes{v1.9}{2005/08/17}{settings for <T5> encoded Computer Modern Roman}
%\changes{v1.9a}{2005/12/02}{settings for <T5> encoded Charter}
%
% \begin{macrocode}
@@ -9275,8 +9714,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
% 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>)}
+%\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}
@@ -10527,8 +10966,8 @@ time will almost certainly lead to undesired results. Have your choice!}%
%
% 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 <TS1> encoding}
+%\changes{v1.2}{2004/09/28}{add settings for Computer Modern Roman and
+% Adobe Garamond in <TS1> encoding}
% \begin{macrocode}
\SetProtrusion
%<m-t> [ name = textcomp ]
@@ -11812,7 +12251,6 @@ time will almost certainly lead to undesired results. Have your choice!}%
% Default unit is space.
%
% \begin{macrocode}
-%<*beta>
%<*m-t>
%%% -----------------------------------------------------------------------
%%% INTERWORD SPACING SETTINGS
@@ -11823,7 +12261,7 @@ time will almost certainly lead to undesired results. Have your choice!}%
{
% \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
+% a mail from \contributor Ulrich Dirr <ud\at art-satz.de>. ^^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.)
@@ -12067,80 +12505,10 @@ time will almost certainly lead to undesired results. Have your choice!}%
{=} = {500, },
}
-% \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 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
-% confusing error messages (\eg, when writing \textls{\LaTeX}).
-% \begin{macrocode}
-\SetExtraKerning
- [ name = letterspacing-all,
- context = letterspacing,
- preset = {1000,1000} ]
- { encoding = {U,OML,OMS,OMX} }
- { }
-
-% \end{macrocode}
-% 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},
- 2 = {0,0},
- 3 = {0,0},
- 4 = {0,0},
- 5 = {0,0},
- 6 = {0,0},
- 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,
- context = letterspacing,
- 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}
+%\changes{v2.0}{2006/12/28}{remove \texttt{letterspacing} settings}
%\GeneralChanges*
%
%\section{Auxiliary File for Micro Fine Tuning}
@@ -12260,7 +12628,7 @@ normal, and shrunk by 5\%:
% \mailtoRS.
%
% ^^A -------------------------------------------------------------------------
-%
+%\makeatother
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -12277,7 +12645,7 @@ normal, and shrunk by 5\%:
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \CheckSum{7841}
+% \CheckSum{8166}
%
% \Finale
%
diff --git a/Master/texmf-dist/source/latex/microtype/microtype.ins b/Master/texmf-dist/source/latex/microtype/microtype.ins
index 0186768399c..e05c1487d9e 100644
--- a/Master/texmf-dist/source/latex/microtype/microtype.ins
+++ b/Master/texmf-dist/source/latex/microtype/microtype.ins
@@ -1,8 +1,6 @@
-% -*- TeX:UK -*-
-% $Id: microtype.ins,v 1.12 2006-07-28 18:27:03+02 schlicht Exp schlicht $
+% -*- TeX:STY:UK -*-
+% $Id: microtype.ins,v 1.13 2007-01-14 18:07:31+01 schlicht Exp schlicht $
% ------------------------------------------------------------------------
-\newif\ifbeta
-%\betatrue
\input docstrip
\keepsilent
\askonceonly
@@ -11,7 +9,7 @@
------------------------------------------------------------------------
The `microtype' package
An interface to the micro-typographic extensions of pdfTeX
- Copyright (c) 2004--2006 R Schlicht <w.m.l@gmx.net>
+ Copyright (c) 2004--2007 R Schlicht <w.m.l@gmx.net>
This work may be distributed and/or modified under the conditions of the
LaTeX Project Public License, either version 1.3c of this license or (at
@@ -22,7 +20,7 @@ of all distributions of LaTeX version 2005/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.
+derived files microtype.sty and letterspace.sty.
% Modified versions of the configuration files (*.cfg) may be distributed
% provided that: (1) the original copyright statement is not removed, and
@@ -40,10 +38,16 @@ derived file microtype.sty.
^^J\MetaPrefix}
\let\firstpreamblepart\defaultpreamble
\let\lastpreamblepart \defaultlastpreamblepart
+\declarepreamble\lsppreamble
+ This is a stand-alone version that only provides the letterspacing
+ commands. Do not use this package together with the `microtype' package.
+ Please refer to section 7 of the `microtype' documentation.
+\endpreamble
\declarepreamble\cfgpreamble
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.
+ interword spacing and additional kerning, 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
@@ -53,7 +57,9 @@ derived file microtype.sty.
\declarepreamble\fontpreamble
This is a font-specific configuration file for the `microtype'
package. It may contain settings for font expansion and character
- protrusion. Please consult the documentation for details.^^M
+ protrusion, interword spacing and additional kerning, as well as
+ character inheritance declarations.
+ 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.
@@ -78,9 +84,11 @@ derived file microtype.sty.
\def\makecfg#1#2{\makefile{mt-#2.cfg}{config,cfg-#1,#2}}
\generate{
- \makefile{microtype.sty}{package\ifbeta,beta\fi}
+ \makefile{microtype.sty}{package}
+ \usepreamble\lsppreamble
+ \makefile{letterspace.sty}{letterspace}
\usepreamble\cfgpreamble
- \makefile{microtype.cfg}{config,cfg-t,m-t\ifbeta,beta\fi}
+ \makefile{microtype.cfg}{config,cfg-t,m-t}
\usepreamble\fontpreamble
\makecfg{t}{bch}
\makecfg{t}{cmr}