English 中文(简体)
How can you safely use Perforce $Revision$ in LaTeX document?
原标题:

I d like to include Perforce s $Revision$ keyword in my LaTeX document. However, the presence of # seems to mess thing up. For example, if you have something like this:

cfoot{$Revision: #8 $}

you end up with an error like "Illegal parameter number in definition of emp@a". I did some searching and found packages (such as the LaTeX rcs package) that handle other keywords (such as Date) but nothing that appeared to handle the #.

最佳回答
let savecfoot cfoot
def cfoot{catcode`#=12 cfoothelp}
def cfoothelp #1{savecfoot{#1}catcode`#=6 }

New:

To turn off the meaning of $ too:

let savecfoot cfoot
def cfoot{catcode`#=12 catcode`$=9 cfoothelp}
def cfoothelp #1{savecfoot{#1}catcode`#=6 catcode`$=3 }
问题回答

暂无回答




相关问题
Anything similar to git-svn for Perforce?

Is there a tool that allows me to gain the same functionality as git-svn for Perforce? I saw git-p4 on github but it looks like this imports source from a git repo to a Perforce repo. Does it go the ...

Converting Perforce repositories in to mercurial

I have a perforce repository on Windows machine say (p4). I can access this p4 repo using p4v client by providing IP:PortNumber details. Now I want to run "hg convert" command on this p4 repository ...

using perforce with team foundation server

Does Team Foundation Server 2008 or upcoming 2010 work with perforce as the SCM tool? I haven t been able to find any documentation on the web indicating whether or not this configuration is supported?...

Can a script be automated after a commit on Perforce?

We use Perforce at work, and routinely keep software projects in the repository. In general creators follow the normal Perforce flow, BUT we also have a class of users, who doesn t have any need to ...

Faster clean Perforce sync over VPN

I have to regularly do a clean Perforce sync to new hardware/virtual machines over the VPN. This can take hours as the project is quite large. Is there a way that I can simply copy an up-to-date tree ...

热门标签