[texhax] LaTeX marks

James Smith james.smith at aleph-one.com
Sun Oct 7 22:57:07 CEST 2007

Hi all,

I thought I should give a more concrete example of the problems I'm
having, so... 

I want to show the text `PREFACE' and the page number in the header on
the preface pages. I've tried this:




I have loads of questions here:

* Why does it also work (I use the term losely) when I move the
\markboth inside the braces associated with \chapter?

* How do I echo the name of the chapter in the first argument of
\markboth, rather than `hardcoding' it?

* Of course using the \thepage command just results in the number 1
being shown on each page...

I understand that \leftmark and \rightmark merely echo the values of the
two arguments of \markboth here, but I'm unsure how to use \markboth

The fancyhdr documentation suggests renewing the \sectionmark command to
set the \markboth command everytime the former is called, from \leftmark
or \rightmark, I understand, but I don't know the relationshiop between
these commands, so I can't make progress.

I hope this more concrete example makes it easier to offer assisstance.

Kind regards,


More information about the texhax mailing list