summaryrefslogtreecommitdiff
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
parent17e42b429cd221f11fd3fe35cf3209f8ab654bf8 (diff)
xetex-def (6apr16)
git-svn-id: svn://tug.org/texlive/trunk@40327 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/xetex-def/README4
-rw-r--r--Master/texmf-dist/doc/latex/xetex-def/doc/mps.txt25
-rw-r--r--Master/texmf-dist/tex/xelatex/xetex-def/xetex.def52
3 files changed, 75 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/xetex-def/README b/Master/texmf-dist/doc/latex/xetex-def/README
index d6bb6e6f028..c7634deb354 100644
--- a/Master/texmf-dist/doc/latex/xetex-def/README
+++ b/Master/texmf-dist/doc/latex/xetex-def/README
@@ -2,12 +2,12 @@
This directory contains the LaTeX graphics driver 'xetex.def'
used with 'xelatex'
-Version: 4.06; 2015-09-11.
+Version: 4.08; 2016-04-06.
The canonical source is the subversion repository at
https://puszcza.gnu.org.ua/projects/latexfmxdef.
-Copyright (C) 2004-2007, 2009, 2013-2015
+Copyright (C) 2004-2007, 2009, 2013-2016
Ross Moore <ross at maths dot mq dot edu dot au>
modified by Jonathan Kew et al.
diff --git a/Master/texmf-dist/doc/latex/xetex-def/doc/mps.txt b/Master/texmf-dist/doc/latex/xetex-def/doc/mps.txt
new file mode 100644
index 00000000000..cd885781030
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xetex-def/doc/mps.txt
@@ -0,0 +1,25 @@
+In TeX Live 2016 and later, a new suffix .mps (or .MPS) is supported
+by dvipdfmx and xdvipdfmx. Usual eps files are included by converting
+into pdf files with the help of Ghostscript. We are using -dEPSCrop
+option for Ghostscript in the conversion. In this case, we are forced
+to translate llx, lly, urx, and ury in \Ginclude@eps accordingly.
+On the other hand, eps files created by MetaPost are included directly
+without the help of Ghostscript. Thus the above translation should be
+negated by translating the origin, if we use \Ginclude@eps also for eps
+files created by MetaPost. The translation of the origin was the default
+in TeX Live 2015. However in TeX Live 2016, the origin is translated only
+if the option --mvorigin is given for dvipdfmx or xdvipdfmx. This feature
+may a bit be inconvenient. Thus we introduce a new command \Ginclude@mps
+which is used for files with a suffix .mps (or .MPS). In \Ginclude@mps,
+llx, lly, urx, and ury are natural compared with those in \Ginclude@eps.
+Thus --mvorigin should not be given in the case of \Ginclude@mps.
+
+In summary, there are two ways to include eps files created by MetaPost
+in TeX Live 2016 and later:
+(1) Use a suffix .mps (or .MPS) like foo.mps. In this case, don't give the
+ option --mvorigin for dvipdfmx and xdvipdfmx.
+(2) In other cases, such as foo.1, foo.2, foo.eps, foo.ps ..., the option
+ --mvorigin for dvipdfmx and xdvipdfmx is inevitable.
+
+Note that the option --mvorigin is relevant only for MetaPost-created
+eps files. The option does nothing for other files.
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