From 1f1d4332f1e59e5e4f7c988ad31b1a11a92b1ffe Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 18 Feb 2013 23:43:49 +0000 Subject: xetex.def (18feb13) git-svn-id: svn://tug.org/texlive/trunk@29154 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/xelatex/xetex-def/xetex.def | 43 ++++++++++++++++++----- 1 file changed, 35 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/tex/xelatex/xetex-def') diff --git a/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def b/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def index 8de30232f9f..b8edaefbc95 100644 --- a/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def +++ b/Master/texmf-dist/tex/xelatex/xetex-def/xetex.def @@ -2,8 +2,8 @@ %% This is file `xetex.def', %% based upon other drivers for LaTeX color and graphics support. %% -%% Copyright 2004, 2005, 2006, 2007, 2009 Ross Moore -%% modified by Jonathan Kew +%% Copyright 2004-2007, 2009, 2013 Ross Moore +%% modified by Jonathan Kew %% %% This file is *not yet* part of the Standard LaTeX `Graphics Bundle'. %% It may be distributed under the terms of the LaTeX Project Public @@ -13,6 +13,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Version History %% +%% 2013/02/04 [RRM] Version v0.95 added clipping support. +%% (code provided by Joseph Wright and Martin Scharrer) +%% %% 2009/11/21 [KB] Version v0.94 merge the two 0.93's. %% %% 2009/10/28 [RRM] Version v0.93 fix big-point incompatibility; @@ -63,7 +66,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ProvidesFile{xetex.def} - [2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX (RRM/JK)] + [2013/02/04 v0.95 LaTeX color/graphics driver for XeTeX (RRM/JK)] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % make sure we can use " with correct catcode @@ -308,7 +311,6 @@ \Gin@clipfalse }{}% \ifGin@clip - \GXT@warn{No clipping support in XeTeX yet}% \if!\Gin@vllx\Gin@vlly\Gin@vurx\Gin@vury!% \else \let\GXT@clipend\GXT@DoClipEnd @@ -354,12 +356,37 @@ \advance\dimen@ -\Gin@vlly\p@ \ht\@tempboxa\strip@pt\dimen@ bp\relax % \ht\@tempboxa\dimen@ \relax - % when clipping is implemented for XeTeX - % make the changes here: + % Clip box to its official size + \GXT@clipbox\@tempboxa \box\@tempboxa } - - +% Clipping support added by Martin Scharrer and Joseph Wright, Nov 2011 +% under the LPPL v1.0 or later. +\def\GXT@clipbox#1{% + \setbox#1=\hbox{% + \Gin@defaultbp\WIDTH{\wd#1}% + \Gin@defaultbp\DEPTH{\dp#1}% + \@tempdima\ht#1% + \advance\@tempdima\dp#1% + \Gin@defaultbp\TOTALHEIGHT{\@tempdima}% + \special{pdf:content q }% + \special{% + pdf:literal direct + 0 -\DEPTH\space \WIDTH\space \TOTALHEIGHT\space re + }% + \special{pdf:literal direct W }% + \special{pdf:literal direct n }% + \special{pdf:literal direct -1 0 0 -1 0 0 cm }% + \special{pdf:content q }% + \special{pdf:literal direct -1 0 0 -1 0 0 cm }% + \box#1% + \special{pdf:literal direct Q }% + \special{pdf:literal direct Q }% + }% +} +% End of clipping code + +% \def\Gread@QTm#1{\IfFileExists{\Gin@base.bb}% {\Gread@eps{\Gin@base.bb}}% {\G@measure@QTm{\Gin@base}{\Gin@ext}}% -- cgit v1.2.3