Why does the following 'minimal working example' work
\documentclass[a4,german]{book}
\usepackage{framed}
\begin{document}
\newcommand{\myText}{Bliblibli!}
\begin{framed}
Blabla
\end{framed}
\myText
\end{document}
but not this here, when defining the new command inside a "framed" block?
'Minimal non-working example':
\documentclass[a4,german]{book}
\usepackage{framed}
\begin{document}
\begin{framed}
Blabla \newcommand{\myText}{Bliblibli!}
\end{framed}
\myText
\end{document}
Does the framed package simply not support this feature, or do I do something wrong?
\newcommandis available on in theframedenvironment due to scoping. See for example \global\renewcommand equivalent of \global\def. So using\global\def\myText{Bliblibli!}should work. – Peter Grill Jan 17 '13 at 23:13