summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-03 18:04:30 +0000
committerKarl Berry <karl@freefriends.org>2009-09-03 18:04:30 +0000
commitfb72bda0c82db35efdc4d25f2864a127463bd880 (patch)
tree9d9a854322fa633ca877aea4d9f4a06f82de9ada /Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
parent571d635dc27595303cb4b2a9ef61d2b0918e517a (diff)
epspdfconversion update (2sep09)
git-svn-id: svn://tug.org/texlive/trunk@15027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty')
-rw-r--r--Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty149
1 files changed, 135 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty b/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
index 020d5d92448..a22cabc373a 100644
--- a/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
+++ b/Master/texmf-dist/tex/latex/epspdfconversion/epspdfconversion.sty
@@ -7,9 +7,24 @@
%% "on the fly" in LaTeX
%%
%% Please send suggestions to daniel.becker@uni-rostock.de
+%%
+%% ToDo's: add support for ps->pdf, pdf->pdf
+%% add support for tif and others in pdflatex via convert
+%% add support for pdf-inclusion in latex (not pdf-latex)
+%% add support for more file-types (tif, jpeg,...) in
+%% latex (not pdf-latex)
+%%
%% version history:
%%
-%% ToDo:
+%% 0.5 this update makes use of changes in the epstopdf-package v2.2
+%% * new options
+%% update,verbose,prefersuffix,suffix,outdir
+%% (they are really epstopdf options, but can be set
+%% as options for this package)
+%% * default is that converted files have a suffix
+%% * info in logfile about the setup that is used for epstopdf
+%% * new options hires, no-hires
+%% *
%% 0.4: the epstopdf-package is now loaded with options [update,prepend]
%% (works only when epstopdf version 1.5 is used) An update of epstopd.sty
%% (part of the oberdiek-bundle) is recommended. Added options nogrey,nogray
@@ -25,18 +40,16 @@
+
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{epspdfconversion}%
- [2007/11/24 v0.4 Conversion eps->pdf with epspdf-tools on the fly]
+ [2009/09/01 v0.5 Conversion eps->pdf with epspdf-tools on the fly]
-%% this loads the epstopdf and the kvoptions packages.
-%% If version 1.5 of the epstopdf-package is installed, it is loaded with options
-\RequirePackage{epstopdf}
-\@ifpackagelater{epstopdf}{2007/10/02}{%version 1.5
- \epstopdfsetup{update,prepend}%
-}{}
-\RequirePackage{kvoptions}[2006/08/22]
+%% this loads the graphics, epstopdf and the kvoptions packages.
+\RequirePackage{graphics}
+\RequirePackage{epstopdf-base}[2009/07/16]% version 2.2 is necessary
+\RequirePackage{kvoptions}[2006/08/22]% because of \DeclareBoolOption
\SetupKeyvalOptions{
@@ -44,6 +57,7 @@
prefix=EPC@
}
+
%% this is the basic command necessary for the conversion with epspdf
\DeclareStringOption[epspdf]{cmd}
@@ -90,6 +104,9 @@
\def\EPC@target{ebook}%
}
+
+
+
% Version
% \EPC@pdfversion stores the version only
% pdfversion=1.2 ==> --version=1.2
@@ -147,6 +164,13 @@
\def\EPC@optpdftops{-I }%
}
+\DeclareVoidOption{hires}{%
+ \def\EPC@opthires{--hires }%
+}
+\DeclareVoidOption{no-hires}{%
+ \def\EPC@opthires{--no-hires }%
+}
+
\DeclareStringOption{custom}
\DeclareStringOption{psoptions}
\DeclareStringOption{pagenumber}
@@ -155,6 +179,7 @@
% disable other options
\let\EPC@optgray\@empty
\let\EPC@optpdftops\@empty
+ \let\EPC@opthires\@empty
\let\EPC@target\@empty
\let\EPC@pdfversion\@empty
\let\EPC@custom\@empty
@@ -182,6 +207,7 @@
\newcommand*{\epspdfconversioncmdline}[1]{%
\EPC@cmd\space
\EPC@optpdftops
+ \EPC@opthires
\EPC@addopt{target}%
\ifx\EPC@pdfversion\@empty
\else
@@ -192,28 +218,123 @@
\EPC@addopt{pagenumber}%
\ifEPC@bbox
--bbox %
+ \else
\fi
\EPC@optgray
#1%
}
-%% this shows what is going on in the log
-\def\EPC@printlog{%
- \PackageInfo{epspdfconversion}{%
- \epspdfconversioncmdline{<file>}\MessageBreak
+
+
+
+
+%% message in the log-file:
+\def\EPC@printlog{ \PackageInfo{epspdfconversion}{\MessageBreak%
+\epspdfconversioncmdline{<file>} is used to convert eps->pdf \MessageBreak(not epstopdf (script))\MessageBreak
}%
}
+
%% this allows to change the options on the fly
% Use example: \epspdfconversionsetup{target=prepress,bbox}
\newcommand*{\epspdfconversionsetup}[1]{%
\setkeys{EPC}{#1}%
\EPC@printlog
}
+%%%%% epstopdf-options .....
+
+
+
+% update, default is true, can be set as update=false
+\DeclareBoolOption[true]{update}
+% verbose, default is true, can be set as verbose=false
+\DeclareBoolOption[true]{verbose}
+% if there is original.pdf and original-suffix.pdf, prefer original-suffix.pdf
+% (the one that has been generated by epspdf), can be set as prefersuffix=false
+\DeclareBoolOption[true]{prefersuffix}
+% suffix. Avoids accidental overwriting of files.
+% usage: suffix={bla}
+\DeclareStringOption[-epspdf-to]{suffix}
+% specifies an outdir ...
+\DeclareStringOption{outdir}
+
+\DeclareBoolOption[false]{prepend}
+
+
+
+
+% Important: !!!
\ProcessKeyvalOptions*
+
+\typeout{%
+^^Jepspdfconversion info:
+^^Jepspdfconversion.sty is using epstopdf.sty with the following setup:}
+
+% use them to set epstopdf up
+% update
+\ifEPC@update
+\epstopdfsetup{update=true}%
+\typeout{\space\space\space\space update=true,}%
+\else
+\epstopdfsetup{update=false}%
+\typeout{\space\space\space\space update=false,}%
+\fi
+% verbose
+\ifEPC@verbose
+\epstopdfsetup{verbose=true}%
+\typeout{\space\space\space\space verbose=true,}%
+\else
+\epstopdfsetup{verbose=false}%
+\typeout{\space\space\space\space verbose=false,}%
+\fi
+% prefersuffix
+\ifEPC@prefersuffix
+\epstopdfsetup{prefersuffix=true}%
+\typeout{\space\space\space\space prefersuffix=true,}%
+\else
+\epstopdfsetup{prefersuffix=false}%
+\typeout{\space\space\space\space prefersuffix=false,}%
+\fi
+% 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,}%
+% prepend
+\ifEPC@prepend
+\epstopdfsetup{prepend}%
+\typeout{\space\space\space\space prepend,}%
+\else
+\epstopdfsetup{append}%
+\typeout{\space\space\space\space append,}%
+\fi
+% enable
+\epstopdfsetup{enable}%
+\typeout{\space\space\space\space enable}%
+
+
+% another message...
+\typeout{epspdf is used like this:}
+\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}}}
+\@namedef{Gin@rule@.eps}#1{{pdf}{.pdf}{`\epspdfconversioncmdline{#1} \OutputFile}}
+
+
+
+
\endinput