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.

On the last page of my document, I need to add Next Review Date: blah blah. If I add the text at the bottom of the document, there is a possibility that the text might appear on a new page on its own. Ideally, I need something like \fancyfoot[L]{Next Review Date: blah blah}, which only appears on the last page. I wonder how this can be done.

share|improve this question
    
Do you want all the page style plus this footer? Or only this footer on the last page? –  Sigur Jan 19 '13 at 16:02
    
I have already used \fancyfoot[R]{\thepage} on all pages. I have not used \fancyfoot[L] in my document. I would like \fancyfoot[L] to appear on the last page only. –  Reza Jan 19 '13 at 16:08
add comment

1 Answer

up vote 2 down vote accepted

Lets define a new page style to be loaded only on the last page.

\makeatletter
\def\myrev{Next Review Date:}
\def\ps@lastpage{%
  \let\@oddhead\@empty\let\@evenhead\@empty%
  \def\@oddfoot{{\slshape\myrev}\hfil\thepage}%
  \def\@evenfoot{{\slshape\myrev}\hfil\thepage}%
  }
\makeatother

\begin{document}
here is the last page
\thispagestyle{lastpage}
\end{document}

Only the page with the command \thispagestyle{lastpage} will have the same footer, independently if it is even or odd.

share|improve this answer
    
This overwrites \fancyfoot[R]{\thepage} –  Reza Jan 19 '13 at 16:14
    
@Reza, I've just edited. Please, check. –  Sigur Jan 19 '13 at 16:15
1  
@Reza, since you want on the last page only your remark and the page number, you should define the headers empty for this page style using \let\@oddhead\@empty\let\@evenhead\@empty, otherwise some other page style could duplicate the page number. I'll edit. –  Sigur Jan 19 '13 at 16:24
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.