Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The mdframed environment fails to break into several pages (slides) when used in a frame environment from the beamer class.

In the other hand, the boitecoloriee environment from the boites package can be broken into several pages.

Here is a document that demonstrates the issue. It should not be compiled directly into pdf because boitecoloriee uses pstricks.

\documentclass{beamer}
\usepackage{xcolor,boites,boites_exemples,pstricks}
\usepackage{mdframed}
\usepackage{lipsum}

\begin{document}

\begin{frame}[allowframebreaks]{Using \texttt{boitecoloriee}}
  \begin{boitecoloriee}
    \lipsum[1-2]
  \end{boitecoloriee}
\end{frame}

\begin{frame}[allowframebreaks]{Using \texttt{mdframed}}
  \begin{mdframed}
    \lipsum[1-2]
  \end{mdframed}
\end{frame}

\end{document}

Maybe is there a way to fix mdframed to work in slides too. Any clues?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Unfortunately I must answer this question with: You can't do this.

The contents of a beamer frame will be saved in a savebox. mdframed does the same. You can't combine the splitting algorithm of \vsplit which is used by beamer and mdframed.

The package boites uses an other algorithm. It prints the contents line by line and so you can handle the page breaks in beamer.

share|improve this answer
    
Does this same explanation also apply to the tcolorbox package? –  Romildo Oct 5 '13 at 21:05
    
@Romildo: Yes. It uses nearly the same algorithm. –  Marco Daniel Oct 5 '13 at 22:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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