CTAN Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/bxdvidriver

README.md

BXd­vidriver Pack­age

: To spec­ify a driver op­tion ef­fec­tive only in DVI out­put

This sin­gle-func­tion pack­age en­ables au­thors to spec­ify a global driver op­tion (dvips, dvipdfmx, etc) which is ap­plied only when the en­gine out­puts a DVI file. It is use­ful to cre­ate spe­cial doc­u­ment- tem­plates that can be com­piled in both PDF-mode and DVI-mode.

Sys­tem re­quire­ment

  • for­mat: .
    • en­gine: Any­thing.
    • Depen­dent pack­ages:
      • if­pdf, iflu­a­tex, ifx­e­tex, ifv­tex
        • pdf­tex­cmds

In­stal­la­tion

  • *.sty → $TEXMF/tex/la­tex/BXd­vidriver

Li­cense

This pack­age is dis­tributed un­der the MIT Li­cense.

The bxd­vidriver Pack­age

Pack­age Load­ing

\usepackage[<option>,...]{bxdvidriver}

The avail­able op­tions are de­scribed here­after.

Driver op­tions

The fol­low­ing driver op­tions are avail­able:

dvips,xdvi,dvipdf,dvipdfm,dvipdfmx,dvipsone
dviwindo,oztex,textures,pctexps,pctex32

Sup­pose the doc­u­ment be­gins with:

\documentclass[a4paper]{article}
\usepackage[dvipdfmx]{bxdvidriver}
\usepackage{graphicx,color}

If the doc­u­ment is com­piled with pdfla­tex (or xe­la­tex, lu­ala­tex), then the pack­age does noth­ing and the driver op­tion dvipdfmx is sim­ply ig­nored.

How­ever, if the doc­u­ment is com­piled with la­tex (or any other en­gine that out­puts DVI files), then the pack­age adds the given driver op­tion dvipdfmx to the global op­tion list, and makes the set­tings ef­fec­tively the same as the fol­low­ing:

\documentclass[a4paper,dvipdfmx]{article}
\usepackage{graphicx,color}

The driver op­tion is glob­ally in ef­fect, and thus the pack­ages graph­icx and color will choose the driver for dvipdfmx.

Note. Some care must be taken when the doc­u­ment class it­self has some driver-de­pen­dent be­hav­ior. In that case, sim­ply load­ing bxd­vidriver af­ter \documentclass would leave its driver op­tion un­ap­plied to the doc­u­ment class. In­stead, you must load the bxd­vidriver pack­age be­fore \documentclass with \RequirePackage com­mand.

\RequirePackage[dvipdfmx]{bxdvidriver}
\documentclass[a4paper]{some-fancy-class}
\usepackage{graphicx,color}

Other op­tions

This pack­age is es­sen­tially sin­gle-func­tion, but as side ef­fect it also checks some in­tegrity on driver set­tings:

  • whether (at most) one driver op­tion is given;
    • whether the driver matches the (PDF-out­put) en­gine;
    • whether (at most) one graph­ics driver is loaded.

By de­fault, an er­ror is is­sued when any check fails. But the be­hav­ior can be changed by op­tions.

  • check (de­fault): Check fail­ure is­sues an er­ror.
    • nocheck: Check fail­ure does not is­sue an er­ror.

Usage

This pack­age of­fers no user com­mands or en­vi­ron­ments. All the set­tings are done by pack­age op­tions.

Re­vi­sion His­tory

  • Ver­sion 0.2a ‹2017/02/13›
    • Bug fix.
    • Ver­sion 0.2 ‹2016/03/26›
      • The first pub­lic ver­sion.

Takayuki YATO (aka. "ZR") https://github.com/zr-tex8r

Down­load the con­tents of this pack­age in one zip archive (4.5k).

bxd­vidriver – En­ables spec­i­fy­ing a driver op­tion ef­fec­tive only in DVI out­put

This sin­gle-func­tion pack­age en­ables au­thors to spec­ify a global driver op­tion (dvips, dvipdfmx, etc) which is ap­plied only when the en­gine out­puts a DVI file. It is use­ful to cre­ate spe­cial doc­u­ment- tem­plates that can be com­piled in both PDF-mode and DVI-mode.

Pack­agebxd­vidriver
Ver­sion0.2a
Li­censesMIT Li­cense
Main­tainerTakayuki Yato
Con­tained inTeX Live as bxd­vidriver
MiKTeX as bxd­vidriver
TopicsDVI pro­ces­sor
...
Guest Book Sitemap Contact Contact Author