summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-10-26 00:58:18 +0900
committerGitHub <noreply@github.com>2020-10-26 00:58:18 +0900
commitae2e48de151f5d024736a1c07806e02f3f918f5c (patch)
tree379b4eea153a13ee8807bc65f82ffb9e6e480939 /sphinx
parentad7c09ef10038c6147f373f1edf8db2c5e2160d1 (diff)
parent569c7b02de5fb80db033ee462ca2c2bb2b8ce2b9 (diff)
downloadsphinx-git-ae2e48de151f5d024736a1c07806e02f3f918f5c.tar.gz
Merge pull request #8216 from glikely/fix-oneside-latex
Fix 'oneside' latex build warnings
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/texinputs/sphinx.sty15
1 files changed, 9 insertions, 6 deletions
diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty
index 2b83ab85b..4b637a9ec 100644
--- a/sphinx/texinputs/sphinx.sty
+++ b/sphinx/texinputs/sphinx.sty
@@ -588,12 +588,14 @@
{% classes with \chapter command
\fancypagestyle{normal}{
\fancyhf{}
- % FIXME: this presupposes "twoside".
- % If "oneside" class option, there are warnings in LaTeX log.
- \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
+ \fancyfoot[RO]{{\py@HeaderFamily\thepage}}
\fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
- \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
- \fancyhead[LE,RO]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
+ \fancyhead[RO]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
+ \if@twoside
+ \fancyfoot[LE]{{\py@HeaderFamily\thepage}}
+ \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
+ \fancyhead[LE]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
+ \fi
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
% define chaptermark with \@chappos when \@chappos is available for Japanese
@@ -605,7 +607,8 @@
% page of a chapter `clean.'
\fancypagestyle{plain}{
\fancyhf{}
- \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
+ \fancyfoot[RO]{{\py@HeaderFamily\thepage}}
+ \if@twoside\fancyfoot[LE]{{\py@HeaderFamily\thepage}}\fi
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.4pt}
}