\def\fileversion{v2} \def\filedate{91/12/10} % % This document describes an NFSS setup which declares PostScript % fonts, and the associated style files % \def\SLiTeX{S\kern-.065em L\kern-.18em\raise.32ex\hbox{i}\kern-.03em\TeX} % PiCTeX Documentation from the PiCTeX Files \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC} \def\PiCTeX{\PiC\kern-.11em\TeX} \def\PS{{\sc PostScript}} \documentstyle[]{article} \begin{document} \title{Notes on setup of the New Font Selection Scheme to use PostScript fonts} \author{Sebastian Rahtz} \date{\filedate} \maketitle % \section{Introduction} This set of files offers a complete working setup of the NFSS for use with \PS\ fonts, and includes material for building new copies of \LaTeX\ and \SLiTeX; it is based on the system I created between 1989 and 1991 for Southampton Computer Science, checked and updated. The macros for loading \PS\ fonts borrow from \verb|psmath| by Kresten Krab Thorup and \verb|npsfont.sty| by Timothy Van Zandt. Style options are provided for the common PostScript fonts. You should be familiar with the standard NFSS files and their use to follow this document. It is important to realize that I assume you are going to create a new {\em format file}, not just using a new style option with your existing setup. If you are not happy doing this, go back to the New Font Selection Scheme documentation and read about it there. I also assume that you have all the NFSS files on your \TeX\ path, and know what to respond with when `initex' demands `xxxlfont.sty', `preload.tex' etc. Style files are offered to set documents in the common PostScript fonts, plus exotica like Lucida Maths and Knuth's `punk' (useful in slides perhaps!). It is assumed that the user uses a driver which understands virtual fonts, and that Karl Berry's naming scheme is followed. Two command files for em\TeX's `mfjob' package are provided; `punk.mfj' creates the fonts needed by one of the tests, which uses Knuth's `punk' fonts; `psnfss.mfj' creates all the CMR fonts which seem to be used by the test documents and are not normally provided. If you do print my tests, you are likely to have to create some new PK files. If you are a Unix person, use some similar utility. MSDOS users should note that `dvips' falls over trying to allocate memory when processing my tests. Life is hard. \section{Portability} This entire setup will work if you use a \PS\ printer, use Berry's names for \PS\ fonts in \TeX, use virtual fonts to map \PS\ to CMR layout, and process your \verb|.dvi| files with Rokicki's dvips. Other systems will fall over.\footnote{What a `sweep under the carpet' term this is! Anthropomorphism rules OK} The last requirement may be waived if you just want the fonts to work, not the \PS\ goodies I happen to have tested in the test file. \section{Installation} Unix users, or DOS users with a copy of a Unix-like `make' program (such as that which comes with Turbo C) can simply type `\verb|make latex slitex|' and then `\verb|make install|' to get things built and installed ({\bf check the paths in \verb|makefile| first!}); others will have to run \verb|initex| on \verb|newlatex.tex| and \verb|newslitex.tex| by hand, and install the .fmt files. The Makefile will create format files called `newlatex.fmt' and `nwslitex.fmt' which you can access in the normal way. A single test file, \verb|tests.tex| is provided for both \LaTeX\ and \SLiTeX, called by two shells called \verb|latest.tex| and \verb|slitest.tex| respectively. This exercises the NFSS a little, and also calls on \PS\ colors, embedded PostScript figures (using a new version of the `psfig' macros), changebars, dingbats etc. It will not print unless processed by Rokicki's \verb|dvips| so don't try some other mangy programs. If you haven't got a PostScript printer, why are you reading this? The only way I have of seeing the effect of colours is to use GhostScript. I can run the output from \verb|latest.dvi| and \verb|slitest.dvi| through `dvips' and `gs', and it works, but thats as far as I have tested it all! \section{Files} If in doubt, copy files from the standard \LaTeX\ files or M\&S NFSS files (release of December 1991 or later) to make this thing work; the following files make up my distribution: \begin{description} \item[avant.sty]: makes Avantarde default text font, and Times default sans font. \item[bookman.sty]: makes Bookman default text font, and Helvetica default sans font. \item[color.sty]: a style file to use \PS\ specials to make colour slides; this can also be used in plain \LaTeX. \item[dingbat.sty]: sets up various commands which use the Zapf Dingbats font, each of which take as a parameter the character number of a symbol in the font. Possibilities are: \begin{description} \item[ding] Just prints the character \item[dingfill] wherever you use a filler, fills the space with the selected character \item[dingline] a freestanding line of symbols \item[dinglist] a list environment which tags items with the selected symbol \end{description} \item[epsfig.sty]: a style file which is an enhanced version of Trevor Darrell's `psfig' macros to make it work at its best with Rokicki's dvips program. \item[fontdef.mag]: input by pfontdef.tex, and defines all the CMR fonts you want to use (mostly a copy of fontdef.ori, but with changes to get more fonts right, albeit magnified, instead of substituting. \item[helv.sty]: makes Helvetica default text font, and Times default sans font. \item[latest.tex]: test new \LaTeX\ font styles and sizes, and assorted other features. \item[lucida.sty]: sets up Lucida as text font, and Lucida Sans as sans font \item[lucmath.sty]: sets up Lucida Maths fonts to replace standard Computer Modern Roman maths \item[makefile]: Unix-type Makefile for creating and installing new formats. \item[ncs.sty]: makes NewCenturySchoolbook default text font, and AvantGarde default sans font \item[newslide.sty]: {\bf must} be used with new \SLiTeX\ in place of normal slides.sty \item[pnfss.tex]: This document. \item[palatino.sty]: makes Palatino default text font, and Times default sans font. \item[pfontdef.tex]: to be used where lfonts.tex calls for `fontdef.tex'; this is where the \PS\ font macros are defined. %%\item[pi.sty]: (experimentally!) sets up Mathematical PI maths symbol fonts for use %%\item[pitest.tex]: tests Mathematical PI fonts \item[rawfonts.tex]: a useful set of macros by Mark Roth to define all those `raw' calls like \verb|fivrm| used in packages like \PiCTeX\ in terms of the NFSS. \item[sfontdef.tex]: to be used where lfonts.tex calls for `fontdef.tex' if you are building \SLiTeX; this is where all the \SLiTeX\ fonts are defined. \item[sfonts.tex]: {\bf Note} that there is not a file called sfonts.tex, but you should use the NFSS lfonts.tex when splain.tex calls for it, {\em not} the plain \LaTeX\ lfonts.tex or sfonts.tex. \item[s-latex.tex]: Wrapper file which calls lplain.tex to build \LaTeX \item[s-slitex.tex]: Wrapper file which calls splain.tex to build \SLiTeX; this has some very important extra code in it to over-ride \LaTeX\ bits and pieces, so do not ignore it! \item[tests.tex]: simple test of font sizes and styles, used by latest.tex and slitest.tex. Also tests a number of other features. \item[slitest.tex]: test new \SLiTeX\ font styles and sizes \item[times.sty]: makes Times default text font, and Helvetica default sans font \item[varsym.sty]: declares a font family for \verb|cmex|, so allowing the size to vary with other characters; the results are dubious in \SLiTeX. \end{description} \section{User interface} The casual user should include one of the style options {\em times.sty}, {\em bookman.sty}, {\em helv.sty}, {\em palatino.sty}, {\em avant.sty}, or {\em ncs.sty} (and {\em lucidamath.sty} if they have the Lucida Maths fonts) to change the default text fonts; in addition, they can change the defaults at any time by saying things like \begin{verbatim} \romanfont{times} \sansfont{avantgarde} \typewriterfont{courier} \end{verbatim} wherever they like in the document if the font family has already been loaded. Note that the NFSS by default only allows such commands in the preamble; I have (for the present) let people abuse the system. \section{Style-writers interface} In the common case, a `times.sty' is constructed as follows: \begin{verbatim} % set up Courier family \def\load@courier{% \postscript@fontdef{Courier}{courier}% {pcrr}{pcrro}{pcrb}{pcrbo}{pcrr}{pcrr} } % set up Helvetica family \def\load@helvetica{% \postscript@fontdef{Helvetica}{helvetica}% {phvr}{phvro}{phvb}{phvbo}{phvrc}{phvro} } % set up Times family \def\load@times{% \postscript@fontdef{Times}{times}% {ptmr}{ptmri}{ptmb}{ptmbi}{ptmrc}{ptmro} } % set up association between families and LaTeX defaults \romanfont{times} \sansfont{helvetica} \typewriterfont{courier} \end{verbatim} where the names `times', `courier', `palatino', `avantgarde', `bookman', `ncs' and `helvetica' are first defined by constructing macros like \verb|\load@times|, and then used. If you want to extend this by adding a new name for eg `optima', you must define the macro \verb|\load@optima|. You have to supply the names of six fonts as parameters to \verb|\postscript@fontdef|, which are those for normal, italic, bold, bolditalic, small caps and slanted. The first parameter is simply descriptive, and is not actually used. To add a new series or shape combination for a family, use a statement like this: \begin{verbatim} \declare@font{times}{bx}{sc}{ptmbc} \end{verbatim} which declares `ptmbc' as the font to use when the user asks for family `times', series `bx' and shape `sc'. An extension from the first versions of this system is due to macros by Timothy Van Zandt; this allows the \PS\ font to be scaled. To quote his documentation: \begin{quote} Mixing fonts that are not designed to be used together is not for purists, but many of us do it anyway. Scaling the fonts can at least correct for differences in the x-heights. This is important if you use Computer Modern fonts for in-line math and some other fonts for text. To find out the x-height of the 10pt size of a font use the command \begin{verbatim} \showxheight{} \end{verbatim} E.g., \verb|\showxheight{phvr}| and \verb|\showxheight{cmr10}| displays \begin{verbatim} x-height of cmr10 at 10pt is 4.30554pt x-height of phvr at 10pt is 5.24998pt \end{verbatim} on the terminal. Scaling the Helvetica fonts by 4.30554/5.24990 = .82 gets the x-heights of these fonts in line. It is best to set the x-heights the same for the medium weight, normal shaped fonts, and then scale the rest of the fonts in the same family by the same amount. \end{quote} This is implemented by an optional first parameter to \verb|\declare@font| and \verb|\postscript@fontdef| which is the amount by which the font should be scaled. So Helvetica can be loaded at a .82 scale by changing a style file to read: \begin{verbatim} \def\load@helvetica{% \postscript@fontdef[.82]{Helvetica}{helvetica}% {phvr}{phvro}{phvb}{phvbo}{phvrc}{phvro} } \end{verbatim} This facility is exercised in the test file by loading a scaled-up copy of Zapf Chancery with the command: \begin{verbatim} \declare@font[1.5]{bigzapf}{m}{n}{pzcmi} \end{verbatim} and then activating it with \verb|\family{bigzapf}\selectfont| resulting in Chancery being 50\% larger than before. {\em This is not the recommended way of using the macros!} \end{document}