On Sun, 6 Aug 2006, Taco Hoekwater wrote:

> You need a way to create a merged ConTeXt document from the two separate
> files, perhaps using something like this:
> 
>    http://search.cpan.org/dist/Text-WordDiff/lib/Text/WordDiff.pm

Thank you for this hint! It's exactly what I need. I've also found a shell
version: "wdiff"
But I still have one problem: I can't have a paragraph in \overstrikes.
Is there perhaps something like \startoverstrikes ... \stopoverstrikes ?

Here is a little script, to show what I'm doing now:

#!/bin/bash
OLD="$1"
NEW="$2"
OUT="$3"
shift 3
echo '\setupcolors[state=start]' >"$OUT.tex"
echo '\long\def\startDeleted*#1\stopDeleted*{\overstrikes{#1}}' >>"$OUT.tex"
echo '\long\def\startAdded*#1\stopAdded*{\startcolor[blue]#1\stopcolor}' \
        >>"$OUT.tex"
wdiff -w '\startDeleted*' -x '\stopDeleted*' \
        -y '\startAdded*' -z '\stopAdded*' "$OLD" "$NEW" >>"$OUT.tex"
texexec "$@" "$OUT"

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to