Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Wed, 4 Mar 2009 12:16:03 +0100 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n24BG3YJ020676 for ; Wed, 4 Mar 2009 12:16:03 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n24BDNgv016406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 Mar 2009 12:13:30 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n249bNZJ010592; Wed, 4 Mar 2009 12:06:40 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 200444 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 4 Mar 2009 12:06:40 +0100 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n24B6e1Q020477 for ; Wed, 4 Mar 2009 12:06:40 +0100 Received: from atlas.informatik.uni-freiburg.de (atlas.informatik.uni-freiburg.de [132.230.150.3]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n24B4aYA003622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 4 Mar 2009 12:04:40 +0100 Received: from remote239-47.home.uni-freiburg.de ([132.230.239.47] helo=irwin.vpn.uni-freiburg.de) by atlas.informatik.uni-freiburg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LeoaT-0006Ba-3T for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 04 Mar 2009 11:44:32 +0100 Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id 3903517BB1; Wed, 4 Mar 2009 11:42:58 +0100 (CET) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <20090303214922.GA4383@irwin.vpn.uni-freiburg.de> <200903032247.n23MluB19190@f7.net> <68c491a60903031456m64ce0a4dhe344d165b24db56b@mail.gmail.com> <76800716-072C-488A-813B-DE87F7F6F8CE@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20090304104257.GA9153@irwin.vpn.uni-freiburg.de> Date: Wed, 4 Mar 2009 11:42:57 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Heiko Oberdiek Subject: Re: \includegraphics, eps, pdf, and \write18 To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <76800716-072C-488A-813B-DE87F7F6F8CE@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -4 () RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 04 Mar 2009 11:16:04.0018 (UTC) FILETIME=[9B4DB120:01C99CBA] Status: R X-Status: X-Keywords: X-UID: 5704 On Wed, Mar 04, 2009 at 06:26:56PM +1030, Will Robertson wrote: > From a quick look over the requirements (supporting miniltx, etc) it > looks like epstopdf can just be called directly from graphics.cfg, > which is good news. \AtEndOfPackage at least is necessary to prevent loading a package inside the options section of the package that loads graphics.cfg. > You probably know that already, but the reason I wanted to chime in > now was to encourage whomever does the work to make this the default: > (in case you weren't intending to do this anyway!) > > \epstopdfsetup{update,prepend} > > It makes subsequent LaTeX runs much more bearable since it only > converts the EPS file as-necessary; without it, compilation can be > slowed down by orders of magnitude (in some cases). I also prefer this setting. However there is a disadvantage: This option setting assumes, the .eps file is the source file and the pdf file is the converted file. But this may not always be the case, the .eps file can be the converted file (e.g. for dvips). Then the source .pdf file gets overwritten. Thus the comforts of automatical conversions are not without risk. > Perhaps the > "verbose" option should be added as well; I haven't really looked at > the difference that makes (and whether we should be bothering the user > with the extra information in the console). Option "verbose" only writes into the .log file. Therefore I have added it. The following graphics.cfg automatically loads epstopdf if the shell escape feature is enabled. Loading epstopdf can be prevented by defining \DoNotLoadEpstopdf to anything than undefined or \relax, e.g.: \newcommand{\DoNotLoadEpstopdf}{} \documentclass{article} \usepackage{graphicx} %%% cut %%% graphics.cfg %%% cut %%% \ProvidesFile{graphics.cfg}% [2009/03/04 v1.6 graphics configuration of teTeX/TeXLive]% % Select an appropriate default driver \begingroup \chardef\x=0\relax % check pdfTeX \@ifundefined{pdfoutput}{}{% \ifnum\pdfoutput<1 % \else \chardef\x=1\relax \fi }% % check VTeX \@ifundefined{OpMode}{}{% \chardef\x=2\relax }% % check XeTeX \@ifundefined{XeTeXversion}{}{% \chardef\x=3\relax }% \expandafter\endgroup \ifcase\x % default case \def\Gin@driver{dvips.def}% \ExecuteOptions{dvips}% \or % pdfTeX is running in pdf mode \def\Gin@driver{pdftex.def}% \ExecuteOptions{pdftex}% % load package epstopdf if % * LaTeX is running (plain-TeX users are on their own) % * shell escpape (\write18) is enabled and % * \DoNotLoadEpstopdf does not exist or is not \relax. \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DoNotLoadEpstopdf\endcsname\relax \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname AtEndOfPackage\endcsname\relax \else \AtEndOfPackage{% \RequirePackage{pdftexcmds}[2007/11/11]% \expandafter\ifx\csname pdf@shellescape\endcsname\relax \else \ifnum\pdf@shellescape>0 % \RequirePackage{epstopdf}[2007/10/02]% \@ifpackagelater{epstopdf}{2007/10/02}{% \epstopdfsetup{update,prepend,verbose}% }{}% \fi \fi }% \fi \fi \or % VTeX is running \def\Gin@driver{vtex.def}% \ExecuteOptions{vtex}% \else % XeTeX is running \def\Gin@driver{xetex.def}% \ExecuteOptions{xetex}% \fi % Fix for dvips and xdvi versions that can uncompress % graphic files without an explicite call of gunzip. % (The fix is not applied for miniltx.tex, because % \AtEndOfPackage is not available in plainTeX.) \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname AtEndOfPackage\endcsname\relax \else \AtEndOfPackage{% \begingroup \@ifundefined{DeclareGraphicsRule}{% \endgroup }{% \def\x{dvips.def}% \expandafter\endgroup \ifx\x\Gin@driver \DeclareGraphicsRule{.pz}{eps}{.bb}{}% \DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}% \DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}% \DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}% \DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}% \fi }% }% \fi \endinput %%% cut %%% graphics.cfg %%% cut %%% Yours sincerely Heiko