I need to use framed theorem environments the way they are made in Make an Example and shaded box like in the book.
The realization with \usepackage[framemethod=TikZ]{mdframed} is working fine. But now, I have to implement this in a ready written script being made with \documentclass{article} and \usepackage{beamerarticle}.
The predefined theorem environments in german language Satz, Beispiel and so on are used. I already tried using \setbeamertemplate{theorem begin}{...} and \setbeamertemplate{theorem end}{...} for inserting those boxing commands for example with

\setbeamertemplate{theorem begin}{\begin{mdframed}%
\setbeamertemplate{theorem end}{\end{mdframed}}

but it is not working.
Are there other ways, as I do not want to rename all used environment and make new ones?

I found a solution


but others are still welcome.

  • 2
    You know me (HSU) - I am the author of mdframed. – Marco Daniel Dec 20 '11 at 7:35
  • @MarcoDaniel - Yes, indeed - I know you... Do you have a solution? I'll edit the question next minute, as I found one way - but I'm looking for others, too. Best wishes. – Bastian Ebeling Dec 20 '11 at 7:41
  • 1
    At the moment I can't test you know my job. At the evening I will have a look. – Marco Daniel Dec 20 '11 at 9:55
  • 2
    If all else fails, you can use the notheorems option to beamerarticle and define the environments Satz,... entirely yourself. Not nice, but at least you won't have to go though the entire source. – Ulrich Schwarz Dec 20 '11 at 11:43
  • @UlrichSchwarz, of course this might be done - but I prefer the etoolbox-way.. or another better one - which might come soon here, hopefully. Thanks. – Bastian Ebeling Dec 20 '11 at 19:48

The solution with \setbeamertemplate{begin theorem} doesn't work because it isn't defined. The file beamerbasetheorems.sty loaded by beamerarticle provides the definition of the theorem environments.



    % Make new theorem overlay-specification-aware




  \newcommand{\ExampleInline}[1]{\translate{Example}: \ignorespaces#1}

  % Compatiblity:
  \newcommand{\BeispielInline}[1]{Beispiel: \ignorespaces#1}

You see there are no definition. The environments lemma etc. are also defined in the quoted file.

Based on this information I prefer the solution with etoolbox (loaded by mdframed). To modify every theorem environment you can also use \BeforeBeginEnvironment{\@begintheorem}{...}.

To verify my answer you can test the simple example:

\setbeamertemplate{theorem begin}{\undefined \fooo}
foo bar
foo bar

The setting \setbeamertemplate{theorem begin}{\undefined \fooo} has no influence.

  • 1
    I hope it helps. – Marco Daniel Dec 20 '11 at 20:21
  • yes it does and the idea with \BeforeBeginEnvironment{\@begintheorem}{...} is great. THX: Merry Xmas and have a happy new year! – Bastian Ebeling Dec 22 '11 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.