Using vc in a Makefile

Zunbeltz Izaola textnik.typesetting at
Wed Mar 10 08:41:30 CET 2021

Hi Christopher,

I am using vc in such a way to typeset my reports in a linux system.

I use my own cls file for the reports. I have the following lines there
(but you can do it in your main.tex file)

% Execute the vc script with full option. I had used the script with bzr,
but nowadays I only use git
\immediate\write18{sh ./vc -f}
% Input the generated vc.tex file with the information gathered by vc
% I have a custom python script that modifies a bit the version_history
% (using the vhistory package to print a table with the different versions
a their commit messages)
% My script sanityze commit messages to be able to be typeset by tex
(special characters, and other stuff).
\immediate\write18{./ > version_history.tex}

% At the proper position (after the \maketitle I input the version history

In make file yuo just need to activate the -shell-escape option:

     lualatex -shell-escape main.tex

I hope it helps

Zunbeltz Izaola
TeXtnik typesetting

On Wed, Mar 10, 2021 at 1:08 AM Christopher Finazzo <chris.finazzo at>

> I am currently using the \write18 method with the vc package, but am
> curious as to how it can be used from Make (as described in Unix example in
> Section 2.3 of its documentation).
> Is this simply including a stanza which runs vc,  or is it something
> else? I have yet to find an example which demonstrates this approach.
> --
> Chris Finazzo
> 973.906.0496
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the texhax mailing list.