2

Right now, I am using the following fancy headers as required by my school's department policy. However, when I look at the footer, it has a number for each page in the middle of my footer label. I want to move the page number to the bottom right or completely remove it from the bottom middle of the footer. I added the page number to the top right, which I like, but it still remains in the bottom middle as well. I followed the steps on this page: Position of page numbers

but it only removes my current header/footer information, which is not helpful. I only want to remove the page lettering in the bottom middle of the page. Here is the code I'm using currently for my fancy header/footer.

This part is in the package inclusion area:

\usepackage{fancyhdr} %%For headers/footers
\pagestyle{fancy} %%For fancy headers

This part is in the document:

\fancyhead[L]{M 414 - DETERMINISTIC MODELS } %%Header
\rhead{Lecture Notes}
\fancyfoot[L]{NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer
\rhead{}
\renewcommand{\footrulewidth}{1pt}

%Fix headers on Table of Contents and List of Figures:
\fancypagestyle{plain}{
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{M 414 - DETERMINISTIC MODELS} %%Header
\fancyhead[R]{Lecture Notes}
\fancyfoot[L]{NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer
\rhead{}
\renewcommand{\footrulewidth}{1pt}
}

\rhead{\thepage}
2

I'm not sure to understand exactly what you are trying to achieve.

Probably this code is what you want:

\documentclass{book}
\usepackage{fancyhdr} %%For headers/footers

\usepackage{blindtext} % only for the example


\fancyhf{}
\fancyhead[L]{M 414 - DETERMINISTIC MODELS} %%Header
\fancyhead[R]{\thepage}
\fancyfoot[L]{NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer
\renewcommand{\footrulewidth}{1pt}

\pagestyle{fancy} %%For fancy headers


%Fix headers on Table of Contents and List of Figures:
\fancypagestyle{plain}{}

\begin{document}

\Blinddocument

\end{document}

Output:

enter image description here

In the code, \fancyhf{} clears the contents of both header and footer, so that with the lines

\fancyhead[L]{M 414 - DETERMINISTIC MODELS} %%Header
\fancyhead[R]{\thepage}
\fancyfoot[L]{NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer

you can add what you want at specific places.

The line

\fancypagestyle{plain}{}

is to make plain pages have the same headers and footers as fancy ones.

  • Your code works perfectly. I was able to narrow it down even further. I kept everything in my code EXACTLY how it was and commented out parts of your code until I found the one piece that made it work. The key is this: \fancyhf{} Which needs to precede \begin{document} Originally, my code had that \fancyhf{} tag, but it followed my \begin{document} tag, so it didn't work correctly. Everything works perfectly now. – Blairg23 Feb 6 '14 at 8:22
  • @Blairg23 Happy to help. – karlkoeller Feb 6 '14 at 8:23
  • Can you vote up my question/answer if you haven't already? I am just shy of being able to upvote other peoples' answers. – Blairg23 Feb 8 '14 at 21:27
  • @Blairg23 I've upvoted both your question and your answer. Now, if you want, you can upvote mine. :-) – karlkoeller Feb 9 '14 at 0:13
1

karlkoeller had the correct idea.

I was able to narrow it down even further. I kept everything in my code EXACTLY how it was and commented out parts of your code until I found the one piece that made it work.

The key is this:

\fancyhf{} 

Which needs to precede

\begin{document} 

Originally, my code had that

\fancyhf{} 

tag, but it followed my

\begin{document} 

tag, so it didn't work correctly. Everything works perfectly now with the simple addition of the

\fancyhf{}
0

This works:

    \pagestyle{fancy}{%
    \fancyhf{}%
    \lhead{M 414 - DETERMINISTIC MODELS} %%Header
    \rhead{Lecture Notes\quad\thepage}%
    \cfoot{\small NAME INFO - UNIVERSITY OF MONTUCKY: MATH DEPARTMENT} %Footer
    \renewcommand{\footrulewidth}{1pt}%
     }%
  • Doesn't seem to work with \fancyfoot . I kind of like the line separating the paper from the footer. Is there a way to do that or is \cfoot the only resolution? – Blairg23 Feb 5 '14 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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