Linked Questions

43 votes
2 answers
98k views

How make sure two elements stay on the same page? [duplicate]

I am writing a very simple how-to document with several screenshots. The document flow goes something like this: A few sentences explaining action 1 \begin{center} \includegraphics{...
Phil's user avatar
  • 531
4 votes
1 answer
19k views

Force a block of text to be impervious to page breaks [duplicate]

Possible Duplicate: Unbreakable block I have a block of text (possibly comprising many paragraphs) near the end of a page. The page break is being inserted in the middle of this block--how do I ...
jamaicanworm's user avatar
  • 28.8k
7 votes
1 answer
14k views

How to avoid page breaking of a section [duplicate]

Possible Duplicate: Unbreakable block I'm writing my resumee in LaTeX and I would like to avoid page breaking in small chunks of text (namely, I detail the different tasks I performed in each ...
Lacrymology's user avatar
2 votes
1 answer
22k views

How to force the text to enter into a single page [duplicate]

Possible Duplicate: Unbreakable block Does it exist a command to force the text to make it enter into a single page? I have a bullet list and for only one item it goes to the next page.
Mazzy's user avatar
  • 7,622
6 votes
1 answer
7k views

How do I prevent pagebreak in some piece of text? [duplicate]

Possible Duplicate: Unbreakable block I have quite small article section like: \subsubsection Some title some text about figure: \begin{figure}[h] \centering \includegraphics[width=0.5\...
Qrilka's user avatar
  • 205
4 votes
1 answer
11k views

Keep text together without page break [duplicate]

Possible Duplicate: Unbreakable block Hello I am trying to print this poem together on a single page except it keeps getting broken in the middle. Is there a way for me to group it together? I ...
Michael Brittlebank's user avatar
0 votes
0 answers
113 views

How can I keep an environment all on one page? [duplicate]

In other words, how can I forbid pagination between \myenv and \endmyenv? I thought at first to make the whole thing a box; if I'm not mistaken---this would prevent TeX from breaking it up---but I ...
Sean Allred's user avatar
  • 27.3k
1 vote
0 answers
47 views

How to hold all lines in a defined environment? [duplicate]

\def\Grammercaption{\textbf{Grammer}} \def\grammer{\bgroup\ignorespaces\Grammercaption\fontsize{10}{13pt}\selectfont} \def\grammer{\egroup} I want all lines of text within this environment stick ...
Ramaprakasha's user avatar
0 votes
0 answers
20 views

All-or-nothing placing of macro-generated text [duplicate]

Given a macro % bold task titles \newcommand{\mypar}[1]{{\bf #1:}} %task decription template \newcommand{\task}[3]{ \mypar{#1} #2 \\ \emph{Solution:} #3\\ } I should like for the text ...
User1291's user avatar
  • 545
41 votes
4 answers
33k views

How to prevent lstlisting from splitting code between pages?

Is it possible to prevent lstlisting from splitting a code between pages if it does not fit on one page? Instead splitting I would like to have the code on the next page. I tried to put all ...
czuk's user avatar
  • 563
12 votes
2 answers
8k views

Avoid page break in theorem

I have a theorem which is half of it on another page, as I do for you automatically (without \newpage) get full theorem on the next page? \documentclass[a4paper]{book} \usepackage[utf8]{inputenc} \...
Regis Santos's user avatar
  • 14.3k
11 votes
2 answers
26k views

Forcing a Document into a Single page

I've been using TeX for a while, so when I suggested my company compile its daily newsletter using LaTex, rather than an hour and a half of someone's time, I got tasked with actual implementation. I'...
FrankieTheKneeMan's user avatar
18 votes
2 answers
4k views

How to make a list of unbreakable items?

In continuation of this question, I tried to make a list of items each consisting of unbreakable text. This can be done manually using minipage: \documentclass[10pt,a4paper]{article} \usepackage{...
Yossi Farjoun's user avatar
9 votes
2 answers
3k views

How to prevent page breaks in lists? ("Exam" class)

I'm using the exam class to prepare a test. Unfortunately, the package allows page breaks inside the solution list of a question. Considering this toy example: \question Example of question. Choose a ...
Jir's user avatar
  • 265
6 votes
4 answers
13k views

Samepage in itemize

using itemize as in \begin{itemize} \item[1] First item \item[2] Second item \end{itemize} Second item gets split between two pages and I don't want that. I tried to use \begin{samepage} as in \...
user113589's user avatar

15 30 50 per page