Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
composition:texte:paragraphes:un_seul_baselineskip_par_paragraphe [2018/05/25 19:35] – joseph.wright | 2_composition:texte:paragraphes:un_seul_baselineskip_par_paragraphe [2021/02/01 21:45] (Version actuelle) – Traduction de l'article anglais (en retranchant une partie inutile). yannick.tanguy | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | --- | + | ====== Comment contourner la limite d'un unique \baselineskip par paragraphe? ====== |
- | category: usage | + | |
- | permalink: / | + | |
- | date: 2014-06-10 | + | |
- | --- | + | |
- | # Only one `\baselineskip` per paragraph | + | La variable '' |
- | The `\baselineskip`, | + | <WRAP column 60ex> |
- | not (as one might hope) a property of a line, but of a paragraph. | + | <code latex> |
- | a result, in a `10pt` (nominal) document (with a default | + | Voici ce qu'il peut arriver dès lors qu' |
- | `\baselineskip` of `12pt`), a single character with a larger | + | typographe maladroit souhaite évoquer |
- | size, as: | + | l' |
- | ```latex | + | </ |
- | {\Huge A} | + | </ |
- | ``` | + | |
- | will be squashed into the paragraph: TeX will make sure it doesn' | + | <WRAP column 60ex> |
- | scrape up against the line above, but won't give it '' | + | < |
- | breathe' | + | \documentclass{article} |
- | (`24.88pt`) is taken account of, but its `\baselineskip` | + | \usepackage[width=9cm]{geometry} |
- | (`30pt`) isn't. This problem may be solved by a _strut_: | + | \pagestyle{empty} |
- | the name comes from movable metal typography, and refers to a spacer | + | \begin{document} |
- | that held the boxes (that contained the metal character shapes) apart. | + | Voici ce qu'il peut arriver dès lors qu'un |
- | Every time you change font size, LaTeX redefines the command | + | typographe maladroit souhaite évoquer |
- | `\strut` to provide the equivalent of a metal-type strut for the | + | l'histoire avec un grand {\Huge H} ! |
- | size chosen. So for the example above, we would type | + | \end{document} |
- | ```latex | + | </ |
- | Paragraph text ... | + | </ |
- | | + | <WRAP clear /> |
- | ... paragraph continues ... | + | |
- | ``` | + | ===== Avec la commande \strut ===== |
- | This technique _only_ works for such very short intrusions; if | + | |
- | you need several lines, you should convert your intrusion into a | + | < |
- | `quote` environment, | + | |
- | `\strut` command for every line of the intrusion, in a sensible | + | <WRAP column 60ex> |
- | way, so proceed by: | + | < |
- | ```latex | + | Voici ce qu'il peut arriver dès lors qu' |
- | \begin{quote} | + | typographe maladroit souhaite évoquer |
- | \Huge A LENGTHY TEXT ... | + | l' |
- | SHOUTING AT THE READER! | + | </ |
+ | </ | ||
+ | |||
+ | <WRAP column 60ex> | ||
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage[width=9cm]{geometry} | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | Voici ce qu'il peut arriver dès lors qu' | ||
+ | typographe maladroit souhaite évoquer | ||
+ | l' | ||
+ | \end{document} | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear /> | ||
+ | |||
+ | ===== Avec l' | ||
+ | |||
+ | Dès lors que votre texte de taille plus importante tient sur plusieurs lignes, les solutions passent plutôt par l' | ||
+ | |||
+ | <WRAP column 60ex> | ||
+ | < | ||
+ | Voici ce qu'il peut arriver dès lors qu'un | ||
+ | typographe maladroit souhaite | ||
+ | \begin{quote} | ||
+ | \Huge évoquer l' | ||
\end{quote} | \end{quote} | ||
- | ``` | + | </ |
+ | </ | ||
- | The contrary case: | + | <WRAP column 60ex> |
- | ```latex | + | < |
- | Paragraph text ... | + | \documentclass{article} |
- | {\footnotesize Extended interjection ... | + | \usepackage[width=9cm]{geometry} |
- | ... into the paragraph.} | + | \pagestyle{empty} |
- | ... paragraph continues ... | + | \begin{document} |
- | ``` | + | Voici ce qu'il peut arriver dès lors qu'un |
- | will look wrong, since the `8pt` interjection will | + | typographe maladroit souhaite |
- | end up set on the `12pt` `\baselineskip` of the paragraph, | + | \begin{quote} |
- | rather than its preferred `8.5pt`. | + | \Huge évoquer l' |
- | help: there is no such thing as a '' | + | |
- | together, so once more, one falls back on the `quote` to | + | |
- | separate the interjection: | + | |
- | ```latex | + | |
- | Paragraph text ... | + | |
- | \begin{quote} | + | |
- | \footnotesize Extended interjection ... | + | |
- | ... into the paragraph. | + | |
\end{quote} | \end{quote} | ||
- | ... paragraph continues ... | + | \end{document} |
- | ``` | + | </ |
+ | </ | ||
+ | <WRAP clear /> | ||
- | The same effect is at work when we have something like: | + | Le cas où le texte inséré est plus petit que le texte courant n'est pas plus heureux |
- | ```latex | + | |
- | Paragraph text ... | + | |
- | ... paragraph body ends. | + | |
- | {\footnotesize Comment on the paragraph.} | + | |
- | Next paragraph starts... | + | <WRAP column 60ex> |
- | ``` | + | < |
- | which will set the body of the first paragraph on the constricted | + | Voici ce qu'il peut arriver dès lors qu' |
- | `\baselineskip` of the `\footnotesize` comment. | + | typographe maladroit souhaite évoquer |
- | problem by ending the initial paragraph before starting the comment: | + | {\footnotesize timidement et sans grandes |
- | ```latex | + | fioritures l' |
- | Paragraph text ... | + | </ |
- | ... paragraph body ends. | + | </ |
- | \par\nothtml{\noindent} | + | |
- | {\footnotesize Comment on the paragraph.} | + | |
- | Next paragraph starts... | + | <WRAP column 60ex> |
- | ``` | + | < |
- | (We suggest `\noindent` to make the comment look as if it is part | + | \documentclass{article} |
- | of the paragraph it discusses; omit `\noindent` if that is inappropriate.) | + | \usepackage[width=9cm]{geometry} |
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | Voici ce qu'il peut arriver dès lors qu'un | ||
+ | typographe maladroit souhaite évoquer | ||
+ | {\footnotesize timidement et sans grandes | ||
+ | fioritures l' | ||
+ | \end{document} | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear /> | ||
- | A variation of the previous issue arises from a paragraph whose size | + | Là, la solution de la commande '' |
- | is different from those around it: | + | |
- | ```latex | + | <WRAP column 60ex> |
- | {\Large (Extended) IMPORTANT DETAILS ...} | + | < |
+ | Voici ce qu'il peut arriver dès lors qu'un | ||
+ | typographe maladroit souhaite évoquer | ||
+ | \begin{quote} | ||
+ | \footnotesize timidement et sans grandes | ||
+ | fioritures l' | ||
+ | \end{quote} | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP column 60ex> | ||
+ | < | ||
+ | \documentclass{article} | ||
+ | \usepackage[width=9cm]{geometry} | ||
+ | \pagestyle{empty} | ||
+ | \begin{document} | ||
+ | Voici ce qu'il peut arriver dès lors qu'un | ||
+ | typographe maladroit souhaite évoquer | ||
+ | \begin{quote} | ||
+ | \footnotesize timidement et sans grandes | ||
+ | fioritures l' | ||
+ | \end{quote} | ||
+ | \end{document} | ||
+ | </ | ||
+ | </ | ||
+ | <WRAP clear /> | ||
- | Main body of text... | + | ----- |
- | ``` | + | |
- | Again, the problem is solved by ending the paragraph in the same group | + | |
- | as the text with a different size: | + | |
- | ```latex | + | |
- | {\Large (Extended) IMPORTANT DETAILS ...\par} | + | |
- | Main body of text... | + | //Source:// [[faquk> |
- | ``` | + | |
+ | {{htmlmetatags> | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} | ||