I'm preparing a beamer presentation and have a complicated mindmap in it.
To make it nicely fit on the frames I use \tikzset{small mindmap}
.
On subsequent frames I have images with nicely drawn scale bars.
Setting a 'small mindmap' messes up the placement of my scalebar label, as can be seen in the screenshot below.
I think it has something to do with setting a general zoom/scale factor in tikz. Is there a way I can 'reset' tikz to a normal state after drawing my mindmap? This would result in (something like) the second screenshot.
Below is the code, boiled down to nearly minimal state. I couldn't manage to find an example image, is this not available in beamer? The issue can be seen when commenting/uncommenting line 12 and recompiling the document.
\documentclass{beamer}
\usepackage{siunitx}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\newlength\imagewidth% needed for scalebars
\newlength\imagescale% needed for scalebars
\begin{document}
\tikzset{small mindmap}
\begin{frame}
\begin{tikzpicture}%
\path[mindmap] node[concept] {Something} child {node[concept] {A}};
\end{tikzpicture}
\end{frame}
\begin{frame}
\pgfmathsetlength{\imagewidth}{\linewidth}%
\pgfmathsetlength{\imagescale}{\imagewidth/1536}%
\def\x{949}% scalebar-x starting at golden ratio of image width of 1536px = 949
\def\y{1335}% scalebar-y at 90% of image height of 1483px = 1335
\begin{tikzpicture}[x=\imagescale,y=-\imagescale]
\node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{example−image}};
\draw[|-|,blue,thick] (0,742) -- (1536,742) node [sloped,midway,above,fill=green,semitransparent,text opacity=1] {1536px};
\end{tikzpicture}%
\end{frame}
\end{document}
\tikzset{small mindmap}
in your firsttikzpicture
...example−image
is notexample-image
(−
is not-
).tikzpicture
s. Comment2: I copy-pasted fromtexdoc mwe
and the dashes were not copied correctly.