4

Look at the following MWE:

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{beamerarticle}
\usepackage[framemethod=TikZ]{mdframed}

\surroundwithmdframed{definition}

\begin{document} \begin{definition} \alert{test} \begin{description} \item[A:] TestA \item[B:] TestB \end{description} \end{definition} \end{document}

It produces: pic for wrong typesetting of description environment

Any ideas for fixing it?

Arne
  • 1,305

2 Answers2

5

With tcolorbox it works:

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{beamerarticle}

\usepackage[most]{tcolorbox}

\BeforeBeginEnvironment{definition}{\begin{tcolorbox}[boxrule=1pt]} \AfterEndEnvironment{definition}{\end{tcolorbox}}

\begin{document} \begin{definition} \alert{test} \begin{description} \item[A:] TestA \item[B:] TestB \end{description} \end{definition} \end{document}

tcolorbox working picture

Arne
  • 1,305
4

The mdframed package is basically abandoned, because in the meantime tcolorbox has appeared, which is much more powerful.

\documentclass{scrbook}
\usepackage{beamerarticle}
\usepackage[many]{tcolorbox}

\tcolorboxenvironment{definition}{ boxrule=0.5pt, sharp corners, colback=white, }

\begin{document} \begin{definition} \alert{test} \begin{description} \item[A:] TestA \item[B:] TestB \end{description} \end{definition} \end{document}

enter image description here

I wouldn't use beamerarticle, but it's personal opinion.

egreg
  • 1,121,712
  • Why not use beamerarticle? Does it has some big disadvantages? – Stephen Dec 19 '23 at 15:54
  • 1
    @Stephen I firmly believe that a paper is a very different thing than a presentation. – egreg Dec 19 '23 at 16:46
  • 1
    I think so too, but who says it will be used in a paper? To have a simple combination of lecture slides and lecture notes, I think this is an adequate solution. Or would you disagree here? – Arne Dec 20 '23 at 08:27
  • Just for cross reference a recent discussion on tcolorbox vs. mdframed: https://tex.stackexchange.com/questions/135871/what-are-the-relative-strong-and-weak-points-between-tcolorbox-and-mdframed – Arne Dec 20 '23 at 09:04