I'm having some difficulty at scaling a TikZ draw inside a matrix:
\documentclass[margin=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=.5]
\matrix [yshift=2cm]{
\draw (0,0)--(0.2,1)--(1,1.2)--(1.2,0)--(0,0);&
\node{Some text that should not be scaled};\\
};
\draw (0,0)--(0.2,1)--(1,1.2)--(1.2,0)--(0,0);
\end{tikzpicture}
\end{document}
As you can see the same picture is scaled outside the matrix but not inside. I can't use the scalebox
or resizebox
methods because there is some text in my original picture that should not be scaled, as it happens by default when you scale via the TikZ own option.
So, why the draw does not scale inside the matrix? Is there some way I can make it scale without scaling the text too?
Best Answer
This is one of those grey areas about cell picture issues. One not-super-clean solution is to set the transformation yourself.