> On 4 Mar 2025, at 18:26, Pablo Rodriguez via ntg-context <ntg-context@ntg.nl> 
> wrote:
> 
> The first line shows different versions text. I wonder whether there
> would be an automatic way to get the \inframed highlighting with any
> character that differs from the other column (it might be different, or
> just missing or being added).

I'm not aware of anything built-in.

One way would be to use buffers: you enter your text into two buffers ("left" & 
"right"); compare them using a script which then modifies the buffers to  
highlight the changes in red or green; and then \getbuffer the buffers from 
inside the columnset commands to print them.

There's a good discussion of comparison algorithms at the link below, including 
source code in Javascript (but not Lua, unfortunately). However, Context 
supports Javascript with \startJScode ... \stopJScode so you could try adapting 
what's there.

<https://neil.fraser.name/writing/diff/>

Regards,

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to