TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have footer that draws on a svn version data field (package: svn-multi). I would like to perform a simple calculation that subtracts a number from the reported version.

The footer code is \lfoot{Ver: \textcolor{red}{1:}\textcolor{red}{\svnkw{LastChangedRevision}}}

Currently \svnkw{LastCHangedRevision} is set at 286 so for this and future reports I need it to present 'LastCHangedRevision-285'

In response to MWE request:


% Versioning
\svnidlong {$HeadURL:  $}{$LastChangedDate: 2012-02-21 10:20:32 +0000 (Tue, 21 Feb 2012) $}{$LastChangedRevision: 287 $}{$LastChangedBy: $}
\svnid{$Id: BESA-2012.tex 287 2012-02-21 10:20:32Z $}

\usepackage{color, lastpage}
\renewcommand\headrulewidth{0.0pt} \renewcommand\footrulewidth{0.2pt}
\lhead{} \chead{} \rhead{}
\cfoot{\svnkw{LastChangedDate}} \lfoot{Ver:

share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. – egreg Feb 21 '12 at 10:39
up vote 1 down vote accepted

You can use the \numexpr command:

\lfoot{Ver: \textcolor{red}{1:%
share|improve this answer

Your Answer


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.