Linked Questions

27
votes
2answers
60k views

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

Possible Duplicate: Unbreakable block 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{...
4
votes
1answer
16k 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 ...
5
votes
1answer
10k 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 ...
4
votes
1answer
4k 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\...
2
votes
1answer
9k 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 ...
1
vote
1answer
10k 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.
1
vote
0answers
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 ...
0
votes
0answers
34 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 ...
0
votes
0answers
17 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 ...
39
votes
4answers
28k 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 ...
7
votes
2answers
5k 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} \...
16
votes
2answers
3k 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{...
10
votes
1answer
15k 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'...
8
votes
2answers
2k 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 ...
7
votes
2answers
223 views

Macros that contain catcode 1 and 2

I would like to create a macro for keeping lines together. I have read unbreakable block and other posts like it. What I have found to work best is the simple use of \vbox; A MWE is below. \...

15 30 50 per page