TeX - LaTeX Asked by Stücke on February 20, 2021
If I have documentclass[twoside]{report}
and I change it to documentclass[oneside]{report}
, usepackage{fancyhdr}
automatically prints the left page header and footer. Is there a way to tell fancyhdr/LaTeX to apply the rightside header/footer if oneside
is used?
… maybe with an if … else statement?
I tried @ifclasswith{report}{oneside}{True}{False}
which yields You can't use spacefactor in vertical mode. @
.
I figured it out with help of this answer.
Add to the preabmle:
% Check if oneside or twoside
makeatletter
@ifclasswith{report}{oneside}{
TRUE
}{
FALSE
}
makeatother
... e.g.
% Check if oneside or twoside
makeatletter
@ifclasswith{report}{oneside}{
newcommand{ThesisTitle}{Thesis title text to insert ONESIDE}
}{
newcommand{ThesisTitle}{Thesis title text to insert TWOSIDE}
}
makeatother
Answered by Stücke on February 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP