From 38164db6bdc7213159b596311fb51c3c5fe73e6a Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 3 Jun 2010 00:04:31 +0000
Subject: epspdfconversion 0.61 (1jun10)

git-svn-id: svn://tug.org/texlive/trunk@18703 c570f23f-e606-0410-a88d-b1316a301751
---
 .../latex/epspdfconversion/epspdfconversion.sty    | 71 ++++++++++++++++++----
 1 file changed, 60 insertions(+), 11 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty')

diff --git a/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty b/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
index 85fa9c1bc00..ed6816a6f0b 100644
--- a/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
+++ b/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
@@ -10,6 +10,12 @@
 %%
 %%
 %% version history:
+%% 0.61 * new options pdftopdf and pstopdf. Uses epspdf to do pdf-to-pdf and ps-to-pdf conversions. Allows grayscaling, calculation of 
+%%        bounding boxes etc for pdf's that already exist an for .ps-files. Disabled by default.
+%%      * bugfix for the outdir-option (converted files in subdirectories are again saved in those subdirectories)
+%%        (Thanks to Stefan Pofahl for the feedback.)
+%%      * small improvement of the documentation (on the windows epspdf.bat file, on epstopdf's option 'outdir')
+%%      * now uses epstopdf's \epstopdfDeclareGraphicsRule
 %% 0.6  * pdfversion now uses epspdf's --pdfversion. --version in epspdf is to print the 
 %%        version number of epspdf (currently, epspdf is at 0.5)
 %%      * new author email
@@ -39,7 +45,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{epspdfconversion}%
-  [2010/04/30 v0.6 Conversion eps->pdf with epspdf-tools on the fly]
+  [2010/06/01 v0.61 Conversion eps->pdf with epspdf-tools on the fly]
 
 
 %% this loads the graphics, epstopdf and the kvoptions packages. 
@@ -78,6 +84,8 @@
   \def\EPC@optgray{ }%
 }
 
+
+
 % Target
 % \EPC@target stores the target only
 % target         ==> --target=default
@@ -153,6 +161,12 @@
 % bbox=false ==> option disabled
 \DeclareBoolOption{bbox}
 
+%support for pdftopdf-conversion
+\DeclareBoolOption{pdftopdf}
+
+%support for pstopdf-conversion
+\DeclareBoolOption{pstopdf}
+
 \DeclareVoidOption{pdftops}{%
   \def\EPC@optpdftops{-U }%
 }
@@ -221,7 +235,7 @@
 }
 
 %% message in the log-file:
-\def\EPC@printlog{  \PackageInfo{epspdfconversion}{\MessageBreak%
+\def\EPC@printlog{\PackageInfo{epspdfconversion}{\MessageBreak%
 \epspdfconversioncmdline{<file>} is used to convert eps->pdf \MessageBreak(not epstopdf (script))\MessageBreak
   }%
 }
@@ -245,10 +259,9 @@
 % suffix. Avoids accidental overwriting of files. 
 % usage: suffix={bla}
 \DeclareStringOption[-epspdf-to]{suffix}
-%  specifies an outdir ...
+%  specifies an outdir, default is current directory ...
 \DeclareStringOption{outdir}
 
-
 \DeclareBoolOption[false]{prepend}
 
 
@@ -258,7 +271,6 @@
 \ProcessKeyvalOptions*
 
 \typeout{%
-^^Jepspdfconversion info:
 ^^Jepspdfconversion.sty is using epstopdf.sty with the following setup:}
 
 % use them to set epstopdf up
@@ -289,9 +301,16 @@
 % suffix
 \epstopdfsetup{suffix=\EPC@suffix}%
 \typeout{\space\space\space\space suffix=\EPC@suffix,}%
+
 % outdir
-\epstopdfsetup{outdir=\EPC@outdir}%
-\typeout{\space\space\space\space outdir=\EPC@outdir,}%
+\let\CheckOutdir\EPC@outdir
+    \ifx\CheckOutdir\@empty
+      \typeout{\space\space\space\space option outdir not set. Default: same directory as the .eps-source-file}%
+    \else
+     \epstopdfsetup{outdir={\EPC@outdir}}%
+     \typeout{\space\space\space\space outdir=\EPC@outdir}%
+    \fi
+
 % prepend
 \ifEPC@prepend
 \epstopdfsetup{prepend}%
@@ -310,17 +329,47 @@
 \typeout{\space\space\space\space \epspdfconversioncmdline{<file>} }
 
 
-% end of message about epstopdf-setup
-\typeout{}
+
 
 \EPC@printlog
 
 
 %%% the main functionality of this package: 
 %%% this changes the definition provided by epstopdf:
-\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`\epspdfconversioncmdline{#1} \OutputFile}}
+
+% previously, I used:
+%\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`\epspdfconversioncmdline{#1} \OutputFile}}
+
+% since version 0.61: use the mechanism provided by epstopdf to define the eps-pdf conversion rule:
+
+\epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{% 
+\epspdfconversioncmdline #1 \OutputFile
+}
+
+% pdftopdf
+\ifEPC@pdftopdf
+\epstopdfDeclareGraphicsRule{.pdf}{pdf}{.pdf}{% 
+\epspdfconversioncmdline #1 \OutputFile
+}
+\typeout{support for pdf-to-pdf is ENABLED}%
+\typeout{}
+\else
+\typeout{support for pdf-to-pdf is DISABLED}%
+\typeout{}
+\fi
+
+% pstopdf
+\ifEPC@pstopdf
+\epstopdfDeclareGraphicsRule{.ps}{pdf}{.pdf}{% 
+\epspdfconversioncmdline #1 \OutputFile
+}
+\typeout{support for ps-to-pdf is ENABLED}%
+\typeout{}
+\else
+\typeout{support for ps-to-pdf is DISABLED}%
+\typeout{}
+\fi
 
 
-  
 
 \endinput
-- 
cgit v1.2.3

