Rainer M Krug wrote:
Hi

I am using version control (svn) for my LyX files, and I would like to put
the revision and other info into the document by using prelim2e.

My problem is (at least I think so) that packages like svninfo are using the
name of the .tex file to obtain the versioning info. This obviously does not
work, as the .lyx file is versioned.


When I put the following into the preamble:


\usepackage{svninfo}

\usepackage{prelim2e}

\renewcommand{\PrelimWords}{%

Draft -- \textsf{RandomClearing.lyx} -- svn ID: \svnId

}


I get:

Draft – RandomClearing.lyx – svn ID: –sourcefile– –revision– –time– –owner–
– 11th December 2009

at the bottom of my document.

Is there another package which would be able to give me the svn info from
the .lyx file to include it into the final compiled document (pdf)?

I don't know of any other package but if you don't mind the extra '$' characters, you can just use the svn keywords in plain text _within_ LyX. For example, '$Revision: $' will be filled out with the revision number:
  $Revision: 695 $

'$Id: $' will give you something like:
  $Id: BlackboxProtocol.lyx 695 2009-10-20 07:49:38Z younes $

This works because the lyx file format is text and also because I added some properties to my lyx file:

$ svn propget svn:keywords BlackboxProtocol.lyx
URL Author Date Rev Id

So you'll need to do the same:

$ svn propset svn:keyword "URL Author Date Rev" BlackboxProtocol.lyx
property 'svn:keyword' set on 'BlackboxProtocol.lyx'

If you find this info useful maybe you someone can add somewhere in the Wiki?

Abdel.

Reply via email to