I changed the document from to "twopage". I would like at the header to appear the chapter name on the one page and the section name on the other (this is the default fancyhdr style I think). But the
\rightmarkis not recognized as section but as chapter, just like the
I tried to add a new command and use it insted of
But an error appears when the first subsesection appears.
Are there any ideas how to solve this problem?