Roland's homepage

My random knot in the Web

Formatting git changelogs for LaTeX

Most of the things I write, be it software or something else, are under revision control with git. Mostly because it makes undoing mistakes easy. My LaTeX documents are no exception. With software it is customary to have a change-log (like the one generated by the git log command). I wanted to do something similar for LaTeX.

The easiest way to do that would probably be to save the git log output to a file and include that with a \verbatimfile command from the verbatimfiles package. But that would look pretty ugly.

So I decided to write a program that parses the output of the git log command and format it. It is called It is part of my scripts repository on github.

This is some git log output:

git log output

And this is wat it looks like after has done its job and the resulting LaTeX code has been processed into a pdf:

git log output after processing with mkhistory

It requires python (version 3) and git.


creative commons public domain logo

To the extent possible under law, Roland Smith has waived all copyright and related or neighboring rights to This work is published from the Netherlands.

←  csv2tbl tifftopdf  →