From: "Peter Münster" <pmlists@free.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Highlight changes
Date: Tue, 15 Jul 2008 21:55:14 +0200 [thread overview]
Message-ID: <20080715195514.GA20338@gaston.couberia.bzh> (raw)
In-Reply-To: <87tzer0ylk.fsf@cordelia.devereux.me.uk>
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
On Tue, Jul 15 2008, John Devereux wrote:
>
> Is there a way to automatically "highlight changes" to a document,
> such that the resulting PDF has markers showing changed areas? Bars in
> the margin or some such. Or more generally some other way to easily
> communicate what has been changed (other than a diff on the source).
I'm sorry, this _is_ a diff on the source:
http://archive.contextgarden.net/message/20060806.143457.47021821.en.html
But the result can be quite nice.
I've also a module, that makes a table to communicate some changes to the
reader. It's attached. Typeset it with "texexec --mode=demo t-changes".
Cheers, Peter
--
http://pmrb.free.fr/contact/
[-- Attachment #2: t-changes.tex --]
[-- Type: text/x-tex, Size: 1686 bytes --]
\ifx \iere \undefined \def\iere {\highordinalstr{re}} \fi
\def\In[#1,#2]{\doifsomething{#1}{\in[#1]}\if\relax#2\else, \In[#2]\fi}
\enableregime[utf]
\unprotect
\newcount\RevC
\def\Changes[#1]{%
\getgparameters[Changes@][date=, labels=, #1]% modif, labels, date
\doifundefined{Changes@modif}{\gdef\Changes@modif{%
\translate[fr=1\iere\ version,en=First version,de=Erste Version]}}%
\global\advance\RevC by 1 \bTR
\expanded{\bTD \the\RevC \eTD}%
\expanded{\bTD \Changes@date \eTD}\expanded{\bTD \Changes@modif \eTD}%
\expandafter\bTD \expandafter\In\expandafter[\Changes@labels,\relax]\eTD
\eTR}
\def\startChanges{%
\bTABLE[option=stretch, textwidth=\textwidth]
\bTR[background=screen]
\bTD \translate[fr=Rév, en=Rev, de=Rev].\eTD
\bTD \translate[fr=Date, en=Date, de=Datum]\eTD
\bTD \translate[fr=Origine de la mise à jour, en=Reason for update,
de=Grund der Änderung]\eTD
\bTD \translate[fr=§ modifié, en=modified §, de=mod. §en]\eTD\eTR}
\def\stopChanges{\eTABLE}
\protect
\doifnotmode{demo}{\endinput}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%D Usage example:
\usemodule[changes]
\setupcolors[state=start]
\starttext
\title{The big title}
\startChanges
\Changes[date=1.1.2001]
\Changes[date=2.2.2002, labels=sec:a, modif=Added text from Tufte]
\Changes[date=3.3.2003, labels=sec:b, modif=Added text from Knuth]
\Changes[date=4.4.2004, labels={sec:a,sec:b}, modif=Added even more text]
\stopChanges
\subject{Contents}
\placecontent
\section[sec:a]{First section}
\input tufte
more text
\section[sec:b]{Second section}
\input knuth
more text
\stoptext
[-- Attachment #3: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-07-15 19:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 18:52 John Devereux
2008-07-15 19:55 ` Peter Münster [this message]
2008-07-18 20:51 ` John Devereux
2008-07-19 15:52 ` Peter Münster
2008-07-19 17:54 ` John Devereux
2008-07-19 18:40 ` Peter Münster
2008-07-20 8:30 ` John Devereux
2008-07-16 9:25 ` Olivier Guéry
2008-07-16 10:49 ` overfull hbox (was: Re: Highlight changes) Peter Münster
2008-07-16 13:11 ` Aditya Mahajan
2008-07-16 13:15 ` Olivier Guéry
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=20080715195514.GA20338@gaston.couberia.bzh \
--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).