[latex3-commits] [git/LaTeX3-latex3-graphics-def] master: Add EPS support issue #19 (2e7c86b)
David Carlisle
d.p.carlisle at gmail.com
Fri Nov 2 22:11:51 CET 2018
Repository : https://github.com/latex3/graphics-def
On branch : master
Link : https://github.com/latex3/graphics-def/commit/2e7c86b2cea117cc89de83be69c92d10caf2a87a
>---------------------------------------------------------------
commit 2e7c86b2cea117cc89de83be69c92d10caf2a87a
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Fri Nov 2 21:11:51 2018 +0000
Add EPS support issue #19
>---------------------------------------------------------------
2e7c86b2cea117cc89de83be69c92d10caf2a87a
dvisvgm.def | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/dvisvgm.def b/dvisvgm.def
index e94ec8d..dcf044d 100644
--- a/dvisvgm.def
+++ b/dvisvgm.def
@@ -1,5 +1,5 @@
% Copyright 2015 by Till Tantau
-% Copyright 2016 by Till Tantau and LaTeX3 Project
+% Copyright 2016 2018 by Till Tantau and LaTeX3 Project
%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -15,9 +15,9 @@
%%
%% https://github.com/latex3/graphics-def/issues
%
-\ProvidesFile{dvisvgm.def}[2017/06/20 v1.0b dvisvgm graphics driver for latex]
-\def\GPT at space{ }
+\ProvidesFile{dvisvgm.def}[2018//11/02 v1.1a dvisvgm graphics driver for latex]
% The following is copied from dvips.def:
+\def\GPT at space{ }
\def\c at lor@arg#1{%
\dimen@#1\p@
\ifdim\dimen@<\z@\dimen@\maxdimen\fi
@@ -76,7 +76,28 @@
\def\Grot at end{\special{dvisvgm:raw </g>}}
\def\Gscale at start{\special{dvisvgm:raw <g transform="translate({?x},{?y})scale(\Gscale at x,\Gscale at y)scale(-1)translate({?x},{?y})scale(-1)">}}
\def\Gscale at end{\special{dvisvgm:raw </g>}}
-\def\Gin at extensions{.png,.jpg,.jpeg,.svg}
+\def\Gin at extensions{.svg,.eps,.png,.jpg,.jpeg}
+\def\Ginclude at eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin at req@width
+ \dimen at ii.1bp%
+ \divide\dimen@\dimen at ii
+ \@tempdima\Gin at req@height
+ \divide\@tempdima\dimen at ii
+ \special{PSfile="#1"\GPT at space
+ llx=\Gin at llx\GPT at space
+ lly=\Gin at lly\GPT at space
+ urx=\Gin at urx\GPT at space
+ ury=\Gin at ury\GPT at space
+ \ifx\Gin at scalex\@tempa\else rwi=\number\dimen@\GPT at space\fi
+ \ifx\Gin at scaley\@tempa\else rhi=\number\@tempdima\GPT at space\fi
+ \ifGin at clip clip\fi}%
+ \egroup}
+\@namedef{Gin at rule@.ps}#1{{eps}{.ps}{#1}}
+\@namedef{Gin at rule@.eps}#1{{eps}{.eps}{#1}}
+\@namedef{Gin at rule@.mps}#1{{eps}{.mps}{#1}}
\def\Ginclude at bitmap#1{%
\dimen@\Gin at urx pt%
\advance\dimen@ by-\Gin at llx pt%
More information about the latex3-commits
mailing list