James Tauber

journeyman of some

blog > 2006 > 03 > 28 >

Subversion Keywords in LaTeX Documents

I wanted a LaTeX document I'm writing to show the Subversion keyword expansion but I couldn't work out how to do it. If I used something like $Id$, LaTeX treated it as being in math mode but if I used \$Id\$ then Subversion didn't expand it.

I finally hit the right Google search term and found $ $Id$ $ works nicely.

I'm sure there are other ways. Any ideas?

Categories:
prev « subversion
latex

Comments (2)

Edward O'Connor on March 28, 2006:

\verb|$Id$|

or

\begin{verbatim}
$Id$
\end{verbatim}

both come to mind.

Martin Scharrer on May 31, 2006:

There a ATM three packages to set
subversion keywords in LaTeX:
svn, svninfo and my package svn-multi.

svn:
http://tug.ctan.org/tex-archive/macros/latex/contrib/svn/

svninfo:
http://tug.ctan.org/tex-archive/macros/latex/contrib/svninfo/

svn-multi:
On CTAN soon, maybe under:
http://tug.ctan.org/tex-archive/macros/latex/contrib/svn-multi/

Or just go to http://tug.ctan.org/find.html
and search for 'svn'.

I used at the beginning just:
\newcommand{\svn}[1]{\svnsub#1}
\def\svnsub$#1${#1}
and then wrote \svn{$Id$}, \svn{$Rev$}
to get rid of the $'s.

Created: March 28, 2006
Last Modified: March 28, 2006
Author: jtauber