Quoting Fredrik Thorsell <[EMAIL PROTECTED]>:

This sounds like a job for ifpdf.sty.  Before pdftex stabilized, tex (the
program) was used for .dvi and pdftex (program) was used for .pdf.  Now
pdftex is always used, so \pdfoutput will always be defined unless you use
a hack that redefines it for .dvi mode.  Most current packages don't need
to be told which type of output you are using, so something like:

\documentclass[a4paper,12pt]{article}
\usepackage{ifpdf} 
\usepackage[T1]{fontenc}
\usepackage[swedish]{babel}
\usepackage{graphicx}
\ifpdf
\usepackage[colorlinks,linkcolor=black,urlcolor=blue,%
        pdftitle={ansökan},bookmarks=false]{hyperref}
\fi

should do the job.

> 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
>       \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
> 


-- 
George N. White III
Head of St. Margarets Bay, Nova Scotia

Reply via email to