Re: pdflatex works fine but latex just won't

Emil Jerabek <[email protected]> Wed, 26 Oct 2005 21:07:29 +0200
Newsgroups gmane.comp.tex.tetex.general
Message-ID <[email protected]>
Hi,

your file is wrong. When \pdfoutput = 0, the macro \PDFtrue gets
expanded but its expansion is skipped, resulting in two spurious \if's
without matching \fi's.

Emil Jerabek

On Wed, Oct 26, 2005 at 01:46:17PM +0000, Fredrik Thorsell wrote:
> Hi. 
> I've had problems with latex the last few days. First A file of mine wouldn't
> compile. It complained about unfinnished "/fi" statements. While compiling it on
> another system with latex installed it worked like a charm and it worked fine
> with pdflatex. The kink was at the first if statement in the lines below (which
> by the way is a rip of of "The Not So Short Introduction to LaTeX2e"):
> 
> \documentclass[a4paper,12pt]{article}
> \newif\ifPDF
> \ifx\pdfoutput\undefined\PDFfalse
> \else\ifnum\pdfoutput > 0\PDFtrue
                           ^
insert a blank space here -|

> 	\else\PDFfalse
> 	\fi
> \fi
> \usepackage[T1]{fontenc}
> \usepackage[swedish]{babel}
> \ifPDF
> 	\usepackage[pdftex]{graphicx}
> 	\usepackage[colorlinks,linkcolor=black,urlcolor=blue,pdftex,%
> 	pdftitle={ansökan},bookmarks=false]{hyperref}
> \else
> 	\usepackage[dvips]{graphicx}
> \fi