rmuschall wrote:

Daniel Bünzli <[EMAIL PROTECTED]> wrote:
[inverted quoting repaired by me]

Le 23 févr. 06 à 14:29, rmuschall a écrit :

Something like this would be wrong if we are inside
\begin{verbatim}...\end{verbatim} or similar.

I think you misunderstood me (if it is not the case
then I'm not able to make any sense of your message).
I was not talking about paragraphs in the result of the
compilation. I was talking about paragraphs at the source
code level.

That's exactly what I mean.  In an ordinary piece of
LaTeX source,

foo foo foo foo foo foo
bar bar bar bar bar bar

is the same as

foo foo foo foo foo foo bar bar bar bar bar bar

But OTOH,

\begin{verbatim}
foo foo foo foo foo foo
bar bar bar bar bar bar
\end{verbatim}

is significantly different from

\begin{verbatim}
foo foo foo foo foo foo bar bar bar bar bar bar
\end{verbatim}

I.e. pieces of LaTeX source inside such a region must
be handled just like another programming language,
whereas those outside can be treated more (by splitting
at paragraphs (double linefeeds), then words (whitespace).

Unfortunately, \begin{verbatim} is not the only such
command, and recognizing them is nontrivial due to TeX's
ability to massively redefine its own input syntax on the
fly.


The solution seems very simple to me: have new patch type that contains a *character-based* diff, instead of the currently used (and traditional) line-based diff.

This requires no knowledge of the structure of the file contents, and is fairly robust (i.e., leads to sensible diffs) when only small changes are made, such as wording changes, layout changes, etc.

(I'm pretty sure I'm not being original here.  Search the list archives.)

(Oh, and I'm not implying that implementing a new patch type is a matter of minutes, what with all the commutation and merging code that needs to be written. Just that it's conceptually simple.)

Groetjes,
<><
Marnix

_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users

Reply via email to