1

I am trying to have correct control of text flow over many pages which I establish by allowframebreaks in the custom frame slide in the Berkeley theme of beamer document class. The example code uses the package quotation where you can see that the content passes the page although \resizebox{\textheight}{!}. Similar complications occur in resizing figures to text height such that many lines of text is hidden, while the expected output is page break earlier, exposing all text.

\documentclass{beamer}
\usetheme{Berkeley} 
% http://tex.stackexchange.com/a/94632/13173
\newenvironment{slide}[1]
{\begin{frame}[environment=slide,allowframebreaks,fragile]
\frametitle{\insertsection-#1} %  Torbjørn T. Thank you!
}
{\end{frame}}

\begin{document}
\begin{slide}{Lorem}
\resizebox{\textheight}{!}{
\begin{quotation}
The elimination of CS can be achieved through implementation of various proven measures but requires technical support, funding and commitment among political forces, health officials, and public to prevent and treat CS cases and help countries reach their Millennium Development Goals. 
Stronger partnerships with clearly defined responsibilities should be developed among agencies responsible for national STI control, HIV/AIDS control, and making pregnancy safer initiatives to ensure universal coverage of CS control interventions. 
Clinicians should adhere to standardized protocols in evaluation and management of at-risk newborns. Vigilant screening prenatally and at delivery and adequate follow-up are critical to reduce CS. Improved surveillance data and resources are needed for identification and follow-up of newborns at risk for CS. 
Clinicians should adhere to standardized protocols in evaluation and management of at-risk newborns. Vigilant screening prenatally and at delivery and adequate follow-up are critical to reduce CS. Improved surveillance data and resources are needed for identification and follow-up of newborns at risk for CS. 
- Phiske, Hossain, Martin. 
\end{quotation}
}
\end{slide}
\end{document}

enter image description here

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • Just removing both \resizebox and quotation isn't an option? – Torbjørn T. Dec 31 '16 at 21:42
  • It helps in the sense that the text will then start on the first page, and break as intended to the next page. It doesn't fix the problem that the \frametitle is not correctly identified though. – Torbjørn T. Dec 31 '16 at 22:00
  • @LéoLéopoldHertz준영: I suppose that beamer redefines quotation such that it isn't breakable any longer (in contrast to the book etc. version of quotation) –  Dec 31 '16 at 22:00
  • 1
    I don't know why, but if you move the closing brace after \frametitle{\insertsection-#1} to the next line, you get the correct frametitles. – Torbjørn T. Dec 31 '16 at 22:03
  • 1
    OT for the question, but this is not linked to the theme (directly). – Joseph Wright Dec 31 '16 at 22:04
  • @TorbjørnT. Thank you! It would be really great to get more stable solution for the slide. I do not understand neither why the code is so fragile with the brackets. – Léo Léopold Hertz 준영 Dec 31 '16 at 22:07

1 Answers1

3

The allowframebreaks option can only break material which is not a single unit. In this case, the quotation environment in beamer is a 'color box', which is not breakable. As such, you cannot use the quotation environment here: you can see that by simply commenting it out.

\documentclass{beamer}
\begin{document}
\begin{frame}[allowframebreaks]{Lorem}
%\begin{quotation}
The elimination of CS can be achieved through implementation of various proven measures but requires technical support, funding and commitment among political forces, health officials, and public to prevent and treat CS cases and help countries reach their Millennium Development Goals. 
Stronger partnerships with clearly defined responsibilities should be developed among agencies responsible for national STI control, HIV/AIDS control, and making pregnancy safer initiatives to ensure universal coverage of CS control interventions. 
Clinicians should adhere to standardized protocols in evaluation and management of at-risk newborns. Vigilant screening prenatally and at delivery and adequate follow-up are critical to reduce CS. Improved surveillance data and resources are needed for identification and follow-up of newborns at risk for CS.
Clinicians should adhere to standardized protocols in evaluation and management of at-risk newborns. Vigilant screening prenatally and at delivery and adequate follow-up are critical to reduce CS. Improved surveillance data and resources are needed for identification and follow-up of newborns at risk for CS. 
- Phiske, Hossain, Martin. 
%\end{quotation}
\end{frame}
\end{document}

If you want to have the appearance of a quotation but have a break, you'll need to do it by hand:

\documentclass{beamer}
\begin{document}
\begin{frame}[allowframebreaks]{Lorem}
\begin{quotation}
The elimination of CS can be achieved through implementation of various proven measures but requires technical support, funding and commitment among political forces, health officials, and public to prevent and treat CS cases and help countries reach their Millennium Development Goals. 
Stronger partnerships with clearly defined responsibilities should be developed among agencies responsible for national STI control, HIV/AIDS control, and making pregnancy safer initiatives to ensure universal coverage of CS control interventions. 
Clinicians should adhere to standardized protocols in evaluation and management of at-risk newborns. Vigilant screening prenatally and at delivery and adequate follow-up are critical to reduce CS. Improved surveillance data and resources are needed for identification and follow-up of newborns at risk for CS.
\end{quotation}
\begin{quotation}
Clinicians should adhere to standardized protocols in evaluation and management of at-risk newborns. Vigilant screening prenatally and at delivery and adequate follow-up are critical to reduce CS. Improved surveillance data and resources are needed for identification and follow-up of newborns at risk for CS. 
- Phiske, Hossain, Martin. 
\end{quotation}
\end{frame}
\end{document}
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 3
    At the risk of sounding like the original beamer author: allowframebreaks is evil and this is far too much text for a presentation. – Joseph Wright Dec 31 '16 at 22:08