Debian Codegraph @

texmf-dist/source/latex/pdfcprot/pdfcprot.dtx

raw
1 % \CheckSum{1342}
2 % \iffalse
3 % ======================================================================
4 % pdfcprot.dtx
5 % Copyright (C) 2001/2002 Carsten Schurig
6 %
7 % This file is a package to use character protruding of pdftex.
8 %
9 % This file can be redistributed and/or modified under the terms
10 % of the LaTeX Project Public License Version 1.2 or later distributed
11 % together with this file. See LEGAL.TXT
12 % ======================================================================
13 %
14 % \charactertable
15 % {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
16 % 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
17 % Digits \0\1\2\3\4\5\6\7\8\9
18 % Exclamation \! Double quote \" Hash (number) \#
19 % Dollar \$ Percent \% Ampersand \&
20 % Acute accent \' Left paren \( Right paren \)
21 % Asterisk \* Plus \+ Comma \,
22 % Minus \- Point \. Solidus \/
23 % Colon \: Semicolon \; Less than \<
24 % Equals \= Greater than \> Question mark \?
25 % Commercial at \@ Left bracket \[ Backslash \\
26 % Right bracket \] Circumflex \^ Underscore \_
27 % Grave accent \` Left brace \{ Vertical bar \|
28 % Right brace \} Tilde \~}
29 %
30 %<*dtx>
31 \ProvidesFile{pdfcprot.dtx}
32 %</dtx>
33 %<driver> \ProvidesFile{pdfcprot.drv}
34 %<*dtx>
35 %<*driver>
36 [2005/05/23 v1.7a pdfcprot
37 %</driver>
38 %</dtx>
39 %<dtx> documented source]
40 %<*driver>
41 bundle]
42 \documentclass[10pt,a4paper]{ltxdoc}
43 %\usepackage[a4paper,BCOR20mm,DIV12]{typearea}
44 \usepackage[latin1]{inputenc}
45 \usepackage[T1]{fontenc}
46 \usepackage{array,tabularx}
47 %\DisableCrossrefs
48 \EnableCrossrefs
49 \CodelineIndex
50 %\OnlyDescription
51 \RecordChanges
52 \MakeShortVerb{\|}
53 \setlength{\paperwidth}{597.50793pt}
54 \setlength{\textwidth}{405.45183pt}
55 \setlength{\evensidemargin}{17.83041pt}
56 \setlength{\oddsidemargin}{29.68571pt}
57 \setlength{\paperheight}{845.04694pt}
58 \setlength{\textheight}{634.0pt}
59 \setlength{\topmargin}{-34.84941pt}
60 \setlength{\headheight}{15.0pt}
61 \setlength{\headsep}{18.0pt}
62 \setlength{\topskip}{10.0pt}
63 \setlength{\footskip}{42.0pt}
64 \setlength{\baselineskip}{12.0pt}
65 \def\MacroFont{\ttfamily\footnotesize}
66 \makeatletter
67 \renewcommand\section{\@startsection {section}{1}{\z@}%
68 {-3.5ex \@plus -1ex \@minus -.2ex}%
69 {2.3ex \@plus.2ex}%
70 {\normalfont\Large\bfseries\raggedright}}
71 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
72 {-3.25ex\@plus -1ex \@minus -.2ex}%
73 {1.5ex \@plus .2ex}%
74 {\normalfont\large\bfseries\raggedright}}
75 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
76 {-3.25ex\@plus -1ex \@minus -.2ex}%
77 {1.5ex \@plus .2ex}%
78 {\normalfont\normalsize\bfseries\raggedright}}
79
80 \newenvironment{Declaration}%
81 {\par\small\addvspace{1.5\baselineskip plus .5\baselineskip}%
82 \vspace{-\baselineskip}%
83 \noindent\hspace{-10mm}%
84 \begin{tabular}{|l|}\hline\ignorespaces}%
85 {\\\hline\end{tabular}\nobreak\par\nobreak
86 \vspace{1.5\baselineskip}\vspace{-\baselineskip}%
87 \noindent\ignorespacesafterend}
88 \newcommand{\Macro}[1]{\mbox{\texttt{\char`\\#1}}}
89 \newcommand{\Option}[1]{\mbox{\texttt{#1}}}
90 \newcommand{\PName}[1]{\mbox{\texttt{#1}}}
91 \newcommand{\PValue}[1]{\textit{#1}}
92 \newcommand{\Parameter}[1]{\texttt{\{}\PName{#1}\texttt{\}}}
93 \newcommand{\OParameter}[1]{\texttt{[}\PName{#1}\texttt{]}}
94
95 \newcommand{\Value}[1]{\textit{#1}}
96 \def\SpecialOptionIndex#1{\@bsphack
97 \index{#1\actualchar{\protect\ttfamily#1}
98 (option)\encapchar usage}%
99 \index{options:\levelchar{\protect\ttfamily#1}\encapchar usage}\@esphack}
100 \def\Describe@Macro#1#2{\endgroup
101 \begin{Declaration}
102 #2
103 \end{Declaration}%
104 \SpecialUsageIndex{#1}\@esphack\ignorespaces}
105 \def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters\Describe@Option}
106 \def\Describe@Option#1#2{\endgroup
107 \begin{Declaration}
108 #2
109 \end{Declaration}%
110 \SpecialOptionIndex{#1}\@esphack\ignorespaces}
111 \@ifundefined{KOMAScript}{%
112 \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
113 M\kern.05em A\kern.1em-\kern.1em Script}}}{}
114 \makeatother
115 \begin{document}
116 \DocInput{pdfcprot.dtx}
117 \end{document}
118 %</driver>
119 % \fi
120 % \GetFileInfo{pdfcprot.dtx}
121 % \makeatletter
122 % \def\macro{\begingroup
123 % \catcode`\\12
124 % \MakePrivateLetters \m@cro@ 0}
125 % \def\environment{\begingroup
126 % \catcode`\\12
127 % \MakePrivateLetters \m@cro@ 1}
128 % \def\option{\begingroup
129 % \catcode`\\12
130 % \MakePrivateLetters \m@cro@ 2}
131 % \def\Key{\begingroup
132 % \catcode`\\12
133 % \MakePrivateLetters \m@cro@ 3}
134 % \def\Counter{\begingroup
135 % \catcode`\\12
136 % \MakePrivateLetters \m@cro@ 4}
137 % \long\def\m@cro@#1#2{\endgroup \topsep\MacroTopsep \trivlist
138 % \edef\saved@macroname{\string#2}%
139 % \ifcase #1%
140 % \edef\saved@@macroname{\expandafter\@gobble\saved@macroname}
141 % \or
142 % \edef\saved@@macroname{\expandafter\@gobble\saved@macroname}
143 % \or
144 % \edef\saved@@macroname{\expandafter\@gobble\saved@macroname}
145 % \else
146 % \let\saved@@macroname\saved@macroname
147 % \fi
148 % \def\makelabel##1{\llap{##1}}%
149 % \if@inlabel
150 % \let\@tempa\@empty \count@\macro@cnt
151 % \loop \ifnum\count@>\z@
152 % \edef\@tempa{\@tempa\hbox{\strut}}\advance\count@\m@ne \repeat
153 % \edef\makelabel##1{\llap{\vtop to\baselineskip
154 % {\@tempa\hbox{##1}\vss}}}%
155 % \advance \macro@cnt \@ne
156 % \else \macro@cnt\@ne \fi
157 % \edef\@tempa{\noexpand\item[%
158 % \ifcase #1%
159 % \noexpand\PrintMacroName
160 % \or
161 % \noexpand\PrintEnvName
162 % \or
163 % \noexpand\PrintOptionName
164 % \or
165 % \noexpand\PrintKeyName
166 % \or
167 % \noexpand\PrintCounterName
168 % \fi
169 % {\string#2}]}%
170 % \@tempa
171 % {\advance\c@CodelineNo\@ne
172 % \ifcase #1%
173 % \SpecialMainIndex{#2}\nobreak
174 % \DoNotIndex{#2}%
175 % \or
176 % \SpecialMainEnvIndex{#2}\nobreak
177 % \or
178 % \SpecialMainOptionIndex{#2}\nobreak
179 % \or
180 % \SpecialMainKeyIndex{#2}\nobreak
181 % \or
182 % \SpecialMainCounterIndex{#2}\nobreak
183 % \fi
184 % }%
185 % \ignorespaces}
186 % \let\endoption\endtrivlist
187 % \providecommand*{\PrintOptionName}[1]{\strut \MacroFont #1\ }
188 % \providecommand*{\PrintKeyName}[1]{\strut \MacroFont #1\ }
189 % \providecommand*{\PrintCounterName}[1]{\strut \MacroFont #1\ }
190 % \newcommand*{\ttbksp}{\texttt{\char`\\}}
191 % \newcommand*{\SpecialMainOptionIndex}[1]{\@bsphack
192 % \special@index{#1\actualchar{\string\ttfamily\space#1}
193 % (option)\encapchar main}%
194 % \special@index{options:\levelchar{\string\ttfamily\space#1}\encapchar
195 % main}\@esphack}
196 % \newcommand*{\SpecialMainKeyIndex}[1]{\@bsphack
197 % \special@index{#1\actualchar{\string\ttfamily\space#1}
198 % (key)\encapchar main}%
199 % \special@index{keys:\levelchar{\string\ttfamily\space#1}\encapchar
200 % main}\@esphack}
201 % \newcommand*{\SpecialMainCounterIndex}[1]{\@bsphack
202 % \special@index{#1\actualchar{\string\ttfamily\space#1}
203 % (counter)\encapchar main}%
204 % \special@index{counter:\levelchar{\string\ttfamily\space#1}\encapchar
205 % main}\@esphack}
206 % \DoNotIndex{\!, \', \(, \), \,, \-, \., \:, \;, \?, \`}
207 % \DoNotIndex{\@ifundefined, \@onlypreamble, \@tempb, \@tempcnta,
208 % \@tempcntb, \@tfor}
209 % \DoNotIndex{\A, \a, \addtocounter, \advance, \and, \AtBeginDocument}
210 % \DoNotIndex{\bfseries, \B, \b, \boolean}
211 % \DoNotIndex{\C, \c, \char, \csname, \CurrentOption}
212 % \DoNotIndex{\D, \d, \DeclareOption, \def, \define@key, \divide, \do}
213 % \DoNotIndex{\E, \e, \else, \endcsname, \endinput, \equal,
214 % \expandafter}
215 % \DoNotIndex{\F, \f, \fi, \font, \fontdimen, \fontencoding,
216 % \fontfamily, \fontshape, \fontseries, \footnotesize, \f@encoding,
217 % \f@shape, \f@series, \f@family}
218 % \DoNotIndex{\G, \g, \gdef, \global}
219 % \DoNotIndex{\H, \h, \hbox, \Huge, \huge}
220 % \DoNotIndex{\I, \i, \ifcase, \IfFileExists, \InputIfFileExists,
221 % \ifnum, \ifthenelse, \ifx, \input, \itshape}
222 % \DoNotIndex{\J, \j}
223 % \DoNotIndex{\K, \k, \KV@errx}
224 % \DoNotIndex{\L, \l, \LARGE, \Large, \large, \let, \loop, \lpcode}
225 % \DoNotIndex{\M, \m, \mdseries, \MessageBreak, \multiply}
226 % \DoNotIndex{\N, \n, \NeedsTeXFormat, \newcommand, \newcounter,
227 % \newboolean, \newif, \normalsize}
228 % \DoNotIndex{\O, \o, \or}
229 % \DoNotIndex{\P, \p, \PackageError, \PackageInfo, \PackageWarning,
230 % \pdfoutput, \pdftexrevision, \pdftexversion, \ProcessOptions,
231 % \protect,, \protected@edef, \protected@xdef, \pdfprotrudechars, \ProvidesPackage}
232 % \DoNotIndex{\Q, \q, \quotedblbase}
233 % \DoNotIndex{\R, \r, \relax, \renewcommand, \repeat, \RequirePackage,
234 % \rmfamily, \rpcode}
235 % \DoNotIndex{\S, \s, \scriptsize, \scshape, \selectfont, \setboolean,
236 % \setbox, \setcounter, \setkeys, \sffamily, \slshape, \small, \space,
237 % \stepcounter, \string}
238 % \DoNotIndex{\T, \t, \textquotedblleft, \tiny}
239 % \DoNotIndex{\U, \u, \undefined, \upshape, \usepackage}
240 % \DoNotIndex{\V, \v, \value}
241 % \DoNotIndex{\W, \w, \wd}
242 % \DoNotIndex{\X, \x, \Y, \y, \Z, \z, \z@}
243 % \makeatother
244 % \title{The |pdfcprot.sty| Package.\thanks{This file has version \fileversion{} dated
245 % \filedate.}}
246 % \author{Carsten Schurig\thanks{This package depends intensely on
247 % code originally from H\`{a}n Th\'{\^{e}} Th\`{a}n.},Tobias Schlemmer}
248 % \maketitle
249 % \abstract{This package was written to provide the ``normal''
250 % \LaTeXe{} user an easy way to use the special character protruding
251 % feature invented by pdf\TeX. Further this package provides an easy
252 % interface to adjust the character protrusion for different fonts and
253 % choosing the right adjustment automatically depending on the font.}
254 % \tableofcontents{}
255 % \changes{1.0}{2001/10/26}{First submit able version. The package
256 % seems to work, but the documentation is incomplete. This version
257 % was an internal one.}
258 % \changes{1.1}{2001/10/30}{Some of the code was changed while writing
259 % the documentation, because the first version had an annoyance: the
260 % files that contain the setup of the character protruding were loaded
261 % more than once because of the then used implementation. Now it's just loaded once, even
262 % if the font setting is used more (because it's the fallback).}
263 % \changes{1.7a}{2005/05/23}{Fixed a typo}
264 % \section{Introduction}
265 % As the abstract stated this package exists to provide a simple user
266 % interface to the character protruding feature of
267 % pdf\TeX\footnote{You'll find pdf\TeX{} on
268 % |CTAN:/sytems/pdftex|.}. This is a special way to do a margin
269 % kerning. By that it is possible to achieve a visual more ``smooth''
270 % margin. When not doing a margin kerning, the margins seems to be flattered a bit, especially at
271 % hyphens and punctuation. Character Protruding is a simple but nevertheless effective
272 % way to achieve a margin kerning. For more information
273 % about margin kerning and especially character protruding see the
274 % thesis of H\`{a}n Th\'{\^{e}}
275 % Th\`{a}nh~\cite{hanthethanh:thesis}\footnote{It could be found on the
276 % web, but I don't remember where I got it.}.
277 %
278 % \subsection{A bit of History}
279 % Why did I write this package, so you can use it now? Well, it all
280 % started with my diploma thesis. I used \LaTeXe{} on a regular basis
281 % before that, but here I still had to increase my knowledge, esp. in
282 % typography. So I read somewhere in a book something about margin
283 % kerning (some book of Jan Tschichold). So I wanted to test, how
284 % it would look like.
285 %
286 % But my first questions in |de.comp.text.tex| where a bit
287 % unsuccessful. The only answers where, that it could be achieved with
288 % \TeX{}, but that it is not without problem. As an example the
289 % \LaTeX{}-Companion was mentioned, at least the German
290 % edition\cite{begleiter} was put with a kind of hanging
291 % punctuation. But in the preface Frank Mittelbach stated, that there
292 % doesn't exist a ready to use package for \LaTeXe{} and one would have
293 % to wait for \LaTeX3 very likely. And as you can easily see, only the
294 % hyphens and the punctuation signs were protruded. That was the
295 % situation of November 1994.
296 %
297 % But the situation seemed to be the same in 2000. I found
298 % \emph{nothing} really usable with \LaTeXe{} to put a longer text with
299 % (longer than some paragraphs). Then someone pointed out,
300 % that character protruding is a feature provided by the new
301 % pdf\TeX. At first I was a bit sceptical because I didn't want to
302 % switch, needing the possibility to use |EPS| input (I heavily
303 % used |psfrag|). But soon it was pointed out, that pdf\TeX{} supports
304 % |DVI| output and that in this mode pdf\TeX{} has no limitations
305 % compared to \LaTeX. Shortly after getting this information I found
306 % |protcode.tex| provided by H\`{a}n Th\'{\^{e}} Th\`{a}nh.
307 %
308 % That I transfered to a packaged for my own use and as some people
309 % showed interests on |de.comp.text.tex| I posted it
310 % there.\footnote{The first version was named |optrandausgleich.sty|
311 % and a second |pdftexfeats.sty|.} But it was never what I expected
312 % by a package to submit it to |CTAN|. It lacked documentation and
313 % the support of setting the character protruding depending on the
314 % used font.
315 %
316 % First I wanted to write a package adjusting some of the additional
317 % features of pdf\TeX{} (for instance the security features). But in
318 % discussions with Heiko Oberdiek he convinced me, that it is better
319 % to have some smaller packages instead of putting all into
320 % one. Additionally the resulting |pdfcprot| package grew more complex
321 % than expected at first. So the code is complex enough for me to
322 % maintain and Heiko does a really good job with |pdfsec.sty| (he
323 % supports more than pdf\TeX).
324 %
325 % \subsection{Provided Features}
326 % This package provides a very simple interface to support a font
327 % dependent selection of the adjustment of the character
328 % protrusion. You can easily choose, which fonts will be protruded
329 % depending on high level \LaTeXe{} font selection not knowing which
330 % font actually will be used. Further on it is very simple to adjust
331 % the character protrusion for fonts not ``supported'' directly (only
332 % for Palatino character protrusion adjustment set (|CPA|) is provided and
333 % that will be used for \emph{all} fonts, not having a special |CPA|).
334 %
335 % Further on an option to switch the pdf\TeX{} output to |DVI| and a
336 % command testing, whether you use |PDF| output or not are
337 % provided.\footnote{That was originally from \KOMAScript.}
338 %
339 % \section{Using this package.}
340 %
341 % First you have to invoke it with a |\usepackage{pdfcprot}| in
342 % the preamble of your document. Of course you have to use pdf\TeX{} to
343 % get any effect, but the package just gives a warning if you don't.
344 %
345 % \subsection{Requirements}
346 %
347 % This package need just two packages, which should be part of every
348 % \LaTeXe{} distribution not too old: |keyval.sty| (part of the
349 % |graphicx| bundle) and |ifthen.sty|). If they're not installed, get
350 % them from |CTAN|.
351 %
352 % \subsection{Character Protruding}
353 %
354 % For using the character protruding two user interfaces are
355 % implemented. If you just want to activate it for the most common
356 % used fonts, not thinking much about internals just use the
357 % \emph{simple} interface.
358 %
359 % When you don't like the preselection of the fonts being adjusted for
360 % character protruding, you may want to use the \emph{advanced} user
361 % interface. As the usage of many fonts for character protruding is
362 % very memory consuming, there may be some cases you want to choose
363 % non-ambiguous the fonts getting character protruding sparing any useless
364 % font.
365 %
366 % \subsubsection{The \emph{Simple} User Interface}
367 %
368 % For the ``normal'' \LaTeXe{} user, who just wants to activate the
369 % character protruding one option is provided.
370 % \DescribeOption{activate}{\Option{activate [=none, normal]}}If you
371 % just want to activate character
372 % protruding for the most used fonts just say |activate| or
373 % |activate=normal| (these two forms are synonyms). For which fonts the
374 % character protrusion will be enabled is shown in
375 % table~\ref{tab:activate}.
376 %
377 % By default character protruding won't be enabled, but if you want the
378 % options to reflect it say |activate=none|.
379 %
380 % \begin{table}
381 % \centering%
382 % \begin{tabular}{l l l}\hline\hline
383 % family & series & shape\\\hline
384 % |\rmfamily| & |\mdseries| & |\upshape|\\
385 % & & |\itshape|\\
386 % & |\bfseries| & |\upshape|\\
387 % |\sffamily| & |\mdseries| & |\upshape|\\
388 % & & |\itshape| \\
389 % & & |\slshape| \\
390 % |\sffamily| & |\bfseries| & |\upshape|\\
391 % \hline\hline
392 % \end{tabular}\\[2mm]
393 % sizes for all fonts: |\footnotesize|, |\small|,
394 % |\normalsize| and |\large|
395 % \caption{Fonts for which character protrusion will be enabled
396 % using the package option
397 % \texttt{avtivate=normal}.}\label{tab:activate}
398 % \end{table}
399 %
400 % \emph{Some comments:} You may wonder why character protruding is
401 % activated for so many font types and not just for |\rmfamily||\mdseries||\upshape|
402 % and maybe |\sffamily| |\mdseries||\upshape| using |activate| or
403 % |activate=normal| as package option. That is done
404 % because I don't want to bother the ``normal'' \LaTeXe-user with more
405 % than passing the one option to the package but I still want to
406 % catch the fonts, most likely to be used in cases ``needing''
407 % character protrusion (this means justified text). As this may appear
408 % not only for the text type (but e.g. also for captions), though the
409 % two fonts mentioned above are not sufficient.
410 %
411 % \subsubsection{The \emph{Advanced} User Interface}
412 %
413 % In some cases it may be favourable to have a bit more control over the font
414 % selection for the character protruding. With the commands described
415 % in this section a very fine selection is possible.
416 %
417 % The first command to be mentioned has a very simple syntax. It
418 % allows the user to select a specific font encoding to be set up. It
419 % will perform the same setup for the given fontencodings as the
420 % |activate=normal| package option does without selection of font
421 % encoding. As for now |pdfcprot| has no opportunity to automagically
422 % detect the loaded font encodings, it will be necessary for setting
423 % up character protuding in cases where more than one font encodings
424 % are used.
425 %
426 % \newlength{\myT}\settowidth{\myT}{\texttt{textcomp}}
427 % \DescribeMacro{\setupcharprotrudingforencoding}{\Macro{setupcharprotrudingforencoding}\Parameter{\emph{encodings}}}\begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
428 % \emph{encodings} & This parameter is a comma sepapated list of font
429 % encodings to be set up. White space is not allowed.\\
430 % \end{tabularx}
431 %
432 % \begin{description}
433 % \item[Example 1:] The usage of
434 %
435 % \begin{quote}
436 % |\usepackage[activate=none]{pdfcprot}|\\
437 % |\setupcharprotrudingforencoding{T1,T2A}|\\
438 % |\activatecharprotruding|
439 % \end{quote}
440 %
441 % will set up character protruding for both |T1| and
442 % |T2A| font encodings. This might be nessessary for example, if you
443 % want to use both German and Russian text in one document.
444 % \end{description}
445 %
446 % The second command to be mentioned has a high level syntax. For that
447 % it's possible to choose the font by high level \LaTeXe{} font
448 % selection commands but only \emph{one} font at a time is
449 % selectable. To setup the character protruding for more than one
450 % font, this command has to be called more than once.
451 % \DescribeMacro{\setupcharprotruding}{\Macro{setupcharprotruding}\Parameter{encoding=\emph{enc},family=\emph{fm}, series=\emph{sr}, shape=\emph{sh}, size=\emph{sz}[, textcomp=\emph{tc}]}}\begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
452 % |encoding| & This tag specifies the encodings to be used. Valid
453 % values are all valid font encodings. If more than one font encoding
454 % shall be set up, they have to be seperated by commas \emph enclosed
455 % in braces.
456 % \emph{This tag is optional. If it is not used, the command will
457 % behave like in versions prior to v1.7}\\
458 % \end{tabularx}
459 % \begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
460 % |family| & This tag specifies the family to be used. |rmfamily| and
461 % |sffamily| are valid values. Any other value will be supposed as a low level
462 % font name (see below). \emph{This tag is mandatory.}\\
463 % \end{tabularx}
464 % \begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
465 % |series| & This tag is used to chose the font series. Valid values are
466 % |mdseries| and |bfseries|. Any other value will be supposed as a low level
467 % font name (see below). \emph{This tag is mandatory.}\\
468 % \end{tabularx}
469 % \begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
470 % |shape| & The font shape is chosen using this tag. As for the other
471 % tags valid values are the high level \LaTeXe{} font selection
472 % commands without trailing backslash, as are: |upshape|, |itshape|,
473 % |slshape|, and |scshape|. Any other value will be supposed as a low level
474 % font name (see below). \emph{This tag is mandatory.}\\
475 % \end{tabularx}
476 % \begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
477 % |size| & This tag is to select the wanted font sizes. Valid values
478 % are also the \LaTeXe{} high level font size selection commands
479 % without trailing backslash, that are: |Huge|, |huge|, |LARGE|,
480 % |Large|, |large|, |normalsize|, |small|, |footnotesize|,
481 % |scriptsize|, and |tiny|. \emph{This tag is mandatory.}\\
482 % \end{tabularx}
483 % \begin{tabularx}{\linewidth}{@{}p{\myT} X@{}}
484 % |textcomp| & This is a boolean switch for choosing whether to
485 % activate character protruding for TS1 encoded fonts also or
486 % not. Values are |true| (|on|, |yes|, |1|), or |false| (|off|, |no|,
487 % |0|). \emph{This tag is optional. If this tag is not specified it
488 % defaults to \emph{|false|}.}\\
489 % \end{tabularx}
490 %
491 % \paragraph{The low level font selection.} The ``normal'' parameters
492 % for font selection are the high level \LaTeXe{} font selection
493 % commands without trailing backslash. Using any option other than
494 % that for the tags |family|, |series|, and |shape|, a low level font
495 % selection command will be suggested. By that it is possible
496 % to setup the character protruding for a font with a user defined font
497 % selection command but without struggling with internal commands of
498 % |pdfcprot.sty|.
499 %
500 % \newlength{\scpw}\settowidth{\scpw}{\ttfamily asetupcharprotrudinga}
501 % \begin{description}
502 % \item[Example 1:] The usage of
503 %
504 % \begin{quote}
505 % |\usepackage[activate=none]{pdfcprot}|\\
506 % |\setupcharprotruding{encoding=T2A,family=rmfamily,series=elec,|\\
507 % \hspace*{\scpw}|shape=ui,size=normalsize,|\\
508 % \hspace*{\scpw}|textcomp=false}|\\
509 % |\activatecharprotruding|
510 % \end{quote}
511 %
512 % will result in a command to setup character protruding like:\\
513 % |\fontencoding{T2A}\selectfont\rmfamily\fontseries{elec}\selectfont|\\
514 % |\fontshape{ui}\selectfont\normalsize\CPROT@setprotcodes@font|
515 %
516 % This means for the font |\rmfamily| with font series |elec| and font
517 % shape |ui| character protruding for |T2A| encoding will be adjusted.
518 % \end{description}
519 %
520 % \begin{description}
521 % \item[Example 2:] Using
522 %
523 % \begin{quote}
524 % |\usepackage[activate]{pdfcprot}|\\
525 % |\setupcharprotruding{family=rmfamily,series=bfseries,|\\
526 % \hspace*{\scpw}|shape=upshape,size=normalsize,|\\
527 % \hspace*{\scpw}|textcomp=false}|\\
528 % |\activatecharprotruding|
529 % \end{quote}
530 %
531 % will lead to a command to setup character protruding like:\\
532 % |{\CPROT@setprotcodes@font}|\\
533 % |{\rmfamily\bfseries\upshape\normalsize\CPROT@setprotcodes@font}|
534 % \end{description}
535 %
536 % A low level selection of the font size is not possible with
537 % |\setupcharprotruding|. For setting
538 % up the character protruding using other font size commands than the
539 % high level \LaTeXe{} ones, the usage of internal |pdfcprot| commands
540 % is needed.
541 %
542 % To setup more than two or three fonts with the command above
543 % described would be a bit long-winded. So there's another command
544 % provided with which it is possible to select more than one font at a
545 % time (with some limitations).
546 % \DescribeMacro{\setupcharprotrudingnumeral}{\Macro{setupcharprotrudingnumeral}\Parameter{encoding=\emph{enc},family=\emph{fm}, series=\emph{sr}, shape=\emph{sh}, size=\emph{sz}[, textcomp=\emph{tc}]}}The
547 % principal meaning of the tags is the same as for
548 % |\setupcharprotruding|, especially |encoding| and |textcomp| is exactly the
549 % same. The only thing differing for |family|, |series|, |shape|, and
550 % |size| is the way the font has to be chosen.
551 %
552 % Here a scheme is used similar to the numeral interface of |chmod| on
553 % UNIX systems. That means every \LaTeXe{} high level font selection
554 % command got a number assigned. More than one fonts are choose able by
555 % adding the fitting numbers. The suitable values are
556 % shown in table~\ref{tab:scpnum}. If one parameter is zero, the actual
557 % command will have no effect,
558 %
559 % \newcommand{\nil}{\textrm{\emph{nil}}}
560 % \begin{table}\centering
561 % \begin{tabular}{@{}>{\ttfamily}r >{\ttfamily}l >{\ttfamily}l
562 % >{\ttfamily}l >{\ttfamily}l@{}}\hline\hline
563 % \textrm{value} & \textrm{family} & \textrm{series} & \textrm{shape}
564 % & \textrm{size}\\\hline
565 % 0 & none & none & none & none\\
566 % 1 & sffamily & bfseries & scshape & tiny\\
567 % 2 & rmfamily & mdseries & slshape & scriptsize\\
568 % 4 & \nil & \nil & itshape & footnotesize\\
569 % 8 & \nil & \nil & upshape & small \\
570 % 16 & \nil & \nil & \nil & normalsize \\
571 % 32 & \nil & \nil & \nil & large \\
572 % 64 & \nil & \nil & \nil & Large \\
573 % 128 & \nil & \nil & \nil & LARGE \\
574 % 256 & \nil & \nil & \nil & huge \\
575 % 512 & \nil & \nil & \nil & Huge
576 % \\\hline\hline
577 % \end{tabular}
578 % \caption{The numbers to use with
579 % \texttt{\string\setupcharprotrudingnumeral}.}\label{tab:scpnum}
580 % \end{table}
581 %
582 % \settowidth{\scpw}{\ttfamily asetupcharprotrudingnumerala}
583 % \begin{description}
584 % \item[Example 1:] For |\rmfamily||\mdseries| the character
585 % protruding is to be adjusted for |\upshape| and |\itshape| for the
586 % sizes |\large|, |\normalsize| and |\footnotesize|. Further for the
587 % font |\rmfamily||\bfseries||\upshape| with the same font sizes, but
588 % in T2A encoding,
589 % character protruding is wanted. To achieve that, one would have to call:
590 %
591 % \begin{quote}
592 % |\usepackage[activate=none]{pdfcprot}|\\
593 % |\setupcharprotrudingnumeral{family=2,series=2,shape=12,size=52}|\\
594 % |\setupcharprotrudingnumeral{encoding=T2A,family=2,series=1,shape=8,size=52}|\\
595 % |\activatecharprotruding|
596 % \end{quote}
597 %
598 % Explanation: |family| and |series| are directly readable from
599 % table~\ref{tab:scpnum}, as is |shape| for the second call of
600 % |\setupcharprotrudingnumeral|. To get the value of |shape| for the
601 % first command, the values for |shape=upshape| and |shape=itshape| (8
602 % and 4) must be added. Similar it's for |size|, one has to add the values
603 % for |size=footnotesize| (4), |size=normalsize| (16), and
604 % |size=large| (32).
605 % \end{description}
606 %
607 % The setup of character protruding using
608 % |\setupcharprotrudingnumeral| is just possible for fonts accessed by
609 % high level \LaTeXe{} font selection commands.
610 %
611 % \paragraph{Remarks.} Both commands to select the fonts for which
612 % character protrusion will be adjusted are \emph{only} usable in the preamble
613 % of the document.
614 %
615 % The attentive reader may have noticed another command needed to
616 % activate the character protrusion when calling the package with the
617 % option |activate=none|. That is due to the fact, that the
618 % |\setupcharprotruding| commands just create a command to call at the
619 % start of the document to adjust the amount of the character
620 % protruding for a special font (on a character basis), but does not
621 % activate the using of character protruding itself.
622 % \DescribeMacro{\activatecharprotruding}{\Macro{activatecharprotruding}\OParameter{\emph{activate}}}Valid
623 % values for \texttt{\emph{activate}} are |true| (|yes|, |on|, |1|),
624 % false (|no|, |off|, |0|), or |compatible| (|compatibility|). Calling
625 % |\activatecharprotruding| without any parameter means |true|. With
626 % |true| and |false| the character protruding is switched on and off
627 % respectively. Why the parameter |compatible|? As the character
628 % protrusion moves some character into the margins, the word spaces on a
629 % line may change. When using |activate=true|, |pdflatex| will take this
630 % additional space into account and by that the line breaks may
631 % change compared to the use of ``normal'' |latex|. If the line breaks
632 % are wanted as got by using |latex| but with a active character
633 % protruding, you'll have to call |\activatecharprotruding| with the
634 % parameter |compatible|.
635 %
636 % The activation of the character protruding is group specific. So it
637 % is possible to activate and deactivate the character protrusion for
638 % some parts of a text (but not the \emph{amount} of the character
639 % protrusion of a special font).
640 %
641 % The package output is very informative when looking at the |log| file,
642 % but the output to |stdout| is normally not. To change that, there's
643 % one option
644 % \DescribeOption{quiet}{\Option{quiet=\emph{qt}}} Possible values for
645 % this parameter are the booleans used in this package (|true|, |on|,
646 % |yes|, |1|, |false|, |off|, |no|, and |0|). When saying |quiet=no|
647 % many of the package info will be warnings instead. That is a good
648 % method to see, which font character protrusion adjustment actually
649 % will be used (and for which font).
650 %
651 % \subsection{The Character Protruding Adjustment -- Creating and
652 % Using a New One for a Specific Font}
653 %
654 % \emph{This section is a bit technical and a study of the source code
655 % may be very helpful (and is recommended).}\\
656 %
657 % To understand what the purpose of this section is, a description of
658 % the strategy of the package is needed. So what does the package do?
659 % The command |\setupcharprotruding| and its numerical equivalent will
660 % create a command with the fitting font selection commands and a
661 % command |\CPROT@setprotcodes@font|. The whole command will be called at the
662 % start of the document. Then the font selection takes place and
663 % |\CPROT@setprotcodes@font| looks, what font was requested
664 % actually.\footnote{The commands used to determine which font is loaded
665 % (\texttt{\string\f@family}, \texttt{\string\f@series},
666 % \texttt{\string\f@shape}, \texttt{\string\f@encoding}) return the
667 % font requested to \TeX{} \emph{not} the font actually used, so it
668 % seems. That means for instance if you request a bold Palatino font
669 % with \texttt{\string\bfseries}, \TeX{} will try to load \texttt{ppl/bx/n} but will only
670 % find and use \texttt{ppl/b/n} (at least on my system). So as series the
671 % actual font will be \texttt{b} and not \texttt{bx} which will be reported by the
672 % use of \texttt{\string\f@series}. Though one could think it would be needed to
673 % adjust the character protruding in a \texttt{CPA} for
674 % \texttt{pplbn}, it will be looked for \texttt{pplbxn} instead.} Then it
675 % looks if a command named |\f@family| |\f@series||\f@shape\f@encoding| is
676 % defined (the concatenate values of the commands). If it is, this command will be
677 % used to setup the character protruding, if not |pdfcrpot| will try
678 % to load a file named |fontname.cpa| containing this command. If that
679 % fails as well, a fallback font will be used (by default it will be
680 % |pplmn| with the appropriate font encoding).
681 %
682 % To define the command to set up the character protruding, an
683 % external file was chosen to get an easier maintenance. Defining it
684 % in the package would enlarge the package noticeably and the package
685 % would soon become overcrowded.
686 %
687 % So if a special character protruding setting for a
688 % font is wanted, copy the file |pplmnT1.cpa| (for T1 encoding) to the
689 % required fontname|.cpa| and change the definition of the command
690 % accordingly.
691 %
692 % \begin{description}
693 % \item[Example: ] A special character protruding setup for the bold version of Palatino in
694 % T1 encoding is wanted. As the \LaTeXe{} command
695 % |\bfseries| selects an bold expanded version (|bx|), the font name would be |pplbxnT1.cpa| and
696 % the command to define |\pplbxnT1|. That means to copy |pplmnT1.cpa|
697 % to |pplbxnT1.cpa| and change the definition of |\csname pplmnT1\endcsname|
698 % to |\csname pplbxnT1\endcsname| and further on to adjust the wanted
699 % |\rpcode| and |\lpcode| values.
700 % \end{description}
701 %
702 % For the meaning of the commands and values in the |CPA| see the documentation of the code
703 % below and H\`{a}n Th\'{\^{e}} Th\`{a}nh's
704 % thesis~\cite{hanthethanh:thesis}. There he writes:
705 % \begin{quote}
706 % ``\dots A set of common character protruding factors gave quite reasonable
707 % results in most cases. Non-typical type faces may require further
708 % adjustments, which can be done easily.''
709 % \end{quote}
710 % So for the most fonts the default values may be acceptable, even
711 % though they are adjusted for Palatino. By using the |CPA| files and
712 % defining an extra command per font it is very easy to add setups
713 % for ``non-typical'' type faces without bothering a ``normal''
714 % \LaTeXe{} user of choosing the right setup because it gets
715 % automatically selected.
716 %
717 % \subsection{Customising the Package}
718 %
719 % There's one command provided to customise the package.
720 % \DescribeMacro{\setfallbackfont}{\Macro{setfallbackfont}\Parameter{\textit{string}}}As
721 % described in the section before, this package will look for a
722 % character protrusion adjustment for a \emph{fallback} font, when not
723 % finding a |CPA| for the actual font. By default this is
724 % |pplmn|. That is changeable using |\setfallbackfont|, if a special
725 % |CPA| was created and suits better. The \emph{|string|} used in
726 % |\setfallbackfont| specifies the font \emph{without} the character
727 % encoding. That will be determined by the package.
728 %
729 % \subsubsection{System-wide customisation}
730 %
731 % For further customisation this package looks for a
732 % \DescribeOption{pdfcprot.cfg}{\Option{pdfcprot.cfg}}somewhere
733 % in your \TeX{} paths. If found it'll be included before any option is
734 % validated. So you can change some settings on a system-wide
735 % basis. This file is the best place to change some internal commands,
736 % if needed, for instance to change which fonts will be activated for
737 % character protruding when using the option |activate=normal| (by
738 % redefining |\CPROT@setupcharprotruding@normal|).
739 %
740 % \subsection{Other Commands and Options}
741 %
742 % Belonging not really to character protrusion this package provides
743 % two other commands and one additional option, that may be useful in
744 % dealing with pdf\TeX.
745 %
746 % First there's is an option to get a |DVI| output using pdf\TeX.
747 % \DescribeOption{DVIoutput}{\Option{DVIoutput}}This may be useful
748 % if one can't switch completely to pdf\TeX, because in this mode all
749 % the additional features of pdf\TeX\footnote{That's not completely
750 % true though. The supported type of images is in |DVI| mode the same
751 % as using |latex|.} (as character protruding) are
752 % available but besides there're no compatibility problems and it
753 % behaves the same as ``normal'' \LaTeX. So it is for instance possible to include
754 % |EPS| (and use |psfrag|!). Principally it is not needed to supply
755 % such an option, because by redefining |\pdfoutput| to |0| you'll get
756 % |DVI|. The only problem is, that some packages only look if
757 % |\pdfoutput| is defined to decide, if |PDF| output is
758 % wanted. So
759 % this option does an additional
760 % |\let\pdfoutput\undefined|.\footnote{Most actual versions of packages
761 % having had problems may treat it correctly by now. But who has all
762 % packages installed in most recent versions?}
763 %
764 % Further on there are two \LaTeXe{}-commands to decide, if pdf\TeX{}
765 % is used and if |PDF| as output is wanted.
766 % \DescribeMacro{\ifpdftex}{\Macro{ifpdftex}\Parameter{\emph{\texttt{true}}}\Parameter{\emph{\texttt{false}}}} and
767 % \DescribeMacro{\ifpdfoutput}{\Macro{ifpdfoutput}\Parameter{\emph{\texttt{true}}}\Parameter{\emph{\texttt{false}}}}
768 % The latter one was originally
769 % taken from the \KOMAScript{} package. So you can use
770 % the same |\ifpdfoutput| command with or without \KOMAScript. The
771 % meaning shouldn't change neither in \KOMAScript{} nor in this
772 % package and the actual definition is not cruel for using this
773 % command\footnote{If you want a \TeX{} \texttt{\bslash if} switch, look for \texttt{ifpdf.sty} on
774 % CTAN written by Heiko Oberdiek.}.
775 %
776 % The command |\ifpdftex| is very similar but leads to a decision
777 % depending on the usage of pdf\TeX{} or not. This is useful for the
778 % activation of special features of pdf\TeX{} not being special to the
779 % production of |PDF| itself (as character protruding is).
780 %
781 % \section{Bugs and Caveats}
782 %
783 % Hopefully there're no bugs left, but only features |;->|. But one
784 % thing: right now this package contains just character protruding
785 % settings for OT1 and T1 encoded fonts (and one character of TS1). Further there
786 % are some (small) problems (two).
787 %
788 % First, the creating of the code to do the adjustment of the character
789 % protruding at the |\begin{document}| is a bit time consuming. The
790 % more fonts you want to use with character protruding, the longer is the
791 % time needed. Also the needed memory by pdf\TeX{} can not be
792 % neglected. Here it's also especially a problem when using many fonts
793 % (in companion with character expansion it's just increasing). But
794 % that's not a big problem, because the standard amount of memory for
795 % pdf\TeX{} is for computer systems of today just a bit small
796 % adjusted (65535 bytes!). Though you may want to change (or set) the
797 % parameter |pdf_mem_size| in your |texmf.cnf|.\footnote{That is a
798 % suggestion of myself. I don't know what the authors of pdf\TeX{} say
799 % to that!.}
800 %
801 % \section{Contributing}
802 %
803 % Almost any contribution is welcome. Really needed is the
804 % contribution of |CPA|'s for other encodings than T1 and OT1. But T1
805 % and OT1 |CPA|'s may not be perfect. The glyphs are complete for
806 % German (I hope so) but I don't know for other languages.
807 %
808 % Also |CPA| for fonts not looking good with the distributed
809 % ``default'' values would be nice, even if these fonts are not widely
810 % used.
811 %
812 % Any bug hunting is welcome. Also changes to improve the performance
813 % are likely to be included, if the performance increase is
814 % significant and the readability of the package is not distorted too
815 % much (a good readability was a main focus when writing this package;
816 % that's one reason why almost on all places where possible \LaTeXe{}
817 % commands are used.).
818 %
819 % If you have some changes, requests, ideas or any other things
820 % regarding this package feel free to mail to Tobias Schlemmer:
821 % |[email protected]|.
822 % \changes{1.7}{2004/06/28}{New supporter}
823 %
824 % \section{Acknowledgements}
825 %
826 % All of the people are already mentioned in the text above, but I
827 % have to emphasise some things.
828 %
829 % For these bundle I used many from \KOMAScript. Particularly the
830 % boring but needed things around the package (|README.txt|,
831 % |INSTALL.txt| and the preambles in |pdcprot.ins|) were designed
832 % using files from \KOMAScript. In some parts I just changed
833 % \KOMAScript{} to |pdfcprot| (were appropriate). So I owe much to
834 % Markus Kohm (or the users of this package, because these files would
835 % be much shorter and maybe indistinct). As already stated there's
836 % some code taken from \KOMAScript.
837 %
838 % Further on some important role played Heiko Oberdiek (I don't think
839 % he guesses so). As stated in the History I first wanted to create a
840 % package for many (all) special pdf\TeX{} features (character
841 % protruding, font expansion, |PDF| security options). But he
842 % convinced me to write a package just concerning character
843 % protruding -- luckily, because it's got to more code than I expected
844 % first.
845 %
846 % And last but not least the authors of pdf\TeX{} have to be
847 % mentioned. Some code comes directly from them.
848 %
849 % \nocite{*}
850 %\begin{thebibliography}{1}
851
852 %\bibitem{hanthethanh:thesis}
853 %H\`{a}n~Th\'{\^{e}} Th\`{a}nh.
854 %\newblock {\em Micro-typographic extensions to the {\TeX} typesetting system}.
855 %\newblock Dissertation, Masaryk University Brno: Faculty of Informatics,
856 % October 2000.
857
858 %\bibitem{begleiter}
859 %Michel Goosens, Frank Mittelbach, and Alexander Samarin.
860 %\newblock {\em Der {\LaTeX}-Begleiter}.
861 %\newblock Addison-Wesley, 1st edition, 1994.
862
863 %\end{thebibliography}
864 % \StopEventually{}
865 % \appendix
866 % \section{The Code Itself}
867 %
868 % First some remarks: the documentation may be inaccurate in some
869 % places, so look at the code and it'll be very likely that the
870 % documentation is incomplete.
871
872 % The main attention writing this code
873 % was turned on creating a good human readable code. So I decided to
874 % use as much \LaTeXe{} control sequences as possible and as less
875 % \TeX{} commands as needed. This may slow down the code, but I don't
876 % think that's really important.
877 %
878 % \subsection{The Package}
879 %
880 % \begin{macrocode}
881 %<*package>
882 % \end{macrocode}
883 %
884 % First the requirement of \LaTeXe{}\footnote{The version needed was
885 % taken from |ifthen.sty|, because this package does request it. But I
886 % don't know if |pdfcprot.sty| may require some newer version because
887 % of some construct being used. If someone finds something which
888 % requires a newer version of \LaTeXe{} please tell me.} and the
889 % declaration of the package.
890 % \begin{macrocode}
891 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
892 \ProvidesPackage{pdfcprot}[2002/02/27 v1.5 character protruding using
893 pdflatex (cs)]
894 % \end{macrocode}
895 % Then the required packages are loaded. Only |ifthen.sty| and
896 % |keyval.sty| are needed. These should be part of any decent
897 % \LaTeXe-distribution |;->|.
898 % \begin{macrocode}
899 \RequirePackage{ifthen}
900 \RequirePackage{keyval}
901 % \end{macrocode}
902 % These are the counters to determine for which font character
903 % protruding will be activate by using |\setupcharprotruding| and
904 % |\setupcharprotrudingnumeral|. The possible values are listed in
905 % table~\ref{tab:scpnum}. Further on |CPROT@family|, |CPROT@series|,
906 % and |CPROT@shape| can be |-1|, which is used for the low level font
907 % selection by |\setupcharprotruding|. The |...@temp| counters are
908 % needed when creating |\CPROT@setprotcodes@|.
909 % \begin{macrocode}
910 \newcounter{CPROT@family}
911 \newcounter{CPROT@family@temp}
912 \newcounter{CPROT@series}
913 \newcounter{CPROT@series@temp}
914 \newcounter{CPROT@shape}
915 \newcounter{CPROT@shape@temp}
916 \newcounter{CPROT@size}
917 \newcounter{CPROT@size@temp}
918 % \end{macrocode}
919 % For determining if the character protruding will be activated for the
920 % corresponding TS1 encoded font a boolean is used.
921 % \begin{macrocode}
922 \newboolean{CPROT@textcomp}
923 % \end{macrocode}
924 % \begin{option}{quiet}
925 % For providing the |quiet| option a (global) boolean is used. By
926 % default it is set to |true|, so there're little warnings (but it
927 % will be written as info to the logs).
928 % \begin{macrocode}
929 \newboolean{CPROT@quiet}
930 \setboolean{CPROT@quiet}{true}
931 % \end{macrocode}
932 % \end{option}
933 % A temporary counter (|\@tempcnta| could be used instead).
934 % \begin{macrocode}
935 \newcounter{CPROT@temp@chars}
936 % \end{macrocode}
937 % \begin{macro}{\CPROT@lowlevel@encoding}
938 % \begin{macro}{\CPROT@lowlevel@family}
939 % \begin{macro}{\CPROT@lowlevel@series}
940 % \begin{macro}{\CPROT@lowlevel@shape}
941 % Some ``vars'' are needed to store the low level names if some
942 % low level font was requested using |\setupcharprotruding|. (These are
943 % just temporary commands only used while creating the command to do
944 % the actual adjustment of the character protrusion.)
945 % \changes{1.7}{2004/06/28}{\texttt{\protect\string\string\CPROT@lowlevel@encoding} added}
946 % \begin{macrocode}
947 \newcommand*{\CPROT@lowlevel@encoding}{}
948 \newcommand*{\CPROT@lowlevel@family}{}
949 \newcommand*{\CPROT@lowlevel@series}{}
950 \newcommand*{\CPROT@lowlevel@shape}{}
951 % \end{macrocode}
952 % \end{macro}
953 % \end{macro}
954 % \end{macro}
955 % \end{macro}
956 % \begin{macro}{\CPROT@resetall}
957 % This is to reset all the counters to zero, so that a new
958 % |\setupcharprotruding|\dots command won't activate something
959 % requested with a former command.
960 % \begin{macrocode}
961 \newcommand*{\CPROT@resetall}{%
962 \setcounter{CPROT@family}{0}%
963 \setcounter{CPROT@series}{0}%
964 \setcounter{CPROT@shape}{0}%
965 \setcounter{CPROT@size}{0}%
966 \setboolean{CPROT@textcomp}{false}%
967 \edef\CPROT@lowlevel@encoding{}%
968 }
969 % \end{macrocode}
970 % \end{macro}
971 % \begin{macro}{\CPROT@setprotcodes@}
972 % \begin{macro}{\CPROT@setprotcodes@add}
973 % \begin{macro}{\CPROT@setprotcodes@temp}
974 % These are internal macros regarding the creation of the actual
975 % command, to adjust the character protruding for the fonts
976 % wanted. |\CPROT@setprotcodes@| actually will contain the command,
977 % whereas |\CPROT@setprotcodes@temp| is used to store part of this
978 % command temporary. |\CPROT@setprotcodes@add| is called by
979 % |\setupcharprotruding| and |\setupcharprotrudingnumeral|.
980 % \begin{macrocode}
981 \newcommand*{\CPROT@setprotcodes@}{}
982 \newcommand*{\CPROT@setprotcodes@add}{%
983 % \end{macrocode}
984 % The counter |CPROT@family@temp| is set, which will be used
985 % internally to determine which fonts were requested.
986 % \begin{macrocode}
987 \setcounter{CPROT@family@temp}{\value{CPROT@family}}%
988 % \end{macrocode}
989 % Here the actual evaluation will take place starting with the font
990 % encoding.
991 % \changes{1.7}{2004/06/28}{starting with fontencoding}
992 % \begin{macrocode}
993 \CPROT@aac@encoding%
994 }
995 \newcommand*{\CPROT@setprotcodes@temp}{}
996 % \end{macrocode}
997 % \end{macro}
998 % \end{macro}
999 % \end{macro}
1000 % \begin{macro}{\CPROT@packageinfo}
1001 % \begin{macro}{\CPROT@packagewarning}
1002 % \begin{macro}{\CPROT@packageerror}
1003 % These are just substitutes for |\PackageInfo|, |\PackageWarning|,
1004 % and |\PackageError|. It's just to spare some writing (esp. \{ snf \}
1005 % are ``difficult'' to reach on a German keyboard) and it's simplier
1006 % to customise if I would want to do something other than normal.
1007 % \begin{macrocode}
1008 \newcommand{\CPROT@packageinfo}[1]{%
1009 \PackageInfo{pdfcprot}{#1}%
1010 }
1011 \newcommand{\CPROT@packagewarning}[1]{%
1012 \PackageWarning{pdfcprot}{#1}%
1013 }
1014 \newcommand{\CPROT@packageerror}[1]{%
1015 \PackageError{pdfcprot}{#1}%
1016 }
1017 % \end{macrocode}
1018 % \end{macro}
1019 % \end{macro}
1020 % \end{macro}
1021 % \begin{macro}{\CPROT@packageinfo@or@warning}
1022 % To support the Option |quiet| this command is used. It decides on
1023 % the boolean |CPROT@quiet| wether to give out a message as warning or
1024 % as info.
1025 % \begin{macrocode}
1026 \newcommand{\CPROT@packageinfo@or@warning}[1]{%
1027 \ifthenelse{\boolean{CPROT@quiet}}{%
1028 \CPROT@packageinfo{#1}%
1029 }{%
1030 \CPROT@packagewarning{#1}%
1031 }%
1032 }%
1033 % \end{macrocode}
1034 % \end{macro}
1035 % \begin{Key}{encoding}
1036 % \changes{1.7}{2004/06/28}{added}
1037 % \begin{macrocode}
1038 \define@key{CPROT}{encoding}{%
1039 \ifthenelse{\equal{#1}{encodingdefault}}{%
1040 \edef\CPROT@lowlevel@encoding{\encodingdefault}% \encodingdefault will be set.
1041 }{% I assume a low level encodingname is given
1042 \renewcommand*{\CPROT@lowlevel@encoding}{#1}%
1043 }%
1044 }
1045 % \end{macrocode}
1046 % \end{Key}
1047 % \begin{Key}{family}
1048 % \changes{1.2}{2001/10/31}{removed value \texttt{all}; if you want all, you
1049 % should use the numeral interface}
1050 % \begin{macrocode}
1051 \define@key{CPROT}{family}{%
1052 \ifthenelse{\equal{#1}{rmfamily}}{%
1053 \setcounter{CPROT@family}{2}% \rmfamily will be set
1054 }{%
1055 \ifthenelse{\equal{#1}{sffamily}}{%
1056 \setcounter{CPROT@family}{1}% \sffamily will be set
1057 }{% I assume a low level fontname is given
1058 \setcounter{CPROT@temp@chars}{0}%
1059 \expandafter\@tfor\expandafter\@tempb\expandafter:\expandafter=#1\do{%
1060 \stepcounter{CPROT@temp@chars}%
1061 }%
1062 \ifthenelse{\value{CPROT@temp@chars}>4}{%
1063 \CPROT@packageinfo@or@warning{None of the keywords 'all',\MessageBreak
1064 'rmfamily' or 'sffamily' was found. I assume you gave a\MessageBreak
1065 low level font name but it is at least unusual that a\MessageBreak
1066 TeX-fontname has more than 4 characters. I assume you know\MessageBreak
1067 what you're doing and continue, but the selection of the\MessageBreak
1068 font may fail!%
1069 }%
1070 \CPROT@packageinfo{It seem's as you want to use a low level\MessageBreak
1071 command for font selection. -- You're for yourself.%
1072 }%
1073 }{}%
1074 \setcounter{CPROT@family}{-1}%
1075 \renewcommand*{\CPROT@lowlevel@family}{#1}%
1076 }%
1077 }%
1078 }
1079 % \end{macrocode}
1080 % \end{Key}
1081 % \begin{Key}{series}
1082 % \changes{1.2}{2001/10/31}{removed value \texttt{all}; if you want all, you
1083 % should use the numeral interface}
1084 % \begin{macrocode}
1085 \define@key{CPROT}{series}{%
1086 \ifthenelse{\equal{#1}{mdseries}}{% medium series
1087 \setcounter{CPROT@series}{2}%
1088 }{%
1089 \ifthenelse{\equal{#1}{bfseries}}{% bold series
1090 \setcounter{CPROT@series}{1}%
1091 }{% here the low level interface is suspected
1092 \setcounter{CPROT@temp@chars}{0}%
1093 \expandafter\@tfor\expandafter\@tempb\expandafter:\expandafter=#1\do{%
1094 \stepcounter{CPROT@temp@chars}%
1095 }%
1096 \ifthenelse{\value{CPROT@temp@chars}>4}{%
1097 \CPROT@packageinfo@or@warning{None of the keywords 'all',\MessageBreak
1098 'mdseries' or 'bfseries' was found. I assume you gave a\MessageBreak
1099 low level font name but a series identifier should consist\MessageBreak
1100 of 4 characters at maximum. I assume you know what you're\MessageBreak
1101 doing and continue, but the selection of the font will\MessageBreak
1102 very likely fail!%
1103 }%
1104 \CPROT@packageinfo{It seem's as you seem want to use a low level\MessageBreak
1105 command for font selection. -- You're for yourself.%
1106 }%
1107 }{}%
1108 \setcounter{CPROT@series}{-1}%
1109 \renewcommand*{\CPROT@lowlevel@series}{#1}%
1110 }%
1111 }%
1112 }%
1113 % \end{macrocode}
1114 % \end{Key}
1115 % \begin{Key}{shape}
1116 % \changes{1.2}{2001/10/31}{removed value \texttt{all}; if you want all, you
1117 % should use the numeral interface}
1118 % \begin{macrocode}
1119 \define@key{CPROT}{shape}{%
1120 \ifthenelse{\equal{#1}{upshape}}{%
1121 \setcounter{CPROT@shape}{8}%
1122 }{%
1123 \ifthenelse{\equal{#1}{itshape}}{%
1124 \setcounter{CPROT@shape}{4}%
1125 }{%
1126 \ifthenelse{\equal{#1}{slshape}}{%
1127 \setcounter{CPROT@shape}{2}%
1128 }{%
1129 \ifthenelse{\equal{#1}{scshape}}{%
1130 \setcounter{CPROT@shape}{1}%
1131 }{% low lewel format
1132 \setcounter{CPROT@temp@chars}{0}%
1133 \expandafter\@tfor\expandafter\@tempb\expandafter:\expandafter=#1\do{%
1134 \stepcounter{CPROT@temp@chars}%
1135 }%
1136 \ifthenelse{\value{CPROT@temp@chars}>2}{%
1137 \CPROT@packageinfo@or@warning{None of the keywords 'all',\MessageBreak
1138 'upshape', 'itshape', 'slshape' or 'scshape' was\MessageBreak
1139 found. I assume you gave a low level font name but it\MessageBreak
1140 is at least unusual that a shape identifier has more\MessageBreak
1141 than 2 characters. I assume you know what you're doing\MessageBreak
1142 and continue, but the selection of the font will very\MessageBreak
1143 likely fail!%
1144 }%
1145 \CPROT@packageinfo{It seem's as you seem want to use a low level\MessageBreak
1146 command for font selection. -- You're for yourself.%
1147 }%
1148 }{}%
1149 \setcounter{CPROT@shape}{-1}%
1150 \renewcommand{\CPROT@lowlevel@shape}{#1}%
1151 }%
1152 }%
1153 }%
1154 }%
1155 }
1156 % \end{macrocode}
1157 % \end{Key}
1158 % \begin{Key}{size}
1159 % \changes{1.2}{2001/10/31}{removed value \texttt{all}; if you want all, you
1160 % should use the numeral interface}
1161 % \begin{macrocode}
1162 \define@key{CPROT}{size}{%
1163 \ifthenelse{\equal{#1}{Huge}}{%
1164 \setcounter{CPROT@size}{512}%
1165 }{%
1166 \ifthenelse{\equal{#1}{huge}}{%
1167 \setcounter{CPROT@size}{256}%
1168 }{%
1169 \ifthenelse{\equal{#1}{LARGE}}{%
1170 \setcounter{CPROT@size}{128}%
1171 }{%
1172 \ifthenelse{\equal{#1}{Large}}{%
1173 \setcounter{CPROT@size}{64}%
1174 }{%
1175 \ifthenelse{\equal{#1}{large}}{%
1176 \setcounter{CPROT@size}{32}%
1177 }{%
1178 \ifthenelse{\equal{#1}{normalsize}}{%
1179 \setcounter{CPROT@size}{16}%
1180 }{%
1181 \ifthenelse{\equal{#1}{small}}{%
1182 \setcounter{CPROT@size}{8}%
1183 }{%
1184 \ifthenelse{\equal{#1}{footnotesize}}{%
1185 \setcounter{CPROT@size}{4}%
1186 }{%
1187 \ifthenelse{\equal{#1}{scriptsize}}{%
1188 \setcounter{CPROT@size}{2}%
1189 }{%
1190 \ifthenelse{\equal{#1}{tiny}}{%
1191 \setcounter{CPROT@size}{1}%
1192 }{% low lewel format
1193 \CPROT@packageerror{%
1194 None of the keywords 'all', 'normal' or any LaTeX2e\MessageBreak
1195 font name was found. \MessageBreak
1196 \space For more information how to use\MessageBreak
1197 \string\setupcharprotrudingnumeral see the
1198 pdfcprot manual.%
1199 }%
1200 }{}%
1201 }%
1202 }%
1203 }%
1204 }%
1205 }%
1206 }%
1207 }%
1208 }%
1209 }%
1210 }
1211 % \end{macrocode}
1212 % \end{Key}
1213 % \begin{macrocode}
1214 \define@key{CPROT}{textcomp}{%
1215 \ifthenelse{\equal{#1}{true}\or\equal{#1}{on}\or\equal{#1}{1}\or\equal{#1}{yes}}{%
1216 \setboolean{CPROT@textcomp}{true}%
1217 }{%
1218 \ifthenelse{\equal{#1}{false}\or\equal{#1}{off}\or\equal{#1}{0}\or\equal{#1}{no}}{%
1219 \setboolean{CPROT@textcomp}{false}%
1220 }{%
1221 \CPROT@packageerror{%
1222 ``#1'' is no setting for ``textcomp''. Use\MessageBreak
1223 one of 'true', 'on', 'yes', '1', or 'false', 'off', \MessageBreak
1224 'no', '0' instead.\MessageBreak
1225 }%
1226 }%
1227 }%
1228 }
1229 \define@key{CPROTnum}{encoding}{%
1230 \ifthenelse{\equal{#1}{0}}{%
1231 \renewcommand*{\CPROT@lowlevel@encoding}{}% No encoding will be set.
1232 }{%
1233 \ifthenelse{\equal{#1}{1}}{%
1234 \edef\CPROT@lowlevel@encoding{\encodingdefault}% \encodingdefault will be set.
1235 }{%
1236 \ifthenelse{\equal{#1}{encodingdefault}}{%
1237 \edef\CPROT@lowlevel@encoding{\encodingdefault}% \encodingdefault will be set.
1238 }{% I assume a low level encodingname is given
1239 \renewcommand*{\CPROT@lowlevel@encoding}{#1}%
1240 }%
1241 }%
1242 }%
1243 }
1244 \define@key{CPROTnum}{family}{%
1245 \ifthenelse{#1>0 \and #1<4}{%
1246 \setcounter{CPROT@family}{#1}%
1247 }{%
1248 \ifthenelse{#1=0}{%
1249 \CPROT@packageinfo{%
1250 As you selected '0' (that means 'none') for\MessageBreak
1251 selection of the font family, no font will\MessageBreak
1252 be set up for char protruding.%
1253 }%
1254 }{%
1255 \CPROT@packageerror{%
1256 Your given value '#1' to family in \string\setupcharprotrudingnumeral\MessageBreak
1257 is not valid. Sensible values are between 1 and 3 (inclusive).\MessageBreak
1258 For further information see the pdfcprot manual.%
1259 }%
1260 }%
1261 }%
1262 }
1263 \define@key{CPROTnum}{series}{%
1264 \ifthenelse{#1>0 \and #1<4}{%
1265 \setcounter{CPROT@series}{#1}%
1266 }{%
1267 \ifthenelse{#1=0}{%
1268 \CPROT@packageinfo{%
1269 As you selected '0' (that means 'none') for\MessageBreak
1270 selection of the font series, no font will\MessageBreak
1271 be set up for char protruding.%
1272 }%
1273 }{%
1274 \CPROT@packageerror{%
1275 Your given value '#1' to series in \string\setupcharprotrudingnumeral\MessageBreak
1276 is not valid. Sensible values are between 1 and 15 (inclusive).\MessageBreak
1277 For further information see the pdfcprot manual.%
1278 }%
1279 }%
1280 }%
1281 }
1282 \define@key{CPROTnum}{shape}{%
1283 \ifthenelse{#1>0 \and #1<16}{%
1284 \setcounter{CPROT@shape}{#1}%
1285 }{%
1286 \ifthenelse{#1=0}{%
1287 \CPROT@packageinfo{%
1288 As you selected '0' (that means 'none') for\MessageBreak
1289 selection of the font shape, no font will\MessageBreak
1290 be set up for char protruding.%
1291 }%
1292 }{%
1293 \CPROT@packageerror{%
1294 Your given value '#1' to shape in \string\setupcharprotrudingnumeral\MessageBreak
1295 is not valid. Sensible values are between 1 and 15 (inclusive).\MessageBreak
1296 For further information see the pdfcprot manual.%
1297 }%
1298 }%
1299 }%
1300 }
1301 \define@key{CPROTnum}{size}{%
1302 \ifthenelse{#1>0 \and #1<1024}{%
1303 \setcounter{CPROT@size}{#1}%
1304 }{%
1305 \ifthenelse{#1=0}{%
1306 \CPROT@packageinfo{%
1307 As you selected '0' (that means 'none') for\MessageBreak
1308 selection of the font size, no font will\MessageBreak
1309 be set up for char protruding.%
1310 }%
1311 }{%
1312 \CPROT@packageerror{%
1313 Your given value '#1' to size in \string\setupcharprotrudingnumeral\MessageBreak
1314 is not valid. Sensible values are between 1 and 1023 (inclusive).\MessageBreak
1315 For further information see the pdfcprot manual.%
1316 }%
1317 }%
1318 }%
1319 }
1320 \define@key{CPROTnum}{textcomp}[true]{%
1321 \setkeys{CPROT}{textcomp=#1}%
1322 }
1323 % \end{macrocode}
1324 % \begin{option}{activate}
1325 % \changes{1.3}{2001/11/01}{option \texttt{texttype} added}
1326 % \changes{1.5}{2002/02/27}{option \texttt{texttype} removed; didn't
1327 % work and is IMHO not needed -- use the numerical interface if
1328 % you don't want to activate char protruding for TS1 characters (and
1329 % load the package \texttt{textcomp})}
1330 % \changes{1.6}{2002/08/14}{removed last references to old option
1331 % \texttt{texttype} in the documentation}
1332 % \begin{macrocode}
1333 \define@key{CPROTpackage}{activate}[normal]{%
1334 \ifthenelse{\equal{#1}{normal}}{%
1335 \CPROT@setupcharprotruding@normal%
1336 \ifthenelse{\equal{\CPROT@setprotcodes@}{}}{%
1337 }{% just activate char prot when something was set
1338 \activatecharprotruding[true]%
1339 }%
1340 }{%
1341 \ifthenelse{\equal{#1}{none}}{%
1342 }{%
1343 \CPROT@packageerror{%
1344 Value of activate can be 'normal' or 'none'.\MessageBreak%
1345 \space For more low level setup use \string\setupcharprotruding\MessageBreak%
1346 and see the manual%
1347 }%
1348 }%
1349 }%
1350 }%
1351 % \end{macrocode}
1352 % \end{option}
1353 % \begin{macrocode}
1354 \define@key{CPROTpackage}{quiet}[true]{%
1355 \ifthenelse{\equal{#1}{true}\or\equal{#1}{on}\or\equal{#1}{yes}\or\equal{#1}{1}}{%
1356 \setboolean{CPROT@quiet}{true}%
1357 }{%
1358 \ifthenelse{\equal{#1}{false}\or\equal{#1}{off}\or\equal{#1}{no}\or\equal{#1}{0}}{%
1359 \setboolean{CPROT@quiet}{false}%
1360 }{%
1361 \CPROT@packageerror{%
1362 Value of quiet should be 'true' ('on', 'yes, '1') or\MessageBreak%
1363 'false' ('off', 'no', '0'). You didn't seem to use any\MessageBreak%
1364 of them.%
1365 }%
1366 }%
1367 }%
1368 }%
1369 % \end{macrocode}
1370 % These are internal fuctions to evaluate the counters used to
1371 % indicate which font variation are to get protruding.
1372 % \changes{1.7}{2004/06/28}{added encoding}
1373 % \begin{macrocode}
1374 \newcommand{\CPROT@aac@encoding}{%
1375 \ifthenelse{\equal{\CPROT@lowlevel@encoding}{}}{%
1376 \setcounter{CPROT@family@temp}{\value{CPROT@family}}%
1377 \CPROT@aac@family{}%
1378 }{%
1379 \@for \CPROT@aac@encoding@first:=\CPROT@lowlevel@encoding \do {%
1380 \setcounter{CPROT@family@temp}{\value{CPROT@family}}%
1381 \expandafter\ifx\csname T@\CPROT@aac@encoding@first\endcsname\relax%
1382 \ifthenelse{\boolean{CPROT@quiet}}{%
1383 \CPROT@packagewarning{Encoding \CPROT@aac@encoding@first not defined\MessageBreak
1384 (see log file for more information)}
1385 }{}%
1386 \CPROT@packageinfo@or@warning{%
1387 You've requested char protruding for \CPROT@aac@encoding@first encoding\MessageBreak
1388 but \CPROT@aac@encoding@first encoding doesn't seem to be loaded.\MessageBreak
1389 Maybe you forgot a '\string\usepackage[\CPROT@aac@encoding@first]{fontenc}'.%
1390 }%
1391 \else
1392 \CPROT@aac@family{\protect\fontencoding{\CPROT@aac@encoding@first}\selectfont}%
1393 \fi
1394 }%
1395 }%
1396 }
1397 % \changes{1.5}{2002/02/27}{added a some more protection for each font
1398 % selection command (new \KOMAScript{} adds something to
1399 % some of the font size selection commands)}
1400 % \changes{1.7}{2004/06/28}{added parameter for using with encodings}
1401 % \begin{macrocode}
1402 \newcommand{\CPROT@aac@family}[1]{%
1403 \ifthenelse{\value{CPROT@family@temp}>1}{%
1404 \protected@edef\CPROT@setprotcodes@temp{#1\protect\rmfamily}%
1405 \setcounter{CPROT@series@temp}{\value{CPROT@series}}%
1406 \CPROT@aac@series{\CPROT@setprotcodes@temp}%
1407 \addtocounter{CPROT@family@temp}{-2}%
1408 \CPROT@aac@family{#1}%
1409 }{%
1410 \ifthenelse{\value{CPROT@family@temp}>0}{%
1411 \protected@edef\CPROT@setprotcodes@temp{#1\protect\sffamily}%
1412 \setcounter{CPROT@series@temp}{\value{CPROT@series}}%
1413 \CPROT@aac@series{\CPROT@setprotcodes@temp}%
1414 \addtocounter{CPROT@family@temp}{-1}%
1415 \CPROT@aac@family{#1}%
1416 }{%
1417 \ifthenelse{\value{CPROT@family@temp}<0}{%
1418 \protected@edef\CPROT@setprotcodes@temp{#1\fontfamily{\CPROT@lowlevel@family}\selectfont}%
1419 \setcounter{CPROT@series@temp}{\value{CPROT@series}}%
1420 \CPROT@aac@series{\CPROT@setprotcodes@temp}%
1421 }{}%
1422 }%
1423 }%
1424 }
1425 \newcommand{\CPROT@aac@series}[1]{%
1426 \ifthenelse{\value{CPROT@series@temp}>1}{%
1427 \protected@edef\CPROT@setprotcodes@temp{#1\protect\mdseries}%
1428 \setcounter{CPROT@shape@temp}{\value{CPROT@shape}}%
1429 \CPROT@aac@shape{\CPROT@setprotcodes@temp}%
1430 \addtocounter{CPROT@series@temp}{-2}%
1431 \CPROT@aac@series{#1}%
1432 }{%
1433 \ifthenelse{\value{CPROT@series@temp}>0}{%
1434 \protected@edef\CPROT@setprotcodes@temp{#1\protect\bfseries}%
1435 \setcounter{CPROT@shape@temp}{\value{CPROT@shape}}%
1436 \CPROT@aac@shape{\CPROT@setprotcodes@temp}%
1437 \addtocounter{CPROT@series@temp}{-1}%
1438 \CPROT@aac@series{#1}%
1439 }{%
1440 \ifthenelse{\value{CPROT@series@temp}<0}{%
1441 \protected@edef\CPROT@setprotcodes@temp{%
1442 #1\fontseries\expandafter{\CPROT@lowlevel@series}\selectfont}%
1443 \setcounter{CPROT@shape@temp}{\value{CPROT@shape}}%
1444 \CPROT@aac@shape{\CPROT@setprotcodes@temp}%
1445 }{}%
1446 }%
1447 }%
1448 }
1449 \newcommand{\CPROT@aac@shape}[1]{%
1450 \ifthenelse{\value{CPROT@shape@temp}>7}{%
1451 \protected@edef\CPROT@setprotcodes@temp{#1\protect\upshape}%
1452 \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
1453 \CPROT@aac@size{\CPROT@setprotcodes@temp}%
1454 \addtocounter{CPROT@shape@temp}{-8}%
1455 \CPROT@aac@shape{#1}%
1456 }{%
1457 \ifthenelse{\value{CPROT@shape@temp}>3}{%
1458 \protected@edef\CPROT@setprotcodes@temp{#1\protect\itshape}%
1459 \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
1460 \CPROT@aac@size{\CPROT@setprotcodes@temp}%
1461 \addtocounter{CPROT@shape@temp}{-4}%
1462 \CPROT@aac@shape{#1}%
1463 }{%
1464 \ifthenelse{\value{CPROT@shape@temp}>1}{%
1465 \protected@edef\CPROT@setprotcodes@temp{#1\protect\slshape}%
1466 \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
1467 \CPROT@aac@size{\CPROT@setprotcodes@temp}%
1468 \addtocounter{CPROT@shape@temp}{-2}%
1469 \CPROT@aac@shape{#1}%
1470 }{%
1471 \ifthenelse{\value{CPROT@shape@temp}>0}{%
1472 \protected@edef\CPROT@setprotcodes@temp{#1\protect\scshape}%
1473 \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
1474 \CPROT@aac@size{\CPROT@setprotcodes@temp}%
1475 \addtocounter{CPROT@shape@temp}{-1}%
1476 \CPROT@aac@shape{#1}%
1477 }{%
1478 \ifthenelse{\value{CPROT@shape@temp}<0}{%
1479 \protected@edef\CPROT@setprotcodes@temp{%
1480 #1\fontshape\expandafter{\CPROT@lowlevel@shape}\selectfont}%
1481 \setcounter{CPROT@size@temp}{\value{CPROT@size}}%
1482 \CPROT@aac@size{\CPROT@setprotcodes@temp}%
1483 }{}%
1484 }%
1485 }%
1486 }%
1487 }%
1488 }
1489 \newcommand{\CPROT@aac@size}[1]{%
1490 \ifthenelse{\value{CPROT@size@temp}>511}{%
1491 \protected@edef\CPROT@setprotcodes@temp{#1\protect\Huge}%
1492 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1493 \addtocounter{CPROT@size@temp}{-512}%
1494 \CPROT@aac@size{#1}%
1495 }{%
1496 \ifthenelse{\value{CPROT@size@temp}>255}{%
1497 \protected@edef\CPROT@setprotcodes@temp{#1\protect\huge}%
1498 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1499 \addtocounter{CPROT@size@temp}{-256}%
1500 \CPROT@aac@size{#1}%
1501 }{%
1502 \ifthenelse{\value{CPROT@size@temp}>127}{%
1503 \protected@edef\CPROT@setprotcodes@temp{#1\protect\LARGE}%
1504 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1505 \addtocounter{CPROT@size@temp}{-128}%
1506 \CPROT@aac@size{#1}%
1507 }{%
1508 \ifthenelse{\value{CPROT@size@temp}>63}{%
1509 \protected@edef\CPROT@setprotcodes@temp{#1\protect\Large}%
1510 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1511 \addtocounter{CPROT@size@temp}{-64}%
1512 \CPROT@aac@size{#1}%
1513 }{%
1514 \ifthenelse{\value{CPROT@size@temp}>31}{%
1515 \protected@edef\CPROT@setprotcodes@temp{#1\protect\large}%
1516 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1517 \addtocounter{CPROT@size@temp}{-32}%
1518 \CPROT@aac@size{#1}%
1519 }{%
1520 \ifthenelse{\value{CPROT@size@temp}>15}{%
1521 \protected@edef\CPROT@setprotcodes@temp{#1\protect\normalsize}%
1522 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1523 \addtocounter{CPROT@size@temp}{-16}%
1524 \CPROT@aac@size{#1}%
1525 }{%
1526 \ifthenelse{\value{CPROT@size@temp}>7}{%
1527 \protected@edef\CPROT@setprotcodes@temp{#1\protect\small}%
1528 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1529 \addtocounter{CPROT@size@temp}{-8}%
1530 \CPROT@aac@size{#1}%
1531 }{%
1532 \ifthenelse{\value{CPROT@size@temp}>3}{%
1533 \protected@edef\CPROT@setprotcodes@temp{#1\protect\footnotesize}%
1534 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1535 \addtocounter{CPROT@size@temp}{-4}%
1536 \CPROT@aac@size{#1}%
1537 }{%
1538 \ifthenelse{\value{CPROT@size@temp}>1}{%
1539 \protected@edef\CPROT@setprotcodes@temp{#1\protect\scriptsize}%
1540 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1541 \addtocounter{CPROT@size@temp}{-2}%
1542 \CPROT@aac@size{#1}%
1543 }{%
1544 \ifthenelse{\value{CPROT@size@temp}>0}{%
1545 \protected@edef\CPROT@setprotcodes@temp{#1\protect\protect\tiny}%
1546 \CPROT@aac@textcomp{\CPROT@setprotcodes@temp}%
1547 }{}%
1548 }%
1549 }%
1550 }%
1551 }%
1552 }%
1553 }%
1554 }%
1555 }%
1556 }%
1557 }
1558 \newcommand{\CPROT@aac@textcomp}[1]{%
1559 \ifthenelse{\boolean{CPROT@textcomp}}{%
1560 \@ifundefined{T@TS1}{%
1561 \CPROT@packageinfo@or@warning{%
1562 You've requested char protruding for TS1 encoding\MessageBreak
1563 but TS1 encoding doesn't seem to be loaded.\MessageBreak
1564 Maybe you forgot a '\string\usepackage{textcomp}'.%
1565 }%
1566 \setboolean{CPROT@textcomp}{false}%
1567 }{}%
1568 }{}%
1569 \ifthenelse{\boolean{CPROT@textcomp}}{%
1570 \protected@xdef\CPROT@setprotcodes@{%
1571 \CPROT@setprotcodes@{%
1572 #1\protect\CPROT@setprotcodes@font{%
1573 \fontencoding{TS1}\selectfont\protect\CPROT@setprotcodes@font%
1574 }%
1575 }%
1576 }%
1577 }{%
1578 \protected@xdef\CPROT@setprotcodes@{%
1579 \CPROT@setprotcodes@{%
1580 #1\protect\CPROT@setprotcodes@font%
1581 }%
1582 }%
1583 }%
1584 }
1585 % \end{macrocode}
1586 % \changes{1.6}{2002/08/14}{\texttt{pdfcprot} will not activate the
1587 % character protruding only iff a \texttt{pdftex} version larger 0.14f
1588 % is detected; \emph{nobody} should use older versions for documents
1589 % using character protruding, even 0.14f is
1590 % \emph{really} old right now}
1591 % \begin{macro}{\activatecharprotruding}
1592 % \begin{macrocode}
1593 \newcommand*{\activatecharprotruding}[1][true]{%
1594 \ifpdftex{%
1595 \ifthenelse{\equal{#1}{true}\or\equal{#1}{on}\or\equal{#1}{1}\or\equal{#1}{yes}}{%
1596 \CPROT@good@pdftex@version{%
1597 \global\pdfprotrudechars=2%
1598 }
1599 }{%
1600 \ifthenelse{\equal{#1}{compatibility}\or\equal{#1}{compatible}}{%
1601 \CPROT@good@pdftex@version{%
1602 \global\pdfprotrudechars=1%
1603 }%
1604 }{%
1605 \ifthenelse{\equal{#1}{false}\or\equal{#1}{off}\or\equal{#1}{0}\or\equal{#1}{no}}{%
1606 \global\pdfprotrudechars=0%
1607 }{%
1608 \CPROT@packageerror{%
1609 ``#1'' is no setting for \activatecharprotruding. Use\MessageBreak
1610 one of 'true', 'on', 'yes', '1', or 'false', 'off', \MessageBreak
1611 'no', '0', or 'compatible', 'compatibility' instead.%
1612 }%
1613 }{%
1614 \CPROT@packageinfo@or@warning{%
1615 You want to activate char protruding, but it does\MessageBreak
1616 look as your are NOT using pdftex. So I can't\MessageBreak
1617 activate it, as ``pdfcprot.sty'' only supports\MessageBreak
1618 pdftex.}%
1619 }%
1620 }%
1621 }%
1622 }{}%
1623 }
1624 % \end{macrocode}
1625 % \end{macro}
1626 % \begin{macro}{\setupcharprotruding}
1627 % \begin{macrocode}
1628 \newcommand*{\setupcharprotruding}[1]{%
1629 \ifpdftex{%
1630 \CPROT@resetall{}%
1631 \@ifundefined{CPROT@save@KV@errx}{%
1632 \let\CPROT@save@KV@errx=\KV@errx%
1633 \renewcommand*{\KV@errx}[1]{%
1634 \CPROT@packageerror{option ##1 for \string\setupcharprotruding}{%
1635 You've tried to use the option ##1 with \string\setupcharprotruding.\MessageBreak
1636 But there is no option with that name.\MessageBreak
1637 See the manual of ``pdfcprot.sty'' for information
1638 about the usage of \string\setupcharprotruding.%
1639 }%
1640 }%
1641 \setkeys{CPROT}{#1}%
1642 \let\KV@errx=\CPROT@save@KV@errx%
1643 \let\CPROT@save@KV@errx=\relax%
1644 }{%
1645 \setkeys{CPROT}{#1}%
1646 }%
1647 \CPROT@setprotcodes@add{}%
1648 }{%
1649 \CPROT@packageinfo@or@warning{%
1650 You want to setup char protruding, but it does\MessageBreak
1651 look as if you're NOT using pdftex. So I can't\MessageBreak
1652 setup it, as ``pdfcprot.sty'' only supports\MessageBreak
1653 pdftex.}%
1654 }%
1655 }
1656 \@onlypreamble\setupcharprotruding%
1657 % \end{macrocode}
1658 % \end{macro}
1659 % \begin{macro}{\setupcharprotrudingnumeral}
1660 % \begin{macrocode}
1661 \newcommand*{\setupcharprotrudingnumeral}[1]{%
1662 \ifpdftex{%
1663 \CPROT@resetall{}%
1664 \@ifundefined{CPROT@save@KV@errx}{%
1665 \let\CPROT@save@KV@errx=\KV@errx%
1666 \renewcommand*{\KV@errx}[1]{%
1667 \CPROT@packageerror{option ##1 for \string\setupcharprotrudingnumeral}{%
1668 You've tried to use the option ##1 with \string\setupcharprotrudingnumeral.\MessageBreak
1669 But there is no option with that name.\MessageBreak
1670 See the manual of ``pdfcprot.sty'' for information
1671 about the usage of \string\setupcharprotrudingnumeral.%
1672 }%
1673 }%
1674 \setkeys{CPROTnum}{#1}%
1675 \let\KV@errx=\CPROT@save@KV@errx%
1676 \let\CPROT@save@KV@errx=\relax%
1677 }{%
1678 \setkeys{CPROTnum}{#1}%
1679 }%
1680 \CPROT@setprotcodes@add{}%
1681 }{%
1682 \CPROT@packageinfo@or@warning{%
1683 You want to setup char protruding, but it does\MessageBreak
1684 look as if you're NOT using pdftex. So I can't\MessageBreak
1685 setup it, as ``pdfcprot.sty'' only supports\MessageBreak
1686 pdftex.}%
1687 }%
1688 }
1689 \@onlypreamble\setupcharprotrudingnumeral
1690 % \end{macrocode}
1691 % \end{macro}
1692 % \begin{macro}{\ifpdftex}
1693 % \changes{1.7}{2004/08/13}{changed to new definition proposed by
1694 % Heiko Oberdiek}
1695 % \begin{macrocode}
1696 \newcommand{\ifpdftex}{%
1697 \ifx\pdftexversion\@undefined
1698 \expandafter\@secondoftwo
1699 \else
1700 \ifx\pdftexversion\relax
1701 \expandafter\expandafter\expandafter\@secondoftwo
1702 \else
1703 \expandafter\expandafter\expandafter\@firstoftwo
1704 \fi
1705 \fi
1706 }
1707 % \end{macrocode}
1708 % \end{macro}
1709 % \begin{macro}{\CPROT@good@pdftex@version}
1710 % \changes{1.6}{2002/08/14}{added a macro to do something iff a
1711 % ``good'' version of \texttt{pdftex} is used}
1712 % \begin{macrocode}
1713 \newcommand{\CPROT@packageerror@bad@pdftex}{%
1714 \CPROT@packageerror{You used a pdftex version older than 0.14f.\MessageBreak
1715 pdfcprot does not support such old versions of pdftex. \MessageBreak
1716 Please install a new version of pdftex.}%
1717 }
1718 \newcommand{\CPROT@good@pdftex@version}[1]{%
1719 \ifnum\pdftexversion < 14
1720 \CPROT@packageerror@bad@pdftex %
1721 \else
1722 \ifnum\pdftexversion = 14
1723 \ifnum \expandafter`\pdftexrevision < `f
1724 \CPROT@packageerror@bad@pdftex %
1725 \else
1726 #1
1727 \fi
1728 \else
1729 #1
1730 \fi
1731 \fi
1732 }
1733 % \end{macrocode}
1734 % \end{macro}
1735 % \begin{macro}{\ifpdfoutput}
1736 % \changes{1.4a}{2001/11/13}{changed to new definition in
1737 % \KOMAScript{} version 2.8q (2001/11/13)}
1738 % This was taken from KOMA-Script and is provided for convenience.
1739 % \changes{1.7}{2004/08/13}{changed to new definition proposed by
1740 % Heiko Oberdiek}
1741 % \begin{macrocode}
1742 \newcommand*{\CPROT@ifpdfoutput}{%
1743 \ifcase 0%
1744 \ifx\pdfoutput\@undefined 1%
1745 \else
1746 \ifx\pdfoutput\relax 1%
1747 \else
1748 \ifcase\pdfoutput 1%
1749 \fi
1750 \fi
1751 \fi
1752 \space
1753 \expandafter\@firstoftwo
1754 \else
1755 \expandafter\@secondoftwo
1756 \fi
1757 }
1758 \@ifundefined{ifpdfoutput}{\let\ifpdfoutput\CPROT@ifpdfoutput}{%
1759 \CPROT@packageinfo{%
1760 \string\ifpdfoutput\space already defined.\MessageBreak
1761 That may happen when using KOMA-Script together\MessageBreak
1762 with ``pdfcprot.sty''. I have changed the definition\MessageBreak
1763 from Markus' KOMA-Script, so if you experience errors\MessageBreak
1764 try \string\let\string\ifpdfoutput\string\relax\space before loading ``pdfcprot.sty''.}%
1765 }
1766 % \end{macrocode}
1767 % \end{macro}
1768 % \begin{macrocode}
1769 \newcommand*{\CPROT@packageoptions}[1]{%
1770 \@ifundefined{CPROT@save@KV@errx}{%
1771 \let\CPROT@save@KV@errx=\KV@errx%
1772 \renewcommand*{\KV@errx}[1]{%
1773 \PackageError{pdfcprot}{unknown option ``#1''}{%
1774 You've tried to use the option ``#1''.\MessageBreak
1775 But there is no option with that name.\MessageBreak
1776 See the manual of ``pdfcprot.sty'' for information
1777 about known options.%
1778 }%
1779 }%
1780 \setkeys{CPROTpackage}{#1}%
1781 \let\KV@errx=\CPROT@save@KV@errx%
1782 \let\CPROT@save@KV@errx=\relax%
1783 }{%
1784 \setkeys{CPROTpackage}{#1}%
1785 }%
1786 }
1787 % \end{macrocode}
1788 % \begin{macrocode}
1789 \DeclareOption{DVIoutput}{%
1790 \CPROT@packagewarning{%
1791 It is not a good idea to use the DVIoutput package
1792 option.\MessageBreak
1793 Use it only if you experience some using other
1794 packages.\MessageBreak
1795 And don't forget to file a bug report against these
1796 packages.\MessageBreak
1797 The best is to add just \string\pdfoutput=0\space at the beginning\MessageBreak
1798 of your preamble or even before \string\documentclass.
1799 }
1800 \ifpdftex{%
1801 \pdfoutput=0%
1802 \let\pdfoutput\undefined
1803 }{}%
1804 }
1805 % \end{macrocode}
1806 % Define a standard command for undefined options. Actually this is
1807 % just a redirection to a |\setkeys| command.
1808 % \changes{1.5}{2002/02/27}{Just execute the options if \texttt{pdftex} is
1809 % really used}
1810 % \begin{macrocode}
1811 \DeclareOption*{%
1812 \ifpdftex{%
1813 \expandafter\CPROT@packageoptions\expandafter{\CurrentOption}%
1814 }{}%
1815 }%
1816 % \end{macrocode}
1817 % \begin{macro}{\CPROI@fallbackfont}
1818 % \begin{macro}{\setfallbackfont}
1819 % \changes{1.5}{2001/11/16}{changed place of definition; now the
1820 % ``configuration'' commands are all together}
1821 % The internal command |\CPROT@fallbackfont| stores the font to be
1822 % looked for, if no |CPA| is found for the actual font. By default
1823 % it's Palatino. With |\setfallbackfont| it is possible to customise
1824 % this, if required.
1825 % \begin{macrocode}
1826 \newcommand*{\CPROT@fallbackfont}{pplmn}
1827 \newcommand*{\setfallbackfont}[1]{\renewcommand*{\CPROT@fallbackfont}{#1}}
1828 % \end{macrocode}
1829 % \end{macro}
1830 % \end{macro}
1831 % \begin{macro}{\CPROT@setupcharprotruding@normal}
1832 % \changes{1.5}{2001/11/16}{changed place of definition; now the
1833 % ``configuration'' commands are all together}
1834 % When the package is loaded with option |activate| or
1835 % |activate=normal| this command does the actual adjustment and by
1836 % that defines which fonts will get character protruding with that options.
1837 % \begin{macrocode}
1838 \newcommand*{\CPROT@setupcharprotruding@normal}{%
1839 \setupcharprotrudingnumeral{family=3,series=1,shape=8,size=60,textcomp=1}%
1840 \setupcharprotrudingnumeral{family=2,series=2,shape=12,size=60,textcomp=1}%
1841 \setupcharprotrudingnumeral{family=1,series=2,shape=14,size=60,textcomp=1}%
1842 }
1843 % \end{macrocode}
1844 % \end{macro}
1845 % \begin{macro}{\setupcharprotrudingforencoding}
1846 % \changes{1.7}{2004/06/28}{added}
1847 % This command
1848 % \begin{macrocode}
1849 \newcommand*{\setupcharprotrudingforencoding}[1]{%
1850 \setupcharprotrudingnumeral{encoding={#1},family=3,series=1,shape=8,size=60,textcomp=1}%
1851 \setupcharprotrudingnumeral{encoding={#1},family=2,series=2,shape=12,size=60,textcomp=1}%
1852 \setupcharprotrudingnumeral{encoding={#1},family=1,series=2,shape=14,size=60,textcomp=1}%
1853 }
1854 \@onlypreamble\setupcharprotrudingforencoding
1855 % \end{macrocode}
1856 % \end{macro}
1857 % \begin{option}{pdfcprot.cfg}
1858 % \changes{1.4}{2001/11/07}{added loading of pdfcprot.cfg.}
1859 % \begin{macrocode}
1860 \InputIfFileExists{pdfcprot.cfg}
1861 {\typeout{***************************************^^J%
1862 * Local config file pdfcrpot.cfg used *^^J%
1863 ***************************************}}
1864 {}
1865 % \end{macrocode}
1866 % \end{option}
1867 % \begin{macrocode}
1868 \ProcessOptions\relax
1869 \newcommand*{\CPROT@actualfont}{%
1870 \f@family%
1871 \f@series%
1872 \f@shape%
1873 \f@encoding%
1874 }
1875 \@onlypreamble\setfallbackfont%
1876 \newcommand*{\CPROT@cpa@toload}{}
1877 % \end{macrocode}
1878 % \begin{macro}{\CPROT@setprotcodes@font}
1879 % This command you've seen before in the definition of
1880 % |\CPROT@setprotcodes@|. There it was protected so it won't be expanded
1881 % to early. That was important, to test for the correct font.
1882 % \begin{macrocode}
1883 \newcommand*{\CPROT@setprotcodes@font}{%
1884 \renewcommand*{\CPROT@cpa@toload}{\[email protected]}%
1885 \IfFileExists{\CPROT@cpa@toload}{%
1886 % \end{macrocode}
1887 % \changes{1.1}{2001/10/30}{Former version used a general command
1888 % beeing redefined any time directly from the \texttt{CPA}. Now the \texttt{CPA}
1889 % defines a new command we can test for, so it will be loaded just
1890 % once.}
1891 % Former version used a general command
1892 % beeing redefined any time directly from the |CPA|. Now the |CPA|
1893 % defines a new command we can test for, so it will be loaded just
1894 % once. The same code is found in the part for the fallback
1895 % font. Using this code some time will be spared (I hope).
1896 % \begin{macrocode}
1897 \expandafter\@ifundefined\expandafter{\CPROT@actualfont}{%
1898 \input{\CPROT@cpa@toload}
1899 }{}
1900 % \end{macrocode}
1901 % As the fontencoding names contain numbers |\csname| and |\endcsname|
1902 % must be used to call the actual command to setup character
1903 % protruding. After that a adjustment may be needed.
1904 % \begin{macrocode}
1905 \csname\CPROT@actualfont\endcsname%
1906 \CPROT@adjustprotcodes{\font}%
1907 \CPROT@packageinfo{%
1908 File \CPROT@cpa@toload{} for the adjustment of\MessageBreak
1909 the char protruding used. It seems to be _fit_\MessageBreak
1910 to the font you requested.%
1911 }%
1912 }{%
1913 \CPROT@packageinfo@or@warning{%
1914 I didn't find \CPROT@cpa@toload.\MessageBreak%
1915 \space As a fallback I will try \CPROT@fallbackfont\[email protected].%
1916 }%
1917 \renewcommand*{\CPROT@cpa@toload}{\CPROT@fallbackfont\[email protected]}%
1918 \IfFileExists{\CPROT@cpa@toload}{%
1919 \expandafter\@ifundefined\expandafter{\CPROT@fallbackfont\f@encoding}{%
1920 \input{\CPROT@cpa@toload}%
1921 }{}%
1922 \csname\CPROT@fallbackfont\f@encoding\endcsname%
1923 \CPROT@adjustprotcodes{\font}%
1924 \CPROT@packageinfo{%
1925 File \CPROT@cpa@toload{} used for the adjustment\MessageBreak
1926 of the char protruding. It seems that it isn't the one\MessageBreak
1927 you intended to use.%
1928 }%
1929 }{%
1930 \CPROT@packageinfo@or@warning{%
1931 Even the fallback font was not found. Maybe it's\MessageBreak
1932 not the right font encoding. Currently ``pdfcprot''\MessageBreak
1933 bundles only with cpa's for T1, OT1 and TS1 encoding.%
1934 }%
1935 }%
1936 }%
1937 }
1938 % \end{macrocode}
1939 % \end{macro}
1940 % \begin{macrocode}
1941 \newif\ifCPROT@adjustprotcodes@
1942 \newcommand*{\CPROT@adjustprotcodes}[1]{%
1943 \CPROT@adjustprotcodes@false
1944 \ifnum\pdftexversion > 14
1945 \CPROT@adjustprotcodes@true
1946 \else
1947 \ifnum\pdftexversion = 14
1948 \ifnum \expandafter`\pdftexrevision > `g
1949 \CPROT@adjustprotcodes@true
1950 \fi
1951 \fi
1952 \fi
1953 \ifCPROT@adjustprotcodes@
1954 \@tempcnta=0
1955 \loop
1956 \ifcase\lpcode#1\@tempcnta\else
1957 \CPROT@adjustprotcodes@@\lpcode{#1}\@tempcnta
1958 \fi
1959 \ifcase\rpcode#1\@tempcnta\else
1960 \CPROT@adjustprotcodes@@\rpcode{#1}\@tempcnta
1961 \fi
1962 \advance\@tempcnta 1
1963 \ifnum\@tempcnta < 256 \repeat
1964 \fi
1965 }
1966 \def\CPROT@adjustprotcodes@@#1#2#3{%
1967 \setbox0=\hbox{\the#2\char#3}%
1968 % \setbox0=\hbox{%
1969 % \ifx#2\font\else#2\fi%
1970 % \char#3}%
1971 \@tempcntb=\wd0%
1972 \multiply\@tempcntb #1#2#3%
1973 \divide\@tempcntb \fontdimen6 #2%
1974 #1#2#3=\@tempcntb%
1975 }
1976
1977 \newcommand*{\CPROT@setprotcodes}{%
1978 \ifpdftex{%
1979 \ifthenelse{\equal{\CPROT@setprotcodes@}{}}{%
1980 }{%
1981 \CPROT@setprotcodes@%
1982 }%
1983 }{}%
1984 }
1985
1986 \AtBeginDocument{%
1987 \CPROT@setprotcodes\relax%
1988 }
1989 %</package>
1990 % \end{macrocode}
1991 % \subsection{The Provided \texttt{.CPA} Files}
1992 % \subsubsection{Palatino}
1993 % \begin{macro}{\pplmnT1}
1994 % \begin{macro}{\pplmnOT1}
1995 % \changes{1.1}{2001/30/10}{\texttt{\protect\string\string\pplmnT1} was added. Before a general
1996 % setup code has been used and defined anytime new loading the
1997 % \texttt{CPA}. In the \texttt{CPA}'s were only the
1998 % \texttt{\protect\string\string\rpcode} and
1999 % \texttt{\protect\string\string\lpcode} commands stated.}
2000 % \changes{1.7}{2004/06/28}{Collapsed all encodings for \texttt{ppl}}
2001 % \changes{1.7}{2004/06/28}{added \texttt{pplmnT2A} and
2002 % \texttt{pplmnOT2} definition files
2003 % for T2A and OT2 encoding}
2004 % \begin{macrocode}
2005 %<pplmnT1>\expandafter\gdef\csname pplmnT1\endcsname{%
2006 %<pplmnOT1>\expandafter\gdef\csname pplmnOT1\endcsname{%
2007 %<pplmnT2A>\expandafter\gdef\csname pplmnT2A\endcsname{%
2008 %<pplmnOT2>\expandafter\gdef\csname pplmnOT2\endcsname{%
2009 %<*pplmnOT1|pplmnOT2>
2010 \lpcode\font 92=500 % ``
2011 \rpcode\font 34=500 % ''
2012 \rpcode\font 123=300 % --
2013 \rpcode\font 124=200 % ---
2014 %</pplmnOT1|pplmnOT2>
2015 %<*pplmnT1|pplmnT2A>
2016 \lpcode\font 16=500 % ``
2017 \rpcode\font 17=500 % ''
2018 \rpcode\font 21=300 % --
2019 \rpcode\font 22=200 % ---
2020 %</pplmnT1|pplmnT2A>
2021 %<*pplmnT2A|pplmnOT2>
2022 \rpcode\font\cyrdash=200 % "---
2023 \lpcode\font\cyrdash=200 % "--*
2024 %</pplmnT2A|pplmnOT2>
2025 %<*pplmnT1|pplmnT2A>
2026 % german quotation marks
2027 \lpcode\font\quotedblbase=600
2028 \rpcode\font\textquotedblleft=500
2029 %</pplmnT1|pplmnT2A>
2030 %<*pplmnOT1|pplmnT1|pplmnT2A|pplmnOT2>
2031 % set the protrusion of ",","-" and "." a bit smaller
2032 % than originally suggested by Han The Than
2033 \rpcode\font`\,=650
2034 \rpcode\font`\-=650
2035 \rpcode\font`\.=650
2036 % originial Setting from Han The Thans protcode.tex
2037 \rpcode\font`\!=200
2038 \rpcode\font`\;=500
2039 \rpcode\font`\:=500
2040 \rpcode\font`\?=200
2041 \lpcode\font`\`=700
2042 \rpcode\font`\'=700
2043 \rpcode\font`\)=50
2044 %<*!pplmnOT2>
2045 \rpcode\font`\A=\rpcode\font`\A
2046 %<pplmnT1> \rpcode\font 196=50 % A umlaut
2047 \rpcode\font`\F=50
2048 \rpcode\font`\K=50
2049 \rpcode\font`\L=50
2050 \rpcode\font`\T=50
2051 \rpcode\font`\V=50
2052 \rpcode\font`\W=50
2053 \rpcode\font`\X=50
2054 \rpcode\font`\Y=50
2055 \rpcode\font`\k=50
2056 \rpcode\font`\r=50
2057 \rpcode\font`\t=50
2058 \rpcode\font`\v=50
2059 \rpcode\font`\w=50
2060 \rpcode\font`\x=50
2061 \rpcode\font`\y=50
2062 %</!pplmnOT2>
2063 \lpcode\font`\(=50
2064 %<*!pplmnOT2>
2065 \lpcode\font`\A=50
2066 %<pplmnT1> \lpcode\font 196=\lpcode\font`\A % A umlaut
2067 \lpcode\font`\J=50
2068 \lpcode\font`\T=50
2069 \lpcode\font`\V=50
2070 \lpcode\font`\W=50
2071 \lpcode\font`\X=50
2072 \lpcode\font`\Y=50
2073 \lpcode\font`\v=50
2074 \lpcode\font`\w=50
2075 \lpcode\font`\x=50
2076 \lpcode\font`\y=50
2077 %</!pplmnOT2>
2078 %<*pplmnT2A|pplmnOT2>
2079 \rpcode\font\CYRA=50
2080 \rpcode\font\CYRK=50
2081 \rpcode\font\CYRT=50
2082 \rpcode\font\CYRH=50
2083 \rpcode\font\CYRU=50
2084 \rpcode\font\CYRG=50
2085 \rpcode\font\CYRZH=50
2086 \rpcode\font\CYRL=50
2087 \rpcode\font\CYRC=20
2088 \rpcode\font\CYRSHCH=10
2089 \rpcode\font\CYRHRDSN=50
2090 \rpcode\font\CYRSFTSN=50
2091 \rpcode\font\cyrk=50
2092 \rpcode\font\cyrt=50
2093 \rpcode\font\cyrh=50
2094 \rpcode\font\cyru=50
2095 \rpcode\font\cyrg=50
2096 \rpcode\font\cyrzh=50
2097 \rpcode\font\cyrl=50
2098 \rpcode\font\cyrc=20
2099 \rpcode\font\cyrshch=10
2100 \rpcode\font\cyrhrdsn=50
2101 \rpcode\font\cyrsftsn=50
2102 \lpcode\font\CYRA=50
2103 \lpcode\font\CYRT=50
2104 \lpcode\font\CYRH=50
2105 \lpcode\font\CYRU=50
2106 \lpcode\font\CYRZH=50
2107 \lpcode\font\CYRL=50
2108 \lpcode\font\CYRU=50
2109 \lpcode\font\CYRCH=50
2110 \lpcode\font\CYRHRDSN=50
2111 \lpcode\font\CYRD=50
2112 \lpcode\font\cyra=50
2113 \lpcode\font\cyrt=50
2114 \lpcode\font\cyrh=50
2115 \lpcode\font\cyru=50
2116 \lpcode\font\cyrzh=50
2117 \lpcode\font\cyrl=50
2118 \lpcode\font\cyru=50
2119 \lpcode\font\cyrch=50
2120 \lpcode\font\cyrhrdsn=50
2121 \lpcode\font\cyrd=50
2122 %</pplmnT2A|pplmnOT2>
2123 }%
2124 %</pplmnOT1|pplmnT1|pplmnT2A|pplmnOT2>
2125 % \end{macrocode}
2126 % \end{macro}
2127 % \end{macro}
2128 % \begin{macro}{\pplmnTS1}
2129 % \begin{macrocode}
2130 %<*pplmnTS1>
2131 \expandafter\gdef\csname pplmnTS1\endcsname{%
2132 \rpcode\font 176=600 % \textdegree
2133 }
2134 %</pplmnTS1>
2135 % \end{macrocode}
2136 % \end{macro}
2137 % \makeatletter \c@IndexColumns=2\makeatother
2138 % \PrintIndex
2139 % \PrintChanges
2140 % \Finale
2141 \endinput
2142 %%% Local Variables:
2143 %%% mode: latex
2144 %%% TeX-master: t
2145 %%% End: % LocalWords: pdftex kerning Carsten