\begin{function}{image}
  The behavior of the \pkg{ikzinput} package is determined by whether the |image| option
  is given. If it is not, then the \pkg{tikz} package is loaded, all other options are
  passed on to it and |\tikzinput{|\meta{file}|}| inputs the TIKZ file \meta{file}|.tex|;
  if not, only the \pkg{graphicx} package is loaded and |\tikzinput{|\meta{file}|}| loads
  an image file \meta{file}|.|\meta{ext} generated from \meta{file}|.tex|.
\end{function}

The selective input functionality of the \pkg{tikzinput} package assumes that the TIKZ
pictures are externalized into a standalone picture file, such as the following one

\begin{stexcode}
\documentclass{standalone}
\usepackage{tikz}
\usetikzpackage{...}
\begin{document}
  \begin{tikzpicture}
     ...
  \end{tikzpicture}
\end{document}
\end{stexcode}

   The \pkg{standalone} class is a minimal {\LaTeX} class that when loaded in a document
   that uses the \pkg{standalone} package: the preamble and the |documenat| environment
   are disregarded during loading, so they do not pose any problems. In effect, an
   |\input| of the file above only sees the |tikzpicture| environment, but the file itself
   is standalone in the sense that we can run {\LaTeX} over it separately, e.g. for
   generating an image file from it.

\begin{function}{\tikzinput,\ctikzinput}
  This is exactly where the \pkg{tikzinput} package comes in: it supplies the |\tikzinput|
  macro, which -- depending on the |image| option -- either directly inputs the TIKZ
  picture (source) or tries to load an image file generated from it.

  Concretely, if the |image| option is not set for the \pkg{tikzinput} package, then
  |\tikzinput[|\meta{opt}|]{|\meta{file}|}| disregards the optional argument \meta{opt}
  and inputs \meta{file}|.tex| via |\input| and resizes it to as specified in the |width|
  and |height| keys. If it is, |\tikzinput[|\meta{opt}|]{|\meta{file}|}| expands to
  |\includegraphics[|\meta{opt}|]{|\meta{file}|}|.

  |\ctizkinput| is a version of |\tikzinput| that is centered.
\end{function} 

\begin{function}{\mhtikzinput,\cmhtikzinput}
  |\mhtizkinput| is a variant of |\tikzinput| that treats its file path argument as a
  relative path in a math archive in analogy to \stexcodeinline|\inputref|. To give the archive
  path, we use the |mhrepos=| key.  Again, |\cmhtizkinput| is a version of |\mhtikzinput|
  that is centered.
\end{function}

\begin{function}{\libusetikzlibrary}
  Sometimes, we want to supply archive-specific TIKZ libraries in the |lib| folder of the
  archive or the |meta-inf/lib| of the archive group. Then we need an analogon to
  \stexcodeinline|\libinput| for \stexcodeinline|\usetikzlibrary|. The \pkg{stex-tikzinput} package
  provides the \stexcodeinline|libusetikzlibrary| for this purpose. 
\end{function}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../stex-manual"
%%% End:
