Where to Put Page Breaks in a Set of Flashcards
At a glance
- 1. Finish the card
End the current flashcard environment before inserting a page-break command.
- 2. Choose the break
Use newpage for a new page; use clearpage when pending floats must be printed first.
- 3. Check the layout
If your class arranges several cards on one sheet, use its instructions for starting a new sheet.
LaTeX’s page-break commands act on the page layout, but a flashcard may be typeset as one indivisible box. That distinction determines where to put the command: normally, finish the card first, then break before the next one.
Use \newpage for a straightforward page break. Use \clearpage when you also need LaTeX to place pending figures or tables before continuing. If a class puts multiple cards on one sheet, a page break starts a new sheet, not merely the next card position; that class may provide a more suitable command.
What the three commands do
| Command | Effect | Typical use |
|---|---|---|
\newpage | Ends the current page and starts another, or ends the current column in two-column mode. It does not force pending floats to print first. | Start a new page between groups of cards. |
\pagebreak | Requests a break at that point. An optional strength from 0 to 4 controls how strongly LaTeX should prefer it; \pagebreak[4] forces the break. | Allow LaTeX some flexibility, or force a break at a chosen point. |
\clearpage | Ends the page and prints all pending floats before starting the next page. | Keep figures or tables from being carried past the break. |
In two-column documents, \newpage ends the current column, whereas \clearpage ends the page and flushes pending floats. For ordinary one-column flashcard documents, the main practical difference is whether queued floats need to be printed.
Put the break between cards
A flashcard class or custom command often puts each card inside a box, such as a minipage. A box is kept together, so a page-break command inside it cannot split the card across physical pages. The command may have no useful effect, or may affect the card’s internal material rather than the document page.
Instead, end one card and then issue the break before starting the next. For example, this complete LaTeX document models each card as a boxed unit:
\documentclass{article}
\usepackage[margin=1in]{geometry}
\newcommand{\card}[2]{%
\par\noindent
\fbox{%
\begin{minipage}{0.9\linewidth}
\textbf{#1}\par\medskip
#2
\end{minipage}%
}%
\par\medskip
}
\begin{document}
\card{Question}{What is the capital of France?}
\card{Answer}{Paris.}
\newpage
\card{Question}{What is the capital of Japan?}
\card{Answer}{Tokyo.}
\end{document}
Here, \newpage comes after the card commands, so it separates the two groups. The minipage makes each card’s contents a single box; putting \newpage inside the card would not split that box. This example uses standard LaTeX and is illustrative: if you use a dedicated flashcard class, keep its own card environment and follow its layout rules.
When to use clearpage
For cards that contain no floating figures or tables, \newpage is generally the simplest choice. If earlier text has queued floats that must appear before the next group of cards, use \clearpage between cards instead. Note that float environments often do not work inside a boxed card at all; use a non-floating image or table there if the class permits it.
Avoid placing \clearpage after every card unless you want every card to begin on a new page. It flushes all pending floats and ends the current page, which can leave large areas of unused space in a layout designed to fit several cards on a sheet.
Common mistakes
- Putting the command inside the card: A boxed card cannot be broken across pages. Move the command outside the card environment.
- Using
\clearpagewhen only a break is needed: This can force pending figures or tables out and disrupt the layout. Prefer\newpageif there are no floats to flush. - Expecting one page to equal one card: Some flashcard layouts place several cards on a printed sheet. A page break moves to a new sheet, so check the class documentation if you need to control card positions individually.
- Using
\pagebreakas if it were a card-layout command: It requests a page break in the surrounding document; it does not tell a flashcard class how to arrange cards on a sheet.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.