[p4] Keyword expansion in LaTeX documents

Ken.Williams at thomson.com Ken.Williams at thomson.com
Wed Oct 19 12:02:10 PDT 2005


Hi,
 
I'm trying to figure out a good way to use keyword expansion in a LaTeX
document.  Ideally, I'd have something like this in the header:
 
   \title{My Document}
   \author{Ken Williams}
   \date{$Revision: #2 $}
 
The problem is that both '$' and '#' are special characters in LaTeX -
the surrounding '$' characters will switch into math mode (which isn't a
huge deal, but looks kind of ugly), and the '#2' indicates parameter
number 2, which is meaningless in this context and causes parsing to
fail.
 
Does anyone have any experience with this?  I'd be fine with a solution
either on the LaTeX side (some kind of escaping of the whole "$Revision:
#2 $" string) or on the Perforce side (some way of getting the revision
number without the special characters around it), but at this point I've
been able to think of neither.
 
 -Ken
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/perforce-user/attachments/20051019/59470403/attachment-0006.html>


More information about the perforce-user mailing list