Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using fancyhdr to hide header and footer in some pages but I also want to write custom footers for certain pages. Is there an easy way to do it?

Or is there any way to put define text in the center of footer?

I am using XeTeX.

share|improve this question
Welcome to TeX.sx! Can you describe your wishes more precisely, e.g. via a minimal working example (MWE). There are at least two ways to do this: (1) change pagestyle for the given page or (2) use the mark mechanisms described in the fancyhdr documentation. Which is more appropriate depends on how the changes in the footer are to be triggered. –  Andrew Swann Jan 28 '13 at 11:42

1 Answer 1

up vote 3 down vote accepted

There is a standard way to do so in fancyhdr, however, I added something like "copy {fancy} style into {footmark} style" so that you don't have to change everything:

% new style {footmark}
  \ps@@fancy % use {fancy} style as a base of {footmark}
% sets value of \footmark and sets the correct style for this page only

And in the document, in a text that is on the page, you say:

\markfoot{This is foot text.}

This should print This is foot text. centered in the footer of the current page.

share|improve this answer
@user25118 that's a non-sense. Then you want probably something completely different and you ought to specify the question. –  tohecz Jan 28 '13 at 12:40
the problem in this solution that I need to define tens of new styles in preamble to accommodate my needs. I want something like \thispagestyle command. It may be called \thisfancyfoot command. –  Fahad Al-Saidi Jan 28 '13 at 12:41
Now, there's the \footmark command that prints its argument in footer and on current page only. –  tohecz Jan 28 '13 at 14:04
Thank you very much. This is what I want. –  Fahad Al-Saidi Jan 28 '13 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.