% pdcadobe.dtx -- documentation & source for pdcadobe.tex -*-tex-*- %%%@TeX-document-file { %%% title = "PDCADOBE -- Formatting Macros", %%% filename = "$texmf/doc/plain/pdcmac/pdcadobe.dtx", %%% version = "$Revision: 1.3 $", %%% package = "pdcmac 1.0", %%% date = "$Date: 1995/03/30 16:07:31 $", %%% author = "P. Damian Cugley", %%% email = "damian.cugley@comlab.ox.ac.uk", %%% address = "Oxford University Computing Laboratory," %%% Parks Road, Oxford OX1 3QD, UK", %%% abstract = "This document describes and is the source code for %%% the TeX definitions file pdcadobe.tex. %%% Running plain TeX on this file produces both the %%% definitions file and the printed documentation.", %%% copyright = "Copyright (c) 1995 P. Damian Cugley", %%% copying = "This program is free software; you can redistribute %%% it and/or modify it under the terms of the GNU %%% General Public License as published by the Free %%% Software Foundation; either version 2 of the License, %%% or (at your option) any later version.", %%% notice = "This program is distributed in the hope that it will %%% be useful, but WITHOUT ANY WARRANTY; without even the %%% implied warranty of MERCHANTABILITY or FITNESS FOR A %%% PARTICULAR PURPOSE. See the GNU General Public %%% License for more details.", %%% notice = "You should have received a copy of the GNU General %%% Public License along with this program; if not, write %%% to the Free Software Foundation, Inc., 675 Mass Ave, %%% Cambridge, MA 02139, USA.", %%% codetable = "USASCII", %%% dependencies = "pdccode.tex" %%%} %{{{ pdcadobe %{{{ preamble \relax \input pdccode \document \rcs$Id: pdcadobe.dtx,v 1.3 1995/03/30 16:07:31 pdc Exp $\endrcs \codefile{pdcadobe.tex} %}}} preamble %{{{ introduction \author{P. Damian Cugley} \title{PDCAdobe---Macros for using Adobe fonts} \section{Introduction} This document describes |pdcadobe.tex|, a collection of macros for using Adobe's Standard Roman character set, via DVIPS's variation on the \TeX\ Text encoding. \notepar You will need to use a different strategy if your PostScript fonts adhere strictly to the \TeX\ Text conventions (the conventions of Computer Modern Roman, described in {\it\TeX book}\/ Appendix~F, and called OT1 by the \LaTeX~3 team), such as the fonts generated with Fontinst. \endnotepar \subsec{New text symbols} The new characters now available in text are: $$\halign{\indent\tt\char`\\#1\hfil&\quad#\hfil\cr quotesingle& typewriter-style apostrophe ({\tt\char"0D })\cr quotedouble& typewriter-style double apostrophe ({\tt"})\cr asciicircum& ASCII circumflex\cr asciitilde& ASCII tilde\cr }$$ \subsec{Use of the Symbol font} The assumption is that one of the resons for using PostScript fonts is that, if you stick to the `Adobe~35', the resulting PostScript files are much smaller because no font bitmaps need to be downloaded. On this assumption, Adobe's Symbol font is used whenever possible, even when the Computer Modern symbol is arguably prettier. The Symbol font will need to have its own maths family, which by convention this file expects to find defined as |\asyfam|. \subsec{Composite letters} \setbox0=\hbox{accent} \edef\\{\vrule height\the\ht0 depth\the\dp0 width\the\wd0 \relax } Composite letters are those made from some base letter and a {\it mark}, for example {\it\'e}, {\it\"u}.\footnote*{`Composite letters' is a euphemism for what English speakers usually refer to as `\\ed letters', since the word `\\' tends to provoke lectures to the effect that composite letters are not considered to be `\\ed' in many of the lanuages in which they are used.} In the Adobe Standard Roman character set, and hence in |afm2tfm|'s encoding, the composite letters of ISO 8859--1 are included as separate glyphs. These glyphs are accessed using ligatures between mark glyphs and base letters (so that |^^13e| in the manuscript file produces `\'e'). Unfortunately, exploiting this is tricky if we also want to allow for composite glyphs {\it not} included in the PostScript fonts. The approach taken in these definitions is that \TeX's composite letter commands (|\'|, |\"|, and friends) are left unchanged, so that `|\'e|' works through \TeX's |\|\\ command. The magic glyphs are available as commands with names like |\acuteglyph| or via the Latin-1 special symbols, so that `|\acuteglyph e|' or `|^^b4e|' (which might liik like `{\tt\char"13 e}' on the screen if your computer uses Latin-1) produces `\'e' as a single glyph (which might mean tha mark is better aligned). Finally, the Latin-1 composite letters generate the single glyphs vial ligatures, so that `|^^e9|' (which may well look like `{\tt\'e}' on the screen) expands to `|\acuteglyph e|' and hence `\'e'. \subsec{About this document} The definitions file and the printed documentation are both in |pdcadobe.dtx|, a `documented \TeX\ macros' file\footnote*{The \LaTeX~2e distribution uses files with the `|dtx|' suffix for similar purposes.} which, when processed by plain \TeX, generates a fresh copy of |pdcadobe.tex| in the current directory in addition to the |dvi| file. This ensures that the printed documentation and the code it describes are identical. The |dtx| file uses the macros in |pdccode.tex|. %}}} introduction %{{{ File identification \section{File identification} Nowadays, macro files start with some comments identifying the file. \code \|\% pdcadobe.tex \fileversion~\filedate~-- macros for Adobe style fonts | |%%%@TeX-definition-file { |%%% filename = "$texmf/tex/plain/pdcmac/pdcadobe.tex", \|\%\%\% version~~~~~~~~= "\fileversion", \|\%\%\% date~~~~~~~~~~~= "\filedate", |%%% package = "pdcmac 1.0", |%%% author = "P. Damian Cugley", |%%% email = "damian.cugley@comlab.ox.ac.uk", |%%% address = "Oxford University Computing Laboratory, |%%% Parks Road, Oxford OX1 3QD, UK", |%%% codetable = "USASCII", |%%% keywords = "TeX, plain TeX, macros", |%%% supported = "Maybe", |%%% abstract = "Formatting macros for Adobe-style fonts. |%%% This file was generated by running \|\%\%\%~~~~~~~~~~~~~~~~~~~plain TeX on \jobname.dtx", |%%% copyright = "Copyright (c) 1991-1995 P. Damian Cugley", |%%% copying = "DO NOT DISTRIBUTE THIS FILE. \|\%\%\%~~~~~~~~~~~~~~~~~~~Distribute \jobname.dtx only as part of the |%%% package it came in.", |%%% dependencies = "", |%%% } | \|\\message\{\fileversion~\} | \endcode %}}} file id %{{{ chardefs \section{Characters available in all styles} The following characters are in the fonts generated by |afm2tfm|, so are available in all styles. \code |\chardef\quotesingle="0D |\chardef\quotedouble="22 |\chardef\_="5F |\chardef\asciicircum="80 |\chardef\asciitilde="81 |\chardef\cents="A2 |\chardef\pounds="A3 |\chardef\fractionslash="A4 |\chardef\yen="A5 |\chardef\florin="A6 |\chardef\S="A7 |\chardef\currency="A8 |\chardef\lguillemet="AB |\chardef\dag="B2 |\chardef\ddag="B3 |\chardef\gbdecimal="B4 |\chardef\P="B6 |\chardef\bullet="B7 |\chardef\quotesinglebase="B8 |\chardef\quotedblbase="B9 |\chardef\rguillemet="BB |\chardef\ellipsis="BC \def\dots{\ellipsis\thinspace} |\chardef\permille="BD |\chardef\orda="E3 |\chardef\ordo="EB \endcode Some glyphs, like |\fractionslash| and |\gbdecimal| may well be used in maths mode, but are defined using |\chardef| to allow them to be used in text as well. The definition of |\dots| adds the thin space that is included in plain \TeX's |\dots|, so that `|\dots,|' will have a thin space between the third full stop and the comma. \subsec{Maths stuff} These symbols are available in maths mode, coming from the |\rm| font (fam~0). \code |\mathchardef\backslash="205C |\edef\lbrace{\delimiter"407B308} \let\{=\lbrace \mathcode`\{="407B |\mathcode`\|="707C \mathchardef\mid="307C |\edef\rbrace{\delimiter"507D309} \let\}=\rbrace \mathcode`\}="507D |\mathchardef\sim="3081 |\mathchardef\cdot="20B4 |\mathchardef\bullet="20B7 |\mathchardef\ldots="60BC \endcode There {\it are} extensible braces in the Adobe Symbol font, which I~would have used for the |\lbrace| and |\rbrace| commands. Unfortunately, the TFM file generated with |afm2tfm| seems to lack the special information that makes extensible characters work, so the |cmex10| glyphs must be used instead. \subsec{Marks for composite letters} Some common accented letters can be got by printing the accent glyph before the letter glyph. However not all combinations will work, so I~have left plain \TeX's definitions in place. For later reference, the glyphs used for the accents are given names. \code |\chardef\graveglyph="12 |\chardef\acuteglyph="13 |\chardef\hookglyph="14 |\chardef\breveglyph="15 |\chardef\macronglyph="16 |\chardef\ringglyph="17 |\chardef\cedillaglyph="18 |\chardef\circumglyph="5E |\chardef\tildeglyph="7E |\chardef\twodotsglyph="7F |\chardef\dotglyph="C7 |\chardef\hungarianglyph="CD |\chardef\ogonekglyph="CE \endcode Some special letters and marks have been moved to new slots. \code |\chardef\AA="C8 \chardef\aa="98 |\chardef\L="E8 \chardef\l="F8 |\def\.#1{\accent\dotglyph #1} |\def\H#1{\accent\hungarianglyph"CD #1} \endcode %}}} chardefs %{{{ adobe sy \section{Adobe Symbol font characters} Most of Adobe's Symbol font's glyphs exist already in one of the maths fonts. Nevertheless I~think it makes sense to use them whenever possible, because if it so happens that none of the glyphs in the maths fonts are used, the bitmaps for the fonts may be omitted from the PostScript file, making it much smaller. For these definitions to work, there must be a family |\asyfam| and font nickname |\asy|. \code |\ifx\asyfam\UNDEFINED | \newfam\asyfam |\fi \endcode \subsec{Extracting the fam name} \code |\edef\\{\ifcase\asyfam 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or | 8\or 9\or A\or B\or C\or D\or E\or F\fi |} \endcode Where plain \TeX's definition uses glyphs from the roman font, I~have let the definition stand. \code |\mathchardef\forall="0\\22 |\mathchardef\exists="0\\24 |\mathchardef\suchthat="0\\27 |\mathcode`*="2\\2A |\mathcode`,="6\\2C |\mathcode`-="2\\2D |\mathcode`.="2\\2E |\mathcode`/="2\\2F |\mathcode`<="3\\3C |\mathcode`>="3\\3E \smallbreak |\mathchardef\cong="3\\40 |\mathchardef\Alpha="0\\41 |\mathchardef\Beta="0\\42 |\mathchardef\Chi="0\\43 |\mathchardef\Delta="0\\44 |\mathchardef\Epsilon="0\\45 |\mathchardef\Phi="0\\46 |\mathchardef\Gamma="0\\47 |\mathchardef\Eta="0\\48 |\mathchardef\Iota="0\\49 |\mathchardef\vartheta="0\\4A |\mathchardef\Kappa="0\\4B |\mathchardef\Lambda="0\\4C |\mathchardef\Mu="0\\4D |\mathchardef\Ni="0\\4E |\mathchardef\Omicron="0\\4F \smallbreak |\mathchardef\Pi="0\\50 |\mathchardef\Theta="0\\51 |\mathchardef\Rho="0\\52 |\mathchardef\Sigma="0\\53 |\mathchardef\Tau="0\\54 |\mathchardef\varUpsilon="0\\55 |\mathchardef\varsigma="0\\56 |\mathchardef\Omega="0\\57 |\mathchardef\Xi="0\\58 |\mathchardef\Psi="0\\59 |\mathchardef\Zeta="0\\5A % |\mathchardef\therefore="3\\5C % |\mathchardef\perp="3\\5E % \smallbreak % |\mathchardef\alpha="0\\61 |\mathchardef\beta="0\\62 |\mathchardef\chi="0\\63 |\mathchardef\delta="0\\64 |\mathchardef\epsilon="0\\65 |\mathchardef\phi="0\\66 |\mathchardef\gamma="0\\67 |\mathchardef\eta="0\\68 |\mathchardef\iota="0\\69 |\mathchardef\varphi="0\\6A |\mathchardef\kappa="0\\6B |\mathchardef\lambda="0\\6C |\mathchardef\mu="0\\6D |\mathchardef\ni="0\\6E |\mathchardef\omicron="0\\6F \smallbreak |\mathchardef\pi="0\\70 |\mathchardef\theta="0\\71 |\mathchardef\rho="0\\72 |\mathchardef\sigma="0\\73 |\mathchardef\tau="0\\74 |\mathchardef\upsilon="0\\75 |\mathchardef\varpi="0\\76 |\mathchardef\omega="0\\77 |\mathchardef\xi="0\\78 |\mathchardef\psi="0\\79 |\mathchardef\zeta="0\\7A |\mathchardef\sim="3\\7E % \smallbreak |\mathchardef\Upsilon="0\\A1 |\mathcode`'="0\\A2 \mathchardef\minutes="0\\A2 |\mathchardef\leq="3\\A3 \let\le=\leq |\mathchardef\fractionslash="0\\A4 |\mathchardef\infinity="0\\A5 % |\mathchardef\clubsuit="0\\A7 |\mathchardef\diamondsuit="0\\A8 |\mathchardef\heartsuit="0\\A9 |\mathchardef\spadesuit="0\\AA |\mathchardef\leftrightarrow="3\\AB |\mathchardef\leftarrow="3\\AC \let\gets=\rightarrow |\mathchardef\uparrow="3\\AD |\mathchardef\rightarrow="3\\AE \let\to=\rightarrow |\mathchardef\downarrow="3\\AF \smallskip |\mathchardef\degrees="0\\B0 |\mathchardef\pm="2\\B1 |\mathchardef\seconds="0\\B2 |\mathchardef\geq="3\\B3 \let\ge=\geq |\mathchardef\times="2\\B4 |\mathchardef\propto="3\\B5 |\mathchardef\partial="0\\B6 % |\mathchardef\div="2\\B8 |\mathchardef\neq="3\\B9 \let\ne=\neq |\mathchardef\equiv="3\\BA |\mathchardef\approx="3\\BB |\mathchardef\ldots="6\\BC |\edef\arrowvert{\delimiter"0\\BD33C } |\mathchardef\relbar"3\\BE |\edef\crlf{\noexpand\mathexbox\\BF} \smallbreak |\mathchardef\aleph="0\\C0 |\mathchardef\Im="0\\C1 |\mathchardef\Re="0\\C2 |\mathchardef\wp="0\\C3 |\mathchardef\otimes="2\\C4 |\mathchardef\oplus="2\\C5 |\mathchardef\emptyset="0\\C6 |\mathchardef\cap="2\\C7 |\mathchardef\cup="2\\C8 |\mathchardef\supset="3\\C9 |\mathchardef\supseteq="3\\CA |\mathchardef\nsubset="3\\CB |\mathchardef\subset="3\\CC |\mathchardef\subseteq="3\\CD |\mathchardef\in="3\\CE |\mathchardef\nin="3\\CF \smallbreak |\mathchardef\angle="0\\D0 |\mathchardef\nabla="0\\D1 |\edef\registered{\noexpand\mathhexbox\\D2} |\edef\copyright{\noexpand\mathhexbox\\D3} |\edef\trademark{\noexpand\mathhexbox\\D4} |\mathchardef\prod="1\\D5 |\edef\sqrt{\radical"\\D6370 } |\mathchardef\cdot="2\\D7 |\mathchardef\neg="0\\D8 \let\lnot=\neg |\mathchardef\wedge="3\\D9 \let\land=\wedge |\mathchardef\vee="3\\DA \let\lor=\vee |\mathchardef\Leftrightarrow="3\\DB |\mathchardef\Leftarrow="3\\DC |\mathchardef\Uparrow="3\\DD |\mathchardef\Rightarrow="3\\DE |\mathchardef\Downarrow="3\\DF \smallbreak |\mathchardef\diamond="3\\E0 |\edef\langle{\delimiter"4\\E130A } |\mathchardef\sum="1\\E5 |\edef\rangle{\delimiter"5\\F130B } \endcode (I haven't bothered redefining those delimiters based on parts of large delimiters.) %}}} adobe sy %{{{ ISO 8859-1 support \section{ISO 8859--1 input} ISO~8859--1 (Latin-1) is the de facto standard character encoding in a large numebr of countries, and so we shall try to make a reasonable number of Latin-1 characters available. \subsec{Symbols} Those characters whose code is the same as the code of the corresponding glyph are left alone (with catcode~12). For example, |^^a3| (pounds sterling) is left alone. Those that have an equivalent |\chardef| (or |\mathchardef|) name are defined with |\let| (for example, |^^a4| is |\let| to |\currency|). Those with an equivalent standard ligature use that ligature. These conventions hopefully insulate these definitions against changes in the encoding. The characters that represent marks for composite letters\footnote*{This phrase is used on the grounds that the word {\it accent} tends to provoke lectures on ways in which many composite letters do {\it not} represent accents in the languages in which they are used.} will form ligatures with the following letter---one may write `{\tt\char"7F u\char"18 c}' to get `\"u\c c'. I don't use |\declareactivechar| on these because they would not work properly in verbatim text with catcode~12. (Extending verbatim text to include Latin-1 will take a few definitions along the same lines as |\ttlq| etc.). \code |\catcode`^^a0\active \let^^a0=~ |\catcode`^^a1\active \def^^a1{!`} % A2 % A3 |\catcode`^^a4\active \let^^a4=\currency % A5 % A6 XXX % A7 |\catcode`^^a8\active \let^^a8=\twodotsglyph |\catcode`^^a9\active \let^^a9=\copyright |\catcode`^^aa\active \let^^aa=\orda % AB |\catcode`^^ac\active \let^^ac=\lnot |\catcode`^^ad\active \let^^ad=\- |\catcode`^^ae\active \let^^ae=\registered |\catcode`^^af\active \let^^af=\macronglyph \smallbreak |\catcode`^^b0\active \let^^b0=\degrees |\catcode`^^b1\active \let^^b1=\pm |\catcode`^^b2\active \def^^b2{^2} |\catcode`^^b3\active \def^^b3{^3} |\catcode`^^b4\active \let^^b4=\acuteglyph |\catcode`^^b5\active \let^^b5=\mu % B6 |\catcode`^^b7\active \let^^b7=\gbdecimal |\catcode`^^b8\active \let^^b8=\cedillaglyph |\catcode`^^b9\active \def^^b9{^1} |\catcode`^^ba\active \let^^ba=\ordo % BB |\catcode`^^bc\active \def^^bc{\frac14} |\catcode`^^bd\active \def^^bd{\frac12} |\catcode`^^be\active \def^^be{\frac34} |\catcode`^^bf\active \def^^bf{?`} \smallbreak |\catcode`^^d7\active \let^^d7=\times |\catcode`^^f7\active \let^^f7=\div \endcode \subsec{Composite letters} The composite letters acer accessed via ligatures so that they are immune to some possible changes in encoding. \code |\catcode`^^c0\active \def^^c0{\graveglyph A} |\catcode`^^c1\active \def^^c1{\acuteglyph A} |\catcode`^^c2\active \def^^c2{\circumglyph A} |\catcode`^^c3\active \def^^c3{\tildeglyph A} |\catcode`^^c4\active \def^^c4{\twodotsglyph A} |\catcode`^^c5\active \def^^c5{\ringglyph A} |\catcode`^^c6\active \let^^c6=\AE |\catcode`^^c7\active \def^^c7{\cedillaglyph C} |\catcode`^^c8\active \def^^c8{\graveglyph E} |\catcode`^^c9\active \def^^c9{\acuteglyph E} |\catcode`^^ca\active \def^^ca{\circumglyph E} |\catcode`^^cb\active \def^^cb{\twodotsglyph E} |\catcode`^^cc\active \def^^cc{\graveglyph I} |\catcode`^^cd\active \def^^cd{\acuteglyph I} |\catcode`^^ce\active \def^^ce{\circumglyph I} |\catcode`^^cf\active \def^^cf{\twodotsglyph I} \smallbreak % |\catcode`^^d0\active \chardef^^d0="?? % DH |\catcode`^^d1\active \def^^d1{\tildeglyph N} |\catcode`^^d2\active \def^^d2{\graveglyph O} |\catcode`^^d3\active \def^^d3{\acuteglyph O} |\catcode`^^d4\active \def^^d4{\circumglyph O} |\catcode`^^d5\active \def^^d5{\tildeglyph O} |\catcode`^^d6\active \def^^d6{\twodotsglyph O} |\catcode`^^d8\active \let^^d8=\O |\catcode`^^d9\active \def^^d9{\graveglyph U} |\catcode`^^da\active \def^^da{\acuteglyph U} |\catcode`^^db\active \def^^db{\circumglyph U} |\catcode`^^dc\active \def^^dc{\twodotsglyph U} |\catcode`^^dd\active \def^^dd{\acuteglyph Y} % |\catcode`^^de\active \def^^de{TH} |\catcode`^^df\active \let^^df=\ss \smallbreak |\catcode`^^e0\active \def^^e0{\acuteglyph a} |\catcode`^^e1\active \def^^e1{\graveglyph a} |\catcode`^^e2\active \def^^e2{\circumglyph a} |\catcode`^^e3\active \def^^e3{\tildeglyph a} |\catcode`^^e4\active \def^^e4{\twodotsglyph a} |\catcode`^^e5\active \def^^e5{\ringglyph a} |\catcode`^^e6\active \let^^e6=\ae |\catcode`^^e7\active \def^^e7{\cedillaglyph c} |\catcode`^^e8\active \def^^e8{\graveglyph e} |\catcode`^^e9\active \def^^e9{\acuteglyph e} |\catcode`^^ea\active \def^^ea{\circumglyph e} |\catcode`^^eb\active \def^^eb{\twodotsglyph e} |\catcode`^^ec\active \def^^ec{\graveglyph i} |\catcode`^^ed\active \def^^ed{\acuteglyph i} |\catcode`^^ee\active \def^^ee{\circumglyph i} |\catcode`^^ef\active \def^^ef{\twodotsglyph i} \smallbreak % |\catcode`^^f0\active \def^^f0{dh} |\catcode`^^f1\active \def^^f1{\tildeglyph n} |\catcode`^^f2\active \def^^f2{\graveglyph o} |\catcode`^^f3\active \def^^f3{\acuteglyph o} |\catcode`^^f4\active \def^^f4{\circumglyph o} |\catcode`^^f5\active \def^^f5{\tildeglyph o} |\catcode`^^f6\active \def^^f6{\twodotsglyph o} |\catcode`^^f8\active \let^^f8=\o |\catcode`^^f9\active \def^^f9{\graveglyph u} |\catcode`^^fa\active \def^^fa{\acuteglyph u} |\catcode`^^fb\active \def^^fb{\circumglyph u} |\catcode`^^fc\active \def^^fc{\twodotsglyph u} |\catcode`^^fd\active \def^^fd{\acuteglyph y} % |\catcode`^^fe\active \def^^fe{th} |\catcode`^^ff\active \def^^ff{\twodotsglyph y} \endcode %}}} ISO 8859-1 support %{{{ other hacks \section{Modifications to other PDCMAC macros} For typewriter text, less drastic revision of the string is necessary. \code |\def\ttminus{--{}} |\let\ttcircum=\asciicircum |\let\tttilde=\asciitilde \endcode Note that ASCII quote and backquote characters are still got from accents because a `neutral' quotation mark is not adequate for computer listings where both sorts of `quote mark' might be appear, with different meanings. %}}} other hacks \endcodefile \enddocument \bye %}}} pdcadobe.dtx %Local variables: %fill-prefix: "\t" %fold-folded-p: t %End: