My file is named 'cv3.01.tex'. I want to extract the '3.01' part and use it in the footer of the document, i.e. 'Rev 3.01'.
I found Parsing file name into document, but it does not work for my filename structure.
Here is my code based on the above:
\documentclass{article}
\makeatletter
\newcommand{\filenameparse}[1]{\expandafter\filename@parse@#1\@nil}
\def\filename@parse@#1\@nil{%
\gdef\fileRev{#1}% first part
}
\makeatother
\begin{document}
\filenameparse{\jobname}
Rev. \fileRev
\end{document}
Of course, \fileRev is 'cv3.01' because I don't know how to parse that out. Using this in the above:
\def\filename@parse@{cv#1}@\nil{%
does not work.

gitnowadays), and then access the version that way (say withgitinfo2). – jon Oct 10 '15 at 17:30\def\filename@parse@ cv#1\@nil{%– Charles Staats Oct 10 '15 at 17:53