|
\documentclass{article}
\makeatletter
\newenvironment{Annotation}[1]{%
\def\AnnotBoxName{Annotation#1}%
% Eine neue Box nur, wenn es sie noch nicht gibt:
\@ifundefined{\AnnotBoxName}{%
\expandafter\newsavebox\csname\AnnotBoxName\endcsname
}{}%
\expandafter\let\expandafter\AnnotBox\csname\AnnotBoxName\endcsname
\begin{lrbox}{\AnnotBox}%
\begin{minipage}{\linewidth}%
}{%
\end{minipage}%
\end{lrbox}%
\global\setbox\AnnotBox=\copy\AnnotBox
}
\makeatother
\begin{document}
\begin{Annotation}{bar}
An Annotation ...\\
and a new line
\end{Annotation}
USEBOX: \usebox{\Annotationbar}
\end{document}
|