summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-06 23:54:10 +0000
committerKarl Berry <karl@freefriends.org>2009-07-06 23:54:10 +0000
commitcca863496e8adf1f6715230a728ce587c77f0086 (patch)
treec9789c5b9d74967416644a3b693d2ad65c290ad9 /Master/texmf-dist/source/latex/oberdiek
parent7feea261bf7f5a8afa8241dddf6c30e30cf8fde4 (diff)
epstopdf update with suffix option
git-svn-id: svn://tug.org/texlive/trunk@14163 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/epstopdf.dtx72
1 files changed, 59 insertions, 13 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