[Gllug] Unified patches in LaTeX

Richard W.M. Jones rich at annexia.org
Thu Sep 1 07:46:20 UTC 2011

On Wed, Aug 31, 2011 at 11:10:05PM +0100, Adrian McMenamin wrote:
> Anybody have any thoughts/experience on the best way to present a unified
> patch in LaTeX? (C patches)
> I am using the listings package at the moment and it is giving me C syntax
> colouring, which would be nice but for the fact that if diff breaks the
> code in the middle of a comment, it treats everything that follows as a
> comment :(
> Anybody know a better solution than just raw text?

As is traditional, I have not tried it, however ...

GNU source-highlight offers a LaTeX output mode (-f latexcolor) and it
has a mode for highlighting patches (-s diff) so you could probably
combine those together to get what you want.


Richard Jones
Red Hat
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list