3

I have to put two large lines between each page number, like this

screenshot

I am using MikTeX 2.9 and WinEDT and I am on Windows XP.

I have consulted the fancyhdr package documentation, but I couldn't find anything that can help me; or maybe I'm not clever enough.

1

enter image description here

\fancyfoot[C]{%
\rule[2pt]{3cm}{2pt}\quad
 \thepage\quad
\rule[2pt]{3cm}{2pt}}

\pagestyle{fancy}
  • Thank you David. But now I have another problem; the lines don't appear on every page. For example, on 6,7 they appear, on 8 no, 9, 10 yes, 11 no, 12-15 yes, 16 no. It's quite irregular. Can it be because it's a report with the option twoside? – Catalin Mar 14 '13 at 18:14
  • @Catalin -- is it possible that pages 8, 11 and 16 start a chapter, or some other subdivision that incorporates a distinct page style? (you don't mention what document class you're using, so this may not be relevant.) – barbara beeton Mar 14 '13 at 18:26
  • On a closer inspection of my document, I realize you are right; on the pages where the lines don't appear I began a new chapter. Also, after adding your code, I have headers on each page. I've tried using the option \fancyhf{} and \renewcommand{\headrulewidth}{0pt} to remove it, but then I lose the lines and the numbers. – Catalin Mar 14 '13 at 18:34
  • @Catalin your chapter pages will be using pagestyle plain or empty so you need to set up the style for those using fanyhdr you shouldn't lose the rule if you do \fancyhf{} before defining your own styles – David Carlisle Mar 14 '13 at 19:00
  • Thank you very much for your help. To get the fancy style to work on a chapter page, I had to redefine the plain style, because the first page of a chapter has this style. To remove the header, I simply used \fancyhead{} – Catalin Mar 14 '13 at 19:18

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