| 1 |
\begin{function}{image} |
| 2 |
The behavior of the \pkg{ikzinput} package is determined by whether the |image| option |
| 3 |
is given. If it is not, then the \pkg{tikz} package is loaded, all other options are |
| 4 |
passed on to it and |\tikzinput{|\meta{file}|}| inputs the TIKZ file \meta{file}|.tex|; |
| 5 |
if not, only the \pkg{graphicx} package is loaded and |\tikzinput{|\meta{file}|}| loads |
| 6 |
an image file \meta{file}|.|\meta{ext} generated from \meta{file}|.tex|. |
| 7 |
\end{function} |
| 8 |
|
| 9 |
The selective input functionality of the \pkg{tikzinput} package assumes that the TIKZ |
| 10 |
pictures are externalized into a standalone picture file, such as the following one |
| 11 |
|
| 12 |
\begin{stexcode} |
| 13 |
\documentclass{standalone} |
| 14 |
\usepackage{tikz} |
| 15 |
\usetikzpackage{...} |
| 16 |
\begin{document} |
| 17 |
\begin{tikzpicture} |
| 18 |
... |
| 19 |
\end{tikzpicture} |
| 20 |
\end{document} |
| 21 |
\end{stexcode} |
| 22 |
|
| 23 |
The \pkg{standalone} class is a minimal {\LaTeX} class that when loaded in a document |
| 24 |
that uses the \pkg{standalone} package: the preamble and the |documenat| environment |
| 25 |
are disregarded during loading, so they do not pose any problems. In effect, an |
| 26 |
|\input| of the file above only sees the |tikzpicture| environment, but the file itself |
| 27 |
is standalone in the sense that we can run {\LaTeX} over it separately, e.g. for |
| 28 |
generating an image file from it. |
| 29 |
|
| 30 |
\begin{function}{\tikzinput,\ctikzinput} |
| 31 |
This is exactly where the \pkg{tikzinput} package comes in: it supplies the |\tikzinput| |
| 32 |
macro, which -- depending on the |image| option -- either directly inputs the TIKZ |
| 33 |
picture (source) or tries to load an image file generated from it. |
| 34 |
|
| 35 |
Concretely, if the |image| option is not set for the \pkg{tikzinput} package, then |
| 36 |
|\tikzinput[|\meta{opt}|]{|\meta{file}|}| disregards the optional argument \meta{opt} |
| 37 |
and inputs \meta{file}|.tex| via |\input| and resizes it to as specified in the |width| |
| 38 |
and |height| keys. If it is, |\tikzinput[|\meta{opt}|]{|\meta{file}|}| expands to |
| 39 |
|\includegraphics[|\meta{opt}|]{|\meta{file}|}|. |
| 40 |
|
| 41 |
|\ctizkinput| is a version of |\tikzinput| that is centered. |
| 42 |
\end{function} |
| 43 |
|
| 44 |
\begin{function}{\mhtikzinput,\cmhtikzinput} |
| 45 |
|\mhtizkinput| is a variant of |\tikzinput| that treats its file path argument as a |
| 46 |
relative path in a math archive in analogy to \stexcodeinline|\inputref|. To give the archive |
| 47 |
path, we use the |mhrepos=| key. Again, |\cmhtizkinput| is a version of |\mhtikzinput| |
| 48 |
that is centered. |
| 49 |
\end{function} |
| 50 |
|
| 51 |
\begin{function}{\libusetikzlibrary} |
| 52 |
Sometimes, we want to supply archive-specific TIKZ libraries in the |lib| folder of the |
| 53 |
archive or the |meta-inf/lib| of the archive group. Then we need an analogon to |
| 54 |
\stexcodeinline|\libinput| for \stexcodeinline|\usetikzlibrary|. The \pkg{stex-tikzinput} package |
| 55 |
provides the \stexcodeinline|libusetikzlibrary| for this purpose. |
| 56 |
\end{function} |
| 57 |
|
| 58 |
%%% Local Variables: |
| 59 |
%%% mode: latex |
| 60 |
%%% TeX-master: "../stex-manual" |
| 61 |
%%% End: |