Page Layout ⇒ Headings
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
Hi Isak,
welcome to the forum!
With a KOMA-Script class, you can use the
Stefan
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}
LaTeX.org admin
Headings
Thank you for your answer. But the thing is that I started using "oneside" to not have the white pages before the next chapters (because i think it starts the chapters on odd pages ...) and with twoside=semi i still have this issue..
If you have an idea maybe to solve this problem
Thanks,
Isak Y.
If you have an idea maybe to solve this problem

Thanks,
Isak Y.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
LaTeX.org admin
Headings
Let's goooo, finally.. I've been chating with a lot of users and nobody found a solution...
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.
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: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
You can redefine the
(Source)
Stefan
\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
LaTeX.org admin
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
That doesn't seem to work together with hyperref.
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
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
LaTeX.org admin
Headings
Sorry I'm a beginner, so what should I write in each part to have it "manually" when I write \part{Algebra} for example what should I write next ?
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.
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: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Headings
Without seeing your code, it's hard to say why the original part suggestion is not working there, or how to make it work. Perhaps if you post a copy of your code (full preamble, dummy text, showing the problem) see that link:
minimal working example.
The page style at the beginning of a chapter is called
fancyhdr manual.
Stefan

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
LaTeX.org admin