From 18cfbeaea364a664e0f0b457430f65af66d8122c Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 20 Nov 2019 03:00:33 +0000 Subject: CTAN sync 201911200300 --- .../translations/microtype/de/microtype-DE.dtx | 15129 +++++++++++++++++++ .../translations/microtype/de/microtype-DE.pdf | Bin 0 -> 1272263 bytes 2 files changed, 15129 insertions(+) create mode 100644 obsolete/info/translations/microtype/de/microtype-DE.dtx create mode 100644 obsolete/info/translations/microtype/de/microtype-DE.pdf (limited to 'obsolete/info') diff --git a/obsolete/info/translations/microtype/de/microtype-DE.dtx b/obsolete/info/translations/microtype/de/microtype-DE.dtx new file mode 100644 index 0000000000..5eea863639 --- /dev/null +++ b/obsolete/info/translations/microtype/de/microtype-DE.dtx @@ -0,0 +1,15129 @@ +%\iffalse meta-comment +% ^^A messages to WinEdt: +% !Mode:: "TeX:DTX:UK" +% !smartQuote:: "English" +% !DTXversion:: "2.4" +% ------------------------------------------------------------------------ +% $Id: microtype.dtx,v 1.60 2010-01-10 02:00:23+01 schlicht Exp schlicht $ +% ------------------------------------------------------------------------ +% The `microtype' package +% An interface to the micro-typographic extensions of pdfTeX +% Copyright (c) 2004--2010 R Schlicht +% +% This work may be distributed and/or modified under the conditions of the +% LaTeX Project Public License, either version 1.3c of this license or (at +% your option) any later version. The latest version of this license is in: +% http://www.latex-project.org/lppl.txt, and version 1.3c or later is part +% 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 files microtype.sty, microtype.lua 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. +% ------------------------------------------------------------------------ +% +%\NeedsTeXFormat{LaTeX2e} +%<*driver> +\ProvidesFile{\jobname.dtx} +% +%\ProvidesPackage +%\ProvidesFile +% {microtype} +% {letterspace} +% {microtype.cfg} +%<*package|letterspace|m-t> + [2010/01/10 v2.4 +% Micro-typography with pdfTeX +% Robust letterspacing +% microtype main configuration file + (RS)] +% +%<*config> +% {mt-bch.cfg}[2007/03/03 v1.5 microtype config. file: Bitstream Charter (RS)] +% {mt-blg.cfg}[2007/07/14 v1.0 microtype config. file: Bitstream Letter Gothic (RS)] +% {mt-cmr.cfg}[2009/11/09 v2.0 microtype config. file: Computer Modern Roman (RS)] +% {mt-pad.cfg}[2005/11/07 v1.5 microtype config. file: Adobe Garamond (RS)] +% {mt-pmn.cfg}[2009/11/14 v1.3 microtype config. file: Adobe Minion (HH/KK)] +% {mt-ppl.cfg}[2005/11/16 v1.6 microtype config. file: Palatino (RS)] +% {mt-ptm.cfg}[2006/04/20 v1.7 microtype config. file: Times (RS)] +% {mt-ugm.cfg}[2006/01/26 v1.0 microtype config. file: URW Garamond (RS)] +% {mt-msa.cfg}[2006/02/04 v1.1 microtype config. file: AMS symbols (a) (RS)] +% {mt-msb.cfg}[2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS)] +% {mt-euf.cfg}[2006/07/03 v1.1 microtype config. file: AMS Euler Fraktur (RS)] +% {mt-eur.cfg}[2006/07/31 v1.1 microtype config. file: AMS Euler Roman (RS)] +% {mt-eus.cfg}[2006/07/28 v1.2 microtype config. file: AMS Euler Script (RS)] +% {mt-zpeu.cfg}[2006/05/04 v1.0 microtype config. file: Adobe Euro (RS)] +% {mt-euroitc.cfg}[2006/05/04 v1.0 microtype config. file: ITC Euro (RS)] +% {mt-mvs.cfg}[2006/07/05 v1.1 microtype config. file: Marvosym Euro (RS)] +% +% +%<*driver|docsty> +%<*driver> +\documentclass[10pt,a4paper]{ltxdoc} +\makeatletter +% +% Let's abolish CM! We use Charter and Letter Gothic +% (for the pre-built documentation on CTAN): +% \usepackage[charter]{mathdesign} +% \def\rmdefault{bch} % not scaled +% \def\ttdefault{blg} +\usepackage{ifpdf,ifluatex} +\usepackage[latin1]{\ifluatex luainputenc,\fi inputenc} +\usepackage[T1]{fontenc} +\usepackage[ngerman]{babel} +\usepackage{textcomp} +\GetFileInfo{\jobname.dtx} +\usepackage[expansion=false,kerning=true]{microtype}[\filedate] + \DeclareMicrotypeSet*[protrusion] + { doc } + { encoding = {*, TS1, OMS}, + family = {rm*, tt*}, + size = {footnotesize, small, normalsize} } + \SetProtrusion + { encoding = OMS, + family = mdbch } + { "68 = {400, }, % \langle + "69 = { ,400} } % \rangle + \DeclareMicrotypeSet*[kerning] + { doc } + { encoding = T1, + family = blg, % typewriter font and ... + font = * } % French sample in section \ref{sub:kerning} + \SetExtraKerning + { encoding = T1, + family = blg } + { _ = {100,100} } % underscores shouldn't touch + % disable ?` and !` ligatures (sample in section \ref{sec:disable-ligatures}) + \DisableLigatures[?,!]{encoding = *, family = rm* } + % Fraktur sample in section \ref{sec:lettersp} + \IfFileExists{t1mwr.fd} + {\newcommand\textfrak[1]{{\fontfamily{mwr}\selectfont ##1}} + \ifpdf + \SetTracking[no ligatures={f}]{encoding=T1,family=mwr}{100} + \fi} + {\IfFileExists{yfonts.sty} + {\usepackage{yfonts} + \ifpdf + \SetTracking[no ligatures={f}]{encoding=LY,family=yfrak}{100} + \fi} + {\let\textfrak\@gobble}} +\tolerance=700 +\ifpdf + \ifnum\pdftexversion<140 \else % pdftex 1.40, including textmatrix patch, + \microtypesetup{expansion=alltext,step=1} % hence we can activate expansion ... + \tolerance=300 % ... and make TeX almost as intolerant as it normally is + \g@addto@macro\macrocode{\microtypesetup{expansion=false}} + \pdfminorversion=5 % for the OCGs + \fi + % bonus material + \InputIfFileExists{microtype-logo.dtx}\relax\relax + \InputIfFileExists{microtype-lssample.dtx}\relax\relax +\else + \let\lsstyle\relax +\fi +\ifluatex % microtype.dtx finally compiles with 0.35! + \microtypesetup{kerning=false} + \let\lsstyle\relax +\fi +\usepackage{booktabs} +\usepackage{array} + \newcolumntype{L}[1]{p{#1}<{\raggedright}} +\usepackage{color} + \definecolor{theblue} {rgb}{0.02,0.04,0.48} + \definecolor{thered} {rgb}{0.65,0.04,0.07} + \definecolor{thegreen}{rgb}{0.06,0.44,0.08} + \definecolor{thegrey} {gray}{0.5} + \definecolor{theshade}{gray}{0.94} + \definecolor{theframe}{gray}{0.75} +\usepackage{graphicx} +% general layout +\frenchspacing +\DeclareRobustCommand\textoractual[2]{\ifpdf + \pdfliteral direct{/Span<>BDC}#1\pdfliteral direct{EMC}% + \else #1\fi} +\expandafter\newif\csname ifcmr\endcsname +\long\def\@tempa{cmr} +\ifx\rmdefault\@tempa + \cmrtrue + \def\PackageFont{\sffamily} + \def\match{\textbullet} + \usepackage{amssymb} % \varnothing + \let\OrigTeX\TeX + \def\TeX{\textoractual{\OrigTeX}{TeX}} + \setlength\textheight{47\baselineskip} +\else + \def\bfdefault{b} + \def\Module#1{{\color{theblue}\textoractual{$\langle$}{<}\textit{#1}\textoractual{$\rangle$}{>}}} + \def\TeX{\textoractual{T\kern-.1667em\lower.4ex\hbox{E}\kern-.125emX\@}{TeX}} + \DeclareRobustCommand\LaTeX{\textoractual{L\kern-.26em{\sbox\z@ T\vbox to\ht\z@{% + \hbox{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont A}% + \vss}}}{La}\kern-.1em\TeX} + \def\PackageFont{\ttfamily} + \def\match{{\large\raisebox{-.15em}{\textbullet}}} + {\catcode`\`=\active % indiscernible from ' in Bitstream Letter Gothic + \g@addto@macro\macro@code{\let`\textasciigrave}} + \linespread{1.07}\normalfont + \setlength\textheight{46\baselineskip} +\fi +\addtolength\textheight{\topskip} +\setlength\topmargin{12pt} +% sections +\def\@seccntformat#1{\llap{\csname the#1\endcsname\hskip\marginparsep}} +\def\paragraph{\@startsection{paragraph}{4}% + {0pt}{8pt plus 2pt minus 1pt}{-1em}% + {\normalfont\normalsize\itshape}} +% title +\def\@maketitle{% + \newpage\null\vskip 2em + \begin{center}\let\footnote\thanks + {\LARGE \@title\par}\vskip 1.5em + {\large \parbox{.33\textwidth}{\centering\@author}% + \parbox{.33\textwidth}{\centering\@date}}% + \vskip1.5em\rule{.66\textwidth}{.4pt}% + \end{center}\par\vskip1.5em} +% headers +\headheight=15pt +\def\ps@MTheadings{% + \def\@oddhead{% + \hbox to\textwidth{\vbox{\hbox to\textwidth{% + \footnotesize{\leftmark\rightmark\strut}\hfill\thepage\strut}% + \hrule height 0.4pt width\textwidth \vskip-0.4pt + }}\hss} + \let\@oddfoot\@empty + \let\@mkboth\markboth + \def\sectionmark##1{\markboth{\textls*[60]{\MakeUppercase{##1}}}{}} + \def\subsectionmark##1{\markright{: ##1}}} +\pagestyle{MTheadings} +% toc +\let\l@section@\l@section +\def\l@section{\vskip -.75ex\l@section@} +\def\l@subsection{\vskip.35ex \penalty\@secpenalty \@dottedtocline{2}{1.5em}{2.7em}} +\def\l@subsubsection#1#2{% + \leftskip 4.2em + \rightskip 2em plus 2em + \parindent 0pt + {\let\numberline\@gobble{\small #1~[#2]}}} +\def\l@table{\@dottedtocline{1}{0pt}{1.5em}} +\def\@pnumwidth{1.7em} +\ifpdf + \let\ORIGpdfoutline\pdfoutline + \def\special@outlines{attr{/F 01}} + \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*[60]{\MakeUppercase{#2}}}{}% + \@starttoc{#3}}} +\defspecial@toc\tableofcontents\contentsname{toc} +\defspecial@toc\listoftables\listtablename{lot} +% bibliography +\def\@cite#1#2{#1\if@tempswa, #2\fi} +\def\thebibliography#1{% + \section{\refname}% + \list{}{\leftmargin 0pt}% + \sloppy + \clubpenalty 4000 + \@clubpenalty \clubpenalty + \widowpenalty 4000} +\def\@biblabel#1{} +% footnotes +\long\def\@makefntext#1{% + \leftskip 0pt + \parindent 0pt + \everypar{\parindent 0pt}% + \leavevmode\llap{\@thefnmark\hskip\marginparsep}#1} +\renewcommand\footnoterule{% + \kern-3\p@ + \hrule\@width \columnwidth + \kern2.6\p@} +\skip\@mpfootins=4pt +% lists +\setlength\leftmargini{15pt} +\setlength\leftmarginii{12.5pt} +\setlength\leftmarginiii{10pt} +\def\@listi{\leftmargin \leftmargini + \parsep 4.5pt plus 1pt minus 1pt + \topsep 4.5pt plus 1pt minus 1pt + \itemsep 0pt} +\let\@listI\@listi +\def\descriptionlabel#1{\hspace\labelsep\normalfont#1:} +\renewenvironment{itemize} + {\ifnum \@itemdepth >\thr@@\@toodeep\else + \advance\@itemdepth\@ne + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + \expandafter\list + \csname\@itemitem\endcsname + {\ifnum\@itemdepth=\@ne\leftmargin 0pt\fi + \def\makelabel##1{\hss\llap{##1}}}% + \fi} + {\endlist} +\newenvironment{enum}[1][0] + {\list\labelenumi + {\usecounter{enumi}\setcounter{enumi}{#1}\addtocounter{enumi}{-1}% + \renewcommand\labelenumi{\texttt{\theenumi}:}% + \leftmargin 30pt + \itemindent-15pt + \labelwidth 15pt + \labelsep 0pt + \def\makelabel##1{##1\hss}}} + {\endlist} +\newenvironment{options} + {\list{} + {\leftmargin 0pt + \labelwidth 0pt + \labelsep 1em + \itemindent \labelsep + \lstset{belowskip=0pt}}} + {\endlist} +% boxes (for some reason, mathdesign changes these values) +\setlength\fboxrule{0.4pt} +\setlength\fboxsep{3pt} +\setlength\arrayrulewidth{0.4pt} +% tables +\setlength\tabcolsep{2pt} +\long\def\@makecaption#1#2{% + \sbox\@tempboxa{\footnotesize\itshape#1: #2}% + \ifdim \wd\@tempboxa >\hsize + \footnotesize\itshape#1: #2\par + \else + \hb@xt@\hsize{\box\@tempboxa\hfil}% + \fi + \vskip 4pt} +% index and change log +\IndexPrologue{\section{Index}% + Links (in blue) refer to the page where the corresponding entry is described + (bold face) resp. occurs. Plain numbers (in black) refer to the code line + where the corresponding entry is defined (underlined) resp. used.} +\GlossaryPrologue{\section{Change history}\label{sec:changes}\vspace*{-\multicolsep}} + %\setcounter{finalcolumnbadness}{100} + %\raggedcolumns +\setcounter{IndexColumns}{2} +\def\IndexMin{12\baselineskip} +\g@addto@macro\IndexParms{\footnotesize} +\def\GlossaryParms{\IndexParms + \def\@idxitem ##1##2\efill{% + \end{multicols} + \begin{multicols}{2} + [\subsubsection*{\if##1v\relax Version ##2 + (\csname MTversiondate##2\endcsname)\else ##2\fi}][5\baselineskip] + \ifpdf \phantomsection \pdfbookmark[2]{\if##1v\relax ##2 + (\csname MTversiondate##2\endcsname)\else ##2\fi}{subsection##2}\fi + \GlossaryParms \rightskip 15pt plus 5pt + \let\item\@idxitem + \ignorespaces \makeatletter \scan@allowedfalse}% + \def\subitem{\par\hangindent 15pt}% + \def\subsubitem{\subitem\hspace*{7.5pt}}} +% macro code +\MacroTopsep=0pt +\MacrocodeTopsep=3pt +\setlength\MacroIndent{0pt} +\def\theCodelineNo{\reset@font\color{thegrey}\scriptsize + \textoractual{\arabic{CodelineNo}\,}{}}% don't copy line numbers +\def\MacroFont{\ttfamily\small} +\def\AltMacroFont{\ttfamily\footnotesize} +\def\PrintMacroName#1{\strut\MacroFont\string #1\hskip15pt} +\def\ImplementationSettings{% + \linespread{1}% + \hfuzz=10pt + \def\MacroFont{\ttfamily\footnotesize}% + \let\macro@font\MacroFont} +% additional bells ... +\def\Describe#1#2#3{\noindent\csname Describe#1\endcsname{#2}% + \DescribeValues{#1}{#3}} +\def\DescribeOption{\leavevmode\@bsphack + \begingroup\MakePrivateLetters\Describe@Option} +\def\Describe@Option#1{\endgroup + \marginpar{\raggedleft\PrintDescribeOption{#1}}% + \SpecialOptionIndex{#1}\@esphack\ignorespaces} +\def\DescribePackage{\leavevmode\@bsphack + \begingroup\MakePrivateLetters\Describe@Package} +\def\Describe@Package#1{\endgroup + \marginpar{\raggedleft\PrintDescribeOption{#1.sty}}% + \CatIndex{#1}{package}\@esphack\ignorespaces} +\def\DescribeValues#1#2{% + \let\@tempa\@empty \let\Option@default\@empty + \@for\@tempb:=#2\do{% + \csname Special#1Value\expandafter\endcsname\@tempb\@nil + \expandafter\g@addto@macro\expandafter\@tempa + \expandafter{\csname #1Sep\endcsname}% + \expandafter\g@addto@macro\expandafter\@tempa + \expandafter{\@tempb}}% + \@ifnextchar[\PrintValues{\PrintValues[\Option@default]}} +\def\SpecialOptionValue#1#2\@nil{% + \if#1:\def\@tempb{\Variable{#2}}\else % : = variable + \if#1!\def\@tempb{#2}\def\Option@default{#2}\else % ! = default + \if#1*\def\@tempb{#2}\def\Option@default{\MaybeDefault{#2}}% * = default (maybe) + \fi\fi\fi} +\def\SpecialMacroValue#1#2\@nil{% + \if#1?\def\@tempb{\normalsize[\Variable{#2}]}% % ? = optional + \else\def\@tempb{\normalsize\{\Variable{#1#2}\}}\fi} +\let\SpecialEnvValue\SpecialMacroValue +\def\Variable#1{$\langle${\rmfamily\itshape\small#1}$\rangle$} +\def\MaybeDefault#1{\textrm{*}\,#1} +\def\OptionSep{{\rmfamily, }} \def\MacroSep{\,} \def\EnvironmentSep{\,} +\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 + \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} +\def\SpecialEnvIndex#1{\CatIndex{#1}{environment}} +\def\PrintDescribeMacro#1{\strut\MacroFont\color{thegreen}\string #1} +\def\PrintDescribeEnv#1{\strut\MacroFont\bslash begin\{{\color{thegreen}#1}\}% + \\*[.25\baselineskip]\strut\bslash end\{{\color{thegreen}#1}\}} +\def\PrintDescribeOption#1{\strut\MacroFont\color{thered}#1} +\def\Indexing{\let\special@index\codeline@wrindex} +\def\NoIndexing{\let\special@index\@gobble} +\def\GeneralChanges#1{\edef\generalname{\if*#1 General\else#1\fi}}% mind the space! +\DeclareRobustCommand\key[1]{\textcolor{thered}{\ttfamily#1}} +\DeclareRobustCommand\pkg[1]{{\PackageFont#1}\@bsphack\CatIndex{#1}{package}\@esphack} +\DeclareRobustCommand\opt[1]{{\ttfamily#1}\@bsphack\CatIndex{#1}{option}\@esphack} +\DeclareRobustCommand\file[1]{{\ttfamily#1}} +% ... and whistles +{\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,escapechar=", + basicstyle=\MacroFont, + keywords=[0]{\microtypesetup,\DeclareMicrotypeSet,\UseMicrotypeSet, + \DeclareMicrotypeSetDefault,\SetProtrusion,\SetExpansion,\SetTracking, + \SetExtraKerning,\SetExtraSpacing,\DisableLigatures,\DeclareCharacterInheritance, + \DeclareMicrotypeVariants,\DeclareMicrotypeAlias,\DeclareMicrotypeBabelHook, + \LoadMicrotypeFile,\microtypecontext,\textmicrotypecontext, + \textls,\lsstyle,\lslig,\Microtype@Hook}, + keywordstyle=[0]\color{thegreen}, + keywords=[1]{protrusion,expansion,activate,DVIoutput,draft,final,verbose, + config,factor,auto,stretch,shrink,step,selected,unit,tracking,kerning, + spacing,letterspace,babel,context,%defersetup,copyfonts, % undocumented + no ligatures,outer spacing,outer kerning}, % there are three \nobreakspace in this line + keywordstyle=[1]\color{thered}, + comment=[l]\%, + commentstyle=\color{thegrey}\itshape, + alsoother={0123456789_}, + frame=single,backgroundcolor=\color{theshade},rulecolor=\color{theframe}, + framerule=\fboxrule,xleftmargin=3.4pt,xrightmargin=3.4pt,belowskip=\smallskipamount + } + \let\verbatim\relax + \lstnewenvironment{verbatim}[1][]{\lstset{##1}}{} + \ifpdf \IfFileExists{dummy-space.pfb}{% + \pdfmapline{+dummy-space }, + pdfsubject={An interface to the micro-typographic extensions of pdfTeX}, + pdfkeywords={TeX, LaTeX, pdfTeX, luaTeX, typography, micro-typography, + character protrusion, margin kerning, optical alignment, font expansion, + font scaling, hz, kerning, spacing, glue, letterspacing, tracking, ligatures} + ]{hyperref} + \pdfcatalog{/Lang(en-GB)} + \ifnum\pdftexversion < 130 \else + \IfFileExists{hypdestopt.sty}{\usepackage{hypdestopt}}\relax\fi + \IfFileExists{hyperxmp.sty}{ + \usepackage{hyperxmp} + \hypersetup{% + pdfcopyright={\textcopyright\ 2004--2010 R Schlicht\012% + This work may be distributed and/or modified under the conditions + of the LaTeX Project Public License, either version 1.3c of this + license or (at your option) any later version.\&\#xA;% + This work has the LPPL maintenance status `author-maintained'.}, + pdflicenseurl={http://www.latex-project.org/lppl/}} + }\relax + \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 + \else\expandafter\@gobble\saved@macroname\actualchar + \string\verb\quotechar*\verbatimchar\saved@macroname\verbatimchar\fi + :\levelchar #3\encapchar hyperpage}}% + \@tempa\endgroup\@esphack} + %\def\theCodelineNo{% % ... and everything else (would double the pdf file size) + % \reset@font\color{thegrey}\scriptsize + % \@tempcnta\arabic{CodelineNo}\advance\@tempcnta by\@ne + % \hypertarget{L:\number\@tempcnta}{\arabic{CodelineNo}}} + %\def\main#1{\underline{\hyperlink{L:#1}{#1}}} + %\def\codeline#1{\link@sanitize#1-\@nil{#1}} + %\def\link@sanitize#1-#2\@nil{\link@@sanitize#1,\@nil} + %\def\link@@sanitize#1,#2\@nil{\hyperlink{L:#1}} + %\def\SpecialIndex#1{\@bsphack\special@index{\expandafter\@gobble + % \string#1\actualchar + % \string\verb\quotechar*\verbatimchar\string#1\verbatimchar + % \encapchar codeline}% + % \@esphack} + \def\ctanurl#1{Available from \acronym{CTAN} at + \href{http://www.ctan.org/tex-archive/#1}{\nolinkurl{/#1}}} + \DeclareRobustCommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}} + \def\mailtoRS{\href % some PDF viewers don't like spaces: + {mailto:\%20Robert\%20Schlicht?subject=[microtype\%20\fileversion]} + {\texttt{w.m.l@gmx.net}}} + % the samples in the introduction, utilising nested optional content groups (aka. layers): + \ifnum\pdftexversion<140 \else + \def\mt@layer#1#2{\pdfliteral direct{/OC/#1 BDC}#2\pdfliteral direct{EMC}} + \ifx\mt@objects\@undefined\let\mt@objects\@empty\fi + \ifx\mt@order \@undefined\let\mt@order \@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@order {\mt@order \csname mt@#1@#2\endcsname} + \xdef\mt@resources{\mt@resources/#1#2 \csname mt@#1@#2\endcsname}} + \xdef\mt@order{\mt@order[(Sample)} + \mt@register{Protrusion}{true} \mt@register{Protrusion}{false} + \mt@register{Expansion} {true} \mt@register{Expansion} {false} + \mt@register{_compatibility}{} + \xdef\mt@order{\mt@order]} + \pdfcatalog{/OCProperties << + /OCGs [\mt@objects] + /D << /Order [\mt@order] + /BaseState/OFF + /ON [\mt@Protrusion@false \mt@Expansion@false + \ifx\mtl@objects\@undefined\else\mtl@objects\fi] >> >> } + \newbox\mt@box + \newdimen\mt@unvdimen + \def\mt@place#1{% + \vskip-\mt@unvdimen + \setbox\mt@box\vbox{#1}% + \mt@unvdimen\dimexpr\ht\mt@box+\dp\mt@box\relax + \unvbox\mt@box} + \def\mt@pseudo@marg#1{% + \mt@place{\llap{\vbox{% + \hsize\marginparwidth + \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 + /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 \csname mt@_compatibility@\endcsname] >> % not honoured by older viewers anyway + /A << /S/SetOCGState /State[/Toggle \csname mt@#1@true\endcsname + \csname mt@#1@false\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 % = \topsep without vertical stretchability + \long\def\mt@sample@text{#1} + \mt@pseudo@marg{\color{theblue}% + Nachdem Sie den Text rechterhand gelesen haben, können Sie den Effekt + dieser Features betrachten, indem Sie auf die Links klicken:\strut\\ + \colorbox{theshade}{% + \begin{tabular}{@{}>{\upshape}l@{\quad}l} + \mt@toggle@sample{Protrusion}\\\addlinespace + \mt@toggle@sample{Expansion} + \end{tabular}}\\[0.3\baselineskip] + Beide Features sind im ganzen Dokument eingeschaltet.} + \mt@show@sample{false}{false} + \mt@show@sample{false}{true} + \mt@show@sample{true} {false} + \mt@layer{_compatibility}{% + % for compatibility with older PDF viewers that don't support OCGs, we + % add a layer that contains a white box, which will hide the underlying + % layers for older viewers, and will be ignored by PDF 1.5 capable viewers. + \mt@place{\rlap{\hskip-\marginparwidth \color{white}% + \vrule width\dimexpr\hsize+\marginparwidth\relax height\mt@unvdimen}} + \mt@pseudo@marg{\color{thered}% + 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 throughout this document.}} + \mt@show@sample{true}{true} + \vskip 4pt + \endgroup + \edef\x{\pdfpageresources{/Properties <<\mt@resources>>}}\x} + \def\emptypdfpageresources{\pdfpageresources{}} + \fi +\else + \usepackage{url} + \newcommand\hyperref[2][]{#2} + \let\hyperpage\@firstofone + \let\texorpdfstring\@firstoftwo + \def\ctanurl{Available from \acronym{CTAN} at \url} + \let\nolinkurl\url + \let\mailto\texttt + \def\mailtoRS{\mailto{w.m.l@gmx.net}} +\fi +\ifx\l@ukenglish\@undefined + \hyphenation{let-ter-spac-ing let-ter-spaced let-ter-space} +\else + \language=\l@ukenglish +\fi +\hyphenation{An-dre-as Ber-nard Ha-rald Mi-cha-el Pe-ter Ste-phan Wolf-ram + Har-ders Hop-pe Jac-kow-ski Ku-char-czyk Mei-er Mu-the-si-us Zed-ler + Sveinung % ? + with-out} +\def\fallbacktext#1{{\centering\itshape[#1]\par}} +% abbreviations +\DeclareRobustCommand\thanh{H\`an Th\^e% + \ifx\eTeXversion\undefined \llap{\raisebox{0.5ex}{\'{}}} + \else \llap{\raisebox{0.45ex}{\'{}\kern\dimexpr.05em-2\fontdimen1\font\relax}} + \fi Th\`anh} +\def\pdftex{\texorpdfstring{pdf\kern.05em\TeX}{pdfTeX}} +\def\luatex{\texorpdfstring{lua\kern-.05em\TeX}{luaTeX}} +\def\etex{\mbox{e-\TeX}} +\def\nonetex{\mbox{\rlap{\kern.05em/}e-\TeX}} % aka. \TeX +\def\@reflect#1{\ifdim\fontdimen1\font=0pt \reflectbox{#1}% + \else \rotatebox[origin=c]{180}{#1}\fi} +\DeclareRobustCommand\xetex{% also reflect the initial `X'? + \textoractual{\@reflect{X}\lower.4ex\hbox{\kern-.12em\@reflect{E}}}{Xe}% + \kern-.16em\TeX} +\def\texlive{\TeX~Live} +\def\microtype{{\PackageFont microtype}} +\def\letterspace{\pkg{letterspace}} +\def\fontdim{\cmd\fontdimen\,} +\def\eg{e.\,g.} +\def\ie{i.\,e.} +\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} +\DeclareRobustCommand\acronym[1]{\texorpdfstring{{\smaller\textls[60]{#1}}}{#1}} +\let\less=< +{\catcode`\<=\active + \AtBeginDocument{\catcode`\<=\active + \def<#1>{\acronym{#1}} + \def\contributor#1 <#2\at#3>{\@contributor{#1}{#2@#3}} + \DeclareRobustCommand\@contributor[2]{\textit{#1}} + %\DeclareRobustCommand\@contributor[2]{\href{mailto:#2}{\textit{#1}}} + }} +%<*driver> +\CodelineIndex +\EnableCrossrefs +\RecordChanges +%\OnlyDescription +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +% +% +% \fi +% +% ^^A ------------------------------------------------------------------------- +%\GeneralChanges* +%\changes{v1.0}{2004/09/11}{Initial version} +%\changes{v2.0}{2006/12/29}{new package \letterspace: a stripped-down version, +% containing the letterspacing commands only} +%\GeneralChanges{Documentation} +%\changes{v1.9b}{2006/01/13}{activate expansion in the distributed } +%\changes{v2.2}{2007/04/01}{logo transparency and amusement} +% ^^A Adobe Reader 8.0 had serious bugs with transparency. Fixed in 8.1. +% +% \GetFileInfo{microtype.dtx} +% \title{\ifx\printlogo\undefined\else\printlogo\fi +% \textls{Das \microtype\ Paket}\\[.3\baselineskip]\large +% Eine Schnittstelle für die mikrotypographischen Erweiterungen von \pdftex} +% \author{R Schlicht\\\mailtoRS} +% \date{\fileversion\\\filedate} +% +% \maketitle \thispagestyle{empty} +% +%\begin{abstract} +%\noindent +% Das \microtype\ Paket stellt eine \LaTeX\ Schnittstelle für die mikrotypographischen +% Erweiterungen von \pdftex bereit: besonders markant Zeichenvorsprünge und Fontexpansion, +% weiterhin die Justierung von Zeichenabständen innerhalb Wörter und zusätzliches Kerning sowie +% durch Bindestrich trennbaren Sperrsatz (Tracking) und die Möglichkeit, alle oder ausgewählte +% Ligaturen abzuschalten. +% Es erlaubt, diese Features auf anpassbare Fonts anzuwenden und alle mikrotypographischen Aspekte +% dieser Fonts in einer einfachen und flexiblen Art und Weise zu konfigurieren. Einstellungen +% für verschiedene Schriftarten werden bereitgestellt.\footnote{ +% Zur Zeit stellt dieses Paket Protrusionseinstellungen für Computer Modern +% Roman, Palatino, Times, Garamond, Adobe Garamond und Minion, +% Bitstream Charter und Letter Gothic, die Symbole und Euler Fonts, +% verschiedene Eurosymbol Schriftarten, sowie einige allgemeine Einstellungen für unbekannte Schriftarten +% (siehe~Tabelle~\ref{tab:fonts} auf Seite~\pageref{tab:fonts}) bereit. +% Beisteuerungen sind gern gesehen.} +% +% Zu beachten ist, dass Fontexpansion und Zeichenvorsprünge nur mit +% \pdftex ($\geq$ Version 0.14f) arbeiten. Automatische Fontexpansion erfordert mindestens +% Version 1.20 oder neuer. Ligaturen zu deaktivieren erfordert \pdftex\ 1.30, Sperrsatz und +% die Justierung von Zeichenabständen innerhalb Wörter sowie Kerning erfordern Version 1.40. Das +% Paket aktiviert standardmäßig Protrusion und Expansion, falls sicher angenommen werden kann, dass diese +% funktionieren. Diese beiden Features sind ebenso verfügbar mit \luatex. Das +% \microtype\ Paket arbeitet nicht mit \xetex. +% +% Das alternative Paket \letterspace, welches ebenso mit einfachem \TeX arbeitet, +% stellt nur die Befehle für Sperrsatz (Letter-spacing) bereit, und lässt Support für alle +% anderen Erweiterungen aus (siehe Abschnitt~\ref{sec:lettersp}). +% +%\bigskip\noindent +% Dieses Paket ist urheberrechtlich geschützt \textcopyright\ 2004\kern.09em--2010 R Schlicht. +% Es darf vertrieben und/oder modifiziert werden unter den Bedingungen der +% \IfFileExists{lppl.tex}{\hyperref[LPPL:LPPL]}{\href{http://www.latex-project.org/lppl/}} +% {\LaTeX\ Project Public License}, +% entweder Version~1.3c dieser Lizenz oder alternativ jeder späteren Version. +% Das Projekt hat den Wartungsstatus `author-maintained'. +%\end{abstract} +% +% +%\newpage +%\emptypdfpageresources ^^A layers of the logo +%\tableofcontents +%\listoftables +% +% +%\newpage +%\section{Mikrotypographie mit \pdftex}\label{sec:micro-type} +% +% \pdftex, die \TeX\ Erweiterung geschrieben von \thanh, führt eine Reihe +% mikrotypographischer Features ein. welche es nicht nur zum Werkzeug der Wahl +% für die Erstellung elektronischer Dokumente, sondern auch Werke überragender, altehrwürdiger +% Typographie machen: am bedeutendsten \textit{Zeichenvorsprünge (Character Protrusion, auch bekannt als margin kerning)} +% und\textit{Fontexpansion}. \thanh s Thesis zitierend: +% +%\changes{v1.9b}{2006/01/13}{add samples of micro-typographic features} +%\microtypesample{\small +% `Margin kerning bezeichnet die Justierung der Zeichen an den Rändern (margin) eines +% gesetzten Textes. Eine vereinfachte Anwendung von Margin kerning ist hängende +% Zeichensetzung. Margin kerning ist notwendig für optische Ausrichtung der Ränder +% eines gesetzten Textes, weil mechanisches Angleichen der Ränder diese eher stümperhaft +% aussehen lässt. Einige Zeichen können eine Zeile für das menschliche Auge kürzer +% erscheinen lassen als andere. Solche Zeichen um einen passenden Betrag zu den Rändern zu +% verschieben würde das Aussehen des Textes massiv verbessern. +% +% Mit Fontexpansion zu verfassen ist die Methode, eine weitere oder engere +% Variante des Fonts zu erschaffen, welche die Wortzwischenräume mehr ausgleichen. +% Eine Schriftart in einer losen Zeile kann durch eine weitere Variante ausgetauscht werden, sodass die Wortzwischenräume +% weniger stark gestreckt werden. Gleichermaßen kann ein Font in einer dicht bepackten Zeile +% durch eine schmalern Variante ersetzt werden, um die Abstände zu verringern. +% Es besteht mit Sicherheit die potentielle Gefahr der Fontdeformierung wenn +% solche Manipulationen vorgenommen werden, weshalb sie mit extremer Vorsicht vorgenommen +% werden müssen. Das Potential, eine Zeilebreite mittels Fontexpansion zu justieren, +% sollte bedacht werden, wenn ein Paragraph in Zeilen zerbrochen wird, +% um bessere Stopppunkte zu wählen.' [\cite[p.~323]{ThanhThesis}]} ~\\ +% +% Diesen beiden Features fehlte seit einiger Zeit eine einfache \LaTeX\ Benutzerschnittstelle. +% Dann wurde das \cite{pdfcprot} Paket veröffentlicht, welches +% \LaTeX\ Benutzern ermöglichte, Zeichenvorsprünge zu benutzen, ohne sich zu sehr +% mit den Interna beschäftigen zu müssen. +% +% Fontexpansion allerdings war weiterhin schwierig zu utilisieren, da es erforderte, +% dass die Fontmetriken für alle Ebenen der Erweiterung verfügbar waren. +% Deswegen musste jeder, der von diesem Feature Gebrauch machen wollte, im Vorfeld +% multiple Ausführungen der Schriftarten anfertigen. Shellskripte, um den Benutzer wenigstens +% teilweise von dieser Last zu befreien, waren verfügbar~-- dennoch blieb es eine lästige Arbeit. +% Darüber hinaus mussten alle Fonts weiterhin physisch erstellt werden, wodurch Kompilierungszeit +% und Speicherplatz auf der Festplatte verschwendet wurden. +% +% Im Sommer 2004 implementierte \thanh\ eine Besonderheit, welche sich als eine +% bedeutende Erleichterung für \TeX\ und \LaTeX\ Benutzer entpuppte: Fontexpansion kann nun +% automatisch stattfinden. Das heißt, \pdftex\ braucht nicht länger die Fontmetriken der expandierten +% Schriftart, sondern berechnet diese zur Laufzeit und komplett im Speicher. +% +%\bigskip\noindent +% Nach diesem großen Sprung in der Anwendbarkeit stoppte die Entwicklung nicht. +% Im Gegenteil, \pdftex\ wurde mit immer mehr besonderen Merkmalen ausgestattet: Version +% 1.30 führte die Möglichkeit ein, \emph{alle Ligaturen auszuschalten}, Version 1.40 +% brachte ein robustes \emph{Letter-spacing} Kommando, die Möglichkeit +% \emph{zusätzliches Zeichen Kerning} zu spezifizieren und die \emph{Justierung von Zeichenabständen innerhalb Wörter}. +% +% Robustes und per Bindestrich trennbares \emph{Letter-spacing (Tracking)} war immer +% extrem schwierig in \TeX zu realisieren. Obwohl das \cite{soul} Paket +% große Mühen unternahm um es möglich zu machen, konnte es trotzdem weiterhin in +% bestimmten Situationen scheitern; allein das Tracking einer Schriftart für das ganze +% Dokument blieb unmöglich. Wendet man die neue Erweiterung von \pdftex an, stellt dies +% nicht länger ein Problem dar. Das \microtype\ Paket stellt die Möglichkeit bereit, +% das Tracking anpassbarer Fontsets zu ändern, z.B., alle kleinen Kapitälchen. +% Es führt außerdem die zwei neuen Kommandos \cs{textls} und \cs{lsstyle} +% für ad-hoc Letter-spacing ein, welche wie normale Textkommandos benutzt werden können. +% Beachten Sie, dass Letter-spacing nur im Modus funktioniert. +% +% \emph{Zusätzliches kerning} für Zeichen einer Schriftart einzustellen ist besonders +% nützliche für Sprachen, deren typographische Tradition es erfordert, bestimmte Zeichen +% durch ein Leerzeichen abzutrennen. Es ist zum Beispiel üblich, in französischer +% Typographie ein wenig Platz vor einem Fragezeichen, Ausrufezeichen und Semikolon zu lassen, +% und ein wenig mehr Platz vorm Doppelpunkt und den Guillemets. Bis jetzt konnte das nur +% erreicht werden, indem man diese Zeichen aktivierte (z.B. +% mit dem \pkg{babel} Paket), was nicht immer eine praxistaugliche Lösung sein kann. +% Im Kontrast zum Standard Kerning, welches in die Schriftarten eingebaut ist +% (und welches natürlich wie üblich greift), basiert dieses Kerning auf einzelnen Zeichen +% nicht auf Zeichenpaaren. +% +% \emph{Wortzwischenräume zu justieren} basiert auf der Idee, dass - um eine +% uniforme Grauheit in einem Text zu erreichen - die Wortzwischenräume auch von den +% Zeichen in der direkten Umgebung abhängen sollten. Wenn zum Beispiel ein Wort mit +% einem `r' endet, sollte der folgende Abstand ein kleines bisschen kleiner sein als z.B. nach +% einem `m'. Man kann von diesem Konzept wie von einer Erweiterung von \TeX s `space +% factors' denken. Allerdings, während space factors alle drei Parameter dieser +% Wortzwischenräume (oder Haftung) um den selben Betrag beeinflusst~-- das Kerning, den maximalen +% Betrag, um den der Zwischenraum gestreckt oder geschrumpft werden kann +% ~-- stellt \pdftex\ die Möglichkeit bereit, diese Parameter unabhängig voneinander +% zu modifizieren. Darüber hinaus können die Werte für jeden Font anders eingestellt werden. +% Außerdem -- und vielleicht am wichtigsten -- können diese Parameter nicht nur erhöht sondern +% auch erniedrigt werden. Dieses Merkmal wird das Aussehen von Paragraphen vielleicht noch +% mehr aufwerten. +% Die Betonung liegt im letzten Satz auf dem Wort `vielleicht': diese Erweiterung ist immer +% noch sehr experimentell -- speziell haben nur die letzten Zeichen im Moment Einfluss auf die Wortzwischenräume. +% Außerdem sind die mit \microtype\ gelieferten Einstellungen nicht mehr als eine erste Annäherung, +% weshalb ich es begrüßen würde, wenn Sie Korrekturen und Verbesserungen vornehmen. +% Ich würde vorschlagen, die Begründung für die Einstellungen in Abschnitt~\ref{sub:conf-spacing} durchzulesen. +% +% Abschließend mag die Möglichkeit, für einen Font \emph{alle Ligaturen auszuschalten}, +% nützlich für Schreibmaschinenschriftarten sein. +% +%\emptypdfpageresources ^^A layers of the sample +%\bigskip\noindent +% Das \microtype\ Paket stellt für all diese mikrotypographischen +% Erweiterungen eine Schnittstelle bereit. Alle mikrotypographischen Aspekte können individuell und einfach angepasst werden. +% Die nächsten Kapitel werden einen Abriss aller Optionen und Anpassungsmöglichkeiten präsentieren. +% +% +%\section{Loslegen} +% +% Es gibt keine Überraschungen beim Laden des Paketes: +%\begin{verbatim}[morekeywords={[1]{microtype}}] +%\usepackage{microtype} +%\end{verbatim} +% In den meisten Fällen ist das ausreichend, und falls Sie nicht an der Feinabstimmung +% des mikrotypographischen Aussehens ihres Dokumentes (was unwahrscheinlich erscheint +% da Sie dieses Paket benutzen, was ihr Interesse an typographischen Problemen bestätigt) +% interessiert sind, können Sie den Rest dieses Dokumentes auslassen. +%^^A +% Falls Sie dies andererseits nicht befriedigt -- sei es aus theoretischen oder praktischen Gründen +% -- wird Sie dieses Handbuch auf den Weg zu den erwünschten Ergebnissen und folgenden +% Meilensteinen bringen: +% +%\changes{v2.2}{2007/06/06}{add overview} +%\begin{itemize} +% \item Das entsprechende mikrotypograpische Feature einschalten, entweder +% mittels der respektiven package Option oder mittels des \cs{microtypesetup} Kommandos +% (Abschnitt~\ref{sec:options}). +% \item Wählen Sie die Schriftarten aus, auf welche dieses Feature angwendet werden soll, indem +% Sie `Font Sets' deklarieren und aktivieren. Einige Sets sind vorerstellt und können direkt +% in den Paketoptionen aktiviert werden +% (Abschnitt~\ref{sec:font-sets}). +% \item Feinabstimmen der mikrotypographischen Einstellungen an den Schriftarten oder Sets von Schriftarten +% (Abschnitt~\ref{sec:fine-tuning}). +% \item Falls sie der Typ sind, der immer weiter marschiert, werden +% Sie sicher an der Möglichkeit zu Context-abhängigen Einstellungen interessiert sein +% (Abschnitt~\ref{sec:context}). +% \item Wir ermutigen Sie sogar, den Pfad typographischer Tugend zu verlassen +% und ein paar Schafe zu stehlen (section~\ref{sec:lettersp}) oder auf andere Weise einzudringen +% (section~\ref{sec:disable-ligatures}). +% \item Sollten sich Ihnen ein Hindernis auftun, folgen Sie den Tipps und Warnungen +% (Abschnitt~\ref{sec:caveats}). +%\end{itemize} +% +% +%\section{Optionen}\label{sec:options} +% +% Wie viele andere \LaTeX\ Pakete auch akzeptiert das \microtype\ Paket Optionen +% über die bekannte |Schlüssel=Wert| Syntax. Im Folgenden finden sie eine Beschreibung aller +% \key{Schlüssel} und ihrer möglichen |Werte| +% (`|true|' kann ausgelassen werden; multiple Werte (falls erlaubt) müssen eingeklammert +% werden; der Standardwert wirds rechts gezeigt, angeführt von einem Sternchen +% falls es abhängig von der \pdftex\ Version und/oder dem Output Modus ist). +% +% +%\subsection{Die mikro-typographischen Features anschalten}\label{sub:options-microtype} +% +%\Describe{Option}{protrusion} +% {*true,false,compatibility,nocompatibility,:Name des Font Sets} +%\DescribeOption{expansion} +% Dies sind die hauptsächlichen Optionen um die Ebene mikro-typographischer Verfeinerung, +% welche die Schriftarten in ihrem Dokument erhalten sollten, zu kontrollieren. +% Standardmäßig ist das Paket recht gierig; Character Protrusion ist aktiviert, Fontexpansion +% wird nur in Situationen abgeschaltet, in denen \pdftex\ die Fonts nicht automatisch expandieren +% kann, also falls es entweder zu alt ist (Versionen vor 1.20) +% oder falls der Output Modus ist (siehe Abschnitt~\ref{sub:options-misc}). +% Anders gesagt wird \microtype\ versuchen, soviel Mikrotypographie anzuschalten wie +% es sicher als funktionierend unter den gegebenen Bedingungen erwarten kann +% (und normalerweise ist es nicht nötig, das Paket mit anderen Optionen für die +% bzw. Modi zu laden). +% +% Protrusion und Expansion können getrennt (de)aktiviert werden, indem man den betreffenden +% Schlüssel auf |true| bzw. |false| setzt. Die +% \opt{activate} Option +%\DescribeOption{activate} +% kürzt das Setzen beider Optionen zur gleichen Zeit ab. Deswegen haben die folgenden Zeilen +% alle denselben Effekt (wenn man Dateien mit einer aktuellen Version +% von \pdftex erstellt): +%\begin{verbatim} +%\usepackage[protrusion=true,expansion]{microtype} +%\end{verbatim} +%\begin{verbatim} +%\usepackage[activate={true,nocompatibility}]{microtype} +%\end{verbatim} +%\begin{verbatim} +%\usepackage{microtype} +%\end{verbatim} +%\smallskip +% Wenn \pdftex\ Fontexpansion und Character Protrusion verwendet, können Zeilenumbrüche +% (und konsequenterweise auch Seitenumbrüche) unterschiedlich ausfallen. Wenn das nicht gewünscht ist +% -- weil sie z.B. ein Buch neu setzen, dessen Seitenumbrüche sich nicht ändern dürfen -- +% können Sie den Wert |compatibility| an die \opt{protrusion} +% und/oder \opt{expansion} Optionen hängen. Aus typographischer Sicht jedoch werden die Ergebnisse +% suboptimal sein, weshalb der Wert standardmäßig |nocompatibility| ist. +% +% Abschließend können Sie auch den Namen eines Font Sets angeben, auf welches +% Character Protrusion und/oder Fontexpansion beschränkt werden sollten, siehe auch +% Abschnitt~\ref{sec:font-sets} für eine detaillierte Beschreibung. Spezifizieren eines Font Sets +% für ein Features aktiviert dieses Features implizit mit. +% +%\medskip +%\Describe{Option}{tracking}{true,!false,:font set name} +%\DescribeOption{kerning} +%\DescribeOption{spacing} +% Es existiert keine Kompatibilitätsebene für die neuen Erweiterungen Tracking, +% zusätzliches Kerning und Wortzwischenräume (interword spacing). Deshalb können sie nur an- +% oder ausgeschaltet werden, oder sie können aktiviert werden indem man einen Setnamen an die +% Option leitet. Standardmäßig ist keines der Features angeschaltet. +% +%\begin{table}\small +%\changes{v2.3a}{2008/02/25}{add table of available and enabled features} +%\caption{Verfügbarkeit mikro-typographischer Features}\label{tab:available-features} +%\catcode`\!=13 \def!{\textcolor{thegreen}{\hskip.9em $\bigstar$}} +%\catcode`\?=13 \def?{\textcolor{theblue} {\hskip 1em $\boxtimes$}} +%\catcode`\_=13 \def_{\textcolor{thered} {\hskip 1em $\varnothing$}} +%\setlength\fboxsep{4pt} +%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax +%\fcolorbox{theframe}{white}{^^A +%\begin{minipage}{\textwidth} +%\def\arraystretch{1.2} +%\begin{tabular}{*3{@{}L{40pt}}*2{@{}L{43pt}}*4{@{}L{37pt}}@{}} +% \multicolumn{3}{@{}l}{\footnotesize \TeX\ engine} +% & \multicolumn{6}{@{}l}{\footnotesize Mikrotypographische Features}\\ +%\cmidrule(r){1-3}\cmidrule{4-9} +% \footnotesize Engine +% & \footnotesize Version +% & \footnotesize Output +% & \footnotesize Protrusion +% & \footnotesize Expansion +% & \footnotesize (= auto) +% & \footnotesize Kerning +% & \footnotesize Spacing +% & \footnotesize Tracking\\ +%\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4} +%\cmidrule(r){5-5}\cmidrule(r){6-6}\cmidrule(r){7-7}\cmidrule(r){8-8}\cmidrule{9-9} +% \pdftex +% & $\less$ 0.14f & / & _ & _ & _ & _ & _ & _\\ +% & $\geq$ 0.14f & / & ! & ? & _ & _ & _ & _\\ +% & $\geq$ 1.20 & & ! & ? & _ & _ & _ & _\\ +% & & & ! & ! & ! & _ & _ & _\\ +% & $\geq$ 1.40 & & ! & ? & _ & ? & ? & _\\ +% & & & ! & ! & ! & ? & ? & ?\,\textsuperscript{\itshape a}\\ +% \luatex ^^A we will have to re-model kerning, spacing and tracking with \luatex: +% & $\geq$ 0.25 & & ! & ? & _ & _ & _ & _\\ +% & & & ! & ! & ! & _ & _ & _\\ +%\bottomrule +%\end{tabular}^^A +%\vskip4pt\footnotesize +%\hskip-.8em +% ! = aktiviert\quad +% ? = nicht aktiviert\quad +% _ = nicht verfügbar +%\hfill +% \textit{a}\quad $\geq$ 1.40.4 empfohlen +%\vskip3pt +%\end{minipage}^^A +%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox +%\end{table} +% +%\medskip\noindent +% In Tabelle~\ref{tab:available-features} erhalten Sie einen Überblick über die verfügbaren +% und standardmäßig aktivierten mikro-typographischen Features für die +% relevanten \pdftex\ Versionen und Output Modi. +% +%\medskip\noindent +% Ob Ligaturen deaktiviert werden sollten kann nicht mittels einer Option kontrolliert werden, +% sondern per \cs{DisableLigatures} Kommando, welches in +% Abschnitt~\ref{sec:disable-ligatures} erklärt wird. +% +% +%\subsection{Zeichenvorsprünge}\label{sub:options-protrusion} +% +%\Describe{Option}{factor}{:integer}[1000] +% Benutzen Sie diese Option, um global einzustellen, um welchen Betrag die Zeichen +% hervorragen sollen. Während ein Wert von 1000 bedeutet, dass der volle Vorsprung +% wie in der Konfiguration (siehe Abschnitt~\ref{sub:protrusion}) spezifiziert benutzt wird, +% bedeutet ein Wert von 500 entsprechend die Halbierung der Protrusion. +% Dies kann nützlich sein, falls Sie grundsätzlich zufrieden mit den Einstellungen sind, +% aber bevorzugen, wenn die Zeichenhervorragungen weniger oder mehr zu sehen sind. +% (z.B. wenn sie so stolz darauf sind, dieses Feature nutzen zu können, dass sie es jedem +% zeigen wollen, oder -- um eine Motivation zu nennen, die in Einverständnis mit typographischer +% Korrektheit steht -- falls sie eine große Schriftart nutzen, die gemäßigtere Vorsprünge verlangt). +% +%\medskip +%\Describe{Option}{unit}{!character,:dimension} +% Diese Option wird in Abschnitt~\ref{sub:protrusion} erklärt, ebenso das Kommando +% \cs{SetProtrusion}. Seien sie vorsichtig bei Benutzung dieser Optionen! +% +% +%\subsection{Fontexpansion}\label{sub:options-expansion} +% +%\Describe{Option}{auto}{*true,false} +% Wie bereits im Kapitel~\ref{sec:micro-type} angemerkt, können die expandierten Versionen +% der Fonts automatisch erstellt werden. Diese Option ist standardmäßig an, wenn +% \pdftex Version 1.20 oder höher beträgt und der Output Modus ist; +% ansonsten ist die Option deaktiviert. +% Falls \opt{auto} auf false gesetzt ist, müssen die einzelnen Fonts aller Expansionsstufen +% bereits existieren (mit nach dem Schema \meta{font~name}\texttt{\textpm}\meta{expansion value} benannten Dateien, +% z.B. \file{cmr12+10}, wie beschrieben in \cite{pdftexman}). +%\iffalse ^^A no longer true (1.40?) +% Falls expandierte Instanzen der Fonts verfügbar sind, werden sie verwendet, +% egal ob \opt{auto} auf true oder false gesetzt ist. +%\fi +% +%\changes{v1.9}{2005/08/27}{add remark about Type\,1 fonts required for +% automatic font expansion} +% Automatische Fontexpansion funktioniert nicht mit Bitmap Fonts, weswegen Sie, falls Sie +% die Computer Modern Roman Fonts in Kodierung\footnote{ +% Beiläufig bemerkt, Type\,1 Format und Encoding hängen in keiner +% Weise miteinander zusammen, abgesehen davon, dass beide mit einem `T' anfangen und mit einer `1' enden.}, +% nutzen, entweder \pkg{cm-super} Fonts installieren oder die Latin Modern +% Fonts (package \pkg{lmodern}) benutzen sollten. +% +%\medskip +%\Describe{Option}{stretch}{:integer}[20] +%\DescribeOption{shrink} +% Sie können bestimmen, wie sehr ein Font maximal gestreckt bzw. geschrumpft werden kann. +% Die Zahl wird durch 1000 dividiert, sodass ein Stretch Limit von 10 bedeutet, +% dass ein Font um bis zu ~1\% expandiert werden kann. +% Das standardmäßige Stretch Limit ist 20; das Shrink Limit ist standardmäßig gleich +% dem Stretch Limit. +% +%\medskip +%\Describe{Option}{step}{:integer}[\MaybeDefault{1}] +% Fonts werden nicht um beliebige Mengen expandiert, sondern nur um gewisse bestimmte +% Schritte innerhalb der Expansionslimits.Mit aktuellen Version von \pdftex\ (1.40 oder +% neuer) ist diese Option standardmäßig auf 1 gesetzt, damit \pdftex\ die +% maximale Anzahl an Instanzen der jeweiligen Fonts ausprobieren kann und somit den bestmöglichen +% Output garantiert.\footnote{ +% Die Kehrseite an dieser Standardeinstellung ist, dass \pdftex\ vielleicht bei großen Dokumenten +% nicht genügend Speicher zur Verfügung hat; in diesem Falle sollten Sie über die Fehlermeldungen in der `Hints +% and caveats' Abschnitt~(\ref{sec:caveats}) nachlesen oder es mit einem größeren \opt{step} probieren.} +% Ältere \pdftex\ Versionen jedoch mussten jede einzelne Fontinstanz in der +% Datei einfügen, wodurch die Dateigröße teils dramatisch erhöht wurde. Deswegen -- +% sollten Sie eine pre-1.40 \pdftex\ Version nutzen -- ist \opt{step} standardmäßig +% auf ein Fünftel des kleineren Wertes von \opt{stretch} und \opt{shrink} gesetzt. +% +%\medskip +%\Describe{Option}{selected}{true,!false} +% Wenn Fontexpansion angewendet wird ist es möglich, die Expansion einiger sensibler Zeichen, +% welche schnell deformiert erscheinen können (z.B. das `O' im Kontrast zum `I'), zu begrenzen. +% Das nennt sich \emph{selected expansion} und seine Benutzung erlaubt, die Stretch und Shrink +% Limits zu erhöhen (auf z.B. 30 anstelle von 20); allerdings ist der Zuwachs limitiert, da +% gleichzeitig die durchschnittliche Stretch Varianz verringert wird +% Deswegen ist diese Option standardmäßig auf +% |false| gesetzt, sodass alle Zeichen um denselben Betrag expandiert werden. +% Siehe Abschnitt~\ref{sub:expansion} für eine detailliertere Beschreibung. +% +% +%\subsection{Tracking/Letterspacing}\label{sub:option-tracking} +% +%\Describe{Option}{letterspace}{:integer}[100] +% Diese Option verändert den Standardbetrag fürs Tracking (siehe Abschnitt~\ref{sub:tracking}) +% sowie Letterspacing (siehe Abschnitt~\ref{sec:lettersp}). Der Betrag wird in Tausendsteln +% von 1\,em angegeben; zulässige Werte sind im Bereich von \textminus1000 +% bis +1000. +% +% +%\subsection{Verschiedene Optionen}\label{sub:options-misc} +% +%\Describe{Option}{DVIoutput}{true,*false} +% \pdftex\ ist nicht bloß in der Lage, Dateien zu erstellen, sondern kann auch +% Dateien erzeugen.\footnote{ +% Neuere \TeX\ Systeme benutzen \pdftex\ als Standard Engine auch für +% Ausgaben.} +% Letztere können mit der Option \opt{DVIoutput} erzwungen werden, was +% \cmd\pdfoutput\ auf Null setzt. +% +%\changes{v1.5}{2004/12/15}{add note about \opt{DVIoutput} option} +% Beachten Sie, dass dies Pakete verwirren wird, die auf den Wert von +% \cmd\pdfoutput\ angewiesen sind, falls diese früher geladen wurden; so erwarten sie, +% dass sie aufgerufen wurden um eine Ausgabe zu erzeugen, obwohl das nicht der Fall ist. +% Diese Pakete sind u.a.: \pkg{graphics}, \pkg{color}, +% \pkg{hyperref}, \pkg{pstricks} und natürlich \pkg{ifpdf}. Entweder laden sie diese Pakete nach +% \microtype\ oder benutzen die Anweisung |\pdfoutput=0| früher +% -- in letzterem Fall ist die \opt{DVIoutput} Option redundant. +% +% Wenn man Dateien erstellt, muss Fontexpansion explizit aktiviert werden. +% Weder Letterspacing noch \emph{automatische} Fontexpansion werden funktionieren, da +% die postprocessing Treiber (|dvips|, |dvipdfm| etc.) sowie die Betrachter +% nicht in der Lage sind, die Fonts on the fly zu generieren. +% +%\changes{v2.0}{2006/11/28}{add remark about `\opt{draft}' option disabling \microtype\ +% (noted by \contributor Michalis Miatidis )} +% ^^A private mail, 2006/11/26 +%\medskip +%\Describe{Option}{draft}{true,!false} +%\DescribeOption{final} +% Falls die \opt{draft} Option an das Paket geleitet wird, werden \emph{alle +% mikro-typographischen Erweiterungen ausgeschaltet}, was zu unterschiedlichen Zeilen- +% und somit Seitenumbrüchen führen kann. Die \opt{draft} und \opt{final} Optionen können +% außerdem von den Optionen der Klasse geerbt werden; natürlich kann man diese mit den +% Optionen der Pakete überschreiben. Falls man z.B. die Klassenoption |draft| verwendet, um +% jegliche übervollen Boxen anzuzeigen, sollte man \microtype\ mit der |final| +% Option laden. +% +%\medskip +%\Describe{Option}{verbose}{true,!false,errors,silent} +% Informationen bzgl. der Einstellungen an jeglichen Fonts werden in die Log Datei +% geschrieben, sofern man die \opt{verbose} Option aktiviert. Wenn \microtype\ auf ein nicht-fatales Problem trifft +% (z.B. ein unbekanntes Zeichen in den Einstellungen oder nicht-existente Einstellungen), +% gibt es standardmäßig nur eine Warnung aus und versucht weiterzumachen. +% Lädt man das Paket mit |verbose=errors| werden alle Warnungen in Fehler verwandelt, sodass +% man sicher sein kann, dass kein Problem unerkannt bleibt. Falls man +% andererseits allen Warnungen nachgegangen ist und sich entscheidet, diese zu ignorieren, +% kann man \microtype\ mittels |verbose=silent| zum Schweigen bringen. +% +%\medskip +%\Describe{Option}{babel}{true,!false} +% Das Paket mit der \opt{babel} Option zu laden wird die Zeichensetzung +% der jeweiligen ausgewählten Sprache anpassen. Mehr Information hierzu in Abschnitt~\ref{sec:context}. +% +%\medskip +%\Describe{Option}{config}{:file name}[microtype] +% Verschiedene Einstellungen für dieses Paket werden aus einer Hauptkonfigurationsdatei geladen, +% standardmäßig ist dies \file{microtype.cfg} (siehe Abschnitt~\ref{sub:config-file}). +% Sie können eine andere Konfigurationsdatei wählen, indem sie deren Name +% mittels \emph{ohne die Dateiendung} angeben, z.B. |config=mycrotype|. +% +%\iffalse ^^A ... waiting for bug reports before documenting yet another option ... +%\medskip +%\Describe{Option}{defersetup}{!true,false} +% Anders als in früheren Versionen verzögert \microtype\ seit Version 1.9a sein +% Setup bis zum Ende der Präambel. Dies hat mindestens 2 Vorteile: Das unten +% beschriebene Kommando \cs{microtypesetup} kann genutzt werden um Paketoptionen später +% zu ändern und es ist nicht länger notwendig, die Standardfonts und Enkodierungen +% noch vor \microtype zu laden. Es gibt nur ein mögliches Problem: Falls eine Box +% innerhalb der Präambel konstruiert wird \emph{und} diese Box eine Schriftart enthält, +% die nicht geladen wird bevor die Box im Dokument verwendet wird, so wird diese Schriftart +% nicht eingerichtet. Sollte dieser extrem unwahrscheinliche Fall auftreten, sollten Sie +% |defersetup=false| setzen. Dann greifen jedoch die angesprochenen Restriktionen. +% +%\medskip +%\Describe{Option}{copyfonts}{true,!false} ^^A and another one ... +% There are some restrictions as to what \pdftex\ can do with a font: Firstly, +% it cannot expand a single font with different parameters, secondly, it cannot +% apply different protrusion settings to one font within the same paragraph. +% Both restrictions, which only matter with a context-sensitive setup +% (cf.~section~\ref{sec:context}), can be circumvented with the \opt{copyfonts} +% option: when it is set to |true|, \microtype\ will use font copies to work +% on. This option will automatically be set to |true|, whenever protrusion or +% expansion settings with a |context| keyword are encountered. If these +% settings are loaded after the preamble, however, it is too late, and you +% should set the \opt{copyfonts} option manually. +% This only works with \pdftex\ 1.40.4 or later. +%\fi +% +% +%\ifcmr\else\pagebreak\markright{}\fi ^^A layout +%\subsection{Changing options later}\label{sub:options-cmd} +% +%\Describe{Macro}{\microtypesetup}{key\,|=|\,value list} +% Innerhalb der Präambel akzeptiert dieses Kommando alle oben genannten Paketoptionen +% (außer |config|). +% Im Dokumentkörper kann dieser Aufruf verwendet werden, um grundlegende Einstellungen +% der mikro-typographischen Erweiterungen zu verändern. Es akzeptiert dann alle Optionen aus +% Abschnitt~\ref{sub:options-microtype}: \key{expansion}, \key{protrusion} und +% \key{activate}, welche wiederum die Werte |true|, |false|, +% |compatibility| oder |nocompatibility| erhalten können, \key{tracking}, \key{kerning} und +% \key{spacing} mit den zulässigen Werten |true| oder |false|. +% Den Namen eines Fonts an die Option zu leiten ist nicht erlaubt. +% Benutzt man dieses Kommando, so könnte man z.B. temporär Fontexpansion ausschalten +% indem man wie folgt verfährt: +%\begin{verbatim} +%\microtypesetup{expansion=false} +%\end{verbatim} +% +% +%\section{Fonts für Mikrotypographie auswählen}\label{sec:font-sets} +% +% Standardmäßig wird Character Protrusion auf alle Textschriftarten angewandt, die +% im Dokument genutzt werden, und eine grundlegende Auswahl an Fonts wird Fontexpansion +% unterzogen. Sie wollen vielleicht anpassen, welche Schriftarten den Vorzug bekommen sollten, +% mikro-typographisch behandelt zu werden. Dies kann geschehen, indem man +% `Font Sets' deklariert und auswählt; diese Font Sets werden mittels Font Attributen spezifiziert, +% die zutreffen müssen. +% +%\medskip +%\Describe{Macro}{\DeclareMicrotypeSet}{?features,set name,set of fonts} +%\DescribeMacro{\DeclareMicrotypeSet*} +% Dieses Kommando deklariert ein neues Font Set, auf welches die the mikro-typographischen +% Erweiterungen angewendet werden. Das optionale Argument kann eine mit Komma separierte +% Liste von Features enthalten, auf die das jeweilige Set beschränkt werden soll. +% Die mit Stern versehene Variante deklariert \emph{und} aktiviert das Font Set +% gleichzeitig. +% +% \paragraph{Das Font Set} wird durch den Font Attributen zugewiesene Werte definiert: +% Kodierung, Familie, Serie, Form und Größe (siehe auch~\cite{fntguide}). +% Wir fangen mit einem Beispiel an. Dieses Paket definiert einen Font namens +% `|basictext|' in der Hauptkonfigurationsdatei wie folgt: +%\begin{verbatim} +%\DeclareMicrotypeSet{basictext} +% { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5}, +% family = {rm*,sf*}, +% series = {md*}, +% size = {normalsize,footnotesize,small,large} +% } +%\end{verbatim} +% Wenn Sie nun +%\begin{verbatim}[deletekeywords={[1]{protrusion}}] +%\UseMicrotypeSet[protrusion]{basictext} +%\end{verbatim} +% in der Präambel des Dokuments aufrufen, werden nur Fonts mit den Kodierungen , , +% , , , oder aus Roman oder Sans Serif Familien, normalen (oder +% `medium') Serien und in per \cmd\normalsize, \cmd\footnotesize, \cmd\small\ oder \cmd\large +% aufgerufenen Größen hervorragen. Mathematische Schriftarten andererseits +% werden das nicht, da sie anderen Kodierungen angehören; gleiches gilt für +% fettgedruckte oder große Schriftarten etc. +% +% Falls eine Attributsliste leer ist oder fehlt -- wie das `shape' Attribut +% im obigen Beispiel -- führt dies zu keiner Einschränkung, sprich, es ist äquivalent dazu +% \emph{alle} möglichen Werte für dieses Attribut einzusetzen. +% Deswegen ist das vordefinierte Set `|alltext|', welches wie folgt deklariert ist: +%\begin{verbatim} +%\DeclareMicrotypeSet{alltext} +% { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1} } +%\end{verbatim} +% viel weniger restriktiv. Die einzige Bedingung lautet, dass die Kodierung stimmen muss. +% +% Folgt einem Wert ein Asterisk (wie `|rm*|' und `|sf*|' im ersten Beispiel), +% kennzeichnet dieser keinen Code, sondern wird in das +% |\|\meta{value}|default| des Dokuments übersetzt, z.B. \cmd\rmdefault.\footnote{ +% Diese Übersetzungen geschehen zum \cmd\AtBeginDocument, was bedeutet, dass +% Änderungen an den Standardwerten innerhalb der Präambel auch berücksichtigt werden. +% Nur falls Font Standards \cmd\AtBeginDocument\ vom Benutzer selbst geändert werden, +% müssen Sie \microtype\ nach diesen Änderungen laden.} +% Ein einzelner Asterisk bedeutet |\|\meta{attribute}|default|, z.B. +% \cmd\encodingdefault, gleichermaßen \cmd\normalsize\ für die Größenachse. +% Größen können entweder als Dimension angegeben werden (`|10|' oder `|10pt|') oder +% als Größenwahlkommando \emph{ohne} den Backslash. Sie können sogar Bereiche +% (z.B. `|small-Large|') wählen; während die untere Grenze im Bereich enthalten ist, gilt +% dies nicht für die obere Grenze. Deshalb würde `|12-16|' beispielsweise 12\,pt, +% 13.5\,pt und 15.999\,pt enthalten, aber nicht 16\,pt. Es ist nicht erlaubt, die untere +% oder obere Grenze auszulassen (`|-10|', `|large-|'). +% +% Zusätzlich zu diesem Deklarationsschema können sie einzelne Schriften zu einem +% Set hinzufügen, indem Sie den `|font|' Schlüssel nutzen, welcher die Aneinanderreihung aller +% Fontattribute, getrennt durch Slashes, erwartet, das heißt, +%`|font|\,|=|\,\meta{encoding}|/|\meta{family}|/|\meta{series}|/|\meta{shape}|/|\meta{size}'. +% Das erlaubt uns, Font Sets zu Sets hinzuzufügen, von denen sie sonst disjunkt sind. +% Falls Sie zum Beispiel wollen, dass die Roman Familie in allen Größen hervorragt, +% aber nur die normal große, möglicherweise kursive typewriter Font (im Kontrast zum +% z.B. kleinen Font), so könnten sie das Set so deklarieren: +%\begin{verbatim}[deletekeywords={[1]{protrusion}}] +%\DeclareMicrotypeSet[protrusion] +% { myset } +% { encoding = T1, +% family = rm*, +% font = {T1/tt*/m/n/*, +% T1/tt*/m/it/*} } +%\end{verbatim} +% Wie Sie dem Beispiel entnehmen können, ist die Asterisk Notation auch für +% den |font| Schlüssel zulässig. Ein einzelner Asterisk ist äquivalent zu `|*/*/*/*/*|', also dem +% normalen Font. Befehle zur Größenwahl sind auch möglich, allerdings sind keine Bereiche erlaubt. +% +%\medskip\noindent +% Tabelle~\ref{tab:predefined-font-sets} listet die 9 vordefinierten Font Sets auf. +% Diese können ebenfalls aktiviert werden, indem ihr Name an die Optionen +% \opt{protrusion}, \opt{expansion}, \opt{tracking}, \opt{kerning} und +% \opt{spacing} der Features geleitet wird, wenn das Paket geladen wird, z.B.: +%\begin{verbatim} +%\usepackage[protrusion=allmath,tracking=smallcaps]{microtype} +%\end{verbatim} +% +%\begin{table}\microtypesetup{protrusion=false}\small +%\caption{Vordefinierte Font Sets}\label{tab:predefined-font-sets} +%\catcode`\!=13 \def!{\textcolor{thered}{$\varnothing$}} +%\catcode`\/=13 \def/#1/{\textcolor{thegreen}{#1}} +%\def<#1>{\textcolor{theblue}{\acronym{#1}}} +%\setlength\fboxsep{4pt} +%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax +%\fcolorbox{theframe}{white}{^^A +%\begin{minipage}{\textwidth} +%\begin{tabular}{@{}L{65pt}L{80pt}*3{L{41pt}}L{67pt}@{}} +% \footnotesize Set Name +% & \multicolumn{5}{l}{\footnotesize Font attributes}\\ +%\cmidrule{2-6} +% & \footnotesize Kodierung +% & \footnotesize Familie +% & \footnotesize Serie +% & \footnotesize Shape +% & \footnotesize Größe\\ +%\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3} +%\cmidrule(r){4-4}\cmidrule(r){5-5}\cmidrule{6-6} +% |all| +% & ! +% & ! +% & ! +% & ! +% & ! \\ +%\cmidrule(r){1-1} +% |alltext|\linebreak(|allmath|) +% & Textkodierungen, \linebreak (, , ) +% & ! +% & ! +% & ! +% & ! \\ +%\cmidrule(r){1-1} +% |basictext|\linebreak(|basicmath|) +% & Textkodierungen \linebreak (, ) +% & /\cmd\rm|*|/,\linebreak /\cmd\sf|*|/ +% & /\cmd\md|*|/ +% & ! +% & /\cmd\normalsize/, /\cmd\footnotesize/, /\cmd\small/, /\cmd\large/\\ +%\cmidrule(r){1-1} +% |smallcaps| +% & Textkodierungen +% & ! +% & ! +% & /\cmd\sc|*|/ +% & ! \\ +%\cmidrule(r){1-1} +% |footnotesize| +% & Textkodierungen, +% & ! +% & ! +% & ! +% & |-|/\cmd\small/\\ +%\cmidrule(r){1-1} +% |scriptsize| +% & Textkodierungen, +% & ! +% & ! +% & ! +% & |-|/\cmd\footnotesize/\\ +%\cmidrule(r){1-1} +% |normalfont| +% & /\cmd\encoding|*|/ +% & /\cmd\family|*|/ +% & /\cmd\series|*|/ +% & /\cmd\shape|*|/ +% & /\cmd\normalsize/\\ +%\bottomrule +%\end{tabular} +%\vskip4pt\footnotesize +% `Textkodierungen' = , , , , , , +%\hfill +% `/\bslash\,\dots|*|/' = `/\bslash\,\dots|default|/' +%\vskip3pt +%\end{minipage}^^A +%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox +%\end{table} +% +%\medskip +%\Describe{Macro}{\UseMicrotypeSet}{?features,set name} +% Dieses Kommando aktiviert ein vorher durch \cs{DeclareMicrotypeSet} deklariertes Font Set. +% Nutzt man das optionale Argument, so kann man begrenzen, wieviele Features auf das Set angewendet werden. +% Diese Anweisung hat nur einen Effekt, wenn das Features in den Paketoptionen aktiviert wurde. +% +%\medskip +%\Describe{Macro}{\DeclareMicrotypeSetDefault}{?features,set name} +% Falls ein Feature aktiviert ist, aber kein Font Set explizit gewählt wurde, so +% werden die von diesem Befehl deklarierten Sets aktiviert. Standardmäßig wird das `|alltext|' Font +% Set für Zeichenhervorhebungen und zusätzliches Kerning genutzt, das +% `|basictext|' Set für Fontexpansion und Wortzwischenräume und das +% `|smallcaps|' Set für Tracking. +% +%\medskip\noindent +% Diese Anweisungen können nur in der Präambel oder der Hauptkonfigurationsdatei +% verwendet werden. Ihre Bandbreite gilt global für das Dokument. Nur ein Set pro Feature +% kann aktiviert werden. +% +% +%\section{Micro Feinabstimmung}\label{sec:fine-tuning} +% +% Jedes Zeichen bedarf eines bestimmten Betrags an Protrusion, Kerning oder Spacing. +% Es kann ebenso wünschenswert sein, die maximale Expansion bestimmter Zeichen zu +% begrenzen. Überdies, da jeder Font anders aussieht, müssen Einstellungen speziell +% auf eine Schriftart oder ein Set von Fonts zutreffen. Dieses Paket enthält flexible und +% einfache Methoden, um diese feineren Aspekte der Mikrotypographie +% anzupassen. +% +% Alle Anweisungen zur Feinabstimmung folgen prinzipiell derselben Syntax: Sie benötigen alle +% 3 argumente; das Erste ist optional und kann zusätzliche Optionen enthalten; +% im zweiten Argument werden Font Sets spezifiziert, auf welche die Einstellungen angewendet +% werden sollen; das dritte Argument enthält die eigentlichen Einstellungen. +% +% Das Font Set, für welches die Einstellungen greifen sollen, wird mit der selben +% Syntax von \meta{font axis}\,|=|\,\meta{Werteliste} Paaren deklariert wie für das +% Kommando \cs{DeclareMicrotypeSet} (siehe Abschnitt~\ref{sec:font-sets}). Der einzige +% Unterschied liegt darin, dass Werte mit anführendem Asterisk sofort übersetzt werden, +% nicht am Ende der Präambel. +%^^A +%\ifcmr\else\enlargethispage{3\baselineskip}\fi ^^A layout +%\changes{v1.7}{2005/03/23}{remove table of match order}^^A +% Um die passenden Einstellungen für eine gegebene Schriftart zu finden, versucht das Paket alle +% Kombinationen von Fontkodierung, Familie, Serie, Form und Größe, mit abnehmendem +% Stellenwert in dieser Reihenfolge. Existieren zum Beispiel sowohl Einstellungen für die +% momentanen Familien (z.B. |T1/cmr///|) als auch Einstellungen für kursive Fonts mit normalem Gewicht +% (|T1//m/it/|), so würden die Einstellungen für die |cmr| Familie benutzt.\footnote{ +% Für alle Interessierten stellt Tabelle~\ref{tab:match-order} auf +% Seite~\pageref{tab:match-order} die exakte Reihenfolge dar.} +% Die Kodierung muss immer stimmen. +% +%\subsection{Character Protrusion}\label{sub:protrusion} +% +%\Describe{Macro}{\SetProtrusion}{?options,set of fonts,protrusion settings} +% Benutzt man dieses Kommando, so kann man die Protrusionsfaktoren jedes einzelnen Zeichens +% einer Schriftart oder eines Font Sets verändern. Ein sehr unvollständiges Beispiel wäre das folgende: +%\begin{verbatim} +%\SetProtrusion +% { encoding = T1, +% family = cmr } +% { A = {50,50}, +% \textquoteleft = {700, } } +%\end{verbatim} +% Dies würde darin resultieren, dass der Buchstabe `A' um 5\% seiner Breite +% auf beiden Seiten hervorragt; das linke Anführungszeichen würde hier um 70\% seiner Breite zum linken Rand hin +% hervorragen. Angewandt wird das Beispiel auf alle Font Formen, Serien und Größen der +% ~kodierten Computer Modern Roman Familie. +% +%\paragraph{Die Protrusionseinstellungen} +% bestehen aus \meta{Zeichen}\,|=|\,\meta{Protrusionsfaktoren} Paaren. +% +% Die Zeichen können entweder einzeln als solche angegeben werden (`|A|'), +% als ein Symbolkommando (`\cmd\textquoteleft'), oder als Slotnummer: 3 Stellen +% für dezimale Notation, angeführt von~|"| für hexadezimal, mit~|'| für +% oktal (z.B. die `fl' Ligatur in Kodierung:~|029|, |"1D|, |'35|). +% \mbox{8-bit} (und sogar ) Zeichen können direkt oder in +% \LaTeX's traditioneller \mbox{7-bit} Notation eingegeben werden: sowohl |\"A| als auch \expandafter|\"A| +% sind zulässig, vorausgesetzt, dass das Zeichen sowohl in der Input- als auch +% der Fontkodierung deklariert wird. Sie haben ebenfalls die Möglichkeit, Zeichenlisten anzugeben, +% für welche die Einstellungen übernommen werden sollen (siehe Abschnitt~\ref{sub:inherit}). +% +% Die Protrusionsfaktoren weisen einem Zeichen den Betrag zu, +% um den sie zum linken Rand hin (erster Wert) bzw. rechten Rand hin (zweiter Wert) hervorragen +% sollen. Standardmäßig sind die Werte relativ zur Breite des Zeichens zu verstehen, +% sodass ein Wert von 1000 bedeutet, dass das Zeichen vollständig zwischen die Ränder +% gelegt werden sollte, während es z.B. bei einem Wert von 50 +% um 5\% seiner Breite hervorragen würde. Negative Werte sind erlaubt, ebenso Zahlen größer +% als 1000 (effektiv jedoch nicht mehr als 1\,em der Schriftart). +% Sie können jede der beiden Zahlen auslassen, wenn Sie nicht wollen, dass +% das jeweilige Zeichen zu dieser Seite hervorragen sollte. Das abtrennende Komma jedoch +% dürfen Sie nicht auslassen. +% +%\paragraph{Optionen:} +%\begin{options} +% \item[\key{name}] Sie können den Protrusionseinstellungen einen Namen zuweisen, sodass +% Sie in der Lage sind, es aus einer anderen Liste zu laden. +% \item[\key{load}] Sie können eine andere Liste laden (vorausgesetzt, dass Sie dieser zuvor +% einen Namen zugewiesen haben) bevor die aktuelle Liste geladen wird, wodurch die Fonts die +% Werte der geladenen Liste erben. +% \par +% Dadurch kann die Konfiguration beträchtlich erleichtert werden. Sie können +% zum Beispiel eine Standardliste für eine Schriftarte erstllen; Einstellungen für andere +% Formen oder Serien können diese Einstellungen laden, sie erweitern und überschreiben +% (da der jeweils letzte Wert Vorrang hat). Font Einstellungen werden +% rekursiv geladen. +% Die folgenden Optionen werden alle geladenen Listen beeinflussen: +%\changes{v1.8}{2005/06/23}{add example for \texttt{factor} option} +% \item[\key{factor}] Diese Option kann genutzt werden, um alle Protrusionsfaktoren +% der Liste zu beeinflussen, was alle globalen \opt{factor} Einstellungen überschreibt (siehe +% Abschnitt~\ref{sub:options-protrusion}). Wollen sie zum Beispiel, dass Fonts mit größeren Abmaßen +% weniger hervorragen, könnten Sie die normalen Listen laden, allerdings +% könnten Sie kleinere Faktoren darauf anwenden: +%\begin{verbatim} +%\SetProtrusion +% [ factor = 700 +% load = cmr-T1 ] +% { encoding = T1, +% family = cmr, +% size = large- } +% { } +%\end{verbatim} +% \item[\key{unit}] Standardmäßig sind die Protrusionsfaktoren relativ zur Breite +% des jeweiligen Zeichens. Die |unit| Option kann genutzt werden, um dieses Verhalten +% zu überschreiben, sodass \microtype\ diese Werte als Tausendstel der +% angegeben Werte deutet. Gibt man z.B. die Anweisung `|unit=1em|' hätte dies den Effekt, dass +% ein Wert von 50 nun darin resultieren würde, dass ein ein Zeichen um +% 5\% eines em des Fonts hervorragen würde (und somit die interne +% Vermessung von \pdftex's \cmd\lpcode\ und \cmd\rpcode\ primitives simuliert). +% Das normale Verhalten kann mittels |unit=character| wiederhergestellt werden.\footnote{ +% Die |unit| Option kann auch global an das Paket geleitet werden (siehe +% Abschnitt~\ref{sub:options-protrusion}). +% Allerdings werden alle vorliegenden Einstellungen unter der Annahme, +% dass die Werte relativ zur Zeichenbreite sind, erstellt. Deshalb +% sollten Sie es nur ändern wenn Sie sich sicher sind, dass +% die Standardeinstellungen im Dokument nicht verwendet werden.} +% \item[\key{preset}] Setzt die Protrusions Codes aller Zeichen auf die angegebenen +% Werte (|={|\meta{left}|,|\meta{right}|}|), u.U. skaliert mit +% einem |factor|. Eine |unit| Einstellung wird nur berücksichtigt, wenn sie +% nicht |=character| ist. +% \item[\key{inputenc}] Wählt eine Inputkodierung aus, die auf die Liste angewendet +% werden soll, unabhängig von der Eingabekodierung des Dokuments selbst. Sie können jede +% Kodierung angeben, die per \pkg{inputenc} geladen werden könnte, +% also u.a. |ansinew|, |koi8-r|, |utf8|. +% \item[\key{context}] Die Bandbreite der Liste kann auf einen gewissen Kontext limitiert +% werden. Schauen Sie in Abschnitt~\ref{sec:context} für ein Anwendungsbeispiel nach. +%\end{options} +% +% +%\subsection{Fontexpansion}\label{sub:expansion} +% +%\Describe{Macro}{\SetExpansion}{?options,set of fonts,expansion settings} +% Standardmäßig können alle Zeichen eines Fonts um denselben Betrag gestrecht +% oder geschrumpft werden. Man kann aber auch die Expansionslimits für bestimmte +% einzelne Zeichen festlegen, wenn diese sensibler auf Deformation reagieren. Das ist der +% Zweck des \cs{SetExpansion} Kommandos. Beachten Sie, dass dies nur einen Effekt hat, +% wenn das Paket mit der Option \opt{selected} geladen wurde (siehe +% Abschnitt~\ref{sub:options-expansion}). Ansonsten werden die Expansionseinstellungen +% ignoriert~-- anders als die Optionen im optionalen ersten Argument, welche +% trotzdem ausgewertet werden. +% +% Falls das Paket mit der \opt{selected} Option geladen wurde und Einstellungen für einen Font +% nicht existieren, wird Fontexpansion gar nicht auf diesen Font angewendet. +% Sollte die außergewöhnliche Situation aufkommen, dass sie die ausgewählte Expansion +% generell verwenden wollen, aber dass alle Zeichen eines bestimmten Font (Sets) +% um denselben Betrag geschrumpft oder expandiert werden sollten, so müssen sie eine +% leere Liste für diese Fonts erstellen. +% +%\ifcmr\else\enlargethispage\baselineskip\fi ^^A layout +%\paragraph{Die Expansionseinstellungen} +% bestehen aus Paaren der Form \meta{character}\,|=|\,\meta{expansion factor}. +% Sie können eine Zahl für jedes Zeichen festlegen, die den Betrag bestimmt, um den +% ein Zeichen expandiert werden kann. Die Zahlen bezeichnen Tausendstel +% der vollen Expansion. +% Setzt man zum Beispiel den Expansionsfaktor des Zeichens `O' auf 500, +% wird dieses nur um die Hälfte des Betrages geschrumpft oder expandiert, um +% den die anderen Zeichen expandiert werden. +% Während der Standardwert für Character Protrusion auf 0 gesetzt ist -- sofern Sie +% keine Zeichen angegeben haben, wird auch keines hervorspringen ~-- ist der Standardwert +% für Expansion 1000, was bedeutet, dass alle Zeichen um denselben Betrag +% expandiert werden. +% +%\paragraph{Optionen:} +%\begin{options} +% \item[\key{name}, \key{load}, \key{preset}, \key{inputenc}, \key{context}] +% Analog zu \cs{SetProtrusion} kann dieses optionale Argument genutzt werden, +% um einer Liste einen Namen zuzuweisen, eine andere Liste zu laden, alle Expansionsfaktoren +% voreinzustellen, die Eingabekodierung festzulegen oder den Kontext der Liste +% zu bestimmen (Expansionskontexte sind nur möglich mit \pdftex\ +% Version 1.40.4 oder neuer). +%\changes{v1.8}{2005/04/12}{add example of how to get rid of a widow +% (suggested by \contributor Adam Kucharczyk )} +% ^^A private mail, 2005/04/09 +% \item[\key{auto}, \key{stretch}, \key{shrink}, \key{step}] +% Diese Schlüssel können genutzt werden um die globalen Einstellungen der Paketoptionen +% zu überschreiben (siehe Abschnitt~\ref{sub:options-expansion}). Wenn Sie keine +% der Optionen |stretch|, |shrink| und |step| angeben, wird ihr jeweiliger globaler +% Wert genutzt (es findet also keine Berechnung statt). +% +% Ein praktisches Beispiel: Nehmen wir an, wir haben einen Paragraphen, der eine +% Witwe enthält, die man einfach hätte verhindern können, indem man den Font ein wenig +% mehr geschrumpft hätte. In Verbindung mit der |context| Option (siehe Abschnitt~\ref{sec:context} +% für weitere Details) könnte man mit diesem speziellen Paragraphen mehr Expansion erlauben: +%\begin{verbatim}[gobble=2] +% \SetExpansion +% [ context = sloppy, +% stretch = 30, +% shrink = 60, +% step = 5 ] +% { encoding = {OT1,T1,TS1} } +% { } +% % ... END PREAMBLE +% {\microtypecontext{expansion=sloppy}% +% Dieser Paragraph enthält eine `unnötige' Witwe.} +%\end{verbatim} +% Diese Methode, Kontext anzuwenden um vorübergehend verschiedene +% Expansionsparameter zu setzen funktioniert nur mit \pdftex\ 1.40.4 oder neuer +% (für ältere Versionen wird ein schmutziger Trick in +% Abschnitt~\ref{ssec:font-setup} auf Seite~\pageref{exp-hack} beschrieben). Bedenken Sie auch, +% dass \pdftex\ die Nutzung von Fonts mit verschiedenen Expansionslimits oder -stufen +% (sogar für verschiedene Fonts) innerhalb eines Paragraphs verbietet, weswegen +% der saloppe Kontext benutzt werden muss, um Paragraphen zu komplettieren. +% \item[\key{factor}] +% Diese Option stelle eine andere Methode bereit, um Expansionseinstellungen für +% bestimmte Fonts zu verändern, arbeitet aber um die eben beschriebenen Restriktionen herum. Die +% |factor| Option beeinflusst die Expansionsfaktoren aller Zeichen (in +% Kontrast zur allgemeinen Streckbarkeit) des Fonts. Wollten sie z.B. die +% kursive Form weniger expandieren lassen, würden sie vereinbaren: +%\begin{verbatim} +%\SetExpansion +% [ factor = 500 ] +% { encoding = *, +% shape = it } +% { } +%\end{verbatim} +% Die |factor| Option kann nur genutzt werden, um die Streckbarkeit der Zeichen +% zu \emph{verringern}, weshalb sie nur Werte kleiner als 1000 erhalten darf. +% Außerdem kann sie nur für einzelne Fonts oder Font Sets genutzt werden; +% die Option global in den Paketoptionen zu setzen macht wenig Sinn -- +% dafür nutzt man die Optionen \opt{stretch} und +% \opt{shrink} des Pakets. +%\end{options} +% +% +%\subsection{Tracking}\label{sub:tracking} +%\Describe{Macro}{\SetTracking}{?options,set of fonts,tracking amount} +% Eine bedeutende typographische Technik -- welche lange in \TeX\ fehlte -- +% ist die Anpassung des Trackings, sprich die uniforme Addition oder Subtraktion +% von Sperrsatz zu/von allen Zeichen eines Fonts. Zum Beispiel ist es ein +% normal üblicher, typographischer Brauch, komplett in Kapitälchen +% (wie in diesem Dokument) ein wenig zu sperren. Die Lesbarkeit kann auch verbessert +% werden, indem man das Tracking von kleinerer Typen minimal erhöht und das größerer +% Typen minimal erhöht.\footnote{ +% Für Fonts mit vollem Funktionsumfang wie Computer Modern ist das für gewöhnlich +% nicht nötig, da sie in optischen Größen kommen und das Tracking der Kapitälchen +% bereits angepasst ist.} +% Das \cs{SetTracking} Kommando erlaubt, die Menge des Trackings für verschiedene +% Fonts oder Font Sets zu setzen. Es wird vom \cs{textls} Kommando ausgewertet, +% welches genutzt werden kann, um kleinere Textpassagen zu sperren (siehe +% Abschnitt~\ref{sec:lettersp}). +% +%\paragraph{Die Menge des Tracking} +% wird festgelegt in Tausendsteln von 1\,em (oder der gegebenen Einheit); negative Werte +% sind ebenfalls erlaubt. +% +%\paragraph{Optionen:} +%\begin{options} +% \item[\key{name}, \key{unit}, \key{context}] +% Diese Optionen dienen derselben Funktionalität wie bei den vorigen +% Konfigurationskommandos. Die Einheit kann jegliche Dimension annehmen, +% der Standard beträgt 1\,em. +% \item[\key{spacing}] +% Werden die \emph{Zeichen}zwischenräume verändert, müssen auch die \emph{Wort}zwischenräume +% vielleicht angepasst werden. Diese Option erwartet drei Zahlen für Wortzwischenraum, +% bzw. Streckung und Schrumpfung, welche in Tausendsteln eines 1\,em +% angegeben werden (oder in der aktuellen Einheit (\texttt{unit})). Folgt +% einem Wert ein Asterisk, so zeigt es an, dass Tausendstel der jeweiligen +% Fontdimension zu dieser hinzuaddiert werden. Zum Beispiel werden durch +%\begin{verbatim} +%\SetTracking[ spacing = {25*,166, } ]{ encoding = *, shape = sc }{ 25 } +%\end{verbatim} +% die Wortzwischenräume um 2.5\% erhöht, die Streckung wird auf einen Betrag +% von 0.166\,em gesetzt, an den Schrumpf-Einstellungen wird nichts geändert. Falls +% sie die \texttt{spacing} Option nicht angeben, wird der Wortzwischenraum +% über die aktuelle Größe der Sperrsatzabstände skaliert (wie in obigem Beispiel), +% wobei stretch und shrink unberührt bleiben. +% \item[\key{outer spacing}] +% Falls ein Wortzwischenraum direkt auf Sperrsatz folgt (oder umgekehrt), +% wird er standardmäßig gleich den Zwischenräumen im gesperrten Text behandelt. +% Mit dieser Option, welche dieselben Werte wie \texttt{spacing} akzeptiert, +% kann sie unabhängig eingestellt werden. +% \item[\key{outer kerning}] +% Falls andererseits kein Wortzwischenraum folgt oder vorgeht, können Sie +% immer noch die ersten und letzten Buchstaben von angrenzenden Buchstaben +% abtrennen. Diese Option erwartet durch Komma abgretrennte Kerning Beträge +% für die linke und rechte Seite, in Tausendsteln eines 1\,em (oder der aktuellen +% \texttt{unit}). Folgt einem Wert ein Asterisk, bezeichnet dies Tausendstel +% der aktuellen Abstandsgröße des Sperrsatzes. Ein einzelner Asterisk bedeutet +% `|500*|'; das ist ebenso der Standard, sprich die Summe des äußeren Kerns beträgt +% standardmäßig soviel wie die aktuelle Größe der Abstände des Sperrsatzes. Um kerning auf +% beiden Seiten zu entfernen, verwendet man `|outer kerning={0,0}|'. +% \item[\key{no ligatures}] +% Soweit \pdftex\ betroffen ist, werden Ligaturen in gesperrten Fonts +% wie gewöhnlich konstruiert, was angebracht sein kann, wenn das Tracking +% um einen kleinen Betrag geändert wird. Für größere Abstände andererseits +% hätte der normale Abstand zwischen Zeichen innerhalb Ligaturen +% enttäsuchende \textls[150]{E\lslig{ff}ekte}. +% Dieser Schlüssel erwartet eine per Komma abgetrennte Liste von Zeichen, für welche +% die Ligaturen abgeschaltet werden sollen; nur das Zeichen, mit welchem die Ligatur +% beginnt, muss angegeben werden. +% Wird der Schlüssel ohne Wert angegeben, so werden \emph{alle} Ligaturen des Fonts +% abgeschaltet. Das wird jedoch nicht empfohlen, da es ebenso mit sich bringt, dass +% Kerning ausgeschaltet wird.\footnote{ +% Die untrennbare Verbindung von Ligaturen und Kernen ist eine Begrenzung von +% \TeX\, die nicht vor der Einführung \luatex beseitigt wird.} +% Die Standardeinstellungen stellen Ligaturen nur für das Zeichen `|f|' ab, +% sprich, `ff', `fi', ffi', etc.\footnote{ +% Mit \pdftex\ Versions vor 1.40.4 sind \emph{alle} Ligaturen und +% somit jegliches Kerning abgeschaltet. Es wird deshalb empfohlen, wenigstens +% Version 1.40.4 zu nutzen.} +% In außergewöhnlichen Situationen könenn Sie manuell Ligaturen aufbrechen, indem +% sie `|{\kern0pt}|' bzw. \pkg{babel}s \verb="|= +% Kürzel verwenden, oder aber die Ligaturen schützen, indem Sie sie in \cs{lslig} einschließen (siehe +% Abschnitt~\ref{sec:lettersp}). +%\end{options} +% +%\ifx\lssample\undefined +% \fallbacktext{Die originale Dokumentation\footnote{ +% \ctanurl{macros/latex/contrib/microtype/microtype.pdf}.} +% enthält ein Bild, welches all diese Optionen illustriert.} +%\medskip\noindent +% Nehmen wir zum Beispiel an, +%\else +%\changes{v2.3}{2007/11/03}{add letterspacing illustration} +%\medskip\noindent +% Since a picture is worth a thousand words, probably even more if, in our +% case, it depicts a couple of letterspaced words, let's bring one to sum up +% these somewhat confusing options. Suppose you had the following settings +% (which I would in no way recommend; they are only for illustrative purposes): +%\begin{verbatim} +%\SetTracking +% [ no ligatures = {"\anchorarrow{nolig}"f}, +% spacing = {60"\anchorarrow{ispace}"0*,-1"\anchorarrow{istretch}"00*, "\anchorarrow{ishrink}"}, +% outer spacing = {4"\anchorarrow{ospace}"50,2"\anchorarrow{ostretch}"50,1"\anchorarrow{oshrink}"50}, +% outer kerning = {"\anchorarrow{okernbegin}"*,"\anchorarrow{okernend}"*} ] +% { encoding = * } +% { 1"\anchorarrow{lsamount}"60 } +%\end{verbatim} +% and then write: +%\begin{verbatim} +%Stop \textls{stealing sheep}! +%\end{verbatim} +% this is the (typographically dubious) outcome: +% +% \lssample +% +%\noindent +% While the word `Stop' is not letterspaced, the space between the letters in +% the other two words is expanded by the \showarrow[tracking]{tracking~amount}{red} +% of 160/1000\,em\,=\allowbreak\,0.16\,em. +% The \showarrow[ispace]{inner~space}{green} within the letterspaced text is +% increased by 60\%, while its \showarrow[istretch]{stretch}{green} amount is +% decreased by 10\% and the \showarrow[ishrink]{shrink}{green} amount is left +% untouched. +% The \showarrow[ospace]{outer~space}{green} (of 0.45\,em) immediately before the +% piece of text may \showarrow[ostretch]{stretch}{green} by 0.25\,em and +% \showarrow[oshrink]{shrink}{green} by 0.15\,em. +% Note that there is no outer space after the text, since the exclamation mark +% immediately follows; instead, the default \showarrow[okern]{outer~kern}{red} +% of half the letterspace amount (0.08\,em) is added. +% Furthermore, one \showarrow{ligature}{grey} wasn't broken up, because we +% neglected to specify the `|s|' in the |no ligatures| key. +% +%\medskip\noindent +% As another, more realistic +%\fi +% Sie wollen alle kleinen Kapitälchen um 50/1000\,em +% sperren, Fonts kleiner \cmd\small\ um 0.02\,em, und das Tracking großer Typen +% um 0.02\,em erhöhen. Sie können das mit folgenden Einstellungen erreichen: +%^^A there's a \nobreakspace ahead! +%\begin{verbatim} +%\usepackage[tracking=true]{microtype} +%\DeclareMicrotypeSet*[tracking]{my} +% { encoding = *, +% size = {-small,Large-}, +% font = */*/*/sc/* } +%\SetTracking[ no ligatures = f ]{ encoding = *, shape = sc}{ 50 } +%\SetTracking{ encoding = *, size = -small }{ 20 } +%\SetTracking{ encoding = *, size = Large- }{ -20 } +%\end{verbatim} +% +%\medskip\noindent +% Gesperrte Schriftarten, für welche keine Einstellungen vorliegen, werden um den +% den Standard von 0.1\,em gesperrt (einstellbar mit der Paketoption \opt{letterspace}, siehe +% Abschnitt~\ref{sub:options-misc}). Setzen wir voraus, ihr Herausgeber will, dass Sie ihre +% 1000 Seiten auf ein Meisterwerk von einer handvoll Seiten zusammenkürzen, dann könnten Sie +% (mit gekreuzten Fingern) \microtype\ laden: +%\begin{verbatim} +%\usepackage[tracking=alltext,letterspace=-40]{microtype} +%\end{verbatim} +% +%\emptypdfpageresources ^^A layers of letterspacing illustration +% +% +%\subsection{Zusätzliches Kerning}\label{sub:kerning} +% +%\Describe{Macro}{\SetExtraKerning}{?options,set of fonts,kerning settings} +% Mit diesem Befehl können sie das zusätzliche Kerning feinabstimmen. Im Vergleich zu +% herkömmlichem Kerning, welches immer mit einem \emph{Paar} von Zeichen assoziiert +% wird, und Tracking, welches den Zwischenraum zwischen \emph{allen} +% Zeichen eines Fonts angibt, bezieht sich zusätzliches Kerning nur auf einzelne Zeichen, +% soll heißen, immer wenn ein bestimmtes Zeichen im Text auftaucht, wird das angegebene +% Kerning eingefügt, unabhängig davon, welche Zeichen vorgehen oder folgen. +% +% Ich sollte nicht versäumen zu sagen, dass es eine Limitierung zusätzlichen Kernings gibt: +% Wörter, die solch einem Kern\emph{direkt folgen} (nicht von einem Leerzeichen getrennt), +% werden nicht mit Bindestrich versehen, solang man die Trennpunkte nicht selbst einstellt, +% z.B. für Kerning nach dem Apostroph `|l'apos\-trophe|'. Diese Restriktion von \pdftex\ +% wird hoffentlich bald abgeschafft. +% +%\paragraph{Die Einstellungen des Kerning} +% werden als Paare der Form \meta{Zeichen}\,|=|\,\meta{Kerning Werte} angegeben, wobei +% letzteres 2 Werte enthätl: das Kerning, welches vor und nach dem betreffenden Zeichen angefügt wird. +% Einmal mehr können Werte ausgelassen werden, nicht aber das Komma. +% +%\paragraph{Optionen:} +%\begin{options} +% \item[\key{name}, \key{load}, \key{factor}, \key{preset}, \key{inputenc}] +% Diese Optionen dienen der gleichen Funktionalität wie in den vorigen +% Konfigurationsbefehlen. +% \item[\key{unit}] Zulässige Werte sind: |space|, |character| und eine +% \meta{Dimension}. Standardmäßig bezeichnen die Werte ein Tausendstel von 1\,em. +% \item[\key{context}] Wenn es um Kerning Einstellungen geht, ist diese Option +% besonders nützlich, da sie erlaubt, Einstellungen abhängig von der Sprache +% anzuwenden. +% \par +% Zum Beispiel kann man die folgenden Einstellungen, angedacht für Dokumente in Französisch, +% in der Hauptkonfigurationsdatei finden: +%\ifcmr\else\pagebreak\fi ^^A layout +%\begin{verbatim}[deletekeywords={[1]{unit}}] +%\SetExtraKerning +% [ name = french-default, +% context = french, +% unit = space ] +% { encoding = {OT1,T1,LY1} } +% { +% : = {1000,}, % = \fontdimen2 +% ; = {500, }, % ~ \thinspace +% ! = {500, }, +% ? = {500, } +% } +%\end{verbatim} +%\changes{v2.3}{2007/11/20}{add kerning sample} +%\ifluatex +% \fallbacktext{Since this document was compiled with |luatex| instead of +% |pdftex|, it does not\\include the sample that the original documentation +% features.} +%\else +% \begin{microtypecontext}{kerning=french} +% Was ist das Ergebnis dieser Einstellungen? Wenn sie aktiv sind wie +% im vorliegenden Paragraphen, wird ein schmales Leerzeichen vor jedem Fragezeichen, +% Ausrufezeichen und Semikolon eingefügt; ein normales Leerzeichen vorm Doppelpunkt. +% In Abschnitt~\ref{sec:context} wird beschrieben, wie diese Einstellungen aktiviert +% werden. Dieser Paragraph wurde eingegeben wie folgt: +% \end{microtypecontext} +%\begin{verbatim}[deletekeywords={[1]{context,activate}}] +%\begin{microtypecontext}{kerning=french} +% Was ist das Ergebnis dieser Einstellungen? Wenn sie aktiv sind wie +% im vorliegenden Paragraphen, wird ein schmales Leerzeichen vor jedem Fragezeichen, +% Ausrufezeichen und Semikolon eingefügt; ein normales Leerzeichen vorm Doppelpunkt. +% In Abschnitt~\ref{sec:context} wird beschrieben, wie diese Einstellungen aktiviert +% werden. Dieser Paragraph wurde eingegeben wie folgt: +%\end{microtypecontext} +%\end{verbatim} +%\fi +%\end{options} +% +% +%\subsection{Wortzwischenräume}\label{sub:spacing} +% +%\Describe{Macro}{\SetExtraSpacing}{?Optionen,Font Set,Spacing Einstellungen} +% Dieser Befehl erlaubt Ihnen, die Wortzwischenräume fein abzustimmen (auch bekannt als +% glue). Eine vorausgehende Bemerkung darüber, was ein `Zwischenraum' ist, könnte angebracht sein: zwischen zwei +% Wörtern fügt \TeX\ sogenannten glue ein, welcher von drei Parametern charakterisiert wird +% -- der normale Abstand zwischen zwei Wörtern, der maximale Abstand, der dem angefügt +% werden darf, und das Maximum welches davon subtrahiert werden kann. +% Die letzteren beiden Parameter wirken wann immer \TeX\ versucht, einen Paragraphen +% in Zeilen zu zerlegen und dabei scheitert; es kann die Räume zwischen Wörtern strecken +% oder schrumpfen. Diese drei Parameter sind spezifisch für jeden Font. +% +% Obendrein beherrscht \TeX\ das Konzept von `space factors'. +% Sie können genutzt werden, um die Räume zwischen bestimmten Zeichen, besonders +% den Satzzeichen zu vergrößern. Falls \pdftex zusätzliche Zwischenräume +% in Betrieb sind, werden space factors ignoriert, da es als Erweiterung +% zu space factors mit viel präziserer Kontrolle betrachtet werden kann. +% +%\paragraph{Einstellungen an den Zwischenräumen} +% werden als Paare der Form \meta{Zeichen}\,|=|\,\meta{Zwischenraum Faktoren} deklariert, wobei +% letztere aus drei Zahlen bestehen: zuerst der zusätzliche Kern, der nach diesem Zeichen +% angefügt wird, wenn es vor einem Wortzwischenraum vorkommt, 2. der zusätzliche Streckungsbetrag +% und zuletzt der zusätzliche Schrumpfbetrag. Alle Werte können auch negativ sein, +% wodurch die Dimensionen verkleinert werden. Nicht alle Werte müssen angegeben werden, +% die Einstellungen müssen jedoch zwei abtrennende Kommas beinhalten. +% +%\paragraph{Optionen:} +%\begin{options} +% \item[\key{name}, \key{load}, \key{factor}, \key{preset}, \key{inputenc}, \key{context}] +% Diese Optionen dienen der gleichen Funktionalität wie in den vorigen +% Konfigurationsbefehlen. +% \item[\key{unit}] Sie können die Einheit wählen, in der die angegebenen Zahlen +% gemessen werden. Mögliche Werte sind: |character|, eine \meta{Dimension} und +% zusätzlich |space|. Letztere Einstellung misst die Werte in Tausendsteln der +% jeweiligen Dimension, die vom Font eingestellt ist. Standardmäßig wird die Einheit +% in Zwischenraumdimensionen gemessen. Mit folgenden (unsinnigen) Einstellungen z.B.: +%\begin{verbatim} +%\SetExtraSpacing +% [ unit = space ] % default +% { font = */*/*/*/* } +% { +% . = {1000,1000,1000}, +% } +%\end{verbatim} +% würde der Raum nach einem Punkt verdoppelt (streng genommen: +% 2\,\texttimes\ \fontdim2),ebenso +% die Schrumpfbeträge der Wortzwischenräume (\fontdim3 und~4). Umgekehrt +% würde man, so alle drei Werte auf \textminus1000 setzt, das Leerzeichen +% nach dem betreffenden Zeichen komplett aufheben. +%\end{options} +% +% +%\subsection{Zeichenvererbung}\label{sub:inherit} +% +% \Describe{Macro}{\DeclareCharacterInheritance} +% {?Features,Font Set,Vererbungslisten} +% In den meisten Fällen sollten akzentuierte Zeichen die Einstellungen ihres +% Ursprungszeichens erben. Zum Beispiel sollten vermutlich alle der Zeichen \`A, \'A, \^A, +% \~A, \"A, \r{A} und \u{A} um denselben (absoluten) Betrag hervorragen wie der +% Buchstabe A. Nutzt man den Befehl \cs{DeclareCharacterInheritance}, +% so kann man Klassen von Zeichen benennen, wodurch man nur das betreffende +% Grundzeichen einstellen muss. Mit dem zusätzlichen Argument, welches eine per +% Komma abgetrennte Liste von Features enthalten kann, können Sie die Reichweite +% der Liste beschränken. Zusätzlich dazu akzeptiert es den |inputenc| Schlüssel, um die Eingabekodierung +% für diese Liste einzustellen. Das Font Set kann wie üblich eingestellt werden. +% Die einzige Ausnahme hierbei ist, dass exakt eine Kodierung gewählt werden muss. Die Vererbungslisten +% werden als Paare der Form \meta{base character}\,|=|\,\meta{Liste der erbenden +% Zeichen} deklariert. Solange Sie keine abweichende Kodierung oder einen sehr eigenartig +% geformten Font verwenden, sollte es keinen Grund geben, die standardmäßigen Vererbungseinstellungen +% zu ändern. +% +%\bigskip\noindent +% In der Hauptkonfigurationsdatei \file{microtype.cfg} und den anderen +% font-spezifischen Konfigurationsdateien können Sie Beispiele zu all +% diesen Befehlen finden. +% +% +%\subsection{Konfigurationsdateien}\label{sub:config-file} +% +% Die Standardkonfiguration beinhaltet Vererbungseinstellungen, Deklarationen von +% Font Sets und alias Fonts sowie generische Hervorragung, Expansion, Spacing und +% Kerning Einstellungen, und wird aus der Datei \file{microtype.cfg} geladen. Sie können +% diese Datei mit eigenen Einstellungen erweitern (oder eine andere Konfigurationsdatei +% mit der `\opt{config}' Option laden, siehe Abschnitt~\ref{sub:options-misc}). +% +% Wenn Sie den Weg einschlagen, neue Einstellungen für eine Fontfamilie zu treffen, sollten Sie +% diese in eine separate Datei stecken, deren Name `|mt-|\meta{Fontfamilie}|.cfg|' +% (z.B. `\file{mt-cmr.cfg}') lauten muss, und welche alle Befehle enthalten muss, +% die in diesem Abschnitt~\ref{sec:fine-tuning} beschrieben. Diese Dateien werden +% automatisch geladen, wenn sie die betreffenden Fonts tatsächlich nutzen. +% Das Paket kommt mit mit Konfigurationsdateien für eine Reihe von Fontfamilien; +% Tabelle~\ref{tab:fonts} enthält sie alle. +% +%\begin{table}[t]\small +%\changes{v1.6a}{2005/02/02}{add table of fonts with tailored protrusion settings} +%\caption{Fonts mit zugeschnitten Hervorragungseinstellungen}\label{tab:fonts} +%\setlength\fboxsep{4pt} +%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax +%\fcolorbox{theframe}{white}{^^A +%\begin{minipage}{\textwidth} +%\def\arraystretch{1.2} +%\long\def\@makefntext#1{% +% \leftskip 0pt +% \parindent 0pt +% \everypar{\parindent 0pt}% +% \leavevmode\hbox to 15pt{\@thefnmark\hss}#1} +%\let\footnoterule\relax +%\def\fnref#1{\textsuperscript{\itshape\ifpdf\ref*{#1}\else\ref{#1}\fi}} +%\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*3l@{}} +% \footnotesize Fontfamilie ( code) +% & \multicolumn{2}{l}{\footnotesize Features}\\ +%\cmidrule{2-3} +% & \footnotesize Kodierungen +% & \footnotesize Formen\\ +%\cmidrule{1-1}\cmidrule{2-2}\cmidrule{3-3} +% Generic +% & , , , , , ()\footnote{Unvollständig\label{fn:incmpl}} +% & n, (it, sl, sc)\fnref{fn:incmpl} \\ +% Computer Modern Roman (|cmr|)\footnote{Alias: Latin Modern (|lmr|), +% \pkg{ae} (|aer|), \pkg{zefonts} (|zer|), +% \pkg{eco} (|cmor|), \pkg{hfoldsty} (|hfor|)} +% & , , , , , , +% & n, it, sl, sc \\ +% Bitstream Charter (|bch|)\footnote{Alias: \pkg{mathdesign}/Charter (|mdbch|), +% MicroPress's \pkg{chmath} (|chr|)} +% & , , , , +% & n, it, (sl)\footnote{Einstellungen vererbt von kursiver Form\label{fn:it-sl}}, sc \\ +% Adobe Garamond (|pad|, |padx|, |padj|) +% & , , , +% & n, it, (sl)\fnref{fn:it-sl}, sc \\ +% Garamond (|ugm|)\footnote{Alias: \pkg{mathdesign}/ Garamond (|mdugm|)} +% & , , +% & n, it\\ +% Bitstream Letter Gothic (|blg|)\footnote{Alias: \pkg{ulgothic} (|ulg|)} +% & , , +% & n, it \\ +% Adobe Minion (|pmnx|, |pmnj|) +% & , , , , +% & n, it, (sl)\fnref{fn:it-sl}, sc, si\\ +% Palatino (|ppl|, |pplx|, |pplj|)\footnote{Alias: \pkg{pxfonts} (|pxr|), +% \pkg{qfonts}/QuasiPalatino, \TeX\ Gyre Pagella (|qpl|), +% Neu (|fp9x|, |fp9j|)} +% & , , , , ()\fnref{fn:incmpl} +% & n, it, (sl)\fnref{fn:it-sl}, sc \\ +% Times (|ptm|, |ptmx|, |ptmj|)\footnote{Alias: \pkg{txfonts} (|txr|), +% \pkg{qfonts}/QuasiTimes, \TeX\ Gyre Termes (|qtm|)} +% & , , , , , ()\fnref{fn:incmpl} +% & n, it, (sl)\fnref{fn:it-sl}, sc \\ +% Computer Modern math (|cmsy|, |cmm|) +% & / +% & n/it \\ +% symbols (|msa|, |msb|) +% & +% & n\\ +% Euler (|eur|, |eus|, |euf|)\footnote{Alias: \pkg{eulervm} (|zeur|, |zeus|)} +% & +% & n\\ +% Euro symbols (Adobe, , \pkg{marvosym}) +% & / +% & n, it \\ +%\bottomrule +%\end{tabular*}^^A +%\end{minipage}^^A +%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox +%\end{table} +% +%\medskip +%\Describe{Macro}{\DeclareMicrotypeVariants}{list of suffixes} +%\DescribeMacro{\DeclareMicrotypeVariants*} +% Auf seiner Suche nach einer Konfigurationsdatei versucht das Paket auch, +% Suffixe oder einen oder mehr Buchstaben von einem Fontnamen zu entfernen, welche auf eine `Variante' +% des Basisfonts hindeuten könnten (vergleiche Karl Berrys \cite{fontname}). Das erlaubt z.B., +% Einstellungen für z.B. die Fonts |padx| (Experten Set), |padj| (altertümliche Numerale) +% und |pad| (einfach) in der selben Datei \file{mt-pad.cfg} vorzunehmen. +% Der Befehl erwartet eine durch Komma abgetrennte Liste von Suffixen für Varianten. Die Version +% mit Stern hängt die Suffixe der existierenden Liste an. Die Standard-Deklaration +% in \file{microtype.cfg} lautet: +%\begin{verbatim} +%\DeclareMicrotypeVariants{x,j,w,a,d,0,1} +%\end{verbatim} +% +%\medskip +%\Describe{Macro}{\DeclareMicrotypeAlias}{Fontname,alias Font} +% Dieser Befehle kann für Fonts genutzt werden, die sich sehr ähnlich +% oder gar gleich sind (falls sie sich zum Beispiel nicht an das Berry Namensgebungsschema beim +% Installieren der Fonts hielten). Ein Beispiel wären die Latin Modern Fonts, welche +% von Computer Modern abgeleitet sind, sodass es nicht notwendig ist, neue Einstellungen +% für diese vorzunehmen -- man könnte sagen: +%\begin{verbatim} +%\DeclareMicrotypeAlias{lmr}{cmr} +%\end{verbatim} +% wodurch das Paket -- wann immer der Font |lmr| vorkommt und keine Einstellungen +% dafür gefunden werden können -- auch den Font |cmr| ausprobiert. Tatsächlich werden Sie +% eben diese Zeile (mit einigen anderen) in der Standardkonfigurationsdatei vorfinden. +% +%\medskip +%\Describe{Macro}{\LoadMicrotypeFile}{Fontname} +% In wenigen Fällen kann es nötig sein, eine Fontkonfigurationsdatei manuell +% zu laden (z.B. aus einer anderen Konfigurationsdatei heraus), oder in der Lage +% zu sein, in einer Datei festgelegte Einstellungen zu erweitern, die sonst +% nicht automatisch oder zu spät geladen würden.\footnote{ +% Authoren von Fontpaketen sollten vielleicht einen Blick auf den hook +% \cs{Microtype@Hook} werfen, beschrieben im Implementationsteil, +% Abschnitt~\ref{sub:hook}.} +% Dieser Befehle lädt die Datei `|mt-|\meta{Fontname}|.cfg|'. +% +% +%\section{Kontext-sensitive Einstellungen}\label{sec:context} +% +% Das \microtype\ -Paket erlaubt zudem verschiedene Mikro-typografische +% Einstellungen für die Schriftarten, die vom Zusammenhang abhängig sind, zu +% verwenden. +% Dies eröffnet unendlich viele Möglichkeiten der Feinabstimmungen für das Aussehen +% des Dokuments. +% +%\medskip +%\Describe{Macro}{\microtypecontext}{context assignments} +% Dieser Befehl kann überall im Dokument (auch in der Präambel) verwendet werden, +% um den Mikro-typografischen Zusammenhang in der aktuellen Gruppe zu ändern. +% Zu jeder Funktion (\key{protrusion}, \key{expansion}, \key{tracking}, +% \key{spacing} und \key{kerning}), kann ein Kontext zugewiesen werden. Folglich +% können nur Einstellungen mit dem entsprechenden 'Kontext'-Schlüsselwort verwendet +% werden. +% +%\medskip +%\Describe{Env}{microtypecontext}{context assignments} +% Wieviele andere \LaTeX\ -Befehle ist der Befehl, in Form einer Umgebung +% verfügbar. +% +%\medskip +%\Describe{Macro}{\textmicrotypecontext}{context assignments,general text} +% Als weitere Möglichkeit, ändert der Befehl \cs {textmicrotypecontext} den +% Kontext für den Text, der im zweiten Argument übergeben wird. +% +%\changes{v1.9c}{2006/01/25}{add example of how to increase protrusion of footnote markers +% (suggested by \contributor Georg Verweyen )} +% ^^A private mail, 2006/01/25 +%\medskip\noindent +% Angenommen, Sie möchten eine größere Menge von Fussnotenzeichen im Text +% erhalten, dann können die Einstellungen der Zahlen so definieret werden +%\begin{verbatim} +%\SetProtrusion +% [ context = footnote ] +% { font = */*/*/*/scriptsize } % adapt if necessary +% { 1 = { ,650}, 2 = { ,400}, 3 = { ,400}, 4 = { ,400}, 5 = { ,400}, +% 6 = { ,400}, 7 = { ,500}, 8 = { ,400}, 9 = { ,400}, 0 = { ,400} } +%\end{verbatim} +%\ifcmr\else\enlargethispage{2\baselineskip}\fi ^^A layout +% um damit den Kontext im Fussnoten-Befehl zu ändern. Dieser Befehl +% unterscheidet sich zwischen den verscheidenen Klassen. Für die Basisklassen z.B, % \pkg{article}, wäre es: +%\begin{verbatim} +%\newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont +% \microtypecontext{protrusion=footnote}\@thefnmark}}} +%\renewcommand*\@footnotemark{% +% \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi +% \new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax} +%\end{verbatim} +% Für die \pkg{memoir} Klasse, müssten Sie zusätzlich die automatische Erkennung +% mehrerer Fussnoten deaktivieren, welches ein hervorheben des Fussnotentextes +% verhindert. +%\begin{verbatim} +%\renewcommand*\@makefnmark{\hbox{\@textsuperscript{\normalfont +% \microtypecontext{protrusion=footnote}\@thefnmark}}} +%\let\m@mmf@prepare\relax +%\let\m@mmf@check\relax +%\end{verbatim} +% ^^A For other classes, the command would have to be changed in a similar way. +% +%\medskip\noindent +% Eine weitere Möglichkeit wäre es den Kontext für eine sprachabhängige Einstellung +% zu verwenden. +% Zum Beispiel, wenn Sie einen Text auf Französisch schreiben, können Sie +%\begin{verbatim} +%\microtypecontext{kerning=french} +%\end{verbatim} +% in der Präampel hinzufügen. Das hätte den Effekt, dass die +% Abstandseinstellungen des französischen Kontextes, für das Dokument übernommen würden. Sollten Teile des Dokuments in Englisch sein, könnten Sie schreiben +%\begin{verbatim} +%\textmicrotypecontext{kerning=}{English text!} +%\end{verbatim} +% um den Kontext zurückzusetzen, so dass die Interpunktion in diesen +% Teilen kein extra Zeichenabstand erhalten. +% +% Anstatt diese Befehle manuell zu Ihrem Dokument hinzuzufügen, können Sie +% \microtype\ auch mit der \opt {Babel}-Funktion laden +% (siehe Abteilung~\ref{sub:options-misc}). +% Die aktuelle Sprache wird dann automatisch erkannt und der Kontext +% dementsprechend angepasst. +% +%\medskip +%\Describe{Macro}{\DeclareMicrotypeBabelHook} +% {list of \pkg{babel} languages,context list} +% Natürlich kennt \microtype\ nicht jede typografische Besonderheit, jeder einzelen +% Sprache. +% Dieser Befehl ist ein Mittel, um zu lehren, wie man den Kontext anpassen +% kann, wenn eine bestimmte Sprache ausgewählt ist. Die Hauptkonfigurationsdatei +% enthält unter anderen die folgende Deklaration: +%\begin{verbatim} +%\DeclareMicrotypeBabelHook +% {french,francais,acadian,canadien} +% {kerning=french, spacing=} +%\end{verbatim} +% Folglich, wann immer Sie auf französische Sprache umschalten, wird die +% Abstandseinstellung im Kontext auf `|französisch|' geändert und der +% Abstandskontext zurüchgesetzt. +% Dieser Effekt greift nur dann, wenn das Paket mit der \opt {babel} Option geladen % wurde. Derzeit unterstützt \microtype\ französische, türkische und englische +% Buchstabenabstände (auch bekannt als \cmd\nonfrenchspacing). Für unbekannte +% Sprachen werden alle Kontexte zurückgesetzt. + +% +%\section{Erneute Betrachtung der Funktion Letterspacing}\label{sec:lettersp} +% +%\Describe{Macro}{\textls}{?amount,general text} +%\DescribeMacro{\textls*} +%\DescribeMacro{\lsstyle} +% Während die \opt{tracking} Funktion, die im Abschnitt~\ref{sub:tracking} +% beschrieben wurde, für Sätze von Schriftarten gilt, können sie letterspace +% benutzen um kürzere Stücke des Textes zu erzeugen, unabhängig von der Schriftart +% in dem sich der Schriftsatz befindet.\footnote{ +% Letterspacing sollte vorsichtig verwendet werden, insbesondere der +% Zeichenabstand der Kleinbuchstaben wird mit Abscheu von einigen Typpgrafen +% betrachtet. Falls sie wissen was sie tun, sollten Sie vielleicht kleine Kapitel % oder oder alle Kapitel nutzen. Eine andere Eigenschaft kann zur Betonung in +% Texten von Schriftarten verwendet werden.} +% Für solche Ad-hoc-Zeichenabstände, bestizt \microtype\ zwei Befehle, (unabhängig +% davon, ob die |tracking| Option aktiviert ist) die auf die gleiche Weise +% verwendet werden können wie die \LaTeX-Befehle: \cs{textls} -- welches auch im +% Mathemodus funktioniert -- erwartet der Text im notwendigen Argument, während +% \cs{lsstyle} `letterspacing' für alle nachfolgenden Schriften bis zum Ende der +% aktuellen Gruppe aktiviert wird. Die Favoriten-Version von \cs{textls} fügt keine % zusätzlichen Buchstabenabstände, vor oder nachdem Text ein, was für z.B +% Absatztitel nützlich sein kann. +% Standardmäßig wird jedes Zeichen mit 100/1000 \,em \,= \,0.1 \,em von einander +% getrennt, dieser Betrag kann im optionalen Argument von \cs {textls}, durch +% Verwendung des \cs {SetTracking} Befehl oder global über die \opt {letterspace} +% Paketoption, geändert werden, mit abnehmender Signifikanz in dieser Reihenfolge. +% +%\medskip +%\Describe{Macro}{\lslig}{ligature} +% Seitdem die Befehle \cs{textls} und \cs{lsstyle} auch die +% `\texttt{no ligatures}'-Schlüssel für die entsprechenden Schriftarten auswerten, +% brauchen Sie sich keine Gedanken mehr über das Schützen oder Trennen von Liganten % in den meisten Schriftarten zu machen. Jedoch, in bestimmten Situationen, kann es % zu einem Konflikt der Liganten, welche mit den gleichen Buchstaben beginnen, +% kommen, wobei einige von diesen verhindert werden sollten, während das bei +% anderen nicht geschehen soll. Beim letterspacing von Texten mit Textschriftsatz +% in Frakturschriftarten, sollen zum Beispiel, die Liganten 'ch', 'ck', 'tz' und +% 'sz' ~(`\textfrak {sz}') niemals getrennt werden, normalerweise sieht man auch +% 'St.' ~(`\textfrak {St.}') Liganten im letterspacing-Text. Darüber hinaus +% realisiert das \pkg{yfonts} Paket das kurze ~s~(`\textfrak{s:}') als den +% Liganten~`|s:|' andererseits, wenn der `ct'~Ligant und die anderen `lang~s' +% Liganten in Frakturschriftarten gefunden werden, unterdrückt werden. +% Es gibt zwei Wege dieses Problem zu lösen: Entweder deaktivieren Sie nicht die +% "`| s | und/ oder | c |" Ligaturen und +% trennen diejenigen, die getrennt werden müssen durch das Einfügen von +% `|{\kern0pt}|' oder \pkg{babel}'s Abkürzung oder deaktivieren Sie diese +% und schützen jene Liganten welche geschützt werden müssen, durch umschließen mit % dem \cs{lslig} Befehl. Damit liefern folgende Lösungen das gleiche Ergebnis +% (nämlich, `\textfrak{\lsstyle Aus:s{\kern0pt}ichts:los{\kern0pt}igkeit}'). +% +%\begin{verbatim}[morekeywords={[0]{\kern}}] +%\SetTracking[no ligatures={f}]{encoding = LY, family = yfrak}{100} +%\textfrak{\lsstyle Aus:s{\kern0pt}ichts:los{\kern0pt}igkeit} +%\end{verbatim} +%\begin{verbatim} +%\SetTracking[no ligatures={f,s,c}]{encoding = LY, family = yfrak}{100} +%\textfrak{\lsstyle Au\lslig{s:}si\lslig{ch}t\lslig{s:}losigkeit} +%\end{verbatim} +% +%\bigskip\noindent +%\DescribePackage{letterspace} +% Diese drei Befehle (mitsamt der \opt{letterspace} -Option, beschrieben in +% Abschnitt~\ref{sub:option-tracking}) sind auch in dem alternativen +% \letterspace\ Paket enthalten, welches ansich eine sehr stark abgespeckte Version % von \microtype\ ist, das eine Unterstützung für alle anderen Erweiterungen +% weglässt (zudem wurden die Möglichkeiten des \cs{SetTracking} Befehls weggelassen % und alle `|f|' Liganten werden deaktiviert, innere und äußere Abstände und der +% äußere Buchstabenabstand wurden auf ihre Standartwerte zurückgesetzt, so wie in +% Abschnitt~\ref{sub:tracking} beschrieben). Wenn Sie es bevorzugen auf +% \microtype's Besonderheiten zu verzichten, können Sie stattdesen das +% \letterspace\ Paket laden. Beide Pakete können nicht zur gleichen Zeit benutzt +% werden. +% +% Im Gegensatz zu \microtype, welches \LaTeX\ verlangt, arbeitet das \letterspace\ +% Paket auch mit \pkg{eplain} oder auch nur mit \pkg{miniltx}: beim Gebrauch von +% \pkg{eplain}, laden Sie das Paket mit \cmd\usepackage\ innerhalb +% \cmd\beginpackages~\dots\ \cmd\endpackages\ Umgebung, für \pkg{miniltx} +% (welches die Paketoptionen nicht unterstützt) einfach mit \cmd\input\ +% \file{letterspace.sty} laden. +% +% +%\section{Deaktivieren von Ligaturen(Bindungen)}\label{sec:disable-ligatures} +% +%\Describe{Macro}{\DisableLigatures}{?characters,set of fonts} +% Beim vollständigen Deaktivieren aller Liganten einer Schriftart (welches auch +% Kerning für diese Schriftart ausschaltet, senkt \textit{lowers} absichtlich die +% mikro-typografische Qualität des Textes, anstatt diese zu erhöhen, dies ist +% speziell für Schreibmaschine-Schriftarten nützlich, so dass, z.B. in einer +% kodierten Schriftart, `|\texttt{--}|' natürlich als `|--|', nicht als +% `\texttt{--}'gedruckt wird. \cs{DisableLigatures} kann dazu verwendet werden, um % auf gewöhnlichem Weg, eine Reihe von Schriftarten zu spezifizieren, für welche +% Liganten deaktiviert sein sollen, z.B für die Schriebmaschinenschrift kodiert in : +%\begin{verbatim} +%\DisableLigatures{encoding = T1, family = tt* } +%\end{verbatim} +% Es ist auch möglich nur ganz bestimmt Liganten zu deaktivieren. Das optionale +% Argument, kann eine durch Komma getrennte Liste von Zeichen enthalten, für die +% der Ligantenmechanismus unterbunden werden soll: +%\begin{verbatim} +%\DisableLigatures[?,!]{encoding = T1} % "\ifx\tagcode\undefined\else ^^A +% \normalfont\color{thegrey}inhibit ?` and !`, but not fi, --, >>, etc.\fi" +%\end{verbatim} +% Dabei ist der Buchstabe, mit dem der Ligant beginnt von Bedeutung. Dieser Befehl +% kann nur in der Präampel verwendet werden und auch nur einmal. Der Befehl +% fortert \pdftex\ 1.30 oder eine aktuellere Version. +% +% +%\section{Hinweise und Warnungen}\label{sec:caveats} +% +%\paragraph{Verwenden Sie Einstellungen, die zu Ihrer Schriftart passen.} +% Obwohl die Standardeinstellungen akzeptable Ergebnisse für die meisten Schriften +% liefern sollten, kann es sein das die spezielle Schriftart, welche Sie gerade +% verwenden, verschiedene Schriftformen hat, so dass mehr oder weniger Hervorhebung +% oder Vergrößerungen erforderlich sind. Insbesondere kursive Schriftformen +% können sich deutlich in unterschiedlichen Schriftarten unterscheiden, deshalb +% habe Ich mich dageben entscheiden Standarthervorhebungseinstellungen für diese +% anzubieten. Die Datei \file{test-microtype.tex} kann eine Hilfe, beim anpassen +% der Hervorhebungseinstellungen für eine Schriftart sein. +% +%\paragraph{Verwenden Sie keinen zu großen Wert für die Vergrößerung.} +% Font-expansion (Schriftartenvergrößerung) ist eine Funktion, welche die +% typographische Qualität des Dokuments verbessern soll, indem sie eine +% gleichmäßige Graustufe des Textblocks erzeugt (und potenziell die Verringerung +% der Zahl der erforderlichen Silbentrennungen). +% Wenn die Erweiterung oder Verkleinerung einer Schrift zu groß +% oder zu klein wird, so wird der Effekt ins Gegenteil gewandelt. Die Vergrößerung +% der Schriftarten um mehr als 2\%, d.h. der Wert der Einstellung \opt{Strecken} +% größer als 20 ist, erfordert ein geschultes Auge. +% Wenn Sie das Glück haben und im Besitz von mehreren Kopien einer +% multiplen Master-Schriftart sind, können Sie die Vergrößerungsgrenze bis +% auf 4\% erhöhen. +% +%\changes{v2.0}{2006/12/13}{Hinweis für Web-Dokumente im Hinblick auf ältere \pdftex\ Versionen} +%\paragraph{Verwenden Sie keine Schriftartvergrößerung für Web-Documente (mit +% älteren \pdftex\ Versionen).} +% Mit \pdftex\ Versionen die älter als die 1.40 Version sind, wird jede vergrößerte % Kopie der Schriftart in der Datei eingebettet, folglich kann die +% Dateigröße stark zunehmen (abhängig von Vergrößerungsgrenze und -schritt). +% Deshalb, für die Zuvorkommenheit und für Sparsamkeit der Bandbreite, aktivieren +% Sie nicht die Schriftartenvergrößerung, beim Erstellen von Datein die +% elektronisch verteilt werden. Mit \pdftex\ 1.40, +% welches eine andere Technik der Vergrößerung nutzt, kann die Erhöhung der +% Dateigröße vernachlässigt werden. +% +%\changes{v2.2}{2007/07/06}{add hint about extra leader dot +% (first discovered by \contributor Morten H\o gholm )} +% ^^A private mail, 2006/08/26 +%\paragraph{Möglicherweise möchten sie Hervorhebungen im Inhaltsverzeichnis deaktivieren.} +% In unglücklichen Fällen, könnte die aktivierte Hervorhebung, die Längenlinie im im Inhaltsverzeichnis und ähnliche Listen auf eine Weise verändern, so dass ein Excess-Leader Punkte einfügeführt werden muss. Die Lösung ist Hervorhebungen vorübergehend im Inhaltsverzeichnis zu deaktivieren: +%\begin{verbatim} +%\microtypesetup{protrusion=false} +%\tableofcontents +%\microtypesetup{protrusion=true} +%\end{verbatim} +% +%\changes{v1.9}{2005/07/10}{Hinzufügen von Hinweisen in \texttt{verbatim} Umgebungen} +%\todo{introduce option to patch \texttt{verbatim}} ^^A for Karl +%\paragraph{Möglicherweise möchten Sie die Hervorhebungen in der \texttt{verbatim} % Umgebung deaktivieren.} +% Wie Sie bereits wissen, wird \microtype\ standartmäßig die Zeichenhervorhebung in % allen Schriftarten aktiviert, die im Schriftartenset `|alltext|' enthalten sind. % Das schließt auch die Schreibmaschinenschrift mit ein. Obwohl es wirklich Sinn +% macht, die Schreibmaschine-Schriftart hervorzuheben, wenn Sie im laufenden Text +% erscheint (wie, zum Beispiel, in diesem Handbuch), ist dies wahrscheinlich nicht +% wünschenswert innerhalb der |verbatim| Umgebung. Jedoch hat +% \microtype\ kein Wissen über den Kontext, in dem eine Schriftart steht, dies wird % allein durch die Bestimmung der Attribute entschieden. +% Deshalb müssen Sie sich um die Deaktivierung der Hervorhebung in der |verbatim| +% Umgebung, selbst kümmern (d.h wenn Sie Hervorhebungen in der +% Schreibmaschinenschrift, nicht durch auswählen eines anderen Schriftsatzes +% insgesamt deaktivieren wollen). Obwohl der \cs{microtypesetup} Befehl natürlich % für Fälle wie diesen entwickelt wurde, könnten Sie es +% anstrengend finden ihn jedesmal zu wiederholen, wenn Sie ihn in der |verbatim| +% Umgebung öfters nutzen. Die folgende Zeile, die der Präampel hinzugefügt wird, +% hätte den selben Effekt: +%\changes{v2.3e}{2009/07/21}{suggest to patch \cmd\@verbatim\ instead of \cmd\verbatim} +%\begin{verbatim} +%\g@addto@macro\@verbatim{\microtypesetup{activate=false}} +%\end{verbatim} +% Falls sie das \pkg{fancyvrb} oder das \pkg{listings} Paket verwenden, ist dies +% nicht notwenig, da diese so konzipiert sind, das Sie in der entsprechenden +% Umgebung, die Hervorhebung in jedem Fall hemmen. +% +%\changes{v1.9e}{2006/07/10}{add hint about unknown encodings} +%\paragraph{Einstellungen für Griechisch/Thailändisch/Amerikanisch usw. Kodierungen +% sind bis jetzt noch nicht inbegriffen.} +% Die Standartsätze von Schriftarten, für welche die mikro-typrografischen +% Funktionen aktiviert werden (siehe Tabelle~\ref{tab:predefined-font-sets}), +% enthalten nur die Kodierungen für die auch Konfigurationen existieren. Deshalb, % wenn Sie eine andere Kodierung verwenden (z.B. , , etc.), wird +% \microtype\ nicht auf diese Schriftarten anwendbar sein. Sie müssen einen neuen +% Schriftsatz, einschließlich der Kodierung, definieren und aktivieren um Sie +% benutzen zu können(weitere Details, siehe +% Abschnitt~\ref{sec:font-sets}). Spätestens für die Hervorhebungen müssten Sie +% Einstellungen für die Schriftarten die in Frage kommen erstellen (siehe +% Abschnitt~\ref{sub:protrusion}). +% Selbstverständlich sind Beiträge für diese Art von Kodierung mehr als willkommen. +% +%\paragraph{Nehmen Sie nur dann Kerning-Anpassungen vor, wenn es üblich in der typografischen Tradition der Sprache ist.} +% Im Gegensatz zu Hervorhebung und der Vergrößerung, trägt zusätzliche Kerning +% nicht unbedingt zur Verbesserung der mikro-typographische Qualität des Dokuments % bei. Sie sollten das zusätzliche Kerning nur aktivieren, wenn Sie ein Dokument in % einer Sprache schreiben, dessen typografische Tradition ein solches Kerning +% garantiert. Wenn Sie zum Beispiel einen englischen Text schreiben, würden die +% Leser durch zusätzliche Leerzeichen vor dem Satzzeichen verwirrt werden. +% +%\changes{v2.3c}{2008/10/27}{add hint about spacing being experimental} +%\paragraph{Anpassung der Zwischenwortabstandes befindet sich noch in einem +% experimentellen Stadium.} +% Die Umsetzung dieser Eigenschaft in \pdftex\ ist nicht vollständig und kann zu +% den positiven Auswirkungen, auf die typographische Qualität, die Sie eventuell +% erwarten, nicht beitragen. In bestimmten Situationen kann es sogar zu +% unerwünschten Nebenwirkungen kommen. +% Deshalb, sollte die \opt {Abstand}option nicht blind gewählt werden. Es wird +% empfohlen mit den Einstellungen zu experimentieren, um zuverstehen wie die +% Eigenschaften funktionieren. +% +%\changes{v1.7}{2005/03/23}{add hint about compatibility} +%\paragraph{Kompatibilität und Interaktion mit anderen Paketen:} +% Das \microtype\ -Paket sollte sehr gut mit anderen +% \LaTeX\ -Paketen zusammen arbeiten (ausgenommen von \pkg{pdfcprot}). Jedoch da +% das Leben nicht perfekt ist, sind Probleme zu erwarten. Momentan sind folgende +% Probleme bekannt: +%\begin{itemize} +% \item Wenn Sie 8-Bit-Zeichen in der Konfiguration verwenden möchten, müssen Sie % zuerst das Paket \pkg{inputenc} laden. Das Verwenden von Unicode wird +% ebenfalls unterstützt (wenn Sie \pkg{inputenc} mit der |utf8| oder |utf8x| % option laden). +% Bei der Verwendung von mehreren Input-Kodierungen in einem Dokument, +% werden 8-Bit-Zeichen in den Einstellungen nur zuverlässig funktionieren, +% wenn Sie den |inputenc| Schlüssel spezifizieren. +%\changes{v2.3a}{2008/02/25}{add hint about \pkg{babel} having to be loaded first} +% \item Beim Laden des Pakets mit der \opt{babel}-Option, sollten Sie das +% \pkg{babel}-Paket vor \microtype\ laden. +%\changes{v2.3c}{2008/11/11}{add hint about partial incompatibility with \pkg{CJK}} +% \item Es ist derzeit nicht möglich, Charakter-spezifische Einstellungen für +% chinesische\slash japanischen\slash koreanischen Schriften zu erstellen. +% Deshalb, ist die einzige mikro-typografische Erweiterung, die mit dem +% \pkg {CJK} Paket arbeiten kann, die Schriftartvergrößerung. +%\end{itemize} +% +%\changes{v1.8}{2005/06/23}{add hint about error messages} +%\paragraph{Mögliche Fehlermeldungen und wie man diese beseitigt:} +%\begin{itemize} +%\lstset{deletekeywords={[1]{expansion,auto}},belowskip=-\smallskipamount,frame=none, +% xleftmargin=0pt,backgroundcolor=,basicstyle=\MacroFont\footnotesize} +%\changes{v1.9a}{2005/11/15}{add explanation for error message in mode} +% \item +%\begin{verbatim} +%! Font csnameendcsname=cmr10+20 at 10.0pt not loadable: Metric (TFM) file not found. +%\end{verbatim} +% Diese Fehlermeldung tritt auf, wenn Sie versuchen die Schriftartvergrößerung zu +% verwenden, während Sie eine - Ausgabe erstellen. Denken Sie daran, dass die % \emph{automatische} Schriftartenerweiterung nur als \pdftex\ im Modus +% funktioniert. Vergrößerung ist auch im Modus möglich. Dies erfordert, dass % alle Instanzen der erweiterten Schriftarten auf Ihrem \TeX\ -System existieren. +% +%\changes{v2.2}{2007/06/13}{add hint about error message with \pdftex\ 1.40} +% \item +%\begin{verbatim} +%! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. +%\end{verbatim} +% Die automatische Schriftartvergrößerung ist in \pdftex\ 1.40, darin verbessert +% worden, +% dass sie nicht nur mit Typ\,1 Schriften sondern, auch mit TrueType, OpenType und +% sogar auch mit nicht-eingebetteten Schriftarten arbeitet. Die obige Fehlermeldung % bedeutet entweder, dass Sie versuchen die Vergrößerung, auf eine Bitmap~(|pk|) +% Schriftart anzuwenden, die noch nicht möglich ist, oder dass die Schrift nicht +% gefunden werden kann, da z.B. deren Einträge fehlen. +% +%\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} +% und der Viewer beklagt sich über eine fehlende Schriftart, z.B der Adobe +% Reader auf diese Weise: +%\begin{verbatim}[aboveskip=\smallskipamount] +% Could not find a font in the Resources dictionary - using Helvetica instead. +%\end{verbatim} +% Mit \pdftex\ Versionen, die älter sind als 1.40, kann Schriftartvergrößerung nur +% dann angewandt werden, wenn die Schriftart in der Datei eingebettet wird. +% Falls Sie die obengenannte Fehlermeldung erhalten, kann Ihr \TeX\ System noch +% nicht mit PostScript-Schriftarten (z.B Times, Helvetica, Courier) arbeiten, da +% diese in die Basisdatei eingebettet werden müssen. In den meisten \TeX\ +% Distributionen, kann diese in der Datei \file{updmap.cfg} durch Einstellungen der +% |pdftexDownloadBase14| in |true| geändert werden. +% +%\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} +% Außerdem erfordern \pdftex\ Versionen die älter als 1.40 sind, Typ \,1-Schriften +% für die automatische Schriftarten-Vergrößerung. Wenn Sie eine Nachricht wie die +% obengenannte erhalten, haben Sie wahrscheinlich versucht, die +% Schriftartvergrößerung auf eine bitmap oder TrueType Schriftart anzuwenden. Bei +% älteren \pdftex\ Versionen ist dies nur möglich, wenn Sie manuell erweiterte +% Instanzen der Schriften erstellen. +%\ifcmr\else\pagebreak\fi ^^A layout +%\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 T1/cmr/m/n/10=ecrm1000 at 10.0pt not loaded: Not enough room left. +%\end{verbatim} +% Speicherparameter `|font_mem_size|` zu klein. +% \item +%\begin{verbatim} +%! TeX capacity exceeded, sorry [maximum internal font number (font_max)=2000]. +%\end{verbatim} +% Speicherparameter `|font_max|` zu klein. +% \item +%\begin{verbatim} +%! TeX capacity exceeded, sorry [PDF memory size (pdf_mem_size)=65536]. +%\end{verbatim} +% Speicherparameter `|pdf_mem_size|` zu klein (bei \pdftex\ Versionen, die älter +% sind als 1.30). +% +% Bei Anwendung von mikro-typografischen Erweiterung eines großes Dokumentes mit +% einer Menge von Schriftarten, kann die Speicherkapazität von \pdftex\ knapp +% werden. Dies kann durch Setzen der entsprechenden Parameter, auf einen größeren +% Wert erhöht werden. Für web2c-basierte Systeme, z.B \texlive, sollten Sie die +% Einstellungen in der Datei \file{texmf.cnf}, und für MiK\TeX in der Datei +% \file{miktex.ini} (für 2,4 Jahre ältere Versionen) bzw. \file{pdflatex.ini} (2,5 +% Jahre neuere Versionen) ändern. +% +%\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} +% Diese Warnung wird bei \pdftex\ Versionen vorkommen, die älter sind als 1.40.4, +% wenn Tracking \emph{und} Vergrößerung auf eine Schriftart angewendet werden. Sie +% ist harmlos und kann ignoriert werden. +%\end{itemize} +% +% +% +%\section{Beiträge} +% +% Ich wäre froh, Konfigurationsdateien für mehr Schriftarten beizufügen. Das +% Vorbereiten solcher Konfigurationen ist recht zeitaufwändig und erfordert viel +% Geduld. +% Um diesen Prozess zu erleichtern, schließt dieses Paket auch eine Testdatei ein, +% die verwendet werden kann, um zumindest die Hervorhebungseinstellungen überprüfen % zu können (\file{test-microtype.tex}). +%^^A +% Wenn Sie eine Konfigurationsdatei für eine andere Schriftart erstellt, oder +% Anregungen für Verbesserungen in den Standardkonfigurations-Dateien haben, würde % Ich diese dankbar entgegennehmen: \mailtoRS. +%\iffalse\footnote{^^A ... OK, so nobody has any ... +% Should you have lots of \pkg{pdfcprot} configuration files lying around, +% I can also provide you with a \TeX\ conversion script. Just ask me.} +%\fi +% +% +%\section{Danksagungen} +% +% Dieses Paket wäre sinnlos, wenn \contributor\thanh{} +% dieses \pdftex\ Programm überhautpt nicht erstellt hätte, welches die +% mikro-typographische Erweiterung einführt und so für die \TeX\ -Welt verfügbar +% macht. Darüber hinaus danke ich ihm für die Hilfe, dieses Paket zu +% verbessern und nicht zuletzt für die Förderung in \cite{ThanhPracTeX} und +% \cite{ThanhEuroTeX07} und anderswo. Also bedanke Ich mich bei ihm und dem Rest +% der \pdftex\ Mannschaft für die Widerlegung der Idee, dass \TeX\ tot ist, und für % dass Fixen der Programmfehler die ich gefunden habe. +% +% \contributor Harald Harders hat dazu beigetragen die +% Vorsprungseinstellungen für Adobe Minion möglich zu machen. Ich möchste ihm auch % für eine Reihe an Fehlermeldungen und Vorschlägen danken, die er gemacht hat. +% \contributor Andreas B\"uhmann hat die Möglichkeit +% vorgeschlagen, Bereiche von Schriftgrößen anzugeben und geistreich bei der +% Implementierung dieser zu helfen. Er hatte auch einige guten Ideen für das +% Management von komplexen Konfigurationen. +% \contributor Ulrich Dirr hat zahlreiche Vorschläge gemacht, +% besonders bezüglich der neuen Erweiterungen der Zwischenwortabstandsanpassung und % zum zusätzlichen Kerning. +% Mein Dank gilt auch \contributor Maciej Eder +% für die beigetragenen Einstellungen der Kodierung, sowie +% \contributor Karl Karlsson zur Bereitstellung von +% Einstellungen für die kyrillische Kodierung. +% Ich bedanke mich bei \contributor \'Elie Roux , +% das sie das |lua| Modul erschaffen hat. +% +% Ich danke \contributor Philipp Lehman das er seinem +% \pkg{csquotes} Paket die Möglichkeit hinzugefügt hat, die ursprüngliche Bedeutung % aller aktivierten Zeichen wiederherzustellen, so dass diese für die Zeichen in +% den Konfigurationsdateien verwendet werden können. +% Freundlicherweise hat \contributor Peter Wilson +% ein Häkchen in seinen \pkg{ledmac}/\pkg{ledpar} Paketen zur Verfügung gestellt, +% so dass kritische Editionen, schließlich auch vom Charakter-Vorsprung profitieren. +% +% Zusätzlich haben die folgenden Personen Bugs gemeldet, Vorschläge gemacht oder +% anders geholfen (in chronologischer Reihenfolge): +% \contributor Tom Kink , +% \contributor Herb Schulz , +% \contributor Michael Hoppe , +% \contributor Gary~L. Gray , +% \contributor Georg Verweyen , +% \contributor Christoph Bier , +% \contributor Peter Muthesius , +% \contributor Bernard Gaulle \,\textdagger, +% \contributor Adam Kucharczyk , +% \contributor Mark Rossi , +% \contributor Stephan Hennig , +% \contributor Michael Zedler , +% \contributor Herbert Vo\ss{} , +% \contributor Ralf Stubner , +% \contributor Holger Uhr , +% \contributor Peter Dyballa , +% \contributor Morten H\o gholm , +% \contributor Steven Bath , +% \contributor Daniel Flipo , +% \contributor Michalis Miatidis , +% \contributor Sven Naumann , +% \contributor Ross Hetherington , +% \contributor Geoff Vallis , +% \contributor Steven~E. Harris , +% \contributor Karl Berry , +% \contributor Peter Meier , +% \contributor Nathan Rosenblum , +% \contributor Wolfram Schaalo , +% \contributor Vasile Gaburici , +% \contributor Sveinung Heggen , +% \contributor Colin Rourke , +% \contributor Maverick Woo , +% \contributor Silas~S. Brown , +% \contributor Christian Stark +% and +% \contributor Marcin Borkowski . +% +% +%\begin{thebibliography}{} +% \bibitem[Th\`anh 2000]{ThanhThesis} +% \thanh, `Micro-typographic extensions to the \TeX\ typesetting system', +% \newblock Diss. Masaryk University Brno 2000, +% \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 ^^A obsolete +% \bibitem[Th\`anh 2001]{ThanhTUG} +% \thanh, `Margin Kerning and Font Expansion with \pdftex', +% \newblock in: \textit{TUGBoat}, vol.~22 (2001), no.~3: +% `Proceedings of the 2001 Annual Meeting', pp.~146--148. +% \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb22-3/tb72thanh.pdf}) +%\fi +% +% \bibitem[Th\`anh 2004]{ThanhPracTeX} +% \thanh, `Micro-typographic extensions of \pdftex\ in practice', +% \newblock in: \textit{TUGBoat}, vol.~25 (2004), no.~1: +% `Proceedings of the Practical \TeX\ 2004 Conference', pp.~35--38. +% \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb25-1/thanh.pdf}) +% +%\iffalse +% \bibitem[Th\`anh 2005]{ThanhEuroTeX05} +% \thanh, `Experiences with micro-typographic extensions of \pdftex\ in practice', +% \newblock in: Euro\TeX\ 2005 Proceedings +% ^^A 15th~Annual Meeting of the European \TeX\ Users, +% ^^A March~7 -- March~11, 2005, Abbaye des Pr\'emontr\'es, Pont-\`a-Mousson, +% [=~\textit{TUGBoat}, vol.~27 (2006), no.~0], +% pp.~159--164. +% \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb27-0/thanh.pdf}) +% ^^A = \url{http://www.dante.de/dante/events/eurotex/papers/TUT07.pdf} +%\fi +% +% \bibitem[Th\`anh 2008]{ThanhEuroTeX07} +% \thanh, `Font-specific issues in \pdftex', +% \newblock in: \textit{TUGBoat}, vol.~29 (2008), no.~1: +% `EuroBacho\TeX\ 2007 Proceedings', pp.~36--41. +% \newblock (Online at \url{http://www.tug.org/TUGboat/Articles/tb29-1/tb91thanh-fonts.pdf}) +% +% \bibitem[\pdftex\ manual]{pdftexman} +% \thanh, Sebastian Rahtz, Hans Hagen, Hartmut Henkel, Pawe\l\ Jackowski, Martin Schr\"oder, +% \emph{The \pdftex\ user manual}, +% \newblock 25 January 2007. +% \newblock (\ctanurl{systems/pdftex/}; +% latest version at \url{http://sarovar.org/projects/pdftex/}) +% ^^A or even \url{http://foundry.supelec.fr/scm/?group_id=23} +% +% \bibitem[Fontname]{fontname} +% Karl Berry, \emph{Fontname. Filenames for \TeX\ fonts}, +% \newblock July 2009. +% \newblock (\ctanurl{info/fontname/fontname.pdf}) +% +% \bibitem[\LaTeXe\ font selection]{fntguide} +% \LaTeX3 Project Team, \emph{\LaTeXe\ font selection}, +% \newblock 27 November 2005. +% \newblock (\ctanurl{macros/latex/doc/fntguide.pdf}) +% +% \bibitem[\pkg{pdfcprot}]{pdfcprot} +% Carsten Schurig, Tobias Schlemmer, \emph{The \pkg{pdfcprot}|.sty| package}, +% \newblock 10 June 2005. +% \newblock (\ctanurl{macros/latex/contrib/pdfcprot/}) +% +% \bibitem[\pkg{soul}]{soul} +% Melchior Franz, \emph{The \pkg{soul} package}, +% \newblock 17 November 2003. +% \newblock (\ctanurl{macros/latex/contrib/soul/}). +%\changes{v2.3a}{2008/01/06}{mention \pkg{soulutf8}} +% \newblock See also Heiko Oberdiek's extension of this package, +% \pkg{soulutf8}, which adds Unicode support. +% \newblock (\ctanurl{macros/latex/contrib/oberdiek/}) +%\end{thebibliography} +% +% +%\section{Short history} +%\changes{v1.5}{2004/12/11}{add `Short history'} +% +% The comprehensive list of changes can be +% \expandafter\ifx\csname r@sec:changes\endcsname\relax +% obtained by running `\texttt{makeindex \mbox{-s gglo.ist} +% \mbox{-o microtype.gls} microtype.glo}'\else +% found in appendix~\ref{sec:changes}\fi. +% The following is a list of all changes relevant in the user land; bug and +% compatibility fixes are swept under the rug. Numbers in brackets indicate +% the relevant section in this manual. +% +%\newenvironment{History} +% {\list\labelitemi +% {\leftmargin 0pt +% \parsep 0pt +% \def\refsection##1{[##1]} +% \def\makelabel##1{\hss\llap{##1}}}} +% {\endlist} +%\newcommand\Version[2]{ +% \VersionDate{#1}{#2} +% \vskip\topsep +% \pagebreak[2] +% \item[#1](#2) +% \vskip\topsep +% \nopagebreak} +%\newcommand\VersionDate[2]{^^A needed in the Change history +% \global\expandafter\def\csname MTversiondate#1\endcsname{#2}} +% +%\begin{History} +% +%\Version{\expandafter\@gobble\fileversion}{\filedate} +% \item |lua| functions moved to a dedicated file +% \item Protrusion settings for encoded Minion +% +%\Version{2.3e}{2009/11/09} +% \item Support for the Cyrillic encoding (protrusion, expansion, spacing) +% +%\Version{2.3d}{2009/03/27} +% \item New default for expansion option `\opt{step}': 1, if \pdftex\ $\geq$ 1.40 +% \refsection{\ref{sub:options-expansion}} +% +%\Version{2.3c}{2008/11/11} +% \item Support for \luatex\ enabled by default +% +%\VersionDate{2.3b}{2008/06/04} +% +%\VersionDate{2.3a}{2008/02/29} +% +%\Version{2.3}{2007/12/23} +% \item New key `|outer kerning|' for \cs{SetTracking} to customise outer kerning +% \refsection{\ref{sub:tracking}} +% \item Adjust protrusion settings for tracking even if protrusion is not enabled +% \item New option `\opt{verbose}|=silent|' to turn all warnings into mere messages +% \refsection{\ref{sub:options-misc}} +% \item The \letterspace\ package also works with \pkg{eplain} or \pkg{miniltx} +% \refsection{\ref{sec:lettersp}} +% +%\Version{2.2}{2007/07/14} +% \item Improvements to tracking/letterspacing: retain kerning (\pdftex\ $\geq$ 1.40.4); +% automatically adjust protrusion settings +% \item New key `|no ligatures|' for \cs{SetTracking} to disable selected or +% all ligatures (\pdftex\ $\geq$ 1.40.4) +% \refsection{\ref{sub:tracking}} +% \item New keys `|spacing|' and `|outer spacing|' for \cs{SetTracking} to +% customise interword spacing +% \refsection{\ref{sub:tracking}} +% \item Possibility to expand a font with different parameters (\pdftex\ $\geq$ 1.40.4) +% ^^A ; new option `\opt{copyfonts}' +% \refsection{\ref{sub:expansion}} +% \item New optional argument for \cs{DisableLigatures} to disable selected ligatures only +% \refsection{\ref{sec:disable-ligatures}} +% \item New command \cs{DeclareMicrotypeVariants} to specify variant suffixes +% \refsection{\ref{sub:config-file}} +% \item New command \cs{textmicrotypecontext} as a wrapper for \cs{microtypecontext} +% \refsection{\ref{sec:context}} +% \item Protrusion settings for Bitstream Letter Gothic +%^^A \item Basic support for \luatex\ (if generated with the |lua| option) +% +%\Version{2.1}{2007/01/21} +% \item New command \cs{lslig} to protect ligatures in letterspaced text +% \refsection{\ref{sec:lettersp}} +% +%\Version{2.0}{2007/01/14} +% \item Support for the new extensions of \pdftex\ $\geq$ 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}') +% \refsection{\ref{sub:tracking}, \ref{sub:spacing}, \ref{sub:kerning}} +% \item New commands \cs{textls} and \cs{lsstyle} for letterspacing, +% new option `\opt{letterspace}' +% \refsection{\ref{sub:option-tracking}, \ref{sec:lettersp}} +% \item New option `\opt{babel}' for automatic micro-typographic adjustment to +% the selected language +% \refsection{\ref{sub:options-misc}, \ref{sec:context}} +% \item New font sets: `|smallcaps|', `|footnotesize|', `|scriptsize|' +% \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}} +% \item New package `\letterspace' providing the commands for robust and +% hyphenatable letterspacing +% \refsection{\ref{sec:lettersp}} +% +%\VersionDate{1.9f}{2006/09/09} +% +%\Version{1.9e}{2006/07/28} +% \item New key `|inputenc|' to specify the lists' input encodings +% \refsection{\ref{sec:fine-tuning}} +% \item Protrusion settings for Euler math fonts +% +%\Version{1.9d}{2006/05/05} +% \item Support for the Central European encoding +% (protrusion, inheritance) +% \item Protrusion settings for various Euro symbol fonts (Adobe, , \pkg{marvosym}) +% \item Support for Unicode input in the configuration (\pkg{inputenc}/|utf8|) +% +%\Version{1.9c}{2006/02/02} +% \item Protrusion settings for Garamond +% +%\VersionDate{1.9b}{2006/01/20} +% +%\Version{1.9a}{2005/12/05} +% \item Defer setup until the end of the preamble +% ^^A ; consequently, no need to +% ^^A change font defaults before loading \microtype, or to put it the other +% ^^A way round, \microtype\ may now be loaded at any time +% ^^A ; new option `\opt{defersetup}' +% \item Inside the preamble, \cs{microtypesetup} accepts all package options +% \refsection{\ref{sub:options-cmd}} +% \item Protrusion settings for encoded Charter +% +%\Version{1.9}{2005/10/28} +% \item New command \cs{DisableLigatures} to disable ligatures of fonts +% (\pdftex\ $\geq$ 1.30) +% \refsection{\ref{sec:disable-ligatures}} +% \item New command \cs{microtypecontext} to change the configuration context; +% new key `|context|' for the configuration commands +% \refsection{\ref{sec:context}} +% \item New key `|font|' to add single fonts to the font sets +% \refsection{\ref{sec:font-sets}} +% \item New key `|preset|' to set all characters to the specified value before +% loading the lists +% \item Value `|relative|' renamed to `|character|' for `|unit|' keys +% \item Support for the Polish encoding (protrusion, expansion, inheritance) +% \item Support for the Vietnamese encoding (protrusion, expansion, inheritance) +%^^A \item `\opt{DVIoutput}' option will work with \texlive\ 2004 +% +%\Version{1.8}{2005/06/23} +%^^A \item If font substitution has occurred, the settings for the substitute will +%^^A be used instead of those for the selected font +% \item New command \cs{DeclareMicrotypeSetDefault} to declare the default font sets +% \refsection{\ref{sec:font-sets}} +% \item New option `\opt{config}' to load a different configuration file +% \refsection{\ref{sub:options-misc}} +% \item New option `\opt{unit}' to measure protrusion factors relative to a +% dimension instead of the character width +% \refsection{\ref{sub:protrusion}} +% \item Renamed commands from \cs{..MicroType..} to \cs{..Microtype..} +% \item Protrusion settings for math fonts +% \item Protrusion settings for Times in encoding completed +% \item The `|allmath|' font set also includes encoding +%^^A \item 8-bit characters in the configuration finally work as advertised, +%^^A even if made active by the \pkg{csquotes} package +% \item When using the \pkg{ledmac} package, character protrusion will work +% for the first time ever (\pdftex\ $\geq$ 1.30) +% +%\Version{1.7}{2005/03/23} +% \item Possibility to specify ranges of font sizes in the set declarations +% and protrusion and expansion settings +% \refsection{\ref{sec:font-sets}, \ref{sec:fine-tuning}} +%^^A \item Always take font size into account when trying to find protrusion resp. +%^^A expansion settings for a given font +%^^A \refsection{\ref{sec:fine-tuning}} +% \item New command \cs{LoadMicrotypeFile} to load a font configuration file manually +% \refsection{\ref{sub:config-file}} +% \item Hook \cs{Microtype@Hook} for font package authors +% \refsection{\ref{sub:hook}} +% \item New option `\opt{verbose}|=errors|' to turn all warnings into errors +%^^A \item Disable expansion inside \cmd\showhyphens +% \item Warning when running in draft mode +% +%\VersionDate{1.6a}{2005/02/02} +% +%\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 +% \refsection{\ref{sub:options-protrusion}, \ref{sec:fine-tuning}} +% \item When \pdftex\ is too old to expand fonts automatically, expansion +% has to be enabled explicitly, automatic expansion will be disabled +% \refsection{\ref{sub:options-microtype}} +%^^A \item Protrusion settings of digits improved +% \item Use \etex\ extensions, if available +% +%\Version{1.5}{2004/12/15} +% \item When output mode is , font expansion has to be enabled explicitly, +% automatic expansion will be disabled +% \refsection{\ref{sub:options-microtype}} +% \item New option `\opt{selected}' to enable selected expansion, +% default: |false| +% \refsection{\ref{sub:options-expansion}, \ref{sub:expansion}} +% \item New default for expansion option `\opt{step}': 4 (min(\opt{stretch},\opt{shrink})/5) +% \refsection{\ref{sub:options-expansion}} +% \item Protrusion settings for Bitstream Charter +% +%\VersionDate{1.4b}{2004/11/26} +%^^A\Version{1.4b}{2004/11/26} +%^^A \item \cs{UseMicrotypeSet} requires the set to be declared +%^^A \refsection{\ref{sec:font-sets}} +% +%\VersionDate{1.4a}{2004/11/17} +% +%\Version{1.4}{2004/11/12} +% \item Set up fonts independently from \LaTeX\ font loading +%^^A (therefore, no risk of overlooking fonts anymore, and the package may +%^^A be loaded at any time) +%^^A \item \cs{microtypesetup} now sets the correct level of protrusion +%^^A \refsection{\ref{sub:options-cmd}} +% \item New option: `\opt{final}' +% \refsection{\ref{sub:options-misc}} +% +%\VersionDate{1.3}{2004/10/27} +% +%\Version{1.2}{2004/10/03} +% \item New font sets: `|allmath|' and `|basicmath|' +% \refsection{\ref{sec:font-sets}, table~\ref{tab:predefined-font-sets}} +% \item Protrusion settings for Computer Modern Roman math symbols +% \item Protrusion settings for encoding completed for Computer Modern +% Roman and Adobe Garamond +%^^A \item If an alias font name is specified, it will be used as an alternative, +%^^A not as a replacement \refsection{\ref{sub:config-file}} +% +%\Version{1.1}{2004/09/21} +% \item Protrusion settings for Adobe Minion +% \item New command: \cs{DeclareCharacterInheritance} +% \refsection{\ref{sub:inherit}} +% \item Characters may also be specified as octal or hexadecimal numbers +% \refsection{\ref{sec:fine-tuning}} +%^^A \item Configuration file names in lowercase [\ref{sub:config-file}] +% +%\Version{1.0}{2004/09/11} +% \item First release +%\end{History} +% +% +%\def\AppendixSettings{ +% \addtolength\textwidth{50pt} +% \addtolength{\oddsidemargin}{-50pt} +% \setlength{\columnwidth}{\textwidth} +% \setlength{\hsize}{\textwidth} +% \setlength{\linewidth}{\textwidth} +% \footnotesize +%} +%\def\LPPLSettings{ +%\changes{v1.9e}{2006/06/13}{include } +% \let\LPPLicense\empty +% \def\endLPPLicense{\endmulticols\endgroup} +% \def\LPPLsection##1{\begin{multicols}{2}[\section{##1}][12\baselineskip]} +% \def\LPPLsubsection##1{\end{multicols}\begin{multicols}{2}[\subsection*{##1}][6\baselineskip]} +% \def\LPPLsubsubsection{\subsubsection*} +% \let\LPPLparagraph\textit +% \let\LPPLfile\file +% \def\textsc##1{\acronym{\MakeUppercase{##1}}} +% \lstset{gobble=2,basicstyle=\MacroFont\tiny,commentstyle=,aboveskip=\smallskipamount} +% \let\oldmakeatletter\makeatletter +% \long\def\makeatletter##1\makeatother{\let\makeatletter\oldmakeatletter} +% \MakePercentComment +%} +% +%\StopEventually{ +% \GeneralChanges{Documentation} +% \newpage +% \appendix +% \AppendixSettings +% \typeout{:?1000} ^^A tell WinEdt not to bother about overfull boxes +% \PrintChanges +% \PrintIndex +% \typeout{:?1111} +% \InputIfFileExists{lppl.tex}\LPPLSettings\relax +%} +% +% \GeneralChanges* +% +% ^^A ========================================================================= +% +% ^^A Heiko Oberdiek's fix from latexbugs (latex/3540): +%\begingroup +% \def\x\begingroup#1\@nil{\endgroup +% \def\DoNotIndex{\begingroup +% \@tfor\@tempa:=\#\$\&\^\_\|\~\ \<\do{\expandafter\@makeother\@tempa}#1}} +%\expandafter\x\DoNotIndex\@nil +%\def\PercentIndex{}\def\LeftBraceIndex{}\def\RightBraceIndex{} +% ^^A also index new ifs: +%\def\@newif{newif}\newif\if@newif +%\def\macro@finish{\macro@namepart +% \ifx\macro@namepart\@newif\@tempswatrue\else\@tempswafalse\fi +% \ifnot@excluded +% \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}\@tempa +% \fi +% \if@newif +% \edef\@tempa{\noexpand\SpecialMainIndex +% {\bslash\expandafter\@gobbletwo\macro@namepart true}}\@tempa +% \edef\@tempa{\noexpand\SpecialMainIndex +% {\bslash\expandafter\@gobbletwo\macro@namepart false}}\@tempa +% \fi +% \if@tempswa\@newiftrue\else\@newiffalse\fi +%} +% +% +%\DoNotIndex{\!,\",\',\(,\),\*,\+,\,,\-,\.,\/,\:,\;,\<,\=,\>,\?,\[,\\,\],\`, +% \#,\$,\&,\^,\_,\|,\~,\ , +% \advance,\afterassignment,\aftergroup,\begingroup,\bgroup,\catcode,\char, +% \chardef,\csname,\def,\divide,\edef,\egroup,\else,\endcsname,\endgroup, +% \endinput,\escapechar,\everypar,\expandafter,\fi,\futurelet,\gdef,\global, +% \hbadness,\hbox,\hsize,\hskip,\if,\ifcase,\ifcat,\ifdim,\iffalse,\ifhbox, +% \ifhmode,\ifmmode,\ifnum,\iftrue,\ifx,\immediate,\input,\inputlineno,\jobname, +% \kern,\lastskip,\let,\lowercase,\meaning,\multiply,\newlinechar,\noexpand, +% \number,\or,\parfillskip,\pretolerance,\relax,\setbox,\showboxdepth,\string, +% \the,\tolerance,\unkern,\unskip,\uppercase,\vbox,\wd,\write,\xdef} +%^^A\DoNotIndex{\font,\fontdimen,\nullfont,\sfcode,\spacefactor,\spaceskip, +%^^A \xspaceskip} ^^A tex +%\DoNotIndex{\currentgrouptype,\detokenize,\dimexpr,\eTeXversion,\ifcsname, +% \ifdefined,\numexpr} +%^^A\DoNotIndex{\fontcharwd,\iffontchar} ^^A e-tex +%\DoNotIndex{\pdfannot,\pdfescapestring,\pdfmatch,\pdfoutput,\pdfstrcmp, +% \pdftexrevision,\pdftexversion} +%^^A\DoNotIndex{\(ef,lp,rp,kn(ac,bc),(kn,sh,st)bs)code,\(left,right)marginkern, +%^^A \tagcode,\letterspacefont,\pdfcopyfont,\pdffontexpand,\pdfnoligatures, +%^^A \pdfprotrudechars,\pdfadjust(interwordglue,spacing),\pdf(app,prep)endkern, +%^^A \pdftracingfonts} ^^A pdftex +%\DoNotIndex{\directlua,\luatexversion} ^^A luatex +%\DoNotIndex{\eplain,\usepkg@pkg} ^^A eplain +%\DoNotIndex{\@backslashchar,\@cclv,\@cclvi,\@classoptionslist,\@currext, +% \@currname,\@defaultunits,\@empty,\@expandtwoargs,\@firstofone,\@firstoftwo, +% \@gobble,\@gobbletwo,\@ifl@aded,\@ifpackagelater,\@ifpackageloaded,\@ifstar, +% \@ifundefined,\@let@token,\@m,\@makeother,\@minus,\@nameuse,\@ne,\@nil,\@nnil, +% \@onelevel@sanitize,\@onlypreamble,\@percentchar,\@pkgextension,\@plus, +% \@ptionlist,\@removeelement,\@secondoftwo,\@spaces,\@sptoken,\@tempa,\@tempb, +% \@tempc,\@tempcnta,\@tempcntb,\@tempdima,\@typeset@protect,\@undefined, +% \@unprocessedoptions,\@unusedoptionlist,\@xobeysp,\check@icr,\color@begingroup, +% \color@endgroup,\g@addto@macro,\hmode@bgroup,\m@ne,\maybe@ic,\maybe@ic@, +% \nfss@text,\not@math@alphabet,\on@line,\p@,\set@display@protect,\strip@prefix, +% \strip@pt,\tw@,\z@,\z@skip,\active,\documentclass,\leavevmode,\makeatletter, +% \maxdimen,\newcommand,\newcount,\newdimen,\newif,\newskip,\newtoks,\nobreak, +% \nonfrenchspacing,\normalsize,\renewcommand,\space, +% \AtBeginDocument,\AtEndOfPackage,\CheckCommand,\CurrentOption, +% \DeclareRobustCommand,\IfFileExists,\InputIfFileExists,\MessageBreak, +% \PackageError,\PackageInfo,\PackageWarning,\RequirePackage, +% \@@enc@update,\cf@encoding,\f@encoding} +%^^A\DoNotIndex{\add@accent,\curr@fontshape,\define@newfont,\do@subst@correction, +%^^A \f@size,\font@name,\normalfont,\pickup@font,\selectfont,\set@fontsize, +%^^A \showhyphens} ^^A latex +%\DoNotIndex{\XeTeXversion} ^^A xetex +%\DoNotIndex{\normalpdfoutput,\normalpdftexversion,\normalpdftexrevision} ^^A tex live +%\DoNotIndex{\foreign@language,\languagename,\select@language,\shorthandoff} ^^A babel +%\DoNotIndex{\percentsign} ^^A babel/spanish,galician,mexican +%\DoNotIndex{\CJK@ifundefined,\CJK@plane,\CJK@temp,\CJK@addcmap} ^^A CJK,CJKutf8 +%\DoNotIndex{\@disablequotes} ^^A csquotes +%\DoNotIndex{\pdfstringdefDisableCommands,\pdfstringdefWarn} ^^A hyperref +%\DoNotIndex{\ifpdf} ^^A ifpdf +%\DoNotIndex{\@inpenc@undefined@,\IeC,\inputencoding,\inputencodingname} ^^A inputenc +%\DoNotIndex{\UTFviii@defined} ^^A inputenc/utf8 +%\DoNotIndex{\PrerenderUnicode,\unicode@charfilter} ^^A inputenc/utf8x +%\DoNotIndex{\define@key,\KV@@sp@def,\setkeys} ^^A keyval +%\DoNotIndex{\l@dunhbox@line} ^^A ledmac,ledpar +%\DoNotIndex{\lst@ProcessLetter} ^^A listings +%\DoNotIndex{\pdf@escapestring} ^^A pdftexcmds +%\DoNotIndex{\py@macron} ^^A pinyin +%\DoNotIndex{\SOUL@,\soulregister} ^^A soul +%\DoNotIndex{\tikz@expandcount} ^^A tikz +%\DoNotIndex{\conditionally@traceoff} ^^A trace +%\DoNotIndex{\x,\MT@dinfo,\MT@dinfo@nl,\tracingmicrotype,\tracingmicrotypeinpdf, +% \ifMT@inannot,\MT@inannottrue,\MT@inannotfalse,\MT@addto@annot,\MT@pdf@annot, +% \MT@show@pdfannot,\iftracingmicrotypeinpdfall,\tracingmicrotypeinpdfalltrue, +% \tracingmicrotypeinpdfallfalse,\DeclareMicroTypeSet,\DeclareMicroTypeAlias, +% \UseMicroTypeSet,\LoadMicroTypeFile,\MicroType@Hook} ^^A microtype +% +% ^^A ------------------------------------------------------------------------- +% +%\newpage +%\ImplementationSettings +%\ifpdf\hypersetup{bookmarksopen=false}\fi +% +%\section{Implementation} +% +% The \pkg{docstrip} modules in this file are: +% \begin{description} +% \item[|driver|] The documentation driver, only visible in the \file{dtx} file. +% \item[|package|] The code for the \microtype\ package (\file{microtype.sty}). +% \begin{description} +% \item[|letterspace|] The code for the \letterspace\ package (\file{letterspace.sty}). +% \item[|lua|] Code for \luatex\ (\microtype\ only). +% \item[|plain|] Code for \pkg{eplain}, \pkg{miniltx} (\letterspace\ only). +% \item[|debug|] Code for additional output in the log file. +% \\Used for -- surprise! -- debugging purposes. +% \end{description} +% \item[|config|] Surrounds all configuration modules. +% \begin{description} +% \item[|cfg-t|] Surrounds (Latin) text configurations. +% \begin{description} +% \item[|m-t|] The main configuration file (\file{microtype.cfg}). +% \item[|bch|] Settings for Bitstream Charter (\file{mt-bch.cfg}). +% \item[|blg|] Settings for Bitstream Letter Gothic (\file{mt-blg.cfg}). +% \item[|cmr|] Settings for Computer Modern Roman (\file{mt-cmr.cfg}). +% \item[|pad|] Settings for Adobe Garamond (\file{mt-pad.cfg}). +% \item[|ppl|] Settings for Palatino (\file{mt-ppl.cfg}). +% \item[|ptm|] Settings for Times (\file{mt-ptm.cfg}). +% \item[|pmn|] Settings for Adobe Minion (\file{mt-pmn.cfg}). +% \\Contributed by \contributor Harald Harders . +% \item[|ugm|] Settings for Garamond (\file{mt-ugm.cfg}). +% \end{description} +% \item[|cfg-u|] Surrounds non-text configurations ( encoding). +% \begin{description} +% \item[|msa|] Settings for `a' symbol font (\file{mt-msa.cfg}). +% \item[|msb|] Settings for `b' symbol font (\file{mt-msb.cfg}). +% \item[|euf|] Settings for Euler Fraktur font (\file{mt-euf.cfg}). +% \item[|eur|] Settings for Euler Roman font (\file{mt-eur.cfg}). +% \item[|eus|] Settings for Euler Script font (\file{mt-eus.cfg}). +% \end{description} +% \item[|cfg-e|] Surrounds Euro symbol configurations. +% \begin{description} +% \item[|zpeu|] Settings for Adobe Euro symbol fonts (\file{mt-zpeu.cfg}). +% \item[|euroitc|] Settings for Euro symbol fonts (\file{mt-euroitc.cfg}). +% \item[|mvs|] Settings for \pkg{marvosym} Euro symbol (\file{mt-mvs.cfg}). +% \end{description} +% \end{description} +% \item[|test|] A helper file that may be used to create and test +% protrusion settings\\(\file{test-microtype.tex}). +% \end{description} +% And now for something completely different. +% +% \begin{macrocode} +%<*package|letterspace> +% \end{macrocode} +% +%\subsection{Preliminaries} +% +%\begin{macro}{\MT@MT} +% This is us. +% \begin{macrocode} +\def\MT@MT +% {microtype} +% {letterspace} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@fix@catcode} +%\changes{v1.3}{2004/10/27}{check some category codes (compatibility with \pkg{german})} +%\changes{v1.5}{2004/12/03}{reset catcode of `\texttt{\^}' (compatibility with \pkg{chemsym})} +%\changes{v2.3a}{2007/12/29}{fix catcodes earlier, and also for the \letterspace\ package} +% We have to make sure that the category codes of some characters are correct +% (the \pkg{german} package, for instance, makes |"| active). Probably overly +% cautious. Ceterum censeo: it should be forbidden for packages to change +% catcodes within the preamble. +%\begin{macro}{\MT@restore@catcodes} +% Polite as we are, we'll restore them afterwards. +% \begin{macrocode} +\let\MT@restore@catcodes\@empty +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\def\MT@fix@catcode#1#2{% + \edef\MT@restore@catcodes{% + \MT@restore@catcodes + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +%\MT@fix@catcode{17}{14}% ^^Q (comment) +\MT@fix@catcode{24} {9}% ^^X (ignore) +%\MT@fix@catcode{33}{12}% ! +%\MT@fix@catcode{34}{12}% " +\MT@fix@catcode{36} {3}% $ (math shift) +\MT@fix@catcode{39}{12}% ' +\MT@fix@catcode{42}{12}% * +\MT@fix@catcode{43}{12}% + +\MT@fix@catcode{44}{12}% , +\MT@fix@catcode{45}{12}% - +\MT@fix@catcode{58}{12}% : +\MT@fix@catcode{60}{12}% < +\MT@fix@catcode{61}{12}% = +\MT@fix@catcode{62}{12}% > +%\MT@fix@catcode{63}{12}% ? +\MT@fix@catcode{94} {7}% ^ (superscript) +\MT@fix@catcode{96}{12}% ` +%\MT@fix@catcode{124}{12}% | +% \end{macrocode} +%\end{macro} +% 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} +%<*package> +\newcommand*\DeclareMicrotypeSet[3][]{} +\newcommand*\UseMicrotypeSet[2][]{} +\newcommand*\DeclareMicrotypeSetDefault[2][]{} +\newcommand*\SetProtrusion[3][]{} +\newcommand*\SetExpansion[3][]{} +\newcommand*\SetTracking[3][]{} +\newcommand*\SetExtraKerning[3][]{} +\newcommand*\SetExtraSpacing[3][]{} +\newcommand*\DisableLigatures[2][]{} +\newcommand*\DeclareCharacterInheritance[3][]{} +\newcommand*\DeclareMicrotypeVariants[1]{} +\newcommand*\DeclareMicrotypeAlias[2]{} +\newcommand*\LoadMicrotypeFile[1]{} +\newcommand*\DeclareMicrotypeBabelHook[2]{} +\newcommand*\microtypesetup[1]{} +\newcommand*\microtypecontext[1]{} +\newcommand*\textmicrotypecontext[2]{#2} +\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{% +% +\newcommand*\lsstyle{} +\newcommand\textls[2][]{} +\def\textls#1#{} +\newcommand*\lslig[1]{#1} +%<*package> +} +% \end{macrocode} +% These commands also have a starred version. +% \begin{macrocode} +\def\DeclareMicrotypeSet#1#{\@gobbletwo} +\def\DeclareMicrotypeVariants#1#{\@gobble} +% \end{macrocode} +% Set declarations are only allowed in the preamble (resp. the main +% configuration file). The configuration commands, on the other hand, must be +% allowed in the document, too, since they may be called inside font +% configuration files, which, in principle, may be loaded at any time. +% \begin{macrocode} +\@onlypreamble\DeclareMicrotypeSet +\@onlypreamble\UseMicrotypeSet +\@onlypreamble\DeclareMicrotypeSetDefault +\@onlypreamble\DisableLigatures +\@onlypreamble\DeclareMicrotypeVariants +\@onlypreamble\DeclareMicrotypeBabelHook +% \end{macrocode} +%\begin{macro}{\MT@old@cmd} +% The old command names had one more hunch. +%\changes{v1.8}{2005/04/28}{renamed commands from \cs{..MicroType..} to \cs{..Microtype..}} +% \begin{macrocode} +\def\MT@old@cmd#1#2{% + \newcommand*#1{\MT@warning{% + \string#1 is deprecated. Please use\MessageBreak + \string#2 instead}% + \let #1#2#2}} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@old@cmd\DeclareMicroTypeAlias\DeclareMicrotypeAlias +\MT@old@cmd\DeclareMicroTypeSet \DeclareMicrotypeSet +\MT@old@cmd\UseMicroTypeSet \UseMicrotypeSet +\MT@old@cmd\LoadMicroTypeFile \LoadMicrotypeFile +% +% \end{macrocode} +%\begin{macro}{\MT@warning} +%\begin{macro}{\MT@warning@nl} +%\begin{macro}{\MT@info} +%\begin{macro}{\MT@info@nl} +%\begin{macro}{\MT@vinfo} +%\changes{v1.6}{2005/01/06}{new macro instead of \cs{ifMT@verbose}} +%\begin{macro}{\MT@error} +%\begin{macro}{\MT@warn@err} +%\changes{v1.7}{2005/03/16}{new macro: for \opt{verbose}\texttt{\quotechar=errors}} +% Communicate. +% \begin{macrocode} +\def\MT@warning{\PackageWarning\MT@MT} +\def\MT@warning@nl#1{\MT@warning{#1\@gobble}} +%<*package> +\def\MT@info{\PackageInfo\MT@MT} +\def\MT@info@nl#1{\MT@info{#1\@gobble}} +\let\MT@vinfo\@gobble +\def\MT@error{\PackageError\MT@MT} +\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 to find out what went wrong.}} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +% +%\subsubsection{Debugging} +% +%\begin{macro}{\tracingmicrotype} +%\begin{macro}{\MT@dinfo} +%\begin{macro}{\MT@dinfo@nl} +% Cases for \cs{tracingmicrotype}: +%\begin{enum} +% \item almost none +% \item + sets \& lists +% \item + heirs +% \item + slots +% \item + factors +%\end{enum} +% \begin{macrocode} +%<*debug> +\MT@warning@nl{This is the debug version} +\newcount\tracingmicrotype +\tracingmicrotype=2 +\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 annotations} +% Another debug method: font switches can be marked in the file with a +% small caret, an accompanying popup text box displaying all debug messages. +% +% Cases for \cs{tracingmicrotypeinpdf}: +%\begin{enum}[1] +% \item show new fonts +% \item + show known fonts +%\end{enum} +% \begin{macrocode} +\newcount\tracingmicrotypeinpdf +% \end{macrocode} +%\end{macro} +%\ifpdf\ifx\tracingmicrotypeinpdf\undefined +% \fallbacktext{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} +%\tracingmicrotypeinpdf=2 +%\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\ $\geq$~1.30.) +% The \pkg{pdftexcmds} package provides \pdftex's utility commands in \luatex, too. +%\changes{v2.3d}{2009/02/27}{use \pkg{pdftexcmds} for debugging} +% \begin{macrocode} +\RequirePackage{pdftexcmds} +\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{\pdf@escapestring{#1^^J}}}\fi\fi} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\iftracingmicrotypeinpdfall} +% With \cs{tracingmicrotypeinpdfallfalse}, the output is (hopefully) +% identical, but some font switches will not be 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 by +% {\ifpdf\ifx\tracingmicrotypeinpdf\undefined\else\fontfamily{pzc}\itshape\fi\fi +% Microtype}, +% a green one marks fonts that we have already seen. The |/Caret| annotation +% requires a viewer for version 1.5 (you could use |/Text| if you're +% using an older 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 +} +% +% +% \end{macrocode} +%\end{macro} +%\ifpdf\ifx\tracingmicrotypeinpdf\undefined\else +% \tracingmicrotypeinpdf0 +% \tracingmicrotype0 +%\fi\fi +% +%\subsubsection{Requirements} +% +%\begin{macro}{\MT@plain} +% The \letterspace\ package works with: +%\begin{enum} +%\changes{v2.3}{2007/11/07}{\letterspace: support for \pkg{eplain}/\pkg{miniltx}} +% \item \pkg{miniltx} +% \item \pkg{eplain} ^^A tested with eplain v3.1, 2006/12/03; v3.2, 2007/11/26; v3.3, 2009/07/21 +% \item \LaTeX +%\end{enum} +% For plain usage, we have to copy some commands from \file{latex.ltx}. +% \begin{macrocode} +%<*plain> +\def\MT@plain{2} +\ifx\documentclass\@undefined + \def\MT@plain{1} + \def\hmode@bgroup{\leavevmode\bgroup} + \def\nfss@text#1{{\mbox{#1}}} + \let\@typeset@protect\relax + \ifx\eplain\@undefined + \def\MT@plain{0} + \def\PackageWarning#1#2{% + \begingroup + \newlinechar=10 % + \def\MessageBreak{^^J(#1)\@spaces\@spaces\@spaces\@spaces}% + \immediate\write16{^^JPackage #1 Warning: #2\on@line.^^J}% + \endgroup + } + \def\on@line{ on input line \the\inputlineno} + \def\@spaces{\space\space\space\space} + \fi +\fi +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@requires@latex} +%\changes{v2.3b}{2008/05/26}{new macro} +% Better use groups than plain ifs. +% \begin{macrocode} +\def\MT@requires@latex#1{% + \ifnum\MT@plain<#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi +} +% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@pdftex@no} +%\changes{v1.6a}{2005/02/02}{new macro} +% \pdftex's features for which we provide an interface here haven't always been +% available, and some specifics have changed over time. Therefore, we have to +% 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, we have to distinguish seven cases for \pdftex: +%\begin{enum} +% \item not running \pdftex +% \item \pdftex\ ($\less$~0.14f) +% \item + micro-typographic extensions (0.14f,g) +% \item + protrusion relative to 1\,em ($\geq$~0.14h) +% \item + automatic font expansion; +% protrusion no longer has to be set up first; +% scale factor fixed to 1000; +% default \cmd\efcode\,=\,1000 ($\geq$~1.20) +%\changes{v1.8}{2005/04/15}{case 5: \pdftex\ 1.30} +% \item + \cmd{\(left,right)marginkern}; +% \cmd\pdfnoligatures; +% \cmd\pdfstrcmp; +% \cmd\pdfescapestring\ ($\geq$~1.30) +%\changes{v2.0}{2005/08/20}{(beta:1) case 6: \pdftex\ 1.40} +% \item + adjustment of interword spacing; +% extra kerning; +% \cmd\letterspacefont; +% \cmd\pdfmatch\footnote{This command was actually introduced +% in 1.30, but failed on strings longer than 1023 bytes.}; +% \cmd\pdftracingfonts; +% always \etex\ +% ($\geq$~1.40) +%\changes{v2.2}{2007/02/23}{case 7: \pdftex\ 1.40.4} +% \item + \cmd\letterspacefont\ doesn't disable ligatures and kerns; +% \cmd\pdfcopyfont\ +% ($\geq$~1.40.4) +%\end{enum} +%\changes{v1.1}{2004/09/13}{fix: version check +% (reported by \contributor Harald Harders )} +% ^^A private mail, 2004/09/13 +% \begin{macrocode} +\def\MT@pdftex@no{0} +% \end{macrocode} +%\changes{v1.9}{2005/08/29}{compatibility with \texlive\ hack +% (reported by \contributor Herbert Vo\ss{} )} +% ^^A MID: +% A hack circumventing the \texlive\ 2004 hack which undefines the \pdftex\ +% primitives in the format in order to hide the fact that \pdftex\ is being run +% from the user. This has been \emph{fixed} in \texlive\ 2005. +% \begin{macrocode} +\ifx\normalpdftexversion\@undefined \else + \let\pdftexversion \normalpdftexversion + \let\pdftexrevision\normalpdftexrevision + \let\pdfoutput \normalpdfoutput +\fi +% \end{macrocode} +% Old packages might have let \cmd\pdftexversion\ to \cmd\relax. +% \begin{macrocode} +\ifx\pdftexversion\@undefined \else + \ifx\pdftexversion\relax \else +%\MT@dinfo@nl{0}{this is pdftex \the\pdftexversion(\pdftexrevision)} + \def\MT@pdftex@no{7} +%<*package> + \ifnum\pdftexversion = 140 + \ifnum\pdftexrevision < 4 + \def\MT@pdftex@no{6} + \fi + \else +% + \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 + \fi + \fi + \fi +% + \fi + \fi +\fi +%\MT@dinfo@nl{0}{pdftex no.: \MT@pdftex@no} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@clear@options} +% If we are not using \pdftex\ or in case it is too old, we disable everything +% and exit. +% \begin{macrocode} +\def\MT@clear@options{% +% \MT@requires@latex1{% + \AtEndOfPackage{\let\@unprocessedoptions\relax}% + \let\CurrentOption\@empty +% }\relax +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\ifnum\MT@pdftex@no < +% 2 +% 6 + \MT@warning@nl{You + \ifcase\MT@pdftex@no + don't seem to be using pdftex.\MessageBreak + `\MT@MT' only works with pdftex.\MessageBreak + Try running `pdflatex' instead of + `\ifx\XeTeXversion\@undefined\else xe\fi latex'% + \else + are using a pdftex version older than +% 0.14f% +% 1.40% + .\MessageBreak + `\MT@MT' does not work with this version.\MessageBreak + Please install a newer version of pdftex% + \fi + } + \MT@clear@options\MT@restore@catcodes +\endinput\fi +% \end{macrocode} +%\changes{v2.3c}{2008/09/09}{\luatex\ supported by default} +% Since \luatex\ is included in \texlive\ 2008, we now support it by default, +% even though it's still experimental. Letterspacing doesn't work at all yet, +% since \luatex\ doesn't know the \cmd\letterspacefont\ command. +% \begin{macrocode} +%<*!lua|letterspace> +\ifx\directlua\@undefined \else + \ifx\directlua\relax \else +% \MT@error +% \MT@warning@nl + {`\MT@MT' +% only works with luatex if you generate% +% doesn't currently work with luatex.% + \MessageBreak +% the package with the `lua' option% +% Bye bye% + } +% {} +% \MT@clear@options\MT@restore@catcodes +% \expandafter\expandafter\expandafter\endinput + \fi +\fi +% +% \end{macrocode} +% Still there? Then we can begin: +% We need the \pkg{keyval} package, including the `new' \cmd\KV@@sp@def\ +% implementation. +%\changes{v2.1}{2007/01/15}{fix: \letterspace\ package forgot to load \pkg{keyval}} +% \begin{macrocode} +\RequirePackage{keyval}[1997/11/10] +%<*package> +% \end{macrocode} +%\begin{macro}{\MT@toks} +% We need a token register. +%\changes{v1.9}{2005/09/28}{use instead of \cmd\toks@} +% \begin{macrocode} +\newtoks\MT@toks +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ifMT@if@} +% A scratch if. +% \begin{macrocode} +\newif\ifMT@if@ +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Declarations} +% +%\begin{macro}{\ifMT@protrusion} +%\begin{macro}{\ifMT@expansion} +%\begin{macro}{\ifMT@auto} +%\begin{macro}{\ifMT@selected} +%\begin{macro}{\ifMT@noligatures} +%\begin{macro}{\ifMT@draft} +%\begin{macro}{\ifMT@spacing} +%\begin{macro}{\ifMT@kerning} +%\begin{macro}{\ifMT@tracking} +%\begin{macro}{\ifMT@babel} +% These are the global switches~\dots +% \begin{macrocode} +\newif\ifMT@protrusion +\newif\ifMT@expansion +\newif\ifMT@auto +\newif\ifMT@selected +\newif\ifMT@noligatures +\newif\ifMT@draft +\newif\ifMT@spacing +\newif\ifMT@kerning +\newif\ifMT@tracking +\newif\ifMT@babel +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@pr@level} +%\begin{macro}{\MT@ex@level} +%\begin{macro}{\MT@pr@factor} +%\begin{macro}{\MT@ex@factor} +%\begin{macro}{\MT@sp@factor} +%\begin{macro}{\MT@kn@factor} +% \dots~and numbers. +% \begin{macrocode} +\let\MT@pr@level\tw@ +\let\MT@ex@level\tw@ +\let\MT@pr@factor\@m +\let\MT@ex@factor\@m +\let\MT@sp@factor\@m +\let\MT@kn@factor\@m +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@pr@unit} +%\begin{macro}{\MT@sp@unit} +%\begin{macro}{\MT@kn@unit} +% Default unit for protrusion settings is character width, for spacing +% |space|, for kerning (and tracking) 1\,em. +% \begin{macrocode} +\let\MT@pr@unit\@empty +\let\MT@sp@unit\m@ne +\def\MT@kn@unit{1em} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@stretch} +%\begin{macro}{\MT@shrink} +%\begin{macro}{\MT@step} +% Expansion settings. +% \begin{macrocode} +\let\MT@stretch\m@ne +\let\MT@shrink \m@ne +\let\MT@step \m@ne +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@pr@min} +%\begin{macro}{\MT@pr@max} +%\begin{macro}{\MT@ex@min} +%\begin{macro}{\MT@ex@max} +%\begin{macro}{\MT@sp@min} +%\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 +\def\MT@sp@min{-\@m} +\let\MT@sp@max\@m +\def\MT@kn@min{-\@m} +\let\MT@kn@max\@m +% +\def\MT@tr@min{-\@m} +\let\MT@tr@max\@m +%<*package> +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@factor@default} +% Default factor. +% \begin{macrocode} +\def\MT@factor@default{1000 } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@stretch@default} +%\begin{macro}{\MT@shrink@default} +%\begin{macro}{\MT@step@default} +% Default values for expansion. +% \begin{macrocode} +\def\MT@stretch@default{20 } +\def\MT@shrink@default{20 } +\def\MT@step@default{4 } +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@letterspace} +%\begin{macro}{\MT@letterspace@default} +% Default value for letterspacing (in thousandths of 1\,em). +% \begin{macrocode} +% +\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} +\newif\ifMT@document +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Auxiliary macros} +% +%\begin{macro}{\MT@maybe@etex} +%\changes{v2.2}{2007/05/01}{use catcode trickery} +%\changes{v2.3a}{2007/12/29}{removed} +% For definitions that depend on \etex\ features. +% \begin{macrocode} +\ifcase 0% + \ifx\eTeXversion\@undefined 1\else + \ifx\eTeXversion\relax 1\else + \ifcase\eTeXversion 1\fi + \fi + \fi +\else + \catcode`\^^Q=9 \catcode`\^^X=14 +\fi +%\MT@dinfo@nl{0}{this is +%^^Q not +% etex} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@requires@pdftex} +% For definitions that depend on a particular \pdftex\ version. +% \begin{macrocode} +\def\MT@requires@pdftex#1{% + \ifnum\MT@pdftex@no<#1 \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi +} +%\MT@requires@pdftex6{\pdftracingfonts=1 }\relax +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@requires@luatex} +%\changes{v2.2}{2007/05/10}{(basic) support for \luatex} +% For definitions that depend on \luatex. +% \begin{macrocode} +%<*lua> +\let\MT@requires@luatex\@secondoftwo +\ifx\directlua\@undefined \else + \ifx\directlua\relax \else + \let\MT@requires@luatex\@firstoftwo + \fi +\fi +%\MT@dinfo@nl0{this is \MT@requires@luatex{}{not }luatex} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@lua} +% Communicate with |lua|. +% Beginning with \luatex\ 0.36, \cmd\directlua\ no longer requires a state +% number. +%\changes{v2.3d}{2009/03/25}{update for \luatex\ 0.36} +% \cmd\luatexversion\ ought to have been enabled by the format. +% \begin{macrocode} +\MT@requires@luatex{ +\ifnum\luatexversion<36 + \def\MT@lua{\directlua0} +\else + \def\MT@lua{\directlua} +\fi +% \end{macrocode} +%\end{macro} +% Some functions are loaded from a dedicated |lua| file. This avoids character +% escaping problems and incompatibilities between versions of \luatex. +% If available, we'll use the \pkg{luatextra} package to load the module. +% \begin{macrocode} +\MT@lua{ + if (luatextra and luatextra.use_module) then + luatextra.use_module("microtype") + else + dofile(kpse.find_file("microtype.lua")) + end} +}\relax +% +% +% +% \end{macrocode} +% Here it begins. The module was contributed by \'Elie Roux. +%\changes{v2.4}{2009/11/12}{new file \file{microtype.lua} containing the \texttt{lua} functions +% (contributed by \contributor \'Elie Roux )} +% \begin{macrocode} +%<*luafile> +if microtype then + -- we simply don't load +else + +microtype = {} + +microtype.module = { + name = "microtype", + version = 2.4, + date = "2010/01/10", + description = "microtype module.", + author = "R Schlicht", + copyright = "R Schlicht", + license = "LPPL", +} + +if luatextra and luatextra.provides_module then + luatextra.provides_module(microtype.module) +end + +% +% \end{macrocode} +% To be continued, but first back to primitives. +%\begin{macro}{\MT@glet} +%\changes{v1.9f}{2006/08/09}{new macro} +% Here's the forgotten one. +% \begin{macrocode} +%<*package|letterspace> +\def\MT@glet{\global\let} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@exp@cs} +%\begin{macro}{\MT@exp@gcs} +%\changes{v2.3b}{2008/03/07}{new macro: reduce save stack size} +% Commands to create command sequences. Those that are going to be defined +% globally should be created inside a group so that the save stack won't +% explode. +% \begin{macrocode} +\def\MT@exp@cs#1#2{\expandafter#1\csname#2\endcsname} +%<*package> +\def\MT@exp@gcs#1#2{\begingroup\expandafter\endgroup\expandafter#1\csname#2\endcsname} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\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. +% \begin{macrocode} +\def\MT@def@n{\MT@exp@cs\def} +\def\MT@gdef@n{\MT@exp@gcs\gdef} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@edef@n} +%\begin{macro}{\MT@xdef@n} +% Its expanding versions. +% \begin{macrocode} +% +\def\MT@edef@n{\MT@exp@cs\edef} +%<*package> +\def\MT@xdef@n{\MT@exp@gcs\xdef} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@let@nc} +%\begin{macro}{\MT@glet@nc} +% \cmd\let\ a \cmd\csname\ sequence to a command. +% \begin{macrocode} +\def\MT@let@nc{\MT@exp@cs\let} +\def\MT@glet@nc{\MT@exp@gcs\MT@glet} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@let@cn} +% \cmd\let\ a command to a \cmd\csname\ sequence. +% \begin{macrocode} +\def\MT@let@cn#1#2{\expandafter\let\expandafter#1\csname #2\endcsname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@let@nn} +%\begin{macro}{\MT@glet@nn} +% \cmd\let\ a \cmd\csname\ sequence to a \cmd\csname\ sequence. +% \begin{macrocode} +\def\MT@let@nn{\MT@exp@cs\MT@let@cn} +\def\MT@glet@nn{\MT@exp@gcs{\global\expandafter\MT@let@cn}} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@@font} +% Remove trailing space from the font name. +% \begin{macrocode} +\def\MT@@font{\expandafter\string\MT@font} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@exp@one@n} +% Expand the second token once and enclose it in braces. +% \begin{macrocode} +% +\def\MT@exp@one@n#1#2{\expandafter#1\expandafter{#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@exp@two@c} +% 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} +%\changes{v1.9}{2005/09/28}{new macros: less \cmd\expandafter s} +% Expand the next two tokens after \meta{\#1} once and enclose them in braces. +% \begin{macrocode} +\def\MT@exp@two@n#1#2#3{% + \expandafter\expandafter\expandafter + #1\expandafter\expandafter\expandafter + {\expandafter#2\expandafter}\expandafter{#3}} +% \end{macrocode} +%\end{macro} +% 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} +%\begin{macro}{\MT@ifdefined@c@TF} +%\begin{macro}{\MT@ifdefined@n@T} +%\begin{macro}{\MT@ifdefined@n@TF} +% Wrapper for testing whether command resp. \cmd\csname\ sequence is defined. +% If we are running \etex, we will use its primitives \cs{ifdefined} and +% \cs{ifcsname}, which decreases memory use substantially. +% \begin{macrocode} +\def\MT@ifdefined@c@T#1{% +^^X \ifdefined#1\expandafter\@firstofone\else\expandafter\@gobble\fi +^^Q \ifx#1\@undefined\expandafter\@gobble\else\expandafter\@firstofone\fi +} +% +\def\MT@ifdefined@c@TF#1{% +^^X \ifdefined#1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi +%^^Q \ifx#1\@undefined +%^^Q \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi +} +\def\MT@ifdefined@n@T#1{% +^^X \ifcsname#1\endcsname\expandafter\@firstofone\else\expandafter\@gobble\fi +%^^Q \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax +%^^Q \expandafter\@gobble\else\expandafter\@firstofone\fi +} +%<*package> +\def\MT@ifdefined@n@TF#1{% +^^X \ifcsname#1\endcsname\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi +^^Q \begingroup\MT@exp@two@c\endgroup\ifx\csname #1\endcsname\relax +^^Q \expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@detokenize@n} +%\changes{v1.9d}{2006/03/08}{new macro: use \cmd\detokenize\ if available} +%\begin{macro}{\MT@detokenize@c} +%\changes{v1.9}{2005/08/17}{fix the \nonetex\ version} +%\changes{v2.3c}{2008/08/23}{fix: remove last space only +% (reported by \contributor Ulrich Dirr )} +% ^^A private mail, 2008/08/22 +%\begin{macro}{\MT@rem@last@space} +% Translate a macro into a token list. With \etex, we can use \cmd\detokenize. +% We also need to remove the last trailing space; and only the last one -- +% therefore the fiddling (and the \cmd\string\ isn't perfect, of course). +% \begin{macrocode} +\def\MT@detokenize@n#1{% +^^X \expandafter\MT@rem@last@space\detokenize{#1} \@nil +^^Q \string#1% +} +\def\MT@detokenize@c#1{% +^^X \MT@exp@one@n\MT@detokenize@n#1% +^^Q \MT@exp@two@c\MT@rem@last@space\strip@prefix\meaning#1 \@nil +} +\def\MT@rem@last@space#1 #2{#1% + \ifx\@nil#2\else \space + \expandafter\MT@rem@last@space\expandafter#2\fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@ifempty} +% Test whether argument is empty. +%\changes{v1.1}{2004/09/15}{fix: use category code 12 for the percent character +% (reported by \contributor Tom Kink )} +% ^^A MID: <2qrkp9F134l6lU1@uni-berlin.de> +% \begin{macrocode} +% +\begingroup +\catcode`\%=12 +\catcode`\&=14 +\gdef\MT@ifempty#1{& + \if %#1%& + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\endgroup +%<*package> +% \end{macrocode} +%\end{macro} +%\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\ +%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available} +% or \luatex\ (which also allows negative numbers, as required by the +% \opt{letterspace} option). +% \begin{macrocode} +\MT@requires@pdftex6{ +%<*lua> + \MT@requires@luatex{ + \def\MT@ifint#1{\csname\MT@lua{microtype.ifint([[#1]])}\endcsname} + }{ +% +% + \def\MT@ifint#1{% + \ifcase\pdfmatch{^-*[0-9]+ *$}{#1}\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + } +%<*package> +% } +}{ + \def\MT@ifint#1{% + \if!\ifnum9<1#1!\else?\fi + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } +} +% +% +%<*luafile> +function microtype.ifint(s) + if string.find(s,"^-*[0-9]+ *$") then + tex.write("@firstoftwo") + else + tex.write("@secondoftwo") + end +end + +% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ifdimen} +% Test whether argument is dimension (or number). +%\changes{v1.4b}{2004/11/22}{don't set \cs{MT@count} globally (save stack problem)} +%\changes{v1.7}{2005/03/15}{comparison with 1 to allow size smaller than 1 +% (suggested by \contributor Andreas B\"uhmann )} +% ^^A private mail, 2005/03/15 +%\changes{v1.9b}{2006/01/05}{use \cmd\pdfmatch\ if available} +% (|nd| and |nc| are new Didot resp. Cicero, added in \pdftex\ 1.30; |px| is a pixel.) +%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available} +%\todo{fix \texttt{lua} expression} +% \begin{macrocode} +%<*package> +\MT@requires@pdftex6{ +%<*lua> + \MT@requires@luatex{ + \def\MT@ifdimen#1{\csname\MT@lua{microtype.ifdimen([[#1]])}\endcsname} + }{ +% + \def\MT@ifdimen#1{% + \ifcase\pdfmatch{^([0-9]+([.,][0-9]+)?|[.,][0-9]+)% + (em|ex|cm|mm|in|pc|pt|dd|cc|bp|sp|nd|nc|px)? *$}{#1}\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + } +% } +}{ + \def\MT@ifdimen#1{% + \setbox\z@=\hbox{% + \MT@count=1#1\relax + \ifnum\MT@count=\@ne + \aftergroup\@secondoftwo + \else + \aftergroup\@firstoftwo + \fi + }% + } +} +% +%<*luafile> +function microtype.ifdimen(s) + if (string.find(s, "^-*[0-9]+(%a*) *$") or + string.find(s, "^-*[0-9]*[.,][0-9]+(%a*) *$")) then + tex.write("@firstoftwo") + else + tex.write("@secondoftwo") + end +end + +% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ifdim} +% Test floating point numbers. +% \begin{macrocode} +%<*package> +\def\MT@ifdim#1#2#3{% + \ifdim #1\p@ #2 #3\p@ + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ifstreq} +% Test whether two strings (fully expanded) are equal. +%\changes{v1.9a}{2005/11/03}{use \cmd\pdfstrcmp\ if available} +%\changes{v2.2}{2007/03/07}{fix: \nonetex\ version shouldn't use \cmd\x\ and \cmd\y\ +% (found by \contributor Wiebke Petersen )} +% ^^A MID: +%\changes{v2.2}{2007/05/10}{employ \luatex\ features if available} +% \begin{macrocode} +\MT@requires@pdftex5{ +%<*lua> + \MT@requires@luatex{ + \def\MT@ifstreq#1#2{\csname\MT@lua{microtype.ifstreq([[#1]],[[#2]])}\endcsname} + }{ +% + \def\MT@ifstreq#1#2{% + \ifcase\pdfstrcmp{#1}{#2}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } +% } +}{ + \def\MT@ifstreq#1#2{% + \edef\MT@res@a{#1}% + \edef\MT@res@b{#2}% + \ifx\MT@res@a\MT@res@b + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } +} +% +%<*luafile> +function microtype.ifstreq(s1, s2) + if s1 == s2 then + tex.write("@firstoftwo") + else + tex.write("@secondoftwo") + end +end + +% \end{macrocode} +% And here we end the |lua| file. +% \begin{macrocode} +end +% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@xadd} +%\changes{v1.8}{2005/04/17}{simplified} +% Add item to a list. +% \begin{macrocode} +%<*package> +\def\MT@xadd#1#2{% + \ifx#1\relax + \xdef#1{#2}% + \else + \xdef#1{#1#2}% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@xaddb} +% Add item to the beginning. +% \begin{macrocode} +\def\MT@xaddb#1#2{% + \ifx#1\relax + \xdef#1{#2}% + \else + \xdef#1{#2#1}% + \fi +} +% +% \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.9a}{2005/11/03}{following \LaTeX3} +%\begin{macro}{\MT@map@clist@c} +%\begin{macro}{\MT@map@clist@} +%\begin{macro}{\MT@clist@function} +%\begin{macro}{\MT@clist@break} +% Run \meta{\#2} on all elements of the comma list \meta{\#1}. This and the +% following is modelled after \LaTeX3 commands. +% \begin{macrocode} +%<*package|letterspace> +\def\MT@map@clist@n#1#2{% + \ifx\@empty#1\else + \def\MT@clist@function##1{#2}% + \MT@map@clist@#1,\@nil,\@nnil + \fi +} +\def\MT@map@clist@c#1{\MT@exp@one@n\MT@map@clist@n#1} +\def\MT@map@clist@#1,{% + \ifx\@nil#1% + \expandafter\MT@clist@break + \fi + \MT@clist@function{#1}% + \MT@map@clist@ +} +\let\MT@clist@function\@gobble +\def\MT@clist@break#1\@nnil{} +%<*package> +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@map@tlist@n} +%\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} +% Execute \meta{\#2} on all elements of the token list \meta{\#1}. +% \cs{MT@tlist@break} can be used to jump out of the loop. +% \begin{macrocode} +\def\MT@map@tlist@n#1#2{\MT@map@tlist@#2#1\@nnil} +\def\MT@map@tlist@c#1#2{\expandafter\MT@map@tlist@\expandafter#2#1\@nnil} +\def\MT@map@tlist@#1#2{% + \ifx\@nnil#2\else + #1{#2}% + \expandafter\MT@map@tlist@ + \expandafter#1% + \fi +} +\def\MT@tlist@break#1\@nnil{\fi} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\ifMT@inlist@} +%\begin{macro}{\MT@in@clist} +% Test whether item \meta{\#1} is in comma list \meta{\#2}. +%^^A\changes{v1.4b}{2004/11/22}{fix: compare with \cmd\\ instead of \cmd\relax\ +%^^A (discovered by \contributor Herb Schulz )} +%^^A ^^A MID: +% Using \cmd\pdfmatch\ would be slower. +%\changes{v1.9a}{2005/11/03}{fix} +%\changes{v2.3}{2007/11/14}{fix: don't use \cmd\x\ +% (reported by \contributor Peter Meier )} +% ^^A private mail, 2007/11/12 +% \begin{macrocode} +\newif\ifMT@inlist@ +\def\MT@in@clist#1#2{% + \def\MT@res@a##1,#1,##2##3\@nnil{% + \ifx##2\@empty + \MT@inlist@false + \else + \MT@inlist@true + \fi + }% + \expandafter\MT@res@a\expandafter,#2,#1,\@empty\@nnil +} +% \end{macrocode} +%\end{macro} +%\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}. +%\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} +% Using \cmd\pdfmatch\ and \cmd\pdflastmatch\ here would be really slow! +% \begin{macrocode} +\def\MT@rem@from@clist#1#2{% + \def\MT@res@a##1,#1,##2\MT@res@a{##1,##2\MT@res@b}% + \def\MT@res@b##1,\MT@res@b##2\MT@res@b{\ifx,##1\@empty\else##1\fi}% + \xdef#2{\MT@exp@two@c\MT@res@b\MT@res@a\expandafter,#2,\MT@res@b,#1,\MT@res@a}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@in@tlist} +%\begin{macro}{\MT@in@tlist@} +% Test whether item is in token list. Since this isn't too elegant, I thought +% that at least here, \cmd\pdfmatch\ would be more efficient -- however, it +% turned out to be even slower than this solution. +% \begin{macrocode} +\def\MT@in@tlist#1#2{% + \MT@inlist@false + \def\MT@res@a{#1}% + \MT@map@tlist@c#2\MT@in@tlist@ +} +\def\MT@in@tlist@#1{% + \edef\MT@res@b{#1}% + \ifx\MT@res@a\MT@res@b + \MT@inlist@true + \expandafter\MT@tlist@break + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@in@rlist} +%\changes{v1.8}{2005/04/20}{made recursive} +%\begin{macro}{\MT@in@rlist@} +%\begin{macro}{\MT@in@rlist@@} +%\begin{macro}{\MT@size@name} +% Test whether size \cs{MT@size} is in a list of ranges. Store the name of the +% list in \cs{MT@size@name} +% \begin{macrocode} +\def\MT@in@rlist#1{% + \MT@inlist@false + \MT@map@tlist@c#1\MT@in@rlist@ +} +\def\MT@in@rlist@#1{\expandafter\MT@in@rlist@@#1} +\def\MT@in@rlist@@#1#2#3{% + \MT@ifdim{#2}=\m@ne{% + \MT@ifdim{#1}=\MT@size + \MT@inlist@true + \relax + }{% + \MT@ifdim\MT@size<{#1}\relax{% + \MT@ifdim\MT@size<{#2}% + \MT@inlist@true + \relax + }% + }% + \ifMT@inlist@ + \def\MT@size@name{#3}% + \expandafter\MT@tlist@break + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@loop} +%\changes{v1.2}{2004/09/23}{fix: new macro, used instead of \cmd\loop} +%\begin{macro}{\MT@iterate} +%\begin{macro}{\MT@repeat} +% This is the same as \LaTeX's \cmd\loop, which we mustn't use, since this +% could confuse an outer \cmd\loop\ in the document. +% \begin{macrocode} +% +\def\MT@loop#1\MT@repeat{% + \def\MT@iterate{#1\relax\expandafter\MT@iterate\fi}% + \MT@iterate \let\MT@iterate\relax +} +\let\MT@repeat\fi +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@while@num} +% Execute \meta{\#3} from \meta{\#1} up to (excluding) \meta{\#2} (much faster +% than \LaTeX's \cmd\@whilenum). +% \begin{macrocode} +\def\MT@while@num#1#2#3{% + \@tempcnta#1\relax + \MT@loop #3% + \advance\@tempcnta \@ne + \ifnum\@tempcnta < #2\MT@repeat +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@do@font} +% Execute \meta{\#1} 256 times. +% \begin{macrocode} +\def\MT@do@font{\MT@while@num\z@\@cclvi} +%<*package> +% \end{macrocode} +%\end{macro} +%\changes{v1.4}{2004/11/12}{use one instead of five counters} +%\begin{macro}{\MT@count} +%\begin{macro}{\MT@increment} +% Increment macro \meta{\#1} by one. Saves using up too many counters. +%\changes{v1.7}{2005/03/07}{use \etex's \cmd\numexpr\ if available} +% The \etex\ way is slightly faster. +% \begin{macrocode} +\newcount\MT@count +\def\MT@increment#1{% +^^X \edef#1{\number\numexpr #1 + 1\relax}% +^^Q \MT@count=#1\relax +^^Q \advance\MT@count \@ne +^^Q \edef#1{\number\MT@count}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@scale} +%\changes{v1.7}{2005/02/12}{new macro: use \etex's \cs{numexpr} if available} +%\changes{v1.8}{2005/03/30}{fix: remove spaces in \nonetex\ variant +% (reported by \contributor Mark Rossi )} +% ^^A MID: +% Multiply and divide a counter. If we are using \etex, we will use its +% \cmd\numexpr\ primitive. This has the advantage that it is less likely to +% run into arithmetic overflow. The result of the division will be rounded +% instead of truncated. Therefore, we'll get a different (more accurate) +% result in about half of the cases. +% \begin{macrocode} +\def\MT@scale#1#2#3{% +^^Q \multiply #1 #2\relax + \ifnum #3 = \z@ +^^X #1=\numexpr #1 * #2\relax + \else +^^X #1=\numexpr #1 * #2 / #3\relax +^^Q \divide #1 #3\relax + \fi +} +% \end{macrocode} +%\end{macro} +%\changes{v1.7}{2005/03/07}{shorter command names} +%\begin{macro}{\MT@abbr@pr} +%\begin{macro}{\MT@abbr@ex} +%\begin{macro}{\MT@abbr@pr@c} +%\begin{macro}{\MT@abbr@ex@c} +%\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} +\def\MT@abbr@pr{protrusion} +\def\MT@abbr@ex{expansion} +\def\MT@abbr@pr@c{protrusion codes} +\def\MT@abbr@ex@c{expansion codes} +\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} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@rbba@protrusion} +%\begin{macro}{\MT@rbba@expansion} +%\begin{macro}{\MT@rbba@spacing} +%\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} +\def\MT@rbba@spacing{sp} +\def\MT@rbba@kerning{kn} +\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,sp,kn,tr} +\def\MT@features@long{protrusion,expansion,spacing,kerning,tracking} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@is@feature} +%\changes{v1.9a}{2005/11/03}{new macro: check for \pdftex\ feature} +% Whenever an optional argument accepts a list of features, we can use this +% command to check whether a feature exists in order to prevent a rather +% confusing `|Missing \endcsname inserted|' error message. The feature (long +% form) must be in \cmd\@tempa, the type of list to ignore in \meta{\#1}, +% then comes the action. +% \begin{macrocode} +\def\MT@is@feature#1{% + \MT@exp@one@n\MT@in@clist\@tempa\MT@features@long + \ifMT@inlist@ + \expandafter\@firstofone + \else + \MT@error{`\@tempa' is not an available micro-typographic\MessageBreak + feature. Ignoring #1}{Available features are: `\MT@features@long'.}% + \expandafter\@gobble + \fi +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Compatibility}\label{sub:compatibility} +% +% 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\ (all in section~\ref{sssec:impl.hook}) +% \item \cmd\showhyphens\ (in section~\ref{sssec:impl.options}) +%\end{itemize} +% +% The \pkg{wordcount} package redefines the font-switching commands, which will +% break \microtype. Since \microtype\ doesn't have an effect on the number of +% words in the document anyway, we will simply disable ourselves. +%\changes{v2.2}{2007/02/11}{disable \microtype\ if \pkg{wordcount} is loaded +% (reported by \contributor Ross Hetherington )} +% ^^A MID: +% \begin{macrocode} +\@ifl@aded{tex}{wordcount}{% + \MT@warning@nl{Detected the `wordcount' utility.\MessageBreak + Disabling `\MT@MT', since it wouldn't work}% + \MT@clear@options\MT@restore@catcodes\endinput}\relax +% \end{macrocode} +%\begin{macro}{\MT@setup@} +%\changes{v1.9a}{2005/11/21}{defer setup until the end of the preamble} +%\changes{v1.9e}{2006/07/06}{empty \cs{MT@setup@} after use +% (compatibility with the \pkg{combine} class)} +%\changes{v2.3e}{2009/08/31}{make space-unaware +% (requested by \contributor Marcin Borkowski )} +% ^^A private mail, 2009/08/31 +% 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} +% +%\MT@requires@latex1{ +\let\MT@setup@\@empty +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@addto@setup} +% We use our private hook to have better control over the timing. +% This will also work with \pkg{eplain}, but not with \pkg{miniltx} alone. +% \begin{macrocode} +\def\MT@addto@setup{\g@addto@macro\MT@setup@} +% \end{macrocode} +%\end{macro} +% Don't hesitate with \pkg{miniltx}. +% \begin{macrocode} +%}{\let\MT@addto@setup\@firstofone} +% \end{macrocode} +%\begin{macro}{\MT@with@package@T} +% We almost never do anything if a package is not loaded. +% \begin{macrocode} +\def\MT@with@package@T#1{\@ifpackageloaded{#1}\@firstofone\@gobble} +%<*package> +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@with@babel@and@T} +%\changes{v2.2}{2007/05/25}{also inspect class options} +% \LaTeX's \cmd\@ifpackagewith\ ignores the class options. +% \begin{macrocode} +\def\MT@with@babel@and@T#1{% + \MT@ifdefined@n@T{opt@babel.\@pkgextension}{% + \@expandtwoargs\MT@in@clist{#1} + {\csname opt@babel.\@pkgextension\endcsname,\@classoptionslist}% + \ifMT@inlist@\expandafter\@gobble\fi + }\@gobble +} +% \end{macrocode} +%\end{macro} +% Don't load \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} +% The \pkg{ledmac} package first saves each paragraph in a box, from which it +% then splits off the lines one by one. This will destroy character protrusion. +% (There aren't any problems with the \pkg{lineno} package, since it takes a +% different approach.) +%\iffalse +% We issue a warning, so that nobody can say they didn't know. +%\changes{v1.6}{2004/12/29}{warning when using the \pkg{ledmac} package} +% --- This is fixed in \pdftex\ 1.21a, so we no longer warn. +%\changes{v1.6a}{2005/02/02}{no warning when using the \pkg{ledmac} package} +% --- Actually, it was completely broken in 1.21a, but 1.21b provides a work-around. +%\fi +% ---~\dots~--- +%\changes{v1.8}{2005/04/15}{character protrusion with \pkg{ledmac}} +% After much to and fro, the situation has finally settled and there is a fix. +% Beginning with \pdftex\ version 1.21b together with \file{ledpatch.sty} as of +% 2005/06/02 (v0.4), character protrusion will work at last. +% +% Peter Wilson was so kind to provide the \cmd\l@dunhbox@line\ hook in +% \pkg{ledmac} to allow for protrusion. \cmd\leftmarginkern\ and +% \cmd\rightmarginkern\ are new primitives of \pdftex\ 1.21b (aka. 1.30.0). +% \begin{macrocode} +\MT@requires@pdftex5{ + \def\MT@ledmac@setup{% + \ifMT@protrusion + \MT@ifdefined@c@TF\l@dunhbox@line{% + \MT@info@nl{Patching ledmac to enable character protrusion}% + \newdimen\MT@led@kern + \let\MT@led@unhbox@line\l@dunhbox@line + \renewcommand*{\l@dunhbox@line}[1]{% + \ifhbox##1% + \MT@led@kern=\rightmarginkern##1% + \kern\leftmarginkern##1% + \MT@led@unhbox@line##1% + \kern\MT@led@kern + \fi + }% + }{% + \MT@warning@nl{% + Character protrusion in paragraphs with line\MessageBreak + numbering will only work if you update ledmac}% + }% + \fi + } +}{ + \def\MT@ledmac@setup{% + \ifMT@protrusion + \MT@warning@nl{% + The pdftex version you are using does not allow\MessageBreak + character protrusion in paragraphs with line\MessageBreak + numbering by the `ledmac' package.\MessageBreak + Upgrade pdftex to version 1.30 or later}% + \fi + } +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@restore@p@h} +% Restore meaning of \cmd\% and \cmd\#. +% \begin{macrocode} +\def\MT@restore@p@h{\chardef\%`\% \chardef\#`\# } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@setupfont@hook} +% This hook will be executed every time a font is set up (inside a group). +% +% In the preamble, we check for the packages each time a font is set up. +% Thus, it will work regardless when the packages are loaded. +% +% Even for packages that don't activate any characters in the preamble (like +% \pkg{babel} and \pkg{csquotes}), we have to check here, too, in case they were +% loaded before \microtype, and a font is loaded \cmd\AtBeginDocument, before +% \microtype. +% (This is no longer needed, since the complete setup is now deferred until the +% end of the preamble. However, it is still necessary for \opt{defersetup}|=false|.) +% \begin{macrocode} +\def\MT@setupfont@hook{% +% \end{macrocode} +%\iffalse +%\changes{v1.7}{2005/02/06}{compatibility with the \pkg{chemsym} package} +% The \pkg{chemsym} package redefines, among other commands, the Hungarian +% umlaut \cmd\H\ in a way that cannot be parsed by \microtype. As a work-around, +% we restore the usual definition of \cmd\H\ before setting up the font (which +% will be done inside a group). +%\changes{v1.8}{2005/03/24}{remove superfluous \pkg{chemsym} hook} +% --- Since version 1.7, this is no longer needed, since our character parsing +% is robust enough now. +% +%\changes{v1.7}{2005/03/10}{compatibility with the \pkg{statex} package} +% Same for \pkg{statex}. +%\changes{v1.8}{2005/03/24}{remove superfluous \pkg{statex} hook} +% --- No longer needed, either. +%\fi +%\changes{v1.8}{2005/03/30}{restore percent character if Spanish \pkg{babel} is loaded} +%\changes{v2.2}{2007/02/02}{restore percent character if Galician \pkg{babel} is loaded} +%\changes{v2.3a}{2008/01/29}{restore percent character if Mexican \pkg{babel} is loaded} +% Spanish (and Galician and Mexican) \pkg{babel} modify \cmd\%, storing the +% original meaning in \cmd\percentsign. +% \begin{macrocode} + \MT@if@false + \MT@with@babel@and@T{spanish} \MT@if@true + \MT@with@babel@and@T{galician}\MT@if@true + \MT@with@babel@and@T{mexican} \MT@if@true + \ifMT@if@\MT@ifdefined@c@T\percentsign{\let\%\percentsign}\fi +% \end{macrocode} +%\changes{v1.8}{2005/04/22}{restore \pkg{csquotes}'s active characters} +% Using \cmd\@disablequotes, we can restore the original meaning of all +% characters made active by \pkg{csquotes}. +% (It would be doable for older versions, too, but we won't bother.) +% \begin{macrocode} + \MT@with@package@T{csquotes}{% + \@ifpackagelater{csquotes}{2005/05/11}\@disablequotes\relax}% +% \end{macrocode} +% \pkg{hyperref} redefines \cmd\% and \cmd\# inside a \cmd\url. We restore +% the original meanings (which we can only hope are correct). +%\changes{v1.8}{2005/05/20}{restore \cmd\% and \cmd\# when \pkg{hyperref} is loaded} +% Same for \pkg{tex4ht}. +%\changes{v1.9d}{2006/02/27}{restore \cmd\% and \cmd\# when \pkg{tex4ht} is loaded +% (reported by \contributor Peter Dyballa )} +% ^^A private mail, 2006/02/26 +% \begin{macrocode} + \MT@if@false + \MT@with@package@T{hyperref}\MT@if@true + \MT@with@package@T{tex4ht} \MT@if@true + \ifMT@if@\MT@restore@p@h\fi +} +% \end{macrocode} +%\end{macro} +% Check again at the end of the preamble. +% \begin{macrocode} +% +\MT@addto@setup{% +%<*package> +% \end{macrocode} +%\changes{v1.4}{2004/11/04}{check for \pkg{pdfcprot}} +% Our competitor, the \pkg{pdfcprot} package, must not be tolerated! +% \begin{macrocode} + \MT@with@package@T{pdfcprot}{% + \MT@error{Detected the `pdfcprot' package!\MessageBreak + `\MT@MT' and `pdfcprot' may not be used together}{% +The `pdfcprot' package provides an interface to character protrusion.\MessageBreak +So does the `\MT@MT' package. Using both packages at the same\MessageBreak +time will almost certainly lead to undesired results. Have your choice!}% + }% + \MT@with@package@T{ledmac}\MT@ledmac@setup +% \end{macrocode} +% We can clean up \cs{MT@setupfont@hook} now. +% \begin{macrocode} + \let\MT@setupfont@hook\@empty + \MT@if@false + \MT@with@babel@and@T{spanish} \MT@if@true + \MT@with@babel@and@T{galician}\MT@if@true + \MT@with@babel@and@T{mexican} \MT@if@true + \ifMT@if@ + \g@addto@macro\MT@setupfont@hook{% + \MT@ifdefined@c@T\percentsign{\let\%\percentsign}}% + \fi + \MT@with@package@T{csquotes}{% + \@ifpackagelater{csquotes}{2005/05/11}{% + \g@addto@macro\MT@setupfont@hook\@disablequotes + }{% + \MT@warning@nl{% + Should you receive warnings about unknown slot\MessageBreak + numbers, try upgrading the `csquotes' package}% + }% + }% +% \end{macrocode} +% We disable \microtype's additions inside \pkg{hyperref}'s \cmd\pdfstringdef, +% which redefines lots of commands. +%\changes{v1.9}{2005/09/10}{disable \microtype\ setup inside \pkg{hyperref}'s \cmd\pdfstringdef\ +% (reported by \contributor\thanh{} )} +% ^^A private mail, 2005/09/10 +%\changes{v2.3}{2007/11/11}{disable \cs{microtypecontext} in \pkg{hyperref}'s \cmd\pdfstringdef} +% \pkg{hyperref} doesn't work with plain \TeX, so in that case we don't bother. +% \begin{macrocode} + \MT@if@false +% +% \MT@requires@latex2{ + \MT@with@package@T{hyperref}{% + \pdfstringdefDisableCommands{% +%<*package> + \let\pickup@font\MT@orig@pickupfont + \let\textmicrotypecontext\@secondoftwo + \let\microtypecontext\@gobble +% + \def\lsstyle{\pdfstringdefWarn\lsstyle}% + \def\textls#1#{\pdfstringdefWarn\textls}% + }% +% \MT@if@true + }% +% }\relax +%<*package> + \MT@with@package@T{tex4ht}\MT@if@true + \ifMT@if@\g@addto@macro\MT@setupfont@hook\MT@restore@p@h\fi +% \end{macrocode} +%\changes{v1.9b}{2005/12/19}{compatibility with \pkg{listings}: sanitise more catcodes +% (reported by \contributor Holger Uhr )} +% ^^A MID: +% The \pkg{listings} package makes numbers and letters active, +% \begin{macrocode} + \MT@with@package@T{listings}{% + \g@addto@macro\MT@cfg@catcodes{% + \MT@while@num{"30}{"3A}{\catcode\@tempcnta 12\relax}% + \MT@while@num{"41}{"5B}{\catcode\@tempcnta 11\relax}% + \MT@while@num{"61}{"7B}{\catcode\@tempcnta 11\relax}% + }% +% \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 )} +% ^^A private mail, 2006/09/15 +% \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 +% 8-bit active characters (\pkg{inputenc}). Luckily, this simple redefinition +% will make them expand to their original definition, so that they could be used +% in the configuration. +% \begin{macrocode} + \let\lst@ProcessLetter\@empty + }% + }% +% \end{macrocode} +%\changes{v2.0}{2005/12/21}{(beta:3) compatibility with \pkg{soul}: register \cs{textls} and \cs{lsstyle}} +% 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} +% +% \MT@requires@latex2{ + \MT@with@package@T{soul}{% + \soulregister\lsstyle 0% + \soulregister\textls 1% + }% +% \end{macrocode} +%\changes{v2.3a}{2008/01/06}{fix test for \pkg{soul} under plain \TeX} +% Under plain \TeX, \pkg{soul} doesn't register itself the \LaTeX\ way, hence +% we have to use a different test in this case. +% \begin{macrocode} +%<*plain> + }{\ifx\SOUL@\@undefined\else + \soulregister\lsstyle 0% + \soulregister\textls 1% + \fi}% +% +%<*package> +% \end{macrocode} +%\changes{v2.1}{2007/01/15}{compatibility with \pkg{pinyin}: disable \microtype\ in \cmd\py@macron\ +% (reported by \contributor Sven Naumann )} +% ^^A MID: <87d55hxxdd.fsf@linux.site> +% Compatibility with the \pkg{pinyin} package (from \pkg{CJK}): disable +% \microtype\ in \cmd\py@macron, which loads a different font for the accent. +% In older versions of \pkg{pinyin} (pre-4.6.0), +%\changes{v2.3d}{2009/03/19}{fix \pkg{pinyin} compatibility check +% (reported by \contributor Silas~S. Brown )} +% ^^A private mail, 2009/03/19 +% \cmd\py@macron\ had only one argument. +% \begin{macrocode} + \MT@with@package@T{pinyin}{% + \let\MT@orig@py@macron\py@macron + \@ifpackagelater{pinyin}{2005/08/11}{% 4.6.0 + \def\py@macron#1#2{% + \let\pickup@font\MT@orig@pickupfont + \MT@orig@py@macron{#1}{#2}% + \let\pickup@font\MT@pickupfont}% + }{% + \def\py@macron#1{% + \let\pickup@font\MT@orig@pickupfont + \MT@orig@py@macron{#1}% + \let\pickup@font\MT@pickupfont}% + }% + }% +% +} +%<*package> +% \end{macrocode} +%\changes{v1.6}{2005/01/19}{load a font if none is selected} +% We need a font (the \pkg{minimal} class doesn't load one). +% \begin{macrocode} +\expandafter\ifx\the\font\nullfont\normalfont\fi +% \end{macrocode} +% +%\subsection{Font setup}\label{ssec:font-setup} +% +%\begin{macro}{\MT@setupfont} +% Setting up a font entails checking for each feature whether it should be +% applied to the current font (\cs{MT@font}). +% But first, we might have to disable stuff when used together with adventurous +% packages. +% \begin{macrocode} +\def\MT@setupfont{\MT@setupfont@hook} +% \end{macrocode} +% This will use a copy of the font (allowing for expansion parameter variation +% and the use of more than one set of protrusion factors for a font within one +% paragraph). +% \begin{macrocode} +\MT@requires@pdftex7 + {\g@addto@macro\MT@setupfont\MT@copy@font}\relax +% \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! +% \begin{macrocode} +\g@addto@macro\MT@setupfont{% + \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} +% \begin{macrocode} + \MT@exp@one@n\MT@find@file\MT@family + \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 +% later, in \cs{MT@get@slot}), which isn't the case when \cmd\selectfont\ +% chooses a new encoding (this would be done a second later in +% \cmd\selectfont, anyway -- three lines, to be exact). +% (I think, I do not need this anymore -- however, I'm too afraid to remove it. +% \dots\ Oops, I did it. Let's see whether anybody complains.) +%\changes{v2.2}{2007/04/15}{don't call \cmd\@@enc@update\ anymore} +% \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. +%\changes{v2.2}{2007/04/15}{only add features that are available with the respective \pdftex} +% \begin{macrocode} +\MT@requires@pdftex6 + {\g@addto@macro\MT@setupfont\MT@tracking}\relax +\g@addto@macro\MT@setupfont{% + \MT@check@font + \ifMT@inlist@ +%\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 that the current +% \pdftex\ provides. The following commands are \cmd\let\ to \cmd\relax\ if the +% respective feature is disabled via package options. +% +% For versions older than 1.20, protrusion has to be set up first, beginning +% with 1.20, the order doesn't matter. +% \begin{macrocode} + \MT@protrusion + \MT@expansion +} +% \end{macrocode} +% Interword spacing and kerning (\pdftex\ 1.40). +% \begin{macrocode} +\MT@requires@pdftex6 + {\g@addto@macro\MT@setupfont{\MT@spacing\MT@kerning}}\relax +% \end{macrocode} +% Disable ligatures (\pdftex\ 1.30). +% \begin{macrocode} +\MT@requires@pdftex5 + {\g@addto@macro\MT@setupfont\MT@noligatures}\relax +\g@addto@macro\MT@setupfont{% +% \end{macrocode} +% Debugging. +% \begin{macrocode} +%\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 +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@copy@font} +%\changes{v2.2}{2007/07/03}{optionally work on copies of fonts} +%\begin{macro}{\MT@copy@font@} +% The new (1.40.4) \cmd\pdfcopyfont\ command allows to expand a font with +% different parameters, or to use more than one set of protrusion factors for a +% given font within one paragraph. It will be used when we find a context for +% \cs{SetProtrusion} or \cs{SetExpansion} in the preamble, or when the package +% has been loaded with the \opt{copyfonts} option. +% \begin{macrocode} +\let\MT@copy@font\relax +\MT@requires@pdftex7{ +\def\MT@copy@font@{% +% \end{macrocode} +%\begin{macro}{\MT@font@copy} +% For every new protrusion and expansion contexts, we create a new copy. +%\changes{v2.3b}{2008/04/15}{enable font copies also with protrusion contexts +% (reported by \contributor Nathan Rosenblum )} +% ^^A private mail, 2008/04/14 +% \begin{macrocode} + \xdef\MT@font@copy{\csname\MT@@font/\MT@pr@context/\MT@ex@context\endcsname}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@font@orig} +% \pdftex\ doesn't allow to copy a font that has already been copied and +% expanded\slash letterspaced. Hence, we have to get the original. +% \begin{macrocode} + \expandafter\ifx\MT@font@copy\relax + \edef\MT@font@orig{\csname\expandafter\string\font@name @orig\endcsname}% + \expandafter\ifx\MT@font@orig\relax + \MT@exp@two@c\MT@glet\MT@font@orig\font@name + \else + \MT@exp@two@c\let\font@name\MT@font@orig + \fi + \global\MT@exp@two@c\pdfcopyfont\MT@font@copy\font@name +%\MT@dinfo1{creating new copy: \MT@font@copy}% +% \end{macrocode} +%\end{macro} +% Since it's a new font, we have to remove it from the context lists. +% \begin{macrocode} + \MT@map@clist@c\MT@active@features{% + \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else + \def\@tempa{##1}% + \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@rem@from@list + \fi + }% + \fi + \MT@exp@two@c\let\MT@font\MT@font@copy +% \end{macrocode} +% We only need the font identifier for letterspacing. +% \begin{macrocode} + \let\font@name\MT@font@copy +% \end{macrocode} +% But we have to properly substitute the font after we're done. +% \begin{macrocode} + \aftergroup\let\aftergroup\font@name\aftergroup\MT@font@copy +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@rem@from@list} +% \begin{macrocode} +\def\MT@rem@from@list#1{% + \MT@exp@cs\ifx{MT@\@tempa @#1font@list}\relax\else + \expandafter\MT@exp@one@n\expandafter\MT@rem@from@clist\expandafter + \MT@font \csname MT@\@tempa @#1font@list\endcsname + \fi +} +}\relax +% \end{macrocode} +%\end{macro} +%\ifpdf\phantomsection\fi\label{exp-hack} +%\paragraph{Here's the promised dirty trick} +% for users of older \pdftex\ versions, which works around the problem that the +% use of the same font with different expansion parameters is prohibited. If +% you do not want to create a clone of the font setup (this would require +% duplicating the \file{tfm}/\file{vf} files under a new name, and writing new +% \file{fd} files and \file{map} entries), you can load a minimally larger font +% for the paragraph in question. E.\,g., for a document typeset in 10\,pt: +%\begin{verbatim}[gobble=2,morekeywords={[0]{\expandpar}}] +% \SetExpansion +% [ stretch = 30, +% shrink = 60, +% step = 5 ] +% { encoding = *, +% size = 10.001 } +% { } +% \newcommand{\expandpar}[1]{{% +% \fontsize{10.001}{\baselineskip}\selectfont #1\par}} +% % ... +% \expandpar{This paragraph contains an `unnecessary' widow.} +%\end{verbatim} +% 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. +% +%\bigskip +%\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 (\meta{\#6} may be a protrusion\slash expansion +% context and/or a letterspacing amount). ^^A really? +% \begin{macrocode} +\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}% +% \end{macrocode} +%\begin{macro}{\MT@familyalias} +% Alias family? +%\changes{v1.2}{2004/09/29}{define alias font name as an alternative, not +% as a replacement} +% \begin{macrocode} + \MT@ifdefined@n@TF{MT@\MT@family @alias}% + {\MT@let@cn\MT@familyalias{MT@\MT@family @alias}}% + {\let\MT@familyalias\@empty}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\ifMT@do} +%\begin{macro}{\MT@feat} +%\begin{macro}{\MT@maybe@do} +% We check all features of the current font against the lists of the currently +% active font set, and set \cs{ifMT@do} accordingly. +%\changes{v1.2}{2004/09/29}{also check for alias font name} +%\changes{v1.9}{2005/09/28}{redone} +% \begin{macrocode} +\newif\ifMT@do +\def\MT@maybe@do#1{% +% \end{macrocode} +% (but only if the feature isn't globally set to false) +% \begin{macrocode} + \csname ifMT@\csname MT@abbr@#1\endcsname\endcsname +% \end{macrocode} +% Begin with setting micro-typography to true for this font. The +% \cs{MT@checklist@...} tests will set it to false if the property is not in +% the list. The first non-empty list that does not contain a match will stop us +% (except for |font|). +% \begin{macrocode} + \MT@dotrue + \edef\@tempa{\csname MT@#1@setname\endcsname}% + \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}}% + {#1}% + }% + \else + \MT@dofalse + \fi + \ifMT@do +% \end{macrocode} +% \cs{MT@feat} stores the current feature. +% \begin{macrocode} + \def\MT@feat{#1}% + \csname MT@set@#1@codes\endcsname + \else + \MT@vinfo{... No \@nameuse{MT@abbr@#1}}% + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@dinfo@list} +% \begin{macrocode} +%\def\MT@dinfo@list#1#2#3{\MT@dinfo@nl{1}{\@nameuse{MT@abbr@#1}: #2 +% \ifx\\#3\\list empty\else `\@nameuse{MT@#2}' #3 list\fi}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@checklist@} +% The generic test (\meta{\#1} is the axis, \meta{\#2} the feature, \cmd\@tempa\ +% contains the set name). +% \begin{macrocode} +\def\MT@checklist@#1#2{% +% \MT@ifdefined@n@T +% \MT@ifdefined@n@TF + {MT@#2list@#1@\@tempa}{% +% \end{macrocode} +% Begin a (masqueraded) \cmd\expandafter\ orgy to test whether the font +% attribute is in the list. +% \begin{macrocode} + \expandafter\MT@exp@one@n\expandafter\MT@in@clist + \csname MT@#1\expandafter\endcsname + \csname MT@#2list@#1@\@tempa\endcsname + \ifMT@inlist@ +%\MT@dinfo@list{#2}{#1}{in}% + \MT@dotrue + \else +%\MT@dinfo@list{#2}{#1}{not in}% + \MT@dofalse + \expandafter\MT@clist@break + \fi + }% +% \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 set up. +% \begin{macrocode} +% {\MT@dinfo@list{#2}{#1}{}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@checklist@family} +% Also test for the alias font, if the original font is not in the list. +%\changes{v1.4b}{2004/11/22}{fix: don't try alias family name if encoding failed} +%\changes{v1.9}{2005/07/12}{fix: add two missing \cmd\expandafter s} +% \begin{macrocode} +\def\MT@checklist@family#1{% +% \MT@ifdefined@n@T +% \MT@ifdefined@n@TF + {MT@#1list@family@\@tempa}{% + \MT@exp@two@n\MT@in@clist + \MT@family{\csname MT@#1list@family@\@tempa\endcsname}% + \ifMT@inlist@ +%\MT@dinfo@list{#1}{family}{in}% + \MT@dotrue + \else +%\MT@dinfo@list{#1}{family}{not in}% + \MT@dofalse + \ifx\MT@familyalias\@empty \else + \MT@exp@two@n\MT@in@clist + \MT@familyalias{\csname MT@#1list@family@\@tempa\endcsname}% + \ifMT@inlist@ +% \MT@dinfo@list{#1}{family alias}{in}% + \MT@dotrue +%\else\MT@dinfo@list{#1}{family alias}{not in}% + \fi + \fi + \fi + \ifMT@do \else + \expandafter\MT@clist@break + \fi + }% +% {\MT@dinfo@list{#1}{family}{}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@checklist@size} +% Test whether font size is in list of size ranges. +% \begin{macrocode} +\def\MT@checklist@size#1{% +% \MT@ifdefined@n@T +% \MT@ifdefined@n@TF + {MT@#1list@size@\@tempa}{% + \MT@exp@cs\MT@in@rlist{MT@#1list@size@\@tempa}% + \ifMT@inlist@ +%\MT@dinfo@list{#1}{size}{in}% + \MT@dotrue + \else +%\MT@dinfo@list{#1}{size}{not in}% + \MT@dofalse + \expandafter\MT@clist@break + \fi + }% +% {\MT@dinfo@list{#1}{size}{}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@checklist@font} +% If the font matches, we skip the rest of the test. +% \begin{macrocode} +\def\MT@checklist@font#1{% +% \MT@ifdefined@n@T +% \MT@ifdefined@n@TF + {MT@#1list@font@\@tempa}{% +% \end{macrocode} +% Since \cs{MT@font} may be appended with context and/or letterspacing specs, +% we construct the name from the font characteristics. +%\changes{v2.2}{2007/07/03}{fix: construct font name from characteristics} +% \begin{macrocode} + \edef\@tempb{\MT@encoding/\MT@family/\MT@series/\MT@shape/\MT@size}% + \expandafter\MT@exp@one@n\expandafter\MT@in@clist\expandafter + \@tempb \csname MT@#1list@font@\@tempa\endcsname + \ifMT@inlist@ +%\MT@dinfo@list{#1}{font}{in}% + \expandafter\MT@clist@break + \else +%\MT@dinfo@list{#1}{font}{not in}% + \MT@dofalse + \fi + }% +% {\MT@dinfo@list{#1}{font}{}}% +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Protrusion} +% +%\begin{macro}{\MT@protrusion} +% Set up for protrusion? +% \begin{macrocode} +\def\MT@protrusion{\MT@maybe@do{pr}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@pr@codes} +% This macro is called by \cs{MT@setupfont}, and does all the work for setting +% up a font for protrusion. +%\changes{v1.5}{2004/12/10}{adjust protrusion factors before setting the inheriting +% characters} +%\changes{v1.6}{2004/12/18}{introduce \texttt{factor} option} +% \begin{macrocode} +\def\MT@set@pr@codes{% +% \end{macrocode} +% Check whether and if, which list should be applied to the current font. +% \begin{macrocode} + \MT@if@list@exists{% + \MT@get@font@dimen@six{% + \MT@get@opt + \MT@reset@pr@codes +% \end{macrocode} +% Get the name of the inheritance list and parse it. +% \begin{macrocode} + \MT@get@inh@list +% \end{macrocode} +% Set an input encoding? +% \begin{macrocode} + \MT@set@inputenc{c}% +% \end{macrocode} +% Load additional lists? +% \begin{macrocode} + \MT@load@list\MT@pr@c@name + \MT@set@listname +% \end{macrocode} +% Load the main list. +% \begin{macrocode} + \MT@let@cn\@tempc{MT@pr@c@\MT@pr@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,}% + }\MT@reset@pr@codes +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@font@dimen@six} +%\changes{v1.8}{2005/05/03}{new macro: test whether \fontdim6 is defined} +%\changes{v2.3e}{2009/08/31}{fix: gobbling settings with tracking failed +% (reported by \contributor Leo )} +% ^^A MID: +%\begin{macro}{\MT@dimen@six} +% If \fontdim6 is zero, character protrusion, spacing, kerning and tracking +% won't work, and we can skip the settings (for example, the \pkg{dsfont} and +% \pkg{fourier} fonts don't specify this dimension; this is probably a bug in +% the fonts). +% \begin{macrocode} +\def\MT@get@font@dimen@six{% + \ifnum\fontdimen6\MT@font=\z@ + \MT@warning@nl{% + Font `\MT@@font' does not specify its\MessageBreak + \@backslashchar fontdimen 6 (width of an `em')! Therefore,\MessageBreak + \@nameuse{MT@abbr@\MT@feat} will not work with this font}% + \expandafter\@gobble + \else + \edef\MT@dimen@six{\number\fontdimen6\MT@font}% + \expandafter\@firstofone + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@set@all@pr} +%\changes{v2.2}{2007/06/16}{(et al.) allow empty values} +% Set all protrusion codes of the font. +% \begin{macrocode} +\def\MT@set@all@pr#1#2{% +%\MT@dinfo@nl{3}{-- lp/rp: setting all to #1/#2}% + \let\MT@temp\@empty + \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\lpcode\MT@font\@tempcnta=#1\relax}}% + \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\rpcode\MT@font\@tempcnta=#2\relax}}% + \MT@do@font\MT@temp +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@reset@pr@codes@} +%\begin{macro}{\MT@reset@pr@codes} +% All protrusion codes are zero for new fonts. However, if we have to reload +% the font due to different contexts, we have to reset them. +% This command will be changed by \cs{microtypecontext} if necessary. +% \begin{macrocode} +\def\MT@reset@pr@codes@{\MT@set@all@pr\z@\z@} +\let\MT@reset@pr@codes\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@the@pr@code} +%\begin{macro}{\MT@the@pr@code@tr} +%\changes{v2.2}{2007/04/05}{adjust protrusion of letterspaced fonts} +% If the font is letterspaced, we have to add half the letterspacing amount to +% the margin kerns. This will be activated in \cs{MT@set@tr@codes}. +% \begin{macrocode} +\def\MT@the@pr@code{\@tempcntb} +\MT@requires@pdftex6{ + \def\MT@the@pr@code@tr{% + \numexpr\@tempcntb+\MT@letterspace@/2\relax + } +}\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@set@codes} +%\changes{v2.3a}{2007/12/29}{generalised} +% Split up the values and set the codes. +% \begin{macrocode} +\def\MT@set@codes#1,{% + \ifx\relax#1\@empty\else + \MT@split@codes #1==\relax + \expandafter\MT@set@codes + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@split@codes} +%\changes{v1.1}{2004/09/13}{fix: allow zero and negative values} +%\changes{v1.8}{2005/05/25}{get character width once only} +% The \pkg{keyval} package would remove spaces here, which we needn't do since +% \cs{SetProtrusion} ignores spaces in the protrusion list anyway. +% \cs{MT@get@char@unit} may mean different things. +% \begin{macrocode} +\def\MT@split@codes#1=#2=#3\relax{% + \def\@tempa{#1}% + \ifx\@tempa\@empty \else + \MT@get@slot + \ifnum\MT@char > \m@ne + \MT@get@char@unit + \csname MT@\MT@feat @split@val\endcsname#2\relax + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@pr@split@val} +% \begin{macrocode} +\def\MT@pr@split@val#1,#2\relax{% + \def\@tempb{#1}% + \MT@ifempty\@tempb\relax{% + \MT@scale@to@em + \lpcode\MT@font\MT@char=\MT@the@pr@code +%\MT@dinfo@nl{4}{;;; lp (\MT@char): \number\lpcode\MT@font\MT@char: [#1]}% + }% + \def\@tempb{#2}% + \MT@ifempty\@tempb\relax{% + \MT@scale@to@em + \rpcode\MT@font\MT@char=\MT@the@pr@code +%\MT@dinfo@nl{4}{;;; rp (\MT@char): \number\rpcode\MT@font\MT@char: [#2]}% + }% +% \end{macrocode} +% Now we can set the values for the inheriting characters. Their slot numbers +% are saved in the macro |\MT@inh@|\meta{list name}|@|\meta{slot number}|@|. +% \begin{macrocode} + \MT@ifdefined@c@T\MT@pr@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@pr@inh@name @\MT@char @}{% + \MT@exp@cs\MT@map@tlist@c + {MT@inh@\MT@pr@inh@name @\MT@char @}% + \MT@set@pr@heirs + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@scale@to@em} +% Since \pdftex\ version 0.14h, we have to adjust the protrusion factors (\ie, +% convert numbers from thousandths of character width to thousandths of an em +% of the font). We have to do this \emph{before} setting the inheriting +% characters, so that the latter inherit the absolute value, not the relative +% one if they have a differing width (\eg, the `ff' ligature). +%\changes{v1.5}{2004/12/10}{don't use \cmd\lpcode\ and \cmd\rpcode\ for the +% calculation} +% Unlike \file{protcode.tex} and \pkg{pdfcprot}, we do not calculate with +% \cs{lpcode} resp. \cs{rpcode}, since this would disallow protrusion factors +% larger than the character width (since \cs{[lr]pcode}'s limit is 1000). Now, +% the maximum protrusion is 1\,em 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. +% \begin{macrocode} +\MT@requires@pdftex3{ + \def\MT@scale@to@em{% + \@tempcntb=\MT@count\relax +% \end{macrocode} +% For really huge fonts (100\,pt or so), an arithmetic overflow could occur +% with vanilla \TeX. Using \etex, this can't happen, since the intermediate +% value is 64\,bit, which could only be reached with a character width larger +% than \cs{maxdimen}. +% \begin{macrocode} + \MT@scale\@tempcntb \@tempb \MT@dimen@six + \ifnum\@tempcntb=\z@ \else + \MT@scale@factor + \fi + } +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@charwd} +% Get the width of the character. When using \etex, we can employ +% \cmd\fontcharwd\ instead of building scratch boxes. +%\changes{v1.6}{2005/01/19}{use \etex's \cmd\fontcharwd, if available} +%\changes{v1.8}{2005/05/25}{warning for missing (resp. zero-width) characters} +% \begin{macrocode} + \def\MT@get@charwd{% +^^X \MT@count=\fontcharwd\MT@font\MT@char\relax +^^Q \setbox\z@=\hbox{\MT@font \char\MT@char}% +^^Q \MT@count=\wd\z@ + \ifnum\MT@count=\z@ \MT@info@missing@char \fi + } +% \end{macrocode} +%\changes{v2.2}{2007/04/05}{subtract letterspacing amount from width} +% For letterspaced fonts, we have to subtract the letterspacing amount from the +% characters' widths. The protrusion amounts will be adjusted in +% \cs{MT@set@pr@codes}. +% The letterspaced font is already loaded so that 1\,em = \fontdim6. +% \begin{macrocode} + \MT@requires@pdftex6{ + \g@addto@macro\MT@get@charwd{% + \MT@ifdefined@c@T\MT@letterspace@ + {\advance\MT@count -\dimexpr\MT@letterspace@ sp *\dimexpr 1em/1000\relax}% + } + }\relax +}{ +% \end{macrocode} +%\end{macro} +% No adjustment with versions 0.14f and 0.14g. +% \begin{macrocode} + \def\MT@scale@to@em{% + \MT@count=\@tempb\relax + \ifnum\MT@count=\z@ \else + \MT@scale@factor + \fi + } +% \end{macrocode} +% We need this in \cs{MT@warn@code@too@large} (neutralised). +% \begin{macrocode} + \def\MT@get@charwd{\MT@count=\MT@dimen@six} +} +% \end{macrocode} +%\begin{macro}{\MT@get@font@dimen} +% For the |space| unit. +%\changes{v1.9d}{2006/02/13}{warning for zero fontdimen} +% \begin{macrocode} +\def\MT@get@font@dimen#1{% + \ifnum\fontdimen#1\MT@font=\z@ + \MT@warning@nl{Font `\MT@@font' does not specify its\MessageBreak + \@backslashchar fontdimen #1 (it's zero)!\MessageBreak + You should use a different `unit' for \MT@curr@list@name}% + \else + \MT@count=\fontdimen#1\MT@font + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@info@missing@char} +%\changes{v1.9a}{2005/11/17}{info instead of warning +% (after \contributor Michael Hoppe reported that +% the `fl' ligature is missing in Palatino )} +% ^^A MID: <1h64d0x.16xsx9n1151dieN%mh@michael-hoppe.de> +% Info about missing characters, or characters with zero width. +% \begin{macrocode} +\def\MT@info@missing@char{% + \MT@info@nl{Character `\the\MT@toks' +^^X \iffontchar\MT@font\MT@char + has a width of 0pt +^^X \else is missing\fi +^^Q \MessageBreak (it's probably missing) + \MessageBreak in font `\MT@@font'.\MessageBreak + Ignoring protrusion settings for this character}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@scale@factor} +%\changes{v1.5}{2004/12/10}{warning for factors outside limits} +%\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 + \fi + \ifnum\@tempcntb>\csname MT@\MT@feat @max\endcsname\relax + \MT@exp@cs\MT@warn@code@too@large{MT@\MT@feat @max}% + \else + \ifnum\@tempcntb<\csname MT@\MT@feat @min\endcsname\relax + \MT@exp@cs\MT@warn@code@too@large{MT@\MT@feat @min}% + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@code@too@large} +% Type out a warning if a chosen protrusion factor is too large after the +% conversion. As a special service, we also type out the maximum amount that +% may be specified in the configuration. +%\changes{v1.7}{2005/02/17}{new macro: type out maximum protrusion factor} +%\changes{v1.9b}{2006/01/03}{fix calculation with present factor} +% \begin{macrocode} +\def\MT@warn@code@too@large#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 + \fi + \MT@scale\@tempcnta \MT@dimen@six \MT@count + \MT@warning@nl{The \@nameuse{MT@abbr@\MT@feat} code \@tempb\space + is too large for character\MessageBreak + `\the\MT@toks' in \MT@curr@list@name.\MessageBreak + Setting it to the maximum of \number\@tempcnta}% + \@tempcntb=#1\relax +} +% \end{macrocode} +%\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}). +% \begin{macrocode} +\def\MT@get@opt{% + \MT@set@listname +% \end{macrocode} +%\begin{macro}{\MT@pr@factor@} +%\begin{macro}{\MT@sp@factor@} +%\begin{macro}{\MT@kn@factor@} +% Apply a factor? +% \begin{macrocode} + \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}{% + \MT@let@nn{MT@\MT@feat @factor@} + {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @factor}% + \MT@vinfo{... : Multiplying \@nameuse{MT@abbr@\MT@feat} codes by + \number\csname MT@\MT@feat @factor@\endcsname/1000}% + }{% + \MT@let@nn{MT@\MT@feat @factor@}{MT@\MT@feat @factor}% + }% +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@pr@unit@} +%\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 \textminus1, +% relative to space dimensions. +% \begin{macrocode} + \MT@ifdefined@n@TF{MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}{% + \MT@let@nn{MT@\MT@feat @unit@}% + {MT@\MT@feat @c@\csname MT@\MT@feat @c@name\endcsname @unit}% + \MT@exp@cs\ifx{MT@\MT@feat @unit@}\@empty + \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} codes + relative to character widths}% + \else + \MT@exp@cs\ifx{MT@\MT@feat @unit@}\m@ne + \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} codes + relative to width of space}% + \fi + \fi + }{% + \MT@let@nn{MT@\MT@feat @unit@}{MT@\MT@feat @unit}% + }% +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@get@space@unit} +%\begin{macro}{\MT@get@char@unit} +% The codes are either relative to character widths, or to a fixed width. +% For spacing and kerning lists, they may also be relative to the width of +% the interword glue. +% Only the setting from the top list will be taken into account. +% \begin{macrocode} + \let\MT@get@char@unit\relax + \let\MT@get@space@unit\@gobble + \MT@exp@cs\ifx{MT@\MT@feat @unit@}\@empty + \let\MT@get@char@unit\MT@get@charwd + \else + \MT@exp@cs\ifx{MT@\MT@feat @unit@}\m@ne + \let\MT@get@space@unit\MT@get@font@dimen + \else + \MT@exp@cs\MT@get@unit{MT@\MT@feat @unit@}% + \fi + \fi +% \end{macrocode} +%\end{macro} +%\end{macro} +% Preset all characters? If so, we surely don't need to reset, too. +%\changes{v1.9}{2005/10/08}{new key `\texttt{preset}' to set all characters to +% the specified value before loading the lists} +%\changes{v1.9d}{2006/02/13}{set list name before presetting} +%\changes{v1.9d}{2006/02/18}{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 + \MT@let@nc{MT@reset@\MT@feat @codes}\relax + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@unit} +%\changes{v1.8}{2005/04/14}{new macro: get unit for codes} +%\begin{macro}{\MT@get@unit@} +% If |unit| contains an |em| or |ex|, we use the corresponding \cmd\fontdimen\ +% to obtain the real size. Simply converting the em into points might give a +% wrong result, since the font probably isn't set up yet, so that these +% dimensions haven't been updated, either. +% \begin{macrocode} +\def\MT@get@unit#1{% + \expandafter\MT@get@unit@#1 e!\@nil + \ifx\x\@empty\else\let#1\x\fi + \@defaultunits\@tempdima#1 pt\relax\@nnil + \ifdim\@tempdima=\z@ + \MT@warning@nl{% + Cannot set \@nameuse{MT@abbr@\MT@feat} factors relative to zero\MessageBreak + width. Setting factors of list `\@nameuse{MT@\MT@feat @c@name}'\MessageBreak + relative to character widths instead}% + \let#1\@empty + \let\MT@get@char@unit\MT@get@charwd + \else + \MT@vinfo{... : Setting \@nameuse{MT@abbr@\MT@feat} factors relative + to \the\@tempdima}% + \MT@count=\@tempdima\relax + \fi +} +\def\MT@get@unit@#1e#2#3\@nil{% + \ifx\\#3\\\let\x\@empty \else + \if m#2% + \edef\x{#1\fontdimen6\MT@font}% + \else + \if x#2% + \edef\x{#1\fontdimen5\MT@font}% + \fi + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@set@inputenc} +% The configurations may be under the regime of an input encoding. +% \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@cat{#1}% +% \end{macrocode} +%\end{macro} +% \begin{macrocode} + \edef\@tempa{MT@\MT@feat @#1@\csname MT@\MT@feat @#1@name\endcsname @inputenc}% + \MT@ifdefined@n@T\@tempa\MT@set@inputenc@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@inputenc@} +%\changes{v2.2}{2007/06/08}{only load \pkg{inputenc} files if necessary} +% More recent versions of \pkg{inputenc} remember the current encoding, so that +% we can test whether we really have to load the encoding file. +% \begin{macrocode} +\MT@addto@setup{% + \@ifpackageloaded{inputenc}{% + \@ifpackagelater{inputenc}{2006/02/22}{% + \def\MT@set@inputenc@{% + \MT@ifstreq\inputencodingname{\csname\@tempa\endcsname}\relax + \MT@load@inputenc + }% + }{% + \let\MT@set@inputenc@\MT@load@inputenc + }% + }{% + \def\MT@set@inputenc@{% + \MT@warning@nl{Key `inputenc' used in \MT@curr@list@name, but the `inputenc' + \MessageBreak package isn't loaded. Ignoring input encoding}% + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@load@inputenc} +% Set up normal catcodes, since, \eg, \pkg{listings} would otherwise want to +% actually typeset the \pkg{inputenc} file when it is being loaded inside a +% listing. +%\changes{v2.0}{2006/09/15}{sanitise catcodes before loading input encoding +% (problem with \pkg{listings})} +% \begin{macrocode} +\def\MT@load@inputenc{% + \MT@cfg@catcodes +%\MT@dinfo@nl{1}{loading input encoding: \@nameuse{\@tempa}}% + \inputencoding{\@nameuse{\@tempa}}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@pr@heirs} +% Set the inheriting characters. +% \begin{macrocode} +\def\MT@set@pr@heirs#1{% + \lpcode\MT@font#1=\lpcode\MT@font\MT@char + \rpcode\MT@font#1=\rpcode\MT@font\MT@char +%\MT@dinfo@nl{2}{-- heir of \MT@char: #1}% +%\MT@dinfo@nl{4}{;;; lp/rp (#1): \number\lpcode\MT@font\MT@char/% +% \number\rpcode\MT@font\MT@char}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@preset@pr} +%\begin{macro}{\MT@preset@pr@} +% Preset characters. Presetting them relative to their widths is not allowed. +% \begin{macrocode} +\def\MT@preset@pr{% + \expandafter\expandafter\expandafter\MT@preset@pr@ + \csname MT@pr@c@\MT@pr@c@name @preset\endcsname\@nil +} +\def\MT@preset@pr@#1,#2\@nil{% + \ifx\MT@pr@unit@\@empty + \MT@warn@preset@towidth{pr}% + \let\MT@preset@aux\MT@preset@aux@factor + \else + \def\MT@preset@aux{\MT@preset@aux@space2}% + \fi + \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}% + \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}% + \MT@set@all@pr\@tempa\@tempb +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@preset@aux} +%\begin{macro}{\MT@preset@aux@factor} +%\begin{macro}{\MT@preset@aux@space} +%\changes{v2.2}{2007/06/16}{generalised} +% Auxiliary macro for presetting. Store value \meta{\#1} in macro \meta{\#2}. +% \begin{macrocode} +\def\MT@preset@aux@factor#1#2{% + \@tempcntb=#1\relax + \MT@scale@factor + \edef#2{\number\@tempcntb}% +} +\def\MT@preset@aux@space#1#2#3{% + \def\@tempb{#2}% + \MT@get@space@unit#1% + \MT@scale@to@em + \edef#3{\number\@tempcntb}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@warn@preset@towidth} +% \begin{macrocode} +\def\MT@warn@preset@towidth#1{% + \MT@warning@nl{% + Cannot preset characters relative to their widths\MessageBreak + for \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'. Presetting them% + \MessageBreak relative to 1em instead}% +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Expansion} +% +%\begin{macro}{\MT@expansion} +% Set up for expansion? +% \begin{macrocode} +\def\MT@expansion{\MT@maybe@do{ex}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@ex@codes@s} +% Setting up font expansion is a bit different because of the \opt{selected} option. +% There are two versions of this macro. +% +% If \opt{selected}|=true|, we only apply font expansion to those fonts for which a +% list has been declared (\ie, like for protrusion). +% \begin{macrocode} +\def\MT@set@ex@codes@s{% + \MT@if@list@exists{% + \MT@get@ex@opt + \let\MT@get@char@unit\relax + \MT@reset@ef@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@ex@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@ex@c@\MT@ex@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,% + \MT@expandfont + }\relax +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\MT@set@ex@codes@n} +% If, on the other hand, all characters should be expanded by the same amount, +% we only take the first optional argument to \cs{SetExpansion} into account. +%\begin{macro}{\ifMT@nonselected} +% We need this boolean in \cs{MT@if@list@exists} so that no warning for missing +% lists will be issued. +% \begin{macrocode} +\newif\ifMT@nonselected +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\def\MT@set@ex@codes@n{% + \MT@nonselectedtrue + \MT@if@list@exists + \MT@get@ex@opt + {% + \let\MT@stretch@ \MT@stretch + \let\MT@shrink@ \MT@shrink + \let\MT@step@ \MT@step + \let\MT@auto@ \MT@auto + \let\MT@ex@factor@\MT@ex@factor + }% + \MT@reset@ef@codes + \MT@expandfont + \MT@nonselectedfalse +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@ex@codes} +%\changes{v1.5}{2004/12/02}{allow non-selected font expansion} +%\changes{v1.6}{2004/12/26}{introduce \texttt{factor} option} +%\changes{v1.7}{2005/02/06}{two versions of this macro} +% Default is non-selected. It can be changed in the package options. +% \begin{macrocode} +\let\MT@set@ex@codes\MT@set@ex@codes@n +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@expandfont} +% Expand the font. +% \begin{macrocode} +\def\MT@expandfont{% + \pdffontexpand\MT@font \MT@stretch@ \MT@shrink@ \MT@step@ \MT@auto@\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@all@ex} +%\begin{macro}{\MT@reset@ef@codes@} +% At first, all expansion factors for the characters will be set to 1000 +% (respectively the |factor| of this font). +% \begin{macrocode} +\def\MT@set@all@ex#1{% +%\MT@dinfo@nl{3}{-- ex: setting all to \number#1}% + \MT@do@font{\efcode\MT@font\@tempcnta=#1\relax}% +} +\def\MT@reset@ef@codes@{\MT@set@all@ex\MT@ex@factor@} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@reset@ef@codes} +% However, this is only necessary for versions prior to~1.20. +%\changes{v1.6a}{2005/01/30}{only reset \cmd\efcode s for older \pdftex\ versions} +% \begin{macrocode} +\MT@requires@pdftex4{ + \def\MT@reset@ef@codes{% + \ifnum\MT@ex@factor@=\@m \else + \MT@reset@ef@codes@ + \fi + } +}{ + \let\MT@reset@ef@codes\MT@reset@ef@codes@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ex@split@val} +% There's only one number per character. +% \begin{macrocode} +\def\MT@ex@split@val#1\relax{% + \@tempcntb=#1\relax +% \end{macrocode} +% Take an optional factor into account. +% \begin{macrocode} + \ifnum\MT@ex@factor@=\@m \else + \MT@scale\@tempcntb \MT@ex@factor@ \@m + \fi + \ifnum\@tempcntb > \MT@ex@max + \MT@warn@ex@too@large\MT@ex@max + \else + \ifnum\@tempcntb < \MT@ex@min + \MT@warn@ex@too@large\MT@ex@min + \fi + \fi + \efcode\MT@font\MT@char=\@tempcntb +%\MT@dinfo@nl{4}{::: ef (\MT@char): \number\efcode\MT@font\MT@char: [#1]}% +% \end{macrocode} +% Heirs, heirs, I love thy heirs. +% \begin{macrocode} + \MT@ifdefined@c@T\MT@ex@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@ex@inh@name @\MT@char @}{% + \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@ex@inh@name @\MT@char @}\MT@set@ex@heirs + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@ex@too@large} +% \begin{macrocode} +\def\MT@warn@ex@too@large#1{% + \MT@warning@nl{Expansion factor \number\@tempcntb\space too large for + character\MessageBreak `\the\MT@toks' in \MT@curr@list@name.\MessageBreak + Setting it to the maximum of \number#1}% + \@tempcntb=#1\relax +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@ex@opt} +%\changes{v1.9d}{2006/02/13}{fix: evaluate \texttt{preset}} +%\begin{macro}{\MT@ex@factor@} +%\begin{macro}{\MT@stretch@} +%\begin{macro}{\MT@shrink@} +%\begin{macro}{\MT@step@} +%\begin{macro}{\MT@auto@} +% Apply different values to this font? +% \begin{macrocode} +\def\MT@get@ex@opt{% + \MT@set@listname + \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @factor}{% + \MT@let@cn\MT@ex@factor@{MT@ex@c@\MT@ex@c@name @factor}% + \MT@vinfo{... : Multiplying expansion factors by \number\MT@ex@factor@/1000}% + }{% + \let\MT@ex@factor@\MT@ex@factor + }% + \MT@get@ex@opt@{stretch}{Setting stretch limit to \number\MT@stretch@}% + \MT@get@ex@opt@{shrink} {Setting shrink limit to \number\MT@shrink@}% + \MT@get@ex@opt@{step} {Setting expansion step to \number\MT@step@}% + \def\@tempa{autoexpand}% + \MT@get@ex@opt@{auto}{\ifx\@tempa\MT@auto@ En\else Dis\fi abling automatic expansion}% + \MT@ifdefined@n@T{MT@ex@c@\MT@ex@c@name @preset}{% + \MT@preset@ex + \let\MT@reset@ef@codes\relax + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@get@ex@opt@} +% \begin{macrocode} +\def\MT@get@ex@opt@#1#2{% + \MT@ifdefined@n@TF{MT@ex@c@\MT@ex@c@name @#1}{% + \MT@let@nn{MT@#1@}{MT@ex@c@\MT@ex@c@name @#1}% + \MT@vinfo{... : #2}% + }{% + \MT@let@nn{MT@#1@}{MT@#1}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@ex@heirs} +% \begin{macrocode} +\def\MT@set@ex@heirs#1{% + \efcode\MT@font#1=\efcode\MT@font\MT@char +%\MT@dinfo@nl{2}{-- heir of \MT@char: #1}% +%\MT@dinfo@nl{4}{::: ef (#1) \number\efcode\MT@font\MT@char}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@preset@ex} +% \begin{macrocode} +\def\MT@preset@ex{% + \@tempcntb=\csname MT@ex@c@\MT@ex@c@name @preset\endcsname\relax + \MT@scale@factor + \MT@set@all@ex\@tempcntb +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Interword spacing (glue)} +% +%\begin{macro}{\MT@spacing} +% Adjustment of interword spacing? +% \begin{macrocode} +\MT@requires@pdftex6{ +\def\MT@spacing{\MT@maybe@do{sp}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@sp@codes} +% This is all the same. +% \begin{macrocode} +\def\MT@set@sp@codes{% + \MT@if@list@exists{% + \MT@get@font@dimen@six{% + \MT@get@opt + \MT@reset@sp@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@sp@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@sp@c@\MT@sp@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,}% + }\MT@reset@sp@codes +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@sp@split@val} +% If |unit=space|, \cs{MT@get@space@unit} will be defined to fetch the +% corresponding fontdimen (2 for the first, 3 for the second and 4 for the +% third argument). +% \begin{macrocode} +\def\MT@sp@split@val#1,#2,#3\relax{% + \def\@tempb{#1}% + \MT@ifempty\@tempb\relax{% + \MT@get@space@unit2% + \MT@scale@to@em + \knbscode\MT@font\MT@char=\@tempcntb +%\MT@dinfo@nl{4}{;;; knbs (\MT@char): \number\knbscode\MT@font\MT@char: [#1]}% + }% + \def\@tempb{#2}% + \MT@ifempty\@tempb\relax{% + \MT@get@space@unit3% + \MT@scale@to@em + \stbscode\MT@font\MT@char=\@tempcntb +%\MT@dinfo@nl{4}{;;; stbs (\MT@char): \number\stbscode\MT@font\MT@char: [#2]}% + }% + \def\@tempb{#3}% + \MT@ifempty\@tempb\relax{% + \MT@get@space@unit4% + \MT@scale@to@em + \shbscode\MT@font\MT@char=\@tempcntb +%\MT@dinfo@nl{4}{;;; shbs (\MT@char): \number\shbscode\MT@font\MT@char: [#3]}% + }% + \MT@ifdefined@c@T\MT@sp@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@sp@inh@name @\MT@char @}{% + \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@sp@inh@name @\MT@char @}\MT@set@sp@heirs + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@sp@heirs} +% \begin{macrocode} +\def\MT@set@sp@heirs#1{% + \knbscode\MT@font#1=\knbscode\MT@font\MT@char + \stbscode\MT@font#1=\stbscode\MT@font\MT@char + \shbscode\MT@font#1=\shbscode\MT@font\MT@char +%\MT@dinfo@nl{2}{-- heir of \MT@char: #1}% +%\MT@dinfo@nl{4}{;;; knbs/stbs/shbs (#1): \number\knbscode\MT@font\MT@char/% +% \number\stbscode\MT@font\MT@char/\number\shbscode\MT@font\MT@char}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@all@sp} +%\begin{macro}{\MT@reset@sp@codes} +%\begin{macro}{\MT@reset@sp@codes@} +% \begin{macrocode} +\def\MT@set@all@sp#1#2#3{% +%\MT@dinfo@nl{3}{-- knbs/stbs/shbs: setting all to #1/#2/#3}% + \let\MT@temp\@empty + \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbscode\MT@font\@tempcnta=#1\relax}}% + \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\stbscode\MT@font\@tempcnta=#2\relax}}% + \MT@ifempty{#3}\relax{\g@addto@macro\MT@temp{\shbscode\MT@font\@tempcnta=#3\relax}}% + \MT@do@font\MT@temp +} +\def\MT@reset@sp@codes@{\MT@set@all@sp\z@\z@\z@} +\let\MT@reset@sp@codes\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@preset@sp} +%\begin{macro}{\MT@preset@sp@} +% \begin{macrocode} +\def\MT@preset@sp{% + \expandafter\expandafter\expandafter\MT@preset@sp@ + \csname MT@sp@c@\MT@sp@c@name @preset\endcsname\@nil +} +\def\MT@preset@sp@#1,#2,#3\@nil{% + \ifx\MT@sp@unit@\@empty + \MT@warn@preset@towidth{sp}% + \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@factor{#1}\@tempa}% + \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@factor{#2}\@tempc}% + \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@factor{#3}\@tempb}% + \else + \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux@space2{#1}\@tempa}% + \MT@ifempty{#2}{\let\@tempc\@empty}{\MT@preset@aux@space3{#2}\@tempc}% + \MT@ifempty{#3}{\let\@tempb\@empty}{\MT@preset@aux@space4{#3}\@tempb}% + \fi + \MT@set@all@sp\@tempa\@tempc\@tempb +} +}\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +% +%\subsubsection{Additional kerning} +% +%\begin{macro}{\MT@kerning} +% Again, only check for additional kerning for new versions of \pdftex. +% \begin{macrocode} +\MT@requires@pdftex6{ +\def\MT@kerning{\MT@maybe@do{kn}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@kn@codes} +% It's getting boring, I know. +% \begin{macrocode} +\def\MT@set@kn@codes{% + \MT@if@list@exists{% + \MT@get@font@dimen@six{% + \MT@get@opt + \MT@reset@kn@codes + \MT@get@inh@list + \MT@set@inputenc{c}% + \MT@load@list\MT@kn@c@name + \MT@set@listname + \MT@let@cn\@tempc{MT@kn@c@\MT@kn@c@name}% + \expandafter\MT@set@codes\@tempc,\relax,}% + }\MT@reset@kn@codes +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@kn@split@val} +% Again, the unit may be measured in the space dimension; this time only +% \fontdim2. +% \begin{macrocode} +\def\MT@kn@split@val#1,#2\relax{% + \def\@tempb{#1}% + \MT@ifempty\@tempb\relax{% + \MT@get@space@unit2% + \MT@scale@to@em + \knbccode\MT@font\MT@char=\@tempcntb +%\MT@dinfo@nl{4}{;;; knbc (\MT@char): \number\knbccode\MT@font\MT@char: [#1]}% + }% + \def\@tempb{#2}% + \MT@ifempty\@tempb\relax{% + \MT@get@space@unit2% + \MT@scale@to@em + \knaccode\MT@font\MT@char=\@tempcntb +%\MT@dinfo@nl{4}{;;; knac (\MT@char): \number\knaccode\MT@font\MT@char: [#2]}% + }% + \MT@ifdefined@c@T\MT@kn@inh@name{% + \MT@ifdefined@n@T{MT@inh@\MT@kn@inh@name @\MT@char @}{% + \MT@exp@cs\MT@map@tlist@c{MT@inh@\MT@kn@inh@name @\MT@char @}\MT@set@kn@heirs + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@kn@heirs} +% \begin{macrocode} +\def\MT@set@kn@heirs#1{% + \knbccode\MT@font#1=\knbccode\MT@font\MT@char + \knaccode\MT@font#1=\knaccode\MT@font\MT@char +%\MT@dinfo@nl{2}{-- heir of \MT@char: #1}% +%\MT@dinfo@nl{4}{;;; knbc (#1): \number\knbccode\MT@font\MT@char/% +% \number\knaccode\MT@font\MT@char}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@set@all@kn} +%\begin{macro}{\MT@reset@kn@codes} +%\begin{macro}{\MT@reset@kn@codes@} +% \begin{macrocode} +\def\MT@set@all@kn#1#2{% +%\MT@dinfo@nl{3}{-- knac/knbc: setting all to #1/#2}% + \let\MT@temp\@empty + \MT@ifempty{#1}\relax{\g@addto@macro\MT@temp{\knbccode\MT@font\@tempcnta=#1\relax}}% + \MT@ifempty{#2}\relax{\g@addto@macro\MT@temp{\knaccode\MT@font\@tempcnta=#2\relax}}% + \MT@do@font\MT@temp +} +\def\MT@reset@kn@codes@{\MT@set@all@kn\z@\z@} +\let\MT@reset@kn@codes\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@preset@kn} +%\begin{macro}{\MT@preset@kn@} +% \begin{macrocode} +\def\MT@preset@kn{% + \expandafter\expandafter\expandafter\MT@preset@kn@ + \csname MT@kn@c@\MT@kn@c@name @preset\endcsname\@nil +} +\def\MT@preset@kn@#1,#2\@nil{% + \ifx\MT@kn@unit@\@empty + \MT@warn@preset@towidth{kn}% + \let\MT@preset@aux\MT@preset@aux@factor + \else + \def\MT@preset@aux{\MT@preset@aux@space2}% + \fi + \MT@ifempty{#1}{\let\@tempa\@empty}{\MT@preset@aux{#1}\@tempa}% + \MT@ifempty{#2}{\let\@tempb\@empty}{\MT@preset@aux{#2}\@tempb}% + \MT@set@all@kn\@tempa\@tempb +} +}\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +% +%\subsubsection{\lsstyle Tracking} +% +% This only works with \pdftex\ 1.40. +% \begin{macrocode} +\MT@requires@pdftex6{ +% \end{macrocode} +%\begin{macro}{\MT@tracking} +%\changes{v2.2}{2007/02/23}{remember fonts that shouldn't be letterspaced} +%\begin{macro}{\MT@tracking@} +%\changes{v2.2}{2007/06/16}{fix: tracking couldn't be re-enabled} +%\begin{macro}{\MT@tr@font@list} +% We only check whether a font should not be letterspaced at all, not whether +% we've already done that (because we have to do it again). +% \begin{macrocode} +\let\MT@tr@font@list\@empty +\def\MT@tracking@{% + \MT@exp@one@n\MT@in@clist\MT@font\MT@tr@font@list + \ifMT@inlist@\else + \MT@maybe@do{tr}% + \ifMT@do\else + \xdef\MT@tr@font@list{\MT@tr@font@list\MT@font,}% + \fi + \fi +} +% +\let\MT@tracking +% \MT@tracking@ +% \relax +% \end{macrocode} +%\end{macro} +%\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} +\def\MT@set@tr@codes{% +%<*package> + \MT@vinfo{Tracking font `\MT@@font'\on@line}% + \MT@get@font@dimen@six{% + \MT@if@list@exists + \MT@get@tr@opt + \relax +% + \MT@ifdefined@c@TF\MT@letterspace@\relax{\let\MT@letterspace@\MT@letterspace}% + \ifnum\MT@letterspace@=\z@ +% \end{macrocode} +%\changes{v2.3d}{2009/03/05}{allow zero tracking} +% Zero tracking requires special treatment. +% \begin{macrocode} + \MT@set@tr@zero + \else +% \MT@vinfo{... Tracking by \number\MT@letterspace@}% +% \end{macrocode} +% Letterspacing only works in mode. +% \begin{macrocode} + \MT@warn@tracking@DVI +% \end{macrocode} +%\begin{macro}{\MT@lsfont} +% The letterspaced font instances are saved in macros +% |\|\meta{font name}|/|\meta{letterspacing amount}|ls|. +% +%\changes{v2.2}{2007/03/07}{use \cmd\font@name, not \cs{MT@font}} +% In contrast to \cs{MT@font}, which may reflect the font characteristics more +% accurately (taking substitutions into account), \cmd\font@name\ is guaranteed +% to correspond to an actual font identifier. +% \begin{macrocode} + \xdef\MT@lsfont{\csname\expandafter\string\font@name + /\number\MT@letterspace@ ls\endcsname}% + \expandafter\ifx\MT@lsfont\relax +%\MT@dinfo@nl{1}{... new letterspacing instance}% +% \end{macrocode} +%\end{macro} +% In case of nested letterspacing with different amounts, we have to extract +% the base font again. +%\todo{outer spacing/kerning for nested letterspaced text} +% \begin{macrocode} + \MT@get@ls@basefont + \global\expandafter\letterspacefont\MT@lsfont\font@name\MT@letterspace@ +% \end{macrocode} +%\changes{v2.2}{2007/06/16}{possibility to customise interword spacing} +% Scale interword spacing (not configurable in \letterspace). +% \begin{macrocode} +%<*package> + \MT@ifdefined@c@TF\MT@tr@ispace + {\let\@tempa\MT@tr@ispace}% + {\edef\@tempa{\MT@letterspace@*,,}}% + \MT@ifdefined@c@TF\MT@tr@ospace + {\edef\@tempa{\@tempa,\MT@tr@ospace}}% + {\edef\@tempa{\@tempa,,,}}% + \expandafter\MT@tr@set@space\@tempa,% +% +%<*letterspace> + % spacing = {*,,} + \fontdimen2\MT@lsfont=\dimexpr\numexpr 1000+\MT@letterspace@\relax sp + * \fontdimen2\MT@lsfont/1000\relax +% +% \end{macrocode} +%\changes{v2.3}{2007/11/03}{possibility to customise outer kerning +% (suggested by \contributor Stephan Hennig )} +% ^^A MID: <46aa1cbb$0$31620$9b4e6d93@newsspool3.arcor-online.net> +% Adjust outer kerning (\microtype\ only). +% \begin{macrocode} +%<*package> + \MT@ifdefined@c@TF\MT@tr@okern{\let\@tempa\MT@tr@okern}{\def\@tempa{*,*}}% + \expandafter\MT@tr@set@okern\@tempa,% +% \end{macrocode} +%\changes{v2.2}{2007/02/23}{disable ligatures in letterspaced fonts manually +% (due to change in \pdftex\ 1.40.4)} +% Disable ligatures (not configurable in \letterspace). +% \begin{macrocode} + \MT@ifdefined@c@T\MT@tr@ligatures\MT@tr@noligatures +% +%<*letterspace> + % no ligatures = {f} + \tagcode\MT@lsfont`f=\m@ne +% +% \end{macrocode} +% Adjust protrusion values now, and maybe later (in \cs{MT@pr@split@val}). +%\changes{v2.3}{2007/07/27}{also adjust tracking if protrusion is not enabled, +% and even for \letterspace\ +% (reported by \contributor Stephan Hennig )} +% ^^A MID: <46a9c6c6$0$21005$9b4e6d93@newsspool1.arcor-online.net> +%\changes{v2.3b}{2008/05/12}{fix: protrusion adjustment only for new fonts +% (reported by \contributor Wolfram Schaalo )} +% ^^A private mail, 2008/05/12 +% \begin{macrocode} +%\MT@dinfo@nl{2}{... compensating for tracking (\number\MT@letterspace@)}% + \MT@do@font{\lpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax + \rpcode\MT@lsfont\@tempcnta=\numexpr\MT@letterspace@/2\relax}% +% \let\MT@the@pr@code\MT@the@pr@code@tr + \fi +% \end{macrocode} +% Finally, let the letterspaced font propagate. +% \begin{macrocode} + \aftergroup\MT@set@lsfont +% \let\MT@font\MT@lsfont +% \end{macrocode} +%\begin{macro}{\MT@set@curr@ls} +%\begin{macro}{\MT@curr@ls} +% We need to remember the current letterspacing amount (for \cs{lslig}). +% \begin{macrocode} + \xdef\MT@set@curr@ls{\def\noexpand\MT@curr@ls{\MT@letterspace@}}% + \aftergroup\MT@set@curr@ls +% \end{macrocode} +%\end{macro} +%\end{macro} +% Adjust surrounding spacing and kerning. +%\begin{macro}{\MT@set@curr@os} +%\changes{v2.3}{2007/11/03}{adjusting spaces made more reliable} +% We get the current outer spacing and adjust it, then, after the end of the +% current outer group, set the current outer spacing, again, and adjust. +% \begin{macrocode} +%<*package> + \MT@outer@space=\csname MT@outer@space\expandafter\string\font@name\endcsname\relax + \xdef\MT@set@curr@os{\MT@outer@space=\the\MT@outer@space\relax}% + \MT@tr@outer@l +% +% \end{macrocode} +%\end{macro} +% If \cs{MT@ls@adjust} is empty, it's the starred version of \cs{textls}. +% Use scaling to avoid a `Dimension too large'. +% \begin{macrocode} + \ifx\MT@ls@adjust\@empty +% % \textls : outer kerning = {*,*} ; \textls* : outer kerning = {0,0} + \MT@outer@kern=-\dimexpr\MT@letterspace@ sp * \fontdimen6\font@name/2000\relax + \MT@ls@outer@k +%<*letterspace> + \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}% + \aftergroup\aftergroup\aftergroup\MT@ls@aftergroup +% +% \end{macrocode} +% Otherwise, get the current outer kerning and adjust it, for left and right +% side (\microtype\ only). +% \begin{macrocode} +%<*package> + \else + \MT@outer@kern=\expandafter\expandafter\expandafter\@firstoftwo + \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax + \ifdim\MT@outer@kern=\z@\else \MT@ls@outer@k \fi + \MT@outer@kern=\expandafter\expandafter\expandafter\@secondoftwo + \csname MT@outer@kern\expandafter\string\font@name\endcsname\relax +% + \fi +%<*package> +% \end{macrocode} +%\begin{macro}{\MT@set@curr@ok} +% Carry the outer kerning amount to outside the next group, then set outer +% spacing (which will set kerning, if no space follows). +% \begin{macrocode} + \xdef\MT@set@curr@ok{\MT@outer@kern=\the\MT@outer@kern\relax}% + \aftergroup\aftergroup\aftergroup\MT@ls@aftergroup +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +% + \fi +% }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ls@aftergroup} +% Stuff to be done after the letterspace group. The \letterspace\ package +% only adjusts the kerning. +% \begin{macrocode} +%\def\MT@ls@aftergroup{\MT@set@curr@ok\MT@ls@outer@k} +% \end{macrocode} +%\changes{v2.3e}{2009/11/02}{compatibility with \pkg{tikz} (first reported by +% \contributor Christian Stark )} ^^A MID: <7d81lgF2ad3ckU1@mid.dfncis.de>, 2009/07/28 +%^^A Also: \contributor Karl Karlsson ^^A privat mail, 2009/10/29 +%^^A \contributor hscm ^^A MID: <6a24e972-b1a7-4172-a5a0-d2707e016301@12g2000pri.googlegroups.com>, 2009/11/02 +% \microtype\ also adjusts spacing. +% If \cmd\tikz@expandcount\ is greater than zero, we're inside or at the end of +% a \pkg{tikz} node, where we don't want to do anything, lest we disturb +% \pkg{tikz}. +% \begin{macrocode} +%<*package> +\MT@addto@setup{% + \@ifpackageloaded{tikz} + {\def\MT@ls@aftergroup{% + \ifnum\tikz@expandcount>\z@ \else + \MT@set@curr@os\MT@set@curr@ok\expandafter\MT@tr@outer@r\fi}} + {\def\MT@ls@aftergroup{\MT@set@curr@os\MT@set@curr@ok\MT@tr@outer@r}}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@tr@opt} +% Various settings (only for the \microtype\ version). +% \begin{macrocode} +\def\MT@get@tr@opt{% + \MT@set@listname + \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name}{% + \MT@let@cn\MT@letterspace{MT@tr@c@\MT@tr@c@name}% +% \end{macrocode} +%\begin{macro}{\MT@tr@unit@} +% 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 + \let\MT@tr@unit@\@undefined + \else + \MT@let@cn\@tempb{MT@tr@c@\MT@tr@c@name}% + \MT@get@unit\MT@tr@unit@ + \let\MT@tr@factor@\@m + \MT@scale@to@em + \edef\MT@letterspace{\number\@tempcntb}% + \fi + }% + }% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@ispace} +%\begin{macro}{\MT@tr@ospace} +% Adjust interword spacing. +% \begin{macrocode} + \MT@get@tr@opt@{spacing} {ispace}% + \MT@get@tr@opt@{outerspacing}{ospace}% +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@tr@okern} +% Adjust outer kerning. +% \begin{macrocode} + \MT@get@tr@opt@{outerkerning}{okern}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@ligatures} +% Which ligatures should we disable (empty means all, undefined none)? +% \begin{macrocode} + \MT@get@tr@opt@{noligatures} {ligatures}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@get@tr@opt@} +% \begin{macrocode} +\def\MT@get@tr@opt@#1#2{% + \MT@ifdefined@n@T{MT@tr@c@\MT@tr@c@name @#1}% + {\MT@let@nn{MT@tr@#2}{MT@tr@c@\MT@tr@c@name @#1}}% +} +% +% \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} +%\MT@requires@latex2{ +\def\MT@set@lsfont{\MT@exp@two@c\let\font@name\MT@lsfont} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\lsstyle} +%\changes{v2.0}{2005/09/21}{(beta:1) new command: letterspacing} +%\changes{v2.0}{2006/09/19}{(beta:8) fix: font switches don't pose a problem anymore} +%\changes{v2.0}{2006/09/21}{(beta:8) fix: letterspacing commands may be nested} +%\changes{v2.0}{2006/12/28}{totally redone, using the new \cmd\letterspacefont} +%\changes{v2.3d}{2008/11/16}{make invalid in math mode} +%\changes{v2.3d}{2009/01/07}{disable for \luatex} +% Disable the tests whether the font should be letterspaced, then trigger the +% setup. +% Only \cs{textls} can be used in math mode (\cs{lsstyle} may be used inside +% another text switch, of course). +% \begin{macrocode} +\DeclareRobustCommand\lsstyle{% + \not@math@alphabet\lsstyle\textls +% \def\MT@feat{tr}% + \let\MT@tracking\MT@set@tr@codes + \selectfont +} +% \end{macrocode} +% Now the definitions for the \letterspace\ package with plain \TeX. +% \begin{macrocode} +%<*plain> +}{ +\def\MT@set@lsfont{\MT@lsfont} +\def\lsstyle{% + \begingroup + \escapechar\m@ne + \xdef\font@name{\csname\expandafter\string\the\font\endcsname}% + \MT@set@tr@codes + \endgroup +} +\let\textls\@undefined +\let\lslig\@undefined +} +% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\lslig} +%\changes{v2.1}{2007/01/17}{new command: protect ligatures in letterspaced text} +%\changes{v2.2}{2007/02/25}{always defined} +%\changes{v2.3}{2007/11/03}{redone: extract outer kerns from current letterspacing +% amount} +%\begin{macro}{\MT@lslig} +% For Fraktur fonts, some ligatures shouldn't be broken up. This command will +% temporarily select the base font and insert the correct kerning. +% \begin{macrocode} +\DeclareRobustCommand\lslig[1]{% + {\MT@ifdefined@c@TF\MT@curr@ls{% + \escapechar\m@ne + \MT@get@ls@basefont + \MT@outer@kern=\dimexpr\MT@curr@ls sp * \fontdimen6\font@name/2000\relax + \kern\MT@outer@kern + \font@name #1% + \kern\MT@outer@kern% + }{#1}}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@ls@basefont} +%\begin{macro}{\MT@get@ls@basefont} +%\changes{v2.1}{2007/01/19}{redone: use \cmd\pdfmatch\ to make it bullet-proof} +% \pdftex\ cannot letterspace fonts that already are letterspaced. Therefore, +% we have to save the base font in |\|\meta{font name}|@base|. +% +%\changes{v2.2}{2007/02/18}{fix again: remember base font in a macro} +% The previous solution (checking the macro's meaning with \cmd\pdfmatch), +% where we were loading the base font via the \cmd\font\ primitive again, +% would destroy all previously set up micro-typographic features of the font. +% \begin{macrocode} +\def\MT@get@ls@basefont{% + \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}% + \expandafter\ifx\MT@ls@basefont\relax + \MT@exp@two@c\MT@glet\MT@ls@basefont\font@name + \else +%\MT@dinfo@nl{1}{... fixing base font}% + \MT@exp@two@c\let\font@name\MT@ls@basefont + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@set@lsbasefont} +%\begin{macro}{\MT@set@tr@zero} +%\changes{v2.3d}{2009/03/05}{fix: allow switching off tracking +% (reported by \contributor Ulrich Dirr )} +% ^^A private mail, 2009/02/22 +% If tracking is switched off in the middle of the document, or if \cs{textls} +% is called with a zero letterspacing amount, we have to retrieve the base font +% and select it. +% \begin{macrocode} +\def\MT@set@lsbasefont{\MT@exp@two@c\let\font@name\MT@ls@basefont} +\def\MT@set@tr@zero{% +%\MT@dinfo@nl{1}{... zero tracking}% + \xdef\MT@ls@basefont{\csname\expandafter\string\font@name @base\endcsname}% + \expandafter\ifx\MT@ls@basefont\relax \else +%\MT@dinfo@nl{1}{... fixing base font}% + \aftergroup\MT@set@lsbasefont + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@tr@noligatures} +% \pdftex\ 1.40.0--1.40.3 disabled all ligatures in letterspaced fonts. +% \begin{macrocode} +%<*package> +\MT@requires@pdftex7{ + \def\MT@tr@noligatures{% + \ifx\MT@tr@ligatures\@empty + \MT@noligatures@\MT@lsfont\@undefined + \else + \MT@noligatures@\MT@lsfont\MT@tr@ligatures + \fi + } +}{ + \def\MT@tr@noligatures{% + \MT@warning@nl{% + Disabling selected ligatures is only possible since\MessageBreak + pdftex 1.40.4. Disabling all ligatures instead}% + \MT@glet\MT@tr@noligatures\relax + } +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@outer@space} +% A new skip for outer spacing. +% \begin{macrocode} +\newskip\MT@outer@space +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@set@space} +% Adjust interword spacing (\fontdim2--4) for inner and outer space. +% For inner spacing, the font dimensions will be adjusted, the settings for +% outer spacing will be remembered in a macro. +% \begin{macrocode} +\def\MT@tr@set@space#1,#2,#3,#4,#5,#6,{% +%\MT@dinfo@nl2{... orig. space: \the\fontdimen2\MT@lsfont, +% \the\fontdimen3\MT@lsfont, \the\fontdimen4\MT@lsfont +% \MessageBreak... (#1,#2,#3) (#4,#5,#6)}% + \let\MT@temp\@empty + \MT@tr@set@space@{#1}{#4}{2}\@empty + \MT@tr@set@space@{#2}{#5}{3}\@plus + \MT@tr@set@space@{#3}{#6}{4}\@minus + \MT@glet@nc{MT@outer@space\expandafter\string\font@name}\MT@temp +%\MT@dinfo@nl2{... inner space: \the\fontdimen2\MT@lsfont, +% \the\fontdimen3\MT@lsfont, \the\fontdimen4\MT@lsfont}% +%\MT@dinfo@nl2{... outer space: \MT@temp}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@set@space@} +% If outer spacing settings don't exist, they will be inherited from the inner +% spacing settings. +% \begin{macrocode} +\def\MT@tr@set@space@#1#2#3#4{% + \MT@ifempty{#2}{% + \MT@ifempty{#1}{% + \edef\MT@temp{\MT@temp#4\the\fontdimen#3\MT@lsfont}% + }{% + \MT@tr@set@space@@{#1}{#3}{1000}% + \edef\MT@temp{\MT@temp#4\the\@tempdima}% + \fontdimen#3\MT@lsfont=\@tempdima + }% + }{% + \MT@tr@set@space@@{#2}{#3}{2000}% + \edef\MT@temp{\MT@temp#4\the\@tempdima}% + \MT@ifempty{#1}\relax{% + \MT@tr@set@space@@{#1}{#3}{1000}% + \fontdimen#3\MT@lsfont=\@tempdima + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@set@space@@} +% If the value is followed by an asterisk, the fontdimen will be scaled by the +% respective amount, otherwise the value denotes the desired dimension in the +% respective unit. +% \begin{macrocode} +\def\MT@tr@set@space@@#1#2#3{% + \MT@test@ast#1*\@nil{% + \MT@ifdefined@c@TF\MT@tr@unit@ + {\edef\@tempb{#1}\MT@scale@to@em} + {\@tempcntb=#1\relax}% + \@tempdima=\dimexpr \dimexpr\@tempcntb sp*\MT@dimen@six/1000\relax + -\fontdimen#2\MT@lsfont\relax +% \end{macrocode} +% For \fontdim2, we also have to subtract the kerning that letterspacing adds +% to the sides of the characters (only half if it's for outer spacing). +% \begin{macrocode} + \ifnum#2=\tw@ + \advance\@tempdima -\dimexpr\MT@letterspace@ sp*\MT@dimen@six/#3\relax + \fi + \@tempdima=\dimexpr \fontdimen#2\MT@lsfont+\@tempdima\relax + }{% + \MT@ifempty\@tempa{\let\@tempa\MT@letterspace@}\relax + \@tempdima=\dimexpr \numexpr1000+\@tempa sp *\fontdimen#2\MT@lsfont/1000\relax + }% +%\MT@dinfo@nl3{... : font dimen #2 (#1): \the\@tempdima}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@outer@l} +% Recall the last skip (must really be an interword space, not just a marker, +%\changes{v2.3}{2007/10/23}{only change pre outer space if it contains shrink} +% nor a `hard' space, \ie, one that doesn't contain stretch or shrink parts). +%\changes{v2.3b}{2008/05/12}{fix: only in horizontal mode} +% \begin{macrocode} +\def\MT@tr@outer@l{% + \ifhmode + \ifdim\lastskip>5sp + \edef\x{\the\lastskip minus 0pt}% + \setbox\z@\hbox{\MT@outer@space=\x}% + \ifdim\wd\z@>\z@ +%\MT@dinfo2{[[[ adjusting pre space: \the\MT@outer@space}% + \unskip \hskip\MT@outer@space\relax +% \end{macrocode} +% Disable left outer kerning. +% \begin{macrocode} + \let\MT@ls@outer@k\relax + \else +% \end{macrocode} +%\changes{v2.3b}{2008/05/18}{make \cmd\spaceskip-aware (\pkg{ragged2e})} +% The \pkg{ragged2e} package sets \cmd\spaceskip\ without glue. +% \begin{macrocode} + \ifdim\lastskip=% + \ifnum\spacefactor<2000 + \spaceskip + \else + \ifdim\xspaceskip=\z@ + \dimexpr\spaceskip+\fontdimen7\font@name\relax + \else + \xspaceskip + \fi + \fi +%\MT@dinfo2{[[[ adjusting pre space (skip): \the\MT@outer@space}% + \unskip \hskip\MT@outer@space\relax + \let\MT@ls@outer@k\relax + \fi + \fi + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@tr@outer@next} +%\begin{macro}{\MT@tr@outer@r} +%\begin{macro}{\MT@tr@outer@r@} +% The following is borrowed from \pkg{soul}. I've added the cases for italic +% correction, since tracking may also be triggered by text commands (\eg, +% \cmd\textsc). +% \begin{macrocode} +\def\MT@tr@outer@r{% + \futurelet\MT@tr@outer@next\MT@tr@outer@r@ +} +\def\MT@tr@outer@r@{% + \def\MT@temp*{}% +% \end{macrocode} +% Don't adjust in math mode. +%\changes{v2.3d}{2008/11/16}{fix: don't adjust in math mode +% (reported by \contributor Christoph Bier )} +% ^^A MID: <6oapk7F2lvo6U1@mid.individual.net> +% There was a tricky bug when \cs{textls} was the last command in a +% \cmd\mathchoice\ group. +% \begin{macrocode} + \ifmmode \else +% \end{macrocode} +% A similar bug occurred when adjustment would happen inside a discretionary +% group, which we prevent here. +%\changes{v2.3d}{2009/02/08}{fix: don't adjust inside discretionary +% (reported by \contributor Maverick Woo )} +% ^^A private mail, 2009/02/07 +% This only works with \etex\ (which we know is available). +%\changes{v2.3b}{2008/05/18}{additional test for horizontal mode} +% \begin{macrocode} + \ifnum\currentgrouptype=10 \else + \def\MT@temp*##1{\ifhmode\hskip\MT@outer@space +%\MT@dinfo2{]]] adjusting post space (1): \the\MT@outer@space}% + \fi}% + \ifcat\egroup\noexpand\MT@tr@outer@next +% \end{macrocode} +%\changes{v2.3c}{2008/09/18}{additional test for horizontal mode +% (reported by \contributor Sveinung Heggen )} +% ^^A private mail, 2008/09/18 +%\todo{fix problem with tikz} +%^^A \path[->] (N0) edge node {\textls{abc}} (N1); +%^^A reported by \contributor Christian Stark +%^^A ^^A 2009/07/28, MID: <7d81lgF2ad3ckU1@mid.dfncis.de> +% \begin{macrocode} + \ifhmode\unkern\fi\egroup + \MT@set@curr@ok \MT@set@curr@os + \def\MT@temp*{\afterassignment\MT@tr@outer@r\let\MT@temp=}% + \else +% \end{macrocode} +% If the next token is \cmd\maybe@ic\ (from an enclosing text command), we +% gobble it, read the next one, feed it to \cmd\maybe@ic@\ (via +% \cs{MT@tr@outer@icr}) and then call ourselves again. +%\changes{v2.3d}{2009/02/25}{don't use \cmd\x\ +% (reported by \contributor Ulrich Dirr )} +% ^^A private mail, 2009/02/22 +%\changes{v2.3e}{2009/05/29}{fix: set current kerning and spacing again +% (found by \contributor Lars R\"onnb\"ack )} +% ^^A +% \begin{macrocode} + \ifx\maybe@ic\MT@tr@outer@next + \MT@set@curr@ok \MT@set@curr@os + \def\MT@temp*{\afterassignment\MT@tr@outer@icr\let\MT@temp=}% + \else +% \end{macrocode} +% If the next token is \cmd\check@icr\ (from an inner text command), we insert +% ourselves just before it. This will then call \cmd\maybe@ic\ again the next +% round (which however will always insert an italic correction, since it +% doesn't read beyond our group). +% \begin{macrocode} + \ifx\check@icr\MT@tr@outer@next + \def\MT@temp*{\aftergroup\MT@tr@outer@r\check@icr\let\MT@temp=}% + \else + \ifx\@sptoken\MT@tr@outer@next + \def\MT@temp* {\ifhmode\hskip\MT@outer@space +%\MT@dinfo2{]]] adjusting post spaces (2): \the\MT@outer@space}% + \fi}% + \else + \ifx~\MT@tr@outer@next + \def\MT@temp*~{\nobreak\hskip\MT@outer@space +%\MT@dinfo2{]]] adjusting post spaces (3): \the\MT@outer@space}% + }% + \else + \ifx\ \MT@tr@outer@next \else + \ifx\space\MT@tr@outer@next \else + \ifx\@xobeysp\MT@tr@outer@next \else +% \end{macrocode} +% If there's no outer spacing, there may be outer kerning. +% \begin{macrocode} + \def\MT@temp*{\ifdim\MT@outer@kern=\z@\else\MT@ls@outer@k +%\MT@dinfo2{--- adjusting post kern: \the\MT@outer@kern}% + \fi}% + \let\MT@tr@outer@next\relax + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \MT@temp*% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@tr@outer@icr} +%\begin{macro}{\MT@tr@outer@icr@} +% Helper macros for the italic correction mess. +% \begin{macrocode} +\def\MT@tr@outer@icr{\afterassignment\MT@tr@outer@icr@\MT@tr@outer@r} +\def\MT@tr@outer@icr@{% + \let\@let@token= \MT@tr@outer@next + \maybe@ic@ +} +% \end{macrocode} +%\end{macro} +%\end{macro} +% For older \pdftex\ versions, throw an error. +% \begin{macrocode} +}{ + \DeclareRobustCommand\lsstyle{% + \MT@error{Letterspacing only works with pdftex version 1.40\MessageBreak + or newer}{Upgrade pdftex, or use the `soul' package instead.}% + \MT@glet\lsstyle\relax + } +} +% \end{macrocode} +% And for \luatex, too. +% \begin{macrocode} +%<*lua> +\MT@requires@luatex{ + \DeclareRobustCommand\lsstyle{% + \MT@error{Letterspacing currently doesn't work with luatex} + {Run pdftex, or use the `soul' package instead.}% + \MT@glet\lsstyle\relax + } +}\relax +% +% +% \end{macrocode} +%\begin{macro}{\textls} +%\changes{v2.0}{2005/09/21}{(beta:1) new command: letterspacing} +%\changes{v2.0}{2006/12/28}{starred version: remove spaces around text} +%\changes{v2.1}{2007/01/19}{fix: use \cmd\hmode@bgroup} +%\changes{v2.3d}{2008/11/16}{make math mode aware} +%\begin{macro}{\MT@ls@adjust@} +% This command may be used like the other text commands. +% The starred version removes kerning on the sides. +% The optional argument changes the letterspacing factor. +% \begin{macrocode} +\DeclareRobustCommand\textls{% + \@ifstar{\let\MT@ls@adjust@\MT@ls@adjust@empty\MT@textls}% + {\let\MT@ls@adjust@\MT@ls@adjust@relax\MT@textls}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@textls} +%\begin{macro}{\MT@letterspace@} +% This is now almost \LaTeX's \cmd\DeclareTextFontCommand, with the difference +% that we adjust the outer spacing and kerning also for \cs{lsstyle}, while +% \LaTeX's text \emph{switches} don't bother about italic correction. +% \begin{macrocode} +\newcommand\MT@textls[2][]{% + \ifmmode + \nfss@text{\MT@ls@set@ls{#1}\lsstyle#2}% + \else + \hmode@bgroup + \MT@ls@set@ls{#1}% + \lsstyle #2% + \expandafter + \egroup + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@ls@adjust} +%\begin{macro}{\MT@ls@adjust@empty} +%\begin{macro}{\MT@ls@adjust@relax} +%\begin{macro}{\MT@ls@set@ls} +% Set current letterspacing amount and outer kerning. This has to be done inside +% the same group as the letterspacing command. +% \begin{macrocode} +\def\MT@ls@adjust@empty{\let\MT@ls@adjust\@empty} +\def\MT@ls@adjust@relax{\let\MT@ls@adjust\relax} +\def\MT@ls@set@ls#1{% + \MT@ifempty{#1}% + {\let\MT@letterspace@\@undefined}% + {\KV@@sp@def\MT@letterspace@{#1}% + \MT@ls@too@large\MT@letterspace@}% + \MT@ls@adjust@ +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@ls@too@large} +% Test whether letterspacing amount is too large. +% \begin{macrocode} +\def\MT@ls@too@large#1{% + \ifnum#1>\MT@tr@max + \MT@warning{Maximum for option `letterspace' is \number\MT@tr@max}% + \let#1\MT@tr@max + \else + \ifnum#1<\MT@tr@min + \MT@warning{Minimum for option `letterspace' is \number\MT@tr@min}% + \let#1\MT@tr@min + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@outer@kern} +%\begin{macro}{\MT@tr@set@okern} +%\changes{v2.3d}{2008/12/19}{allow empty value for \texttt{outer kerning}} +% This dimen is used for the starred version of \cs{textls}, for \cs{lslig} +% and for adjusted outer kerning. +% \begin{macrocode} +\newdimen\MT@outer@kern +%<*package> +\def\MT@tr@set@okern#1,#2,{% + \let\MT@temp\@empty + \MT@ifempty{#1}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#1}}% + \MT@ifempty{#2}{\MT@tr@set@okern@{*}}{\MT@tr@set@okern@{#2}}% + \MT@glet@nc{MT@outer@kern\expandafter\string\font@name}\MT@temp +%\MT@dinfo@nl2{... outer kerning: (#1,#2) +% = \@nameuse{MT@outer@kern\expandafter\string\font@name}}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@tr@set@okern@} +% \begin{macrocode} +\def\MT@tr@set@okern@#1{% + \MT@test@ast#1*\@nil{% + \MT@ifdefined@c@TF\MT@tr@unit@ + {\edef\@tempb{#1}\MT@scale@to@em} + {\@tempcntb=#1\relax}% + \@tempdima=\dimexpr \@tempcntb sp * \MT@dimen@six/1000\relax + }{% + \MT@ifempty\@tempa{\let\@tempa\@m}\relax + \@tempdima=\dimexpr \numexpr\@tempa*\MT@letterspace@/1000\relax sp + * \fontdimen6\MT@lsfont/2000\relax + }% + \advance\@tempdima -\dimexpr \MT@letterspace@ sp + * \fontdimen6\MT@lsfont/2000\relax + \edef\MT@temp{\MT@temp{\the\@tempdima}}% +} +% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@ls@outer@k} +% Adjust outer kerning. +% \begin{macrocode} +\def\MT@ls@outer@k{\ifhmode\kern\MT@outer@kern\relax\fi} +%<*package> +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Disabling ligatures} +% +%\begin{macro}{\MT@noligatures} +% The possibility to disable ligatures is a new features of \pdftex\ 1.30. +%\changes{v2.3}{2007/10/23}{fix: set evaluation didn't work (bug introduced in 2.2)} +% \begin{macrocode} +\MT@requires@pdftex5{ +\def\MT@noligatures{% + \MT@dotrue + \let\@tempa\MT@nl@setname + \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 + \MT@noligatures@\MT@font\MT@nl@ligatures + \fi +} +% \end{macrocode} +%\begin{macro}{\MT@noligatures@} +% This is also used by \cs{MT@set@tr@codes}. +% \begin{macrocode} +\def\MT@noligatures@#1#2{% + \MT@ifdefined@c@TF#2{% +% \end{macrocode} +% Early MiK\TeX\ versions (before 2.5.2579) didn't know \cmd\tagcode. +% \begin{macrocode} + \MT@ifdefined@c@TF\tagcode{% +% \end{macrocode} +% No `|inputenc|' key. +%\changes{v2.3b}{2008/03/27}{fix: warning messages for unknown slots} +% \begin{macrocode} + \let\MT@warn@maybe@inputenc\@empty + \def\MT@curr@list@name{\@backslashchar DisableLigatures}% + \MT@map@clist@c#2{% + \KV@@sp@def\@tempa{##1}\MT@get@slot + \ifnum\MT@char>\m@ne \tagcode#1\MT@char=\m@ne \fi}% + \MT@vinfo{... Disabling ligatures for characters: #2}% + }{% + \pdfnoligatures#1% + \MT@warning{Cannot disable selected ligatures (pdftex doesn't\MessageBreak + know \@backslashchar tagcode). Disabling all ligatures of\MessageBreak + the font instead}% + }% + }{% + \pdfnoligatures#1% + \MT@vinfo{... Disabling ligatures}% + }% +} +}\relax +% \end{macrocode} +%\end{macro} +%\end{macro} +% +%\subsubsection{Loading the configuration} +% +%\begin{macro}{\MT@load@list} +% Recurse through the lists to be loaded. +%\changes{v1.3}{2004/10/27}{check whether list exists} +%\todo{load more than one list} +% \begin{macrocode} +\def\MT@load@list#1{% + \edef\@tempa{#1}% + \MT@let@cn\@tempb{MT@\MT@feat @c@\@tempa @load}% + \MT@ifstreq\@tempa\@tempb{% + \MT@error{\@nameuse{MT@abbr@\MT@feat} list `\@tempa' cannot load itself}{}% + }{% + \ifx\@tempb\relax \else + \MT@ifdefined@n@TF{MT@\MT@feat @c@\@tempb}{% + \MT@vinfo{... : First loading \@nameuse{MT@abbr@\MT@feat} list `\@tempb'}% + \begingroup + \MT@load@list\@tempb + \endgroup + \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list + \noexpand\MessageBreak`\@tempb'}% + \MT@let@cn\@tempc{MT@\MT@feat @c@\@tempb}% + \expandafter\MT@set@codes\@tempc,\relax,% + }{% + \MT@error{\@nameuse{MT@abbr@\MT@feat} list `\@tempb' undefined.\MessageBreak + Cannot load it from list `\@tempa'}{}% + }% + \fi + }% +} +% \end{macrocode} +%\end{macro} +%\changes{v1.1}{2004/09/13}{configuration file names in lowercase +% (suggested by \contributor Harald Harders )} +% ^^A private mail, 2004/09/13 +%\begin{macro}{\MT@find@file} +%\changes{v1.1}{2004/09/14}{fix: also check whether the file for the base +% font family has already been loaded} +% Micro-typographic settings may be written into a file |mt-|\meta{font family}|.cfg|. +%\changes{v1.8}{2005/04/16}{no longer wrap names in commands} +%\begin{macro}{\MT@file@list} +% We must also record whether we've already loaded the file. +% \begin{macrocode} +\let\MT@file@list\@empty +\def\MT@find@file#1{% +% \end{macrocode} +%\end{macro} +% Check for existence of the file only once. +% \begin{macrocode} + \MT@in@clist{#1}\MT@file@list + \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. +% \begin{macrocode} + \MT@begin@catcodes + \let\MT@begin@catcodes\relax + \let\MT@end@catcodes\relax + \InputIfFileExists{mt-#1.cfg}{% + \edef\MT@curr@file{mt-#1.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + \MT@xadd\MT@file@list{#1,}% + }{% + \MT@get@basefamily#1\@empty\@empty\@empty\@nil + \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list + \ifMT@inlist@ + \MT@xadd\MT@file@list{#1,}% + \else + \InputIfFileExists{mt-\@tempa.cfg}{% + \edef\MT@curr@file{mt-\@tempa.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + \MT@xadd\MT@file@list{\@tempa,#1,}% + }{% + \MT@vinfo{... No configuration file mt-#1.cfg}% + \MT@xadd\MT@file@list{#1,}% + }% + \fi + }% + \endgroup + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@cfg@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\ +% (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 )} +% ^^A MID: +% |&| (in |tabular|s), |!|, |?|, |;|, +%\changes{v1.7}{2005/02/06}{reset catcode of `\texttt{:}' +% (compatibility with \pkg{french}* packages)} +% |:| (|french|), |,|, |$|, |_|, |~|, +%\changes{v1.5}{2004/11/28}{reset catcode of `\texttt{\quotechar=}' +% (compatibility with Turkish \pkg{babel})} +% and |=| (Turkish \pkg{babel}). +% +%\changes{v1.8}{2005/03/29}{reset catcodes of the remaining characters} +% OK, now all printable characters up to 127 are `other'. We hope that letters +% are always letters and numbers other. (\pkg{listings} makes them active, see +% section~\ref{sub:compatibility}.) +% +% We leave |^| at catcode 7, so that stuff like `|^^ff|' remains possible. +% \begin{macrocode} +\def\MT@cfg@catcodes{% + \makeatletter + \catcode`\^7% + \catcode`\ 9% + \catcode`\^^I9% + \catcode`\^^M9% + \catcode`\\\z@ + \catcode`\{\@ne + \catcode`\}\tw@ + \catcode`\#6% + \catcode`\%14% + \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} +%\changes{v2.3}{2007/11/20}{fix: don't disable \cmd\KV@@sp@def} +% \begin{macrocode} +\def\MT@begin@catcodes{% + \begingroup + \MT@cfg@catcodes +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@end@catcodes} +% End group if outside configuration file (otherwise relax). +% \begin{macrocode} +\let\MT@end@catcodes\endgroup +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@basefamily} +% The family name might have a suffix +%\changes{v1.1}{2004/09/14}{only remove suffix if it is `\texttt{x}' or `\texttt{j}'} +% \eg, for expert set (|x|), old style numbers (|j|) +%\changes{v1.2}{2004/09/26}{also remove `w' (swash capitals)} +% swash capitals (|w|) etc. We mustn't simply remove the last letter, as this +% would make for instance |cms| out of |cmss| \textit{and} |cmsy| (OK, |cmex| +% will still become |cme|~\dots). +%\changes{v1.4b}{2004/11/25}{fix: failed for font names of the form \texttt{abczz} +% (reported by \contributor Georg Verweyen )} +% ^^A MID: <41A64DC7.7040404@web.de> +%\changes{v2.2}{2007/02/04}{redone, working on font names and suffixes of arbitrary length} +% +% We only work on the font name if it is longer than three characters. +% \begin{macrocode} +\def\MT@get@basefamily#1#2#3#4\@nil{% + \ifx\@empty#4% + \def\@tempa{#1#2#3}% + \else + \let\@tempa\@empty + \edef\@tempb{#1#2#3#4}% + \expandafter\MT@get@basefamily@\@tempb\@nil + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@basefamily@} +% This will only remove one suffix (the longest match), so that +% \emph{combinations} of suffixes would have be to added manually (\eg, +% |\DeclareMicrotypeVariants*{aw}|). But otherwise, something like `|padx|' +% would be truncated to `|p|'. +% \begin{macrocode} +\def\MT@get@basefamily@#1#2\@nil{% + \edef\@tempa{\@tempa#1}% + \ifx\\#2\\\expandafter\@gobble\else\expandafter\@firstofone\fi + {\MT@in@tlist{#2}\MT@variants + \ifMT@inlist@\else\MT@get@basefamily@#2\@nil\fi}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@listname} +%\begin{macro}{\MT@get@listname} +%\begin{macro}{\MT@get@listname@} +% Try all combinations of font family, series, shape and size to get a list for +% the current font. +%\changes{v1.1}{2004/09/15}{don't check for empty attributes list} +%\changes{v1.2}{2004/09/30}{alternatively check for alias font name} +%\changes{v1.7}{2005/03/15}{use \cmd\@tfor\ +% (\contributor Andreas B\"uhmann 's idea)} +% ^^A private mail, 2005/03/12 +%\changes{v1.8}{2005/04/16}{made recursive} +% \begin{macrocode} +\def\MT@get@listname#1{% +%\MT@dinfo@nl{1}{trying to find \@nameuse{MT@abbr@#1} list for font `\MT@@font'}% + \let\MT@listname\@undefined + \def\@tempb{#1}% + \MT@map@tlist@c\MT@try@order\MT@get@listname@ +} +\def\MT@get@listname@#1{% + \expandafter\MT@next@listname#1% + \ifx\MT@listname\@undefined \else + \expandafter\MT@tlist@break + \fi +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@try@order} +%\changes{v1.7}{2005/03/11}{fix: also check for //\meta{series}/\meta{shape}// +% (reported by \contributor Andreas B\"uhmann )} +% ^^A private mail, 2005/03/10 +%\changes{v1.7}{2005/03/11}{always check for size, too +% (suggested by \contributor Andreas B\"uhmann )} +% ^^A private mail, 2005/03/10 +% +%\begin{table}\footnotesize +%\caption{Order for matching font attributes}\label{tab:match-order} +%\catcode`\!=13 \let!\match +%\setlength\fboxsep{4pt} +%\leavevmode\kern-\dimexpr\fboxsep+\fboxrule\relax +%\fcolorbox{theframe}{white}{^^A +%\begin{minipage}{\textwidth} +%\begin{tabular}{@{}L{38pt}*{16}{p{19.5pt}<{\centering}@{}}} +% & 1.& 2.& 3.& 4.& 5.& 6.& 7.& 8.& 9.&10.&11.&12.&13.&14.&15.&16.\\ +%\cmidrule(r){2-2} \cmidrule(r){3-3} \cmidrule(r){4-4} \cmidrule(r){5-5} +%\cmidrule(r){6-6} \cmidrule(r){7-7} \cmidrule(r){8-8} \cmidrule(r){9-9} +%\cmidrule(r){10-10}\cmidrule(r){11-11}\cmidrule(r){12-12}\cmidrule(r){13-13} +%\cmidrule(r){14-14}\cmidrule(r){15-15}\cmidrule(r){16-16}\cmidrule {17-17} +% Encoding & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! & ! \\ +% Family & ! & ! & ! & ! & ! & ! & ! & ! & - & - & - & - & - & - & - & - \\ +% Series & ! & ! & ! & ! & - & - & - & - & ! & ! & ! & ! & - & - & - & - \\ +% Shape & ! & ! & - & - & ! & ! & - & - & ! & ! & - & - & ! & ! & - & - \\ +% Size & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - & ! & - \\ +%\end{tabular} +%\end{minipage}^^A +%}\kern-\dimexpr\fboxsep+\fboxrule\relax ^^A end \fcolorbox +%\end{table} +% +% Beginning with version 1.7, we always check for the font size. Since the +% matching order has become more logical now, it can be described in words, so +% that we don't need table~\ref{tab:match-order} in the documentation part any +% longer and can cast it off here. +% \begin{macrocode} +\def\MT@try@order{% + {1111}{1110}{1101}{1100}{1011}{1010}{1001}{1000}% + {0111}{0110}{0101}{0100}{0011}{0010}{0001}{0000}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@next@listname} +% The current context is added to the font attributes. That is, the context must +% match. +% \begin{macrocode} +\def\MT@next@listname#1#2#3#4{% + \edef\@tempa{\MT@encoding + /\ifnum#1=\@ne \MT@family\fi + /\ifnum#2=\@ne \MT@series\fi + /\ifnum#3=\@ne \MT@shape\fi + /\ifnum#4=\@ne *\fi + \MT@context}% +%\MT@dinfo@nl{1}{trying \@tempa}% + \MT@ifdefined@n@TF{MT@\@tempb @\@tempa}{% + \MT@next@listname@#4% + }{% +% \end{macrocode} +% Also try with an alias family. +% \begin{macrocode} + \ifnum#1=\@ne + \ifx\MT@familyalias\@empty \else + \edef\@tempa{\MT@encoding + /\MT@familyalias + /\ifnum#2=\@ne \MT@series\fi + /\ifnum#3=\@ne \MT@shape\fi + /\ifnum#4=\@ne *\fi + \MT@context}% +%\MT@dinfo@nl{1}{(alias) \@tempa}% + \MT@ifdefined@n@T{MT@\@tempb @\@tempa}{% + \MT@next@listname@#4% + }% + \fi + \fi + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@next@listname@} +% If size is to be evaluated, do that, otherwise use the current list. +% \begin{macrocode} +\def\MT@next@listname@#1{% + \ifnum#1=\@ne + \MT@exp@cs\MT@in@rlist{MT@\@tempb @\@tempa @sizes}% + \ifMT@inlist@ + \let\MT@listname\MT@size@name + \fi + \else + \MT@let@cn\MT@listname{MT@\@tempb @\@tempa}% + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@if@list@exists} +%\changes{v1.7}{2005/02/06}{don't define \cs{MT@\#1@c@name} \cmd\global ly, +% here and elsewhere} +%\begin{macro}{\MT@context} +% \begin{macrocode} +\def\MT@if@list@exists{% + \MT@let@cn\MT@context{MT@\MT@feat @context}% + \MT@ifstreq{@}\MT@context{\let\MT@context\@empty}\relax + \MT@get@listname{\MT@feat @c}% + \MT@ifdefined@c@TF\MT@listname{% + \MT@edef@n{MT@\MT@feat @c@name}{\MT@listname}% + \ifMT@nonselected + \MT@vinfo{... Applying non-selected expansion (list `\MT@listname')}% + \else + \MT@vinfo{... Loading \@nameuse{MT@abbr@\MT@feat} list `\MT@listname'}% + \fi + \@firstoftwo + }{% +% \end{macrocode} +% 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 +% \end{macrocode} +% Don't warn if \opt{selected}|=false|. +% \begin{macrocode} + \ifMT@nonselected + \MT@vinfo{... Applying non-selected expansion (no list)}% + \else +% \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 + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@get@inh@list} +%\changes{v1.6}{2004/12/18}{correct message if \opt{selected} is false} +%\begin{macro}{\MT@context} +% The inheritance lists are global (no context). +% \begin{macrocode} +\def\MT@get@inh@list{% + \let\MT@context\@empty +% \end{macrocode} +%\end{macro} +% \begin{macrocode} + \MT@get@listname{\MT@feat @inh}% + \MT@ifdefined@c@TF\MT@listname{% + \MT@edef@n{MT@\MT@feat @inh@name}{\MT@listname}% +%\MT@dinfo@nl{1}{... Using \@nameuse{MT@abbr@\MT@feat} inheritance list +% `\MT@listname'}% + \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} +% \begin{macrocode} + \ifx\@tempc\@empty \else +%\MT@dinfo@nl{1}{parsing inheritance list ...}% +% \end{macrocode} +% The group is only required in case an input encoding is given. +%\changes{v1.9f}{2006/08/03}{fix: input encoding must be set after the inheritance +% list has been parsed} +% \begin{macrocode} + \begingroup + \edef\MT@curr@list@name{inheritance list\noexpand\MessageBreak`\MT@listname'}% + \MT@set@inputenc{inh}% + \expandafter\MT@inh@do\@tempc,\relax,% + \MT@glet@nc{MT@\MT@feat @inh@\MT@listname}\@empty + \endgroup + \fi + }{% + \MT@let@nc{MT@\MT@feat @inh@name}\@undefined + }% +} +% \end{macrocode} +%\end{macro} +% +% \subsubsection{Translating characters into slots} +% +%\changes{v1.4}{2004/11/04}{don't use scratch registers in global definitions} +% Get the slot number of the character in the current encoding. +% +%\begin{macro}{\MT@get@slot} +%^^A\changes{v1.2}{2004/09/26}{fix: group must also include \cs{MT@get@composite}} +%\changes{v1.4b}{2004/11/22}{don't define \cs{MT@char} globally (save stack problem)} +%\changes{v1.6a}{2005/01/30}{completely redone, hopefully more robust +% (compatible with \pkg{frenchpro}; problem reported by +% \contributor Bernard Gaulle )} +% ^^A private mail, 2005/01/28 +%\changes{v1.7}{2005/03/21}{remove backslash hack} +% 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{% + \escapechar`\\ + \let\MT@char@\m@ne + \MT@noresttrue +% \end{macrocode} +%\end{macro} +%\end{macro} +% Save unexpanded string in case we need to issue a warning message. +% \begin{macrocode} + \MT@toks=\expandafter{\@tempa}% +% \end{macrocode} +% Now, let's walk through (hopefully) all possible cases. +%\begin{itemize} +% \item It's a letter, a character or a number. +% \begin{macrocode} + \expandafter\MT@is@letter\@tempa\relax\relax + \ifnum\MT@char@ < \z@ +% \end{macrocode} +%\changes{v1.8}{2005/03/30}{fix: expand active characters} +% \item It might be an active character, \ie, an 8-bit character defined by +% \pkg{inputenc}. If so, we will expand it here to its form. +% \begin{macrocode} + \MT@exp@two@c\MT@is@active\string\@tempa\@nil +% \end{macrocode} +% \item OK, so it must be a macro. We do not allow random commands but only +% those defined in \LaTeX's idiosyncratic font encoding scheme: +% +% If |\|\meta{encoding}|\|\meta{command} (that's \emph{one} command) is +% defined, we try to extract the slot number. +%\changes{v1.7}{2005/02/27}{test whether \cs{}\meta{encoding}\cs{}\meta{...} is defined} +%\changes{v1.8}{2005/04/04}{test whether \cs{}\meta{encoding}\cs{}\meta{...} is defined +% made more robust} +% +% We must be cautious not to stumble over accented characters consisting +% of two commands, like \cmd\`\cmd\i\ or \cmd\U\cmd\CYRI, hence, +% \cmd\string\ wouldn't be safe enough. +% \begin{macrocode} + \MT@ifdefined@n@TF{\MT@encoding\MT@detokenize@c\@tempa}% + \MT@is@symbol +% \end{macrocode} +% \item Now, we'll catch the rest, which hopefully is an accented character +% (\eg~|\"a|). +% \begin{macrocode} + {\expandafter\MT@is@composite\@tempa\relax\relax}% + \ifnum\MT@char@ < \z@ +% \end{macrocode} +% \item It could also be a \cmd\chardef ed command (\eg, the percent character). +% This seems the least likely case, so it's last. +%\changes{v1.7}{2005/03/20}{test for \cmd\chardef ed commands} +% \begin{macrocode} + \expandafter\MT@exp@two@c\expandafter\MT@is@char\expandafter + \meaning\expandafter\@tempa\MT@charstring\relax\relax\relax + \fi + \fi +% \end{macrocode} +%\end{itemize} +% \begin{macrocode} + \let\MT@char\MT@char@ + \ifnum\MT@char < \z@ + \MT@warn@unknown + \else +% \end{macrocode} +% If the user has specified something like `|fi|', or wanted to define a number +% but forgot to use three digits, we'll have something left of the string. In +% this case, we issue a warning and forget the complete string. +% \begin{macrocode} + \ifMT@norest \else + \MT@warn@rest + \let\MT@char\m@ne + \fi + \fi + \escapechar\m@ne +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\ifMT@norest} +% Test whether all of the string has been used up. +% \begin{macrocode} +\newif\ifMT@norest +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@is@letter} +% Input is a letter, a character or a number. +%\changes{v1.8}{2005/04/04}{warning for non- characters} +%\changes{v1.9}{2005/10/22}{using \cmd\catcode\ should be more efficient than +% inspecting the \cmd\meaning} +% \begin{macrocode} +\def\MT@is@letter#1#2\relax{% + \ifcat a\noexpand#1\relax + \edef\MT@char@{\number`#1}% + \ifx\\#2\\% +%\MT@dinfo@nl{3}{> `\the\MT@toks' is a letter (\MT@char@)}% + \else + \MT@norestfalse + \fi + \else + \ifcat !\noexpand#1\relax + \edef\MT@char@{\number`#1}% +%\MT@dinfo@nl{3}{> `\the\MT@toks' is a character (\MT@char@)}% + \ifx\\#2\\% + \ifnum\MT@char@ > 127 \MT@warn@ascii \fi + \else + \MT@norestfalse + \expandafter\MT@is@number#1#2\relax\relax + \fi + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@is@number} +% Numbers may be specified as a three-digit decimal number (|029|), +%\changes{v1.1}{2004/09/13}{numbers may also be specified in hexadecimal or octal +% (suggested by \contributor Harald Harders )} +% ^^A private mail, 2004/09/13 +% as a hexadecimal number (prefixed with~|"|: |"1D|) or as a octal number +% (prefixed with~|'|: |'35|). They must consist of at least three characters +% (including the prefix), that is, |"F| is not permitted. +% \begin{macrocode} +\def\MT@is@number#1#2#3\relax{% + \ifx\relax#3\relax \else + \ifx\relax#2\relax \else + \MT@noresttrue + \if#1"\relax + \def\x{\uppercase{\edef\MT@char@{\number#1#2#3}}}\x +%\MT@dinfo@nl{3}{> ... a hexadecimal number: \MT@char@}% + \else + \if#1'\relax + \def\MT@char@{\number#1#2#3}% +%\MT@dinfo@nl{3}{> ... an octal number: \MT@char@}% + \else + \MT@ifint{#1#2#3}{% + \def\MT@char@{\number#1#2#3}% +%\MT@dinfo@nl{3}{> ... a decimal number: \MT@char@}% + }\MT@norestfalse + \fi + \fi + \ifnum\MT@char@ > \@cclv + \MT@warn@number@too@large{\noexpand#1\noexpand#2\noexpand#3}% + \let\MT@char@\m@ne + \fi + \fi + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@is@active} +%\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|, +% 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{% +% \ifx\\#2\\% +% \ifnum\catcode`#1 = \active +% \toks@=\expandafter\expandafter\expandafter{\@tempa}% +% \expandafter\MT@active@inpenc\the\toks@\relax\relax +% \edef\@tempa{\the\toks@}% +% \edef\x{\MT@toks={\the\MT@toks\space(= \the\toks@)}}\x +% \fi +% \fi +%} +%\def\MT@active@inpenc#1#2#3\relax{% +% \ifx#1\IeC +% \def\IeC##1{\toks@={##1}}% +% \the\toks@ +% \expandafter\MT@active@inpenc\the\toks@\relax\relax +% \fi +% \ifx#1\@tabacckludge +% \def\@tabacckludge##1##2{% +% \toks@=\expandafter{\csname\string##1\endcsname#3}}% +% \the\toks@ +% \fi +% \ifx#1\@inpenc@undefined@ +% \def\@inpenc@undefined@##1{% +% \edef\x{\toks@={% +% undefined^^J(\MT@MT)\@spaces\@spaces\@spaces\@spaces +% in input encoding ``##1''}}\x}% +% \the\toks@ +% \fi +%} +%\end{verbatim} +%\fi +% +% Unfortunately, the (older) \pkg{inputenc} definitions prefer the +% protected\slash generic variants (\eg, \cmd\copyright\ instead of +% \cmd\textcopyright), which our parser won't be able to understand. +% (I'm fed up now, so you have to complain if you really, really want to be able +% to write `\expandafter|\textcopyright|' instead of \cmd\textcopyright, thus +% rendering your configuration files unportable.) +% +% Unicode characters (\pkg{inputenc}/|utf8|,|utf8x|) are also supported. +%\changes{v1.9d}{2006/03/06}{support for Unicode (\pkg{inputenc}\slash\texttt{utf8})} +%\changes{v2.3}{2007/11/11}{support for extended Unicode (\pkg{inputenc}\slash\texttt{utf8x} resp. \pkg{ucs}) -- experimental} +% +%\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 +% input encoding every time, (2)~the problem (or rather, impossibility) to +% decide which input encoding should be chosen -- the one active when the list +% was declared or the one active when the font is selected, and (3)~the +% improbability of multiple input encodings being used at all. +%\fi +% \begin{macrocode} +\def\MT@is@active#1#2\@nil{% + \ifnum\catcode`#1 = \active + \begingroup + \set@display@protect + \let\IeC\@firstofone + \let\@inpenc@undefined@\MT@undefined@char +% \end{macrocode} +% We refrain from checking whether there is a sufficient number of octets. +% \begin{macrocode} + \def\UTFviii@defined##1{\ifx ##1\relax + \MT@undefined@char{utf8}\else\expandafter ##1\fi}% +% \end{macrocode} +% For \pkg{ucs} (utf8x). Let's call it experimental~\dots +% \begin{macrocode} + \MT@ifdefined@c@T\PrerenderUnicode + {\PrerenderUnicode{\@tempa}\let\unicode@charfilter\@firstofone}% + \edef\x{\endgroup + \def\noexpand\@tempa{\@tempa}% +% \end{macrocode} +% Append what we think the translation is to the token register we use for the +% log. +% \begin{macrocode} + \MT@toks={\the\MT@toks\space(= \@tempa)}% + }% + \x + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@undefined@char} +% For characters not defined in the current input encoding. +% \begin{macrocode} +\def\MT@undefined@char#1{undefined in input encoding ``#1''} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@is@symbol} +% The symbol commands might expand to funny stuff, depending on context. +% Instead of simply expanding |\|\meta{command}, we construct the command +% |\|\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{% + \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@ +% \end{macrocode} +%\changes{v2.2}{2007/03/07}{expand once more (for \pkg{frenchpro})} +% \dots~or, if it hasn't been defined by \cs{DeclareTextSymbol}, a letter +% (\eg, \cmd\i, when using \pkg{frenchpro}). ^^A as noted by Bernard Gaulle +% ^^A private mail, 2005/01/28 +% \begin{macrocode} + \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@is@char} +%\begin{macro}{\MT@charstring} +% A helper macro that inspects the \cmd\meaning\ of its argument. +% \begin{macrocode} +\begingroup + \catcode`\/=\z@ +% \end{macrocode} +%\SpecialEscapechar{\/} +% \begin{macrocode} + /MT@map@tlist@n{/\CHAR}/@makeother + /lowercase{% + /def/x{/endgroup + /def/MT@charstring{\CHAR"}% + /def/MT@is@char##1\CHAR"##2##3##4/relax{% + /ifx/relax##1/relax + /if##3\/relax + /edef/MT@char@{/number"##2}% + /MT@ifstreq/MT@charstring{##3##4}/relax/MT@norestfalse + /else + /edef/MT@char@{/number"##2##3}% + /MT@ifstreq/MT@charstring{##4}/relax/MT@norestfalse + /fi +% /MT@dinfo@nl{3}{> `/the/MT@toks' is a \char (/MT@char@)}% + /fi + }% + }% + } +/x +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@is@composite} +% Here, we are dealing with accented characters, specified as two tokens. +%\changes{v1.7}{2005/03/10}{new macro: construct command for composite character; +% no uncontrolled expansion} +%\changes{v2.2}{2007/06/08}{more robust: expand exactly once} +% \begin{macrocode} +\def\MT@is@composite#1#2\relax{% + \ifx\\#2\\\else +% \end{macrocode} +% Again, we construct a control sequence, this time of the form: +% |\\|\meta{encoding}\allowbreak|\|\meta{accent}|-|\meta{character}, \eg, +% |\\T1\"-a|, which we then expand once to see if it is 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} + \expandafter\def\expandafter\MT@char\expandafter{\csname\expandafter + \string\csname\MT@encoding\endcsname + \MT@detokenize@n{#1}-\MT@detokenize@n{#2}\endcsname}% + \expandafter\expandafter\expandafter\MT@is@letter\MT@char\relax\relax + \fi +} +% \end{macrocode} +%\end{macro} +% [What about math? Well, for a moment the following looked like a solution, with +% \cs{mt@is@mathchar} defined accordingly, analogous to \cs{MT@is@char} above, +% to pick up the last two tokens (the \cmd\meaning\ of a \cmd\mathchardef'ed +% command expands to its hexadecimal notation): +%\begin{verbatim} +%\def\MT@is@mathchar#1{% +% \if\relax\noexpand#1% it's a macro +% \let\x#1% +% \else % it's a character +% \mathchardef\x=\mathcode`#1\relax +% \fi +% \expandafter\MT@exp@two@c\expandafter\mt@is@mathchar\expandafter +% \meaning\expandafter\x\mt@mathcharstring\relax\relax\relax +%} +%\end{verbatim} +% However, the problem is that \cmd\mathcode s and \cmd\mathchardef s have +% global scope. Therefore, if they are changed by a package that loads +% different math fonts, there is no guarantee whatsoever that things will still +% be correct (\eg, the minus in |cmsy| when the \pkg{euler} package is loaded). +% So, no way to go, unfortunately.] +% +% Some warning messages, for performance reasons separated here. +%\begin{macro}{\MT@curr@list@name} +%\changes{v1.8}{2005/06/08}{new macro: current list type and name} +%\changes{v1.9f}{2006/08/03}{fix: \cs{MessageBreak} must not be expanded} +%\begin{macro}{\MT@set@listname} +% The type and name of the current list, defined at various places. +% \begin{macrocode} +\def\MT@set@listname{% + \edef\MT@curr@list@name{\@nameuse{MT@abbr@\MT@feat} list\noexpand\MessageBreak + `\@nameuse{MT@\MT@feat @c@name}'}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@warn@ascii} +% 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@) + is outside of ASCII range.\MessageBreak + You must load the `inputenc' package before using\MessageBreak + 8-bit characters in \MT@curr@list@name}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@number@too@large} +% Number too large. +% \begin{macrocode} +\def\MT@warn@number@too@large#1{% + \MT@warning@nl{% + Number #1 in encoding `\MT@encoding' too large!\MessageBreak + Ignoring it in \MT@curr@list@name}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@rest} +% Not all of the string has been parsed. +% \begin{macrocode} +\def\MT@warn@rest{% + \MT@warning@nl{% + Unknown slot number of character\MessageBreak`\the\MT@toks'% + \MT@warn@maybe@inputenc\MessageBreak + in font encoding `\MT@encoding'.\MessageBreak + Make sure it's a single character\MessageBreak + (or a number) in \MT@curr@list@name}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@unknown} +% No idea what went wrong. +% \begin{macrocode} +\def\MT@warn@unknown{% + \MT@warning@nl{% + Unknown slot number of character\MessageBreak`\the\MT@toks'% + \MT@warn@maybe@inputenc\MessageBreak + in font encoding `\MT@encoding' in \MT@curr@list@name}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@maybe@inputenc} +% In case an input encoding had been requested. +% \begin{macrocode} +\def\MT@warn@maybe@inputenc{% + \MT@ifdefined@n@T + {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}% + { (input encoding `\@nameuse + {MT@\MT@feat @\MT@cat @\csname MT@\MT@feat @\MT@cat @name\endcsname @inputenc}')}% +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Hook into \LaTeX's font selection}\label{sssec:impl.hook} +% +% 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 +% more than once. The whole package really hangs on this command. +% +% In contrast to the \pkg{pdfcprot} package, it is not necessary to declare in +% advance which fonts should benefit from micro-typographic treatment. Also, +% only those fonts that are actually being used will be set up. +% +% 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!) +% \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. +% \end{itemize} +% \item \cmd\get@external@font\ is called by \cmd\extract@font, by itself, +% and by the substitution macros. +%\end{itemize} +% +%\iffalse +%\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} +%\fi +%\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 +% 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 additionally had to set up the default font, the error font (if +% it wasn't the default font), we had to check for some packages that might +% have been loaded before \microtype\ and were loading fonts, \eg, +% \pkg{jurabib}, \pkg{ledmac}, \pkg{pifont} (loaded by \pkg{hyperref}), +% \pkg{tipa}, and probably many more. Furthermore, we had to include a hack for +% the \pkg{IEEEtran} class which loads all fonts in the class file itself (to +% fine tune inter-word spacing), and the \pkg{memoir} class, too. 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 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} +%\changes{v1.9}{2005/10/03}{allow context-specific font setup} +%\begin{macro}{\MT@font@list} +%\begin{macro}{\MT@font} +% We use a comma separated list. +% \begin{macrocode} +\let\MT@font@list\@empty +\let\MT@font\@empty +% \end{macrocode} +%\end{macro} +%\end{macro} +% All this is done at the beginning of the document. +% It doesn't work for plain, of course, which doesn't have \cmd\pickup@font. +% \begin{macrocode} +% +%\MT@requires@latex2{ +\MT@addto@setup{% +% \end{macrocode} +%\changes{v2.1}{2007/01/15}{compatibility with \pkg{CJK}: also check for its definition} +%\changes{v2.3b}{2008/05/26}{compatibility with \pkg{CJKutf8}: also check for its definition} +%\begin{macro}{\MT@orig@pickupfont} +% \microtype\ also works with \pkg{CJK} in the sense that nothing will break +% when both packages are used at the same time. However, since \pkg{CJK} has +% its own way of encoding, it is currently not possible to create +% character-specific settings. That is, the only feature available with +% \pkg{CJK} fonts is expansion. +% (Tracking doesn't really work for other reasons.) +%\todo{fix tracking with \pkg{CJK}, if worth the trouble}^^A +% Like us, \pkg{CJK} redefines \cmd\pickup@font. +% \begin{macrocode} + \@ifpackageloaded{CJK}{% + \@ifpackagelater{CJK}{2006/10/17}% 4.7.0 + {\def\MT@orig@pickupfont{\CJK@ifundefined\CJK@plane}}% + {\def\MT@orig@pickupfont{\@ifundefined{CJK@plane}}}% + \g@addto@macro\MT@orig@pickupfont + {{\expandafter\ifx\font@name\relax\define@newfont\fi}}% +% \end{macrocode} +% \pkg{CJKutf8} redefines \cmd\pickup@font\ once more (recent versions, in +% mode, as determined by \pkg{ifpdf}, which \pkg{CJKutf8} loads). +% \begin{macrocode} + \@ifpackageloaded{CJKutf8}% + {\@ifpackagelater{CJKutf8}{2008/05/22}% 4.8.0 + {\ifpdf\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}% + {\@firstoftwo}}% + {\@firstoftwo}% + {\g@addto@macro\MT@orig@pickupfont{% + {\expandafter\ifx\csname\curr@fontshape/\f@size/\CJK@plane\endcsname\relax + \define@newfont\else\xdef\font@name{% + \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}% + {\g@addto@macro\MT@orig@pickupfont{% + {\expandafter\ifx\csname \curr@fontshape/\f@size/\CJK@plane\endcsname\relax + \define@newfont\def\CJK@temp{v}% + \ifx\CJK@temp\CJK@plane + \expandafter\ifx\csname CJK@cmap@\f@family\CJK@plane\endcsname\relax + \else\csname CJK@cmap@\f@family\CJK@plane\endcsname\fi + \else \CJK@addcmap\CJK@plane \fi + \else\xdef\font@name{% + \csname \curr@fontshape/\f@size/\CJK@plane\endcsname}\fi}}}% + }{% + \def\MT@orig@pickupfont{\expandafter\ifx\font@name\relax\define@newfont\fi}% + }% +% \end{macrocode} +% Check whether \cmd\pickup@font\ is defined as expected. +% The warning issued by \cmd{\CheckCommand*} would be a bit too generic. +% \begin{macrocode} + \ifx\pickup@font\MT@orig@pickupfont \else + \MT@warning@nl{% + Command \string\pickup@font\space is not defined as expected.% + \MessageBreak Patching it anyway. Some things may break% +%<*package> + .\MessageBreak Double-check whether micro-typography is indeed% + \MessageBreak applied to the document.% + \MessageBreak (Hint: Turn on `verbose' mode)% +% + }% + \fi +% \end{macrocode} +%\end{macro} +%\begin{macro}{\pickup@font} +% Then we append our stuff. Everything is done inside a group. +%\changes{v2.2}{2007/04/15}{\letterspace: setup inside group} +% \begin{macrocode} + \g@addto@macro\pickup@font{\begingroup}% +% \end{macrocode} +% If the \pkg{trace} package is loaded, we turn off tracing of \microtype's +% setup, which is extremely noisy. +%\changes{v1.9e}{2006/05/25}{no tracing with \pkg{trace} package} +% \begin{macrocode} + \MT@with@package@T{trace}{\g@addto@macro\pickup@font{\conditionally@traceoff}}% + \g@addto@macro\pickup@font{% + \escapechar\m@ne +%<*package> +% \global\MT@inannottrue +% \MT@glet\MT@pdf@annot\@empty +% \MT@addto@annot{(line \number\inputlineno)}% +% \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 +% catch first order substitutions, like |bx| to |b|, but it will still fail if +% the substituting font is itself substituted. +% \begin{macrocode} + \MT@let@cn\MT@font{MT@subst@\expandafter\string\font@name}% + \ifx\MT@font\relax + \let\MT@font\font@name + \else + \ifx\MT@font\font@name \else +% \MT@addto@annot{= substituted with \MT@@font}% + \MT@register@subst@font + \fi + \fi + \MT@setupfont +% +% \MT@tracking + \endgroup + }% +%<*package> +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@pickupfont} +% Remember the patched command for later. +% \begin{macrocode} + \let\MT@pickupfont\pickup@font +% \end{macrocode} +%\end{macro} +%\begin{macro}{\do@subst@correction} +% 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. +%\changes{v2.3}{2007/08/05}{remember substitute font for all times +% (reported by \contributor Stephan Hennig )} +% ^^A MID: <46ab4fbb$0$31632$9b4e6d93@newsspool3.arcor-online.net> +% We have to remember the substitute for the rest of the document, not just for +% the first time it is called, since we need it every time a font is +% letterspaced. +% \begin{macrocode} + \g@addto@macro\do@subst@correction + {\edef\MT@font{\csname\curr@fontshape/\f@size\endcsname}% + \MT@glet@nc{MT@subst@\expandafter\string\font@name}\MT@font}% +% \end{macrocode} +%\end{macro} +%\begin{macro}{\add@accent} +%\changes{v1.8}{2005/06/14}{fix: disable micro-typographic setup inside \cmd\add@accent\ +% (reported by \contributor Stephan Hennig )} +% ^^A MID: <42adb0e3$0$27784$9b4e6d93@newsread2.arcor-online.net> +%\begin{macro}{\MT@orig@add@accent} +% 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. +% \begin{macrocode} + \let\MT@orig@add@accent\add@accent + \def\add@accent#1#2{% + \let\pickup@font\MT@orig@pickupfont + \MT@orig@add@accent{#1}{#2}% + \let\pickup@font\MT@pickupfont + }% +% +} +%}\relax +%<*package> +% \end{macrocode} +%\end{macro} +%\end{macro} +% Consequently (if all goes well), we are the last ones to change these +% commands, therefore there is no need to check whether our definition has +% survived. +%\changes{v1.6}{2004/12/29}{test whether \cmd\pickup@font\ has changed} +%\changes{v1.9a}{2005/11/21}{remove superfluous test whether \cmd\pickup@font\ has changed} +% +%\begin{macro}{\MT@check@font} +% Check whether we've already seen the current font. +% \begin{macrocode} +\def\MT@check@font{\MT@exp@one@n\MT@in@clist\MT@font\MT@font@list} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@subst@font} +% Register the substituted font. +% \begin{macrocode} +\def\MT@register@subst@font{\xdef\MT@font@list{\MT@font@list\font@name,}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@font} +% Register the current font. +% \begin{macrocode} +\def\MT@register@font{\xdef\MT@font@list{\MT@font@list\MT@font,}} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Context-sensitive setup} +% +% Here are the variants for context-sensitive setup. +%\begin{macro}{\MT@active@features} +% The activated features are stored in this command. +% \begin{macrocode} +\let\MT@active@features\@empty +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@check@font@cx} +% Every feature has its own list of fonts that have already been dealt with. If +% the font needn't be set up for a feature, we temporarily disable the +% corresponding setup command. +%\changes{v1.9a}{2005/11/14}{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 + \ifMT@inlist@ + \MT@let@nc{MT@\@nameuse{MT@abbr@##1}}\relax + \else + \MT@if@false + \fi + }% + \ifMT@if@ \MT@inlist@true \else \MT@inlist@false \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@subst@font@cx} +% Add the substituted font to each feature list. +%\todo{remove from other lists?} +% \begin{macrocode} +\def\MT@register@subst@font@cx{% + \MT@map@clist@c\MT@active@features{% + \MT@exp@cs\MT@xadd + {MT@##1@\csname MT@##1@context\endcsname font@list}% + {\font@name,}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@register@font@cx} +% For each feature, add the current font to the list, unless we didn't set it +% up. +% \begin{macrocode} +\def\MT@register@font@cx{% + \MT@map@clist@c\MT@active@features{% + \MT@exp@cs\ifx{MT@\@nameuse{MT@abbr@##1}}\relax\else + \MT@exp@cs\MT@xadd + {MT@##1@\csname MT@##1@context\endcsname font@list}% + {\MT@font,}% + \def\@tempa{##1}% + \MT@exp@cs\MT@map@tlist@c{MT@##1@doc@contexts}\MT@maybe@rem@from@list + \fi + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@maybe@rem@from@list} +% Recurse through all context font lists of the document and remove the font, +% unless it's the current context. +% \begin{macrocode} +\def\MT@maybe@rem@from@list#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 + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\microtypecontext} +%\changes{v1.9}{2005/10/03}{new command: change setup context in the document} +%\changes{v2.3}{2007/08/05}{made robust (reported by \contributor Stephan Hennig )} +% ^^A MID: <46ab4fbb$0$31632$9b4e6d93@newsspool3.arcor-online.net> +% The user may change the context, so that different setups are possible. This +% is especially useful for multi-lingual documents. +% +% Inside the preamble, it shouldn't actually do anything but remember it for +% later. +% \begin{macrocode} +\def\microtypecontext#1{\MT@addto@setup{\microtypecontext{#1}}} +\MT@addto@setup{% + \DeclareRobustCommand\microtypecontext[1]{% + \MT@setup@contexts + \let\MT@reset@context\relax + \setkeys{MTC}{#1}% + \selectfont + \MT@reset@context + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\textmicrotypecontext} +%\changes{v2.2}{2007/07/03}{new command: wrapper around \cs{microtypecontext}} +% This is just a wrapper around \cs{microtypecontext}. +% \begin{macrocode} +\DeclareRobustCommand\textmicrotypecontext[2]{{\microtypecontext{#1}#2}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@reset@context} +%\changes{v1.9f}{2006/08/03}{only reset context if it has actually been changed} +%\begin{macro}{\MT@reset@context@} +% We have to reset the font at the end of the group, provided there actually was +% a change. +% \begin{macrocode} +\def\MT@reset@context@{% + \MT@vinfo{<<< Resetting contexts\on@line +% \MessageBreak= \MT@pr@context/\MT@ex@context +% /\MT@tr@context/\MT@kn@context/\MT@sp@context + }% + \selectfont +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@setup@contexts} +% 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 + {\MT@glet@nc{MT@##1@@font@list}\MT@font@list}% + \MT@glet\MT@check@font\MT@check@font@cx + \MT@glet\MT@register@font\MT@register@font@cx + \MT@glet\MT@register@subst@font\MT@register@subst@font@cx + \MT@glet\MT@setup@contexts\relax +} +% \end{macrocode} +%\end{macro} +% Define context keys. +% \begin{macrocode} +\MT@map@clist@c\MT@features@long{% + \define@key{MTC}{#1}[]{% + \edef\@tempb{\@nameuse{MT@rbba@#1}}% + \MT@exp@one@n\MT@in@clist\@tempb\MT@active@features + \ifMT@inlist@ +% \end{macrocode} +% Using an empty context is only asking for trouble, therefore we choose the +% `|@|' instead (hoping for the \LaTeX\ users' natural awe of this character). +% \begin{macrocode} + \MT@ifempty{##1}{\def\MT@val{@}}{\def\MT@val{##1}}% + \MT@exp@cs\ifx{MT@\@tempb @context}\MT@val +%\MT@dinfo{1}{>>> no change of #1 context: `\MT@val'}% + \else + \MT@vinfo{>>> Changing #1 context to `\MT@val'\MessageBreak\on@line +% \space(previous: `\@nameuse{MT@\@tempb @context}')% + }% + \def\MT@reset@context{\aftergroup\MT@reset@context@}% +% \end{macrocode} +% The next time we see the font, we have to reset \emph{all} factors. +% \begin{macrocode} + \MT@glet@nn{MT@reset@\@tempb @codes}{MT@reset@\@tempb @codes@}% +% \end{macrocode} +% We must also keep track of all contexts in the document. +% \begin{macrocode} + \expandafter\MT@exp@one@n\expandafter\MT@in@tlist\expandafter + \MT@val \csname MT@\@tempb @doc@contexts\endcsname + \ifMT@inlist@ \else + \MT@exp@cs\MT@xadd{MT@\@tempb @doc@contexts}{{\MT@val}}% +% \MT@dinfo{1}{||| added #1 context: \@nameuse{MT@\@tempb @doc@contexts}}% + \fi + \MT@edef@n{MT@\@tempb @context}{\MT@val}% + \fi + \fi + }% +} +% \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} +% Initialise the contexts. +% \begin{macrocode} +\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{% + \MT@def@n{MT@#1@context}{@}% + \MT@def@n{MT@#1@doc@contexts}{{@}}% +} +\let\MT@extra@context\@empty +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +% +%\subsection{Configuration} +% +%\subsubsection{Font sets} +%\todo{allow for \texttt{load}ing and extending another set; or using more than one set?} +% +%\begin{macro}{\DeclareMicrotypeSet} +%\begin{macro}{\DeclareMicrotypeSet*} +% Calling this macro will create a comma list for every font attribute of the +% form: |\MT|\meta{feature}|list@|\meta{attribute}|@|\meta{set name}. If the +% optional argument is empty, lists for all available features will be created. +% +% The third argument must be a list of |key=value| pairs. If a font attribute +% is not specified, we define the corresponding list to \cmd\relax, so that it +% does not constitute a constraint. +% \begin{macrocode} +\def\DeclareMicrotypeSet{% + \@ifstar + \MT@DeclareSetAndUseIt + \MT@DeclareSet +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@DeclareSet} +%\changes{v1.1}{2004/09/15}{remove spaces around first argument} +% \begin{macrocode} +\newcommand\MT@DeclareSet[3][]{% + \KV@@sp@def\@tempa{#1}% + \MT@ifempty\@tempa{% + \MT@map@clist@c\MT@features{{\MT@declare@sets{##1}{#2}{#3}}}% + }{% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{set declaration `#2'}{% + \MT@exp@one@n\MT@declare@sets + {\csname MT@rbba@\@tempa\endcsname}{#2}{#3}% + }% + }% + }}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@DeclareSetAndUseIt} +% \begin{macrocode} +\newcommand\MT@DeclareSetAndUseIt[3][]{% + \MT@DeclareSet[#1]{#2}{#3}% + \UseMicrotypeSet[#1]{#2}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@curr@set@name} +% We need to remember the name of the set currently being declared. +% \begin{macrocode} +\let\MT@curr@set@name\@empty +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@declare@sets} +% 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 \@nameuse{MT@abbr@#1} set `\MT@curr@set@name'}% + \MT@glet@nc{MT@#1list@size@\MT@curr@set@name}\@empty + }% + \MT@glet@nc{MT@#1@set@@\MT@curr@set@name}\@empty +%\MT@dinfo{1}{declaring \@nameuse{MT@abbr@#1} set `\MT@curr@set@name'}% + \setkeys{MT@#1@set}{#3}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@define@set@key@} +% \meta{\#1} = font axis, \meta{\#2} = feature. +%\changes{v1.8}{2005/04/16}{use comma lists instead of token lists} +%\changes{v1.9a}{2005/11/21}{don't expand variables immediately +% (requested by \contributor Georg Verweyen )} +% ^^A MID: <437a522d$0$7419$9b4e6d93@newsread4.arcor-online.net> +% \begin{macrocode} +\def\MT@define@set@key@#1#2{% + \define@key{MT@#2@set}{#1}[]{% + \MT@glet@nc{MT@#2list@#1@\MT@curr@set@name}\@empty + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@get@highlevel{#1}% +% \end{macrocode} +% We do not add the expanded value to the list~\dots +% \begin{macrocode} + \MT@exp@two@n\g@addto@macro + {\csname MT@#2list@#1@\MT@curr@set@name\expandafter\endcsname}% + {\MT@val,}% + }% +% \end{macrocode} +% \dots~but keep in mind that the list has to be expanded at the end of the +% preamble. +% \begin{macrocode} + \expandafter\g@addto@macro\expandafter\MT@font@sets + \csname MT@#2list@#1@\MT@curr@set@name\endcsname +%\MT@dinfo@nl{1}{-- #1: \@nameuse{MT@#2list@#1@\MT@curr@set@name}}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@highlevel} +% Saying, for instance, `|family=rm*|' or `|shape=bf*|' will expand to +% \cmd\rmdefault\ resp. \cmd\bfdefault. +% \begin{macrocode} +\def\MT@get@highlevel#1{% + \expandafter\MT@test@ast\MT@val*\@nil\relax{% +% \end{macrocode} +% And `|family = *|' will become \cmd\familydefault. +% \begin{macrocode} + \MT@ifempty\@tempa{\def\@tempa{#1}}\relax + \edef\MT@val{\expandafter\noexpand\csname \@tempa default\endcsname}% +% \end{macrocode} +% In contrast to earlier version, these values will not be expanded immediately +% but at the end of the preamble. +%\changes{v1.2}{2004/09/26}{check whether defaults have changed} +%\changes{v1.5}{2004/12/02}{don't test defaults if called after begin document} +%\changes{v1.9a}{2005/11/21}{no longer check whether defaults have changed} +% \begin{macrocode} + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@test@ast} +% It the last character is an asterisk, execute the second argument, otherwise +% the first one. +%\changes{v1.7}{2005/03/10}{make it simpler} +% \begin{macrocode} +\def\MT@test@ast#1*#2\@nil{% + \def\@tempa{#1}% + \MT@ifempty{#2}% +} +% \end{macrocode} +%\end{macro} +%\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} +\let\MT@font@sets\@empty +\def\MT@fix@font@set#1{% + \xdef#1{#1}% + \global\@onelevel@sanitize#1% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@define@set@key@size} +% |size| requires special treatment. +% \begin{macrocode} +\def\MT@define@set@key@size#1{% + \define@key{MT@#1@set}{size}[]{% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \expandafter\MT@get@range\MT@val--\@nil + \ifx\MT@val\relax \else + \MT@exp@cs\MT@xadd + {MT@#1list@size@\MT@curr@set@name}% + {{{\MT@lower}{\MT@upper}\relax}}% + \fi + }% +%\MT@dinfo@nl{1}{-- size: \@nameuse{MT@#1list@size@\MT@curr@set@name}}% + }% +} +% \end{macrocode} +%\end{macro} +%\changes{v1.7}{2005/03/11}{allow specification of size ranges +% (suggested by \contributor Andreas B\"uhmann )} +% ^^A private mail, 2005/03/10 +% Font sizes may also be specified as ranges. This has been requested by Andreas +% B\"uhmann, who has also offered valuable help in implementing this. Now, it +% is for instance possible to set up different lists for fonts with optical +% sizes. (The MinionPro project is trying to do this for the OpenType version +% of Adobe's Minion. See \url{http://developer.berlios.de/projects/minionpro/}.) +% +%\begin{macro}{\MT@get@range} +%\begin{macro}{\MT@upper} +%\begin{macro}{\MT@lower} +% 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 \textminus1. +% \begin{macrocode} +\def\MT@get@range#1-#2-#3\@nil{% + \MT@ifempty{#1}{% + \MT@ifempty{#2}{% + \let\MT@val\relax + }{% + \def\MT@lower{0}% + \def\MT@val{#2}% + \MT@get@size + \edef\MT@upper{\MT@val}% + }% + }{% + \def\MT@val{#1}% + \MT@get@size + \ifx\MT@val\relax \else + \edef\MT@lower{\MT@val}% + \MT@ifempty{#2}{% + \MT@ifempty{#3}% + {\def\MT@upper{-1}}% +% \end{macrocode} +% 2048\,pt is \TeX's maximum font size. +% \begin{macrocode} + {\def\MT@upper{2048}}% + }{% + \def\MT@val{#2}% + \MT@get@size + \ifx\MT@val\relax \else + \MT@ifdim\MT@lower>\MT@val{% + \MT@error{% + Invalid size range (\MT@lower\space > \MT@val) in font set + `\MT@curr@set@name'.\MessageBreak Swapping sizes}{}% + \edef\MT@upper{\MT@lower}% + \edef\MT@lower{\MT@val}% + }{% + \edef\MT@upper{\MT@val}% + }% + \MT@ifdim\MT@lower=\MT@upper + {\def\MT@upper{-1}}% + \relax + \fi + }% + \fi + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@get@size} +% Translate a size selection command and normalise it. +% \begin{macrocode} +\def\MT@get@size{% +% \end{macrocode} +% A single star would mean \cs{sizedefault}, which doesn't exist, so we define +% it to be \cmd\normalsize. +% \begin{macrocode} + \if*\MT@val\relax + \def\@tempa{\normalsize}% + \else + \MT@let@cn\@tempa{\MT@val}% + \fi + \ifx\@tempa\relax \else +% \end{macrocode} +% The \pkg{relsize} solution of parsing \cmd\@setfontsize\ does not work with the +% classes, among others. I hope my hijacking doesn't do any harm. +%\changes{v1.2}{2004/09/26}{hijack \cmd\set@fontsize\ instead of \cmd\@setfontsize} +% We redefine \cmd\set@fontsize, and not \cmd\@setfontsize\ because some classes +% might define the size selection commands by simply using \cmd\fontsize\ +% (\eg, the \pkg{a0poster} class). +%\changes{v2.3b}{2008/03/07}{grouping} +% \begin{macrocode} + \begingroup + \def\set@fontsize##1##2##3##4\@nil{\endgroup\def\MT@val{##2}}% + \@tempa\@nil + \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). +%\changes{v1.2}{2004/09/27}{additional magic to catch some errors} +% \begin{macrocode} + \MT@ifdimen\MT@val{% + \@defaultunits\@tempdima\MT@val pt\relax\@nnil + \edef\MT@val{\strip@pt\@tempdima}% + }{% + \MT@warning{Could not parse font size `\MT@val'\MessageBreak + in font set `\MT@curr@set@name'}% + \let\MT@val\relax + }% +} +% \end{macrocode} +%\end{macro} +%\changes{v1.9}{2005/07/13}{\cs{DeclareMicrotypeSet}: new key: \texttt{font}} +%\begin{macro}{\MT@define@set@key@font} +%\changes{v2.3}{2007/11/20}{\texttt{font}: single asterisk means normal font} +% \begin{macrocode} +\def\MT@define@set@key@font#1{% + \define@key{MT@#1@set}{font}[]{% + \MT@glet@nc{MT@#1list@font@\MT@curr@set@name}\@empty + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax + \expandafter\MT@get@font\MT@val/////\@nil + \MT@exp@two@n\g@addto@macro + {\csname MT@#1list@font@\MT@curr@set@name\expandafter\endcsname}% + {\MT@val,}% + }% + \expandafter\g@addto@macro\expandafter\MT@font@sets + \csname MT@#1list@font@\MT@curr@set@name\endcsname +%\MT@dinfo@nl{1}{-- font: \@nameuse{MT@#1list@font@\MT@curr@set@name}}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@font} +% Translate any asterisks. +% \begin{macrocode} +\def\MT@get@font#1/#2/#3/#4/#5/#6\@nil{% + \MT@get@font@{#1}{#2}{#3}{#4}{#5}{0}% + \ifx\MT@val\relax\def\MT@val{0}\fi + \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val}% + \let\MT@val\@tempb +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@font@} +% Helper macro, also used by \cs{MT@get@font@and@size}. +% \begin{macrocode} +\def\MT@get@font@#1#2#3#4#5#6{% + \let\@tempb\@empty + \def\MT@temp{#1/#2/#3/#4/#5}% + \MT@get@axis{encoding}{#1}% + \MT@get@axis{family} {#2}% + \MT@get@axis{series} {#3}% + \MT@get@axis{shape} {#4}% + \ifnum#6>\z@\edef\@tempb{\@tempb*}\fi + \MT@ifempty{#5}{% + \MT@warn@axis@empty{size}{\string\normalsize}% + \def\MT@val{*}% + }{% + \def\MT@val{#5}% + }% + \MT@get@size +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@axis} +% \begin{macrocode} +\def\MT@get@axis#1#2{% + \def\MT@val{#2}% + \MT@get@highlevel{#1}% + \MT@ifempty\MT@val{% + \MT@warn@axis@empty{#1}{\csname #1default\endcsname}% + \expandafter\def\expandafter\MT@val\expandafter{\csname #1default\endcsname}% + }\relax + \expandafter\g@addto@macro\expandafter\@tempb\expandafter{\MT@val/}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@warn@axis@empty} +% \begin{macrocode} +\def\MT@warn@axis@empty#1#2{% + \MT@warning{#1 axis is empty in font specification\MessageBreak + `\MT@temp'. Using `#2' instead}% +} +% \end{macrocode} +%\end{macro} +% We can finally assemble all pieces to define \cs{DeclareMicrotypeSet}'s +% keys. +% They are also used for \cs{DisableLigatures}. +% \begin{macrocode} +\MT@exp@one@n\MT@map@clist@n{\MT@features,nl}{% + \MT@define@set@key@{encoding}{#1}% + \MT@define@set@key@{family} {#1}% + \MT@define@set@key@{series} {#1}% + \MT@define@set@key@{shape} {#1}% + \MT@define@set@key@size {#1}% + \MT@define@set@key@font {#1}% +} +% \end{macrocode} +%\begin{macro}{\UseMicrotypeSet} +% To use a particular set we simply redefine |MT@|\meta{feature}|@setname|. +% If the optional argument is empty, set names for all features will be +% redefined. +%\changes{v1.1}{2004/09/20}{remove spaces around first argument} +% \begin{macrocode} +\renewcommand*\UseMicrotypeSet[2][]{% + \KV@@sp@def\@tempa{#1}% + \MT@ifempty\@tempa{% + \MT@map@clist@c\MT@features{{\MT@use@set{##1}{#2}}}% + }{% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{activation of set `#2'}{% + \MT@exp@one@n\MT@use@set + {\csname MT@rbba@\@tempa\endcsname}{#2}% + }% + }% + }}% + }% +} +% \end{macrocode} +%\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} +%\changes{v1.4b}{2004/11/25}{don't use undeclared font sets} +%\changes{v1.6}{2005/01/19}{retain current set if new set is undeclared} +%\changes{v1.8}{2005/05/15}{fix: remove braces in first line} +% \begin{macrocode} +\def\MT@use@set#1#2{% + \KV@@sp@def\@tempa{#2}% + \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{% + \MT@xdef@n{MT@#1@setname}{\@tempa}% + }{% + \MT@ifdefined@n@TF{MT@#1@setname}\relax{% + \MT@xdef@n{MT@#1@setname}{\@nameuse{MT@default@#1@set}}% + }% + \MT@error{% + The \@nameuse{MT@abbr@#1} set `\@tempa' is undeclared.\MessageBreak + Using set `\@nameuse{MT@#1@setname}' instead}{}% + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\DeclareMicrotypeSetDefault} +%\changes{v1.8}{2005/05/15}{new command: set default font set} +% This command can be used in the main configuration file to declare the +% default font set, in case no set is specified in the package options. +% \begin{macrocode} +\renewcommand*\DeclareMicrotypeSetDefault[2][]{% + \KV@@sp@def\@tempa{#1}% + \MT@ifempty\@tempa{% + \MT@map@clist@c\MT@features{{\MT@set@default@set{##1}{#2}}}% + }{% + \MT@map@clist@c\@tempa{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@is@feature{declaration of default set `#2'}{% + \MT@exp@one@n\MT@set@default@set + {\csname MT@rbba@\@tempa\endcsname}{#2}% + }% + }% + }}% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@default@pr@set} +%\begin{macro}{\MT@default@ex@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{% + \KV@@sp@def\@tempa{#2}% + \MT@ifdefined@n@TF{MT@#1@set@@\@tempa}{% +%\MT@dinfo{1}{declaring default \@nameuse{MT@abbr@#1} set `\@tempa'}% + \MT@xdef@n{MT@default@#1@set}{\@tempa}% + }{% + \MT@error{% + The \@nameuse{MT@abbr@#1} set `\@tempa' is not declared.\MessageBreak + Cannot make it the default set. Using set\MessageBreak `all' instead}{}% + \MT@xdef@n{MT@default@#1@set}{all}% + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +% +%\subsubsection{Variants and aliases} +% +%\begin{macro}{\DeclareMicrotypeVariants} +%\changes{v2.2}{2007/02/04}{new command} +%\begin{macro}{\MT@variants} +% Specify suffixes for variants (see \file{fontname/variants.map}). +% The starred version appends to the list. +% \begin{macrocode} +\let\MT@variants\@empty +\def\DeclareMicrotypeVariants{% + \@ifstar + \MT@DeclareVariants + {\let\MT@variants\@empty\MT@DeclareVariants}% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@DeclareVariants} +% \begin{macrocode} +\def\MT@DeclareVariants#1{% + \MT@map@clist@n{#1}{% + \KV@@sp@def\@tempa{##1}% + \@onelevel@sanitize\@tempa + \xdef\MT@variants{\MT@variants{\@tempa}}% + }% +} +% \end{macrocode} +%\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. +%\changes{v1.5}{2004/12/03}{remove spaces around arguments} +%\changes{v1.8}{2005/05/09}{warning when overriding an alias font} +% \begin{macrocode} +\renewcommand*\DeclareMicrotypeAlias[2]{% + \KV@@sp@def\@tempa{#1}% + \KV@@sp@def\@tempb{#2}% + \@onelevel@sanitize\@tempb + \MT@ifdefined@n@T{MT@\@tempa @alias}{% + \MT@warning{Alias font family `\@tempb' will override + alias `\@nameuse{MT@\@tempa @alias}'\MessageBreak + for font family `\@tempa'}}% + \MT@xdef@n{MT@\@tempa @alias}{\@tempb}% +% \end{macrocode} +% If we encounter this command while a font is being set up, we also set the +% alias for the current font so that if \cs{DeclareMicrotypeAlias} has been +% issued inside a configuration file, the configuration file for the alias font +% will be loaded, too. +%\changes{v1.7}{2005/03/23}{may also be used inside configuration files} +% \begin{macrocode} + \MT@ifdefined@c@T\MT@family{% +%\MT@dinfo{1}{Activating alias font `\@tempb' for `\MT@family'}% + \MT@glet\MT@familyalias\@tempb + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\LoadMicrotypeFile} +%\changes{v1.7}{2005/03/22}{new command (suggested by +% \contributor Andreas B\"uhmann )} +% ^^A private mail, 2005/03/21 +% May be used to load a configuration file manually. +% \begin{macrocode} +\def\LoadMicrotypeFile#1{% + \KV@@sp@def\@tempa{#1}% + \@onelevel@sanitize\@tempa + \MT@exp@one@n\MT@in@clist\@tempa\MT@file@list + \ifMT@inlist@ + \MT@vinfo{... Configuration file mt-\@tempa.cfg already loaded}% + \else + \MT@xadd\MT@file@list{\@tempa,}% + \MT@begin@catcodes + \InputIfFileExists{mt-\@tempa.cfg}{% + \edef\MT@curr@file{mt-\@tempa.cfg}% + \MT@vinfo{... Loading configuration file \MT@curr@file}% + }{% + \MT@warning{... Configuration file mt-\@tempa.cfg\MessageBreak + does not exist}% + }% + \MT@end@catcodes + \fi +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Disabling ligatures} +% +%\begin{macro}{\DisableLigatures} +%\changes{v1.9}{2005/07/11}{new command: disable ligatures (requires \pdftex\ 1.30)} +%\changes{v2.2}{2007/01/22}{new optional argument: disable selected ligatures only} +%\begin{macro}{\MT@DisableLigatures} +%\begin{macro}{\MT@nl@setname} +%\begin{macro}{\MT@nl@ligatures} +% This is really simple now: we can re-use the set definitions of +% \cs{DeclareMicrotypeSet}; there can only be one set, which we'll call +% `|no ligatures|'. +% +% The optional argument may be used to disable selected ligatures only. +% \begin{macrocode} +\MT@requires@pdftex5{ +\def\DisableLigatures{% + \MT@begin@catcodes + \MT@DisableLigatures +} +\newcommand*\MT@DisableLigatures[2][]{% + \MT@ifempty{#1}\relax{\gdef\MT@nl@ligatures{#1}}% + \xdef\MT@active@features{\MT@active@features,nl}% + \global\MT@noligaturestrue + \MT@declare@sets{nl}{no ligatures}{#2}% + \gdef\MT@nl@setname{no ligatures}% + \MT@end@catcodes +} +}{ +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +% If \pdftex\ is too old, we throw an error. +% \begin{macrocode} +\renewcommand*\DisableLigatures[2][]{% + \MT@error{Disabling ligatures of a font is only possible\MessageBreak + with pdftex version 1.30 or newer.\MessageBreak + Ignoring \string\DisableLigatures}{Upgrade pdftex.}% +} +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Interaction with \pkg{babel}} +% +%\begin{macro}{\DeclareMicrotypeBabelHook} +% 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}{(beta:1) new command: interaction with \pkg{babel}} +% \begin{macrocode} +\def\DeclareMicrotypeBabelHook#1#2{% + \MT@map@clist@n{#1}{% + \KV@@sp@def\@tempa{##1}% + \MT@gdef@n{MT@babel@\@tempa}{#2}% + }% +} +% \end{macrocode} +%\end{macro} +% +% +%\subsubsection{Fine tuning} +% +% 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.9}{2005/07/13}{(et al.) new key: \texttt{font}} +%\changes{v1.9d}{2006/02/23}{(et al.) split keys of optional and mandatory argument} +%\changes{v1.9d}{2006/02/23}{(et al.) optimise: unify keys for mandatory argument} +%\changes{v1.9e}{2006/07/26}{(et al.) 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 +% list of character protrusion factors. +% +% A new macro called |\MT@pr@c@|\meta{name} will be defined to be \meta{\#3} +% (\ie, the list of characters, not expanded). +% \begin{macrocode} +\def\SetProtrusion{% + \MT@begin@catcodes + \MT@SetProtrusion +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@SetProtrusion} +%\begin{macro}{\MT@pr@c@name} +%\begin{macro}{\MT@extra@context} +%\begin{macro}{\MT@permutelist} +% We want the catcodes to be correct even if this is called in the preamble. +% \begin{macrocode} +\newcommand*\MT@SetProtrusion[3][]{% + \let\MT@extra@context\@empty +% \end{macrocode} +% Parse the optional first argument. We first have to know the name before we +% can deal with the extra options. +% \begin{macrocode} + \MT@set@named@keys{MT@pr@c}{#1}% +%\MT@dinfo{1}{creating protrusion list `\MT@pr@c@name'}% + \def\MT@permutelist{pr@c}% + \setkeys{MT@cfg}{#2}% +% \end{macrocode} +% We have parsed the second argument, and can now define macros for all +% permutations of the font attributes to point to |\MT@pr@c@|\meta{name},~\dots +% \begin{macrocode} + \MT@permute +% \end{macrocode} +% \dots~which we can now define to be \meta{\#3}. +% Here, as elsewhere, we have to make the definitions global, since they will +% occur inside a group. +% \begin{macrocode} + \MT@gdef@n{MT@pr@c@\MT@pr@c@name}{#3}% + \MT@end@catcodes +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\SetExpansion} +%\changes{v1.4}{2004/11/10}{fix: specifying extra options does no +% longer require to give a \texttt{name}, too} +%\changes{v1.9e}{2006/07/26}{new key: \texttt{inputenc}} +% \cs{SetExpansion} only differs in that it allows some extra options +% (|stretch|, |shrink|, |step|, |auto|). +% \begin{macrocode} +\def\SetExpansion{% + \MT@begin@catcodes + \MT@SetExpansion +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@SetExpansion} +%\begin{macro}{\MT@ex@c@name} +%\begin{macro}{\MT@extra@context} +%\begin{macro}{\MT@permutelist} +% \begin{macrocode} +\newcommand*\MT@SetExpansion[3][]{% + \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 + \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}% + \MT@glet@nc{MT@ex@c@\MT@ex@c@name @factor}\@m + \fi + }% +%\MT@dinfo{1}{creating expansion list `\MT@ex@c@name'}% + \def\MT@permutelist{ex@c}% + \setkeys{MT@cfg}{#2}% + \MT@permute + \MT@gdef@n{MT@ex@c@\MT@ex@c@name}{#3}% + \MT@end@catcodes +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\SetTracking} +%\changes{v2.0}{2006/12/28}{new command: tracking} +%\changes{v2.2}{2007/02/23}{third argument may be empty} +%\changes{v2.2}{2007/02/23}{new key `\texttt{no ligatures}' to disable +% ligatures of letterspaced fonts} +%\changes{v2.2}{2007/06/16}{new keys `\texttt{spacing}' and `\texttt{outer spacing}' +% to adjust interword spacing +% (suggested by \contributor Steven~E. Harris )} +% ^^A private mail, 2007/06/15 +% \begin{macrocode} +\def\SetTracking{% + \MT@begin@catcodes + \MT@SetTracking +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@SetTracking} +% Third argument may be empty. +%\changes{v2.3}{2007/11/20}{sanity check for value} +% \begin{macrocode} +\newcommand*\MT@SetTracking[3][]{% + \let\MT@extra@context\@empty + \MT@set@named@keys{MT@tr@c}{#1}% +%\MT@dinfo{1}{creating tracking list `\MT@tr@c@name'}% + \def\MT@permutelist{tr@c}% + \setkeys{MT@cfg}{#2}% + \MT@permute + \KV@@sp@def\@tempa{#3}% + \MT@ifempty\@tempa\relax{% + \MT@ifint\@tempa + {\MT@xdef@n{MT@tr@c@\MT@tr@c@name}{\@tempa}}% + {\MT@warning{Value `\@tempa' is not a number in\MessageBreak + tracking set `\MT@curr@set@name'}}}% + \MT@end@catcodes +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\SetExtraSpacing} +%\changes{v2.0}{2005/09/28}{(beta:1) new command: adjustment of interword spacing} +% \begin{macrocode} +\def\SetExtraSpacing{% + \MT@begin@catcodes + \MT@SetExtraSpacing +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@SetExtraSpacing} +%\begin{macro}{\MT@sp@c@name} +%\begin{macro}{\MT@extra@context} +%\begin{macro}{\MT@permutelist} +% \begin{macrocode} +\newcommand*\MT@SetExtraSpacing[3][]{% + \let\MT@extra@context\@empty + \MT@set@named@keys{MT@sp@c}{#1}% +%\MT@dinfo{1}{creating spacing list `\MT@sp@c@name'}% + \def\MT@permutelist{sp@c}% + \setkeys{MT@cfg}{#2}% + \MT@permute + \MT@gdef@n{MT@sp@c@\MT@sp@c@name}{#3}% + \MT@end@catcodes +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\SetExtraKerning} +%\changes{v2.0}{2005/09/28}{(beta:1) new command: additional kerning} +% \begin{macrocode} +\def\SetExtraKerning{% + \MT@begin@catcodes + \MT@SetExtraKerning +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@SetExtraKerning} +%\begin{macro}{\MT@kn@c@name} +%\begin{macro}{\MT@extra@context} +%\begin{macro}{\MT@permutelist} +% \begin{macrocode} +\newcommand*\MT@SetExtraKerning[3][]{% + \let\MT@extra@context\@empty + \MT@set@named@keys{MT@kn@c}{#1}% +%\MT@dinfo{1}{creating kerning list `\MT@kn@c@name'}% + \def\MT@permutelist{kn@c}% + \setkeys{MT@cfg}{#2}% + \MT@permute + \MT@gdef@n{MT@kn@c@\MT@kn@c@name}{#3}% + \MT@end@catcodes +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@set@named@keys} +%\changes{v1.9f}{2006/08/10}{new macro: set name first, simplify parsing of +% optional argument} +%\begin{macro}{\MT@options} +% We first set the name (if specified), then remove it from the list, and set +% the remaining keys. +% \begin{macrocode} +\def\MT@set@named@keys#1#2{% + \def\x##1name=##2,##3\@nil{% + \setkeys{#1}{name=##2}% + \gdef\MT@options{##1##3}% + \MT@rem@from@clist{name=}\MT@options + }% + \x#2,name=,\@nil + \@expandtwoargs\setkeys{#1}\MT@options +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@define@code@key} +% Define the keys for the configuration lists (which are setting the codes, in +% \pdftex\ speak). +% \begin{macrocode} +\def\MT@define@code@key#1#2{% + \define@key{MT@#2}{#1}[]{% + \@tempcnta=\@ne + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% +% \end{macrocode} +% Here, too, we allow for something like `|bf*|'. It will be expanded +% immediately. +% \begin{macrocode} + \MT@get@highlevel{#1}% + \MT@edef@n{MT@temp#1\the\@tempcnta}{\MT@val}% + \advance\@tempcnta \@ne + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@define@code@key@size} +%\changes{v1.9c}{2006/01/25}{fix: embrace \cs{MT@tempsize} in \cmd\csname\ +% (bug introduced in v1.9b)} +% \cs{MT@tempsize} must be in a \cmd\csname, so that it is at least +% \cmd\relax, not undefined. +% \begin{macrocode} +\def\MT@define@code@key@size#1{% + \define@key{MT@#1}{size}[]{% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \expandafter\MT@get@range\MT@val--\@nil + \ifx\MT@val\relax \else + \MT@exp@cs\MT@xadd{MT@tempsize}% + {{{\MT@lower}{\MT@upper}{\MT@curr@set@name}}}% + \fi + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@define@code@key@font} +%\changes{v1.9c}{2006/01/25}{fix: context was ignored} +% \begin{macrocode} +\def\MT@define@code@key@font#1{% + \define@key{MT@#1}{font}[]{% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@ifstreq\MT@val*{\def\MT@val{*/*/*/*/*}}\relax + \expandafter\MT@get@font@and@size\MT@val/////\@nil + \MT@xdef@n{MT@\MT@permutelist @\@tempb\MT@extra@context}% + {\csname MT@\MT@permutelist @name\endcsname}% +%\MT@dinfo@nl{1}{initialising: use list for font \@tempb=\MT@val +% \ifx\MT@extra@context\@empty\else\MessageBreak +% (context: \MT@extra@context)\fi}% + \MT@exp@cs\MT@xaddb + {MT@\MT@permutelist @\@tempb\MT@extra@context @sizes}% + {{{\MT@val}{\m@ne}{\MT@curr@set@name}}}% + }% + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@get@font@and@size} +% Translate any asterisks and split off the size. +% \begin{macrocode} +\def\MT@get@font@and@size#1/#2/#3/#4/#5/#6\@nil{% + \MT@get@font@{#1}{#2}{#3}{#4}{#5}{1}% +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@define@code@key{encoding}{cfg} +\MT@define@code@key{family} {cfg} +\MT@define@code@key{series} {cfg} +\MT@define@code@key{shape} {cfg} +\MT@define@code@key@size {cfg} +\MT@define@code@key@font {cfg} +% \end{macrocode} +%\begin{macro}{\MT@define@opt@key} +% \begin{macrocode} +\def\MT@define@opt@key#1#2{% + \define@key{MT@#1@c}{#2}[]{\MT@ifempty{##1}\relax{% + \MT@xdef@n{MT@#1@c@\MT@curr@set@name @#2}{##1}}}% +} +% \end{macrocode} +%\end{macro} +% The options in the optional first argument. +% \begin{macrocode} +\MT@map@clist@c\MT@features{% +% \end{macrocode} +%\changes{v1.9a}{2005/11/21}{`\meta{file name}\texttt{/}\meta{line number}' as default list name} +% Use file name and line number as the list name if the user didn't bother +% to invent one. +%\changes{v1.3}{2004/10/27}{fix: specifying \texttt{load} option does no +% longer require to give a \texttt{name}, too} +%\changes{v2.2}{2007/01/28}{simplify key declarations} +% \begin{macrocode} + \define@key{MT@#1@c}{name}[]{% + \MT@ifempty{##1}{% + \MT@edef@n{MT@#1@c@name}{\MT@curr@file/\the\inputlineno}% + }{% + \MT@edef@n{MT@#1@c@name}{##1}% + \MT@ifdefined@n@T{MT@#1@c@\csname MT@#1@c@name\endcsname}{% + \MT@warning{Redefining \@nameuse{MT@abbr@#1} list `\@nameuse{MT@#1@c@name}'}% + }% + }% + \MT@let@cn\MT@curr@set@name{MT@#1@c@name}% + }% + \MT@define@opt@key{#1}{load}% + \MT@define@opt@key{#1}{factor}% + \MT@define@opt@key{#1}{preset}% + \MT@define@opt@key{#1}{inputenc}% +% \end{macrocode} +% Only one context is allowed. This might change in the future. +% \begin{macrocode} + \define@key{MT@#1@c}{context}[]{\MT@ifempty{##1}\relax{\def\MT@extra@context{##1}}}% +} +% \end{macrocode} +% Automatically enable font copying if we find a protrusion or expansion context. +% After the preamble, check whether font copying is enabled. +% For older \pdftex\ versions, disallow. +% Also disable for \luatex. +% \begin{macrocode} +\MT@requires@pdftex7{ +%<*lua> + \MT@requires@luatex{ + \define@key{MT@ex@c}{context}[]{% + \MT@error{Expansion contexts currently don't work with luatex.\MessageBreak + Ignoring `context' key\on@line}% + {Use pdftex instead.}% + } + }{ +% + \define@key{MT@ex@c}{context}[]{% + \MT@ifempty{#1}\relax{% + \MT@glet\MT@copy@font\MT@copy@font@ + \def\MT@extra@context{#1}% + }% + } + \MT@addto@setup{% + \define@key{MT@ex@c}{context}[]{% + \ifx\MT@copy@font\MT@copy@font@ + \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}% + \else + \MT@error{\MT@MT\space isn't set up for expansion contexts.\MessageBreak + Ignoring `context' key\on@line}% + {Either move the settings inside the preamble,\MessageBreak + or load the package with the `copyfonts' option.}% + \fi + }% + } +% \end{macrocode} +% Protrusion contexts \emph{may} also work without copying the font, so we +% don't issue an error but only a warning. The problem is that \pdftex\ only +% allows one set of protrusion factors for a given font within one paragraph +% (those that are in effect at the end of the paragraph will be in effect for +% the whole paragraph). When different fonts are loaded -- like in the example +% with the footnote markers -- we don't need to copy the fonts. +% \begin{macrocode} + \define@key{MT@pr@c}{context}[]{% + \MT@ifempty{#1}\relax{% + \MT@glet\MT@copy@font\MT@copy@font@ + \def\MT@extra@context{#1}% + }% + } + \MT@addto@setup{% + \define@key{MT@pr@c}{context}[]{% + \MT@ifempty{#1}\relax{\def\MT@extra@context{#1}}% + \ifx\MT@copy@font\MT@copy@font@\else + \MT@warning@nl{If protrusion contexts don't work as expected, + \MessageBreak load the package with the `copyfonts' option}% + \fi + }% + } +% } +}{ + \define@key{MT@ex@c}{context}[]{% + \MT@error{Expansion contexts only work with pdftex 1.40.4\MessageBreak + or later. Ignoring `context' key\on@line}% + {Upgrade pdftex.}% + } +} +% \end{macrocode} +%\begin{macro}{\MT@warn@nodim} +% \begin{macrocode} +\def\MT@warn@nodim#1{% + \MT@warning{`\@tempa' is not a dimension.\MessageBreak + Ignoring it and setting values relative to\MessageBreak #1}% +} +% \end{macrocode} +%\end{macro} +%\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} +% Protrusion codes may be relative to character width, or to any dimension. +%\todo{new key for unit: \texttt{dimen} (for \texttt{kerning}, especially)} +% \begin{macrocode} +\define@key{MT@pr@c}{unit}[character]{% + \MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@empty + \def\@tempa{#1}% + \MT@ifstreq\@tempa{character}\relax{% +% \end{macrocode} +% Test whether it's a dimension, but do not translate it into its final +% form here, since it may be font-specific. +% \begin{macrocode} + \MT@ifdimen\@tempa + {\MT@glet@nc{MT@pr@c@\MT@curr@set@name @unit}\@tempa}% + {\MT@warn@nodim{character widths}}% + }% +} +% \end{macrocode} +% Tracking may only be relative to a dimension. +% \begin{macrocode} +\define@key{MT@tr@c}{unit}[1em]{% + \MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@empty + \def\@tempa{#1}% + \MT@ifdimen\@tempa + {\MT@glet@nc{MT@tr@c@\MT@curr@set@name @unit}\@tempa}% + {\MT@warn@nodim{1em}% + \MT@gdef@n{MT@tr@c@\MT@curr@set@name @unit}{1em}}% +} +% \end{macrocode} +% Spacing and kerning codes may additionally be relative to space dimensions. +% \begin{macrocode} +\MT@map@clist@n{sp,kn}{% + \define@key{MT@#1@c}{unit}[space]{% + \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@empty + \def\@tempa{##1}% + \MT@ifstreq\@tempa{character}\relax{% + \MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\m@ne + \MT@ifstreq\@tempa{space}\relax{% + \MT@ifdimen\@tempa + {\MT@glet@nc{MT@#1@c@\MT@curr@set@name @unit}\@tempa}% + {\MT@warn@nodim{width of space}}% + }% + }% + }% +} +% \end{macrocode} +% The first argument to \cs{SetExpansion} accepts some more options. +% \begin{macrocode} +\MT@map@clist@n{stretch,shrink,step}{% + \define@key{MT@ex@c}{#1}[]{% + \MT@ifempty{##1}\relax{% + \MT@ifint{##1}{% +% \end{macrocode} +% A space terminates the number. +% \begin{macrocode} + \MT@gdef@n{MT@ex@c@\MT@curr@set@name @#1}{##1 }% + }{% + \MT@warning{% + Value `##1' for option `#1' is not a number.\MessageBreak + Ignoring it}% + }% + }% + }% +} +\define@key{MT@ex@c}{auto}[true]{% + \def\@tempa{#1}% + \csname if\@tempa\endcsname +% \end{macrocode} +% Don't use |autoexpand| for \pdftex\ version older than 1.20. +%\changes{v1.7}{2005/03/07}{fix: remove space after \texttt{autoexpand}} +%\changes{v1.7}{2005/03/07}{disallow automatic expansion if \pdftex\ too old} +% \begin{macrocode} + \MT@requires@pdftex4{% + \MT@gdef@n{MT@ex@c@\MT@curr@set@name @auto}{autoexpand}% + }{% + \MT@warning{pdftex too old for automatic font expansion}% + } + \else + \MT@requires@pdftex4{% + \MT@glet@nc{MT@ex@c@\MT@curr@set@name @auto}\@empty + }\relax + \fi +} +% \end{macrocode} +% Tracking: Interword spacing and outer kerning. +% The variant with space in case \cs{SetTracking} is called inside an argument +% (\eg, to \cmd\IfFileExists). +% \begin{macrocode} +\MT@define@opt@key{tr}{spacing} +\MT@define@opt@key{tr}{outerspacing} +\MT@define@opt@key{tr}{outerkerning} +% \end{macrocode} +% Which ligatures should be disabled? +% \begin{macrocode} +\define@key{MT@tr@c}{noligatures}[]% + {\MT@xdef@n{MT@tr@c@\MT@curr@set@name @noligatures}{#1}} +\define@key{MT@tr@c}{outer spacing}[]{\setkeys{MT@tr@c}{outerspacing={#1}}} +\define@key{MT@tr@c}{outer kerning}[]{\setkeys{MT@tr@c}{outerkerning={#1}}} +\define@key{MT@tr@c}{no ligatures}[]{\setkeys{MT@tr@c}{noligatures={#1}}} +% \end{macrocode} +% +%\subsubsection{Character inheritance} +% +%\begin{macro}{\DeclareCharacterInheritance} +%\changes{v1.1}{2004/09/15}{new command: possibility to specify character inheritance} +%\changes{v1.9d}{2006/02/09}{fix: empty context} +%\changes{v1.9e}{2006/07/26}{new key `\texttt{inputenc}' to set the input encoding} +% This macro may be used in the configuration files to declare characters that +% should inherit protrusion resp. expansion values from other characters. Thus, +% there is no need to define all accented characters (\eg, |\`a|, |\'a|, +% |\^a|, |\~a|, |\"a|, |\r{a}|, |\k{a}|, |\u{a}|), which will make the +% configuration files look much nicer and easier to maintain. If a single +% character of an inheritance list should have a different value, one can +% simply override it. +%\begin{macro}{\MT@inh@feat} +% The optional argument may be used to restrict the list to some features, +%\begin{macro}{\MT@extra@inputenc} +% and to specify an input encoding. +% \begin{macrocode} +\renewcommand*\DeclareCharacterInheritance[1][]{% + \let\MT@extra@context\@empty + \let\MT@extra@inputenc\@undefined + \let\MT@inh@feat\@empty + \setkeys{MT@inh@}{#1}% + \MT@begin@catcodes + \MT@set@inh@list +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@set@inh@list} +% Safe category codes. +% \begin{macrocode} +\def\MT@set@inh@list#1#2{% + \MT@ifempty\MT@inh@feat{% + \MT@map@clist@c\MT@features{{\MT@declare@char@inh{##1}{#1}{#2}}}% + }{% + \MT@map@clist@c\MT@inh@feat{{% + \KV@@sp@def\@tempa{##1}% + \MT@ifempty\@tempa\relax{% + \MT@exp@one@n\MT@declare@char@inh + {\csname MT@rbba@\@tempa\endcsname}{#1}{#2}% + }% + }}% + }% + \MT@end@catcodes +} +% \end{macrocode} +%\changes{v1.9f}{2006/08/09}{fix: forgotten comma in the features list} +%\end{macro} +% The keys for the optional argument. +% \begin{macrocode} +\MT@map@clist@c\MT@features@long{% + \define@key{MT@inh@}{#1}[]{\edef\MT@inh@feat{\MT@inh@feat#1,}}} +\define@key{MT@inh@}{inputenc}{\def\MT@extra@inputenc{#1}} +% \end{macrocode} +%\begin{macro}{\MT@declare@char@inh} +%\todo{share one list between features} +% The lists cannot be given a name by the user. +% \begin{macrocode} +\def\MT@declare@char@inh#1#2#3{% + \MT@edef@n{MT@#1@inh@name}% + {\MT@curr@file/\the\inputlineno (\@nameuse{MT@abbr@#1})}% + \MT@let@cn\MT@curr@set@name{MT@#1@inh@name}% + \MT@ifdefined@c@T\MT@extra@inputenc{% + \MT@xdef@n{MT@#1@inh@\MT@curr@set@name @inputenc}{\MT@extra@inputenc}}% +%\MT@dinfo{1}{creating inheritance list `\@nameuse{MT@#1@inh@name}'}% + \MT@gdef@n{MT@#1@inh@\csname MT@#1@inh@name\endcsname}{#3}% + \def\MT@permutelist{#1@inh}% + \setkeys{MT@inh}{#2}% + \MT@permute +} +% \end{macrocode} +%\end{macro} +% Parse the second argument. \cs{DeclareCharacterInheritance} may also be set +% up for various combinations. +% \begin{macrocode} +\define@key{MT@inh}{encoding}[]{% + \def\MT@val{#1}% + \expandafter\MT@encoding@check\MT@val,\@nil + \MT@get@highlevel{encoding}% + \MT@edef@n{MT@tempencoding1}{\MT@val}% +} +% \end{macrocode} +%\begin{macro}{\MT@encoding@check} +%\changes{v1.2}{2004/09/29}{check whether only one encoding specified} +% But we only allow \emph{one} encoding. +% \begin{macrocode} +\def\MT@encoding@check#1,#2\@nil{% + \MT@ifempty{#2}\relax{% + \edef\MT@val{#1}% + \MT@warning{You may only specify one encoding for character\MessageBreak + inheritance lists. Ignoring encoding(s) #2}% + }% +} +% \end{macrocode} +%\end{macro} +% For the rest, we can reuse the key setup from the configuration lists +% (|\Set...|). +% \begin{macrocode} +\MT@define@code@key{family}{inh} +\MT@define@code@key{series}{inh} +\MT@define@code@key{shape} {inh} +\MT@define@code@key@size {inh} +\MT@define@code@key@font {inh} +% \end{macrocode} +%\begin{macro}{\MT@inh@do} +% Now parse the third argument, the inheritance lists. We define the commands +% |\MT@inh@|\meta{name}|@|\meta{slot}|@|, containing the inheriting characters. +% They will also be translated to slot numbers here, to save some time. The +% following will be executed only once, namely the first time this inheritance +% list is encountered (in |\MT@set@|\meta{feature}|@codes|). +% \begin{macrocode} +\def\MT@inh@do#1,{% + \ifx\relax#1\@empty \else + \MT@inh@split #1==\relax + \expandafter\MT@inh@do + \fi +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@inh@split} +% Only gather the inheriting characters here. Their codes will actually be set +% in |\MT@set@|\meta{feature}|@codes|. +% \begin{macrocode} +\def\MT@inh@split#1=#2=#3\relax{% + \def\@tempa{#1}% + \ifx\@tempa\@empty \else + \MT@get@slot + \ifnum\MT@char > \m@ne + \let\MT@val\MT@char + \MT@map@clist@n{#2}{% + \def\@tempa{##1}% + \ifx\@tempa\@empty \else + \MT@get@slot + \ifnum\MT@char > \m@ne + \MT@exp@cs\MT@xadd{MT@inh@\MT@listname @\MT@val @}{{\MT@char}}% + \fi + \fi + }% +%\MT@dinfo@nl{2}{children of #1 (\MT@val): +% \@nameuse{MT@inh@\MT@listname @\MT@val @}}% + \fi + \fi +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Permutation} +% +%\begin{macro}{\MT@permute} +%\changes{v1.1}{2004/09/15}{don't use sets for empty encoding} +%\begin{macro}{\MT@permute@} +%\begin{macro}{\MT@permute@@} +%\begin{macro}{\MT@permute@@@} +%\begin{macro}{\MT@permute@@@@} +% Calling \cs{MT@permute} will define commands for all permutations +% of the specified font attributes of the form +% |\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 + \MT@permute@ +% \end{macrocode} +% Undefine commands for the next round. +% \begin{macrocode} + \MT@map@tlist@n{{encoding}{family}{series}{shape}}\MT@permute@reset + \MT@glet\MT@tempsize\@undefined +} +\def\MT@permute@{% + \let\MT@cnt@family\@ne + \MT@permute@@ + \MT@increment\MT@cnt@encoding + \MT@ifdefined@n@T{MT@tempencoding\MT@cnt@encoding}% + \MT@permute@ +} +\def\MT@permute@@{% + \let\MT@cnt@series\@ne + \MT@permute@@@ + \MT@increment\MT@cnt@family + \MT@ifdefined@n@T{MT@tempfamily\MT@cnt@family}% + \MT@permute@@ +} +\def\MT@permute@@@{% + \let\MT@cnt@shape\@ne + \MT@permute@@@@ + \MT@increment\MT@cnt@series + \MT@ifdefined@n@T{MT@tempseries\MT@cnt@series}% + \MT@permute@@@ +} +\def\MT@permute@@@@{% + \MT@permute@@@@@ + \MT@increment\MT@cnt@shape + \MT@ifdefined@n@T{MT@tempshape\MT@cnt@shape}% + \MT@permute@@@@ +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@permute@@@@@} +%\changes{v1.9a}{2005/12/05}{don't define permutations for unused encodings} +% In order to save some memory, we can ignore unused encodings (inside the +% document). +% \begin{macrocode} +\def\MT@permute@@@@@{% + \MT@permute@define{encoding}% + \ifMT@document + \ifx\MT@tempencoding\@empty \else + \MT@ifdefined@n@TF{T@\MT@tempencoding}\relax + {\expandafter\expandafter\expandafter\@gobble}% + \fi + \fi + \MT@permute@@@@@@ +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@permute@@@@@@} +% \begin{macrocode} +\def\MT@permute@@@@@@{% + \MT@permute@define{family}% + \MT@permute@define{series}% + \MT@permute@define{shape}% + \edef\@tempa{\MT@tempencoding + /\MT@tempfamily + /\MT@tempseries + /\MT@tempshape + /\MT@ifdefined@c@T\MT@tempsize *}% +% \end{macrocode} +%\changes{v1.2}{2004/09/29}{more sanity checks for \cs{SetProtrusion} and +% \cs{SetExpansion}} +% Some sanity checks: an encoding must be specified (unless nothing else is). +% \begin{macrocode} + \MT@ifstreq\@tempa{////}\relax{% + \ifx\MT@tempencoding\@empty + \MT@warning{% + You have to specify an encoding for\MessageBreak + \@nameuse{MT@abbr@\MT@permutelist} list + `\@nameuse{MT@\MT@permutelist @name}'.\MessageBreak + Ignoring it}% + \else + \MT@ifdefined@c@TF\MT@tempsize{% +% \end{macrocode} +% Add the list of ranges to the beginning of the current combination, after +% checking for conflicts. +%\changes{v1.8}{2005/04/20}{add ranges to the beginning of the lists} +% \begin{macrocode} + \MT@ifdefined@n@T{MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}{% + \MT@map@tlist@c\MT@tempsize\MT@check@rlist + }% + \MT@exp@cs\MT@xaddb + {MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}% + \MT@tempsize +%\MT@dinfo@nl{1}{initialising: use list for font \@tempa,\MessageBreak +% sizes: \csname MT@\MT@permutelist @\@tempa\MT@extra@context +% @sizes\endcsname}% + }{% +% \end{macrocode} +% 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 + `\@nameuse{MT@\MT@permutelist @name}' will override list\MessageBreak + `\@nameuse{MT@\MT@permutelist @\@tempa\MT@extra@context}' + 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}% + }% + \MT@xdef@n{MT@\MT@permutelist @\@tempa\MT@extra@context}% + {\csname MT@\MT@permutelist @name\endcsname}% + \fi + }% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@permute@define} +% Define the commands. +% \begin{macrocode} +\def\MT@permute@define#1{% + \@tempcnta=\csname MT@cnt@#1\endcsname\relax + \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}% + {\MT@edef@n{MT@temp#1}{\csname MT@temp#1\the\@tempcnta\endcsname}}% + {\MT@let@nc{MT@temp#1}\@empty}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@permute@reset} +% Reset the commands. +% \begin{macrocode} +\def\MT@permute@reset#1{% + \@tempcnta=\@ne + \MT@loop + \MT@let@nc{MT@temp#1\the\@tempcnta}\@undefined + \advance\@tempcnta\@ne + \MT@ifdefined@n@TF{MT@temp#1\the\@tempcnta}% + \iftrue + \iffalse + \MT@repeat +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@check@rlist} +%\changes{v1.8}{2005/04/20}{made recursive} +% For every new range item in \cs{MT@tempsize}, check whether it overlaps with +% ranges in the existing list. +% \begin{macrocode} +\def\MT@check@rlist#1{\expandafter\MT@check@rlist@ #1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@check@rlist@} +% Define the current new range and~\dots +% \begin{macrocode} +\def\MT@check@rlist@#1#2#3{% + \def\@tempb{#1}% + \def\@tempc{#2}% + \MT@if@false + \MT@exp@cs\MT@map@tlist@c + {MT@\MT@permutelist @\@tempa\MT@extra@context @sizes}% + \MT@check@range +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@check@range} +% \dots~recurse through the list of existing ranges. +% \begin{macrocode} +\def\MT@check@range#1{\expandafter\MT@check@range@ #1} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@check@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{% + \MT@ifdim{#2}=\m@ne{% + \MT@ifdim\@tempc=\m@ne{% +% \end{macrocode} +%\begin{itemize} +% \item Both items are simple sizes. +% \begin{macrocode} + \MT@ifdim\@tempb={#1}\MT@if@true\relax + }{% +% \end{macrocode} +% \item Item in list is a simple size, new item is a range. +% \begin{macrocode} + \MT@ifdim\@tempb>{#1}\relax{% + \MT@ifdim\@tempc>{#1}{% + \MT@if@true + \edef\@tempb{#1 (with range: \@tempb\space to \@tempc)}% + }\relax + }% + }% + }{% + \MT@ifdim\@tempc=\m@ne{% +% \end{macrocode} +% \item Item in list is a range, new item is a simple size. +% \begin{macrocode} + \MT@ifdim\@tempb<{#2}{% + \MT@ifdim\@tempb<{#1}\relax\MT@if@true + }\relax + }{% +% \end{macrocode} +% \item Both items are ranges. +% \begin{macrocode} + \MT@ifdim\@tempb<{#2}{% + \MT@ifdim\@tempc>{#1}{% + \MT@if@true + \edef\@tempb{#1 to #2 (with range: \@tempb\space to \@tempc)}% + }\relax + }\relax + }% + }% + \ifMT@if@ + \MT@warning{\@nameuse{MT@abbr@\MT@permutelist} list + `\@nameuse{MT@\MT@permutelist @name}' will override\MessageBreak + list `#3' for font \@tempa,\MessageBreak size \@tempb}% +% \end{macrocode} +% If we've already found a conflict with this item, we can skip the rest of the +% list. +% \begin{macrocode} + \expandafter\MT@tlist@break + \fi +} +% \end{macrocode} +%\end{itemize} +%\end{macro} +% +%\subsection{Package options} +% +%\subsubsection{Declaring the options} +% +%\begin{macro}{\ifMT@opt@expansion} +%\begin{macro}{\ifMT@opt@auto} +%\begin{macro}{\ifMT@opt@DVI} +% Keep track of whether the user explicitly set these options. +% \begin{macrocode} +\newif\ifMT@opt@expansion +\newif\ifMT@opt@auto +\newif\ifMT@opt@DVI +% \end{macrocode} +%\end{macro} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@optwarn@admissible} +% Some warnings. +% \begin{macrocode} +\def\MT@optwarn@admissible#1#2{% + \MT@warning@nl{`#1' is not an admissible value for option\MessageBreak + `#2'. Assuming `false'}% +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@optwarn@nan} +% \begin{macrocode} +% +%\MT@requires@latex1{ +\def\MT@optwarn@nan#1#2{% + \MT@warning@nl{Value `#1' for option `#2' is not a\MessageBreak number. + Using default value of \number\@nameuse{MT@#2@default}}% +} +%}\relax +%<*package> +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@opt@def@set} +% \begin{macrocode} +\def\MT@opt@def@set#1{% + \MT@ifdefined@n@TF{MT@\@tempb @set@@\MT@val}{% + \MT@xdef@n{MT@\@tempb @setname}{\MT@val}% + }{% + \MT@xdef@n{MT@\@tempb @setname}{\@nameuse{MT@default@\@tempb @set}}% + \MT@warning@nl{The #1 set `\MT@val' is undeclared.\MessageBreak + Using set `\@nameuse{MT@\@tempb @setname}' instead}% + }% +} +% \end{macrocode} +%\end{macro} +% \opt{expansion} and \opt{protrusion} may be |true|, |false|, |compatibility|, +% |nocompatibility| and/or a \meta{set name}. +%\changes{v1.9}{2005/10/06}{fix: use \texttt{true} as the default value} +% \begin{macrocode} +\MT@map@clist@n{protrusion,expansion}{% + \define@key{MT}{#1}[true]{% + \csname MT@opt@#1true\endcsname + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@ifempty\MT@val\relax{% + \csname MT@#1true\endcsname + \edef\@tempb{\csname MT@rbba@#1\endcsname}% + \MT@ifstreq\MT@val{true}\relax + {% + \MT@ifstreq\MT@val{false}{% + \csname MT@#1false\endcsname + }{% + \MT@ifstreq\MT@val{compatibility}{% + \MT@let@nc{MT@\@tempb @level}\@ne + }{% + \MT@ifstreq\MT@val{nocompatibility}{% + \MT@let@nc{MT@\@tempb @level}\tw@ + }{% +% \end{macrocode} +% If everything failed, it should be a set name. +% \begin{macrocode} + \MT@opt@def@set{#1}% + }% + }% + }% + }% + }% + }% + }% +} +% \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 stabilised in \pdftex?} +% \begin{macrocode} +\define@key{MT}{activate}[true]{% + \setkeys{MT}{protrusion={#1}}% + \setkeys{MT}{expansion={#1}}% +} +% \end{macrocode} +% \opt{spacing}, \opt{kerning} and \opt{tracking} do not have a compatibility level. +% \begin{macrocode} +\MT@map@clist@n{spacing,kerning,tracking}{% + \define@key{MT}{#1}[true]{% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@ifempty\MT@val\relax{% + \csname MT@#1true\endcsname + \MT@ifstreq\MT@val{true}\relax + {% + \MT@ifstreq\MT@val{false}{% + \csname MT@#1false\endcsname + }{% + \edef\@tempb{\csname MT@rbba@#1\endcsname}% + \MT@opt@def@set{#1}% + }% + }% + }% + }% + }% +} +% \end{macrocode} +%\changes{v1.5}{2004/12/02}{new option: \opt{selected}, by default false +% (suggested by \contributor \thanh{} )} +% ^^A private mail, 2004/11/30 +%\changes{v2.0}{2005/10/04}{(beta:1) new option: \opt{babel}, by default false +% (language-dependent setup suggested by \contributor Ulrich Dirr )} +% ^^A private mail, 2005/08/27 +%\begin{macro}{\MT@def@bool@opt} +% The |true|/|false| options: +% \opt{draft}, \opt{final} (may be inherited from the class options), +% \opt{auto}, +% \opt{selected}, +% \opt{babel}, +% \opt{DVIoutput}, +% \opt{defersetup}, +% \opt{copyfonts}. +% \begin{macrocode} +\def\MT@def@bool@opt#1#2{% + \define@key{MT}{#1}[true]{% + \def\@tempa{##1}% + \MT@ifstreq\@tempa{true}\relax{% + \MT@ifstreq\@tempa{false}\relax{% + \MT@optwarn@admissible{##1}{#1}% + \def\@tempa{false}% + }% + }% + #2% + }% +} +% \end{macrocode} +%\end{macro} +% Boolean options that only set the switch. +% \begin{macrocode} +\MT@map@clist@n{draft,selected,babel}{% + \MT@def@bool@opt{#1}{\csname MT@#1\@tempa\endcsname}} +\MT@def@bool@opt{auto}{\csname MT@auto\@tempa\endcsname \MT@opt@autotrue} +% \end{macrocode} +% The \opt{DVIoutput} option will change \cmd\pdfoutput\ immediately to minimise +% the risk of confusing other packages. +% \begin{macrocode} +\MT@def@bool@opt{DVIoutput}{% + \csname if\@tempa\endcsname + \ifnum\pdfoutput>\z@ \MT@opt@DVItrue \fi + \pdfoutput\z@ + \else + \ifnum\pdfoutput<\@ne \MT@opt@DVItrue \fi + \pdfoutput\@ne + \fi +} +% \end{macrocode} +%\changes{v1.9a}{2005/11/21}{new option: \opt{defersetup}, by default true} +% Setting the \opt{defersetup} option to false will restore the old behaviour, +% where the setup took place at the time when the package was loaded. This is +% undocumented, since I would like to learn about the cases where this is +% necessary. +% +% The only problem with the new deferred setup I can think of is when a box +% is being constructed inside the preamble and this box contains a font that is +% not loaded before the box is being used. +% \begin{macrocode} +\MT@def@bool@opt{defersetup}{% + \csname if\@tempa\endcsname \else + \AtEndOfPackage{% + \MT@setup@ + \let\MT@setup@\@empty + \let\MT@addto@setup\@firstofone + }% + \fi +} +% \end{macrocode} +% \opt{copyfonts} will copy all fonts before setting them up. This allows +% protrusion and expansion with different parameters. +%\changes{v2.2}{2007/07/03}{new option: \opt{copyfonts}} +% This options is also \emph{undocumented} in the hope that we can always find +% out automatically whether it's required. +% \begin{macrocode} +\MT@requires@pdftex7{ +%<*lua> + \MT@requires@luatex{ + \MT@def@bool@opt{copyfonts}{% + \csname if\@tempa\endcsname + \MT@error{The `copyfonts' option doesn't work with luatex} + {Use pdftex instead.}% + \fi + } + }{ +% + \MT@def@bool@opt{copyfonts}{% + \csname if\@tempa\endcsname + \MT@glet\MT@copy@font\MT@copy@font@ + \else + \MT@glet\MT@copy@font\relax + \fi + } +% } +}{ + \MT@def@bool@opt{copyfonts}{% + \csname if\@tempa\endcsname + \MT@error{The pdftex version you are using is too old\MessageBreak + to use the `copyfonts' option}{Upgrade pdftex.}% + \fi + } +} +% \end{macrocode} +% \opt{final} is the opposite to \opt{draft}. +%\changes{v1.4a}{2004/11/16}{new option: \opt{final}} +% \begin{macrocode} +\MT@def@bool@opt{final}{% + \csname if\@tempa\endcsname + \MT@draftfalse + \else + \MT@drafttrue + \fi +} +% \end{macrocode} +% For \opt{verbose} output, we redefine \cs{MT@vinfo}. +%\changes{v2.3}{2007/11/05}{turned some warnings into errors} +% \begin{macrocode} +\define@key{MT}{verbose}[true]{% + \let\MT@vinfo\MT@info@nl + \def\@tempa{#1}% + \MT@ifstreq\@tempa{true}\relax{% +% \end{macrocode} +%\changes{v1.7}{2005/03/16}{new value for \opt{verbose} option: \texttt{errors}} +% Take problems seriously. +% \begin{macrocode} + \MT@ifstreq\@tempa{errors}{% + \let\MT@warning \MT@warn@err + \let\MT@warning@nl\MT@warn@err + }{% + \let\MT@vinfo\@gobble +% \end{macrocode} +%\changes{v2.3}{2007/11/05}{new value for \opt{verbose} option: \texttt{silent} +% (suggested by \contributor Karl Berry )} +% ^^A private mail, 2007/11/05 +% Cast warnings to the winds. +% \begin{macrocode} + \MT@ifstreq\@tempa{silent}{% + \let\MT@warning \MT@info + \let\MT@warning@nl\MT@info@nl + }{% + \MT@ifstreq\@tempa{false}\relax{\MT@optwarn@admissible{#1}{verbose}}% + }% + }% + }% +} +% \end{macrocode} +%\changes{v1.5}{2004/12/02}{defaults: \opt{step}: 4 +% (suggested by \contributor \thanh{} )} +% ^^A private mail, 2004/11/30 +%\changes{v1.6}{2004/12/18}{new option: \opt{factor}, by default 1000} +%\changes{v2.0}{2005/09/21}{(beta:1) new option: \opt{letterspace}, by default 100} +%^^A\changes{v2.0}{2007/01/05}{option `\texttt{letterspacing}' renamed to `\opt{letterspace}'} +% Options with numerical keys: +% \opt{factor}, +% \opt{stretch}, +% \opt{shrink}, +% \opt{step}, +% \opt{letterspace}. +% \begin{macrocode} +% +%\MT@requires@latex1{ +\MT@map@clist@n{% +% stretch,shrink,step,% + letterspace}{% + \define@key{MT}{#1}[\csname MT@#1@default\endcsname]{% + \def\@tempa{##1 }% +% \end{macrocode} +% No nonsense in \cs{MT@factor} et al.? +%\changes{v1.6}{2005/01/06}{test whether numeric options receive a number} +% A space terminates the number. +% \begin{macrocode} + \MT@ifint\@tempa + {\MT@edef@n{MT@#1}{\@tempa}}% + {\MT@optwarn@nan{##1}{#1}}% + }% +} +%}\relax +%<*package> +% \end{macrocode} +% \opt{factor} will define the protrusion factor only. +% \begin{macrocode} +\define@key{MT}{factor}[\MT@factor@default]{% + \def\@tempa{#1 }% + \MT@ifint\@tempa + {\edef\MT@pr@factor{\@tempa}} + {\MT@optwarn@nan{#1}{factor}}% +} +% \end{macrocode} +% 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} +\define@key{MT}{unit}[character]{% + \def\@tempa{#1}% + \MT@ifstreq\@tempa{character}\relax{% + \MT@ifdimen\@tempa + {\let\MT@pr@unit\@tempa}% + {\MT@warning@nl{`\@tempa' is not a dimension.\MessageBreak + Ignoring it and setting values relative to\MessageBreak + character widths}}% + }% +} +% \end{macrocode} +% +% \subsubsection{Reading the configuration file} +% +% The package should just work if called without any options. Therefore, +% expansion will be switched off by default if output is , since it isn't +% likely that expanded fonts are available. (This grows more important as +% modern \TeX\ systems have switched to the \pdftex\ engine even for +% output, so that the user might not even be aware of the fact that she's +% running \pdftex.) +% \begin{macrocode} +\MT@protrusiontrue +\ifnum\pdfoutput<\@ne \else +% \end{macrocode} +% Also, we only enable expansion by default if \pdftex\ can expand the fonts +% automatically. +%\changes{v1.6}{2004/12/23}{defaults: turn off expansion for old \pdftex\ versions} +% \begin{macrocode} + \MT@requires@pdftex4{ + \MT@expansiontrue + \MT@autotrue + }\relax +\fi +% \end{macrocode} +% The main configuration file will be loaded before processing the package +% options. +%\changes{v1.8}{2005/05/15}{new option: \opt{config} to load a different main +% configuration file} +%\begin{macro}{\MT@config@file} +%\begin{macro}{\MT@get@config} +% However, the \opt{config} option must of course be evaluated beforehand. +% We also have to define a no-op for the regular option processing later. +% \begin{macrocode} +\define@key{MT}{config}[]{\relax} +\def\MT@get@config#1config=#2,#3\@nil{% + \MT@ifempty{#2}% + {\def\MT@config@file{\MT@MT.cfg}}% + {\def\MT@config@file{#2.cfg}}% +} +\expandafter\expandafter\expandafter\MT@get@config + \csname opt@\@currname.\@currext\endcsname,config=,\@nil +% \end{macrocode} +%\end{macro} +%\end{macro} +%\changes{v1.4b}{2004/11/25}{fix: set catcodes before reading global configuration file +% (reported by \contributor Christoph Bier )} +% ^^A MID: <30k2tqF30v483U1@uni-berlin.de> +% Load the file. +% \begin{macrocode} +\IfFileExists{\MT@config@file}{% + \MT@info@nl{Loading configuration file \MT@config@file}% + \MT@begin@catcodes + \let\MT@begin@catcodes\relax + \let\MT@end@catcodes\relax + \let\MT@curr@file\MT@config@file + \input{\MT@config@file}% + \endgroup +}{\MT@warning@nl{% + Could not find configuration file `\MT@config@file'!\MessageBreak + This will almost certainly cause undesired results.\MessageBreak + Please fix your installation}% +} +% \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}'}% + }{% + \MT@ifdefined@n@TF{MT@default@#1@set}{% + \MT@glet@nn{MT@#1@setname}{MT@default@#1@set}% + \MT@info@nl{Using default \@nameuse{MT@abbr@#1} set `\@nameuse{MT@#1@setname}'}% + }{% +% \end{macrocode} +% If no default font set has been declared in the main configuration file, +% we use the (empty, non-existent) set `|@|', +%\changes{v2.3d}{2008/11/24}{warning for missing default sets} +% and issue a warning. +% \begin{macrocode} + \MT@gdef@n{MT@#1@setname}{@}% + \MT@warning@nl{No \@nameuse{MT@abbr@#1} set chosen, no default set declared. + \MessageBreak Using empty set}% + }% + }% +} +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Hook for other packages}\label{sub:hook} +% +% {\let\special@index\index\SpecialIndex@{\Microtype@Hook}{\encapchar usage}} +%\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 +% it is defined, it will be executed here, \ie, after the main configuration +% file has been loaded, and before the package options are evaluated. +% +% This hook 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 was not +% viable), and (2)~checking \cmd\AtBeginDocument\ could be too late, since +% fonts might already have been loaded, and consequently set up, in the +% preamble. With the new deferred setup, one could live without this command, +% however, it remains here since it's simpler than testing whether the package +% was loaded both in the preamble as well as at the beginning of the document +% (which is what one would have to do). +% +% Package authors should check whether the command is already defined so that +% existing definitions by other packages aren't overwritten. Example: +%\begin{verbatim} +%\def\MinionPro@MT@Hook{\DeclareMicrotypeAlias{MinionPro-LF}{MinionPro}} +%\@ifpackageloaded{microtype} +% \MinionPro@MT@Hook +% {\@ifundefined{Microtype@Hook} +% {\let\Microtype@Hook\MinionPro@MT@Hook} +% {\g@addto@macro\Microtype@Hook{\MinionPro@MT@Hook}}} +%\end{verbatim} +% \cs{MicroType@Hook} with a capital |T| (which only existed in version 1.7) is +% provided for compatibility reasons. At some point in the future, it will no +% longer be available, hence it should not be used. +% \begin{macrocode} +\MT@ifdefined@c@T\MicroType@Hook{\MT@warning{% + Command \string\MicroType@Hook\space is deprecated.\MessageBreak + Use \string\Microtype@Hook\space instead}\MicroType@Hook} +\MT@ifdefined@c@T\Microtype@Hook\Microtype@Hook +% \end{macrocode} +%\end{macro} +% +%\subsubsection{Changing options later} +% +%\begin{macro}{\microtypesetup} +%\changes{v1.4}{2004/11/04}{fix: set the correct levels, and remember them; +% warning when enabling an option disabled in package options} +%\changes{v1.7}{2005/02/17}{fix: warning also when setting to \texttt{(no)compatibility}} +%\changes{v1.9a}{2005/11/21}{inside the preamble, accepts all package options} +%\changes{v2.3d}{2009/03/05}{select font after setup} +%\begin{macro}{\MT@define@optionX} +% Inside the preamble, \cs{microtypesetup} accepts the same options as the +% package (unless \opt{defersetup}|=false|). +% In the document body, it accepts the options: +% |protrusion|, |expansion|, |activate|, |tracking|, |spacing| and |kerning|. +% Specifying font sets is not allowed. +% \begin{macrocode} +\def\microtypesetup{\setkeys{MT}} +\MT@addto@setup{\def\microtypesetup#1{\setkeys{MTX}{#1}\selectfont}} +\def\MT@define@optionX#1#2{% + \define@key{MTX}{#1}[true]{% + \edef\@tempb{\csname MT@rbba@#1\endcsname}% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@ifempty\MT@val\relax{% + \@tempcnta=\m@ne + \MT@ifstreq\MT@val{true}{% +% \end{macrocode} +% Enabling micro-typography in the middle of the document is not allowed if it +% has been disabled in the package options since fonts might already have been +% loaded and hence wouldn't be set up. +% \begin{macrocode} + \MT@checksetup{#1}{% + \@tempcnta=\csname MT@\@tempb @level\endcsname + \MT@vinfo{Enabling #1 + (level \number\csname MT@\@tempb @level\endcsname)\on@line}% + }% + }{% + \MT@ifstreq\MT@val{false}{% + \@tempcnta=\z@ + \MT@vinfo{Disabling #1\on@line}% + }{% + \MT@ifstreq\MT@val{compatibility}{% + \MT@checksetup{#1}{% + \@tempcnta=\@ne + \MT@let@nc{MT@\@tempb @level}\@ne + \MT@vinfo{Setting #1 to level 1\on@line}% + }% + }{% + \MT@ifstreq\MT@val{nocompatibility}{% + \MT@checksetup{#1}{% + \@tempcnta=\tw@ + \MT@let@nc{MT@\@tempb @level}\tw@ + \MT@vinfo{Setting #1 to level 2\on@line}% + }% + }{\MT@error{Value `\MT@val' for key `#1' not recognised} + {Use any of `true', `false', `compatibility' or + `nocompatibility'.}% + }% + }% + }% + }% + \ifnum\@tempcnta>\m@ne + #2\@tempcnta\relax + \fi + }% + }% + }% +} +% \end{macrocode} +%\end{macro} +%\end{macro} +%\begin{macro}{\MT@checksetup} +% Test whether the feature wasn't disabled in the package options. +% \begin{macrocode} +\def\MT@checksetup#1{% + \csname ifMT@#1\endcsname + \expandafter\@firstofone + \else + \MT@error{You cannot enable #1 if it was disabled\MessageBreak + in the package options}{Load microtype with #1 enabled.}% + \expandafter\@gobble + \fi +} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@define@optionX{protrusion}\pdfprotrudechars +\MT@define@optionX{expansion}\pdfadjustspacing +% \end{macrocode} +%\begin{macro}{\MT@define@optionX@} +% The same for |tracking|, |spacing| and |kerning|, which do not have a +% |compatibility| level. +% \begin{macrocode} +\MT@requires@pdftex6{ +% \MT@requires@luatex\@firstofone{ + \def\MT@define@optionX@#1#2{% + \define@key{MTX}{#1}[true]{% + \MT@map@clist@n{##1}{% + \KV@@sp@def\MT@val{####1}% + \MT@ifempty\MT@val\relax{% + \@tempcnta=\m@ne + \MT@ifstreq\MT@val{true}{% + \MT@checksetup{#1}{% + \@tempcnta=\@ne + \MT@vinfo{Enabling #1\on@line}% + }% + }{% + \MT@ifstreq\MT@val{false}{% + \@tempcnta=\z@ + \MT@vinfo{Disabling #1\on@line}% + }{\MT@error{Value `\MT@val' for key `#1' not recognised} + {Use either `true' or `false'}% + }% + }% + \ifnum\@tempcnta>\m@ne + #2\relax + \fi + }% + }% + }% + } +% \end{macrocode} +%\end{macro} +% We cannot simply let \cs{MT@tracking} relax, since this may select the already +% letterspaced font instance. +% \begin{macrocode} + \MT@define@optionX@{tracking}{\ifnum\@tempcnta=\z@ \let\MT@tracking\MT@set@tr@zero + \else \let\MT@tracking\MT@tracking@ \fi} + \MT@define@optionX@{spacing}{\pdfadjustinterwordglue\@tempcnta} + \MT@define@optionX@{kerning}{\pdfprependkern\@tempcnta + \pdfappendkern \@tempcnta} + \@gobble +% } +}\@firstofone +% \end{macrocode} +% Disable for older \pdftex\ versions and for \luatex. +% \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}}% +} +% \end{macrocode} +%\begin{macro}{\MT@saved@setupfont} +% Disable everything -- may be used as a work-around in case setting up fonts +% doesn't work in certain environments. \emph{(Undocumented.)} +% \begin{macrocode} +\let\MT@saved@setupfont\MT@setupfont +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\define@key{MTX}{disable}[]{% + \MT@info{Inactivate `\MT@MT' package}% + \let\MT@setupfont\relax +} +\define@key{MTX}{enable}[]{% + \MT@info{Reactivate `\MT@MT' package}% + \let\MT@setupfont\MT@saved@setupfont +} +% +% \end{macrocode} +% +%\subsubsection{Processing the options}\label{sssec:impl.options} +% +%\begin{macro}{\MT@ProcessOptionsWithKV} +% Parse options. +% \begin{macrocode} +%\MT@requires@latex1{ +\def\MT@ProcessOptionsWithKV#1{% + \let\@tempc\relax + \let\MT@temp\@empty +% \MT@requires@latex2{ + \MT@map@clist@c\@classoptionslist{% + \def\CurrentOption{##1}% + \MT@ifdefined@n@T{KV@#1@\expandafter\MT@getkey\CurrentOption=\@nil}{% + \edef\MT@temp{\MT@temp,\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + \edef\MT@temp{\noexpand\setkeys{#1}% + {\MT@temp\@ptionlist{\@currname.\@currext}}}% +% \end{macrocode} +% \pkg{eplain} can handle package options. +% \begin{macrocode} +%<*plain> + }{\edef\MT@temp{\noexpand\setkeys{#1}% + {\csname usepkg@options@\usepkg@pkg\endcsname}}} +% + \MT@temp + \MT@clear@options +} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\MT@getkey} +% For |key=val| in class options. +%\changes{v2.3a}{2008/02/09}{fix: \texttt{key\quotechar=val} in class options list} +% \begin{macrocode} +\def\MT@getkey#1=#2\@nil{#1} +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +\MT@ProcessOptionsWithKV{MT} +%}\relax +%<*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). +% \begin{macrocode} +\MT@addto@setup{% +\ifMT@draft +% \end{macrocode} +% We disable most of what we've just defined in the \arabic{CodelineNo} lines +% above if we are running in draft mode. +%\changes{v1.7}{2005/02/06}{warning when running in draft mode} +% \begin{macrocode} + \MT@warning@nl{`draft' option active.\MessageBreak + Disabling all micro-typographic extensions.\MessageBreak + This might lead to different line and page breaks}% + \let\MT@setupfont\relax + \renewcommand*\LoadMicrotypeFile[1]{}% + \renewcommand*\microtypesetup[1]{}% + \renewcommand*\microtypecontext[1]{}% + \renewcommand*\lsstyle{}% +\else +% \end{macrocode} +% For output, the user must have explicitly passed the \opt{expansion} +% option to the package. +%\changes{v1.5}{2004/12/02}{defaults: turn off expansion for output} +% \begin{macrocode} + \ifnum\pdfoutput<\@ne + \ifMT@opt@expansion \else + \MT@expansionfalse + \fi + \fi +% \end{macrocode} +% \pdftex\ can create output, too. However, both the viewer and +% |dvips| need to find actual fonts. Therefore, expansion will only work if the +% fonts for different degrees of expansion are readily available. +% +%\changes{v1.4b}{2004/11/19}{new message if \cmd\pdfoutput\ is changed} +% Some packages depend on the value of \cmd\pdfoutput\ and will get confused if +% it is changed after they have been loaded. These packages are, among others: +% \pkg{color}, \pkg{graphics}, \pkg{hyperref}, \pkg{crop}, \pkg{contour}, +% \pkg{pstricks} and, as a matter of course, \pkg{ifpdf}. Instead of testing +% for each package (that's not our job), we only say that it was \microtype\ +% that changed it. This must be sufficient! +% \begin{macrocode} + \MT@info@nl{Generating \ifnum\pdfoutput<\@ne DVI \else PDF \fi output% + \ifMT@opt@DVI\space (changed by \MT@MT)\fi}% +% \end{macrocode} +% Working on font copies? +% \begin{macrocode} + \ifx\MT@copy@font\relax\else \MT@info@nl{Using font copies for contexts}\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 + \edef\MT@active@features{\MT@active@features,pr}% + \pdfprotrudechars\MT@pr@level + \MT@info@nl{Character protrusion enabled (level \number\MT@pr@level)% + \ifnum\MT@pr@factor=\MT@factor@default \else,\MessageBreak + factor: \number\MT@pr@factor\fi + \ifx\MT@pr@unit\@empty \else,\MessageBreak unit: \MT@pr@unit\fi}% + \MT@check@active@set{pr}% + \else + \let\MT@protrusion\relax + \MT@info@nl{No character protrusion}% + \fi +% \end{macrocode} +% Expansion. +% \begin{macrocode} + \ifMT@expansion +% \end{macrocode} +% Set up the values for font expansion: if \opt{stretch} has not been specified, we +% take the default value of 20. +% \begin{macrocode} + \ifnum\MT@stretch=\m@ne + \let\MT@stretch\MT@stretch@default + \fi +% \end{macrocode} +% If \opt{shrink} has not been specified, it will inherit the value from \opt{stretch}. +% \begin{macrocode} + \ifnum\MT@shrink=\m@ne + \let\MT@shrink\MT@stretch + \fi +% \end{macrocode} +%\changes{v2.3d}{2008/11/19}{default \texttt{step}: 1 for \pdftex\ versions $\geq$ 1.40} +% If \opt{step} has not been specified, we will just set it to 1 for recent +% \pdftex\ versions. My tests did not show much difference neither in +% compilation time (within the margin of error) nor in file size (less than +% 1\% difference for \file{microtype.pdf} with |step=1| compared to |step=5|). +%\changes{v1.5}{2004/12/02}{defaults: calculate \opt{step} as +% min(\texttt{stretch},\texttt{shrink})/5} +% With older versions, we set it to min(\opt{stretch},\opt{shrink})/5, +% rounded off, minimum value 1. +%\changes{v1.9}{2005/07/08}{warning if user requested zero \opt{step}} +% \begin{macrocode} + \MT@requires@pdftex6{\def\MT@step{1 }}{% + \ifnum\MT@step=\m@ne + \ifnum\MT@stretch>\MT@shrink + \ifnum\MT@shrink=\z@ + \@tempcnta=\MT@stretch + \else + \@tempcnta=\MT@shrink + \fi + \else + \ifnum\MT@stretch=\z@ + \@tempcnta=\MT@shrink + \else + \@tempcnta=\MT@stretch + \fi + \fi + \divide\@tempcnta 5\relax + \else + \@tempcnta=\MT@step + \ifnum\@tempcnta=\z@ + \MT@warning@nl{The expansion step cannot be set to zero.\MessageBreak + Setting it to one} + \fi + \fi + \ifnum\@tempcnta=\z@ \@tempcnta=\@ne \fi + \edef\MT@step{\number\@tempcnta\space}}% +% \end{macrocode} +%\begin{macro}{\MT@auto} +% Automatic expansion of the font? This new feature of \pdftex\ 1.20 makes the +% \textit{\fontfamily{pzc}\selectfont hz}~programme really usable. +% It must be either `|autoexpand|' or empty (or `|1000|' for older versions of +% \pdftex). +% \begin{macrocode} + \let\MT@auto\@empty + \ifMT@auto + \MT@requires@pdftex4{% +% \end{macrocode} +%\end{macro} +% We turn off automatic expansion if output mode is . +%\changes{v1.5}{2004/12/02}{disable automatic expansion for output} +% \begin{macrocode} + \ifnum\pdfoutput<\@ne + \ifMT@opt@auto + \MT@error{% + Automatic font expansion only works for PDF output.\MessageBreak + However, you are creating a DVI file} + {If you have created expanded fonts instances, remove `auto' from% + \MessageBreak the package options. Otherwise, you have to switch + off expansion\MessageBreak completely.}% + \fi + \MT@autofalse + \else + \def\MT@auto{autoexpand}% + \fi +% \end{macrocode} +% Also, if \pdftex\ is too old. +%\changes{v1.1}{2004/09/13}{issue an error instead of a warning, when \pdftex\ +% version is too old for \texttt{autoexpand}} +%\changes{v1.6}{2004/12/23}{disable automatic expansion for old \pdftex\ versions} +% \begin{macrocode} + }{% + \MT@error{% + The pdftex version you are using is too old for\MessageBreak + automatic font expansion}% + {If you have created expanded fonts instances, remove `auto' from\MessageBreak + the package options. Otherwise, you have to switch off expansion\MessageBreak + completely, or upgrade pdftex to version 1.20 or newer.}% + \MT@autofalse + \def\MT@auto{1000 }% + }% + \else +% \end{macrocode} +% No automatic expansion. +% \begin{macrocode} + \MT@requires@pdftex4\relax{% + \def\MT@auto{1000 }% + }% + \fi +% \end{macrocode} +% Choose the appropriate macro for selected expansion. +% \begin{macrocode} + \ifMT@selected + \let\MT@set@ex@codes\MT@set@ex@codes@s + \else + \let\MT@set@ex@codes\MT@set@ex@codes@n + \fi +% \end{macrocode} +% Filter out |stretch=0,shrink=0|, since it would result in a \pdftex\ error. +%\changes{v1.9}{2005/07/08}{disable expansion if both \opt{step} and \opt{shrink} are zero} +% \begin{macrocode} + \ifnum\MT@stretch=\z@ + \ifnum\MT@shrink=\z@ + \MT@warning@nl{% + Both the stretch and shrink limit are set to zero.\MessageBreak + Disabling font expansion}% + \MT@expansionfalse + \fi + \fi + \fi + \ifMT@expansion + \edef\MT@active@features{\MT@active@features,ex}% + \pdfadjustspacing\MT@ex@level + \MT@info@nl{\ifMT@auto A\else Non-a\fi utomatic font expansion enabled + (level \number\MT@ex@level),\MessageBreak + stretch: \number\MT@stretch, shrink: \number\MT@shrink, + step: \number\MT@step, \ifMT@selected\else non-\fi selected}% +% \end{macrocode} +%\changes{v2.2}{2007/01/28}{warning if \opt{stretch} or \opt{shrink} aren't multiples of \opt{step}} +%\begin{macro}{\MT@check@step} +% Check whether \opt{stretch} and \opt{shrink} are multiples of \opt{step}. +% \begin{macrocode} + \def\MT@check@step#1{% + \@tempcnta=\csname MT@#1\endcsname + \divide\@tempcnta \MT@step + \multiply\@tempcnta \MT@step + \ifnum\@tempcnta=\csname MT@#1\endcsname\else + \MT@warning@nl{The #1 amount is not a multiple of step.\MessageBreak + The effective maximum #1 is \the\@tempcnta\space + (step \number\MT@step)}% + \fi + }% + \MT@check@step{stretch}% + \MT@check@step{shrink}% + \MT@check@active@set{ex}% +% \end{macrocode} +%\end{macro} +%\changes{v1.7}{2005/03/02}{modify \cmd\showhyphens} +% Inside \cmd\showhyphens, font expansion should be disabled. +% \begin{macrocode} + \CheckCommand*\showhyphens[1]{\setbox0\vbox{% + \color@begingroup\everypar{}\parfillskip\z@skip + \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne + \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}}% +% \end{macrocode} +%\begin{macro}{\showhyphens} +% I wonder why it's defined globally (in \file{ltfssbas.dtx})? +% \begin{macrocode} + \gdef\showhyphens#1{\setbox0\vbox{% + \color@begingroup\pdfadjustspacing\z@\everypar{}\parfillskip\z@skip + \hsize\maxdimen\normalfont\pretolerance\m@ne\tolerance\m@ne + \hbadness\z@\showboxdepth\z@\ #1\color@endgroup}}% +% \end{macrocode} +%\end{macro} +% \begin{macrocode} + \else + \let\MT@expansion\relax + \MT@info@nl{No font expansion}% + \fi +} +\MT@requires@pdftex6{ +% \end{macrocode} +%\begin{macro}{\MT@warn@lua} +% Switch off the features that don't work with \luatex. +% \begin{macrocode} +%<*lua> + \def\MT@warn@lua#1{% + \MT@error{The `#1' feature doesn't currently work\MessageBreak with luatex} + {Use pdftex instead.}% + \csname MT@#1false\endcsname + \MT@let@nc{MT@#1}\relax + } +% +% \end{macrocode} +%\end{macro} +% \begin{macrocode} +% + \MT@addto@setup{% +%<*package> +% \end{macrocode} +% Tracking, spacing and kerning. +% \begin{macrocode} + \ifMT@tracking +% \MT@requires@luatex{\MT@warn@lua{tracking}}{% + \edef\MT@active@features{\MT@active@features,tr}% + \MT@info@nl{Tracking enabled}% + \MT@check@active@set{tr}% +% \end{macrocode} +% Enable protrusion for compensation at the line edges. +%\changes{v2.3}{2007/07/27}{enable protrusion when tracking is enabled} +% \begin{macrocode} + \ifMT@protrusion\else\pdfprotrudechars\@ne\fi +% }% + \else + \let\MT@tracking\relax + \MT@info@nl{No tracking}% + \fi + \ifMT@spacing +% \MT@requires@luatex{\MT@warn@lua{spacing}}{% + \edef\MT@active@features{\MT@active@features,sp}% + \pdfadjustinterwordglue\@ne + \MT@info@nl{Adjustment of interword spacing enabled}% + \MT@check@active@set{sp}% +% }% + \else + \let\MT@spacing\relax + \MT@info@nl{No adjustment of interword spacing}% + \fi + \ifMT@kerning +% \MT@requires@luatex{\MT@warn@lua{kerning}}{% + \edef\MT@active@features{\MT@active@features,kn}% + \pdfprependkern\@ne + \pdfappendkern\@ne + \MT@info@nl{Adjustment of character kerning enabled}% + \MT@check@active@set{kn}% +% }% + \else + \let\MT@kerning\relax + \MT@info@nl{No adjustment of character kerning}% + \fi +% +% \end{macrocode} +%\begin{macro}{\MT@warn@tracking@DVI} +%\changes{v2.2}{2007/02/11}{warning when letterspacing in DVI mode} +% We issue a warning, when letterspacing in mode, since it will probably +% not work. We also switch on protrusion if it isn't already, to compensate for +% the letterspacing kerns. +% \begin{macrocode} + \ifnum\pdfoutput<\@ne + \def\MT@warn@tracking@DVI{% + \MT@warning@nl{% + You are using tracking/letterspacing in DVI mode.\MessageBreak + This will probably not work, unless the post-\MessageBreak + processing program (dvips, dvipdfm(x), ...) is\MessageBreak + able to create the virtual fonts on the fly}% + \MT@glet\MT@warn@tracking@DVI\relax + }% + \else + \def\MT@warn@tracking@DVI{% + \ifnum\pdfprotrudechars<\@ne \global\pdfprotrudechars\@ne \fi + \MT@glet\MT@warn@tracking@DVI\relax + }% + \fi +% \end{macrocode} +%\end{macro} +% \begin{macrocode} + \ifnum\MT@letterspace=\m@ne + \let\MT@letterspace\MT@letterspace@default + \else + \MT@ls@too@large\MT@letterspace + \fi + }% +% \end{macrocode} +% If \pdftex\ is too old, we disable tracking, spacing and kerning, +%\changes{v2.3a}{2008/02/16}{error messages if \pdftex\ is too old for extensions} +% and throw an error message. +% \begin{macrocode} +%<*package> +}{ + \MT@addto@setup{% + \ifMT@tracking + \MT@error{Tracking only works with pdftex version 1.40\MessageBreak + or newer. Switching it off}{Upgrade pdftex.}% + \else + \MT@info@nl{No tracking (pdftex too old)}% + \fi + \ifMT@spacing + \MT@error{Adjustment of interword spacing only works with\MessageBreak + pdftex version 1.40 or newer. Switching it off}{Upgrade pdftex.}% + \else + \MT@info@nl{No adjustment of interword spacing (pdftex too old)}% + \fi + \ifMT@kerning + \MT@error{Character kerning only works with\MessageBreak + pdftex version 1.40 or newer. Switching it off}{Upgrade pdftex.}% + \else + \MT@info@nl{No adjustment of character kerning (pdftex too old)}% + \fi + } +} +% \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. +% \begin{macrocode} +\MT@addto@setup{% + \ifx\MT@active@features\@empty \else + \edef\MT@active@features{\expandafter\@gobble\MT@active@features}% + \fi + \MT@documenttrue +} +% \end{macrocode} +%\begin{macro}{\MT@set@babel@context} +% Interaction with \pkg{babel}. +% \begin{macrocode} +\def\MT@set@babel@context#1{% + \MT@ifdefined@n@TF{MT@babel@#1}{% + \MT@vinfo{*** Changing to language context `#1'\MessageBreak\on@line}% + \expandafter\MT@exp@one@n\expandafter\microtypecontext + \csname MT@babel@#1\endcsname + }{% + \microtypecontext{protrusion=,expansion=,spacing=,kerning=}% + }% +} +% \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 (#2)}% + \shorthandoff{#2}} +}{ + \def\MT@shorthandoff#1#2{% + \MT@error{You must load `babel' before `\MT@MT'} + {Otherwise, `\MT@MT' cannot switch off #1 babel's\MessageBreak + active characters.}} +} +% \end{macrocode} +%\end{macro} +% We patch the language switching commands to enable language-dependent setup. +% \begin{macrocode} +\MT@addto@setup{% + \ifMT@babel + \@ifpackageloaded{babel}{% + \MT@info@nl{Redefining babel's language switching commands}% + \let\MT@orig@select@language\select@language + \def\select@language#1{% + \MT@orig@select@language{#1}% + \MT@set@babel@context{#1}% + }% + \let\MT@orig@foreign@language\foreign@language + \def\foreign@language#1{% + \MT@orig@foreign@language{#1}% + \MT@set@babel@context{#1}% + }% + \ifMT@kerning +% \end{macrocode} +%\todo{make switching off of babel's shorthands configurable} +% Disable French \pkg{babel}'s active characters. +%\changes{v2.0}{2006/10/10}{(beta:8) option `\opt{babel}': fix: switch off French +% \pkg{babel}'s shorthands properly +% (reported by \contributor Daniel Flipo )} +% ^^A private mail, 2006/10/09 +% \begin{macrocode} + \MT@if@false + \MT@with@babel@and@T{french} \MT@if@true + \MT@with@babel@and@T{frenchb} \MT@if@true + \MT@with@babel@and@T{francais}\MT@if@true + \MT@with@babel@and@T{canadien}\MT@if@true + \MT@with@babel@and@T{acadian} \MT@if@true + \ifMT@if@\MT@shorthandoff{French}{:;!?}\fi +% \end{macrocode} +% Disable Turkish \pkg{babel}'s active characters. +%\changes{v2.0}{2006/10/10}{(beta:8) option `\opt{babel}': switch off Turkish \pkg{babel}'s shorthands} +%\changes{v2.3}{2007/10/03}{fix: really switch off Turkish shorthands} +% \begin{macrocode} + \MT@if@false + \MT@with@babel@and@T{turkish} \MT@if@true + \ifMT@if@\MT@shorthandoff{Turkish}{:!=}\fi + \fi +% \end{macrocode} +% In case \pkg{babel} was loaded before \microtype: +% \begin{macrocode} + \MT@set@babel@context\languagename + }{% + \MT@warning@nl{You did not load the babel package.\MessageBreak + The `babel' option won't have any effect}% + }% + \fi +} +% \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. +% \begin{macrocode} + \selectfont} +% \end{macrocode} +%\begin{macro}{\MT@curr@file} +% This is the current file (hopefully with the correct extension). +% \begin{macrocode} +\edef\MT@curr@file{\jobname.tex} +% \end{macrocode} +%\end{macro} +% Finally, execute the setup macro at the end of the preamble, and empty it +% (the \pkg{combine} class calls it repeatedly). +%\changes{v2.3d}{2009/02/05}{move setup to the very end +% (for \contributor Colin Rourke )} +% ^^A private mail, 2009/02/03 +% \begin{macrocode} +% +%\MT@requires@latex1{ +\AtBeginDocument{\MT@setup@ \MT@glet\MT@setup@\@empty} +%}\relax +% \end{macrocode} +% Warning if \cmd\nonfrenchspacing\ is active, since space factors will be +% ignored with \cmd\pdfadjustinterwordglue\,|>|\,0. Why 1500? Because some +% packages redefine \cmd\frenchspacing.\footnote{ +% Cf. the \texttt{c.t.t.} thread `\cmd\frenchspacing\ with packages +% and babel', started by Philipp Lehman on 16~August 2005, +% :~\nolinkurl{ddtbaj$rob$1@online.de}} +% This has to be checked after the setup has taken place. There still will be a +% false warning if \pkg{babel} is loaded after \microtype\ (without the +% \opt{babel} option). +% \begin{macrocode} +%<*package> +\MT@requires@pdftex6{ + \AtBeginDocument{% + \ifMT@spacing + \ifMT@babel \else + \ifnum\sfcode`\. > 1500 + \MT@ifstreq\MT@sp@context{nonfrench}\relax{% + \MT@warning@nl{% + \string\nonfrenchspacing\space is active. Adjustment of\MessageBreak + interword spacing will disable it. You might want\MessageBreak + to add `\@backslashchar\MT@MT context{spacing=nonfrench}'\MessageBreak + to your preamble}% + }% + \fi + \fi + \fi + } +}\relax +% +% \end{macrocode} +% Restore catcodes. +% \begin{macrocode} +\MT@restore@catcodes +% \end{macrocode} +% That was that. +% \begin{macrocode} +% +% \end{macrocode} +% +% ^^A ------------------------------------------------------------------------- +%\NoIndexing ^^A from now on, don't bother indexing +% +%\section{Configuration files} +%\changes{v1.6}{2005/01/24}{restructure \file{dtx} file} +% +% Let's now write the font configuration files. +% \begin{macrocode} +%<*config> + +% \end{macrocode} +%\subsection{Font sets} +%\GeneralChanges{Font sets} +% +% We first declare some sets in the main configuration file. +% +% \begin{macrocode} +%<*m-t> +%%% ----------------------------------------------------------------------- +%%% FONT SETS + +\DeclareMicrotypeSet{all} + { } + +% \end{macrocode} +%\changes{v1.2}{2004/10/02}{new: \texttt{allmath} and \texttt{basicmath}} +%\changes{v1.8}{2005/05/25}{add encoding to \texttt{allmath}} +%\changes{v1.9}{2005/08/17}{add encoding to text sets} +%\changes{v1.9}{2005/08/17}{add encoding to text sets} +%\changes{v1.9d}{2006/04/20}{add encoding to text sets} +%\changes{v2.3e}{2009/10/28}{add encoding} +% \begin{macrocode} +\DeclareMicrotypeSet{allmath} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1,OML,OMS,U} } + +\DeclareMicrotypeSet{alltext} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1} } + +% \end{macrocode} +%\changes{v1.9d}{2006/02/22}{\texttt{md*} instead of \texttt{m} series in basic sets} +% \begin{macrocode} +\DeclareMicrotypeSet{basicmath} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,OML,OMS}, + family = {rm*,sf*}, + series = {md*}, + size = {normalsize,footnotesize,small,large} + } + +\DeclareMicrotypeSet{basictext} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5}, + family = {rm*,sf*}, + series = {md*}, + size = {normalsize,footnotesize,small,large} + } + +% \end{macrocode} +%\changes{v2.0}{2006/12/28}{add \texttt{smallcaps} set} +%\changes{v2.3e}{2009/06/01}{\texttt{sc*} instead of \texttt{sc} in \texttt{smallcaps} set} +% \begin{macrocode} +\DeclareMicrotypeSet{smallcaps} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1}, + shape = {sc*} + } + +% \end{macrocode} +%\changes{v2.0}{2006/12/21}{add \texttt{footnotesize} and \texttt{scriptsize} sets} +% \begin{macrocode} +\DeclareMicrotypeSet{footnotesize} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1}, + size = {-small} + } + +\DeclareMicrotypeSet{scriptsize} + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1}, + size = {-footnotesize} + } + +\DeclareMicrotypeSet{normalfont} + { font = */*/*/*/* } + +% \end{macrocode} +% The default sets. +%\changes{v2.2}{2007/04/15}{default set for tracking: \texttt{smallcaps}} +% \begin{macrocode} +%%% ----------------------------------------------------------------------- +%%% DEFAULT SETS + +\DeclareMicrotypeSetDefault[protrusion]{alltext} +\DeclareMicrotypeSetDefault[expansion] {basictext} +\DeclareMicrotypeSetDefault[spacing] {basictext} +\DeclareMicrotypeSetDefault[kerning] {alltext} +\DeclareMicrotypeSetDefault[tracking] {smallcaps} + +% \end{macrocode} +% +%\subsection{Font variants and aliases} +% +% \begin{macrocode} +%%% ----------------------------------------------------------------------- +%%% FONT VARIANTS AND ALIASES + +% \end{macrocode} +% These are the variants I happen to be using (expert encoding, oldstyle +% numerals, swashes, alternative, display, inferior and superior numerals): +% \begin{macrocode} +\DeclareMicrotypeVariants{x,j,w,a,d,0,1} + +% \end{macrocode} +% Other candidates: |2|~(proportional digits), |e|~(engraved), |f|~(Fraktur), +% |g|~(small text), |h|~(shadow), |l|~(outline), |n|~(informal), +% |p|~(ornaments), |r|~(roman), |s|~(sans serif), |t|~(typewriter). +% I've omitted them since they seem hardly be used and/or they are actually +% more than a variant, \ie, they shouldn't share a file. +% +%\bigskip\noindent +% Fonts that are `the same': The Latin Modern fonts, the virtual fonts from the +% \pkg{ae} and \pkg{zefonts}, and the \pkg{eco} and \pkg{hfoldsty} packages +% (oldstyle numerals) all inherit the (basic) settings from Computer Modern +% Roman. Some of them are in part overwritten later. +%\changes{v1.2}{2004/10/03}{declare \texttt{cmor} as an alias of \texttt{cmr}} +%\changes{v1.3}{2004/10/22}{declare \texttt{aer}, \texttt{zer} and \texttt{hfor} +% as aliases of \texttt{cmr}} +% \begin{macrocode} +\DeclareMicrotypeAlias{lmr} {cmr} % lmodern +\DeclareMicrotypeAlias{aer} {cmr} % ae +\DeclareMicrotypeAlias{zer} {cmr} % zefonts +\DeclareMicrotypeAlias{cmor}{cmr} % eco +\DeclareMicrotypeAlias{hfor}{cmr} % hfoldsty +% \end{macrocode} +% The packages \pkg{pxfonts} and \pkg{txfonts} fonts inherit Palatino and Times +% settings respectively, +%\changes{v1.8}{2005/04/19}{declare \texttt{pxr} and \texttt{txr} +% as aliases of \texttt{ppl} resp. \texttt{ptm}} +% also the \TeX\ Gyre fonts Pagella and Termes (formerly: \pkg{qfonts}). +%\changes{v1.9}{2005/08/16}{declare \texttt{qpl} and \texttt{qtm} (\pkg{qfonts}, \TeX\ Gyre) +% as aliases of \texttt{ppl} resp. \texttt{ptm}} +% \begin{macrocode} +\DeclareMicrotypeAlias{pxr} {ppl} % pxfonts +\DeclareMicrotypeAlias{qpl} {ppl} % TeX Gyre Pagella (formerly: qfonts/QuasiPalatino) +% \end{macrocode} +% The ` Neu' fonts, a `re-implementation' of Palatino. +%\changes{v2.2}{2007/05/27}{declare Neu as an alias of Palatino} +% \begin{macrocode} +\DeclareMicrotypeAlias{fp9x}{pplx} % FPL Neu +\DeclareMicrotypeAlias{fp9j}{pplj} % " +\DeclareMicrotypeAlias{txr} {ptm} % txfonts +\DeclareMicrotypeAlias{qtm} {ptm} % TeX Gyre Termes (formerly: qfonts/QuasiTimes) +% \end{macrocode} +%\todo{check Times variants} +% More Times variants, to be checked: |pns|, |mns| (TimesNewRomanPS); |mnt| +% (Times\-NewRomanMT, TimesNRSevenMT), |mtm| (TimesSmallTextMT); |pte| +% (TimesEuropa); |ptt| (TimesTen); TimesEighteen; TimesModernEF. +% +% The \pkg{eulervm} package virtually extends the Euler fonts. +%\changes{v1.9e}{2006/07/28}{declare \texttt{zeur} and \texttt{zeus} (\pkg{eulervm}) +% as aliases of \texttt{eur} resp. \texttt{eus} (\pkg{euler})} +% \begin{macrocode} +\DeclareMicrotypeAlias{zeur}{eur} % Euler VM +\DeclareMicrotypeAlias{zeus}{eus} % " +% \end{macrocode} +% MicroPress's Charter version (\pkg{chmath}). +%\changes{v2.2}{2007/06/08}{declare \texttt{chr} (\pkg{chmath}) as an alias of Charter +% (reported by \contributor Geoff Vallis )} +% ^^A private mail, 2007/06/07 +% \begin{macrocode} +\DeclareMicrotypeAlias{chr} {bch} % CH Math +% \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} +% and Garamond. +% \begin{macrocode} +\DeclareMicrotypeAlias{mdbch}{bch} % mathdesign/Charter +\DeclareMicrotypeAlias{mdugm}{ugm} % mathdesign/URW Garamond +% \end{macrocode} +% Letter Gothic is similar enough to Bitstream Letter Gothic to share the +% configuration. +% \begin{macrocode} +\DeclareMicrotypeAlias{ulg} {blg} % URW LetterGothic -> Bitstream LetterGothic12Pitch +% \end{macrocode} +% Euro symbol fonts, to save some files. +% \begin{macrocode} +\DeclareMicrotypeAlias{zpeus} {zpeu} % Adobe Euro sans -> serif +\DeclareMicrotypeAlias{eurosans}{zpeu} % Adobe Euro sans -> serif +\DeclareMicrotypeAlias{euroitcs}{euroitc} % ITC Euro sans -> serif + +% \end{macrocode} +% +%\subsection{Interaction with \pkg{babel}} +% +% Contexts that are to be set when switching to a language. +% \begin{macrocode} +%%% ----------------------------------------------------------------------- +%%% INTERACTION WITH THE `babel' PACKAGE + +\DeclareMicrotypeBabelHook + {english,UKenglish,british,USenglish,american} + {kerning=, spacing=nonfrench} + +\DeclareMicrotypeBabelHook + {french,francais,acadian,canadien} + {kerning=french, spacing=} + +\DeclareMicrotypeBabelHook + {turkish} + {kerning=turkish, spacing=} + +% \end{macrocode} +%\GeneralChanges* +% +% \subsection{Note on admissible characters} +% +% All printable characters are allowed in the settings, with the +% following exceptions (on the left hand side, the replacements on the right): +% +%\begin{tabbing} +% |\|\quad\=:\quad\=\cmd\textbackslash \\ +% |{| \>:\> \cmd\textbraceleft \\ +% |}| \>:\> \cmd\textbraceright \\ +% |^| \>:\> \cmd\textasciicircum \\ +% |%| \>:\> \cmd\% \\ +% |#| \>:\> \cmd\# +%\end{tabbing} +% +%\noindent +% Comma and equal sign must be guarded with braces (`|{,}|', `|{=}|') to keep +% \pkg{keyval} happy. +% +% Character commands are allowed as far as they have been defined in the proper +% \LaTeX\ way, that is, when they have been assigned a slot in the font +% encoding with \cmd\DeclareTextSymbol\ or \cmd\DeclareTextComposite. +% Characters defined via \cmd\chardef\ are also possible. +% +% Ligatures and \cmd\mathchardef ed symbols have to be specified numerically. +% Of course, numerical identification is possible in any other case, too. +% +%\changes{v1.1}{2004/09/14}{remove 8-bit characters from the configuration files +% (suggested by \contributor Harald Harders )} +% ^^A private mail, 2004/09/13 +% 8-bit characters are also admissible, provided they have been declared in the +% input encoding file. They should, however, only be used in private +% configuration files, where the proper input encoding is guaranteed, or else in +% combination with the `|inputenc|' key. +% +%\subsection{Character inheritance} +%\GeneralChanges{Inheritance} +% +% First the lists of inheriting characters. We only declare those characters +% that are the same on \emph{both} sides, \ie, not \OE\ for O. +% \begin{macrocode} +% +%<*m-t|zpeu|mvs> +%%% ----------------------------------------------------------------------- +%%% CHARACTER INHERITANCE + +% +%<*m-t> +% \end{macrocode} +% +%\subsubsection{} +% Glyphs that should possibly inherit settings on one side only: +% |012|~(`fi' ligature), |013|~(`fl'), |014|~(`ffi'), |015|~(`ffl'), +% \AE, \ae, \OE, \oe. +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = OT1 } + { f = {011}, % ff + i = {\i}, + j = {\j}, + O = {\O}, + o = {\o} + } + +% \end{macrocode} +% +%\subsubsection{} +% Candidates here: |028|~(`fi'), |029|~(`fl'), |030|~(`ffi'), |031|~(`ffl'), +% |156| (`\IJ'~ligature, since \LaTeX\ 2005/12/01 accessible as |\IJ|), +% |188|~(`\ij', |\ij|), \AE, \ae, \OE, \oe. +%\changes{v1.5}{2004/12/11}{remove \cmd\ss\ from list, add \cmd\DJ} +%\changes{v1.8}{2005/04/26}{remove \cmd\DJ\ from list (it's the same as \cmd\DH)} +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = T1 } + { A = {\`A,\'A,\^A,\~A,\"A,\r A,\k A,\u A}, + a = {\`a,\'a,\^a,\~a,\"a,\r a,\k a,\u a}, + C = {\'C,\c C,\v C}, + c = {\'c,\c c,\v c}, + D = {\v D,\DH}, + d = {\v d,\dj}, + E = {\`E,\'E,\^E,\"E,\k E,\v E}, + e = {\`e,\'e,\^e,\"e,\k e,\v e}, + f = {027}, % ff + G = {\u G}, + g = {\u g}, + I = {\`I,\'I,\^I,\"I,\.I}, + i = {\`i,\'i,\^i,\"i,\i}, + j = {\j}, + L = {\L,\'L,\v L}, + l = {\l,\'l,\v l}, + N = {\'N,\~N,\v N}, + n = {\'n,\~n,\v n}, + O = {\O,\`O,\'O,\^O,\~O,\"O,\H O}, + o = {\o,\`o,\'o,\^o,\~o,\"o,\H o}, + R = {\'R,\v R}, + r = {\'r,\v r}, + S = {\'S,\c S,\v S,\SS}, + s = {\'s,\c s,\v s}, + T = {\c T,\v T}, + t = {\c t,\v t}, + U = {\`U,\'U,\^U,\"U,\H U,\r U}, + u = {\`u,\'u,\^u,\"u,\H u,\r u}, + Y = {\'Y,\"Y}, + y = {\'y,\"y}, + Z = {\'Z,\.Z,\v Z}, + z = {\'z,\.z,\v z} +% \end{macrocode} +%\changes{v2.2}{2007/02/04}{remove `\texttt{-}' $\rightarrow$ `\texttt{127}'} +% The `soft hyphen' often has reduced right side bearing so that it may already +% be protruded, hence no inheritance. +% \begin{macrocode} +% - = {127}, + } + +% \end{macrocode} +% +%\subsubsection{} +% More characters: |008|~(`fl'), |012|~(`fi'), |014|~(`ffi'), |015|~(`ffl'), +% \AE, \ae, \OE, \oe. +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = LY1 } + { A = {\`A,\'A,\^A,\~A,\"A,\r A}, + a = {\`a,\'a,\^a,\~a,\"a,\r a}, + C = {\c C}, + c = {\c c}, + D = {\DH}, + E = {\`E,\'E,\^E,\"E}, + e = {\`e,\'e,\^e,\"e}, + f = {011}, % ff + I = {\`I,\'I,\^I,\"I}, + i = {\`i,\'i,\^i,\"i,\i}, + L = {\L}, + l = {\l}, + N = {\~N}, + n = {\~n}, + O = {\`O,\'O,\^O,\~O,\"O,\O}, + o = {\`o,\'o,\^o,\~o,\"o,\o}, + S = {\v S}, + s = {\v s}, + U = {\`U,\'U,\^U,\"U}, + u = {\`u,\'u,\^u,\"u}, + Y = {\'Y,\"Y}, + y = {\'y,\"y}, + Z = {\v Z}, + z = {\v z} + } + +% \end{macrocode} +% +%\subsubsection{} +%\changes{v1.9}{2005/08/16}{add list for } +% The Polish extension. More interesting characters here: +% |009|~(`fk'), |012|~(`fi'), |013|~(`fl'), |014|~(`ffi'), |015|~(`ffl'), +% \AE, \ae, \OE, \oe. +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = OT4 } + { A = {\k A}, + a = {\k a}, + C = {\'C}, + c = {\'c}, + E = {\k E}, + e = {\k e}, + f = {011}, % ff + i = {\i}, + j = {\j}, + L = {\L}, + l = {\l}, + N = {\'N}, + n = {\'n}, + O = {\O,\'O}, + o = {\o,\'o}, + S = {\'S}, + s = {\'s}, + Z = {\'Z,\.Z}, + z = {\'z,\.z} + } + +% \end{macrocode} +% +%\subsubsection{} +%\changes{v1.9d}{2006/04/20}{add list for encoding (contributed by +% \contributor Maciej Eder )} +% ^^A private mail, 2006/04/19 +% The Central European encoding.\footnote{ +% Contributed by \contributor Maciej Eder .} +% Ligatures: |009|~(`fk'), |012|~(`fi'), |013|~(`fl'), |014|~(`ffi'), +% |015|~(`ffl'), \AE, \ae, \OE, \oe. +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = QX } + { A = {\`A,\'A,\^A,\~A,\"A,\k A,\AA}, + a = {\`a,\'a,\^a,\~a,\"a,\k a,\aa}, + C = {\'C,\c C}, + c = {\'c,\c c}, + D = {\DH}, + E = {\`E,\'E,\^E,\"E,\k E}, + e = {\`e,\'e,\^e,\"e,\k e}, + f = {011}, % ff + I = {\`I,\'I,\^I,\"I,\k I}, + i = {\`i,\'i,\^i,\"i,\k i,\i}, + j = {\j}, + L = {\L}, + l = {\l}, + N = {\'N,\~N}, + n = {\'n,\~n}, + O = {\O,\`O,\'O,\^O,\~O,\"O}, + o = {\o,\`o,\'o,\^o,\~o,\"o}, +% \end{macrocode} +%\changes{v2.3c}{2008/09/01}{add \cmd\textcommabelow[\texttt{STst}] to encoding +% (reported by \contributor Vasile Gaburici )} +% ^^A private mail, 2008/09/01, and +% ^^A http://tug.org/pipermail/tex-live/2008-September/017385.html +% The Rumanian \cmd\textcommabelow\ accents are actually replacements for the +% \cmd\c\ variants, which had previously (and erroneously\footnote{ +% Cf. \url{http://tug.org/pipermail/tex-live/2008-August/017204.html}}) +% been included in encoding. They are still kept for backwards +% compatibility. +%\iffalse +% If \cmd\textcommabelow\ is undefined, it will be silently ignored. +% This is due to a quirk in \cs{\MT@map@clist@}. +%\todo{fix \cs{\MT@map@clist@}?} +%\fi +% \begin{macrocode} + S = {\'S,\c S,\textcommabelow S,\v S}, + s = {\'s,\c s,\textcommabelow s,\v s}, + T = {\c T,\textcommabelow T}, + t = {\c t,\textcommabelow t}, + U = {\`U,\'U,\^U,\"U,\k U}, + u = {\`u,\'u,\^u,\"u,\k u}, + Y = {\'Y,\"Y}, + y = {\'y,\"y}, + Z = {\'Z,\.Z,\v Z}, + z = {\'z,\.z,\v z}, + . = \textellipsis + } + +% \end{macrocode} +% +%\subsubsection{} +%\changes{v1.9}{2005/08/17}{add list for (requested by +% \contributor \thanh{} )} +% ^^A private email, 2005/08/16 +% The Vietnamese encoding . It is so crowded with accented and double-accented +% characters that there is no room for any ligatures. +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = T5 } + { A = {\`A,\'A,\~A,\h A,\d A,\^A,\u A, + \`\Acircumflex,\'\Acircumflex,\~\Acircumflex,\h\Acircumflex,\d\Acircumflex, + \`\Abreve,\'\Abreve,\~\Abreve,\h\Abreve,\d\Abreve}, + a = {\`a,\'a,\~a,\h a,\d a,\^a,\u a, + \`\acircumflex,\'\acircumflex,\~\acircumflex,\h\acircumflex,\d\acircumflex, + \`\abreve,\'\abreve,\~\abreve,\h\abreve,\d\abreve}, + D = {\DJ}, + d = {\dj}, + E = {\`E,\'E,\~E,\h E,\d E,\^E, + \`\Ecircumflex,\'\Ecircumflex,\~\Ecircumflex,\h\Ecircumflex,\d\Ecircumflex}, + e = {\`e,\'e,\~e,\h e,\d e,\^e, + \`\ecircumflex,\'\ecircumflex,\~\ecircumflex,\h\ecircumflex,\d\ecircumflex}, + I = {\`I,\'I,\~I,\h I,\d I}, + i = {\`i,\'i,\~i,\h i,\d i,\i}, + O = {\`O,\'O,\~O,\h O,\d O,\^O,\horn O, + \`\Ocircumflex,\'\Ocircumflex,\~\Ocircumflex,\h\Ocircumflex,\d\Ocircumflex, + \`\Ohorn,\'\Ohorn,\~\Ohorn,\h\Ohorn,\d\Ohorn}, + o = {\`o,\'o,\~o,\h o,\d o,\^o,\horn o, + \`\ocircumflex,\'\ocircumflex,\~\ocircumflex,\h\ocircumflex,\d\ocircumflex, + \`\ohorn,\'\ohorn,\~\ohorn,\h\ohorn,\d\ohorn}, + U = {\`U,\'U,\~U,\h U,\d U,\horn U, + \`\Uhorn,\'\Uhorn,\~\Uhorn,\h\Uhorn,\d\Uhorn}, + u = {\`u,\'u,\~u,\h u,\d u,\horn u, + \`\uhorn,\'\uhorn,\~\uhorn,\h\uhorn,\d\uhorn}, + Y = {\`Y,\'Y,\~Y,\h Y,\d Y}, + y = {\`y,\'y,\~y,\h y,\d y} + } + +% +% \end{macrocode} +% +%\subsubsection{Euro symbols} +% Make Euro symbols settings simpler. +% \begin{macrocode} +%<*zpeu> +\DeclareCharacterInheritance + { encoding = U, + family = {zpeu,zpeus,eurosans} } + { E = 128 } + +% +%<*mvs> +\DeclareCharacterInheritance + { encoding = OT1, + family = mvs } + { 164 = {099,100,101} } % \EURhv,\EURcr,\EURtm + +% \end{macrocode} +% Since 2006/05/11 (that is, one week after I've added these settings, after the +% package had been dormant for six years), \pkg{marvosym}'s encoding is +% (correctly) instead of . +%\changes{v1.9e}{2006/07/05}{adapt to \pkg{marvosym}'s changed encoding} +% \begin{macrocode} +\DeclareCharacterInheritance + { encoding = U, + family = mvs } + { 164 = {099,100,101} } + +% +% \end{macrocode} +% +%\subsection{Tracking} +%\GeneralChanges{Tracking} +% +%\changes{v2.2}{2007/02/23}{add ligatures that are to be disabled} +% By default, we only disable the `f*' ligatures, for those fonts that have +% any. Thus, ligatures and especially kerning for all other characters will be +% retained. +% \begin{macrocode} +%<*m-t> +%%% ----------------------------------------------------------------------- +%%% TRACKING/LETTERSPACING + +\SetTracking + [ name = default, + no ligatures = {f} ] + { encoding = {OT1,T1,T2A,LY1,OT4,QX} } + { } + +% \end{macrocode} +% +%\subsection{Font expansion} +%\GeneralChanges{Expansion} +% +% These are \thanh's original expansion settings. They are used for all fonts +% (until somebody shows mercy and creates font-specific settings). +% \begin{macrocode} +%%% ----------------------------------------------------------------------- +%%% EXPANSION + +\SetExpansion + [ name = default ] + { encoding = {OT1,OT4,QX,T1,LY1} } + { + A = 500, a = 700, + \AE = 500, \ae = 700, + B = 700, b = 700, + C = 700, c = 700, + D = 500, d = 700, + E = 700, e = 700, + F = 700, + G = 500, g = 700, + H = 700, h = 700, + K = 700, k = 700, + M = 700, m = 700, + N = 700, n = 700, + O = 500, o = 700, + \OE = 500, \oe = 700, + P = 700, p = 700, + Q = 500, q = 700, + R = 700, + S = 700, s = 700, + U = 700, u = 700, + W = 700, w = 700, + Z = 700, z = 700, + 2 = 700, + 3 = 700, + 6 = 700, + 8 = 700, + 9 = 700 + } + +% \end{macrocode} +% Settings for Cyrillic encoding.\footnote{Contributed by +% \contributor Karl Karlsson .} +%\changes{v2.3e}{2009/10/28}{settings for encoding +% (contributed by \contributor Karl Karlsson )} +% \begin{macrocode} +\SetExpansion + [ name = T2A ] + { encoding = T2A } + { + A = 500, a = 700, + B = 700, b = 700, + C = 700, c = 700, + D = 500, d = 700, + E = 700, e = 700, + F = 700, + G = 500, g = 700, + H = 700, h = 700, + K = 700, k = 700, + M = 700, m = 700, + N = 700, n = 700, + O = 500, o = 700, + P = 700, p = 700, + Q = 500, q = 700, + R = 700, + S = 700, s = 700, + U = 700, u = 700, + W = 700, w = 700, + Z = 700, z = 700, + 2 = 700, + 3 = 700, + 6 = 700, + 8 = 700, + 9 = 700, + \CYRA = 500, \cyra = 700, + \CYRB = 700, \cyrb = 700, + \CYRV = 700, \cyrv = 700, + \CYRG = 700, \cyrg = 700, + \CYRD = 700, \cyrd = 700, + \CYRE = 700, \cyre = 700, + \CYRZH = 700, \cyrzh = 700, + \CYRZ = 700, \cyrz = 700, + \CYRI = 700, \cyri = 700, + \CYRISHRT = 700, \cyrishrt = 700, + \CYRK = 700, \cyrk = 700, + \CYRL = 700, \cyrl = 700, + \CYRM = 700, \cyrm = 700, + \CYRN = 700, \cyrn = 700, + \CYRO = 500, \cyro = 700, + \CYRP = 700, \cyrp = 700, + \CYRR = 700, \cyrr = 700, + \CYRS = 700, \cyrs = 700, + \CYRT = 700, \cyrt = 700, + \CYRU = 700, \cyru = 700, + \CYRF = 700, \cyrf = 700, + \CYRH = 700, \cyrh = 700, + \CYRC = 700, \cyrc = 700, + \CYRCH = 700, \cyrch = 700, + \CYRSH = 700, \cyrsh = 700, + \CYRSHCH = 700, \cyrshch = 700, + \CYRHRDSN = 700, \cyrhrdsn = 700, + \CYRERY = 700, \cyrery = 700, + \CYRSFTSN = 700, \cyrsftsn = 700, + \CYREREV = 700, \cyrerev = 700, + \CYRYU = 700, \cyryu = 700, + \CYRYA = 700, \cyrya = 700 + } + +% \end{macrocode} +% encoding does not contain \cmd\AE, \cmd\ae, \cmd\OE\ and \cmd\oe. +% \begin{macrocode} +\SetExpansion + [ name = T5 ] + { encoding = T5 } + { + A = 500, a = 700, + B = 700, b = 700, + C = 700, c = 700, + D = 500, d = 700, + E = 700, e = 700, + F = 700, + G = 500, g = 700, + H = 700, h = 700, + K = 700, k = 700, + M = 700, m = 700, + N = 700, n = 700, + O = 500, o = 700, + P = 700, p = 700, + Q = 500, q = 700, + R = 700, + S = 700, s = 700, + U = 700, u = 700, + W = 700, w = 700, + Z = 700, z = 700, + 2 = 700, + 3 = 700, + 6 = 700, + 8 = 700, + 9 = 700 + } + +% +% \end{macrocode} +% +%\subsection{Character protrusion} +%\GeneralChanges{Protrusion} +% +%\changes{v1.1}{2004/09/14}{add factors for some more characters} +%\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 encoding (Computer Modern Roman, +% Palatino, Times)} +%\changes{v1.9}{2005/08/17}{settings for encoded Computer Modern Roman} +%\changes{v1.9a}{2005/12/02}{settings for encoded Charter} +% +% \begin{macrocode} +%%% ----------------------------------------------------------------------- +%%% PROTRUSION + +% \end{macrocode} +% For future historians, \thanh's original settings (from \file{protcode.tex}, +% converted to \microtype\ notation). +%\begin{verbatim} +%\SetProtrusion +% [ name = thanh ] +% { encoding = OT1 } +% { +% A = {50,50}, +% F = { ,50}, +% J = {50, }, +% K = { ,50}, +% L = { ,50}, +% T = {50,50}, +% V = {50,50}, +% W = {50,50}, +% X = {50,50}, +% Y = {50,50}, +% k = { ,50}, +% r = { ,50}, +% t = { ,50}, +% v = {50,50}, +% w = {50,50}, +% x = {50,50}, +% y = {50,50}, +% . = { ,700}, {,}= { ,700}, +% : = { ,500}, ; = { ,500}, +% ! = { ,200}, ? = { ,200}, +% ( = {50, }, ) = { ,50}, +% - = { ,700}, +% \textendash = { ,300}, \textemdash = { ,200}, +% \textquoteleft = {700, }, \textquoteright = { ,700}, +% \textquotedblleft = {500, }, \textquotedblright = { ,500} +% } +%\end{verbatim} +% +%\subsubsection{Normal} +% +% The default settings always use the most moderate value. +% +% \begin{macrocode} +%<*cfg-t> +\SetProtrusion +% [ name = default ] +% \end{macrocode} +% We also create configuration files for the fonts +%\begin{itemize} +% \item Bitstream Charter ( code |bch|) +%\changes{v1.5}{2004/11/28}{settings for Bitstream Charter} +% \begin{macrocode} +% [ name = bch-default ] +% \end{macrocode} +% \item Bitstream Letter Gothic (|blg|) +%\changes{v2.2}{2007/03/03}{settings for Bitstream Letter Gothic} +% \begin{macrocode} +% [ name = blg-default ] +% \end{macrocode} +% \item Computer Modern Roman (|cmr|) +% \begin{macrocode} +% [ name = cmr-default ] +% \end{macrocode} +% \item Adobe Garamond (|pad|, |padx|, |padj|) +% \begin{macrocode} +% [ name = pad-default ] +% \end{macrocode} +% \item Minion\footnote{Contributed by \contributor Harald Harders +% and \contributor Karl Karlsson .} +% (|pmnx|, |pmnj|) +%\changes{v1.1}{2004/09/14}{settings for Adobe Minion (contributed by +% \contributor Harald Harders )} +% ^^A private mail, 2004/09/14 +% \begin{macrocode} +% [ name = pmnj-default ] +% \end{macrocode} +% \item Palatino (|ppl|, |pplx|, |pplj|) +% \begin{macrocode} +% [ name = ppl-default ] +% \end{macrocode} +% \item Times (|ptm|, |ptmx|, |ptmj|) +% \begin{macrocode} +% [ name = ptm-default ] +% \end{macrocode} +% \item Garamond (|ugm|) +%\changes{v1.9c}{2006/01/26}{settings for Garamond} +%\end{itemize} +% \begin{macrocode} +% [ name = ugm-default ] +% { } +% { encoding = OT1, +% { encoding = {OT1,OT4}, +% family = bch } +% family = blg } +% family = {pad,padx,padj} } +% family = {ppl,pplx,pplj} } +% family = {ptm,ptmx,ptmj} } +% family = ugm } + { +% A = {50,50}, +% A = {50,100}, +% \AE = {50, }, +% \AE = {150,50}, +% B = { ,50}, +% C = {50, }, +% D = { ,50}, +% D = { ,70}, +% E = { ,50}, +% F = { ,50}, +% F = { ,70}, +% G = {50, }, +% G = {50,50}, +% I = {150,150}, +% J = {50, }, +% J = {100, }, +% K = { ,50}, +% K = {50, }, +% L = { ,50}, +% L = { ,150}, +% L = { ,80}, +% L = { ,120}, +% O = {50,50}, +% \OE = {50, }, +% \OE = {50,50}, +% P = { ,100}, +% P = { ,50}, +% Q = {50,70}, +% Q = {50,50}, +% R = { ,50}, +% R = { ,70}, +% T = {50,50}, +% T = {100,100}, +% T = {70,70}, +% V = {50,50}, +% V = {70,70}, +% W = {50,50}, +% W = {70,70}, +% X = {50,50}, +% X = {50,70}, +% Y = {50,50}, +% Y = {80,80}, +% Z = {50,50}, +% f = {150,100}, +% i = {150,150}, +% j = {100,100}, +% k = { ,50}, +% k = { ,70}, +% l = {150,150}, +% l = { ,-50}, +% p = {50,50}, +% p = { ,50}, +% q = {50, }, +% r = { ,50}, +% r = {100, 80}, +% t = { ,70}, +% t = { ,50}, +% t = {150, 80}, +% t = { ,100}, +% v = {50,50}, +% v = {100,100}, +% v = {50,70}, +% w = {50,50}, +% w = {50,70}, +% x = {50,50}, +% x = {100,100}, +% y = { ,50}, +% y = { 50,100}, +% y = {50,70}, +% y = { ,70}, +% \end{macrocode} +%\changes{v1.6}{2005/01/11}{improve settings for numbers +% (pointed out by \contributor Peter Muthesius )} +% ^^A MID: <34b1h7F48s44tU1@individual.net> +% \begin{macrocode} +% 0 = { ,50}, +% 1 = {50,50}, +% 1 = {150,150}, +% 1 = {100,200}, +% 1 = { ,50}, +% 1 = {100,100}, +% 2 = {50,50}, +% 2 = { ,100}, +% 3 = {50, }, +% 3 = {50,50}, +% 3 = {100, }, +% 4 = {50,50}, +% 4 = {100,50}, +% 4 = {100, }, +% 4 = {70,70}, +% 4 = {50, }, +% 4 = {70, }, +% 5 = { ,50}, +% 5 = {50,50}, +% 6 = {50, }, +% 6 = { ,50}, +% 6 = {50,50}, +% 7 = {50,50}, +% 7 = {50,80}, +% 7 = {100,100}, +% 7 = {50,100}, +% 7 = { ,50}, +% 8 = { ,50}, +% 9 = {50,50}, +% 9 = { ,50}, +% . = { ,700}, +% . = { ,600}, +% . = {400,500}, +% {,}= { ,500}, +% {,}= {300,400}, +% : = { ,500}, +% : = { ,400}, +% : = {300,400}, +% ; = { ,300}, +% ; = {200,300}, +% ; = { ,500}, +% ; = { ,400}, +% ! = { ,100}, +% ! = {200,200}, +% ? = { ,100}, +% ? = { ,200}, +% ? = {150,150}, +% " = {300,300}, +% @ = {50,50}, +% @ = {100,100}, +% ~ = {200,250}, +% ~ = {300,350}, +% & = {50,100}, +% & = { ,100}, +% \% = {50,50}, +% \% = { ,50}, +% \% = {100,100}, +% \% = {50,100}, +% \# = {100,100}, +% * = {200,200}, +% * = {200,300}, +% * = {150,200}, +% * = {300,300}, +% + = {250,250}, +% + = {150,250}, +% + = {300,300}, +% + = {150,200}, +% + = {250,300}, +% {=}= {200,200}, +% ( = {100, }, ) = { ,200}, +% ( = {200, }, ) = { ,200}, +% ( = {300, }, ) = { ,300}, +% ( = {100, }, ) = { ,300}, +% [ = {100, }, ] = { ,100}, +% [ = {300,100}, ] = { ,300}, +% \end{macrocode} +%\changes{v1.7}{2005/03/15}{fix: remove \textbackslash\ from , +% add \cmd\textbackslash\ to encoding} +% \begin{macrocode} +% / = {100,200}, +% / = { ,200}, +% / = {300,300}, +% / = {200,300}, +% / = {100,300}, +% - = {500,500}, +% - = {400,500}, +% - = {300,400}, +% - = {300,500}, +% - = {200,400}, +% - = {500,600}, +% < = {200,100}, > = {100,200}, +% _ = {150,250}, +% | = {250,250}, +% \textendash = {200,200}, \textemdash = {150,150}, +% \textendash = {200,300}, \textemdash = {150,250}, +% \textendash = {400,300}, \textemdash = {300,200}, +% \textendash = {300,300}, \textemdash = {200,200}, +% \textendash = {250,300}, \textemdash = {250,250}, +% \end{macrocode} +% Why settings for left \emph{and} right quotes? Because in some languages they +% might be used like that (see the \pkg{csquotes} package for examples). +% \begin{macrocode} +% \textquoteleft = {300,400}, \textquoteright = {300,400}, +% \textquoteleft = {400,600}, \textquoteright = {400,600}, +% \textquoteleft = {500,700}, \textquoteright = {500,600}, +% \textquoteleft = {500,700}, \textquoteright = {500,700}, +% \textquoteleft = {500,500}, \textquoteright = {300,500}, +% \textquoteleft = {300,600}, \textquoteright = {300,600}, +% \textquotedblleft = {300,300}, \textquotedblright = {300,300} +% \textquotedblright = {300,400} +% \textquotedblleft = {500,300}, \textquotedblright = {200,600} +% \textquotedblleft = {300,400}, \textquotedblright = {300,400} +% \textquotedblleft = {400,400}, \textquotedblright = {400,400} + } + +% \end{macrocode} +% Greek uppercase letters are in encoding only. +%\changes{v1.9}{2005/07/10}{fix: remove uppercase Greek letters from encoded } +% \begin{macrocode} +%<*m-t|cmr|pmn> +\SetProtrusion +% [ name = OT1-default, +% [ name = cmr-OT1, +% [ name = pmnj-OT1, +% load = default ] +% load = cmr-default ] +% load = pmnj-default ] +% { encoding = OT1 } +% { encoding = {OT1,OT4}, +% { encoding = OT1, +% family = cmr } +% family = pmnj } + { +% \AE = {50, }, +% \OE = {50, } +%<*cmr> + "00 = { ,150}, % \Gamma + "01 = {100,100}, % \Delta + "02 = { 50, 50}, % \Theta + "03 = {100,100}, % \Lambda + "06 = { 50, 50}, % \Sigma + "07 = {100,100}, % \Upsilon + "08 = { 50, 50}, % \Phi + "09 = { 50, 50} % \Psi +% \end{macrocode} +% Remaining slots can be found in the source file. +%\iffalse ^^A ... namely, here: +% "04 = { , }, % \Xi +% "05 = { , }, % \Pi +% "0A = { , }, % \Omega +%\fi +% \begin{macrocode} +% + } + +% +% \end{macrocode} +% and encodings contain some more characters. The default list +% will be loaded first. +%\changes{v1.9a}{2005/11/07}{fix: remove `\texttt{\_}' from encoding} +% \begin{macrocode} +\SetProtrusion +% [ name = T1-default, +% [ name = bch-T1, +% [ name = blg-T1, +% [ name = cmr-T1, +% [ name = pad-T1, +% [ name = pmnj-T1, +% [ name = ppl-T1, +% [ name = ptm-T1, +% [ name = ugm-T1, +% load = default ] +% load = bch-default ] +% load = blg-default ] +% load = cmr-default ] +% load = pad-default ] +% load = pmnj-default ] +% load = ppl-default ] +% load = ptm-default ] +% load = ugm-default ] +% { encoding = {T1,LY1} } +% { encoding = {T1,LY1}, +% { encoding = {T1}, +% family = bch } +% family = blg } +% family = cmr } +% family = {pad,padx,padj} } +% family = pmnj } +% family = {ppl,pplx,pplj} } +% family = {ptm,ptmx,ptmj} } +% family = ugm } + { +% \AE = {50, }, +% \OE = {50, }, +% \TH = { ,50}, +% \v L = { ,250}, +% \v d = { ,250}, +% \v l = { ,250}, +% \v t = { ,250}, +% 127 = {300,400}, +% 156 = {100, }, % IJ +% 188 = { 80, 80}, % ij +% _ = {100,100}, +% _ = {200,200}, +% _ = {100,200}, +% \textbackslash = {100,200}, +% \textbackslash = {150,200}, +% \textbackslash = {250,300}, +% \textbackslash = {200,300}, +% \textbackslash = {100,300}, +% \textbar = {200,200}, +% \textendash = {300,300}, \textemdash = {150,150}, +% \textquotedbl = {300,400}, \textquotedblleft = {300,400}, +% \textquotedbl = {300,300}, \textquotedblleft = {200,600}, +% \end{macrocode} +%\changes{v1.4}{2004/10/30}{tweak quote characters for \texttt{cmr} +% variants (, , \texttt{lmr})} +% The fonts do something weird: they insert an implicit kern between quote +% and boundary character. Therefore, we must override the settings from . +% \begin{macrocode} +% \quotesinglbase = {400,400}, \quotedblbase = {400,400}, +% \quotesinglbase = {400,400}, \quotedblbase = {300,400}, +% \quotesinglbase = {400,400}, \quotedblbase = {300,300}, +% \guilsinglleft = {400,300}, \guilsinglright = {300,400}, +% \guilsinglleft = {300,500}, \guilsinglright = {300,500}, +% \guilsinglleft = {400,400}, \guilsinglright = {300,500}, +% \guilsinglleft = {400,400}, \guilsinglright = {300,600}, +% \guillemotleft = {200,200}, \guillemotright = {200,200}, +% \guillemotleft = {300,200}, \guillemotright = {100,400}, +% \guillemotleft = {200,200}, \guillemotright = {150,300}, +% \guillemotleft = {300,300}, \guillemotright = {200,400}, +% \guillemotleft = {300,400}, \guillemotright = {300,400}, +% \textexclamdown = {100, }, \textquestiondown = {100, }, +% \textexclamdown = {200, }, \textquestiondown = {100, }, +% \textexclamdown = {200, }, \textquestiondown = {200, }, +% \textbraceleft = {400,200}, \textbraceright = {200,400}, +% \textbraceleft = {200, }, \textbraceright = { ,300}, +% \textless = {200,100}, \textgreater = {100,200} +% \textless = {100, }, \textgreater = { ,100}, +% \textvisiblespace = {100,100} % not in LY1 +% \end{macrocode} +%\iffalse +% \dh = { , }, +% \th = { , }, +% \NG = { , }, +% \ng = { , }, +% \textasciicircum = { , }, +% \textsterling = { , }, % also in TS1 +% \textsection = { , }, % also in TS1 +%\fi +% \begin{macrocode} + } + +% \end{macrocode} +% The \pkg{lmodern} fonts used to restore the original settings from +% fonts. Now, they require even other settings, though. +%\changes{v2.3a}{2008/02/19}{adjust quotation marks again} +% \begin{macrocode} +%<*cmr> +\SetProtrusion + [ name = lmr-T1, + load = cmr-T1 ] + { encoding = {T1,LY1}, + family = lmr } + { + \textquotedblleft = {300,400}, \textquotedblright = {300,400} + } + +% +% \end{macrocode} +% Settings for the encoding (generic, Computer Modern Roman, and Minion).\footnote{Contributed by +% \contributor Karl Karlsson .} +%\changes{v2.3e}{2009/10/28}{settings for encoding (contributed by +% \contributor Karl Karlsson )} +% ^^A private mail, 2009/10/21 +%\changes{v2.4}{2009/11/15}{settings for encoded Minion (contributed by +% \contributor Karl Karlsson )} +% ^^A private mail, 2009/11/14 +% \begin{macrocode} +%<*m-t|cmr|pmn> +\SetProtrusion +% [ name = T2A-default, +% [ name = cmr-T2A, +% [ name = pmnj-T2A, +% load = default ] +% load = cmr-default ] +% load = pmnj-default ] + { encoding = T2A, +% } +% family = cmr } +% family = pmnj } + { + \CYRA = {50,50}, + \CYRG = { ,50}, + \CYRK = { ,50}, + \CYRT = {50,50}, + \CYRH = {50,50}, + \CYRU = {50,50}, +% \CYRS = {50, }, +% \CYRO = {50,50}, + \cyrk = { ,50}, + \cyrg = { ,50}, + \cyrh = {50,50}, +% \cyru = {50,50}, +% \cyru = {50,70}, +% _ = {100,100}, +% _ = {200,200}, +% \textbackslash = {100,200}, \quotedblbase = {400,400}, +% \textbackslash = {200,300}, \quotedblbase = {400,400}, +% \textbackslash = {100,200}, \quotedblbase = {300,300}, +% \textquotedbl = {300,300}, \textquotedblleft = {200,600}, +% \guillemotleft = {200,200}, \guillemotright = {200,200}, +% \guillemotleft = {300,200}, \guillemotright = {100,400}, +% \guillemotleft = {200,200}, \guillemotright = {150,300}, +% \textbraceleft = {400,200}, \textbraceright = {200,400}, +% \textbraceleft = {200, }, \textbraceright = { ,300}, +% \textless = {200,100}, \textgreater = {100,200} +% \textless = {100, }, \textgreater = { ,100} + } + +% +% \end{macrocode} +% Settings for the encoding (generic and Times).\footnote{Contributed by +% \contributor Maciej Eder .} +%\changes{v1.9d}{2006/04/20}{settings for encoding (contributed by +% \contributor Maciej Eder )} +% ^^A private mail, 2006/04/19 +% It also includes some glyphs otherwise in . +% \begin{macrocode} +%<*m-t|ptm> +\SetProtrusion +% [ name = QX-default, +% [ name = ptm-QX, +% load = default ] +% load = ptm-default ] +% { encoding = QX } +% { encoding = QX, +% family = {ptm,ptmx,ptmj} } + { + \AE = {50, }, +% * = {200,200}, + {=} = {100,100}, + \textunderscore = {100,100}, + \textbackslash = {100,200}, + \quotedblbase = {400,400}, +% \guillemotleft = {200,200}, \guillemotright = {200,200}, +% \guillemotleft = {300,300}, \guillemotright = {200,400}, + \textexclamdown = {100, }, \textquestiondown = {100, }, +% \textbraceleft = {400,200}, \textbraceright = {200,400}, +% \textbraceleft = {200,200}, \textbraceright = {200,300}, + \textless = {200,100}, \textgreater = {100,200}, + \textminus = {200,200}, \textdegree = {300,300}, +% \copyright = {100,100}, \textregistered = {100,100} +% \copyright = {100,150}, \textregistered = {100,150}, +% \textxgeq = { ,100}, \textxleq = {100, }, +% \textalpha = { , 50}, \textDelta = { 70, 70}, +% \textpi = { 50, 80}, \textSigma = { , 70}, +% \textmu = { , 80}, \texteuro = { 50, 50}, +% \textellipsis = {150,200}, \textasciitilde = { 80, 80}, +% \textapprox = { 50, 50}, \textinfty = {100,100}, +% \textdagger = {150,150}, \textdaggerdbl = {100,100}, +% \textdiv = { 50,150}, \textsection = { 80, 80}, +% \texttimes = {100,150}, \textpm = { 50, 80}, +% \textbullet = {150,150}, \textperiodcentered = {300,300}, +% \textquotesingle = {500,500}, \textquotedbl = {300,300}, +% \textperthousand = { ,50} + } + +% +% \end{macrocode} +% is based on ; it shares some but not all extra characters of . +% All accented characters are already taken care of by the inheritance list. +% \begin{macrocode} +%<*cmr|bch> +\SetProtrusion +% [ name = cmr-T5, +% load = cmr-default ] +% [ name = bch-T5, +% load = bch-default ] + { encoding = T5, +% family = cmr } +% family = bch } + { +% _ = {100,100}, +% \textbackslash = {150,200}, +% \textbackslash = {200,300}, +% \textquotedblleft = {200,600}, +% \textquotedbl = {300,300}, +% \quotesinglbase = {400,400}, \quotedblbase = {300,300}, +% \quotesinglbase = {400,400}, \quotedblbase = {400,400}, +% \guilsinglleft = {400,300}, \guilsinglright = {300,400}, +% \guilsinglleft = {400,400}, \guilsinglright = {300,500}, +% \guillemotleft = {200,200}, \guillemotright = {150,300}, +% \guillemotleft = {300,200}, \guillemotright = {100,400}, +% \textbraceleft = {200, }, \textbraceright = { ,300}, +% \textbraceleft = {400,200}, \textbraceright = {200,400}, + \textless = {200,100}, \textgreater = {100,200} + } + +% +% \end{macrocode} +% Minion with lining numbers. +% \begin{macrocode} +%<*pmn> +\SetProtrusion + [ name = pmnx-OT1, + load = pmnj-default ] + { encoding = OT1, + family = pmnx } + { + 1 = {230,180} + } + +\SetProtrusion + [ name = pmnx-T1, + load = pmnj-T1 ] + { encoding = {T1,LY1}, + family = pmnx } + { + 1 = {230,180} + } + +\SetProtrusion + [ name = pmnx-T2A, + load = pmnj-T2A ] + { encoding = {T2A}, + family = pmnx } + { + 1 = {230,180} + } + +% +% \end{macrocode} +% Times is the default font for , therefore we provide settings for the +% additional characters in this encoding, too. +%\changes{v1.8}{2005/04/26}{add characters for Times} +% \begin{macrocode} +%<*ptm> + \SetProtrusion + [ name = ptm-LY1, + load = ptm-T1 ] + { encoding = LY1, + family = {ptm,ptmx,ptmj} } + { + _ = {100,100}, + \texttrademark = {100,100}, + \textregistered = {100,100}, + \textcopyright = {100,100}, + \textdegree = {300,300}, + \textminus = {200,200}, + \textellipsis = {150,200}, +% \texteuro = { , }, % ? + \textcent = {100,100}, + \textquotesingle = {500,500}, + \textflorin = { 50, 70}, + \textdagger = {150,150}, + \textdaggerdbl = {100,100}, + \textperthousand = { , 50}, + \textbullet = {150,150}, + \textonesuperior = {100,100}, + \texttwosuperior = { 50, 50}, + \textthreesuperior = { 50, 50}, + \textperiodcentered = {300,300}, + \textplusminus = { 50, 80}, + \textmultiply = {100,100}, + \textdivide = { 50,150} +% \end{macrocode} +% Remaining slots in the source file. +%\iffalse +% \textbrokenbar = { , }, +% \textyen = { , }, +% \textfractionsolidus = { , }, +% \textordfeminine = { , }, +% \textordmasculine = { , }, +% \textmu = { , }, +% \textparagraph = { , }, +% \textonequarter = { , }, +% \textonehalf = { , }, +% \textthreequarters = { , }, +%\fi +% \begin{macrocode} + } + +% +% \end{macrocode} +% +%\subsubsection{Italics} +% +% To find default settings for italic is difficult, since the character shapes +% and their behaviour at the beginning or end of line may be wildly different +% for different fonts. Therefore, we leave the letters away, and only set up the +% punctuation characters. +%\changes{v1.4b}{2004/11/22}{slanted like italics} +%\changes{v1.6}{2004/12/26}{add italic uppercase Greek letters} +% \begin{macrocode} +\SetProtrusion +% [ name = OT1-it ] +% [ name = bch-it ] +% [ name = blg-it, +% load = blg-default ] +% [ name = cmr-it ] +% [ name = pad-it ] +% [ name = pmnj-it ] +% [ name = ppl-it ] +% [ name = ptm-it ] +% [ name = ugm-it ] +% { encoding = OT1, +% { encoding = {OT1,OT4}, +% family = bch, +% family = blg, +% family = {pad,padx,padj}, +% family = {ppl,pplx,pplj}, +% family = {ptm,ptmx,ptmj}, +% family = ugm, +% shape = {it,sl} } +% shape = it } +% { } + { +% A = {100,50}, +% A = {50, }, +% A = { ,150}, +% A = {50,50}, +% \AE = {100, }, +% \AE = {50, }, +% B = {50, }, +% B = {20,-50}, +% C = {50, }, +% C = {100, }, +% C = {50,-50}, +% D = {50,50}, +% D = {20, }, +% E = {50, }, +% E = {20,-50}, +% F = {100, }, +% F = {10, }, +% F = {50, }, +% G = {50, }, +% G = {100, }, +% G = {50,-50}, +% H = {50, }, +% I = {50, }, +% I = {20,-50}, +% J = {100, }, +% J = {50, }, +% J = {20, }, +% K = {50, }, +% K = {20, }, +% L = {50, }, +% L = {20,50}, +% L = { ,100}, +% M = {50, }, +% M = { ,-30}, +% N = {50, }, +% N = { ,-30}, +% O = {50, }, +% O = {100, }, +% O = {70,50}, +% \OE = {50, }, +% \OE = {100, }, +% P = {50, }, +% P = {20,-50}, +% Q = {50, }, +% Q = {100, }, +% Q = {70,50}, +% R = {50, }, +% R = {20, }, +% S = {50, }, +% S = {20,-30}, +% $ = {50, }, +% $ = {20,-30}, +% T = {70, }, +% T = {100, }, +% U = {50, }, +% U = {50,-50}, +% V = {100, }, +% V = {100,50}, +% W = {100, }, +% W = {50, }, +% W = {100,50}, +% X = {50, }, +% Y = {100, }, +% Y = {50, }, +% Y = {100,50}, +% Z = { ,-50}, +% d = { ,-50}, +% f = { ,-100}, +% i = { ,-30}, +% j = { ,-30}, +% l = { ,-100}, +% o = {50,50}, +% p = { ,50}, +% p = {-50, }, +% q = {50, }, +% r = { ,50}, +% t = { ,50}, +% v = {50, }, +% w = { ,50}, +% w = {50, }, +% y = { ,50}, +% 0 = {100, }, +% 1 = {150,100}, +% 1 = {200,50}, +% 1 = {150, }, +% 1 = {50, }, +% 1 = {100, }, +% 1 = {150,150}, +% 2 = {100,-100}, +% 2 = {50, }, +% 2 = {-50, }, +% 3 = {50, }, +% 3 = {100,-100}, +% 3 = {-100, }, +% 3 = {100,50}, +% 4 = {100, }, +% 4 = {150, }, +% 4 = {50, }, +% 5 = {100, }, +% 5 = {50, }, +% 6 = {50, }, +% 6 = {100, }, +% 7 = {100, }, +% 7 = {200,-150}, +% 7 = {20, }, +% 7 = {50, }, +% 8 = {50,-50}, +% 9 = {100,-100}, +% . = { ,500}, +% . = {400,600}, +% . = { ,700}, +% {,}= {300,500}, +% {,}= { ,500}, +% {,}= { ,600}, +% {,}= { ,700}, +% : = { ,300}, +% : = { ,400}, +% : = { ,200}, +% : = { ,500}, +% ; = { ,300}, +% ; = { ,400}, +% ; = { ,200}, +% ; = { ,500}, +% ! = { ,100}, +% ? = { ,200}, +% ? = { ,100}, +% ? = { ,300}, +% " = {400,200}, +% & = {50,50}, +% & = { ,80}, +% & = {100,50}, +% & = {50,100}, +% \% = {100, }, +% \% = {50,50}, +% \% = {100,100}, +% \% = {100,50}, +% * = {200,200}, +% * = {300,200}, +% * = {400,100}, +% * = {500,100}, +% * = {400,200}, +% + = {150,200}, +% + = {250,250}, +% + = {250,200}, +% @ = {50,50}, +% @ = {80,50}, +% @ = {200,50}, +% @ = {150,150}, +% ~ = {150,150}, +% ~ = {200,150}, +% {=}= {200,200}, +% ( = {200, }, ) = { ,200}, +% / = {100,200}, +% / = { ,150}, +% / = {100,150}, +% - = {300,300}, +% - = {300,400}, +% - = {200,300}, +% - = {500,300}, +% - = {300,500}, +% - = {500,500}, +% - = {400,700}, +% _ = {0,300}, +% \textendash = {200,200}, \textemdash = {150,150}, +% \textendash = {200,300}, \textemdash = {150,200}, +% \textendash = {500,300}, \textemdash = {400,200}, +% \textendash = {300,300}, \textemdash = {200,200}, +% \textquoteleft = {400,200}, \textquoteright = {400,200}, +% \textquoteleft = {400,400}, \textquoteright = {400,400}, +% \textquoteleft = {800,200}, \textquoteright = {800,200}, +% \textquoteleft = {700,400}, \textquoteright = {700,400}, +% \textquoteleft = {800,500}, \textquoteright = {800,500}, +% \textquotedblleft = {400,200}, \textquotedblright = {400,200} +% \textquotedblright = {300,300} +% \textquotedblleft = {700,100}, \textquotedblright = {500,300} +% \textquotedblleft = {700,200}, \textquotedblright = {700,200} +% \textquotedblleft = {500,300}, \textquotedblright = {500,300} +% \textquotedblleft = {700,400}, \textquotedblright = {700,400} +% \textquotedblleft = {600,200}, \textquotedblright = {600,200} + } + +%<*cmr|pmn> +\SetProtrusion +% [ name = cmr-it-OT1, +% [ name = pmnj-it-OT1, +% load = cmr-it ] +% load = pmnj-it ] +% { encoding = {OT1,OT4}, +% { encoding = OT1, +% family = cmr, +% family = pmnj, +% shape = it } +% shape = {it,sl} } + { +% \AE = {100, }, +% \AE = { ,-50}, +% \OE = {100, }, +% \OE = {50, } +%<*cmr> + "00 = {200,150}, % \Gamma + "01 = {150,100}, % \Delta + "02 = {150, 50}, % \Theta + "03 = {150, 50}, % \Lambda + "04 = {100,100}, % \Xi + "05 = {100,100}, % \Pi + "06 = {100, 50}, % \Sigma + "07 = {200,150}, % \Upsilon + "08 = {150, 50}, % \Phi + "09 = {150,100}, % \Psi + "0A = { 50, 50} % \Omega +% + } + +% +\SetProtrusion +% [ name = T1-it-default, +% [ name = bch-it-T1, +% [ name = blg-it-T1, +% [ name = cmr-it-T1, +% [ name = pad-it-T1, +% [ name = pmnj-it-T1, +% [ name = ppl-it-T1, +% [ name = ptm-it-T1, +% [ name = ugm-it-T1, +% load = OT1-it ] +% load = bch-it ] +% load = blg-T1 ] +% load = cmr-it ] +% load = pmnj-it ] +% load = pad-it ] +% load = ppl-it ] +% load = ptm-it ] +% load = ugm-it ] +% { encoding = {T1,LY1}, +% { encoding = T1, +% family = bch, +% family = blg, +% family = cmr, +% family = pmnj, +% family = {pad,padx,padj}, +% family = {ppl,pplx,pplj}, +% family = {ptm,ptmx,ptmj}, +% family = ugm, +% shape = {it,sl} } +% shape = it } + { +% _ = { ,100}, +% _ = {0,300}, +% _ = {100,200}, +% _ = {100,100}, +% . = {400,600}, +% {,}= {300,500}, +% \AE = {100, }, +% \AE = { ,-50}, +% \OE = { 50, }, +% \OE = {100, }, +% 031 = { ,-100}, % ffl +% 156 = {100, }, % IJ +% 156 = {50, }, % IJ +% 156 = {20, }, % IJ +% 188 = { ,-30}, % ij +% \v t = { ,100}, +% \textbackslash = {100,200}, +% \textbackslash = {300,300}, +% \textbackslash = {150,150}, +% \textbackslash = {100,150}, +% \textbar = {200,200}, +% \textquotedblleft = {500,300}, +% \textquoteleft = {400,400}, \textquoteright = {400,400}, +% \textquotedbl = {300,300}, \textquotedblleft = {300,300}, +% \textquotedblright = {300,300}, \quotedblbase = {200,600}, +% \quotesinglbase = {300,700}, \quotedblbase = {400,500}, +% \quotesinglbase = {300,700}, \quotedblbase = {200,600}, +% \quotesinglbase = {200,500}, \quotedblbase = {150,500}, +% \quotesinglbase = {500,500}, \quotedblbase = {400,400}, +% \quotesinglbase = {300,700}, \quotedblbase = {300,500}, +% \guilsinglleft = {400,400}, \guilsinglright = {300,500}, +% \guilsinglleft = {300,400}, \guilsinglright = {200,500}, +% \guilsinglleft = {500,300}, \guilsinglright = {400,400}, +% \guilsinglleft = {500,400}, \guilsinglright = {300,500}, +% \guilsinglleft = {400,400}, \guilsinglright = {300,600}, +% \guillemotleft = {300,300}, \guillemotright = {300,300}, +% \guillemotleft = {200,300}, \guillemotright = {150,400}, +% \guillemotleft = {400,100}, \guillemotright = {200,300}, +% \guillemotleft = {300,300}, \guillemotright = {200,400}, +% \guillemotleft = {300,400}, \guillemotright = {200,400}, +% \guillemotleft = {300,400}, \guillemotright = {300,400}, +% \textexclamdown = {100, }, \textquestiondown = {200, }, +% \textexclamdown = {200, }, \textquestiondown = {200, }, +% \textexclamdown = {-50, }, \textquestiondown = {-50, }, +% \textbraceleft = {200,100}, \textbraceright = {200,200}, +% \textbraceleft = {200, }, \textbraceright = { ,200}, +% \textbraceleft = {400,100}, \textbraceright = {200,200}, +% \textless = {100, }, \textgreater = { ,100}, +% \textless = {300,100}, \textgreater = {200,100} +% \textvisiblespace = {100,100} + } + +%<*m-t|cmr|pmn> +\SetProtrusion +% [ name = T2A-it-default, +% [ name = cmr-it-T2A, +% [ name = pmnj-it-T2A, +% load = OT1-it ] +% load = cmr-it ] +% load = pmnj-it ] + { encoding = T2A, +% family = cmr, +% family = pmnj, +% shape = {it,sl} } +% shape = it } + { +% \CYRA = {100,50}, +% \CYRA = {50, }, +% \CYRB = {50, }, +% \CYRV = {50, }, +% \CYRV = {20,-50}, +% \CYRG = {100, }, +% \CYRG = {10, }, +% \CYRD = {50, }, +% \CYRE = {50, }, +% \CYRE = {20,-50}, +% \CYRZH = {50, }, +% \CYRZ = {50, }, +% \CYRZ = {20,-50}, +% \CYRI = {50, }, +% \CYRI = { ,-30}, +% \CYRISHRT = {50, }, +% \CYRK = {50, }, +% \CYRK = {20, }, +% \CYRL = {50, }, +% \CYRM = {50, }, +% \CYRM = { ,-30}, +% \CYRN = {50, }, +% \CYRO = {100, }, +% \CYRO = {50, }, +% \CYRP = {50, }, +% \CYRR = {50, }, +% \CYRR = {20,-50}, +% \CYRS = {100, }, +% \CYRS = {50, }, +% \CYRT = {100, }, +% \CYRT = {70, }, +% \CYRU = {100, }, +% \CYRU = {50, }, +% \CYRF = {100, }, +% \CYRH = {50, }, +% \CYRC = {50, }, +% \CYRCH = {100, }, +% \CYRSH = {50, }, +% \CYRSHCH = {50, }, +% \CYRHRDSN = {100, }, +% \CYRERY = {50, }, +% \CYRSFTSN = {50, }, +% \CYREREV = {50, }, +% \CYRYU = {50, }, +% \CYRYA = {50, }, +% \CYRYA = { ,20}, +% \cyrr = {-50, }, +% _ = { ,100}, +% _ = {100,200}, +% 031 = { ,-100}, % ffl +% \v t = { ,100}, +% \textbackslash = {100,200}, \quotedblbase = {400,500}, +% \textbackslash = {300,300}, \quotedblbase = {200,600}, +% \textbackslash = {100,150}, \quotedblbase = {150,500}, +% \guillemotleft = {300,300}, \guillemotright = {300,300}, +% \guillemotleft = {400,100}, \guillemotright = {200,300}, +% \guillemotleft = {200,300}, \guillemotright = {150,400}, +% \textbraceleft = {200,100}, \textbraceright = {200,200}, +% \textbraceleft = {400,100}, \textbraceright = {200,200}, +% \textbraceleft = {200, }, \textbraceright = { ,200}, +% \textquotedblleft = {500,300}, +% \textless = {300,100}, \textgreater = {200,100} +% \textless = {100, }, \textgreater = { ,100} + } + +% +%<*m-t|ptm> +\SetProtrusion +% [ name = QX-it-default, +% [ name = ptm-it-QX, +% load = OT1-it ] +% load = ptm-it ] + { encoding = {QX}, +% family = {ptm,ptmx,ptmj}, + shape = {it,sl} } + { +% 009 = { , 50}, % fk + {=} = {100,100}, +% \textunderscore = {100,100}, +% \textunderscore = {100,150}, + \textbackslash = {100,200}, + \quotedblbase = {300,400}, +% \guillemotleft = {300,300}, \guillemotright = {300,300}, +% \guillemotleft = {200,400}, \guillemotright = {200,400}, + \textexclamdown = {200, }, \textquestiondown = {200, }, + \textbraceleft = {200,100}, \textbraceright = {200,200}, + \textless = {100,100}, \textgreater = {100,100}, + \textminus = {200,200}, \textdegree = {300,150}, +% \copyright = {100,100}, \textregistered = {100,100} +% \textregistered = {100,150}, \copyright = {100,150}, +% \textDelta = { 70, }, \textdelta = { , 50}, +% \textpi = { 50, 80}, \textmu = { , 80}, +% \texteuro = {200, }, \textellipsis = {100,200}, +% \textquoteleft = {500,400}, \textquoteright = {500,400}, +% \textquotedblleft = {500,300}, \textquotedblright = {400,400}, +% \textapprox = { 50, 50}, \textinfty = {100,100}, +% \textdagger = {150,150}, \textdaggerdbl = {100,100}, +% \textdiv = {150,150}, \textasciitilde = { 80, 80}, +% \texttimes = {100,150}, \textpm = { 50, 80}, +% \textbullet = {300,100}, \textperiodcentered = {300,300}, +% \textquotesingle = {500,500}, \textquotedbl = {300,300}, +% \textperthousand = { ,50} + } + +% +%<*cmr|bch> +\SetProtrusion +% [ name = cmr-it-T5, +% load = cmr-it ] +% [ name = bch-it-T5, +% load = bch-it ] + { encoding = T5, +% family = bch, +% family = cmr, + shape = it } + { +% _ = { ,100}, +% _ = {100,200}, +% \textbackslash = {150,150}, +% \textbackslash = {300,300}, +% \quotesinglbase = {200,500}, \quotedblbase = {150,500}, +% \quotesinglbase = {300,700}, \quotedblbase = {200,600}, +% \guilsinglleft = {300,400}, \guilsinglright = {200,500}, +% \guilsinglleft = {500,300}, \guilsinglright = {400,400}, +% \guillemotleft = {200,300}, \guillemotright = {150,400}, +% \guillemotleft = {400,100}, \guillemotright = {200,300}, +% \textbraceleft = {200, }, \textbraceright = { ,200}, +% \textbraceleft = {400,100}, \textbraceright = {200,200}, +% \textless = {100, }, \textgreater = { ,100} +% \textless = {300,100}, \textgreater = {200,100} + } + +% +% \end{macrocode} +%\changes{v1.8}{2005/06/01}{verified settings for slanted Computer Modern Roman} +% Slanted is very similar to italic. +% \begin{macrocode} +%<*cmr> +\SetProtrusion + [ name = cmr-sl, + load = cmr-it-OT1 ] + { encoding = {OT1,OT4}, + family = cmr, + shape = sl } + { + L = { ,50}, + f = { ,-50}, + - = {300, }, + \textendash = {400, }, \textemdash = {300, } + } + +\SetProtrusion + [ name = cmr-sl-T1, + load = cmr-it-T1 ] + { encoding = {T1,LY1}, + family = cmr, + shape = sl } + { + L = { ,50}, + f = { ,-50}, + - = {300, }, + \textendash = {400, }, \textemdash = {300, } + } + +\SetProtrusion + [ name = cmr-sl-T2A, + load = cmr-it-T2A ] + { encoding = T2A, + family = cmr, + shape = sl } + { + L = { ,50}, + f = { ,-50}, + - = {300, }, + \textendash = {400, }, \textemdash = {300, } + } + +\SetProtrusion + [ name = cmr-sl-T5, + load = cmr-it-T5 ] + { encoding = T5, + family = cmr, + shape = sl } + { + L = { ,50}, + f = { ,-50}, + - = {300, }, + \textendash = {400, }, \textemdash = {300, } + } + +\SetProtrusion + [ name = lmr-it-T1, + load = cmr-it-T1 ] + { encoding = {T1,LY1}, + family = lmr, + shape = {it,sl} } + { + \textquotedblleft = { ,200}, \textquotedblright = { ,200}, + \quotesinglbase = { ,400}, \quotedblbase = { ,500} + } + +% \end{macrocode} +% Oldstyle numerals are slightly different. +% \begin{macrocode} +\SetProtrusion + [ name = cmr(oldstyle)-it, + load = cmr-it-T1 ] + { encoding = T1, + family = {hfor,cmor}, + shape = {it,sl} } + { + 1 = {250, 50}, + 2 = {150,-100}, + 3 = {100,-50}, + 4 = {150,150}, + 6 = {200, }, + 7 = {200, 50}, + 8 = {150,-50}, + 9 = {100, 50} + } + +% +%<*pmn> +\SetProtrusion + [ name = pmnx-it, + load = pmnj-it ] + { encoding = OT1, + family = pmnx, + shape = {it,sl} } + { + 1 = {100,150} + } + +\SetProtrusion + [ name = pmnx-it-T1, + load = pmnj-it-T1 ] + { encoding = {T1,LY1}, + family = pmnx, + shape = {it,sl} } + { + 1 = {100,150} + } + +\SetProtrusion + [ name = pmnx-it-T2A, + load = pmnj-it-T2A ] + { encoding = {T2A}, + family = pmnx, + shape = {it,sl} } + { + 1 = {100,150} + } + +% +%<*ptm> +\SetProtrusion + [ name = ptm-it-LY1, + load = ptm-it-T1 ] + { encoding = {LY1}, + family = {ptm,ptmx,ptmj}, + shape = {it,sl} } + { + _ = {100,100}, + \texttrademark = {100,100}, + \textregistered = {100,100}, + \textcopyright = {100,100}, + \textdegree = {300,100}, + \textminus = {200,200}, + \textellipsis = {100,200}, +% \texteuro = { , }, % ? + \textcent = {100,100}, + \textquotesingle = {500, }, + \textflorin = {100, 70}, + \textdagger = {150,150}, + \textdaggerdbl = {100,100}, + \textbullet = {150,150}, + \textonesuperior = {150,100}, + \texttwosuperior = {150, 50}, + \textthreesuperior = {150, 50}, + \textparagraph = {100, }, + \textperiodcentered = {500,300}, + \textonequarter = { 50, }, + \textonehalf = { 50, }, + \textplusminus = {100,100}, + \textmultiply = {150,150}, + \textdivide = {150,150} + } + +% +% \end{macrocode} +% +%\subsubsection{Small caps} +% +% Small caps should inherit the values from their big brothers. Since values are +% relative to character width, we don't need to adjust them any further (but +% we have to reset some characters). +% \begin{macrocode} +%<*!(blg|ugm)> +\SetProtrusion +% [ name = OT1-sc, +% [ name = bch-sc, +% [ name = cmr-sc-OT1, +% [ name = pad-sc, +% [ name = pmnj-sc, +% [ name = ppl-sc, +% [ name = ptm-sc, +% load = default ] +% load = bch-default ] +% load = cmr-OT1 ] +% load = pad-default ] +% load = pmnj-default ] +% load = ppl-default ] +% load = ptm-default ] +% { encoding = OT1, +% { encoding = {OT1,OT4}, +% family = bch, +% family = cmr, +% family = {pad,padx,padj}, +% family = pmnj, +% family = {ppl,pplx,pplj}, +% family = {ptm,ptmx,ptmj}, + shape = sc } + { + a = {50,50}, +% \ae = {50, }, +% c = {50, }, +% d = { ,50}, +% f = { ,50}, +% g = {50, }, +% j = {50, }, +% j = {100, }, +% l = { ,50}, +% l = { ,80}, +% 013 = { ,50}, % fl +% 013 = { ,80}, % fl +% o = {50,50}, +% \oe = {50, }, +% p = { 0, 0}, +% q = {50,70}, +% q = { 0, }, +% r = { , 0}, + t = {50,50}, +% y = {50,50} +% y = {80,80} + } + +\SetProtrusion +% [ name = T1-sc, +% [ name = bch-sc-T1, +% [ name = cmr-sc-T1, +% [ name = pad-sc-T1, +% [ name = pmnj-sc-T1, +% [ name = ppl-sc-T1, +% [ name = ptm-sc-T1, +% load = T1-default ] +% load = bch-T1 ] +% load = cmr-T1 ] +% load = pad-T1 ] +% load = pmnj-T1 ] +% load = ppl-T1 ] +% load = ptm-T1 ] + { encoding = {T1,LY1}, +% family = bch, +% family = cmr, +% family = {pad,padx,padj}, +% family = pmnj, +% family = {ppl,pplx,pplj}, +% family = {ptm,ptmx,ptmj}, + shape = sc } + { + a = {50,50}, +% \ae = {50, }, +% c = {50, }, +% d = { ,50}, +% f = { ,50}, +% g = {50, }, +% j = {50, }, +% j = {100, }, +% l = { ,50}, +% l = { ,80}, +% 029 = { ,50}, % fl +% 029 = { ,80}, % fl +% o = {50,50}, +% \oe = {50, }, +% p = { 0, 0}, +% q = {50,70}, +% q = { 0, }, +% r = { , 0}, + t = {50,50}, +% y = {50,50} +% y = {80,80} + } + +% +%<*m-t|cmr> +\SetProtrusion +% [ name = T2A-sc, +% [ name = cmr-sc-T2A, +% load = T2A-default ] +% load = cmr-T2A ] + { encoding = T2A, +% family = cmr, + shape = sc } + { + \cyra = {50,50}, + \cyrg = { ,50}, + \cyrt = {50,50}, + \cyry = { ,50} + } + +% +%<*m-t> +\SetProtrusion + [ name = QX-sc, + load = QX-default ] + { encoding = QX, + shape = sc } + { + a = {50,50}, + f = { ,50}, + j = {50, }, + l = { ,50}, + 013 = { ,50}, % fl + r = { , 0}, + t = {50,50}, + y = {50,50} + } + +% +%<*cmr|bch> +\SetProtrusion +% [ name = bch-sc-T5, +% load = bch-T5 ] +% [ name = cmr-sc-T5, +% load = cmr-T5 ] + { encoding = T5, +% family = bch, +% family = cmr, + shape = sc } + { + a = {50,50}, +% c = {50, }, +% d = { ,50}, + f = { ,50}, +% g = {50, }, +% j = {100, }, +% j = {50, }, + l = { ,50}, +% o = {50,50}, +% q = { 0, }, +% r = { , 0}, + t = {50,50}, + y = {50,50} + } + +% +%<*pmn> +\SetProtrusion + [ name = pmnx-sc, + load = pmnj-sc ] + { encoding = OT1, + family = pmnx, + shape = sc } + { + 1 = {230,180} + } + +\SetProtrusion + [ name = pmnx-sc-T1, + load = pmnj-sc-T1 ] + { encoding = {T1,LY1}, + family = pmnx, + shape = sc } + { + 1 = {230,180} + } + +% \end{macrocode} +% +%\subsubsection{Italic small caps} +% Minion provides real small caps in italics. +% The \pkg{slantsc} package calls them |scit|, Philipp Lehman's +% \pkg{fontinstallationguide} suggests |si|. +% \begin{macrocode} +\SetProtrusion + [ name = pmnj-scit, + load = pmnj-it ] + { encoding = OT1, + family = pmnj, + shape = {scit,si} } + { + a = {50, }, + \ae = { ,-50}, + b = {20,-50}, + c = {50,-50}, + d = {20, 0}, + e = {20,-50}, + f = {10, 0}, + 012 = {10,-50}, % fi + 013 = {10,-50}, % fl + 014 = {10,-50}, % ffi + 015 = {10,-50}, % ffl + g = {50,-50}, + i = {20,-50}, + j = {20, 0}, + k = {20, }, + l = {20,50}, + m = { ,-30}, + n = { ,-30}, + o = {50, }, + \oe = {50,-50}, + p = {20,-50}, + q = {50, }, + r = {20, 0}, + s = {20,-30}, + t = {70, }, + u = {50,-50}, + v = {100, }, + w = {100, }, + y = {50, }, + z = { ,-50} + } + +\SetProtrusion + [ name = pmnj-scit-T1, + load = pmnj-it-T1 ] + { encoding = {T1,LY1}, + family = pmnj, + shape = {scit,si} } + { + a = {50, }, + \ae = { ,-50}, + b = {20,-50}, + c = {50,-50}, + d = {20, 0}, + e = {20,-50}, + f = {10, 0}, + 028 = {10,-50}, % fi + 029 = {10,-50}, % fl + 030 = {10,-50}, % ffi + 031 = {10,-50}, % ffl + g = {50,-50}, + i = {20,-50}, + 188 = {20, 0}, % ij + j = {20, 0}, + k = {20, }, + l = {20,50}, + m = { ,-30}, + n = { ,-30}, + o = {50, }, + \oe = {50,-50}, + p = {20,-50}, + q = {50, }, + r = {20, 0}, + s = {20,-30}, + t = {70, }, + u = {50,-50}, + v = {100, }, + w = {100, }, + y = {50, }, + z = { ,-50} + } + +\SetProtrusion + [ name = pmnx-scit, + load = pmnj-scit ] + { encoding = OT1, + family = pmnx, + shape = {scit,si} } + { + 1 = {100,150} + } + +\SetProtrusion + [ name = pmnx-scit-T1, + load = pmnj-scit-T1 ] + { encoding = {T1,LY1}, + family = pmnx, + shape = {scit,si} } + { + 1 = {100,150} + } + +% +% \end{macrocode} +% +%\subsubsection{Text companion} +% +% Finally the encoding. +% Still quite incomplete for Times and especially Palatino. Anybody? +%\changes{v1.2}{2004/09/28}{add settings for Computer Modern Roman and +% Adobe Garamond in encoding} +% \begin{macrocode} +\SetProtrusion +% [ name = textcomp ] +% [ name = bch-textcomp ] +% [ name = blg-textcomp ] +% [ name = cmr-textcomp ] +% [ name = pad-textcomp ] +% [ name = pmn-textcomp ] +% [ name = ppl-textcomp ] +% [ name = ptm-textcomp ] +% [ name = ugm-textcomp ] +% { encoding = TS1 } +% { encoding = TS1, +% family = bch } +% family = blg } +% family = cmr } +% family = {pad,padx,padj} } +% family = {pmnx,pmnj} } +% family = {ppl,pplx,pplj} } +% family = {ptm,ptmx,ptmj} } +% family = ugm } + { +% \textquotestraightbase = {400,500}, +% \textquotestraightbase = {300,300}, +% \textquotestraightbase = {400,400}, +% \textquotestraightdblbase = {300,400}, +% \textquotestraightdblbase = {300,300}, +% \textquotestraightdblbase = {400,400}, +% \texttwelveudash = {200,200}, +% \textthreequartersemdash = {150,150}, +% \textthreequartersemdash = {200,200}, +% \textquotesingle = {500,600}, +% \textquotesingle = {300,400}, +% \textquotesingle = {400,500}, +% \textquotesingle = {500,500}, +% \textquotesingle = {300,500}, +% \textasteriskcentered = {200,300}, +% \textasteriskcentered = {150,200}, +% \textasteriskcentered = {300,300}, +% \textasteriskcentered = {100,200}, +% \textfractionsolidus = {-200,-200}, +% \textoneoldstyle = {100,100}, +% \textoneoldstyle = { , 50}, +% \textthreeoldstyle = { , 50}, +% \textthreeoldstyle = { 50, }, +% \textfouroldstyle = { 50, 50}, +% \textfouroldstyle = { 50, }, +% \textsevenoldstyle = { 50, 80}, +% \textlangle = {400, }, +% \textrangle = { ,400}, +% \textminus = {200,200}, +% \textminus = {300,300}, +% \textminus = {250,300}, +% \textlbrackdbl = {100, }, +% \textlbrackdbl = {200, }, +% \textrbrackdbl = { ,100}, +% \textrbrackdbl = { ,200}, +% \textasciigrave = {200,500}, +% \texttildelow = {200,250}, +% \textasciibreve = {300,400}, +% \textasciicaron = {300,400}, +% \textacutedbl = {200,300}, +% \textgravedbl = {150,300}, +% \textdagger = { 80, 80}, +% \textdagger = {200,200}, +% \textdagger = {100,100}, +% \textdagger = {150,150}, +% \textdaggerdbl = {150,150}, +% \textdaggerdbl = { 80, 80}, +% \textdaggerdbl = {100,100}, +% \textbardbl = {100,100}, +% \textbardbl = {150,150}, +% \textbullet = {200,200}, +% \textbullet = {400,500}, +% \textbullet = { ,100}, +% \textbullet = {150,150}, +% \textbullet = { 50,100}, +% \textcelsius = { 50, }, +% \textcelsius = { 80, }, +% \textflorin = { 50, 50}, +% \textflorin = {100,100}, +% \textflorin = { ,100}, +% \textflorin = { 50,100}, +% \textflorin = { 50, 70}, +% \textcolonmonetary = { , 50}, +% \textcolonmonetary = { 50, }, +% \textinterrobang = { ,100}, +% \textinterrobangdown = {100, }, +% \texttrademark = {100,100}, +% \texttrademark = {150,150}, +% \texttrademark = {200,200}, +% \texttrademark = { 50, 50}, +% \texttrademark = {100,150}, +% \textcent = { 50, }, +% \textcent = {100,100}, +% \textsterling = { 50, }, +% \textsterling = { , 50}, +% \textbrokenbar = {200,200}, +% \textbrokenbar = {250,250}, +% \textbrokenbar = {200,300}, +% \textasciidieresis = {300,400}, +% \textcopyright = {100,100}, +% \textcopyright = {100,150}, +% \textcopyright = {200,200}, +% \textordfeminine = {100,200}, +% \textordfeminine = {200,200}, +% \textlnot = {200, }, +% \textlnot = {200,100}, +% \textregistered = {100,100}, +% \textregistered = { 50,150}, +% \textregistered = {200,200}, +% \textasciimacron = {150,200}, +% \textdegree = {300,300}, +% \textdegree = {150,200}, +% \textdegree = {200,200}, +% \textdegree = {400,400}, +% \textdegree = {150,400}, +% \textpm = {150,200}, +% \textpm = {100,100}, +% \textpm = { 50, 80}, +% \texttwosuperior = {100,200}, +% \texttwosuperior = { 50,100}, +% \texttwosuperior = {200,200}, +% \texttwosuperior = { 50, 50}, +% \textthreesuperior = {100,200}, +% \textthreesuperior = { 50,100}, +% \textthreesuperior = {200,200}, +% \textthreesuperior = { 50, 50}, +% \textasciiacute = {300,400}, +% \textmu = { ,100}, +% \textparagraph = { ,100}, +% \textperiodcentered = {300,400}, +% \textperiodcentered = {400,500}, +% \textperiodcentered = {300,300}, +% \textperiodcentered = {200,500}, +% \textonesuperior = {200,300}, +% \textonesuperior = {200,200}, +% \textonesuperior = {100,100}, +% \textordmasculine = {200,200}, +% \textordmasculine = {100,200}, +% \texteuro = {100, }, +% \texteuro = { 50,100}, +% \texttimes = {200,200}, +% \texttimes = {100,100}, +% \texttimes = {150,250}, +% \texttimes = {100,150}, +% \texttimes = { 70,100}, +% \texttimes = {200,300}, +% \textdiv = {150,200} +% \textdiv = {100,100} +% \textdiv = {150,250} +% \textdiv = { 50,100}, +% \textdiv = {200,300}, +% \textperthousand = { ,50} +% \textsection = { ,100}, +% \textonehalf = { 50,100}, +% \textonequarter = { 50,100}, +% \textthreequarters = { 50,100}, +% \textsurd = { ,100} +% \end{macrocode} +% Remaining slots in the source file. +%\iffalse +% \textyen = { , }, +% \texttwooldstyle = { , }, +% \textfiveoldstyle = { , }, +% \textsixoldstyle = { , }, +% \texteightoldstyle = { , }, +% \textnineoldstyle = { , }, +% \textleftarrow = { , }, +% \textrightarrow = { , }, +% \textblank = { , }, +% \textdollar = { , }, +% \textdblhyphen = { , }, +% \textdblhyphenchar = { , }, +% \textohm = { , }, +% \textmho = { , }, +% \textbigcircle = { , }, +% \textuparrow = { , }, +% \textdownarrow = { , }, +% \textborn = { , }, +% \textdied = { , }, +% \textmarried = { , }, +% \textdivorced = { , }, +% \textleaf = { , }, +% \textmusicalnote = { , }, +% \textdollaroldstyle = { , }, +% \textcentoldstyle = { , }, +% \textwon = { , }, +% \textnaira = { , }, +% \textguarani = { , }, +% \textpeso = { , }, +% \textlira = { , }, +% \textrecipe = { , }, +% \textdong = { , }, +% \textpertenthousand = { , }, +% \textpilcrow = { , }, +% \textbaht = { , }, +% \textnumero = { , }, +% \textdiscount = { , }, +% \textestimated = { , }, +% \textopenbullet = { , }, +% \textservicemark = { , }, +% \textlquill = { , }, +% \textrquill = { , }, +% \textcopyleft = { , }, +% \textcircledP = { , }, +% \textreferencemark = { , }, +%\fi +% \begin{macrocode} + } + +%<*cmr|pad|pmn|ugm> +\SetProtrusion +% [ name = cmr-textcomp-it ] +% [ name = pad-textcomp-it ] +% [ name = pmn-textcomp-it ] +% [ name = ugm-textcomp-it ] + { encoding = TS1, +% family = cmr, +% family = {pad,padx,padj}, +% family = {pmnx,pmnj}, +% family = ugm, +% shape = {it,sl} } +% shape = it } + { +% \textquotestraightbase = {300,600}, +% \textquotestraightbase = {400,400}, +% \textquotestraightdblbase = {300,600}, +% \textquotestraightdblbase = {300,400}, +% \textquotestraightdblbase = {300,300}, + \texttwelveudash = {200,200}, +% \textthreequartersemdash = {150,150}, +% \textthreequartersemdash = {200,200}, +% \textquotesingle = {600,300}, +% \textquotesingle = {800,100}, +% \textquotesingle = {300,200}, +% \textquotesingle = {500,500}, +% \textasteriskcentered = {300,200}, +% \textasteriskcentered = {500,100}, +% \textasteriskcentered = {200,300}, +% \textasteriskcentered = {300,150}, +% \textfractionsolidus = {-200,-200}, +% \textoneoldstyle = {100, 50}, +% \textoneoldstyle = {100, }, +% \textoneoldstyle = { 50, }, +% \texttwooldstyle = { 50, }, +% \texttwooldstyle = {-50, }, +% \textthreeoldstyle = {100, 50}, +% \textthreeoldstyle = {-100, }, +% \textfouroldstyle = { 50, 50}, +% \textfouroldstyle = { 50,100}, +% \textsevenoldstyle = { 50, 80}, +% \textsevenoldstyle = { 50, }, +% \textsevenoldstyle = { 20, }, +% \textlangle = {400, }, +% \textrangle = { ,400}, +% \textminus = {300,300}, +% \textminus = {200,200}, +% \textminus = {250,300}, +% \textlbrackdbl = {100, }, +% \textrbrackdbl = { ,100}, +% \textasciigrave = {300,300}, +% \texttildelow = {200,250}, +% \textasciibreve = {300,300}, +% \textasciicaron = {300,300}, +% \textacutedbl = {200,300}, +% \textgravedbl = {150,300}, +% \textdagger = {100,100}, +% \textdagger = {200,100}, +% \textdagger = { 80, 50}, +% \textdagger = { 80, 80}, +% \textdaggerdbl = { 80, 80}, +% \textdaggerdbl = { 80, 50}, +% \textbardbl = {150,150}, +% \textbullet = {200,100}, +% \textbullet = {300, }, +% \textbullet = { 30, 70}, +% \textbullet = { 50,100}, +% \textcelsius = {100, }, +% \textcelsius = {200, }, +% \textcelsius = { 50,-50}, +% \textflorin = {100, }, +% \textflorin = { 50,100}, +% \textflorin = { ,100}, +% \textcolonmonetary = {150, }, +% \textcolonmonetary = {100, }, +% \textcolonmonetary = { 50,-50}, +% \texttrademark = {200, }, +% \texttrademark = { 50,100}, +% \texttrademark = {150, 50}, +% \textcent = { 50, }, +% \textsterling = { , 50}, +% \textbrokenbar = {200,300}, +% \textasciidieresis = {300,200}, +% \textcopyright = {100, }, +% \textcopyright = {200,100}, +% \textcopyright = {100,150}, +% \textcopyright = {300, }, +% \textordfeminine = {100,100}, +% \textordfeminine = {200,200}, +% \textordfeminine = {100,200}, +% \textlnot = {300, }, +% \textlnot = {200, }, +% \textregistered = {100, }, +% \textregistered = {200,100}, +% \textregistered = { 50,150}, +% \textregistered = {300, }, +% \textasciimacron = {150,200}, +% \textdegree = {500,100}, +% \textdegree = {150,150}, +% \textdegree = {300,200}, +% \textpm = {150,100}, +% \textpm = {200,150}, +% \textpm = {150,200}, +% \textonesuperior = {400, }, +% \textonesuperior = {300,100}, +% \textonesuperior = {200,100}, +% \textonesuperior = {300,300}, +% \texttwosuperior = {400, }, +% \texttwosuperior = {300, }, +% \texttwosuperior = {200,100}, +% \texttwosuperior = {300,200}, +% \textthreesuperior = {400, }, +% \textthreesuperior = {300, }, +% \textthreesuperior = {200,100}, +% \textthreesuperior = {300,200}, +% \textmu = { ,100}, +% \textasciiacute = {300,200}, +% \textparagraph = {200, }, +% \textparagraph = { ,100}, +% \textperiodcentered = {500,500}, +% \textperiodcentered = {300,400}, +% \textordmasculine = {100,100}, +% \textordmasculine = {200,200}, +% \textordmasculine = {300,200}, +% \texteuro = {200, }, +% \texteuro = {100, }, +% \texteuro = {100,-50}, +% \texttimes = {200,200}, +% \texttimes = {200,100}, +% \texttimes = { 70,100}, +% \texttimes = {200,300}, +% \textdiv = {200,200} +% \textdiv = {150,200} +% \textdiv = {200,300}, +% \textsection = { ,200}, +% \textonehalf = { 50,100}, +% \textonequarter = { 50,100}, +% \textthreequarters = { 50,100}, +% \textsurd = { ,100} + } + +% +% \end{macrocode} +% +%\subsubsection{Computer Modern math} +% +% Now to the math symbols for Computer Modern Roman. Definitions have been +% extracted from \file{fontmath.ltx}. +%\changes{v1.2}{2004/10/02}{add settings for Computer Modern Roman math symbols} +% I did not spend too much time fiddling with these settings, so they can surely +% be improved. +% +% The math font `|operators|' (also used for the \cmd\mathrm\ and +% \cmd\mathbf\ alphabets) is |OT1/cmr|, which we've already set up above. +% It's declared as: +%\begin{verbatim} +%\DeclareSymbolFont{operators} {OT1}{cmr}{m} {n} +%\SetSymbolFont{operators}{bold}{OT1}{cmr}{bx}{n} +%\end{verbatim} +% +% \cmd\mathit\ (|OT1/cmr/m/it|) is also already set up. +% +% There are (for the moment) no settings for \cmd\mathsf\ and \cmd\mathtt. +% +% Math font `|letters|' (also used as \cmd\mathnormal) is declared as: +%\begin{verbatim} +%\DeclareSymbolFont{letters} {OML}{cmm}{m}{it} +%\SetSymbolFont{letters} {bold}{OML}{cmm}{b}{it} +%\end{verbatim} +%\changes{v1.6}{2004/12/26}{tune math letters ( encoding)} +% \begin{macrocode} +%<*cmr> +\SetProtrusion + [ name = cmr-math-letters ] + { encoding = OML, + family = cmm, + series = {m,b}, + shape = it } + { + A = {100, 50}, % \mathnormal + B = { 50, }, + C = { 50, }, + D = { 50, 50}, + E = { 50, }, + F = {100, 50}, + G = { 50, 50}, + H = { 50, 50}, + I = { 50, 50}, + J = {150, 50}, + K = { 50,100}, + L = { 50, 50}, + M = { 50, }, + N = { 50, }, + O = { 50, }, + P = { 50, }, + Q = { 50, 50}, + R = { 50, }, + S = { 50, }, + T = { 50,100}, + U = { 50, 50}, + V = {100,100}, + W = { 50,100}, + X = { 50,100}, + Y = {100,100}, + f = {100,100}, + h = { ,100}, + i = { , 50}, + j = { , 50}, + k = { , 50}, + r = { , 50}, + v = { , 50}, + w = { , 50}, + x = { , 50}, + "0B = { 50,100}, % \alpha + "0C = { 50, 50}, % \beta + "0D = {200,150}, % \gamma + "0E = { 50, 50}, % \delta + "0F = { 50, 50}, % \epsilon + "10 = { 50,150}, % \zeta + "12 = { 50, }, % \theta + "13 = { ,100}, % \iota + "14 = { ,100}, % \kappa + "15 = {100, 50}, % \lambda + "16 = { , 50}, % \mu + "17 = { , 50}, % \nu + "18 = { , 50}, % \xi + "19 = { 50,100}, % \pi + "1A = { 50, 50}, % \rho + "1B = { ,150}, % \sigma + "1C = { 50,150}, % \tau + "1D = { 50, 50}, % \upsilon + "1F = { 50,100}, % \chi + "20 = { 50, 50}, % \psi + "21 = { , 50}, % \omega + "22 = { , 50}, % \varepsilon + "23 = { , 50}, % \vartheta + "24 = { , 50}, % \varpi + "25 = {100, }, % \varrho + "26 = {100,100}, % \varsigma + "27 = { 50, 50}, % \varphi + "28 = {100,100}, % \leftharpoonup + "29 = {100,100}, % \leftharpoondown + "2A = {100,100}, % \rightharpoonup + "2B = {100,100}, % \rightharpoondown + "2C = {300,200}, % \lhook + "2D = {200,300}, % \rhook + "2E = { ,100}, % \triangleright + "2F = {100, }, % \triangleleft + "3A = { ,500}, % ., \ldotp + "3B = { ,500}, % , + "3C = {200,100}, % < + "3D = {300,400}, % / + "3E = {100,200}, % > + "3F = {200,200}, % \star + "5B = { ,100}, % \flat + "5E = {200,200}, % \smile + "5F = {200,200}, % \frown + "7C = {100, }, % \jmath + "7D = { ,100} % \wp +% \end{macrocode} +% Remaining slots in the source file. +%\iffalse +% "11 = { , }, % \eta +% "1E = { , }, % \phi +% "40 = { , }, % \partial +% "5C = { , }, % \natural +% "5D = { , }, % \sharp +% "60 = { , }, % \ell +% "7B = { , }, % \imath +%\fi +% \begin{macrocode} + } + +% \end{macrocode} +% Math font `|symbols|' (also used for the \cmd\mathcal\ alphabet) is declared +% as: +%\begin{verbatim} +%\DeclareSymbolFont{symbols} {OMS}{cmsy}{m}{n} +%\SetSymbolFont{symbols} {bold}{OMS}{cmsy}{b}{n} +%\end{verbatim} +% \begin{macrocode} +\SetProtrusion + [ name = cmr-math-symbols ] + { encoding = OMS, + family = cmsy, + series = {m,b}, + shape = n } + { + A = {150, 50}, % \mathcal + C = { ,100}, + D = { , 50}, + F = { 50,150}, + I = { ,100}, + J = {100,150}, + K = { ,100}, + L = {100, }, + M = { 50, 50}, + N = { 50,100}, + P = { , 50}, + Q = { 50, }, + R = { , 50}, + T = { 50,150}, + V = { 50, 50}, + W = { , 50}, + X = {100,100}, + Y = {100, }, + Z = {100,150}, + "00 = {300,300}, % - + "01 = { ,700}, % \cdot, \cdotp + "02 = {150,250}, % \times + "03 = {150,250}, % *, \ast + "04 = {200,300}, % \div + "05 = {150,250}, % \diamond + "06 = {200,200}, % \pm + "07 = {200,200}, % \mp + "08 = {100,100}, % \oplus + "09 = {100,100}, % \ominus + "0A = {100,100}, % \otimes + "0B = {100,100}, % \oslash + "0C = {100,100}, % \odot + "0D = {100,100}, % \bigcirc + "0E = {100,100}, % \circ + "0F = {100,100}, % \bullet + "10 = {100,100}, % \asymp + "11 = {100,100}, % \equiv + "12 = {200,100}, % \subseteq + "13 = {100,200}, % \supseteq + "14 = {200,100}, % \leq + "15 = {100,200}, % \geq + "16 = {200,100}, % \preceq + "17 = {100,200}, % \succeq + "18 = {200,200}, % \sim + "19 = {150,150}, % \approx + "1A = {200,100}, % \subset + "1B = {100,200}, % \supset + "1C = {200,100}, % \ll + "1D = {100,200}, % \gg + "1E = {300,100}, % \prec + "1F = {100,300}, % \succ + "20 = {100,200}, % \leftarrow + "21 = {200,100}, % \rightarrow + "22 = {100,100}, % \uparrow + "23 = {100,100}, % \downarrow + "24 = {100,100}, % \leftrightarrow + "25 = {100,100}, % \nearrow + "26 = {100,100}, % \searrow + "27 = {100,100}, % \simeq + "28 = {100,100}, % \Leftarrow + "29 = {100,100}, % \Rightarrow + "2A = {100,100}, % \Uparrow + "2B = {100,100}, % \Downarrow + "2C = {100,100}, % \Leftrightarrow + "2D = {100,100}, % \nwarrow + "2E = {100,100}, % \swarrow + "2F = { ,100}, % \propto + "30 = { ,400}, % \prime + "31 = {100,100}, % \infty + "32 = {150,100}, % \in + "33 = {100,150}, % \ni + "34 = {100,100}, % \triangle, \bigtriangleup + "35 = {100,100}, % \bigtriangledown + "38 = { ,100}, % \forall + "39 = {100, }, % \exists + "3A = {200, }, % \neg + "3E = {200,200}, % \top + "3F = {200,200}, % \bot, \perp + "5E = {100,200}, % \wedge + "5F = {100,200}, % \vee + "60 = { ,300}, % \vdash + "61 = {300, }, % \dashv + "62 = {100,100}, % \lfloor + "63 = {100,100}, % \rfloor + "64 = {100,100}, % \lceil + "65 = {100,100}, % \rceil + "66 = {150, }, % \lbrace + "67 = { ,150}, % \rbrace + "68 = {400, }, % \langle + "69 = { ,400}, % \rangle + "6C = {100,100}, % \updownarrow + "6D = {100,100}, % \Updownarrow + "6E = {100,300}, % \, \backslash, \setminus + "72 = {100,100}, % \nabla + "79 = {200,200}, % \dagger + "7A = {100,100}, % \ddagger + "7B = {100, }, % \mathparagraph + "7C = {100,100}, % \clubsuit + "7D = {100,100}, % \diamondsuit + "7E = {100,100}, % \heartsuit + "7F = {100,100} % \spadesuit +% \end{macrocode} +% Remaining slots in the source file. +%\iffalse +% "36 = { , }, % \not +% "37 = { , }, % \mapstochar +% "3B = { , }, % \emptyset +% "3C = { , }, % \Re +% "3D = { , }, % \Im +% "40 = { , }, % \aleph +% "5B = { , }, % \cup +% "5C = { , }, % \cap +% "5D = { , }, % \uplus +% "6A = { , }, % \arrowvert, \mid, \vert, | +% "6B = { , }, % \Arrowvert, \parallel, \Vert +% "6F = { , }, % \wr +% "70 = { , }, % \sqrtsign +% "71 = { , }, % \amalg +% "73 = { , }, % \smallint +% "74 = { , }, % \sqcup +% "75 = { , }, % \sqcap +% "76 = { , }, % \sqsubseteq +% "77 = { , }, % \sqsupseteq +% "78 = { , }, % \mathsection +%\fi +% \begin{macrocode} + } + +% \end{macrocode} +% We don't bother about `|largesymbols|', since it will only be used in display +% math, where protrusion doesn't work anyway. It's declared as: +%\begin{verbatim} +%\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n} +%\end{verbatim} +%\iffalse +%\SetProtrusion +% [ name = cmr-math-largesymbols ] +% { encoding = OMX, +% family = cmex } +% { +% "00 % ( +% "01 % ) +% "02 % [ +% "03 % ] +% "04 % \lfloor +% "05 % \rfloor +% "06 % \lceil +% "07 % \rceil +% "08 % \lbrace +% "09 % \rbrace +% "0A % <, \langle +% "0B % >, \rangle +% "0C % \vert, | +% "0D % \Vert +% "0E % / +% "0F % \backslash +% "3A % \lgroup +% "3B % \rgroup +% "3C % \arrowvert +% "3D % \Arrowvert +% "3E % \bracevert +% "3F % \updownarrow +% "40 % \lmoustache +% "41 % \rmoustache +% "46 % \bigsqcup +% "48 % \ointop +% "4A % \bigodot +% "4C % \bigoplus +% "4E % \bigotimes +% "50 % \sum +% "51 % \prod +% "52 % \intop +% "53 % \bigcup +% "54 % \bigcap +% "55 % \biguplus +% "56 % \bigwedge +% "57 % \bigvee +% "60 % \coprod +% "70 % \sqrtsign +% "77 % \Updownarrow +% "78 % \uparrow +% "79 % \downarrow +% "7A % \braceld, \lmoustache +% "7B % \bracerd, \rmoustache +% "7C % \bracelu +% "7D % \braceru +% "7E % \Uparrow +% "7F % \Downarrow +% } +%\fi +% \begin{macrocode} +% +% +% \end{macrocode} +% +% \subsubsection{ symbols} +% +% Settings for the math fonts (\pkg{amssymb}). +%\changes{v1.8}{2005/06/01}{settings for math fonts} +%\changes{v1.9d}{2006/02/04}{tweak settings} +% \begin{macrocode} +%<*cfg-u> +% \end{macrocode} +% Symbol font `a'. +% \begin{macrocode} +%<*msa> +\SetProtrusion + [ name = AMS-a ] + { encoding = U, + family = msa } + { + "05 = {150,250}, % \centerdot + "06 = {100,100}, % \lozenge + "07 = { 50, 50}, % \blacklozenge + "08 = { 50, 50}, % \circlearrowright + "09 = { 50, 50}, % \circlearrowleft + "0A = {100,100}, % \rightleftharpoons + "0B = {100,100}, % \leftrightharpoons + "0D = {-50,200}, % \Vdash + "0E = {-50,200}, % \Vvdash + "0F = {-70,150}, % \vDash + "10 = {100,150}, % \twoheadrightarrow + "11 = {100,150}, % \twoheadleftarrow + "12 = { 50,100}, % \leftleftarrows + "13 = { 50, 80}, % \rightrightarrows + "14 = {120,120}, % \upuparrows + "15 = {120,120}, % \downdownarrows + "16 = {200,200}, % \upharpoonright + "17 = {200,200}, % \downharpoonright + "18 = {200,200}, % \upharpoonleft + "19 = {200,200}, % \downharpoonleft + "1A = { 80,100}, % \rightarrowtail + "1B = { 80,100}, % \leftarrowtail + "1C = { 50, 50}, % \leftrightarrows + "1D = { 50, 50}, % \rightleftarrows + "1E = {250, }, % \Lsh + "1F = { ,250}, % \Rsh + "20 = {100,100}, % \rightsquigarrow + "21 = {100,100}, % \leftrightsquigarrow + "22 = {100, 50}, % \looparrowleft + "23 = { 50,100}, % \looparrowright + "24 = { 50, 80}, % \circeq + "25 = { ,100}, % \succsim + "26 = { ,100}, % \gtrsim + "27 = { ,100}, % \gtrapprox + "28 = {150, 50}, % \multimap + "2B = {100,150}, % \doteqdot + "2C = {100,150}, % \triangleq + "2D = {100, 50}, % \precsim + "2E = {100, 50}, % \lesssim + "2F = { 50, 50}, % \lessapprox + "30 = {100, 50}, % \eqslantless + "31 = { 50, 50}, % \eqslantgtr + "32 = {100, 50}, % \curlyeqprec + "33 = { 50,100}, % \curlyeqsucc + "34 = {100, 50}, % \preccurlyeq + "36 = { 50, }, % \leqslant + "38 = { , 50}, % \backprime + "39 = {250,250}, % \dabar@ : the dash bar in \dash(left,right)arrow + "3C = { 50,100}, % \succcurlyeq + "3E = { , 50}, % \geqslant + "40 = { , 50}, % \sqsubset + "41 = { 50, }, % \sqsupset + "42 = { ,150}, % \vartriangleright, \rhd + "43 = {150, }, % \vartriangleleft, \lhd + "44 = { ,100}, % \trianglerighteq, \unrhd + "45 = {100, }, % \trianglelefteq, \unlhd + "46 = {100,100}, % \bigstar + "48 = { 50, 50}, % \blacktriangledown + "49 = { ,100}, % \blacktriangleright + "4A = {100, }, % \blacktriangleleft + "4B = { ,150}, % \dashrightarrow (the arrow) + "4C = {150, }, % \dashleftarrow + "4D = { 50, 50}, % \vartriangle + "4E = { 50, 50}, % \blacktriangle + "4F = { 50, 50}, % \triangledown + "50 = { 50, 50}, % \eqcirc + "56 = { ,150}, % \Rrightarrow + "57 = {150, }, % \Lleftarrow + "58 = {100,300}, % \checkmark + "5C = { 50, 50}, % \angle + "5D = { 50, 50}, % \measuredangle + "5E = { 50, 50}, % \sphericalangle + "5F = { , 50}, % \varpropto + "60 = {100,100}, % \smallsmile + "61 = {100,100}, % \smallfrown + "62 = { 50, }, % \Subset + "63 = { , 50}, % \Supset + "66 = {150,150}, % \curlywedge + "67 = {150,150}, % \curlyvee + "68 = { 50,150}, % \leftthreetimes + "69 = {100, 50}, % \rightthreetimes + "6C = { 50, 50}, % \bumpeq + "6D = { 50, 50}, % \Bumpeq + "6E = {100, }, % \lll + "6F = { ,100}, % \ggg + "70 = { 50,100}, % \ulcorner + "71 = {100, 50}, % \urcorner + "75 = {150,200}, % \dotplus + "76 = { 50,100}, % \backsim + "78 = { 50,100}, % \llcorner + "79 = {100, 50}, % \lrcorner + "7C = {100,100}, % \intercal + "7D = { 50, 50}, % \circledcirc + "7E = { 50, 50}, % \circledast + "7F = { 50, 50} % \circleddash +% \end{macrocode} +% Remaining slots in the source file. +%\iffalse +% "00 = { , }, % \boxdot +% "01 = { , }, % \boxplus +% "02 = { , }, % \boxtimes +% "03 = { , }, % \square +% "04 = { , }, % \blacksquare +% "0C = { , }, % \boxminus +% "29 = { , }, % \therefore +% "2A = { , }, % \because +% "35 = { , }, % \leqq +% "37 = { , }, % \lessgtr +% "3A = { , }, % \risingdotseq +% "3B = { , }, % \fallingdotseq +% "3D = { , }, % \geqq +% "3F = { , }, % \gtrless +% "47 = { , }, % \between +% "51 = { , }, % \lesseqgtr +% "52 = { , }, % \gtreqless +% "53 = { , }, % \lesseqqgtr +% "54 = { , }, % \gtreqqless +% "55 = { , }, % \yen +% "59 = { , }, % \veebar +% "5A = { , }, % \barwedge +% "5B = { , }, % \doublebarwedge +% "64 = { , }, % \Cup +% "65 = { , }, % \Cap +% "6A = { , }, % \subseteqq +% "6B = { , }, % \supseteqq +% "72 = { , }, % \circledR +% "73 = { , }, % \circledS +% "74 = { , }, % \pitchfork +% "77 = { , }, % \backsimeq +% "7A = { , }, % \maltese +% "7B = { , }, % \complement +%\fi +% \begin{macrocode} + } + +% +% \end{macrocode} +% Symbol font `b'. +% \begin{macrocode} +%<*msb> +\SetProtrusion + [ name = AMS-b ] + { encoding = U, + family = msb } + { + A = { 50, 50}, % \mathbb + C = { 50, 50}, + G = { , 50}, + L = { , 50}, + P = { , 50}, + R = { , 50}, + T = { , 50}, + V = { 50, 50}, + X = { 50, 50}, + Y = { 50, 50}, + "00 = { 50, 50}, % \lvertneqq + "01 = { 50, 50}, % \gvertneqq + "02 = { 50, 50}, % \nleq + "03 = { 50, 50}, % \ngeq + "04 = {100, 50}, % \nless + "05 = { 50,150}, % \ngtr + "06 = {100, 50}, % \nprec + "07 = { 50,150}, % \nsucc + "08 = { 50, 50}, % \lneqq + "09 = { 50, 50}, % \gneqq + "0A = {100,100}, % \nleqslant + "0B = {100,100}, % \ngeqslant + "0C = {100, 50}, % \lneq + "0D = { 50,100}, % \gneq + "0E = {100, 50}, % \npreceq + "0F = { 50,100}, % \nsucceq + "10 = { 50, }, % \precnsim + "11 = { 50, 50}, % \succnsim + "12 = { 50, 50}, % \lnsim + "13 = { 50, 50}, % \gnsim + "14 = { 50, 50}, % \nleqq + "15 = { 50, 50}, % \ngeqq + "16 = { 50, 50}, % \precneqq + "17 = { 50, 50}, % \succneqq + "18 = { 50, 50}, % \precnapprox + "19 = { 50, 50}, % \succnapprox + "1A = { 50, 50}, % \lnapprox + "1B = { 50, 50}, % \gnapprox + "1C = {150,200}, % \nsim + "1D = { 50, 50}, % \ncong + "1E = {100,150}, % \diagup + "1F = {100,150}, % \diagdown + "20 = {100, 50}, % \varsubsetneq + "21 = { 50,100}, % \varsupsetneq + "22 = {100, 50}, % \nsubseteqq + "23 = { 50,100}, % \nsupseteqq + "24 = {100, 50}, % \subsetneqq + "25 = { 50,100}, % \supsetneqq + "26 = {100, 50}, % \varsubsetneqq + "27 = { 50,100}, % \varsupsetneqq + "28 = {100, 50}, % \subsetneq + "29 = { 50,100}, % \supsetneq + "2A = {100, 50}, % \nsubseteq + "2B = { 50,100}, % \nsupseteq + "2C = { 50,100}, % \nparallel + "2D = {100,150}, % \nmid + "2E = {150,150}, % \nshortmid + "2F = {100,100}, % \nshortparallel + "30 = { ,150}, % \nvdash + "31 = { ,150}, % \nVdash + "32 = { ,100}, % \nvDash + "33 = { ,100}, % \nVDash + "34 = { ,100}, % \ntrianglerighteq + "35 = {100, }, % \ntrianglelefteq + "36 = {100, }, % \ntriangleleft + "37 = { ,100}, % \ntriangleright + "38 = {100,200}, % \nleftarrow + "39 = {100,200}, % \nrightarrow + "3A = {100,100}, % \nLeftarrow + "3B = { 50,100}, % \nRightarrow + "3C = {100,100}, % \nLeftrightarrow + "3D = {100,200}, % \nleftrightarrow + "3E = { 50, 50}, % \divideontimes + "3F = { 50, 50}, % \varnothing + "60 = {200, }, % \Finv + "61 = { , 50}, % \Game + "68 = {100,100}, % \eqsim + "69 = { 50, }, % \beth + "6A = { 50, }, % \gimel + "6B = {150, }, % \daleth + "6C = {200, }, % \lessdot + "6D = { ,200}, % \gtrdot + "6E = {100,200}, % \ltimes + "6F = {150,100}, % \rtimes + "70 = { 50,100}, % \shortmid + "71 = { 50, 50}, % \shortparallel + "72 = {200,300}, % \smallsetminus + "73 = {100,200}, % \thicksim + "74 = { 50,100}, % \thickapprox + "75 = { 50, 50}, % \approxeq + "76 = { 50,100}, % \succapprox + "77 = { 50, 50}, % \precapprox + "78 = {100,100}, % \curvearrowleft + "79 = { 50,150}, % \curvearrowright + "7A = { 50,200}, % \digamma + "7B = {100, 50}, % \varkappa + "7F = {200, } % \backepsilon +% \end{macrocode} +% Remaining slots in the source file. +%\iffalse +% "40 = { , }, % \nexists +% "66 = { , }, % \mho +% "67 = { , }, % \eth +% "7C = { , }, % \Bbbk +% "7D = { , }, % \hslash +% "7E = { , }, % \hbar +%\fi +% \begin{macrocode} + } + +% +% \end{macrocode} +% \subsubsection{Euler} +% +% Euler Roman font (package \pkg{euler}). +%\changes{v1.9e}{2006/07/28}{settings for Euler Roman font} +% \begin{macrocode} +%<*eur> +\SetProtrusion + [ name = euler ] + { encoding = U, + family = eur } + { + "01 = {100,100}, + "03 = {100,150}, + "06 = { ,100}, + "07 = {100,150}, + "08 = {100,100}, + "0A = {100,100}, + "0B = { , 50}, + "0C = { ,100}, + "0D = {100,100}, + "0E = { ,100}, + "0F = {100,100}, + "10 = {100,100}, + "13 = { ,100}, + "14 = { ,100}, + "15 = { , 50}, + "16 = { , 50}, + "17 = { 50,100}, + "18 = { 50,100}, + "1A = { , 50}, + "1B = { , 50}, + "1C = { 50,100}, + "1D = { 50,100}, + "1E = { 50,100}, + "1F = { 50,100}, + "20 = { , 50}, + "21 = { , 50}, + "22 = { 50,100}, + "24 = { , 50}, + "27 = { 50,100}, + 1 = {100,100}, + 7 = { 50,100}, + "3A = {300,500}, + "3B = {200,400}, + "3C = {200,100}, + "3D = {200,200}, + "3E = {100,200}, + A = { ,100}, + D = { , 50}, + J = { 50, }, + K = { , 50}, + L = { , 50}, + Q = { , 50}, + T = { 50, }, + X = { 50, 50}, + Y = { 50, }, + h = { , 50}, + k = { , 50} + } + +% \end{macrocode} +% Extended by the \pkg{eulervm} package. +%\changes{v1.9f}{2006/07/31}{fix: \texttt{euler-vm} did not load \texttt{euler} settings} +% \begin{macrocode} +\SetProtrusion + [ name = euler-vm, + load = euler ] + { encoding = U, + family = zeur } + { + "28 = {100,200}, + "29 = {100,200}, + "2A = {100,150}, + "2B = {100,150}, + "2C = {200,300}, + "2D = {200,300}, + "2E = { ,100}, + "2F = {100, }, + "3F = {150,150}, + "5B = { ,100}, + "5E = {100,100}, + "5F = {100,100}, + "80 = { , 50}, + "81 = {200,250}, + "82 = {100,200} + } + +% +% \end{macrocode} +% Euler Script font (\pkg{eucal}). +% \begin{macrocode} +%<*eus> +\SetProtrusion + [ name = euscript ] + { encoding = U, + family = eus } + { + A = {100,100}, + B = { 50,100}, + C = { 50, 50}, + D = { 50,100}, + E = { 50,100}, + F = { 50, }, + G = { 50, }, + H = { ,100}, + K = { , 50}, + L = { ,150}, + M = { , 50}, + N = { , 50}, + O = { 50, 50}, + P = { 50, 50}, + T = { ,100}, + U = { , 50}, + V = { 50, 50}, + W = { 50, 50}, + X = { 50, 50}, + Y = { 50, }, + Z = { 50,100}, + "00 = {250,250}, + "18 = {200,200}, + "3A = {200,150}, + "40 = { ,100}, + "5E = {100,100}, + "5F = {100,100}, + "66 = { 50, }, + "67 = { , 50}, + "6E = {200,200} + } + +\SetProtrusion + [ name = euscript-vm, + load = euscript ] + { encoding = U, + family = zeus } + { + "01 = {600,600}, + "02 = {200,200}, + "03 = {200,200}, + "04 = {200,200}, + "05 = {150,150}, + "06 = {200,200}, + "07 = {200,200}, + "08 = {100,100}, + "09 = {100,100}, + "0A = {100,100}, + "0B = {100,100}, + "0C = {100,100}, + "0D = {100,100}, + "0E = {150,150}, + "0F = {100,100}, + "10 = {150,150}, + "11 = {100,100}, + "12 = {150,100}, + "13 = {100,150}, + "14 = {150,100}, + "15 = {100,150}, + "16 = {200,100}, + "17 = {100,200}, + "19 = {150,150}, + "1A = {150,100}, + "1B = {100,150}, + "1C = {100,100}, + "1D = {100,100}, + "1E = {250,100}, + "1F = {100,250}, + "20 = {150,200}, + "21 = {150,200}, + "22 = {150,150}, + "23 = {150,150}, + "24 = {100,200}, + "25 = {150,150}, + "26 = {150,150}, + "27 = {100,100}, + "28 = {100,100}, + "29 = {100,150}, + "2A = {100,100}, + "2B = {100,100}, + "2C = {100,100}, + "2D = {150,150}, + "2E = {150,150}, + "2F = {100,100}, + "30 = {100,100}, + "31 = {100,100}, + "32 = {100,100}, + "33 = {100,100}, + "34 = {100,100}, + "35 = {100,100}, + "3E = {150,150}, + "3F = {150,150}, + "60 = { ,200}, + "61 = {200, }, + "62 = {100,100}, + "63 = {100,100}, + "64 = {100,100}, + "65 = {100,100}, + "68 = {300, }, + "69 = { ,300}, + "6C = {100,100}, + "6D = {100,100}, + "6F = {100,100}, + "72 = {100,100}, + "73 = {200,100}, + "76 = { ,100}, + "77 = {100, }, + "78 = { 50, 50}, + "79 = {100,100}, + "7A = {100,100}, + "7D = {150,150}, + "7E = {100,100}, + "A8 = {100,100}, + "A9 = {100,100}, + "AB = {200,200}, + "BA = { ,200}, + "BB = { ,200}, + "BD = {200,200}, + "DE = {200,200} + } + +% +% \end{macrocode} +% Euler Fraktur font (\pkg{eufrak}). +%\changes{v1.9e}{2006/07/28}{complete settings for Euler Fraktur and Script fonts} +% \begin{macrocode} +%<*euf> +\SetProtrusion + [ name = mathfrak ] + { encoding = U, + family = euf } + { + A = { , 50}, + B = { , 50}, + C = { 50, 50}, + D = { , 80}, + E = { 50, }, + G = { , 50}, + L = { , 80}, + O = { , 50}, + T = { , 80}, + X = { 80, 50}, + Z = { 80, 50}, + b = { , 50}, + c = { , 50}, + k = { , 50}, + p = { , 50}, + q = { 50, }, + v = { , 50}, + w = { , 50}, + x = { , 50}, + 1 = {100,100}, + 2 = { 80, 80}, + 3 = { 80, 50}, + 4 = { 80, 50}, + 7 = { 50, 50}, + "12 = {500,500}, + "13 = {500,500}, + ! = { ,200}, + ' = {200,300}, + ( = {200, }, + ) = { ,200}, + * = {200,200}, + + = {200,250}, + - = {200,200}, + {,} = {300,300}, + . = {400,400}, + {=} = {200,200}, + : = { ,200}, + ; = { ,200}, + ] = { ,200} + } + +% +% +% \end{macrocode} +%\subsubsection{Euro symbols} +%\changes{v1.9d}{2006/05/04}{settings for Euro symbols (Adobe, , \pkg{marvosym})} +%\changes{v1.9e}{2006/07/05}{fix: forgotten comma in \file{mt-mvs.cfg}; +% adapt to \pkg{marvosym}'s changed encoding} +% Settings for various Euro symbols (Adobe Euro fonts (packages \pkg{eurosans}, +% \pkg{europs}), Euro fonts (package \pkg{euroitc}) and \pkg{marvosym}\footnote{ +% Of course, there are many more symbols in this font. Feel free to contribute +% protrusion settings!}). +% \begin{macrocode} +%<*cfg-e> +\SetProtrusion +% { encoding = U, +% { encoding = {OT1,U}, +% family = zpeu } +% family = {euroitc,euroitcs} } +% family = mvs } + { +% E = {50, } +% E = {100,50} +% 164 = {50,50}, % \EUR +% 068 = {50,-100} % \EURdig + } + +%<*zpeu|euroitc> +\SetProtrusion + { encoding = U, +% family = zpeu, +% family = {euroitc,euroitcs}, + shape = it* } + { +% E = {100,-50} +% E = {100,} + } + +% +%<*zpeu> +\SetProtrusion + { encoding = U, + family = {zpeus,eurosans} } + { + E = {100,50} + } + +\SetProtrusion + { encoding = U, + family = {zpeus,eurosans}, + shape = it* } + { + E = {200, } + } + +% +% +% \end{macrocode} +% +%\subsection{Interword spacing}\label{sub:conf-spacing} +%\GeneralChanges{Spacing} +% +% Default unit is space. +% +% \begin{macrocode} +%<*m-t> +%%% ----------------------------------------------------------------------- +%%% INTERWORD SPACING + +\SetExtraSpacing + [ name = default ] + { encoding = {OT1,T1,LY1,OT4,QX,T5} } + { +% \end{macrocode} +% These settings are only a first approximation. The following reasoning is from +% a mail from \contributor Ulrich Dirr ^^A private mail, 2005/06/14 +%\ifpdf\IfFileExists{justification.jpg}{^^A +% , who also provided the sample in figure~\ref{fig:example-spacing}^^A +%\changes{v2.2}{2007/04/05}{add sample}^^A +% \begin{figure} +% \caption{^^A +% Example for interword spacing (from Siemoneit 1989). +% ^^A Manfred Siemoneit, Typographisches Gestalten. +% ^^A Regeln und Tips f\"ur die richtige Gestaltung von Drucksachen, +% ^^A Bielefeld 1989 +% The numbers indicate the preference\slash order when the interword space +% needs to be shrunk.} +% \label{fig:example-spacing} +% \includegraphics[width=.6\textwidth]{justification.jpg} +% \end{figure}^^A +%}\relax\fi. +% I do not claim to have coped with the task. +%\todo{fix settings} +% +%\begin{quote} +% `The idea is -- analog to the tables for expansion and protrusion -- to +% have tables for optical reduction\slash expansion of spaces in dependence of the +% actual character so that the distance between words is optically equal. +% +% When reducing distances the (weighting) order is: +%\begin{itemize} +% \item after commas +% \begin{macrocode} + {,} = { ,-500,500}, +% \end{macrocode} +% \item in front of capitals which have optical more room on their left +% side, \eg, `A', `J', `T', `V', `W', and `Y' +% [this is not yet possible -- RS] +% \item in front of capitals which have circle/oval shapes on their left +% side, \eg, `C', `G', `O', and `Q' +% [ditto -- RS] +% \item after `r' (because of the bigger optical room on the righthand side) +% \begin{macrocode} + r = { ,-300,300}, +% \end{macrocode} +% \item\relax [before or] after lowercase characters with ascenders +% \begin{macrocode} + b = { ,-200,200}, + d = { ,-200,200}, + f = { ,-200,200}, + h = { ,-200,200}, + k = { ,-200,200}, + l = { ,-200,200}, + t = { ,-200,200}, +% \end{macrocode} +% \item\relax [before or] after lowercase characters with x-height plus descender +% with additional optical space, \eg, `v', or `w' +% \begin{macrocode} + c = { ,-100,100}, + p = { ,-100,100}, + v = { ,-100,100}, + w = { ,-100,100}, + z = { ,-100,100}, + x = { ,-100,100}, + y = { ,-100,100}, +% \end{macrocode} +% \item\relax [before or] after lowercase characters with x-height plus descender +% without additional optical space +% \begin{macrocode} + i = { , 50, -50}, + m = { , 50, -50}, + n = { , 50, -50}, + u = { , 50, -50}, +% \end{macrocode} +% \item after colon and semicolon +% \begin{macrocode} + : = { ,200,-200}, + ; = { ,200,-200}, +% \end{macrocode} +% \item after punctuation which ends a sentence, \eg, period, exclamation +% mark, question mark +% \begin{macrocode} + . = { ,250,-250}, + ! = { ,250,-250}, + ? = { ,250,-250} +% \end{macrocode} +%\end{itemize} +% The order has to be reversed when enlarging is needed.' +%\end{quote} +% \begin{macrocode} + } + +% \end{macrocode} +% Questions are: +%\begin{itemize} +% \item Is the result really better? +% \item Is it overdone? (Try with a |factor| \textless\ 1000.) +% \item Should the first parameter also be used? (Probably.) +% \item What about quotation marks, parentheses etc.? +%\end{itemize} +% +% Furthermore, there seems to be a \pdftex\ bug with spacing in combination +% with a non-zero \cmd\spaceskip\ +% (reported by \contributor Axel Berger ): +% ^^A dctt, `myheadings, markboth', 2008/10/06, MID: <200810062134.a58193@b.maus.de> +%\todo{report \pdftex\ bug} +%\begin{verbatim} +%\parfillskip0pt +%\rightskip0pt plus 1em +%\spaceskip\fontdimen2\font +% test test\par +%\pdfadjustinterwordglue2 +%\stbscode\font`t=-50 +% test test +%\bye +%\end{verbatim} +% Some more characters in .\footnote{Contributed by +% \contributor Karl Karlsson .} +%\changes{v2.3e}{2009/10/28}{settings for encoding (contributed by +% \contributor Karl Karlsson )} +% ^^A private mail, 2009/10/21 +% \begin{macrocode} +%<*m-t> +\SetExtraSpacing + [ name = T2A, + load = default ] + { encoding = T2A, + family = cmr } + { + \cyrg = { ,-300,300}, + \cyrb = { ,-200,200}, + \cyrk = { ,-200,200}, + \cyrs = { ,-100,100}, + \cyrr = { ,-100,100}, + \cyrh = { ,-100,100}, + \cyru = { ,-100,100}, + \cyrt = { , 50, -50}, + \cyrp = { , 50, -50}, + \cyri = { , 50, -50}, + \cyrishrt = { , 50, -50}, + } + +% +% \end{macrocode} +% +% \subsubsection{Nonfrenchspacing} +% The following settings simulate \cmd\nonfrenchspacing\ (since space factors +% will be ignored when spacing adjustment is in effect). They may be used for +% English contexts. +% +% From the \TeX book: +%\begin{quote} +% `If the +% space factor $f$ is different from 1000, the interword glue is computed as +% follows: Take the normal space glue for the current font, and add the +% extra space if $f\ge2000$. +% [\,\dots] +% Then the stretch component is multiplied by $f/1000$, while the shrink +% component is multiplied by $1000/f$.' +%\end{quote} +% The `extra space' (\fontdim7) for Computer Modern Roman is a third of +% \fontdim2, \ie, 333. +% \begin{macrocode} +\SetExtraSpacing + [ name = nonfrench-cmr, + load = default, + context = nonfrench ] + { encoding = {OT1,T1,LY1,OT4,QX,T5}, + family = cmr } + { +% \end{macrocode} +% \file{latex.ltx} has: +%\begin{verbatim}[morekeywords={[1]{\nonfrenchspacing}}] +%\def\nonfrenchspacing{ +% \sfcode`\. 3000 +% \sfcode`\? 3000 +% \sfcode`\! 3000 +%\end{verbatim} +% \begin{macrocode} + . = {333,2000,-667}, + ? = {333,2000,-667}, + ! = {333,2000,-667}, +% \end{macrocode} +%\begin{verbatim} +% \sfcode`\: 2000 +%\end{verbatim} +% \begin{macrocode} + : = {333,1000,-500}, +% \end{macrocode} +%\begin{verbatim} +% \sfcode`\; 1500 +%\end{verbatim} +% \begin{macrocode} + ; = { , 500,-333}, +% \end{macrocode} +%\begin{verbatim} +% \sfcode`\, 1250 +%\end{verbatim} +% \begin{macrocode} + {,}= { , 250,-200} +% \end{macrocode} +%\begin{verbatim} +%} +%\end{verbatim} +% \begin{macrocode} + } + +% \end{macrocode} +% \pkg{fontinst}, however, which is also used to create the \pkg{PSNFSS} font +% metrics, sets \fontdim7 to 240 by default. Therefore, the fallback settings +% use this value for the first component. +% \begin{macrocode} +\SetExtraSpacing + [ name = nonfrench-default, + load = default, + context = nonfrench ] + { encoding = {OT1,T1,LY1,OT4,QX,T5} } + { + . = {240,2000,-667}, + ? = {240,2000,-667}, + ! = {240,2000,-667}, + : = {240,1000,-500}, + ; = { , 500,-333}, + {,}= { , 250,-200} + } + +% \end{macrocode} +% +% \subsection{Additional kerning} +%\GeneralChanges{Kerning} +% +% Default unit is 1\,em. +% +% \begin{macrocode} +%%% ----------------------------------------------------------------------- +%%% ADDITIONAL KERNING + +% \end{macrocode} +% A dummy list to be loaded when no context is active. +% \begin{macrocode} +\SetExtraKerning + [ name = empty ] + { encoding = {OT1,T1,T2A,LY1,OT4,QX,T5,TS1} } + { } + +% \end{macrocode} +% +%\subsubsection{French} +% +% The ratio of \fontdim2 to \fontdim6 varies for different fonts, so that +% either the kerning of the colon (which should be a space, \ie, \fontdim2) or +% that of the other punctuation characters (\TeX's \cmd\thinspace, \ie, one +% sixth of \fontdim6) may be inaccurate, depending on which |unit| we choose +% (|space| or |1em|). For Times, for example, a thin space would be 665. I +% don't know whether French typography really wants a thin space, or rather (as +% it happens to turn out with ) half a space. +% (Wikipedia\footnote{\url{http://fr.wikipedia.org/wiki/Espace_typographique}, 5 July 2007.} +% claims it should be a quarter of an em, which seems too much to me; then +% again, it also says that this \emph{was} a thin space in French typography.) +% \begin{macrocode} +\SetExtraKerning + [ name = french-default, + context = french, + unit = space ] + { encoding = {OT1,T1,LY1} } + { + : = {1000,}, % = \fontdimen2 + ; = {500, }, % ~ \thinspace + ! = {500, }, + ? = {500, } + } + +% \end{macrocode} +% These settings have the disadvantage that a word following a left guillemet +% will not be hyphenated. This might be fixed in \pdftex. +% \begin{macrocode} +\SetExtraKerning + [ name = french-guillemets, + context = french-guillemets, + load = french-default, + unit = space ] + { encoding = {T1,LY1} } + { + \guillemotleft = { ,800}, % = 0.8\fontdimen2 + \guillemotright = {800, } + } + +\SetExtraKerning + [ name = french-guillemets-OT1, + context = french-guillemets, + load = french-default, + unit = space ] + { encoding = OT1 } + { } + +% \end{macrocode} +% +%\subsubsection{Turkish} +% +% \begin{macrocode} +\SetExtraKerning + [ name = turkish, + context = turkish ] + { encoding = {OT1,T1,LY1} } + { + : = {167, }, % = \thinspace + ! = {167, }, + {=} = {167, } + } + +% +% +% \end{macrocode} +%^^A\changes{v2.0}{2006/12/28}{remove \texttt{letterspacing} settings} +%\GeneralChanges* +% +%\section{Auxiliary file for micro fine tuning} +% +% This file can be used to test protrusion and expansion settings. +% \begin{macrocode} +%<*test> +\documentclass{article} + +%% Here you can specify the font you want to test, using +%% the commands \fontfamily, \fontseries and \fontshape. +%% Make sure to end all lines with a comment character! +\newcommand*\TestFont{% + \fontfamily{ppl}% +%% \fontseries{b}% +%% \fontshape{it}% sc, sl +} + +\usepackage{ifthen} +\usepackage[T1]{fontenc} +\usepackage[latin1]{inputenc} +\usepackage[verbose,expansion=alltext,stretch=50]{microtype} + +\pagestyle{empty} +\setlength{\parindent}{0pt} +\newcommand*\crulefill{\cleaders\hbox{$\mkern-2mu\smash-\mkern-2mu$}\hfill} +\newcommand*\testprotrusion[2][]{% + \ifthenelse{\equal{#1}{r}}{}{#2}% + lorem ipsum dolor sit amet, + \ifthenelse{\equal{#1}{r}}{\crulefill}{\leftarrowfill} #2 + \ifthenelse{\equal{#1}{l}}{\crulefill}{\rightarrowfill} + you know the rest% + \ifthenelse{\equal{#1}{l}}{}{#2}% + \linebreak + {\fontencoding{\encodingdefault}% + \fontseries{\seriesdefault}% + \fontshape{\shapedefault}% + \selectfont + Here is the beginning of a line, \dotfill and here is its end}\linebreak +} +\newcommand*\showTestFont{\expandafter\stripprefix\meaning\TestFont} +\def\stripprefix#1>{} +\newcount\charcount +\begin{document} + +\microtypesetup{expansion=false} + +{\centering The font in this document is called by:\\ + \texttt{\showTestFont}\par}\bigskip + +\TestFont\selectfont + This line intentionally left empty\linebreak +%% A -- Z +\charcount=65 +\loop + \testprotrusion{\char\charcount} + \advance\charcount 1 + \ifnum\charcount < 91 \repeat +%% a -- z +\charcount=97 +\loop + \testprotrusion{\char\charcount} + \advance\charcount 1 + \ifnum\charcount < 123 \repeat +%% 0 -- 9 +\charcount=48 +\loop + \testprotrusion{\char\charcount} + \advance\charcount 1 + \ifnum\charcount < 58 \repeat +%% + \testprotrusion[r]{,} + \testprotrusion[r]{.} + \testprotrusion[r]{;} + \testprotrusion[r]{:} + \testprotrusion[r]{?} + \testprotrusion[r]{!} + \testprotrusion[l]{\textexclamdown} + \testprotrusion[l]{\textquestiondown} + \testprotrusion[r]{)} + \testprotrusion[l]{(} + \testprotrusion{/} + \testprotrusion{\char`\\} + \testprotrusion{-} + \testprotrusion{\textendash} + \testprotrusion{\textemdash} + \testprotrusion{\textquoteleft} + \testprotrusion{\textquoteright} + \testprotrusion{\textquotedblleft} + \testprotrusion{\textquotedblright} + \testprotrusion{\quotesinglbase} + \testprotrusion{\quotedblbase} + \testprotrusion{\guilsinglleft} + \testprotrusion{\guilsinglright} + \testprotrusion{\guillemotleft} + \testprotrusion{\guillemotright} + +\newpage +The following displays the current font stretched by 5\%, +normal, and shrunk by 5\%: + +\bigskip +\newlength{\MTln} +\newcommand*\teststring + {ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789} +\settowidth{\MTln}{\teststring} +\microtypesetup{expansion=true} + +\parbox{1.05\MTln}{\teststring\linebreak\\ + \teststring}\par\bigskip +\parbox{0.95\MTln}{\teststring} + +\end{document} +% +% \end{macrocode} +% Needless to say that things may always be improved. For suggestions, mail to +% \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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \CheckSum{9578} +% +% \Finale +% +\endinput +% diff --git a/obsolete/info/translations/microtype/de/microtype-DE.pdf b/obsolete/info/translations/microtype/de/microtype-DE.pdf new file mode 100644 index 0000000000..1188cac437 Binary files /dev/null and b/obsolete/info/translations/microtype/de/microtype-DE.pdf differ -- cgit v1.2.3