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 Dernière révision Les deux révisions suivantes | ||
3_composition:texte:pages:entetes:raccourcir_les_rappels_de_titres_en_haut_de_page2 [2018/05/22 21:42] joseph.wright |
3_composition:texte:pages:entetes:raccourcir_les_rappels_de_titres_en_haut_de_page2 [2018/12/04 00:49] jejust |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | # My section title is too wide for the page header | + | ====== My section title is too wide for the page header ====== |
By default, LaTeX sectioning commands make the chapter or section | By default, LaTeX sectioning commands make the chapter or section | ||
Ligne 6: | Ligne 7: | ||
be too big to fit: the LaTeX sectioning commands therefore take an | be too big to fit: the LaTeX sectioning commands therefore take an | ||
optional argument: | optional argument: | ||
- | ```latex | + | |
+ | <code latex> | ||
\section[short title]{full title} | \section[short title]{full title} | ||
- | ``` | + | </code> |
- | If the ‹_short title_› is present, it is used both for the table of | + | If the <//short title//> is present, it is used both for the table of |
contents and for the page heading. The usual answer to people who | contents and for the page heading. The usual answer to people who | ||
complain that their title is too big for the running head is to | complain that their title is too big for the running head is to | ||
Ligne 22: | Ligne 24: | ||
One of the problems is the tendency of page headings to be set in | One of the problems is the tendency of page headings to be set in | ||
capitals (which take up more space); so why not set headings as written | capitals (which take up more space); so why not set headings as written | ||
- | for ''ordinary'' reading? It's not possible to do so with unmodified | + | for "ordinary" reading? It's not possible to do so with unmodified |
- | LaTeX, but the [`fancyhdr`](http://ctan.org/pkg/fancyhdr) package provides a command | + | LaTeX, but the [[ctanpkg>fancyhdr|fancyhdr]] package provides a command |
- | `\nouppercase` for use in its header (and footer) lines to suppress | + | ''\nouppercase'' for use in its header (and footer) lines to suppress |
- | LaTeX's uppercasing tendencies. Classes in the [`KOMA-script`](http://ctan.org/pkg/KOMA-script) | + | LaTeX's uppercasing tendencies. Classes in the [[ctanpkg>KOMA-script|KOMA-script]] |
bundle don't uppercase in the first place. | bundle don't uppercase in the first place. | ||
- | In fact, the sectioning commands use 'mark' commands to pass | + | In fact, the sectioning commands use "mark" commands to pass |
- | information to the page headers. For example, `\chapter` uses | + | information to the page headers. For example, ''\chapter'' uses |
- | `\chaptermark`, `\section` uses `\sectionmark`, and so on. With | + | ''\chaptermark'', ''\section'' uses ''\sectionmark'', and so on. With |
this knowledge, one can achieve a three-layer structure for chapters: | this knowledge, one can achieve a three-layer structure for chapters: | ||
- | ```latex | + | |
+ | <code latex> | ||
\chapter[middling version]{verbose version} | \chapter[middling version]{verbose version} | ||
\chaptermark{terse version} | \chaptermark{terse version} | ||
- | ``` | + | </code> |
which should supply the needs of every taste. | which should supply the needs of every taste. | ||
Chapters, however, have it easy: hardly any book design puts a page | Chapters, however, have it easy: hardly any book design puts a page | ||
header on a chapter start page. In the case of sections, one has | header on a chapter start page. In the case of sections, one has | ||
- | typically to take account of the nature of the `\*mark` commands: | + | typically to take account of the nature of the ''\*mark'' commands: |
the thing that goes in the heading is the first mark on the page (or, | the thing that goes in the heading is the first mark on the page (or, | ||
failing any mark, the last mark on any previous page). As a result | failing any mark, the last mark on any previous page). As a result | ||
the recipe for sections is more tiresome: | the recipe for sections is more tiresome: | ||
- | <!-- {% raw %} --> | + | |
- | ```latex | + | |
+ | <code latex> | ||
\section[middling version]{verbose version% | \section[middling version]{verbose version% | ||
\sectionmark{terse version}} | \sectionmark{terse version}} | ||
\sectionmark{terse version} | \sectionmark{terse version} | ||
- | ``` | + | </code> |
- | <!-- {% endraw %} --> | + | |
- | (the first `\sectionmark` deals with the header of the page the | + | (the first ''\sectionmark'' deals with the header of the page the |
- | `\section` command falls on, and the second deal with subsequent | + | ''\section'' command falls on, and the second deal with subsequent |
- | pages; note that here, you need the optional argument to `\section`, | + | pages; note that here, you need the optional argument to ''\section'', |
- | even if ''_middling version_'' is in fact the same text as | + | even if "//middling version//" is in fact the same text as |
- | ''_long version''_.) | + | "//long version"//.) |
A similar arrangement is necessary even for chapters if the class | A similar arrangement is necessary even for chapters if the class | ||
Ligne 61: | Ligne 65: | ||
opening page. | opening page. | ||
- | Note that the [`titlesec`](http://ctan.org/pkg/titlesec) package manages the running heads in | + | Note that the [[ctanpkg>titlesec|titlesec]] package manages the running heads in |
a completely different fashion; for example, you can use the optional | a completely different fashion; for example, you can use the optional | ||
argument of sectioning commands for page headers, only, by loading the | argument of sectioning commands for page headers, only, by loading the | ||
package as: | package as: | ||
- | ```latex | + | |
+ | <code latex> | ||
\usepackage[toctitles]{titlesec} | \usepackage[toctitles]{titlesec} | ||
- | ``` | + | </code> |
The package documentation offers other useful techniques in this area. | The package documentation offers other useful techniques in this area. | ||
- | The [`memoir`](http://ctan.org/pkg/memoir) class avoids all the silliness by providing an | + | The [[ctanpkg>memoir|memoir]] class avoids all the silliness by providing an |
extra optional argument for chapter and sectioning commands, for | extra optional argument for chapter and sectioning commands, for | ||
example: | example: | ||
- | ```latex | + | |
+ | <code latex> | ||
\section[middling version][terse version]{verbose version} | \section[middling version][terse version]{verbose version} | ||
- | ``` | + | </code> |
- | As a result, it is always possible for users of [`memoir`](http://ctan.org/pkg/memoir) to | + | As a result, it is always possible for users of [[ctanpkg>memoir|memoir]] to |
tailor the header text to fit, with very little trouble. | tailor the header text to fit, with very little trouble. | ||
- | ---- | + | ----- |
+ | |||
+ | //Source:// [[faquk>FAQ-runheadtoobig|My section title is too wide for the page header]] | ||
- | Content last updated: 2014-06-10 | + | {{htmlmetatags>metatag-keywords=(LaTeX,formatting) |
+ | metatag-og:title=(My section title is too wide for the page header) | ||
+ | metatag-og:site_name=(FAQ LaTeX francophone) | ||
+ | }} | ||