summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty')
-rw-r--r--Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty12
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty b/Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty
index bc62a9e91f0..616f00e0cb1 100644
--- a/Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty
+++ b/Master/texmf-dist/tex/latex/stex/tikzinput/tikzinput.sty
@@ -7,7 +7,7 @@
%% tikzinput.dtx (with options: `package')
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{tikzinput}[2016/04/06 v1.0 Selective input of TIKZ pictures]
+\ProvidesPackage{tikzinput}[2019/03/20 v1.0 Selective input of TIKZ pictures]
\newif\if@tikzinput@mh@\@tikzinput@mh@false
\DeclareOption{mh}{\@tikzinput@mh@true}
\newif\iftikzinput@image\tikzinput@imagefalse
@@ -25,9 +25,15 @@
\iftikzinput@image
\newcommand\tikzinput[2][]{\includegraphics[#1]{#2}}
\else
-\newcommand\tikzinput[2][]{\input{#2}}
+\newcommand\tikzinput[2][]{\setkeys{Gin}{#1}%
+\ifx\Gin@ewidth\Gin@exclamation
+\ifx\Gin@eheight\Gin@exclamation\input{#2}\else\resizebox{!}{\Gin@eheight}{\input{#2}}\fi
+\else
+\ifx\Gin@eheight\Gin@exclamation\resizebox{\Gin@ewidth}{!}{\input{#2}}
+\else\resizebox{\Gin@ewidth}{\Gin@eheight}{\input{#2}}\fi
+\fi}
\fi
-\newcommand\ctikzinput[2][]{\begin{center}\tikzinput{#2}\end{center}}
+\newcommand\ctikzinput[2][]{\begin{center}\tikzinput[#1]{#2}\end{center}}
\endinput
%%