more reliable check for PDF output using ifpdf.sty;
authorwenzelm
Wed Sep 28 15:13:02 2005 +0200 (2005-09-28)
changeset 17698e86cde1e5b12
parent 17697 005218b2ee6b
child 17699 04d51df0c328
more reliable check for PDF output using ifpdf.sty;
doc-src/pdfsetup.sty
lib/texinputs/pdfsetup.sty
     1.1 --- a/doc-src/pdfsetup.sty	Wed Sep 28 14:41:43 2005 +0200
     1.2 +++ b/doc-src/pdfsetup.sty	Wed Sep 28 15:13:02 2005 +0200
     1.3 @@ -1,13 +1,20 @@
     1.4 -\message{pdfsetup.sty v0.1 11/7/2001}
     1.5 -\@ifundefined{pdfoutput}{\message{No PDF output}%
     1.6 -  \usepackage{../url}%
     1.7 -  \newcommand{\hfootref}[2]{#2\footnote{\url{#1}}}}%
     1.8 -{\message{Generating PDF output}%
     1.9 -  \usepackage{color}\definecolor{darkblue}{rgb}{0,0,0.5}%
    1.10 -  \usepackage[pdftex,colorlinks=true,linkcolor=darkblue,citecolor=darkblue,filecolor=darkblue,pagecolor=darkblue,urlcolor=darkblue]{hyperref}%
    1.11 +%% $Id$
    1.12 +%%
    1.13 +%% smart url or hyperref setup -- special version for Isabelle documentation
    1.14 +%%
    1.15 +
    1.16 +\message{pdfsetup.sty v0.2 28/9/2005}
    1.17 +\RequirePackage{ifpdf}
    1.18 +\ifpdf
    1.19 +  \usepackage{color}\definecolor{darkblue}{rgb}{0,0,0.5}
    1.20 +  \usepackage[pdftex,colorlinks=true,linkcolor=darkblue,citecolor=darkblue,filecolor=darkblue,pagecolor=darkblue,urlcolor=darkblue]{hyperref}
    1.21                %no a4paper because overall style sets this (not for Springer!)
    1.22 -  \newcommand{\hfootref}[2]{\href{#1}{#2}\footnote{\url{#1}}}%
    1.23 -  \gdef\fnote#1{\hyperpage{#1}n}%
    1.24 -  \gdef\bold#1{\textbf{\hyperpage{#1}}}}
    1.25 +  \newcommand{\hfootref}[2]{\href{#1}{#2}\footnote{\url{#1}}}
    1.26 +  \gdef\fnote#1{\hyperpage{#1}n}
    1.27 +  \gdef\bold#1{\textbf{\hyperpage{#1}}}
    1.28 +\else
    1.29 +  \usepackage{../url}
    1.30 +  \newcommand{\hfootref}[2]{#2\footnote{\url{#1}}}
    1.31 +\fi
    1.32  
    1.33  \urlstyle{rm}
     2.1 --- a/lib/texinputs/pdfsetup.sty	Wed Sep 28 14:41:43 2005 +0200
     2.2 +++ b/lib/texinputs/pdfsetup.sty	Wed Sep 28 15:13:02 2005 +0200
     2.3 @@ -4,8 +4,11 @@
     2.4  %% smart url or hyperref setup
     2.5  %%
     2.6  
     2.7 -\@ifundefined{pdfoutput}
     2.8 -{\usepackage{url}}
     2.9 -{\usepackage{color}\definecolor{darkblue}{rgb}{0,0,0.5}
    2.10 +\RequirePackage{ifpdf}
    2.11 +\ifpdf
    2.12 +  \usepackage{color}\definecolor{darkblue}{rgb}{0,0,0.5}
    2.13    \usepackage[pdftex,a4paper,colorlinks=true,linkcolor=darkblue,citecolor=darkblue,filecolor=darkblue,pagecolor=darkblue,urlcolor=darkblue]{hyperref}
    2.14 -  \IfFileExists{thumbpdf.sty}{\usepackage{thumbpdf}}{}}
    2.15 +  \IfFileExists{thumbpdf.sty}{\usepackage{thumbpdf}}{}
    2.16 +\else
    2.17 +  \usepackage{url}
    2.18 +\fi