Commits

Joseph Wright  committed 6f3c10d

Load ifpdf and use it for PDF mode detection, rather than fiddling
with \pdfoutput

This fixes issue #123 (hopefully), but is also better practice than
directly using the primitive

  • Participants
  • Parent commits 1a3bb02

Comments (0)

Files changed (3)

File base/beamer.cls

 
 \beamer@transferifnecessary
 
-%
-% Ensure that \pdfoutput is defined. Might be removed at some point.
-%
-\ifx\pdfoutput\@undefined \newcount\pdfoutput \fi
-\ifx\pdfoutput\relax \newcount\pdfoutput \fi
+\RequirePackage{ifpdf}
 
 %
 %
 \def\beamer@loaducs{}
 
 \DeclareOptionBeamer{ucs}{%
-  \ifcase\pdfoutput
+  \ifpdf
+    \PassOptionsToPackage{pdftex,unicode}{hyperref}
     \def\beamer@loaducs{
-      \RequirePackage{ucs}%
+      \RequirePackage[hyperref]{ucs}%
       \AtBeginDocument{\PreloadUnicodePage{0}}%
       \AtBeginDocument{\PreloadUnicodePage{1}}%
     }
-  \or
-    \PassOptionsToPackage{pdftex,unicode}{hyperref}
+  \else    
     \def\beamer@loaducs{
-      \RequirePackage[hyperref]{ucs}%
+      \RequirePackage{ucs}%
       \AtBeginDocument{\PreloadUnicodePage{0}}%
       \AtBeginDocument{\PreloadUnicodePage{1}}%
     }

File base/emulation/beamerprosper.sty

 \define@key{beamerprosper}{Glitter}[true]{\def\beamerprosper@trans{Glitter}}
 
 
-\newcommand{\PDForPS}[2]{\ifx\pdfoutput\@undefined#2\else#1\fi}
-\newcommand{\onlyInPDF}[1]{\ifx\pdfoutput\@undefined\else#1\fi}
-\newcommand{\onlyInPS}[1]{\ifx\pdfoutput#1\@undefined\fi}
+\newcommand{\PDForPS}[2]{\ifpdf#1\else#2\fi}
+\newcommand{\onlyInPDF}[1]{\ifpdf#1\fi}
+\newcommand{\onlyInPS}[1]{\ifpdf\else#1\fi}
 
 \newenvironment{slide}[2][]{%
   \def\beamerprosper@toc{#2}

File base/multimedia/multimedia.sty

 
 \RequirePackage{keyval}[1997/11/10]
 
-\ifx\pdfoutput\@undefined
-  \newcount\pdfoutput\pdfoutput=0
-\fi
+\RequirePackage{ifpdf}
 
-\ifnum\pdfoutput=0
+\ifpdf
   \let\mm@psorpdf\@firstoftwo
   \PassOptionsToPackage{pdfmark}{hyperref}
   \define@key{PDF}{Movie}{\pdf@addtoks{#1}{Movie}}