I am writing an article in XeLaTeX and I want to put a note on the bottom of the last page (may be in footer). This is what I have done-

\newcommand\updateinfo{\hfill\scriptsize\color{gray} Last updated on \today}

The very long content goes here. The very long content goes here.
\updateinfo %Last updated on \today

However, this is not gonna work as I want, since it is not positioning the text on the bottom. Please have a look.

  • Please supply only working examples. This one is missing a \usepackage{xcolor}. – Pieter van Oostrum Nov 30 '16 at 10:32
  • @PietvanOostrum: Done. – Ravi Joshi Nov 30 '16 at 10:55

You need a \vfill to push the text to the bottom. Like

\newcommand{\updateinfo}[1][\today]{\par\vfill\hfill{\script‌​size\color{gray}Last updated on #1}}

And note that the date given will be the date that you run LaTeX on it, which isn't necessarily the date of the last update. You can thus add an optional argument to specify another date:


    \newcommand{\updateinfo}[1][\today]{\par\vfill\hfill{\scriptsize\color{gray}Last updated on #1}}

    Without argument
    With argument
    \updateinfo[November 24, 1991]

enter image description here

| improve this answer | |
  • Thanks a lot. I understand your concern. I am gonna make the date as an argument to this function, where the default is \today – Ravi Joshi Nov 30 '16 at 10:57
  • \newcommand{\updateinfo}[1][\today]{\par\vfill\hfill{\scriptsize\color{gray}Last updated on #1}} should be what you're looking for. – ebosi Nov 30 '16 at 11:10
  • @piet I hope you don't mind I incremented on your answer... – ebosi Nov 30 '16 at 11:14
  • @ebo Thanks for the addition. I will get the reputation anyway :) – Pieter van Oostrum Nov 30 '16 at 11:17

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.