summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-07 20:53:24 +0000
committerKarl Berry <karl@freefriends.org>2016-04-07 20:53:24 +0000
commitb658dbb1d36c3c2a010ab27547ff750aa3bd4509 (patch)
treea1f0383226a57c5561e131395c200239be6a984a /Master/texmf-dist/tex
parent17e42b429cd221f11fd3fe35cf3209f8ab654bf8 (diff)
xetex-def (6apr16)
git-svn-id: svn://tug.org/texlive/trunk@40327 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/xelatex/xetex-def/xetex.def52
1 files changed, 48 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def b/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def
index e224b46868e..50b59def98a 100644
--- a/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def
+++ b/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def
@@ -1,7 +1,7 @@
%% This is file `xetex.def' for XeTeX,
%% based upon other drivers for LaTeX color and graphics support.
%%
-%% Copyright 2004-2007, 2009, 2013-2015
+%% Copyright 2004-2007, 2009, 2013-2016
%% Ross Moore <ross@maths.mq.edu.au>
%% modified by Jonathan Kew et al.
%%
@@ -18,6 +18,16 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Version History
+%% 2016/04/06 [AK] [v4.08] Support new suffix .mps (or .MPS) for eps files
+%% created by MetaPost. In TeX Live 2016, the option --mvorigin
+%% for [x]dvipdfmx is necessary to include MetaPost-created eps
+%% files by the usual \Ginclude@eps. This may a bit be inconvenient.
+%% Thus we introduce a new command \Ginclude@mps for the suffix
+%% .mps (or .MPS). In \Ginclude@mps, llx, lly, urx, and ury are
+%% natural compared with those in \Ginclude@eps. Thus the origin
+%% should not be translated, that is the option --mvorigin should
+%% not be given.
+%%
%% 2015/09/11 [AK, NA, TY] [v4.06] Support pagebox=artbox, etc. in xelatex,
%% like in pdflatex. It requires new xetex and xdvipdfmx, which
%% will be available in TeX Live 2016. Interested users may build
@@ -100,7 +110,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% emacs-page
\ProvidesFile{xetex.def}
- [2015/09/11 v4.06 LaTeX color/graphics driver for XeTeX (TeX Live/RRM/JK)]
+ [2016/04/06 v4.08 LaTeX color/graphics driver for XeTeX (TeX Live/RRM/JK)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% make sure we can use " with correct catcode
@@ -519,6 +529,9 @@
\@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
\@namedef{Gin@rule@.EPS}#1{{eps}{.EPS}{#1}}
%
+\@namedef{Gin@rule@.mps}#1{{mps}{.mps}{#1}}
+\@namedef{Gin@rule@.MPS}#1{{mps}{.MPS}{#1}}
+%
\@namedef{Gin@rule@.ps}#1{{eps}{.ps}{#1}}
\@namedef{Gin@rule@.PS}#1{{eps}{.PS}{#1}}
%
@@ -570,7 +583,7 @@
% ... and add its extension here
\def\Gin@extensions{% order here is like dvipdfmx.def, except for PS
- .pdf,.PDF,.eps,.EPS,.ps,.PS,%
+ .pdf,.PDF,.eps,.EPS,.mps,.MPS,.ps,.PS,%
.png,.PNG,.jpg,.JPG,.jpeg,.JPEG,.jp2,.JP2,.jpf,.JPF,.bmp,.BMP,%
.pict,.PICT,.psd,.PSD,.mac,.MAC,.TGA,.tga,%
.gif,.GIF,.tif,.TIF,.tiff,.TIFF,%
@@ -612,7 +625,38 @@
\ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
\ifGin@clip clip\fi}%
\egroup}
-
+%
+% In the above \Ginclude@eps, llx, lly, urx, and ury are translated to match
+% the -dEPSCrop option for Ghostscript to convert eps to pdf.
+% In the case of eps files created by MetaPost, the files are included
+% directly without the help of Ghostscript. That is, we have to translate
+% the origin accordingly if we use \Ginclude@eps for eps files created by
+% MetaPost. In TeX Live 2015, the translation of the origin was the default.
+% After TeX Live 2016, however, the translation of the origin is enabled only
+% if the --mvorigin option is given for dvipdfmx or xdvipdfmx.
+% This may be a bit inconvenient, especially in the case of XeTeX where
+% xdvipdfmx is usually called as a pipe. Therefore we introduce a new suffix
+% .mps(or .MPS) to support inclusion of eps files created by MetaPost without
+% the option --mvorigin.
+%
+\def\Ginclude@mps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile="#1"\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
%
% Rotation & Scaling
% supported from xetex v0.6 onwards