summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-13 21:03:22 +0000
committerKarl Berry <karl@freefriends.org>2018-10-13 21:03:22 +0000
commit130fb6350db2aad61eca882f23ed963d1ea31821 (patch)
treed33c7ad0daff3592154ae659e783b5d1c64c87f0 /Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
parent206e1efd94e4c3414835af0e2c8266c88ed7dcc9 (diff)
lwarp (13oct18)
git-svn-id: svn://tug.org/texlive/trunk@48904 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty56
1 files changed, 41 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index 9c3588bb24a..69b99f40359 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -25,9 +25,21 @@
\DeclareGraphicsRule{.svg}{svg}{.svg}{}
\DeclareGraphicsRule{.SVG}{svg}{.SVG}{}
}
+\ifpdf
\appto\LWR@restoreorigformatting{%
\DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
}
+\else% \ifpdf
+ \ifXeTeX
+\appto\LWR@restoreorigformatting{%
+\DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+}
+ \else
+\appto\LWR@restoreorigformatting{%
+\DeclareGraphicsExtensions{.eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+}
+ \fi
+\fi
\newlength{\LWR@igwidth}
@@ -81,14 +93,15 @@
}{}% end of length > 0pt
}
\define@key{igraph}{origin}[c]{%
-\renewcommand*{\LWR@igorigin}{#1}%
+ \renewcommand*{\LWR@igorigin}{#1}%
}
\define@key{igraph}{angle}{\renewcommand*{\LWR@igangle}{#1}}
\define@key{igraph}{class}{\renewcommand*{\LWR@igclass}{#1}}
\define@key{igraph}{scale}{%
-\renewcommand*{\LWR@igxscale}{#1}%
-\renewcommand*{\LWR@igyscale}{#1}}
+ \renewcommand*{\LWR@igxscale}{#1}%
+ \renewcommand*{\LWR@igyscale}{#1}%
+}
\define@key{igraph}{bb}{}
\define@key{igraph}{bbllx}{}
\define@key{igraph}{bblly}{}
@@ -152,7 +165,6 @@
\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
{%
-\LWR@traceinfo{LWR@includegraphicsb #4}%
\LWR@origtilde \LWR@orignewline%
\begingroup%
\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}%
@@ -165,17 +177,6 @@
\setlength{\textheight}{9in}%
}%
}{}%
-\begingroup%
-\LetLtxMacro\Gin@setfile\LWR@HTML@Gin@setfile%
-\edef\LWR@tempone{#4}%
-\StrSubstitute{\LWR@tempone}{.pdf}{.svg}[\LWR@tempone]%
-\StrSubstitute{\LWR@tempone}{.PDF}{.SVG}[\LWR@tempone]%
-\LWR@replaceEPSSVG%
-\xdef\LWR@parsedfilename{\LWR@tempone}%
-\Ginclude@graphics{\detokenize\expandafter{\LWR@tempone}}%
-\endgroup%
-\filename@parse{\LWR@parsedfilename}%
-\LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
\large%
\setlength{\LWR@igwidth}{0pt}%
\setlength{\LWR@igheight}{0pt}%
@@ -191,9 +192,34 @@
{\setkeys{igraph}{#2}}%
{\setkeys{igraph}{}}%
}%
+\begingroup%
+\LetLtxMacro\Gin@setfile\LWR@HTML@Gin@setfile%
+\edef\LWR@tempone{#4}%
+\StrSubstitute{\LWR@tempone}{.pdf}{.svg}[\LWR@tempone]%
+\StrSubstitute{\LWR@tempone}{.PDF}{.SVG}[\LWR@tempone]%
+\LWR@replaceEPSSVG%
+\xdef\LWR@parsedfilename{\LWR@tempone}%
+\Ginclude@graphics{\detokenize\expandafter{\LWR@tempone}}%
+\endgroup%
+\filename@parse{\LWR@parsedfilename}%
+\LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
\ifbool{FormatWP}{%
\begingroup%
+ \ifpdf
+ \appto\LWR@restoreorigformatting{%
\DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+ }
+ \else% \ifpdf
+ \ifXeTeX
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+ }
+ \else
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{.eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
+ }
+ \fi
+ \fi
\define@key{Gin}{angle}{}%
\IfBooleanTF{#1}%
{% starred