# How do I stop the text on my flashcards from overshooting the area?

This is not using the flashcards class because that does not print the cards in a way that I want them to be printed. That is why it is a modified article class. I have recently tried a set this up with beamer and it gives me the same problem but it is easier to configure the font size with beamer.

I added float package but I wasn't sure how to implement it in order to solve this problem and the texdoc for float is like another language altogether. It is stopping me from being able to print long questions so very limiting. Any suggestions would be welcome.

documentclass{article}
\usepackage[paperwidth=.47\paperwidth,paperheight=.25\paperheight]{geometry}
\usepackage{pgfpages}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amsmath}
\pagestyle{empty}
\thispagestyle{empty}

\pgfpagesuselayout{8 on 1}[a4paper]
\makeatletter
\@tempcnta=1\relax
\loop\ifnum\@tempcnta<9\relax
\pgf@pset{\the\@tempcnta}{bordercode}{\pgfusepath{stroke}}

\repeat
\makeatother

\newenvironment{flashcard}[2][]{%
\noindent   \textsc{#1}
\vfill
\centerline{{\noindent  \Large{#2}}}
\vfill
\newpage
\noindent
}
{\newpage}

\begin{document}

\begin{flashcard}[Statistical Mechanics]{What is the equilibrium entropy of an isolated system of N constituents with energy E? }
What is the equilibrium entropy of an isolated system of N constituents with energy E?
\vspace*{\stretch{1}}
$$S(N, E) = k ln \Omega(N, E, {\alpha*})$$
\vspace*{\stretch{1}}

\end{flashcard}

\end{document}


Here is what the problem looks like:

-
\centerline makes an unsplittable box. –  egreg Mar 24 '13 at 12:28
I also tried doing my own cards a while ago and wrote this package github.com/kellertuer/Kartei - maybe it might fit your needs, though the manual is still only available in german, i hadn't had the time to translate it. –  Ronny Mar 24 '13 at 12:45

You're using \centerline which makes a box that can't be broken across lines.

\documentclass{article}
\usepackage[a4paper,
paperwidth=.47\paperwidth,
paperheight=.25\paperheight
]{geometry}
\usepackage{pgfpages}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amsmath}
\pagestyle{empty}

\pgfpagesuselayout{8 on 1}[a4paper]
\makeatletter
\@tempcnta=1\relax
\loop\ifnum\@tempcnta<9\relax
\pgf@pset{\the\@tempcnta}{bordercode}{\pgfusepath{stroke}}

\repeat
\makeatother

\newenvironment{flashcard}[2][]
{\noindent\textsc{#1}\par\vfill
{\centering\Large#2\par}
\vfill
\newpage\noindent\ignorespaces
}
{\newpage}

\begin{document}

\begin{flashcard}[Statistical Mechanics]
{What is the equilibrium entropy of an isolated system of
$N$~constituents with energy~$E$?}
What is the equilibrium entropy of an isolated system of
$N$~constituents with energy~$E$?
\vfill
$S(N, E) = k \ln \Omega(N, E, {\alpha*})$
\vfill
\end{flashcard}

\end{document}


-