From d57ae22c8325e19127a3f3386d634b962e059f10 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 27 Mar 2015 23:51:06 +0000 Subject: dvipdfmx-def (27mar15) git-svn-id: svn://tug.org/texlive/trunk@36647 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/dvipdfmx-def/dvipdfmx.def | 63 +++++++++++++++++++--- 1 file changed, 57 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/dvipdfmx-def/dvipdfmx.def b/Master/texmf-dist/tex/latex/dvipdfmx-def/dvipdfmx.def index 65a4bd1e002..932eaa7bd1d 100644 --- a/Master/texmf-dist/tex/latex/dvipdfmx-def/dvipdfmx.def +++ b/Master/texmf-dist/tex/latex/dvipdfmx-def/dvipdfmx.def @@ -1,7 +1,7 @@ %% This is file `dvipdfmx.def' for DVIPDFMx by J.-H. Cho and S. Hirata %% based upon `dvipdf.def' in the LaTeX `Graphics Bundle'. %% -%% Copyright 2005-2014 Jin-Hwan Cho, Shunsaku Hirata +%% Copyright 2005-2015 Jin-Hwan Cho, Shunsaku Hirata %% (with contributions from many others) %% %% This file is not part of the Standard LaTeX `Graphics Bundle'. @@ -23,7 +23,7 @@ %% % emacs-page \ProvidesFile{dvipdfmx.def} - [2014/07/25 v4.03 LaTeX color/graphics driver for dvipdfmx (TeX Live/ChoF)] + [2015/03/26 v4.04 LaTeX color/graphics driver for dvipdfmx (TeX Live/ChoF)] % \def\c@lor@arg#1{% \dimen@#1\p@ @@ -115,7 +115,13 @@ \@makeother\-% \immediate\openin\@inputcheck#1 % \ifeof\@inputcheck - \immediate\openin\@inputcheck="|extractbb -O \Gin@base\Gin@ext"% + \def\@tempc{!}% + \ifx\Gin@page\@tempc + \def\@tempc{}% + \else + \def\@tempc{-p \Gin@page\space}% + \fi + \immediate\openin\@inputcheck="|extractbb \@tempc -O \Gin@base\Gin@ext"% \fi \Gread@true \let\@tempb\Gread@false @@ -136,6 +142,39 @@ \repeat \immediate\closein\@inputcheck \fi +% +% If BoundingBox is not obtained, extractbb may be an old one which does not +% support the -p option, and usage of extractbb is printed to stdout. +% Thus we retry without the -p opton. +% + \ifGin@bbox\else + \def\@tempd{}% + \ifx\@tempc\@tempd\else + \immediate\openin\@inputcheck="|extractbb -O \Gin@base\Gin@ext"% + \message{^^JI try without the -p option^^J}% + \Gread@true + \let\@tempb\Gread@false + \ifeof\@inputcheck + \@latex@error + {Cannot run pipe command. Try --shell-escape^^J% + (--enable-pipes in MikTeX) option}% + \@ehc + \else + \loop + \read\@inputcheck to\@tempa + \ifeof\@inputcheck + \Gread@false + \else + \expandafter\Gread@find@bb\@tempa:.\\% + \fi + \ifGread@ + \repeat + \immediate\closein\@inputcheck + \fi + \fi + \fi +% +% \ifGin@bbox\else \@latex@error {Cannot determine size of image (no BoundingBox)}% @@ -241,7 +280,7 @@ \def\Gin@PS@file@header#1{\AtBeginDvi{\special{header=#1}}} \def\Gin@extensions{% order here is like xetex.def, except for PS .pdf,.PDF,.ai,.AI,% - .png,.PNG,.jpg,.JPG,.jpeg,.JPEG,.bmp,.BMP,% + .png,.PNG,.jpg,.JPG,.jpeg,.JPEG,.jp2,.JP2,.jpf,.JPF,.bmp,.BMP,% .ps,.PS,.eps,.EPS,% .pz,.eps.Z,.ps.Z,.ps.gz,.eps.gz} % @@ -251,14 +290,26 @@ \@namedef{Gin@rule@.ai}#1{{pdf}{.xbb}{#1}} \@namedef{Gin@rule@.AI}#1{{pdf}{.xbb}{#1}} % +\@namedef{Gin@rule@.jp2}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.JP2}#1{{bmp}{.xbb}{#1}} +% +\@namedef{Gin@rule@.jpf}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.JPF}#1{{bmp}{.xbb}{#1}} +% +\@namedef{Gin@rule@.png}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.PNG}#1{{bmp}{.xbb}{#1}} +% \@namedef{Gin@rule@.jpg}#1{{bmp}{.xbb}{#1}} \@namedef{Gin@rule@.JPG}#1{{bmp}{.xbb}{#1}} % \@namedef{Gin@rule@.jpeg}#1{{bmp}{.xbb}{#1}} \@namedef{Gin@rule@.JPEG}#1{{bmp}{.xbb}{#1}} % -\@namedef{Gin@rule@.png}#1{{bmp}{.xbb}{#1}} -\@namedef{Gin@rule@.PNG}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.jp2}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.JP2}#1{{bmp}{.xbb}{#1}} +% +\@namedef{Gin@rule@.jpf}#1{{bmp}{.xbb}{#1}} +\@namedef{Gin@rule@.JPF}#1{{bmp}{.xbb}{#1}} % \@namedef{Gin@rule@.bmp}#1{{bmp}{.xbb}{#1}} \@namedef{Gin@rule@.BMP}#1{{bmp}{.xbb}{#1}} -- cgit v1.2.3