Tuesday, July 23, 2013

LaTeX: Line and Page Breaking

LaTeX Line and Page Breaking


The first thing LaTeX does when processing ordinary text is to translate your input file into a string of glyphs and spaces. To produce a printed document, this string must be broken into lines, and these lines must be broken into pages. In some environments, you do the line breaking yourself with the \\ command, but LaTeX usually does it for you. The available commands are
  • \\ start a new paragraph.
  • \\* start a new line but not a new paragraph.
  • \- OK to hyphenate a word here.
  • \cleardoublepage flush all material and start a new page, start new odd numbered page.
  • \clearpage plush all material and start a new page.
  • \hyphenation enter a sequence pf exceptional hyphenations.
  • \linebreak allow to break the line here.
  • \newline request a new line.
  • \newpage request a new page.
  • \nolinebreak no line break should happen here.
  • \nopagebreak no page break should happen here.
  • \pagebreak encourage page break.

\\

 \\[*][extra-space]
The \\ command tells LaTeX to start a new line. It has an optional argument, extra-space, that specifies how much extra vertical space is to be inserted before the next line. This can be a negative amount.
The \\* command is the same as the ordinary \\ command except that it tells LaTeX not to start a new page after the line.

\-

The \- command tells LaTeX that it may hyphenate the word at that point. LaTeX is very good at hyphenating, and it will usually find all correct hyphenation points. The \- command is used for the exceptional cases, as e.g.
 man\-u\-script

\cleardoublepage

The \cleardoublepage command ends the current page and causes all figures and tables that have so far appeared in the input to be printed. In a two-sided printing style, it also makes the next page a right-hand (odd-numbered) page, producing a blank page if necessary.

\clearpage

The \clearpage command ends the current page and causes all figures and tables that have so far appeared in the input to be printed.

\hyphenation

 \hyphenation{words}
The \hyphenation command declares allowed hyphenation points, where words is a list of words, separated by spaces, in which each hyphenation point is indicated by a - character, e.g.
  \hyphenation{man-u-script man-u-stripts ap-pen-dix}

\linebreak

 \linebreak[number]
The \linebreak command tells LaTeX to break the current line at the point of the command. With the optional argument, number, you can convert the \linebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.
The \linebreak command causes LaTeX to stretch the line so it extends to the right margin.

\newline

The \newline command breaks the line right where it is. The \newline command can be used only in paragraph mode.

\newpage

The \newpage command ends the current page.

\nolinebreak

 \nolinebreak[number]
The \nolinebreak command prevents LaTeX from breaking the current line at the point of the command. With the optional argument, number, you can convert the \nolinebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

\nopagebreak

 \nopagebreak[number]
The \nopagebreak command prevents LaTeX form breaking the current page at the point of the command. With the optional argument, number, you can convert the \nopagebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

\pagebreak

 \pagebreak[number]
The \pagebreak command tells LaTeX to break the current page at the point of the command. With the optional argument, number, you can convert the \pagebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

Back to the main LaTeX page.

No comments:

Post a Comment