* [PATCH] docs: pdfdocs: Adjust \headheight for fancyhdr
@ 2021-10-11 2:05 Akira Yokosawa
2021-10-12 20:09 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Akira Yokosawa @ 2021-10-11 2:05 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, linux-kernel
Fancyhdr prior to v4.0 outputs a message per document as follows:
Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 13.59999pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.
Fancyhdr v4.0 complains (once a page!) as follows:
Package fancyhdr Warning: \headheight is too small (12.0pt):
(fancyhdr) Make it at least 13.59999pt, for example:
(fancyhdr) \setlength{\headheight}{13.59999pt}.
(fancyhdr) You might also make \topmargin smaller to compensate:
(fancyhdr) \addtolength{\topmargin}{-1.59999pt}.
Related item in fancyhdr v4.0 announcement on 2021-01-04 [1]:
Backward incompatible changes:
- Eliminate adjustments of \headheight or \footskip, when the
header or footer is too high.
[1]: https://www.ctan.org/ctan-ann/id/mailman.2685.1609863692.2532.ctan-ann@ctan.org
Silence the warnings by adding a couple of \addtolength commands in
the preamble.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
Hi,
This update doesn't have much visual effects in the final PDFs
(adjustment of only 1.6pt), but getting rid of harmless warnings
would help spot potential important ones.
Tested against Sphinx versions 2.4.4 and 4.2.0, with Tex Live
versions 2017/debian (Ubuntu 18.04), 2019/debian (Ubuntu 20.04),
and vanilla 2021 (as of 2021-10-08).
Thanks, Akira
--
Documentation/conf.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 948a97d6387d..17f7cee56987 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -353,6 +353,9 @@ latex_elements = {
\\setsansfont{DejaVu Sans}
\\setromanfont{DejaVu Serif}
\\setmonofont{DejaVu Sans Mono}
+ % Adjust \\headheight for fancyhdr
+ \\addtolength{\\headheight}{1.6pt}
+ \\addtolength{\\topmargin}{-1.6pt}
''',
}
base-commit: 7275423c177e5dcf53e350ab9db38f99946b8ec5
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs: pdfdocs: Adjust \headheight for fancyhdr
2021-10-11 2:05 [PATCH] docs: pdfdocs: Adjust \headheight for fancyhdr Akira Yokosawa
@ 2021-10-12 20:09 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2021-10-12 20:09 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: linux-doc, linux-kernel
Akira Yokosawa <akiyks@gmail.com> writes:
> Fancyhdr prior to v4.0 outputs a message per document as follows:
>
> Package Fancyhdr Warning: \headheight is too small (12.0pt):
> Make it at least 13.59999pt.
> We now make it that large for the rest of the document.
> This may cause the page layout to be inconsistent, however.
>
> Fancyhdr v4.0 complains (once a page!) as follows:
>
> Package fancyhdr Warning: \headheight is too small (12.0pt):
> (fancyhdr) Make it at least 13.59999pt, for example:
> (fancyhdr) \setlength{\headheight}{13.59999pt}.
> (fancyhdr) You might also make \topmargin smaller to compensate:
>
> (fancyhdr) \addtolength{\topmargin}{-1.59999pt}.
>
> Related item in fancyhdr v4.0 announcement on 2021-01-04 [1]:
>
> Backward incompatible changes:
> - Eliminate adjustments of \headheight or \footskip, when the
> header or footer is too high.
>
> [1]: https://www.ctan.org/ctan-ann/id/mailman.2685.1609863692.2532.ctan-ann@ctan.org
>
> Silence the warnings by adding a couple of \addtolength commands in
> the preamble.
>
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> ---
> Hi,
>
> This update doesn't have much visual effects in the final PDFs
> (adjustment of only 1.6pt), but getting rid of harmless warnings
> would help spot potential important ones.
>
> Tested against Sphinx versions 2.4.4 and 4.2.0, with Tex Live
> versions 2017/debian (Ubuntu 18.04), 2019/debian (Ubuntu 20.04),
> and vanilla 2021 (as of 2021-10-08).
>
> Thanks, Akira
> --
> Documentation/conf.py | 3 +++
> 1 file changed, 3 insertions(+)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-12 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-11 2:05 [PATCH] docs: pdfdocs: Adjust \headheight for fancyhdr Akira Yokosawa
2021-10-12 20:09 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).