General ⇒ Insert output of a shell command into LaTeX file at compile?
Insert output of a shell command into LaTeX file at compile?
File Revision {bzr revno}
And make it so when LaTeX is run it will replace {bzr revno} with the output of that command (in this case 12). Is there a way to do this? I don't want to actually edit the file because then it would need to be checked in again.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Insert output of a shell command into LaTeX file at compile?
Code: Select all
This is revision \input{revision.txt}.
This is revision 193 .
Insert output of a shell command into LaTeX file at compile?
Code: Select all
\documentclass{article}
\newcommand*\Revision{%
\edef\RestoreEndlinechar{\endlinechar=\the\endlinechar\relax}%
\endlinechar=-1 %
\input{revision.txt}%
\RestoreEndlinechar
}
\begin{document}
Revision \Revision.
\end{document}
Code: Select all
\input "|bzr revno"