summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty319
1 files changed, 170 insertions, 149 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index b1781c420ee..cba18f0f8cd 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -6,7 +6,7 @@
%%
%% lwarp.dtx (with options: `graphics')
%% This is a generated file.
-%% Copyright 2016-2019 Brian Dunn
+%% Copyright 2016-2020 Brian Dunn
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -136,17 +136,16 @@
\newcommand*{\LWR@rotstyle}[2]{%
- #1transform:rotate(-#2deg);
+ \edef\LWR@tempone{#2}%
+ \setcounter{LWR@tempcountone}{-1*\real{\LWR@tempone}} % space
+ #1transform:rotate(\arabic{LWR@tempcountone}deg); % space
}
\newcommand*{\LWR@scalestyle}[3]{%
- #1transform:scale(#2,#3);
+ #1transform:scale(#2,#3);
}
-\newbool{LWR@infloatrow}
-\boolfalse{LWR@infloatrow}
-
\def\LWR@opacity{1}
\newsavebox{\LWR@imagesizebox}
@@ -172,160 +171,182 @@
}%
}
-\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
-{%
-\LWR@origtilde \LWR@orignewline%
-\begingroup%
-\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}%
-{%
- \ifbool{LWR@infloatrow}%
- {}
- {% not in a minipage or a floatrow:
- \setlength{\linewidth}{6in}%
- \setlength{\textwidth}{6in}%
- \setlength{\textheight}{9in}%
- }%
-}{}%
-\large%
-\setlength{\LWR@igwidth}{0pt}%
-\setlength{\LWR@igheight}{0pt}%
-\renewcommand*{\LWR@igwidthstyle}{}%
-\renewcommand*{\LWR@igheightstyle}{}%
-\renewcommand*{\LWR@igorigin}{}%
-\renewcommand*{\LWR@igangle}{}%
-\renewcommand*{\LWR@igxscale}{1}%
-\renewcommand*{\LWR@igyscale}{1}%
-\renewcommand*{\LWR@igclass}{inlineimage}%
-\ifdefvoid{\LWR@ThisAltText}{%
- \edef\LWR@igalt{\ImageAltText}%
-}{%
- \edef\LWR@igalt{\LWR@ThisAltText}%
-}%
-\IfValueF{#3}{%
- \IfValueTF{#2}%
- {\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%
- \LWR@restoreorigformatting%
- \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% \ifpdf
- \define@key{Gin}{angle}{}%
- \IfBooleanTF{#1}%
- {% starred
- \IfValueTF{#3}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2][#3]{#4}}%
+\newcommand*{\LWR@ig@wpimagesizes}[4]{%
+ \ifbool{FormatWP}{%
+ \begingroup%
+ \LWR@restoreorigformatting%
+ \ifpdf%
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
}%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2]{#4}}%
- }{%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*{#4}}%
+ \else% \ifpdf
+ \ifXeTeX%
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
}%
}%
- }% starred
- {% not starred
- \IfValueTF{#3}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2][#3]{#4}}%
+ \else%
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
}%
- {%
- \IfValueTF{#2}%
+ \fi%
+ \fi% \ifpdf
+ \define@key{Gin}{angle}{}%
+ \IfBooleanTF{#1}%
+ {% starred
+ \IfValueTF{#3}%
{%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2]{#4}}%
- }{%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics{#4}}%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics*[#2][#3]{#4}%
+ }%
}%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics*[#2]{#4}%
+ }%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics*{#4}%
+ }%
+ }%
+ }%
+ }% starred
+ {% not starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics[#2][#3]{#4}%
+ }%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics[#2]{#4}%
+ }%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics{#4}%
+ }%
+ }%
+ }%
+ }% not starred
+ \endgroup%
+ \settowidth{\LWR@igwidth}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igwidthstyle}{%
+ width:\LWR@printlength{\LWR@igwidth}%
}%
- }% not starred
- \endgroup%
- \settowidth{\LWR@igwidth}{\usebox{\LWR@imagesizebox}}%
- \global\renewcommand*{\LWR@igwidthstyle}{width:\LWR@printlength{\LWR@igwidth}}%
- \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}%
- \global\renewcommand*{\LWR@igheightstyle}{height:\LWR@printlength{\LWR@igheight}}%
-}{}% FormatWP
-\LWR@traceinfo{LWR@includegraphicsb: about to create href}%
-\href{\LWR@parsedfilename}%
-{% start of href
-\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
-\LWR@htmltag{% start of image tags
-img\LWR@indentHTML%
-src="%
-\detokenize\expandafter{\LWR@parsedfilename}%
-"\LWR@indentHTML%
-\ifthenelse{
- \NOT\equal{\LWR@igwidthstyle}{} \OR
- \NOT\equal{\LWR@igheightstyle}{} \OR
- \NOT\equal{\LWR@igorigin}{} \OR
- \NOT\equal{\LWR@igangle}{} \OR
- \NOT\equal{\LWR@igxscale}{1} \OR
- \NOT\equal{\LWR@igyscale}{1}
-}%
-{%
- style="\LWR@indentHTML
- \ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}%
- {\LWR@igwidthstyle;\LWR@indentHTML}{}%
- \ifthenelse{\NOT\equal{\LWR@igheightstyle}{}}%
- {\LWR@igheightstyle;\LWR@indentHTML}{}%
- \ifthenelse{\NOT\equal{\LWR@igorigin}{}}%
- {%
- transform-origin: \LWR@originnames{\LWR@igorigin};\LWR@indentHTML%
- }{}%
- \ifthenelse{\NOT\equal{\LWR@igangle}{}}%
- {%
- \LWR@rotstyle{-ms-}{\LWR@igangle}\LWR@indentHTML
- \LWR@rotstyle{-webkit-}{\LWR@igangle}\LWR@indentHTML
- \LWR@rotstyle{}{\LWR@igangle }\LWR@indentHTML
- }{}%
- \ifthenelse{%
- \NOT\equal{\LWR@igxscale}{1}\OR%
- \NOT\equal{\LWR@igyscale}{1}%
+ \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igheightstyle}{%
+ height:\LWR@printlength{\LWR@igheight}%
+ }%
+ }{}% FormatWP
+}
+
+\newcommand*{\LWR@ig@htmltag}{%
+ img\LWR@indentHTML%
+ src="%
+ \detokenize\expandafter{\LWR@parsedfilename}%
+ "\LWR@indentHTML%
+ \ifthenelse{
+ \NOT\equal{\LWR@igwidthstyle}{} \OR
+ \NOT\equal{\LWR@igheightstyle}{} \OR
+ \NOT\equal{\LWR@igorigin}{} \OR
+ \NOT\equal{\LWR@igangle}{} \OR
+ \NOT\equal{\LWR@igxscale}{1} \OR
+ \NOT\equal{\LWR@igyscale}{1}
}%
{%
- \LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale}\LWR@indentHTML
- \LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale}\LWR@indentHTML
- \LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}\LWR@indentHTML
+ style="\LWR@indentHTML
+ \ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}%
+ {\LWR@igwidthstyle;\LWR@indentHTML}{}%
+ \ifthenelse{\NOT\equal{\LWR@igheightstyle}{}}%
+ {\LWR@igheightstyle;\LWR@indentHTML}{}%
+ \ifthenelse{\NOT\equal{\LWR@igorigin}{}}%
+ {%
+ transform-origin: \LWR@originnames{\LWR@igorigin};%
+ \LWR@indentHTML%
+ }{}%
+ \ifthenelse{\NOT\equal{\LWR@igangle}{}}%
+ {%
+ \LWR@rotstyle{-ms-}{\LWR@igangle}\LWR@indentHTML
+ \LWR@rotstyle{-webkit-}{\LWR@igangle}\LWR@indentHTML
+ \LWR@rotstyle{}{\LWR@igangle }\LWR@indentHTML
+ }{}%
+ \ifthenelse{%
+ \NOT\equal{\LWR@igxscale}{1}\OR%
+ \NOT\equal{\LWR@igyscale}{1}%
+ }%
+ {%
+ \LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale}%
+ \LWR@indentHTML
+ \LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale}%
+ \LWR@indentHTML
+ \LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}%
+ \LWR@indentHTML
+ }{}%
+ %
+ \ifthenelse{\NOT\equal{\LWR@opacity}{1}}%
+ {opacity:\LWR@opacity;\LWR@indentHTML}{}%
+ %
+ "\LWR@indentHTML%
}{}%
- %
- \ifthenelse{\NOT\equal{\LWR@opacity}{1}}%
- {opacity:\LWR@opacity;\LWR@indentHTML}{}%
- %
- "\LWR@indentHTML%
-}{}%
-class="\LWR@igclass"\LWR@indentHTML%
-alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
+ class="\LWR@igclass"\LWR@indentHTML%
+ alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
}% end of image tags
-}% end of href
-\endgroup
-\gdef\LWR@ThisAltText{}%
-\LWR@traceinfo{LWR@includegraphicsb done}%
+
+\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
+{%
+ \LWR@origtilde \LWR@orignewline%
+ \begin{LWR@setvirtualpage}%
+ \large%
+ \setlength{\LWR@igwidth}{0pt}%
+ \setlength{\LWR@igheight}{0pt}%
+ \renewcommand*{\LWR@igwidthstyle}{}%
+ \renewcommand*{\LWR@igheightstyle}{}%
+ \renewcommand*{\LWR@igorigin}{}%
+ \renewcommand*{\LWR@igangle}{}%
+ \renewcommand*{\LWR@igxscale}{1}%
+ \renewcommand*{\LWR@igyscale}{1}%
+ \renewcommand*{\LWR@igclass}{inlineimage}%
+ \ifdefvoid{\LWR@ThisAltText}{%
+ \edef\LWR@igalt{\ImageAltText}%
+ }{%
+ \edef\LWR@igalt{\LWR@ThisAltText}%
+ }%
+ \IfValueF{#3}{%
+ \IfValueTF{#2}%
+ {\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}%
+ \LWR@ig@wpimagesizes{#1}{#2}{#3}{#4}%
+ \LWR@traceinfo{LWR@includegraphicsb: about to create href}%
+ \href{\LWR@parsedfilename}%
+ {% start of href
+ \LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
+ \LWR@htmltag{\LWR@ig@htmltag}%
+ }% end of href
+ \end{LWR@setvirtualpage}%
+ \gdef\LWR@ThisAltText{}%
+ \LWR@traceinfo{LWR@includegraphicsb done}%
}