146

Possible Duplicate:
\pagebreak vs \newpage

In LyX/LaTeX, What is the difference between "Page Break" and "New Page"?

They both seem to do the same to me.

marked as duplicate by Caramdir, Hendrik Vogt, lockstep, Stefan Kottwitz Jan 28 '11 at 19:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Jan 28 '11 at 13:13

This question came from our site for professional and enthusiast programmers.

  • 2
    Should this be marked as a duplicate of tex.stackexchange.com/questions/736/pagebreak-vs-newpage or the other way round (the accepted answer of the other question references this question)? – Caramdir Jan 28 '11 at 16:31
  • 1
    @Caramdir: I guess the accepted answer in that other question has to be updated anyway since it talks about an SO question, which is no longer true. My personal view is somehow that after an appropriate update of the other question, this one could be the duplicate. – Hendrik Vogt Jan 28 '11 at 16:35
215

If you use \newpage, the page will be directly "cut off" and a new one will begin. The text/paragraphs on the page will not be affected in any way. If you do this, you might have a lot of empty space on that page.

With \pagebreak, the paragraphs on the cut page will spread out over the page, so you will not have empty space at the bottom. The old page will not look like it is the end of a chapter.

Here is an example of the results of a \pagebreak and a \newpage (the pictures show the page on which the command was written):

  • On XeLaTeX both yield the same result for me, like \newpage in this answer. I'm continuing with multicols*{2} though. – robsn Jun 6 at 8:38
26

They are similar, though they have a difference:

\newpage 

Forces the current page to end and starts a new one. This will pad the page with extra space at the end of the page.

\pagebreak [number]

Breaks the current page at the point it is located. Using the optional number argument changes this from a demand to a request with priority in a scale from 0 (low priority) to 4 (high priority). This will not put extra space at the bottom of the page.

See https://web.archive.org/web/20131716503200/http://help-csli.stanford.edu/tex/latex-pagebreaks.shtml for info on page breaking commands.

0

I don't use LaTeX, but looking at the docs, it seems \newpage always starts a new page - the content for the current page ends there, whereas \pagebreak is a request for content to start on a new page, but the request may not be honoured in some situations. The \pagebreak command takes a number from 0-4 as a measure of your insistence that a new page should be started.

  • 1
    So why would I even use pagebreak? – Amir Rachum May 29 '10 at 16:25
  • 1
    No idea. You asked for the difference and that's what I gave you. :) – mdma May 29 '10 at 17:00
  • ablaeul's answer is much better - it explains the actual difference. – mdma May 29 '10 at 17:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.