ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
Subject: Re: visualising evolution from one version to another
Date: Sun, 6 Aug 2006 16:34:57 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0608061609050.4599@gaston.pm> (raw)
In-Reply-To: <44D5BDC1.5090100@elvenkind.com>

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/

  reply	other threads:[~2006-08-06 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-06  6:46 Peter Münster
2006-08-06 10:00 ` Taco Hoekwater
2006-08-06 14:34   ` Peter Münster [this message]
2006-08-06 15:01     ` Taco Hoekwater
2006-08-06 13:41 ` Aditya Mahajan
2006-08-07 12:37   ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0608061609050.4599@gaston.pm \
    --to=pmlists@free.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).