[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Automatic insertion of Revision numbers in LaTeX documents

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-01-10 15:44:55 CET

On Mon, 2005-10-01 at 14:42 +0100, Henrik Andersson wrote:
> I just started to use version control, so I am totally green.
>
> I have read the Subversion book and browsed through a lot of email on gmane.
>
> Question is how can I get the revision number to appear on the output of
> my LaTeX documents?

    `svnversion`

I use a makefile to create a tex file and then include the built tex
file in the proper place.

I do not keep the built tex file under revision control. It is up to
each client to build it (or make a stub).

----Makefile-------
SVNVER=include/svn_version.tex

all: svn doc display

svn:
        echo "\footnotesize{Document built with revision \textbf{" >
$(SVNVER)
        svnversion -n . >> $(SVNVER)
        echo "} from the Subversion server at \url
{https://domain.org/repos} }" >> $(SVNVER)
...

----Main_LaTeX_File----
...
\newpage
\thispagestyle{empty}
\addcontentsline{toc}{chapter}{Document History}
\input{include/dochist.tex}

\newpage
\mainmatter % arabic numberal page numbers
...

----include/dochist.tex------
...
\input{include/svn_version.tex} %Path relative to dir where makefile is
run
...

HTH's
Chris

-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
09:36:09 up 1 day, 20:17, 4 users, load average: 0.34, 0.50, 0.47 
http://www.fsf.org/philosophy/no-word-attachments.html

Received on Mon Jan 10 15:51:40 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.