Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
3_composition:texte:pages:empecher_un_saut_de_page_entre_deux_lignes [2018/05/24 17:11] joseph.wright |
3_composition:texte:pages:empecher_un_saut_de_page_entre_deux_lignes [2018/10/20 21:08] jejust |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
--- | --- | ||
- | section: Adjusting the typesetting | + | title: Preventing page breaks between lines |
- | subsection: Page layout | + | category: formatting |
- | permalink: / | + | tags: layout |
- | date: 2014-06-10 | + | permalink: / |
--- | --- | ||
- | |||
- | # Preventing page breaks between lines | ||
One commonly requires that a block of typeset material be kept on the | One commonly requires that a block of typeset material be kept on the | ||
Ligne 13: | Ligne 11: | ||
LaTeX provides a `samepage` environment which claims it | LaTeX provides a `samepage` environment which claims it | ||
does this sort of thing for you. It proceeds by setting infinite | does this sort of thing for you. It proceeds by setting infinite | ||
- | penalties for all sorts of page-break situations; but in many | + | penalties for all sorts of page break situations; but in many |
situations where you want to prevent a page break, | situations where you want to prevent a page break, | ||
`samepage` doesn' | `samepage` doesn' | ||
text together, you need to end the paragraph inside the environment | text together, you need to end the paragraph inside the environment | ||
- | (see [preserving paragraph parameters](FAQ-paraparam.md)). | + | (see [preserving paragraph parameters](FAQ-paraparam)). |
Also, if the things you are trying to keep together insert their own | Also, if the things you are trying to keep together insert their own | ||
- | pagebreak | + | page break hints, `samepage` has no power over them (though |
list items' attempts& | list items' attempts& | ||
are subverted by `samepage`). | are subverted by `samepage`). | ||
Ligne 34: | Ligne 32: | ||
Why do neither of these obvious things work?& | Why do neither of these obvious things work?& | ||
really distinguish between infinitely awful things. | really distinguish between infinitely awful things. | ||
- | `Samepage` will make any possible break point '' | + | `Samepage` will make any possible break point |
- | bad'' | + | " |
alternative is the leave an infinitely bad few centimetres of blank | alternative is the leave an infinitely bad few centimetres of blank | ||
paper at the bottom of the page, TeX will take the line of least | paper at the bottom of the page, TeX will take the line of least | ||
Ligne 78: | Ligne 76: | ||
effect is achieved. | effect is achieved. | ||
sequences of LaTeX-style sections, by incorporating `\filbreak` | sequences of LaTeX-style sections, by incorporating `\filbreak` | ||
- | into the definition of a command (as in | + | into the definition of a command (as in |
- | [patching commands](FAQ-patch.md)). A simple and effective | + | [patching commands](FAQ-patch)). |
patch would be: | patch would be: | ||
<!-- {% raw %} --> | <!-- {% raw %} --> | ||
Ligne 115: | Ligne 113: | ||
Note that both `\pagebreak` and `\nopagebreak` take an optional | Note that both `\pagebreak` and `\nopagebreak` take an optional | ||
number argument to adjust how the command is to be interpreted. | number argument to adjust how the command is to be interpreted. | ||
- | `\pagebreak[0]`, | + | `\pagebreak[0]`, |
- | might be worth doing, whereas `\pagebreak[4]` | + | might be worth doing, whereas `\pagebreak[4]` |
page break. | page break. | ||
while `\nopagebreak[4]` is a demand. | while `\nopagebreak[4]` is a demand. | ||
default value of the optional argument is 4. | default value of the optional argument is 4. | ||
- | |||