diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-09-09 20:14:22 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-09-09 20:14:22 +0000 |
commit | 561bdbb55852c974eee56370083c490885cabbf0 (patch) | |
tree | 86472555cb8d79c451f8d548380edf910f05e51c /Master/texmf-dist/tex/latex/pdftex-def | |
parent | 2ef2aadc920ffc6fe45e66f4510d3e11106f15f4 (diff) |
pdftex-df v0.04l 2008/09/08
git-svn-id: svn://tug.org/texlive/trunk@10524 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdftex-def')
-rw-r--r-- | Master/texmf-dist/tex/latex/pdftex-def/pdftex.def | 74 |
1 files changed, 47 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def b/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def index 40dce39fab9..3f79fa8eaea 100644 --- a/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def +++ b/Master/texmf-dist/tex/latex/pdftex-def/pdftex.def @@ -1,4 +1,4 @@ -\ProvidesFile{pdftex.def}[2008/07/16 v0.04k Graphics/color for pdfTeX] +\ProvidesFile{pdftex.def}[2008/09/08 v0.04l Graphics/color for pdfTeX] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% LaTeX Colour and Graphics support for PDFTeX @@ -178,8 +178,12 @@ % As side effect MetaPost images are put in separate objects % and are not inlined in the page stream. % Status: experimental. +% 2008/09/08 v0.04l (HO) +% * Adds an error message, if pdfTeX is called in DVI mode. +% * Aborts loading of the package with an error message, +% if pdfTeX is missing. % -% prefix of internal commands for this file `pdftex.def': +% Prefix of internal commands for this file `pdftex.def': % \GPT@ (Graphics bundle PdfTex driver) \expandafter\edef\csname GPT@endinput\endcsname{% @@ -285,26 +289,64 @@ \@ifundefined{@spaces}{% \def\@spaces{\space\space\space\space}% }{} +\@ifundefined{@ehc}{% + \def\@ehc{% + Try typing \space <return> % + \space to proceed.\MessageBreak + If that doesn't work, type \space X <return> \space to quit.% + }% +}{} % LaTeX defines \MessageBreak=\relax outside messages \ifx\MessageBreak\@undefined - \def\MessageBreak{^^J}% \def\GPT@error#1#2{% \begingroup \newlinechar=10\relax + \def\MessageBreak{^^J}% \edef\x{% - \PackageError{graphics}{#1}{#2}% + \PackageError{pdftex.def}{#1}{#2}% }% \x \endgroup }% \else - \def\GPT@error{\PackageError{graphics}}% + \def\GPT@error{\PackageError{pdftex.def}}% \fi \def\GPT@warn{\PackageWarning{pdftex.def}}% \ifx\Gin@log\@undefined \def\Gin@log{\message}% \fi +% Are we running under PDFTeX? +\ifx\pdftexversion\@undefined + \GPT@error{% + Option `pdftex' requires pdfTeX,\MessageBreak + but pdfTeX features are missing.\MessageBreak + Loading of this driver file is aborted% + }\@ehc + \expandafter\endinput +\else + \ifx\paperwidth\@undefined + \else + \ifdim\paperheight=0pt\relax + \else + \pdfpageheight\paperheight + \fi + \ifdim\paperwidth=0pt\relax + \else + \pdfpagewidth\paperwidth + \fi + \fi + \ifnum\pdfoutput<1 % + \GPT@error{% + PDF mode expected, but DVI mode detected!\MessageBreak + If you are using `latex', then call `pdflatex'.\MessageBreak + Otherwise check and correct the driver options.\MessageBreak + Error recovery by switching to PDF mode% + }\@ehc + \pdfoutput=1 % + \fi +\fi + % Colour Support. The following models may be used. % * cmyk supported directly. % * rgb supported directly. @@ -1187,28 +1229,6 @@ E \else \expandafter\def\csname cos(180)\endcsname{-1}% } -% Are we running under PDFTeX? -\ifx\pdfpageheight\@undefined - \PackageWarningNoLine{% - \@ifundefined{@currname}{pdftex.def}{\@currname}% - }{% - pdftex option does not work with standard TeX% - }% -\else - \ifx\paperwidth\@undefined - \else - \ifdim\paperheight=0pt\relax - \else - \pdfpageheight\paperheight - \fi - \ifdim\paperwidth=0pt\relax - \else - \pdfpagewidth\paperwidth - \fi - \fi - \pdfoutput=1 % -\fi - % v0.02e: Restore catcodes of context letters. % Not needed with current version of supp-pdf |