Is there a way to iterate over all PGF keys that have been defined previously? My idea is to capture the value of all keys in order to do Proper nesting of tikzpicture environments: Reset all PGF values to their defaults.
EDIT: I imagine something along these lines:
\documentclass{article}
\beginrecordallpgfkeys
\usepackage{tikz}
\endrecordallpgfkeys
\begin{document}
\restoreallrecordedpgfkeys
\end{document}
I wouldn't mind if recording and restoring would use a temporary file.
\def\setkeysdefault{\pgfkeysset{...}}then is easy to have them reset. Is this a good option? – yannisl Apr 05 '12 at 13:04\setkeysdefault? – krlmlr Apr 05 '12 at 15:40\<prefix>@<family>@intialkeyvalues. This is used to recover all default values of keys at once and to, if needed, reinitialize keys (ie, reset keys to their default values) at any time. – Ahmed Musa Apr 05 '12 at 17:01tikzpicture(e.g., when defining atikzpictureinside anode). See also the linked question. – krlmlr Apr 06 '12 at 20:10