I want to include a TikZ picture in a beamer presentation using the standalone
package and I want a consistant size of the text in the picture and the rest of the frame.
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\beamertemplatenavigationsymbolsempty
\usepackage{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations}
\begin{document}
\begin{frame}[plain]{A frame}
\includestandalone[mode=tex,height=0.4\textwidth,keepaspectratio]{pic}
At some time $t$ there is a $\pi$ pulse along $z$\dots
{\footnotesize This is some small text.}
\end{frame}
\end{document}
This is pic.tex
:
\documentclass[beamer]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations}
\begin{document}
\begin{tikzpicture}[
scale=0.5,
wave/.style={decorate, decoration={snake,amplitude=0.6mm,segment length=2mm,post length=1.3mm}, ->, thick,->,>=stealth},
coordaxis/.style={->}
]
\draw[coordaxis] (0,0) -- +(1.5,0) node[midway,below] {\footnotesize $t$};
\draw[coordaxis] (0,0) -- +(0,1.5) node[midway,left] {\footnotesize $z$};
\draw[wave] (2,2) -- +(0,2) node[midway, right] {$\pi$};
\end{tikzpicture}
\end{document}
As you can see the font sizes are not consistent, i.e. normal and footnote sized symbols have different sizes within the picture and the rest of the text in the frame. How can I make the font sizes consistent?
Edit: Also, upon compiling TeXLive throws a warning that I don't know how to interpret:
/usr/share/texmf-dist/tex/latex/standalone/standalone.sty:259: File stack underflow! on input line 259.
./presentation.tex:8: File stack underflow! on line 8.
\footnotesize
text in it, but more importantly, when you import it, you must not scale the imported image with a modifier such as,height=0.4\textwidth
. In that way, uniform text size can be achieved.