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.

Is there a way to place the same footer line on every page? Right now, I have a chapter called introduction and in my introduction.tex file I have specified a footer line that needs to be added. But the problem is, when the pdf file is being generated, the footer line I specified is only on the last page of the chapter. But I want it on every page in the chapter. Could someone please tell me how I can accomplish this?

share|improve this question
14  
Do you actually want a footnote (which usually elaborates on a superscripted reference in the main text), or a footer, which is usually a short piece of text that appears separate to the main text on each page? –  Richard Terrett Oct 3 '11 at 13:14
    
@RichardTerrett I apologize for my ignorance for not knowing the difference between a footnote and a footer. But in this case I was actually referring to a footer. –  Jay Oct 4 '11 at 5:56
2  
I've edited the title and body of the question, changing all instances of "footnote" to "footer line", to better reflect the subject of the query. –  Mico Oct 4 '11 at 11:04
add comment

1 Answer 1

up vote 11 down vote accepted

To get a footer line on every page of the document, one could use the fancyhdr package, maybe along the lines of the following minimum working example (MWE):

\documentclass[twoside]{article}
\usepackage{lipsum} % for filler text
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear all header fields
\renewcommand{\headrulewidth}{0pt} % no line in header area
\fancyfoot{} % clear all footer fields
\fancyfoot[LE,RO]{\thepage}           % page number in "outer" position of footer line
\fancyfoot[RE,LO]{Message of the day} % other info in "inner" position of footer line
\begin{document}
\lipsum[1-20] % generate about 4 pages of filler text
\end{document}

It's the "Message of the day" string that you'll want to change, for sure.

If the text in the footer line needs to be displayed in bold face and/or italics, you could do so by inserting the commands \bfseries and/or \itshape prior to the "Message of the day" string.

Addendum Two more points:

  1. To get a separate footer line for each chapter, you should omit the command \fancyfoot[RE,LO]{Message of the day} from the preamble and, instead, issue the command \fancyfoot[RE,LO]{Message for Chapter xx} immediately after the respective \chapter command.
  2. In the LaTeX book document class, the first page of a chapter uses the pagestyle "plain" (page number centered in footer line, no other header and/or footer information) even if the other pages follow a different pagestyle (such as "fancy"). If you want to display your chapter-specific footer lines on the first page of a chapter as well, you should issue the command \thispagestyle{fancy} after the respective \chapter command.
share|improve this answer
    
Thank you very much. Now the footer is exactly the way I want it to be. With the help of the pdf link, I managed to add a fancy header as well - ) –  Jay Oct 4 '11 at 6:41
add comment

Your Answer

 
discard

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.