Next in thread → Next in month →

Re: [virtio] [PATCH v2] makediffpdf.sh: tool to create marked-up diff

From
Michael S. Tsirkin <>
Date
2014-06-24T17:23:26+00:00
ID
Thread
Re: [virtio] [PATCH v2] makediffpdf.sh: tool to create marked-up diff
On Tue, Jun 24, 2014 at 05:32:13PM +0100, Pawel Moll wrote:
> On Tue, 2014-06-24 at 08:49 +0100, Cornelia Huck wrote:
> > If a link was changed (for example, in the conformance section), the old
> > link is green and crossed out in red and the new one is green. It
> > *should* be obvious what change was made, but it might be a bit
> > confusing. I don't think it's worth further tampering around, though.
> 
> Turned out to be pretty simple (although hacky, as always with LaTeX ;-)
> 
> Together with the previous change, the diffpreamble.tex could look like
> this:
> 
> 8<--------------------
> %DIF FONTSTRIKE PREAMBLE
> \RequirePackage[normalem]{ulem}
> \providecommand{\DIFaddtex}[1]{{\color{blue}\sf #1}}
> \providecommand{\DIFdeltex}[1]{{\color{red}\footnotesize \sout{#1}}}
> %DIF END FONTSTRIKE PREAMBLE
> %DIF COLOR PREAMBLE
> \RequirePackage{color}
> \providecommand{\DIFaddbegin}{}
> \providecommand{\DIFaddend}{}
> \providecommand{\DIFdelbegin}{\hypersetup{linkcolor=red,urlcolor=red}}
> \providecommand{\DIFdelend}{\hypersetup{linkcolor=green,urlcolor=green}}
> %DIF END COLOR PREAMBLE
> % Standard \DIFadd and \DIFdel are redefined as \DIFaddtex and \DIFdeltex
> % when hyperref package is included.
> %DIF HYPERREF PREAMBLE
> \providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}}
> \providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}}
> %DIF END HYPERREF PACKAGE


Thanks!
This can be integrated with my hack as well, if we
decide to keep using it.

> %DIF FLOATSAFE PREAMBLE: SEEMS UNUSED BUT JUST IN CASE
> \providecommand{\DIFaddFL}[1]{\DIFadd{#1}}
> \providecommand{\DIFdelFL}[1]{\DIFdel{#1}}
> \providecommand{\DIFaddbeginFL}{}
> \providecommand{\DIFaddendFL}{}
> \providecommand{\DIFdelbeginFL}{}
> \providecommand{\DIFdelendFL}{}
> %DIF END FLOATSAFE PREAMBLE
> 8<--------------------
> 
> Paweł
Next in thread → Next in month →