diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2019-01-08 23:28:14 +0100 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2019-01-08 23:28:14 +0100 |
commit | d1728e33e48d258d72058082a22b0406f48c9e9e (patch) | |
tree | ea3c3bdfd2255c7f00296d65c5a0ee0f4b2620fb /tex/sample/sample.tex | |
parent | 4c6f7799004b4d10641dfe659a9a7b9af0653513 (diff) | |
parent | 7807d9c60d2574fb58069eb3faf65cd478905ff7 (diff) |
Merge tag 'v2.1' into debian/sid
Diffstat (limited to 'tex/sample/sample.tex')
-rw-r--r-- | tex/sample/sample.tex | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tex/sample/sample.tex b/tex/sample/sample.tex index 57ba88c..c6fb3ca 100644 --- a/tex/sample/sample.tex +++ b/tex/sample/sample.tex @@ -1,10 +1,12 @@ \documentclass{article}
\usepackage{tikzit}
\input{sample.tikzstyles}
-
+\input{sample.tikzdefs}
\begin{document}
+This is a demonstration of \texttt{tikzit.sty}, which provides some convenience macros for including \texttt{.tikz} files generated by TikZiT. Note this file is optional, however if you choose to omit it from your \LaTeX{} source, you should at least declare the layers, dummy properties, and \texttt{none} style from \texttt{tikzit.sty} for TikZiT figures to build correctly.
+
A centered tikz picture:
\ctikzfig{fig}
@@ -14,5 +16,24 @@ A tikz picture as part of mathematics: \tikzfig{fig}
\end{equation}
+It is also possible to paste a \texttt{tikzpicture} directly from TikZiT, without using the \texttt{$\backslash$tikzfig} macro. In that case, the \texttt{tikzfig} option should be given to the \texttt{tikzpicture} environment to get the same baseline and scaling as the other figures:
+\[
+\begin{tikzpicture}[tikzfig]
+ \begin{pgfonlayer}{nodelayer}
+ \node [style=red node] (0) at (0, 1) {};
+ \node [style=blue node 2] (1) at (1, 0) {};
+ \node [style=blue node] (2) at (-1, 0) {};
+ \node [style=yellow square] (3) at (0, -1) {foo};
+ \end{pgfonlayer}
+ \begin{pgfonlayer}{edgelayer}
+ \draw [in=-90, out=0] (3) to (1);
+ \draw [bend right] (3) to (2);
+ \draw (2) to (0);
+ \draw (0) to (1);
+ \end{pgfonlayer}
+\end{tikzpicture}
+\]
+
+
\end{document}
|