|
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: 8166 (0x1fe6) Types: TextFile Names: »examples3.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/examples3.tex«
\InputD{fotable.tip} \InputD{ex-mac.tex} \InputD{inputc.tip} \InputD{../psfig/psfig.tex} \font\emulone = PS-E1-cmr10 \font\emultwo = PS-E2-cmr10 \font\emulthree = PS-E3-cmr10 \font\cour= PS-Courier \font\timesr = PS-Times-Roman \font\ti = PS-Times-Italic at 15.33pt \font\helv = PS-Helvetica \font\ihelv = PS-IHelvetica % Our form of an invisible SliTeX font. \font\cmrten = cmr10 \font\cmttten = cmtt10 \chapter{Even More Examples} % ========================== \label{c-examples3} This chapter is the last chapter in a series of three example chapters of this document. The source code for this chapter can be found in {\tt doc/examples3.tex}. \section{Font Emulation Examples} % =============================== \label{s-emul-ex} I will now present some font emulation examples. In such examples a font for which a {\tt TFM} file but no pixel file is available is emulated by a \PS{} font. It should be noted here that the emulating font currently must be a \PS{} font and not a pixel based font. This is a restriction which could be lifted. The font being emulated on the other hand can be any font. \subsection{First Example} % ======================== First let us emulate {\tt cmr10} by {\tt PS-Helvetica}. Font emulation as explained before is useful for cases where a {\tt TFM} file but no pixel files are available. As you will see in a minute, the output looks ugly but all line breaks and the whole layout of the text is the same as if the original font was used. This is of course what you expect to happen: there must be no change in line breaks etc.~because the {\tt TFM} file of the font being emulated is being used. The following {\tt PFD} file was used for the first example: {\VerbatimTab = 8 \ListVerb {PS-E1-cmr10.pfd} } \BeginVerbWrite{}{} This is the text where we use to show font emulation. Indeed the two texts come out to look the same. Well, isn't that nice!! Let us write a little more text so you see that indeed all the line breaks and the spacing is the same! Now, sometimes things are not quite what you want so for instance some of the ligatures in the emulation mode don't work---but that's not such a big problem. Even that can be fixed. And we will see soon how! So here now some special characters, like ligatures ff, fi, ff, fl, ffi, where you can see that the emulating font does not have such characters. And \char'0, \char'1, \char'2, \char'3. \EndVerbWrite Here is that text reprinted with cmr10: \begin{quotation} {\rm \VerbAsSource} \end{quotation} Here is the same text reprinted with the emulating font: \begin{quotation} {\emulone \VerbAsSource} \end{quotation} \subsection{Second Example} % ========================= The following {\tt PFD} file is used now. Here I will use the \PS{} Courier font (which is a fixed spaced font) to emulate again {\tt cmr10}. \ListVerb{PS-E2-cmr10.pfd} And here again are two samples (now the output looks really bad!): \begin{quotation} {\rm \VerbAsSource} \end{quotation} Here is the same text reprinted with the emulating font: \begin{quotation} {\emultwo \VerbAsSource} \end{quotation} \subsection{Third Example} % ======================== In this last example I will go back to the first example. You can see that now all ligatures are printed correctly although not very legible because one completes the missing ligature positions in the font chart of this font by \PS{} procedure characters printing these ligatures. \ListVerb{PS-E3-cmr10.pfd} Here again are the two samples: \begin{quotation} {\rm\VerbAsSource} \end{quotation} Here is the same text reprinted with the emulating font: \begin{quotation} {\emulthree \VerbAsSource} \end{quotation} \section{Using \PS{} Fonts in \SLITEX} % ==================================== I will now discuss the making of invisible \SLITEX{} fonts with the \TeXPS{} software. \subsection{An Invisible \protect\SLITEX{} Font} % ============================================== The following {\tt PFD} file describes an invisible \SLITEX{} font: \ListVerb{PS-IHelvetica.pfd} \subsection{Demonstrating \SLITEX{} \protect\PS{} Fonts} % ====================================================== Let me now show an application of this invisible \SLITEX{} font. When this invisible \PS{} font is used, the driver will only move horizontally by the width of every character called for, but {\it without\/} printing the character. Here is an example. The following input was used: \BeginVerbWrite{}{} % \Sample % Prints some sample text. % #1: first font. % #2: second font. \def\Sample #1#2{% \hbox{{#1This }{#2is }{#1fun, }{#2but }{#1that's }{#2enough }% {#1now.}} } \Sample{\helv}{\ihelv} \Sample{\ihelv}{\helv} \EndVerbWrite \VerbAsVerb \noindent This generated the following output: \VerbAsSource \subsection{Making Invisible \protect\PS{} Fonts Accessible in \SLITEX} % ===================================================================== When you use these fonts in \SLITEX{} then the first thing you have to do is to print out the file {\tt sfonts.tex} which comes with the \SLITEX{} sources. This file tells you what fonts you have to replace. The next problem you will most likely run into is that the number of preloaded fonts in \SLITEX{} is very big, and at least in my case I was only able to load two of the \PS{} fonts to produce slides. To make long story short here is an example of two files which were used to produce slides with \PS{}. First the root file: \ListVerb{SliTeX/root-ps.tex} \noindent And here is the file containing the text for the slides: \ListVerb{SliTeX/slidefile-ps.tex} By the way, for comparison and also to simply have a test case for using regular \SLITEX{} fonts here is the source of some regular \SLITEX{} examples: \ListVerb{SliTeX/root.tex} \noindent And here is the file containing the text for the slides: \ListVerb{SliTeX/slidefile.tex} \clearpage \input slitex-control.tex \ifnum\SliTeXControl = 1 % \IncludeSliTeX % ============== % #1: file serial number of the file to include. % #2: -ps for the PostScript examples, empty for % the regular examples. \def\IncludeSliTeX #1#2{% \begin{figure} $$ \vbox{ \psfig{figure=SliTeX/root#2-#1.ps,height=7.0in} } $$ \caption{\protect\SLITEX{} output, page #1} \label{f-root#2-#1.ps} \end{figure} \clearpage } \IncludeSliTeX{1}{} \IncludeSliTeX{2}{} \IncludeSliTeX{3}{} \IncludeSliTeX{4}{} \IncludeSliTeX{1}{-ps} \IncludeSliTeX{2}{-ps} \IncludeSliTeX{3}{-ps} \IncludeSliTeX{4}{-ps} \else \centerline{\bf No \SLITEX{} available.} \fi \section{Font Substitutions} % ========================== Let me discuss now a feature of the driver which I added at a later stage\footnote{Pierre MacKay, University of Washington, Seattle, Washington, should be credited with gently ordering me to add this feature.} which causes the driver to look for alternate pixel files in case a requested pixel file cannot be located. For the following example I used the following input: \BeginVerbWrite{}{} \def\FontSubExample #1{% \hbox{% Using #1, \font\xx = #1 \xx ABCDEF }% } $$ \vbox{ \FontSubExample{cmtt10 at 5pt} \FontSubExample{cmtt10 at 10pt} \FontSubExample{cmtt10 at 15pt} \FontSubExample{cmtt10 at 20pt} \FontSubExample{cmtt10 at 40pt} \FontSubExample{cmtt10 at 80pt} } $$ \EndVerbWrite \VerbAsVerb The output generated by the above source code reads as follows: \VerbAsSource \section{Extensive Font Tables} % ============================= In this section I will present a common font table for the following fonts: \begin{enumerate} \item \verb+\rm+. Computer Modern Roman ({\tt cmr10}). \item \verb+\helv+. \PS{} Helvetica. \item \verb+\times+. \PS{} Times-Roman. \item \verb+\tt+. Computer Modern Typewriter Style ({\tt cmtt10}). \item \verb+\cour+. \PS{} Courier. \end{enumerate} The purpose of presenting all these fonts together is to have a direct comparison of the encodings of all these fonts. \clearpage { \let\myrm = \cmrten \let\mytt = \cmttten % The following definition is necessary because of the way \line is defined % in LaTeX. \def\line{\hbox to \hsize} \input font-tab.tex }