Commit b703296c authored by Aleks Kissinger's avatar Aleks Kissinger

updated tikzit.sty to only apply scaling if included by \tikzfig or passed the [tikzfig] style

parent 0615dcb8
......@@ -5,6 +5,8 @@
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:
......@@ -14,5 +16,24 @@ A tikz picture as part of mathematics:
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:
\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};
\draw [in=-90, out=0] ( to (;
\draw [bend right=45, looseness=1.25] ( to (;
\draw ( to (;
\draw ( to (;
......@@ -3,30 +3,40 @@
\tikzstyle{every picture}=[baseline=-0.25em,scale=0.5]
% this style is applied by default to any tikzpicture included via \tikzfig
% these are dummy properties used by TikZiT, but ignored by LaTex
\pgfkeys{/tikz/tikzit fill/.initial=0}
\pgfkeys{/tikz/tikzit draw/.initial=0}
\pgfkeys{/tikz/tikzit shape/.initial=0}
\pgfkeys{/tikz/tikzit category/.initial=0}
% standard layers used in .tikz files
% style for blank nodes
\tikzstyle{none}=[inner sep=0mm]
% include a .tikz file
{\tikzstyle{every picture}=[tikzfig]
{\tikz[baseline=-0.5em]{\node[draw=red,font=\color{red},fill=red!10!white] {\textit{#1}};}}%
% the same as \tikzfig, but in a {center} environment
\tikzstyle{none}=[inner sep=0mm]
% fix strange self-loops, which are PGF/TikZ default
\tikzstyle{every loop}=[]
\tikzstyle{mark coordinate}=[inner sep=0pt,outer sep=0pt,minimum size=3pt,fill=black,circle]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment