diff options
author | Karl Berry <karl@freefriends.org> | 2007-10-05 23:13:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-10-05 23:13:42 +0000 |
commit | 4c911ff5ebf103e651707635abf2064ddf149c96 (patch) | |
tree | d3550a7008c8851c3df0746c7e9800df307a0699 /Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty | |
parent | f020fc73ad0b6e33f65d5f0b84646131e0340f2f (diff) |
oberdiek update/new: bigintcalc bitset grfext
git-svn-id: svn://tug.org/texlive/trunk@5118 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty | 239 |
1 files changed, 199 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty b/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty index aade325323e..20306f5a163 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty @@ -25,7 +25,8 @@ %% %% This work consists of the main source file epstopdf.dtx %% and the derived files -%% epstopdf.sty, epstopdf.pdf, epstopdf.ins, epstopdf.drv. +%% epstopdf.sty, epstopdf.pdf, epstopdf.ins, epstopdf.drv, +%% epstopdf-test1.tex. %% \begingroup \catcode44 12 % , @@ -79,44 +80,53 @@ \fi \expandafter\x\csname ver@epstopdf.sty\endcsname \ProvidesPackage{epstopdf}% - [2007/04/26 v1.4 Conversion with epstopdf on the fly (HO)] -\@ifundefined{PackageWarning}{% - \def\PackageWarning#1#2{% - \begingroup - \newlinechar=10 % - \def\MessageBreak{% - ^^J(#1)\@spaces\@spaces\@spaces\@spaces - }% - \immediate\write16{^^JPackage #1 Warning: #2\on@line.^^J}% - \endgroup - }% -}{} -\@ifundefined{PackageWarningNoLine}{% - \def\PackageWarningNoLine#1#2{% - \PackageWarning{#1}{#2\@gobble}% + [2007/10/02 v1.5 Conversion with epstopdf on the fly (HO)] +\expandafter\edef\csname ETE@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax +} +\catcode64 11 % @ +\def\TMP@EnsureCode#1#2{% + \edef\ETE@AtEnd{% + \ETE@AtEnd + \catcode#1 \the\catcode#1\relax }% -}{} -\@ifundefined{on@line}{% - \def\on@line{ on input line \the\inputlineno}% -}{} -\@ifundefined{@spaces}{% - \def\@spaces{\space\space\space\space}% -}{} + \catcode#1 #2\relax +} +\TMP@EnsureCode{33}{12}% ! +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{42}{12}% * +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{60}{12}% < +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{96}{12}% ` +\RequirePackage{infwarerr}[2007/09/09] +\RequirePackage{grfext}\relax +\RequirePackage{kvoptions}[2006/10/02] \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname Gin@setfile\endcsname\relax - \PackageWarningNoLine{epstopdf}{% + \@PackageWarningNoLine{epstopdf}{% No graphics package \string`graphic{s,x}\string' found% }% + \newcommand*{\epstopdfsetup}[1]{}% + \ETE@AtEnd \expandafter\endinput \fi \begingroup \def\x{pdftex.def}% \ifx\Gin@driver\x \else - \PackageWarningNoLine{epstopdf}{% + \@PackageWarningNoLine{epstopdf}{% Graphics driver file \string`pdftex.def\string' not found% }% - \expandafter\endgroup\expandafter\endinput + \endgroup + \newcommand*{\epstopdfsetup}[1]{}% + \ETE@AtEnd + \expandafter\endinput \fi \endgroup \begingroup @@ -124,33 +134,182 @@ \else \ifnum\pdfshellescape>0 % \else - \PackageWarningNoLine{epstopdf}{% + \@PackageWarningNoLine{epstopdf}{% Shell escape feature is not enabled% }% \fi \fi \endgroup -\let\ETEorg@Gin@setfile\Gin@setfile +\SetupKeyvalOptions{family=ETE,prefix=ETE@} +\DeclareBoolOption{update} +\DeclareBoolOption{verbose} +\newif\ifETE@prepend +\DeclareVoidOption{prepend}{\ETE@prependtrue} +\DeclareVoidOption{append}{\ETE@prependfalse} +\DeclareStringOption{outdir} +\ProcessKeyvalOptions* +\newcommand*{\epstopdfsetup}{\setkeys{ETE}} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdffilemoddate\endcsname\relax + \def\ETE@Make#1#2{% + \ifETE@update + \ETE@WarnModDate + \fi + \@firstofone + }% + \def\ETE@WarnModDate{% + \@PackageWarningNoLine{epstopdf}{% + \string\pdffilemoddate\space is not available,\MessageBreak + option `update' will be ignored% + }% + \global\let\ETE@WarnModDate\relax + }% + \def\ETE@FileInfo#1#2{#1 file: <#2>}% +\else + \def\ETE@Make#1#2{% + \ifETE@update + \ifnum\pdfstrcmp{\pdffilemoddate{#1}}{\pdffilemoddate{#2}}>0 % + \expandafter\expandafter\expandafter\@firstofone + \else + \@PackageInfoNoLine{epstopdf}{% + Output file is already uptodate% + }% + \expandafter\expandafter\expandafter\@gobble + \fi + \else + \expandafter\@firstofone + \fi + }% + \def\ETE@FileInfo#1#2{% + #1 file: <#2>% + \expandafter\ETE@Date\pdffilemoddate{#2}\@nil + \expandafter\ETE@Size\pdffilesize{#2}\@nil + }% + \def\ETE@Date#1\@nil{% + \ifx\\#1\\% + \else + \ETE@@Date#1\@nil + \fi + }% + \def\ETE@@Date#1:#2#3#4#5#6#7#8#9{% + \MessageBreak + \@spaces\space\space\space date: #2#3#4#5-#6#7-#8#9 % + \ETE@@Time + }% + \def\ETE@@Time#1#2#3#4#5#6#7\@nil{% + #1#2:#3#4:#5#6% + }% + \def\ETE@Size#1\@nil{% + \ifx\\#1\\% + \else + \MessageBreak + \@spaces\space\space\space size: #1 bytes% + \fi + }% +\fi +\expandafter\ifx\csname ETE@OrgGin@setfile\endcsname\relax + \let\ETE@OrgGin@setfile\Gin@setfile +\else + \@PackageError{epstopdf}{% + Command \string\ETE@OrgGin@setfile\space + already defined.\MessageBreak + }{% + Probably some package has included the code of this package% + \MessageBreak + instead of using \string\RequirePackage{epstopdf}.% + \MessageBreak + \@ehc + }% +\fi \def\Gin@setfile#1#2#3{% \if`\@car #3\relax\@nil - \immediate\write18{\@cdr #3\@empty\@nil}% - \ETEorg@Gin@setfile{#1}{#2}{\Gin@base #2}% + \begingroup + \def\GraphicsType{#1}% + \def\GraphicsRead{#2}% + \ifx\Gin@ext\relax + \def\SourceFile{\Gin@base\Gin@eext}% + \else + \def\SourceFile{\Gin@base\Gin@ext}% + \fi + \let\OutputDirectory\ETE@outdir + \ifx\OutputDirectory\@empty + \def\OutputFile{\Gin@base#2}% + \else + \begingroup + \filename@parse{\Gin@base#2}% + \edef\x{\endgroup + \def\noexpand\OutputFile{% + \OutputDirectory\filename@base#2% + }% + }% + \x + \fi + \edef\CommandLine{\@cdr#3\@empty\@nil}% + \ifETE@verbose + \@PackageInfo{epstopdf}{% + \ETE@FileInfo{Source}\SourceFile\MessageBreak + \ETE@FileInfo{Output}\OutputFile\MessageBreak + Command: <\CommandLine>\MessageBreak + \string\includegraphics + }% + \fi + \ETE@Make\SourceFile\OutputFile{% + \immediate\write18{\CommandLine}% + \ifETE@verbose + \@PackageInfoNoLine{epstopdf}{% + \ETE@FileInfo{Result}\OutputFile + }% + \fi + }% + \edef\x{\endgroup + \ifx\OutputDirectory\@empty + \else + \def\noexpand\Gin@base{% + \OutputDirectory\noexpand\filename@base + }% + \fi + \noexpand\ETE@OrgGin@setfile{% + \GraphicsType + }{% + \GraphicsRead + }{% + \OutputFile + }% + }% + \x \else - \ETEorg@Gin@setfile{#1}{#2}{#3}% + \ETE@OrgGin@setfile{#1}{#2}{#3}% \fi } -\@ifundefined{Gin@extensions}{% - \def\Gin@extensions{.eps}% -}{% - \expandafter\ifx\expandafter\indent\Gin@extensions\indent - \def\Gin@extensions{.eps}% +\expandafter\ifx\csname Gin@rule@.eps\endcsname\relax +\else + \@PackageInfo{epstopdf}{Overwriting graphics rule for `.eps'}% +\fi +\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`\ETE@epstopdf{#1}}} +\def\ETE@epstopdf#1{% + epstopdf % + \ifx\OutputDirectory\@empty \else - \expandafter\def\expandafter\Gin@extensions\expandafter{% - \Gin@extensions,.eps% - }% + --outfile=\OutputFile\space \fi + #1% +} +\ifETE@prepend + \expandafter\PrependGraphicsExtensions +\else + \expandafter\AppendGraphicsExtensions +\fi +{.eps} +\let\ETE@prepend\@undefined +\DeclareVoidOption{prepend}{% + \PrependGraphicsExtensions{.eps}% +} +\let\ETE@append\@undefined +\DeclareVoidOption{append}{% + \AppendGraphicsExtensions{.eps}% } -\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`epstopdf #1}} +\InputIfFileExists{epstopdf.cfg}{}{} +\ETE@AtEnd \endinput %% %% End of file `epstopdf.sty'. |