-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtikzinput.sty
63 lines (55 loc) · 1.32 KB
/
tikzinput.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%%
%% This is file `tikzinput.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tikzinput.dtx (with options: `package')
%%
%%%%%%%%%%%%% tikzinput.dtx %%%%%%%%%%%%%
\ProvidesExplPackage{tikzinput}{2023/10/13}{3.4.0}{tikzinput package}
\RequirePackage{l3keys2e}
\keys_define:nn { tikzinput } {
image .bool_set:N = \c_tikzinput_image_bool,
image .default:n = false ,
unknown .code:n = {}
}
\ProcessKeysOptions { tikzinput }
\bool_if:NTF \c_tikzinput_image_bool {
\RequirePackage{graphicx}
\providecommand\usetikzlibrary[]{}
\newcommand\tikzinput[2][]{\includegraphics[#1]{#2}}
}{
\RequirePackage{tikz}
\RequirePackage{standalone}
\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
}
}
\newcommand \ctikzinput [2] [] {
\begin{center}
\tikzinput [#1] {#2}
\end{center}
}
\endinput
%%
%% End of file `tikzinput.sty'.