Skip to content

Commit 24db478

Browse files
committed
Missing footer on first page of each chapter in LaTeX
In the doxygen pdf manual we see that on the first page of each chapter the footer is missing, the same occurs in the "normal" documentation generated by doxygen. References: - https://tex.stackexchange.com/questions/566034/footer-ruler-on-first-page-in-fancyhdr-with-book - https://tex.stackexchange.com/questions/566056/footer-ruler-on-first-page-in-fancyhdr-with-book-but-not-in-part-part/ Code changes ("normal" documentation): - latexgen.cpp changes required for the "normal" documentation Code changes (doxygen manual) - doxygen_manual.sty, remove word "Part" for the Appendices. - manual.sty changes like for "normal" documentation plus patching part in case of the `\part` (here we don't want the footer or header)
1 parent b9067c6 commit 24db478

File tree

3 files changed

+41
-26
lines changed

3 files changed

+41
-26
lines changed

doc/doxygen_manual.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ \chapter{Internationalization}\label{langhowto}\hypertarget{langhowto}{}\input{l
171171
\chapter{Perl Module Output}\label{perlmod}\hypertarget{perlmod}{}\input{perlmod}
172172
\chapter{Doxygen's internals}\label{arch}\hypertarget{arch}{}\input{arch}
173173
\renewcommand{\thepart}{}
174+
\renewcommand{\partname}{}
174175
\part{Appendices}
175176
\appendix
176177
%mean that subinputfrom requires a / at the end of the path

doc/manual.sty

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
% Setup fancy headings
1010
\RequirePackage{fancyhdr}
11-
\pagestyle{fancyplain}
1211
\newcommand{\clearemptydoublepage}{%
1312
\newpage{\pagestyle{empty}\cleardoublepage}%
1413
}
@@ -18,18 +17,28 @@
1817
\renewcommand{\sectionmark}[1]{%
1918
\markright{\thesection\ #1}%
2019
}
21-
\fancyhead[LE]{\fancyplain{}{\bfseries\thepage}}
22-
\fancyhead[CE]{\fancyplain{}{}}
23-
\fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}}
24-
\fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}}
25-
\fancyhead[CO]{\fancyplain{}{}}
26-
\fancyhead[RO]{\fancyplain{}{\bfseries\thepage}}
27-
\fancyfoot[LE]{\fancyplain{}{}}
28-
\fancyfoot[CE]{\fancyplain{}{}}
29-
\fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen @VERSION@ }}
30-
\fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated by Doxygen @VERSION@ }}
31-
\fancyfoot[CO]{\fancyplain{}{}}
32-
\fancyfoot[RO]{\fancyplain{}{}}
20+
21+
% Headers & footers
22+
\pagestyle{fancyplain}
23+
\renewcommand{\footrulewidth}{0.4pt}
24+
%
25+
\fancypagestyle{fancyplain}{
26+
\fancyhf{}
27+
\fancyhead[LE, RO]{\bfseries\thepage}
28+
\fancyhead[LO]{\bfseries\rightmark}
29+
\fancyhead[RE]{\bfseries\leftmark}
30+
\fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen @VERSION@ }
31+
}
32+
%
33+
\fancypagestyle{plain}{
34+
\fancyhf{}
35+
\fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen @VERSION@ }
36+
\renewcommand{\headrulewidth}{0pt}}
37+
%
38+
\pagestyle{fancyplain}
39+
%
40+
\usepackage{xpatch}
41+
\xpatchcmd{\part}{plain}{empty}{}{}
3342

3443
% Define caption that is also suitable in a table
3544
\makeatletter

src/latexgen.cpp

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -666,19 +666,24 @@ static void writeDefaultHeaderPart1(FTextStream &t)
666666
t << "% Headers & footers\n"
667667
"\\usepackage{fancyhdr}\n"
668668
"\\pagestyle{fancyplain}\n"
669-
"\\fancyhead[LE]{\\fancyplain{}{\\bfseries\\thepage}}\n"
670-
"\\fancyhead[CE]{\\fancyplain{}{}}\n"
671-
"\\fancyhead[RE]{\\fancyplain{}{\\bfseries\\leftmark}}\n"
672-
"\\fancyhead[LO]{\\fancyplain{}{\\bfseries\\rightmark}}\n"
673-
"\\fancyhead[CO]{\\fancyplain{}{}}\n"
674-
"\\fancyhead[RO]{\\fancyplain{}{\\bfseries\\thepage}}\n"
675-
"\\fancyfoot[LE]{\\fancyplain{}{}}\n"
676-
"\\fancyfoot[CE]{\\fancyplain{}{}}\n"
677-
"\\fancyfoot[RE]{\\fancyplain{}{\\bfseries\\scriptsize " << genString << " Doxygen }}\n"
678-
"\\fancyfoot[LO]{\\fancyplain{}{\\bfseries\\scriptsize " << genString << " Doxygen }}\n"
679-
"\\fancyfoot[CO]{\\fancyplain{}{}}\n"
680-
"\\fancyfoot[RO]{\\fancyplain{}{}}\n"
681-
"\\renewcommand{\\footrulewidth}{0.4pt}\n";
669+
"\\renewcommand{\\footrulewidth}{0.4pt}\n"
670+
"%\n"
671+
"\\fancypagestyle{fancyplain}{\n"
672+
"\\fancyhf{}\n"
673+
"\\fancyhead[LE, RO]{\\bfseries\\thepage}\n"
674+
"\\fancyhead[LO]{\\bfseries\\rightmark}\n"
675+
"\\fancyhead[RE]{\\bfseries\\leftmark}\n"
676+
"\\fancyfoot[LO, RE]{\\bfseries\\scriptsize " << genString << " Doxygen }\n"
677+
"}\n"
678+
"%\n"
679+
"\\fancypagestyle{plain}{\n"
680+
"\\fancyhf{}\n"
681+
"\\fancyfoot[LO, RE]{\\bfseries\\scriptsize " << genString << " Doxygen }\n"
682+
"\\renewcommand{\\headrulewidth}{0pt}}\n"
683+
"%\n"
684+
"\\pagestyle{fancyplain}\n"
685+
"%\n";
686+
682687
if (!Config_getBool(COMPACT_LATEX))
683688
{
684689
t << "\\renewcommand{\\chaptermark}[1]{%\n"

0 commit comments

Comments
 (0)