|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T e
Length: 8333 (0x208d) Types: TextFile Names: »examples.tex«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/dvi-to-ps/TeXPS/doc/examples.tex«
\InputD{fotable.tip} \InputD{ex-mac.tex} \font\helv = PS-Helvetica \font\cour = PS-Courier \font\timesr = PS-Times-Roman \chapter{Examples} % ================ \label{c-examples} In this chapter I will present examples of the usage of \PS{} fonts in \TeX{} which were derived with the help of our programs. I will deal with rather straight forward applications here. More complex examples will follow in later chapters. All the examples are composed of three chapters stored in three separate files: \begin{itemize} \item {\tt examples.tex} which is this chapter. \item {\tt examples2.tex} starting on \page{c-examples2}. \item {\tt examples3.tex} starting on \page{c-examples3}. \end{itemize} The example chapters are interesting out of a variety of reasons which will be discussed now: \begin{enumerate} \item Because a large number of different fonts (especially \PS{} fonts) are used the Apple LaserWriter~I used at first was constantly running out of virtual memory when printing one of these chapters. I helped myself at first by using {\it dviselect\/} to split up the {\tt DVI} file into smaller {\tt DVI} files which were printed totally separately from each other. I then added the {\tt -z}~option to the driver. This option is followed by a number~$n$ where~$n$ specifies the number of page after which a complete reset in the printer is executed. This option is explained in with the other options of the driver. {\tt -z~1} means of course that in effect all pages of a {\tt DVI} file are translated into completely independent \PS{} files. Changing to the newer LaserWriter~II improved the situation dramatically. I did not experiment forever with it but {\tt -z~12} seems to just work fine. \item The example chapters form the test for all the programs. The emphasis in those chapters is to ensure that for every option and every possibility to define \PS{} fonts at least one example can be found. So you should print this document to test the validity of your software. \end{enumerate} The source code of this part of the document can be found in {\tt doc/examples.tex}. \section{\protect\PS{} Font Family Helvetica} % =========================================== \label{s-helvetica} I will now present our first example of a \PS{} font used with \TeX. I choose the \PS{} font Helvetica. The font chart of this font can be found in \FigRef{f-chart-hel}, \page. It was generated with the following {\tt PFD} file: \ListVerb{PS-Helvetica.pfd} In most cases, unless any changes to the encoding vector are needed or any other changes are required by the user, a simple {\tt PFD} file like the one just presented suffices. Actually {\it pfd2tfm\/} can be started directly without giving any {\tt PFD} file. Simply provide the name of the {\tt AFM} file (including the file extension {\tt AFM} in this case). In other words the instruction {\tt pfd2tfm Helvetica.afm} would have generated the exact same font substituting a {\tt PFD} file as listed above automatically. Observe that for character codes $<128$ the font table of the \PS{} font forms a proper subset of the font table of {\tt cmr10}. The encoding vector chart for {\tt PS-Helvetica} can be found in \FigRef{t-PS-Helvetica.pdr}, \page. This figure was produced using {\tt printpdr}. Characters for which the character code was {\bf not} taken from the {\tt AFM} file are marked with an asterisk. Here is an example using {\tt PS-Helvetica}: \begin{quote} {\helv And here is some sample text based on this font. You also can print all the fancy characters, but for some of them, you have to use the {\cour\string\char} instruction of \TeX. So here some characters, which you need in French: \char'322, \char'323, \char'324, \char'326. Also ligatures are available, but in the case of this font, there is hardly any difference between the two characters typed side by side and using the ligature. That's it for this example. As you can see from the text even ligatures work properly. For instance the input {\cour fun---well not really} generated the following text ``fun---well not really''. } \end{quote} % Font chart helvetica. \foc{\helv}{PS-Helvetica}{f-chart-hel} \clearpage % Encoding vector helvetica. \evl{PS-Helvetica} \clearpage \section{\protect\PS{} Fonts Times\dots} % ====================================== \label{s-times} Here briefly some examples based on the \PS's Times-Roman and Times-Italic fonts. The font chart for both of those fonts can be found in \FigRef{f-chart-tr}, \page. The encoding vector can be found in \FigRef{t-PS-Times-Roman.pdr}, \page. {\timesr And now a brief example of using Times-Roman. This font has the same encoding vector as Helvetica. And also it has ligatures, as it is not so difficult to show. And it even works, like in ``difficult''. As you can see also this font works nicely, and even all the dashes are right. Here is an en-dash (yes right there it was), then you have an em-dash as in exercise 12--34, and well---let me think: I think there was an em-dash. Can't write em---dash although I would like to! } \foc{\timesr}{PS-Times-Roman}{f-chart-tr} \clearpage \evl{PS-Times-Roman} \clearpage \section{\protect\PS{} Courier Fonts} % =================================== \label{s-courier} Here now \PS's Courier font which is a fixed pitch font as you can see from the example text below. The font table of this font is in \FigRef{f-chart-cour}, \page. The encoding vector for {\tt PS-Courier} can be found in \FigRef{t-PS-Courier.pdr}, \page. \begin{quote} \cour\raggedright And here is some sample text based on the Courier font. You also can print all the fancy characters but for some of them you have to use the {\cour\string\char} instruction of \TeX. So here some characters which you need in French: \char'323, \char'324, \char'325, \char'326. No ligatures are available in this font. Observe that I made the layout of this font as close as possible to courier. So I have, for instance, in this font the backslash~(~\char`\\) character loaded at the right position etc. \end{quote} \foc{\cour}{PS-Courier}{f-chart-cour} \clearpage \evl{PS-Courier} \clearpage \section{Other \protect\PS{} Font Examples} % ========================================= % The file "prcontrol.tex" is written by the Makefile! \input prcontrol.tex \ifnum\PrinterClass = 0 There will be no additional fonts listed because in your setup file ``{\tt local-defs}'' you specified that you have a \PS{} printer with the standard set of \PS{} fonts only, i.e.~only with the font families Helvetica, Times-Roman and Courier, and the Symbol font. \else \font\AvantGardeBook = PS-AvantGarde-Book \font\BookmanDemi = PS-Bookman-Demi \font\NewCenturySchlbkRoman = PS-NewCenturySchlbk-Roman \font\PalatinoBold = PS-Palatino-Bold \font\ZapfChanceryMediumItalic = PS-ZapfChancery-MediumItalic \font\ZapfDingbats = PS-ZapfDingbats I will present six more \PS{} font examples. Here is a list of the font tables: \begin{enumerate} \item AvantGarde-Book; see \FigRef{f-chart-AvantGarde-Book}, \page. \item Bookman-Demi; see \FigRef{f-chart-Bookman-Demi}, \page. \item NewCenturySchlbk-Roman; see \FigRef{f-chart-NewCenturySchlbk-Roman}, \page. \item Palatino-Bold; see \FigRef{f-chart-Palatino-Bold}, \page. \item ZapfChancery-MediumItalic; see \FigRef{f-chart-ZapfChancery-MediumItalic}, \page. \item ZapfDingbats; see \FigRef{f-chart-ZapfDingbats}, \page. \end{enumerate} \foc{\AvantGardeBook}{PS-AvantGarde-Book}{f-chart-AvantGarde-Book} \clearpage \evl{PS-AvantGarde-Book} \clearpage \foc{\BookmanDemi}{PS-Bookman-Demi}{f-chart-Bookman-Demi} \clearpage \evl{PS-Bookman-Demi} \clearpage \foc{\NewCenturySchlbkRoman}{PS-NewCenturySchlbk-Roman}% {f-chart-NewCenturySchlbk-Roman} \clearpage \evl{PS-NewCenturySchlbk-Roman} \clearpage \foc{\PalatinoBold}{PS-Palatino-Bold}{f-chart-Palatino-Bold} \clearpage \evl{PS-Palatino-Bold} \clearpage \foc{\ZapfChanceryMediumItalic}{PS-ZapfChancery-MediumItalic}% {f-chart-ZapfChancery-MediumItalic} \clearpage \evl{PS-ZapfChancery-MediumItalic} \clearpage \foc{\ZapfDingbats}{PS-ZapfDingbats}{f-chart-ZapfDingbats} \clearpage \evl{PS-ZapfDingbats} \clearpage \fi