From cff819e3c64b19873746fdeb4307d3e6f0a66ff2 Mon Sep 17 00:00:00 2001
From: mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date: Wed, 21 Oct 2015 14:19:35 +0000
Subject: Revert: makediff: cleanup using begingroup/endgroup

This reverts commit
	commit ef519a86f046d1be22f82f32d845653a850c21dd
	Author: mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
	Date:   Thu Jun 26 16:50:13 2014 +0000

	makediff: cleanup using begingroup/endgroup

This seemed like a good idea originally: replace perl hacks with
tex hacks. However adding \begingroup and \endgroup within macros
used by latex-diff breaks its assumption that these are low level
tex and can be used in arbitrary situations, e.g.  cross the
boundaries of environments, use mis-matching begin and end
instructions (DIFaddbegin with DIFaddendFL), etc.

Let's go back to the original work-around:

commit b665b3165b454b98c782617e37a128b53b56c89c
Author: mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date:   Thu Jun 26 12:34:38 2014 +0000

    work around xetex bug

    Too many \color directives produce corrupted output
    and this warning:
    WARNING ** Color stack overflow. Just ignore.

    Use script to reduce # of these directives.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/branches/v1.0@545 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---
 diffpreamble.tex | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'diffpreamble.tex')

diff --git a/diffpreamble.tex b/diffpreamble.tex
index 9b5b7e5..f7b5cec 100644
--- a/diffpreamble.tex
+++ b/diffpreamble.tex
@@ -8,10 +8,13 @@
 
 %DIF COLOR PREAMBLE
 \RequirePackage{color}
-\providecommand{\DIFaddbegin}{\begingroup\color{green}\hypersetup{linkcolor=green,urlcolor=green}}
-\providecommand{\DIFaddend}{\hypersetup{linkcolor=blue,urlcolor=blue}\endgroup}
-\providecommand{\DIFdelbegin}{\begingroup\color{red}\hypersetup{linkcolor=red,urlcolor=red}}
-\providecommand{\DIFdelend}{\hypersetup{linkcolor=blue,urlcolor=blue}\endgroup}
+\providecommand{\DIFaddbegin}{\protect\color{green}\hypersetup{linkcolor=green,urlcolor=green}}
+\providecommand{\DIFaddend}{\protect\color{black}\hypersetup{linkcolor=blue,urlcolor=blue}}
+\providecommand{\DIFdelbegin}{\protect\color{red}\hypersetup{linkcolor=red,urlcolor=red}}
+\providecommand{\DIFdelend}{\protect\color{black}\hypersetup{linkcolor=blue,urlcolor=blue}}
+\providecommand{\DIFaddtext}[1]{\textcolor{blue}{\sf #1}}
+\providecommand{\DIFdeltext}[1]{\textcolor{red}{\footnotesize \sout{#1}}}
+
 %DIF END COLOR PREAMBLE
 \providecommand{\DIFaddtext}[1]{\textcolor{green}{\sf #1}}
 \providecommand{\DIFdeltext}[1]{\textcolor{red}{\footnotesize \sout{#1}}}
-- 
cgit v1.2.3

