summaryrefslogtreecommitdiff
path: root/tex/sample/sample.tex
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2019-01-02 12:10:40 +0100
committerAleks Kissinger <aleks0@gmail.com>2019-01-02 12:10:40 +0100
commitb703296cf7b671ca8049438804e612fc7a4e055a (patch)
tree92f8774d463f759c7ad61cb5cdc6093a8f5cb0ae /tex/sample/sample.tex
parent0615dcb854da736e11665ad3387ecba0adbd8cd8 (diff)
updated tikzit.sty to only apply scaling if included by \tikzfig or passed the [tikzfig] style
Diffstat (limited to 'tex/sample/sample.tex')
-rw-r--r--tex/sample/sample.tex21
1 files changed, 21 insertions, 0 deletions
diff --git a/tex/sample/sample.tex b/tex/sample/sample.tex
index 57ba88c..bbb20e0 100644
--- a/tex/sample/sample.tex
+++ b/tex/sample/sample.tex
@@ -5,6 +5,8 @@
\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.center) to (1.center);
+ \draw [bend right=45, looseness=1.25] (3.center) to (2.center);
+ \draw (2.center) to (0.center);
+ \draw (0.center) to (1.center);
+ \end{pgfonlayer}
+\end{tikzpicture}
+\]
+
+
\end{document}