[Gllug] Unified patches in LaTeX

Adrian McMenamin adrian at mcmen.demon.co.uk
Fri Sep 2 09:43:39 UTC 2011


On Thu, September 1, 2011 8:46 am, Richard W.M. Jones wrote:
> 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.
>

Works really well - too well almost - I am now wondering if I should use
this to format the non-patch code in the document also.

Thanks!

Adrian

--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list