
\definefilesynonym
  [font-lbr] [font-pos]

\usemodule[pre-01]

\let\section\Topic
\let\subsection\Subject


\setupexternalfigures[directory=images]

\starttext

\startstandardmakeup
\midaligned{{\tfd Setting up \PDFTEX}}
\blank[2*big]
\midaligned{{\tfc Ed Cashin}}
\blank[6*big]
\midaligned{{\tfb TUG2000}}
\midaligned{{\tfc August 2000}}
\stopstandardmakeup

\Topics{Topics}


\section{Considerations}

Keeping a few things in mind will help in installing, upgrading, and
configuring \PDFTEX.

\startitemize
\item	\PDFTEX\ is an ``all-in-one'' processor.

	No \type{\special}s; no {\tt dvips}

\item	Type 1 fonts work well.
\item	\PDFTEX\ uses {\tt kpathsea} just as \TeX\ does.
\stopitemize

\section{Getting It}

\subsection{in a distro}

\PDFTEX\ comes with many popular distributions

\startitemize
\item	including te\TeX, fp\TeX, Mik\TeX, CMac\TeX, web2c's 
	texk\footnote{needs type1 fonts}
\item	easy: someone else has done the work
\stopitemize

\subsection{separately}

If your \TeX\ installation doesn't have \PDFTEX, you can install
\PDFTEX\ yourself.  

\startitemize
\item	\type{ftp://ftp.muni.cz/pub/tex/local/cstug/thanh/pdftex/}
\item	can be difficult: many interdependent pieces to consider
\item	binaries
\item	platform-independent files (in \type{pdftexlib.zip}) 
\stopitemize

Many of the issues are the same as for upgrading \PDFTEX\ in an
existing \TeX\ installation.  See below.

\section{Upgrading}

\subsection{whole distribution}

While you are upgrading \PDFTEX, why not upgrade everything?  By
upgrading your entire \TeX\ installation, you benefit from
improvements and bugfixes that you may not even be aware of.

\subsection{just \PDFTEX}

There are two ways to upgrade \PDFTEX\ itself in an existing \TeX\
installation: 

\startitemize
\item	from binaries

	advantages: no need to compile

	pitfalls: binaries may have been compiled for a different
	location in the system --- set \type{$TEXMFCNF}

	Remember to install the \type{*.pool} files too!  

	Rebuild \type{kpathsea} database with \type{mktexlsr}.

	Regenerate formats for \PDFTEX\ and \PDFETEX, including
	formats for \LATEX\ if necessary.

\item	from sources

	advantages: 
	\startitemize[packed]
	\item	you get the source for your perusal
	\item	you can do a custom build for your machine with your
		own preferences 
	\stopitemize

	pitfalls: problems with the sources (e.g. missing pdfetex)

\stopitemize

\LATEX\ users should remember to make symbolic links or copies of
\PDFTEX\ and \PDFETEX\ to their \LATEX\ counterparts.

\section{Configuration}

There are a few tweaks to make once \PDFTEX\ has been
					installed.\footnote{Fonts will
					be covered in other 
					presentations here at TUG2000.} 

\subsection{\type{texmf.cnf}}

Firstly, \PDFTEX\ must be able to find \type{texmf.cnf} itself.

\startitemize
\item	Binaries can be configured to look for \type{texmf.cnf} in a
	certain location.
\item	If the binaries don't know where \type{texmf.cnf} is, then
	they must be told: \type{$TEXMFCNF}
\stopitemize

There are a few \PDFTEX-specific variables for \type{texmf.cnf}: 

\startnarrower
\starttyping
VFFONTS
T1FONTS
TTFONTS
PKFONTS
TEXPSHEADERS
\stoptyping
\stopnarrower

Also, my te\TeX\ installation's \type{texmf.cnf} has some
\PDFTEX-specific sections, including \type{TEXINPUTS} and such, that
rarely need adjustment.

There is a FAQ about errors regarding a too-small pool size.  Pool
size is adjustable in the \type{texmf.cnf} file.

\subsection{\type{pdftex.cfg}}

You can set some handy defaults in \type{pdftex.cfg}.  The values set
in \type{pdftex.cfg} correspond to internal registers that can be
manipulated in your document if you need to override the default.

Some of the more interesting ones:

\startitemize
\item	\type{output_format}

	Set to one for PDF output to be \PDFTEX's default.

\item	\type{compress_level}

	Set to \type{0} for no compression, \type{1} for fastest
	compression, through \type{9} for highest
	compression.\footnote{Is anyone using 9?  Let me know!} 

\item	\type{image_resolution}

	The default is a low \type{72}, so set this value higher for
	high-resolution raster graphics.	

\item	\type{page_width} and \type{page_height}

	\PDFTEX\ has to know these since it creates PDF directly.  Use
	\type{true} dimensions to make the settings immune to
	magnification.\footnote{te\TeX\ users take note!  te\TeX\
	comes with these dimensions {\em not\/} set to true
	dimensions.} 

\stopitemize

\subsection{formats}

Formats are binary dumps of the memory state of pdf\-\TeX\ after it
loads a given macro\-package.  Formats allow \TeX\ and friends to run
very quickly.

The memory of one executable won't look the same as the memory of a
different executable, so whenever you have new executables, you must
generate new format files.

\startitemize
\item	te\TeX's \type{fmtutil} tool

	\type{fmtutil --edit}

	\type{fmtutil --all}

\item	\CONTEXT's \type{texexec} tool

	\type{texexec --make en nl uk de}

\item	manual format generation
	\startitemize[packed]
	\item	\PDFTEX\ has same syntax as \TeX:

		\type{pdftex -ini -fmt=pdftex plain "\dump"}
% 		\type{pdftex -ini -fmt=pdflatex latex.ltx}
	
	\item	\PDFETEX:
	
		\type{pdfetex -ini -efmt=pdfetex plain "\dump"}

	\stopitemize
\stopitemize

\section{Resources}

links: \type{http://www.tug.org/applications/pdftex/}

source: \type{ftp://ftp.muni.cz/pub/tex/local/cstug/thanh/pdftex/}

manual: \type{http://www.tug.org/applications/pdftex/pdftex-s.pdf}

FAQ: \type{http://www.tug.org/applications/pdftex/pdfTeX-FAQ.pdf}

\METAPOST: \type{http://cm.bell-labs.com/who/hobby/MetaPost.html}

perl: \type{http://www.perl.com/}

\page[empty]

\stoptext
