Page Layout ⇒ Headings
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
welcome to the forum!
With a KOMA-Script class, you can use the
twoside=semi
option, then you have margins like with oneside
while still having \leftmark
and \rightmark
. If you use the ("old") base classes, you may consider switching to a KOMA-Script class because they are enormously flexible.Code: Select all
\documentclass[twoside=semi]{scrreprt}
\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\clearscrheadfoot
\lehead{\leftmark}
\rehead{\rightmark}
\lohead{\leftmark}
\rohead{\rightmark}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}
Headings
If you have an idea maybe to solve this problem

Thanks,
Isak Y.
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
Headings
Thank you a lot Mister, I have a last question on my book, I've parts, chapters and in my headings I have on the left "Part [with the number of this part]" thanks to \thepart and on the right "Chapter [Number] [Title]" thanks to \leftmark.
And I'd like to have also The Title of the part right after the number of this part on the left but I haven't find the command to have so.
Thanks,
Isak Y.
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
\part
command to store the title in a macro, such as:Code: Select all
\let\Oldpart\part
\newcommand{\parttitle}{}
\renewcommand{part}[1]{\Oldpart{#1}\renewcommand{\parttitle}{#1}}
Stefan
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
Then take it out; you can use \newcommand and \renewcommand to set a part title macro yourself manually at the beginning of each part: I guess that's just a few parts, so no big deal.
Stefan
Headings
Also, I have another question, on each page instead of having the number of the page I want to have - [number page] - with the two "-" on each side of the number, the problem is that when I write :
\fancyfoot[C]{ $-$ \thepage $-$}
It works only on the not starting-chapter-pages and on the others it's "normal" so without the two "-".
Thank you for your time,
Isak Y.
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Headings

The page style at the beginning of a chapter is called
plain
, it's different since headers above a chapter title are usually different from text page headers in books. You can modify this, see the section Redefining page style plain in the 
Stefan