The localdriver v1.0 Package for L^{A}TEX 2ε

Martin Reddy

October 14, 1996

1 Introduction

The localdriver package provides a simple interface to writing L^{A}TEX code that is conditional for a particular driver (e.g. dvips, oztex etc.)

The default driver is found from the graphics package configuration file^{1}. However, this can be overriden by specifying the desired driver name as a package option. These option names are the same as those used by the graphics (v0.6c) package, e.g. dvips, xdvi, dvi2ps, dvialw,

dvilaser, dvipsone, dvitops, dviwindo, emtex, dviwin, oztex, psprint, pubps, textures,
pctexps, pctexwin, pctexhp or ln.

Once the localdriver package has been loaded, the current driver name can be accessed via the macro \LocalDriver. There are also a couple of useful commands available…

2 Commands

 \DoIfDriver{<driver-name>}{<conditional-code>} : executes the <conditional-code>

only if the current driver is <driver-name>.

\QuietDrivers : by default \DoIfDriver{}{} will output a message to the terminal if it does include driver specific code. You may use this command to make \DoIfDriver{}{} work completely quietly.

3 Example

   \documentclass{article}
   \usepackage{localdriver}
   \begin{document}
      % Only add the \special command if dvips is the driver
      \DoIfDriver{dvips}{\special{papersize=148mm,210mm}}
   \end{document}

1/usr/local/lib/TeX/tex/latex/config/graphics.cfg