[pdftex] Document portable to both latex and pdflatex - FAQ Problem??

Bernhard Enders bgeneto at ig.com.br
Thu Oct 18 03:02:59 CEST 2001


Hi there!

Question 3.1.6 of PDFTeX-FAQ explain how to get compatibility:
---------------------------------------------------begin code
Check for the existence of the variable \pdfoutput:
\newif\ifpdf
\ifx\pdfoutput\undefined
  \pdffalse % we are not running PDFLaTeX
\else
  \pdfoutput=1 % we are running PDFLaTeX
  \pdftrue
\fi
%Then use your new variable \ifpdf
\ifpdf
  \usepackage[pdftex]{graphicx}
  \pdfcompresslevel=9
\else
  \usepackage{graphicx}
\fi
---------------------------------------------------end code

But when I put the code above in my LaTeX preamble and I've got an error in
latex log file:

---------------------------------------------------begin code
! LaTeX Error: Missing \begin{document}.
 ...

l.20   \pdfoutput=
                  1 % we are running PDFLaTeX
---------------------------------------------------end code

What is the problem here? The \pdfoutput control word is not just for pdftex
(not latex, I think)? How can I solve this problem?---cause when I use
\usepackage{graphicx}to produce pdf output with images I've got an error of
division by zero.

Last question: What is pdf(e)TeX and why this error is so  common in my
files:

---------------------------------------------------begin code
loading : Context Support Macros / PDF
! Undefined control sequence.
<write> \m!systems
                    : Why not use pdf(e)TeX binaries?
l.59 ...}{Why not use pdf(e)TeX binaries?}
---------------------------------------------------end code

Any help is welcome, thanks in advance, Bernhard Enders.




More information about the pdftex mailing list