diff options
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx | 72 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty | 24 | ||||
-rw-r--r-- | Master/texmf/tex/latex/config/graphics.cfg | 6 |
3 files changed, 83 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx b/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx index 2086605677a..19f053d7f70 100644 --- a/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx @@ -69,7 +69,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: epstopdf 2009/03/01 v1.8 Conversion with epstopdf on the fly (HO)} +\Msg{* Package: epstopdf 2009/07/06 v1.9 Conversion with epstopdf on the fly (HO)} \Msg{************************************************************************} \keepsilent @@ -139,7 +139,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{epstopdf.drv}% - [2009/03/01 v1.8 Conversion with epstopdf on the fly (HO)]% + [2009/07/06 v1.9 Conversion with epstopdf on the fly (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] \begin{document} @@ -148,7 +148,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{618} +% \CheckSum{639} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -169,7 +169,7 @@ and the derived files % \GetFileInfo{epstopdf.drv} % % \title{The \xpackage{epstopdf} package} -% \date{2009/03/01 v1.8} +% \date{2009/07/06 v1.9} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -207,7 +207,7 @@ and the derived files % does not allow the execution of external commands. % Therefore commands in the last argument of % \cs{DeclareGraphicsRule} were of no use. -% But external programs can be calles within \pdfTeX. +% But external programs can be called within \pdfTeX. % This feature is called ``shell escape'' or ``write 18'' % and must usually enabled explicitely because of security reasons. % Now, this package \xpackage{epstopdf} hooks @@ -285,7 +285,7 @@ and the derived files % \>return not found % \end{quote} % Package \xpackage{epstopdf} puts \xfile{.eps} at the end of the -% graphics extension list. This is the behaviour of option +% graphics extension search list. This is the behaviour of option % \xoption{append} that is enabled by default. % That means, the conversion is called last % unless a supported file type cannot be found earlier. This avoids @@ -294,8 +294,19 @@ and the derived files % it, then an outdated PDF file also would be found earlier. % Therefore extension \xfile{.eps} should be put in front of the list. % This is achieved by option \xoption{prepend}. Then the EPS file -% is found before the PDF file. Then option \xoption{update} -% have the control and can compare file dates. +% is found before the PDF file. +% +% However, if there is a case where +% the original image file is the PDF file and there is also a generated +% EPS file, then the original PDF file can be regenerated (depending +% on the option settings) and the original PDF file gets lost. +% Therefore option \xoption{suffix} is introduced in version 1.9 +% to create a separate name space for generated output files. +% +% On the other hand, option \xoption{append} prevents the +% utility of option `update'. After the first conversion, +% the PDF file is found and used first, before even considering +% the conversion from EPS to PDF. % % Note: Usually the conversion program needs the exact location % of the image file. Usually the current directory works. @@ -332,6 +343,23 @@ and the derived files % \end{quote} % For other directories ensure, that they can be found. % See \cs{graphicspath} or |TEXINPUTS|. +% \It{suffix} +% This option takes a string that is put between the file name base +% and the extension of the output file. Rationale: It can happen, +% that a PDF file is the original file and the EPS file the +% generated file. If now the package thinks, that the PDF file +% is the generated file, it will `regnerate' it. But in reality +% the original file is lost. Therefore I recommend to use this +% option always to generate a separate name space for generated +% files. Proposed value is \texttt{-gen} or \texttt{.gen}. +% The suffix \texttt{.gen} will also work here without the need for +% package \xpackage{grffile}). +% +% Example: +% \begin{quote} +% |\epstopdfsetup{suffix=-gen}|\\ +% Then \xfile{foo.eps} is converted to \xfile{foo-gen.pdf}. +% \end{quote} % \It{verbose} % It prints some information about the image in the \xfile{.log} file. % \end{description} @@ -474,7 +502,7 @@ and the derived files \fi \expandafter\x\csname ver@epstopdf.sty\endcsname \ProvidesPackage{epstopdf}% - [2009/03/01 v1.8 Conversion with epstopdf on the fly (HO)] + [2009/07/06 v1.9 Conversion with epstopdf on the fly (HO)] % \end{macrocode} % % \subsubsection{Catcodes} @@ -593,6 +621,7 @@ and the derived files \DeclareVoidOption{prepend}{\ETE@prependtrue} \DeclareVoidOption{append}{\ETE@prependfalse} \DeclareStringOption{outdir} +\DeclareStringOption{suffix} \ProcessKeyvalOptions* \newcommand*{\epstopdfsetup}{\setkeys{ETE}} % \end{macrocode} @@ -693,13 +722,15 @@ and the derived files \fi \let\OutputDirectory\ETE@outdir \ifx\OutputDirectory\@empty - \def\OutputFile{\Gin@base#2}% + \edef\OutputFile{\ETE@GenerateName{\Gin@base}{#2}}% \else \begingroup \filename@parse{\Gin@base#2}% \edef\x{\endgroup \def\noexpand\OutputFile{% - \OutputDirectory\filename@base#2% + \ETE@GenerateName{% + \OutputDirectory\filename@base + }{#2}% }% }% \x @@ -728,6 +759,10 @@ and the derived files \OutputDirectory\noexpand\filename@base }% \fi + \ifx\ETE@suffix\@empty + \else + \edef\noexpand\Gin@base{\Gin@base\ETE@suffix}% + \fi \noexpand\ETE@OrgGin@setfile{% \GraphicsType }{% @@ -741,6 +776,9 @@ and the derived files \ETE@OrgGin@setfile{#1}{#2}{#3}% \fi } +\def\ETE@GenerateName#1#2{% + #1\ETE@suffix#2% +} % \end{macrocode} % % \cs{DeclareGraphicsRule} for .eps @@ -752,8 +790,12 @@ and the derived files \@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`\ETE@epstopdf{#1}}} \def\ETE@epstopdf#1{% epstopdf % - \ifx\OutputDirectory\@empty - \else + \ifcase\ifx\OutputDirectory\@empty + \ifx\ETE@suffix\@empty + 1% + \fi + \fi + 0 % --outfile=\OutputFile\space \fi #1% @@ -1123,6 +1165,10 @@ and the derived files % \item % Warning message for missing \xfile{pdftex.def} changed. % \end{Version} +% \begin{Version}{2009/07/06 v1.9} +% \item +% Option \xoption{suffix} added. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty b/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty index d2d7b7faad2..e35587aec62 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/epstopdf.sty @@ -89,7 +89,7 @@ \fi \expandafter\x\csname ver@epstopdf.sty\endcsname \ProvidesPackage{epstopdf}% - [2009/03/01 v1.8 Conversion with epstopdf on the fly (HO)] + [2009/07/06 v1.9 Conversion with epstopdf on the fly (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -169,6 +169,7 @@ \DeclareVoidOption{prepend}{\ETE@prependtrue} \DeclareVoidOption{append}{\ETE@prependfalse} \DeclareStringOption{outdir} +\DeclareStringOption{suffix} \ProcessKeyvalOptions* \newcommand*{\epstopdfsetup}{\setkeys{ETE}} \begingroup\expandafter\expandafter\expandafter\endgroup @@ -257,13 +258,15 @@ \fi \let\OutputDirectory\ETE@outdir \ifx\OutputDirectory\@empty - \def\OutputFile{\Gin@base#2}% + \edef\OutputFile{\ETE@GenerateName{\Gin@base}{#2}}% \else \begingroup \filename@parse{\Gin@base#2}% \edef\x{\endgroup \def\noexpand\OutputFile{% - \OutputDirectory\filename@base#2% + \ETE@GenerateName{% + \OutputDirectory\filename@base + }{#2}% }% }% \x @@ -292,6 +295,10 @@ \OutputDirectory\noexpand\filename@base }% \fi + \ifx\ETE@suffix\@empty + \else + \edef\noexpand\Gin@base{\Gin@base\ETE@suffix}% + \fi \noexpand\ETE@OrgGin@setfile{% \GraphicsType }{% @@ -305,6 +312,9 @@ \ETE@OrgGin@setfile{#1}{#2}{#3}% \fi } +\def\ETE@GenerateName#1#2{% + #1\ETE@suffix#2% +} \expandafter\ifx\csname Gin@rule@.eps\endcsname\relax \else \@PackageInfo{epstopdf}{Overwriting graphics rule for `.eps'}% @@ -312,8 +322,12 @@ \@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`\ETE@epstopdf{#1}}} \def\ETE@epstopdf#1{% epstopdf % - \ifx\OutputDirectory\@empty - \else + \ifcase\ifx\OutputDirectory\@empty + \ifx\ETE@suffix\@empty + 1% + \fi + \fi + 0 % --outfile=\OutputFile\space \fi #1% diff --git a/Master/texmf/tex/latex/config/graphics.cfg b/Master/texmf/tex/latex/config/graphics.cfg index 766452dca02..afd1abb4b20 100644 --- a/Master/texmf/tex/latex/config/graphics.cfg +++ b/Master/texmf/tex/latex/config/graphics.cfg @@ -61,7 +61,11 @@ \ifnum\pdf@shellescape>0 % \RequirePackage{epstopdf}[2007/10/02]% \@ifpackagelater{epstopdf}{2007/10/02}{% - \epstopdfsetup{verbose}% + % verbose: extra info in log file. + % update: remake .pdf if .eps is newer. + % prepend: find .eps before .pdf (else update doesn't work). + % suffix: added before the .pdf, to avoid collisions. + \epstopdfsetup{verbose,update,prepend,suffix=-epstopdf}% }{}% \fi \fi |