On Wed, Jul 29, 2026 at 11:08:30AM +0200, Pavel Sanda wrote:
> I see lyx comparison feature broken for main two reasons:
> 
> 1) it produces char-like diffs spilled across the words and sentences even 
> for word-like changes which makes it totally unreadable for naked eye (bug 
> #6889)
> 2) it's superslow on any non trivial changeset
> 
> Below is the attempt to narrow heuristics to fix 1).
> Please send me your comments or objections if you have any before I start 
> shaping the code.

Ok, so to finish my summer project on the first issue - character spill over 
words -
I am attaching patchset for you to review/test (the second patch is the main to 
check).

Took quite some time to steer it into human readable form. I tried to be 
generous
on comments/docs as this is nontrivial stuff and we interacted with claude a lot
until I was happy about the shape.

Any feedback on your real documents welcome, as JMarc pointed out only 
experience
will tell how well this solution works in practise.

You might want to look at tests/*expected files if you want to check how 
"correct"
versions look now. I am currently aware of one more possible addition, which is 
visible
in basic_inset test case:
  raw Myers:    {S}[F]o{me new fo}otnote text      <- the scatter (lone "o" 
crumb)
  IVa now:      {Some new footnote}[Footnote] text  <- collapses the whole 
cluster
  further work: {Some new f}[F]ootnote text         <- keep "ootnote text", 
mark only the real edits

but I keep trimming the common prefix/suffix for some later work.

Pavel
>From 85e420c96140d95ae09c65ef9d6be95d57d2fded Mon Sep 17 00:00:00 2001
From: Pavel Sanda <[email protected]>
Date: Wed, 26 Aug 2026 23:36:49 +0200
Subject: [PATCH 1/3] Paragraph: generalize hasChangedInsets into
 hasInsets(changed_only)

Add generic hasInsets, refactor hasChangedInsets for it.

Assisted-by: Claude Fable 5
---
 src/Paragraph.cpp | 4 ++--
 src/Paragraph.h   | 7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 63f6cbeecd..e136073609 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -639,7 +639,7 @@ bool Paragraph::isChanged(pos_type start, pos_type end) const
 }
 
 // FIXME: Ideally the diverse isChanged() methods should account for that!
-bool Paragraph::hasChangedInsets(pos_type start, pos_type end) const
+bool Paragraph::hasInsets(pos_type start, pos_type end, bool changed_only) const
 {
 	LASSERT(start >= 0 && start <= size(), return false);
 	LASSERT(end > start && end <= size() + 1, return false);
@@ -649,7 +649,7 @@ bool Paragraph::hasChangedInsets(pos_type start, pos_type end) const
 			continue;
 		if (icit.pos >= end)
 			break;
-		if (icit.inset && icit.inset->isChanged())
+		if (icit.inset && (!changed_only || icit.inset->isChanged()))
 			return true;
 	}
 	return false;
diff --git a/src/Paragraph.h b/src/Paragraph.h
index ce4e9ddce3..6d3e580d16 100644
--- a/src/Paragraph.h
+++ b/src/Paragraph.h
@@ -280,8 +280,13 @@ public:
 	/// is there a change within the given range (does not
 	/// check contained paragraphs)
 	bool isChanged(pos_type start, pos_type end) const;
+	/// Is there an inset in the range [start, end)? With \p changed_only,
+	/// count only insets that carry a tracked change.
+	bool hasInsets(pos_type start, pos_type end,
+		bool changed_only = false) const;
 	/// Are there insets containing changes in the range?
-	bool hasChangedInsets(pos_type start, pos_type end) const;
+	bool hasChangedInsets(pos_type start, pos_type end) const
+		{ return hasInsets(start, end, true); }
 	/// is there an unchanged char at the given pos ?
 	bool isChanged(pos_type pos) const;
 	/// is there a change in the paragraph ?
-- 
2.39.5

>From d1a298382cc9a606cc4f797ed2ef3402b6c200ad Mon Sep 17 00:00:00 2001
From: Pavel Sanda <[email protected]>
Date: Wed, 26 Aug 2026 23:53:04 +0200
Subject: [PATCH 2/3] Compare: collapse scattered within-word change runs
 (#6889)

Fixup compare scattered output (bug #6889).

Myers postprocessing to refine diff from mathematically minimal into human
readable. This adds first pass (IVa) over fragmented words and rewrites them
as a continuous text while leaving single-char typos in place.

The next planned pass (IVb) will be over words.

Assisted-by: Claude Fable 5
---
 src/Compare.cpp | 317 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 316 insertions(+), 1 deletion(-)

diff --git a/src/Compare.cpp b/src/Compare.cpp
index 01c5c87469..8e84478073 100644
--- a/src/Compare.cpp
+++ b/src/Compare.cpp
@@ -51,7 +51,99 @@
  *        diffInset case ("very rare case" mentioned in diff_i), tracked as #9395.
  *        This is now fixed by processSnake recursion on L_ses == 0 and closes both
  *        problems above. I. should be now redundant and ripe for the waste bin.
- */
+ * 
+ * IV. Myers postprocessing refining the diff on non-CJK languages
+ *    Problem:
+ *        The previous steps create mathematically minimal but frequently unreadable diff - 
+ *        it scatters tiny CT fragments across words and sentences. Example from bug #6889:
+ *        instead of {unique}[single] the results looks like {u}[si]n{iqu}[gl]e.
+ *    Approach: 
+ *       First refine for single chars and later we switch to words (for performance reasons)
+ *       while leaving the char-level diffs functional so small char-level typos are easily seen.
+ * 
+ *    Prior art:
+ *       - LibreOffice takes the opposite route - by default diffs whole words (so no word-level
+ *           scatter), but has a ByChar mode as well.
+ *       - MS Word gives choice between char vs word level.
+ *       - Google diff-match-patch keeps a char diff and post-processes it, like us.
+ * 
+ *   IVa. Detector for "this word's character diff is the scattered-noise"
+ * 
+ *     * First some terminology:
+ *        "Single continuous run" - at most one deleted block, then at most one inserted block, in that order
+ *             - {...} - pure deletion
+ *             - [...] - pure insertion
+ *             - {...}[...] - deletion immediately followed by insertion (a substitution)
+ * 
+ *          - []{} does not occur (compare always emits delete first)
+ *          - mixtures {}[]{}[] do not occur (compare always builds whole subrange as deleted/inserted -
+ *                 mixture always occurs with snake inside (>=1 unchanged character) eg {}[]s{}[], but
+ *                 then it's no more continuous run.
+ * 
+ *        "Unchanged interior" - a run of unchanged characters (="survivor") that touches neither end
+ *                               of the word - i.e. it has changed text on both sides.
+ *
+ *                             Note: our matcher is font- and language-aware so every survivor is, by 
+ *                                   construction, font- and language-identical between old and new.
+ *                                   We deliberately do not use case of differently formatted survivor 
+ *                                   as a signal for "keep"; it's rare and complicates code.
+ * 
+ *        "Crumb" - an interior unchanged piece of 1-2 characters (this 3 chars threshold is the only knob
+ *                  in our collapse detector).
+ * 
+ *     * Now the heuristics:
+ *        Keep char-diff for: edits are single continuous run (one consecutive {del}[ins] run)  OR
+ *                            "real shared text, not coincidence" - edits are separated by substantial
+ * 		                                           (>= 3 char) unchanged stretches.
+ *        Otherwise reject diff, collapse as whole word diff {old}[new].
+ * 
+ *     * Consequences (Lx stands for x-row of the examples table)
+ *        1. A single contiguous edit has only boundary (prefix/suffix) survivors, so it is always kept ->
+ *           typo fixes stay character-precise: (L1) correct[i]on.
+ *        2. A substantial unchanged interior is kept: (L2) {d}[m]isprove{n}[d] keeps the real shared stem
+ *           isprove even though both ends changed.
+ *        3. A crumb triggers a whole-word collapse: (L3) {beating}[boaring].
+ *        4. The decision is per-word all-or-nothing: one interior crumb collapses the entire word, 
+ *           because a half-cleaned word still reads as fragments.
+ *        5. The trigger is the size of the interior unchanged survivor, not the amount of change - so a
+ *           small change with a solid survivor is kept (L2), while a small change straddling a crumb is collapsed (L3).
+ * 
+ *     * Examples:
+ *        ------------------------------------------------------------------------------------------------------ 
+ *       |       old -> new        | raw character diff  | unchanged interior  | verdict  |       result        |
+ *        ------------------------------------------------------------------------------------------------------
+ *       | correcton -> correction | correct[i]on        | none (all boundary) | keep     | correct[i]on        |
+ *        ------------------------------------------------------------------------------------------------------
+ *       | disproven -> misproved  | {d}[m]isprove{n}[d] | isprove (7)         | keep     | {d}[m]isprove{n}[d] |
+ *        ------------------------------------------------------------------------------------------------------
+ *       | beating -> boaring      | b{e}[o]a{t}[r]ing   | a (1)               | collapse | {beating}[boaring]  |
+ *        ------------------------------------------------------------------------------------------------------
+ * 
+ *     *  Prior art: cf. LibreOffice's CommonSubseq::IgnoreIsolatedPieces, which drops isolated common runs
+ *                   <= nIgnoreLen (2 in char mode, 3 in word mode) and exempts the common prefix/suffix -
+ *                   the same small 2-3 char line and boundary exemption as our crumb. Unlike us it does no
+ *                   intra-word refinement, so a one-letter typo marks the whole word; lyx keeps it precise.
+ *
+ *     * Possible further work:
+ *         We decide only on the interior crumb and do not consider the size of boundary survivors.
+ *         So clear case pre{heat}[boil] stays, but also less clear case a{lpha}[ztec] stays, when
+ *         "a" is likely just chance. We keep it now, as our main problem really isn't detection of
+ *         real edits, but rather fragmentation -- and unreadability, which follows. a{lpha}[ztec]
+ *         reads fine.
+ *
+ *         If we implement check for this, we a) need new threshold to tune b) valuable typo edits 
+ *         can be lost when mistuned. At the end we really need more experience with this.
+ *         ATM we try to win the case with easy case with strong signal (crumb inside/collapsing typo)
+ *         and leave the hard/more ambigous case left because the win is small ("still reads fine").
+ *
+ *         Libreoffice situation: collapse to a whole-word replacement when the two words are
+ *         too dissimilar - "< X% similar -> replace the word"). Make sense, but single typos
+ *         in words are missed and replaced by whole word CT in default case, BUT: 
+ *         Food for thought: when LO docs share the ancestry, their "Revision Save ID" tags which
+ *         are recorded per edit session can actually track "real" edits and this whole game is suddenly
+ *         solvable without guessing.
+ *
+ **/
  
 #include <config.h>
 
@@ -63,6 +155,7 @@
 #include "Changes.h"
 #include "CutAndPaste.h"
 #include "Font.h"
+#include "Language.h"
 
 #include "insets/InsetText.h"
 
@@ -345,6 +438,10 @@ private:
 	/// recursively be applied to any InsetTexts that are within the snake.
 	void processSnake(DocRangePair const & rp);
 
+	/// Fix scattering of Myers' output (bug #6889). Called when the 
+	/// paragraph list of a text level is complete (the end of diff/Inset).
+	void cleanupChangeRuns(ParagraphList & pars);
+
 	/// Writes the range to the destination buffer
 	void writeToDestBuffer(DocRange const & range,
 		Change::Type type = Change::UNCHANGED);
@@ -582,6 +679,204 @@ static bool traverseSnake(DocPair & p, DocRangePair const & range,
 }
 
 
+/////////////////////////////////////////////////////////////////////
+//
+// Cleanup of the scattered comparison output (bug #6889)
+//
+// Structure of the cleanup:
+//
+//   diff() -------+
+//   diffInset() --+--> cleanupChangeRuns(*dest_pars_)
+//
+//   cleanupChangeRuns(pars)
+//     |
+//     +-- for each paragraph par:
+//           |
+//           +-- collapseClusters(par, ...)               [IVa: within a word]
+//                 |
+//                 +-- for each cluster:
+//                       hasInteriorCrumb(cluster)? --yes--> rewriteAsRun(par, cluster)
+//                                                  --no---> keep as is
+//
+//
+// collapseClusters (within a word): a changed region together with the
+//    words it touches forms a cluster. If the characterwise diff inside a
+//    cluster is unreadable (it contains an unchanged piece in the cluster
+//    interior shorter than min_interior_survivor), the cluster is collapsed
+//    into one continuous run: deleted old words followed by inserted new
+//    words. A single contiguous edit within a word (e.g. a typo fix) only
+//    has unchanged pieces touching the cluster boundary, so it is kept as
+//    is.
+//
+// The collapse duplicates the affected unchanged characters (they appear
+// once in the deleted and once in the inserted part of the run), trading
+// mark precision for readability. Insets are never duplicated or moved:
+// clusters are split at inset positions, so a rewritten range never
+// contains an inset. Paragraph breaks are not crossed either, so all
+// rewrites are local to one paragraph.
+//
+// The whole pass is skipped for CJK-type languages without whitespace word
+// boundaries (Language::wordWrap() == false), where a single character
+// already is a word and the character diff needs no fixing.
+//
+/////////////////////////////////////////////////////////////////////
+
+/// A position range within a paragraph.
+struct PosRange {
+	pos_type begin;
+	pos_type end;
+};
+
+
+/// We need to preserve each character's font across the
+/// erase-and-reinsert that rewriteAsRun performs.
+struct CharWithFont {
+	char_type c;
+	Font font;
+};
+
+
+/// Called when detector for scattered noise triggers.
+/// scattered input: par[begin:end]  = "{u}[si]n{iqu}[gl]e"  
+///    clean output: par[begin:end2] = "{unique}[single]"
+/// Rewrites the range [begin, end) of par, which may hold any mixture of unchanged,
+/// deleted and inserted positions, as one continuous run {old}[new], unchanged
+/// chars duplicated into both parts. The range must not contain insets.
+static void rewriteAsRun(Paragraph & par, pos_type begin, pos_type end,
+	BufferParams const & bparams, int author)
+{
+	// The callers guarantee an inset-free range.
+	LASSERT(!par.hasInsets(begin, end), return);
+
+	// what you get if you reject every change, "unique"
+	vector<CharWithFont> oldtext;
+	// what you get if you accept every change, "single"
+	vector<CharWithFont> newtext;
+
+	// 1. prepare clean range
+	for (pos_type pos = begin; pos < end; ++pos) {
+		CharWithFont const cf{par.getChar(pos),
+			par.getFontSettings(bparams, pos)};
+		Change::Type const type = par.lookupChange(pos).type;
+		if (type != Change::INSERTED)	//unchanged + deleted
+			oldtext.push_back(cf);
+		if (type != Change::DELETED)	//unchanged + inserted
+			newtext.push_back(cf);
+	}
+
+	// 2. delete scattered range
+	par.eraseChars(begin, end, false);
+
+	// 3. insert clean range
+	Change const deleted(Change::DELETED, author);
+	Change const inserted(Change::INSERTED, author);
+	pos_type pos = begin;
+	for (CharWithFont const & cf : oldtext)
+		par.insertChar(pos++, cf.c, cf.font, deleted);
+	for (CharWithFont const & cf : newtext)
+		par.insertChar(pos++, cf.c, cf.font, inserted);
+}
+
+
+/// In-word "real shared text, not coincidence" threshold.
+/// We need to collapse diff for crumb < threshold.
+static pos_type const min_interior_survivor = 3;
+
+
+/// Does the cluster [cbegin, cend) contain a crumb - an interior survivor
+/// (changed text on both sides) shorter than min_interior_survivor? A survivor
+/// touching a cluster edge is a boundary survivor (the cluster's shared
+/// prefix/suffix) and does not count.
+///
+///  Clear ones:
+/// Input:  b{e}[o]a{t}[r]ing    -> true  (interior survivor "a", 1 char, is a crumb)
+/// Input:  {d}[m]isprove{n}[d]  -> false (interior survivor "isprove", 7 chars, kept)
+/// Input:  pre{heat}[boil]      -> false (boundary prefix survivor "pre", exempt)
+/// Input:  {jump}[walk]ing      -> false (boundary suffix survivor "ing", exempt)
+///
+/// Less clear ones (see the "further work" in architecture description):
+/// Input:  a{lpha}[ztec]        -> false (boundary prefix survivor "a", exempt)
+/// Input:  {c}[b]at             -> false (boundary suffix survivor "at", exempt)
+static bool hasInteriorCrumb(Paragraph const & par,
+	pos_type cbegin, pos_type cend)
+{
+	pos_type pos = cbegin;
+	while (pos < cend) {
+		if (par.isChanged(pos)) {
+			++pos;
+			continue;
+		}
+		pos_type const sbegin = pos;	// survivor: [sbegin, pos)
+		while (pos < cend && !par.isChanged(pos))
+			++pos;
+
+		// a boundary survivor is the real shared prefix/suffix, not a crumb
+		bool interior_only = sbegin > cbegin && pos < cend;
+		// a short unchanged run is coincidental overlap, not meaningful shared text
+		bool too_short = pos - sbegin < min_interior_survivor;
+		if (interior_only && too_short)
+			return true;
+	}
+	return false;
+}
+
+
+/// Collapse unreadable character changes at word boundaries.
+///
+/// A "cluster" here means the text span we decide in this pass (and may collapse):
+/// one word, or several words when the separators between them were
+/// themselves changed. The cluster boundaries define interior for hasInteriorCrumb
+/// (i.e. the specification's survivor with "changed text on both sides").
+///
+///   the {cat}[dog] sat  -> one cluster = one word: the unchanged spaces around
+///                          {cat}[dog] delimit it, so "the" and "sat" stay out
+///                          and are not clusters themselves either.
+///   {Some new f}[F]ootnote -> the whole string is ONE cluster across three words:
+///                          the deleted run swallows the spaces between them,
+///                          so nothing delimits - which is why a cluster is not
+///                          just "a word".
+/// in -> out:
+/// "the {u}[si]n{iqu}[gl]e correct[i]on" -> "the {unique}[single] correct[i]on"
+/// "{S}[F]o{me new fo}otnote"  ->  "{Some new footnote}[Footnote]"
+static void collapseClusters(Paragraph & par, BufferParams const & bparams,
+	int author)
+{
+	// A position takes part in a cluster if it is changed or if it is a
+	// word character; unchanged word separators (spaces, punctuation,
+	// ...) delimit the clusters. Insets always do, whatever their change
+	// status, because a rewrite cannot move them.
+	pos_type psize = par.size();
+	vector<PosRange> clusters;
+	pos_type pos = 0;
+	while (pos < psize) {
+		if (par.isInset(pos)						//insets are hard anchors
+		    || (!par.isChanged(pos) && par.isWordSeparator(pos))) { 	//*unedited* space/punctuation
+			++pos;
+			// this position is gap between clusters, candidate for cluster opens on next non-separator
+			continue;
+		}
+		pos_type cbegin = pos;
+		// for candidate to become real cluster it needs to contain CT
+		bool has_change = false;
+		while (pos < psize && !par.isInset(pos)
+		       && (par.isChanged(pos) || !par.isWordSeparator(pos))) {
+			has_change |= par.isChanged(pos);
+			++pos;
+		}
+		if (has_change)
+			clusters.push_back(PosRange{cbegin, pos});
+	}
+
+	// Go through the collected clusters and collapse the scattered ones.
+	// Rewrite changes par length, thus go from back to front so the positions remain valid.
+	vector<PosRange>::const_reverse_iterator it = clusters.rbegin();
+	for (; it != clusters.rend(); ++it) {
+		if (hasInteriorCrumb(par, it->begin, it->end))
+			rewriteAsRun(par, it->begin, it->end, bparams, author);
+	}
+}
+
+
 /////////////////////////////////////////////////////////////////////
 //
 // Compare::Impl
@@ -589,6 +884,22 @@ static bool traverseSnake(DocPair & p, DocRangePair const & range,
 /////////////////////////////////////////////////////////////////////
 
 
+void Compare::Impl::cleanupChangeRuns(ParagraphList & pars)
+{
+	BufferParams const & bparams = dest_buf_->params();
+
+	// CJK-type languages have no whitespace word boundaries
+	if (!bparams.language->wordWrap())
+		return;
+
+	int const author = compare_.options_.author;
+
+	ParagraphList::iterator it = pars.begin();
+	for (; it != pars.end(); ++it)
+		collapseClusters(*it, bparams, author);
+}
+
+
 void Compare::Impl::furthestDpathKdiagonal(int D, int k,
 	 DocRangePair const & rp, Direction direction)
 {
@@ -777,6 +1088,8 @@ bool Compare::Impl::diff(Buffer const * new_buf, Buffer const * old_buf,
 	if (!rp_new.o.empty() || !rp_new.n.empty())
 		diff_i(rp_new);
 
+	cleanupChangeRuns(*dest_pars_);
+
 	for (pit_type p = 0; p < (pit_type)dest_pars_->size(); ++p) {
 		(*dest_pars_)[p].setInsetBuffers(const_cast<Buffer &>(*dest_buf));
 		(*dest_pars_)[p].setInsetOwner(&dest_buf_->inset());
@@ -871,6 +1184,8 @@ void Compare::Impl::diffInset(Inset * inset, DocPair const & p)
 	diff_i(rp);
 	--nested_inset_level_;
 
+	cleanupChangeRuns(*dest_pars_);
+
 	dest_pars_ = backup_dest_pars;
 }
 
-- 
2.39.5

>From 19043059728f1c8859f138119987ac4fce1871da Mon Sep 17 00:00:00 2001
From: Pavel Sanda <[email protected]>
Date: Fri, 28 Aug 2026 00:08:49 +0200
Subject: [PATCH] Compare tests: batch fixtures for the within-word cleanup
 (#6889)

Add compare tests for the first character-level post-myers pass.

Assisted-by: Claude Fable 5
---
 .../basic_insets/diffs.expected.lyx           |  10 +-
 .../inset_anchor/diffs.expected.lyx           | 126 ++++++++++++++++++
 .../compare_tests/inset_anchor/new.lyx        | 101 ++++++++++++++
 .../compare_tests/inset_anchor/old.lyx        | 101 ++++++++++++++
 .../compare_tests/long_doc/diffs.expected.lyx |  64 +++------
 .../nested_cleanup/diffs.expected.lyx         | 122 +++++++++++++++++
 .../compare_tests/nested_cleanup/new.lyx      | 101 ++++++++++++++
 .../compare_tests/nested_cleanup/old.lyx      | 101 ++++++++++++++
 .../compare_tests/typo_fix/diffs.expected.lyx | 110 +++++++++++++++
 .../batchtests/compare_tests/typo_fix/new.lyx |  92 +++++++++++++
 .../batchtests/compare_tests/typo_fix/old.lyx |  92 +++++++++++++
 .../word_replacement/diffs.expected.lyx       | 112 ++++++++++++++++
 .../compare_tests/word_replacement/new.lyx    |  92 +++++++++++++
 .../compare_tests/word_replacement/old.lyx    |  92 +++++++++++++
 14 files changed, 1267 insertions(+), 49 deletions(-)
 create mode 100644 development/batchtests/compare_tests/inset_anchor/diffs.expected.lyx
 create mode 100644 development/batchtests/compare_tests/inset_anchor/new.lyx
 create mode 100644 development/batchtests/compare_tests/inset_anchor/old.lyx
 create mode 100644 development/batchtests/compare_tests/nested_cleanup/diffs.expected.lyx
 create mode 100644 development/batchtests/compare_tests/nested_cleanup/new.lyx
 create mode 100644 development/batchtests/compare_tests/nested_cleanup/old.lyx
 create mode 100644 development/batchtests/compare_tests/typo_fix/diffs.expected.lyx
 create mode 100644 development/batchtests/compare_tests/typo_fix/new.lyx
 create mode 100644 development/batchtests/compare_tests/typo_fix/old.lyx
 create mode 100644 development/batchtests/compare_tests/word_replacement/diffs.expected.lyx
 create mode 100644 development/batchtests/compare_tests/word_replacement/new.lyx
 create mode 100644 development/batchtests/compare_tests/word_replacement/old.lyx

diff --git a/development/batchtests/compare_tests/basic_insets/diffs.expected.lyx b/development/batchtests/compare_tests/basic_insets/diffs.expected.lyx
index 7a71d2048f..485e9aaf79 100644
--- a/development/batchtests/compare_tests/basic_insets/diffs.expected.lyx
+++ b/development/batchtests/compare_tests/basic_insets/diffs.expected.lyx
@@ -105,15 +105,11 @@ status open
 \begin_layout Plain Layout
 
 \change_deleted 1660427103 1786609652
-S
+Some new footnote
 \change_inserted 1660427103 1786609652
-F
+Footnote
 \change_unchanged
-o
-\change_deleted 1660427103 1786609652
-me new fo
-\change_unchanged
-otnote text
+ text
 \end_layout
 
 \end_inset
diff --git a/development/batchtests/compare_tests/inset_anchor/diffs.expected.lyx b/development/batchtests/compare_tests/inset_anchor/diffs.expected.lyx
new file mode 100644
index 0000000000..2e1faacc27
--- /dev/null
+++ b/development/batchtests/compare_tests/inset_anchor/diffs.expected.lyx
@@ -0,0 +1,126 @@
+#LyX 2.6 created this file. For more info see https://www.lyx.org/
+\lyxformat 658
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package aligned-overset 0
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification default
+\crossref_package refstyle
+\use_formatted_ref 0
+\use_minted 0
+\use_lineno 0
+\backgroundcolor none
+\fontcolor none
+\notefontcolor lightgray
+\boxbgcolor red
+\table_border_color default
+\table_odd_row_color default
+\table_even_row_color default
+\table_alt_row_colors_start 1
+\index Index
+\shortcut idx
+\color #ff008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\parfillskip "default" ""
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes true
+\output_changes true
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\docbook_mathml_version 0
+\author 1660427103 "Document Comparison"
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+
+\change_deleted 1660427103 1786609652
+xxx
+\change_inserted 1660427103 1786609652
+aaa
+\change_unchanged
+
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+note text
+\end_layout
+
+\end_inset
+
+ 
+\change_deleted 1660427103 1786609652
+yyy
+\change_inserted 1660427103 1786609652
+bbb
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/inset_anchor/new.lyx b/development/batchtests/compare_tests/inset_anchor/new.lyx
new file mode 100644
index 0000000000..a529bce71f
--- /dev/null
+++ b/development/batchtests/compare_tests/inset_anchor/new.lyx
@@ -0,0 +1,101 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+\begin_layout Standard
+aaa
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+note text
+\end_layout
+
+\end_inset
+
+ bbb
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/inset_anchor/old.lyx b/development/batchtests/compare_tests/inset_anchor/old.lyx
new file mode 100644
index 0000000000..2aabbdc16d
--- /dev/null
+++ b/development/batchtests/compare_tests/inset_anchor/old.lyx
@@ -0,0 +1,101 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+\begin_layout Standard
+xxx
+\begin_inset Foot
+status collapsed
+
+\begin_layout Plain Layout
+note text
+\end_layout
+
+\end_inset
+
+ yyy
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/long_doc/diffs.expected.lyx b/development/batchtests/compare_tests/long_doc/diffs.expected.lyx
index 8171b421e7..71f4f83dbf 100644
--- a/development/batchtests/compare_tests/long_doc/diffs.expected.lyx
+++ b/development/batchtests/compare_tests/long_doc/diffs.expected.lyx
@@ -221,7 +221,7 @@ What is \SpecialChar LyX
 
 \begin_layout Standard
 
-\change_deleted 1660427103 1786609849
+\change_deleted 1660427103 1786609652
 \SpecialChar LyX
  is a program that provides a modern approach to writing documents with a computer by using a markup language paradigm,
  an approach that breaks with the obsolete tradition of the 
@@ -314,7 +314,7 @@ what you're doing
 style
 \emph default
 .
-\change_deleted 1660427103 1786609849
+\change_deleted 1660427103 1786609652
 
 \begin_inset Foot
 status collapsed
@@ -514,57 +514,37 @@ do
  is missing some cool function.
  It simply means that it isn't the right tool for the job —
  you don't use a screwdriver to dr
-\change_inserted 1660427103 1786609849
+\change_inserted 1660427103 1786609652
 ive in nails.
 \end_layout
 
 \begin_layout Standard
 
-\change_inserted 1660427103 1786609849
+\change_deleted 1660427103 1786609652
+ive
+\change_inserted 1660427103 1786609652
 Yes,
  that's all.
  If you cut and paste the section,
- it will automat
-\change_unchanged
-i
-\change_inserted 1660427103 1786609849
-cally be renumbered —
- e
-\change_unchanged
-v
-\change_inserted 1660427103 1786609849
-erywhere.
- And if you enter references to that section corr
-\change_unchanged
-e
-\change_inserted 1660427103 1786609850
-ctly (by
+ it will automatically be renumbered —
+ everywhere.
+ And if you enter references to that section correctly (by
 \change_unchanged
  in
-\change_inserted 1660427103 1786609850
+\change_inserted 1660427103 1786609652
 serting
 \change_unchanged
  
-\change_inserted 1660427103 1786609850
-cross-refere
-\change_unchanged
-n
-\change_inserted 1660427103 1786609850
-ce t
-\change_unchanged
-a
-\change_inserted 1660427103 1786609850
-gs),
+\change_deleted 1660427103 1786609652
+na
+\change_inserted 1660427103 1786609652
+cross-reference tags),
  \SpecialChar LyX
- will automatically update them all throughout the f
-\change_unchanged
-il
-\change_inserted 1660427103 1786609850
-e 
-\change_unchanged
-s
-\change_inserted 1660427103 1786609850
-o that you never,
+
+\change_deleted 1660427103 1786609652
+ils
+\change_inserted 1660427103 1786609652
+ will automatically update them all throughout the file so that you never,
  ever type a section number
 \change_unchanged
 .
@@ -573,7 +553,7 @@ o that you never,
 \begin_layout Subsection
 Differences between \SpecialChar LyX
  and Other 
-\change_inserted 1660427103 1786609850
+\change_inserted 1660427103 1786609652
 (Crappy) 
 \change_unchanged
 Word Processors
@@ -1085,7 +1065,7 @@ Some of you may have printed out the manuals.
  which looks like this:
  
 \begin_inset Graphics
-	filename ../../../../lib/doc/clipart/footnote.png
+	filename /lib/doc/clipart/footnote.png
 	scale 95
 
 \end_inset
@@ -1114,7 +1094,7 @@ In the printed manuals,
  all cross-references appear as light-grey boxes like the following:
  
 \begin_inset Graphics
-	filename ../../../../lib/doc/clipart/reference.png
+	filename /lib/doc/clipart/reference.png
 	scale 95
 
 \end_inset
diff --git a/development/batchtests/compare_tests/nested_cleanup/diffs.expected.lyx b/development/batchtests/compare_tests/nested_cleanup/diffs.expected.lyx
new file mode 100644
index 0000000000..4c92a2f9e5
--- /dev/null
+++ b/development/batchtests/compare_tests/nested_cleanup/diffs.expected.lyx
@@ -0,0 +1,122 @@
+#LyX 2.6 created this file. For more info see https://www.lyx.org/
+\lyxformat 658
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package aligned-overset 0
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification default
+\crossref_package refstyle
+\use_formatted_ref 0
+\use_minted 0
+\use_lineno 0
+\backgroundcolor none
+\fontcolor none
+\notefontcolor lightgray
+\boxbgcolor red
+\table_border_color default
+\table_odd_row_color default
+\table_even_row_color default
+\table_alt_row_colors_start 1
+\index Index
+\shortcut idx
+\color #ff008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\parfillskip "default" ""
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes true
+\output_changes true
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\docbook_mathml_version 0
+\author 1660427103 "Document Comparison"
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+before
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+a 
+\change_deleted 1660427103 1786609652
+unique
+\change_inserted 1660427103 1786609652
+single
+\change_unchanged
+ word
+\end_layout
+
+\end_inset
+
+ after
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/nested_cleanup/new.lyx b/development/batchtests/compare_tests/nested_cleanup/new.lyx
new file mode 100644
index 0000000000..3c55816f67
--- /dev/null
+++ b/development/batchtests/compare_tests/nested_cleanup/new.lyx
@@ -0,0 +1,101 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+\begin_layout Standard
+before
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+a single word
+\end_layout
+
+\end_inset
+
+ after
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/nested_cleanup/old.lyx b/development/batchtests/compare_tests/nested_cleanup/old.lyx
new file mode 100644
index 0000000000..ccf2025f1c
--- /dev/null
+++ b/development/batchtests/compare_tests/nested_cleanup/old.lyx
@@ -0,0 +1,101 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+\begin_layout Standard
+before
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+a unique word
+\end_layout
+
+\end_inset
+
+ after
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/typo_fix/diffs.expected.lyx b/development/batchtests/compare_tests/typo_fix/diffs.expected.lyx
new file mode 100644
index 0000000000..98e058501e
--- /dev/null
+++ b/development/batchtests/compare_tests/typo_fix/diffs.expected.lyx
@@ -0,0 +1,110 @@
+#LyX 2.6 created this file. For more info see https://www.lyx.org/
+\lyxformat 658
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package aligned-overset 0
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification default
+\crossref_package refstyle
+\use_formatted_ref 0
+\use_minted 0
+\use_lineno 0
+\backgroundcolor none
+\fontcolor none
+\notefontcolor lightgray
+\boxbgcolor red
+\table_border_color default
+\table_odd_row_color default
+\table_even_row_color default
+\table_alt_row_colors_start 1
+\index Index
+\shortcut idx
+\color #ff008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\parfillskip "default" ""
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes true
+\output_changes true
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\docbook_mathml_version 0
+\author 1660427103 "Document Comparison"
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+a correct
+\change_inserted 1660427103 1786609652
+i
+\change_unchanged
+on here
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/typo_fix/new.lyx b/development/batchtests/compare_tests/typo_fix/new.lyx
new file mode 100644
index 0000000000..d5fd810f8c
--- /dev/null
+++ b/development/batchtests/compare_tests/typo_fix/new.lyx
@@ -0,0 +1,92 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+a correction here
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/typo_fix/old.lyx b/development/batchtests/compare_tests/typo_fix/old.lyx
new file mode 100644
index 0000000000..58dc072724
--- /dev/null
+++ b/development/batchtests/compare_tests/typo_fix/old.lyx
@@ -0,0 +1,92 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+a correcton here
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/word_replacement/diffs.expected.lyx b/development/batchtests/compare_tests/word_replacement/diffs.expected.lyx
new file mode 100644
index 0000000000..a570e28bc4
--- /dev/null
+++ b/development/batchtests/compare_tests/word_replacement/diffs.expected.lyx
@@ -0,0 +1,112 @@
+#LyX 2.6 created this file. For more info see https://www.lyx.org/
+\lyxformat 658
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package aligned-overset 0
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification default
+\crossref_package refstyle
+\use_formatted_ref 0
+\use_minted 0
+\use_lineno 0
+\backgroundcolor none
+\fontcolor none
+\notefontcolor lightgray
+\boxbgcolor red
+\table_border_color default
+\table_odd_row_color default
+\table_even_row_color default
+\table_alt_row_colors_start 1
+\index Index
+\shortcut idx
+\color #ff008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\parfillskip "default" ""
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes true
+\output_changes true
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\docbook_mathml_version 0
+\author 1660427103 "Document Comparison"
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+a 
+\change_deleted 1660427103 1786609652
+unique
+\change_inserted 1660427103 1786609652
+single
+\change_unchanged
+ word
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/word_replacement/new.lyx b/development/batchtests/compare_tests/word_replacement/new.lyx
new file mode 100644
index 0000000000..9e587e4a00
--- /dev/null
+++ b/development/batchtests/compare_tests/word_replacement/new.lyx
@@ -0,0 +1,92 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+a single word
+\end_layout
+
+\end_body
+\end_document
diff --git a/development/batchtests/compare_tests/word_replacement/old.lyx b/development/batchtests/compare_tests/word_replacement/old.lyx
new file mode 100644
index 0000000000..907c335d12
--- /dev/null
+++ b/development/batchtests/compare_tests/word_replacement/old.lyx
@@ -0,0 +1,92 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 599
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children no
+\language newzealand
+\language_package default
+\inputencoding utf8
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content true
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+a unique word
+\end_layout
+
+\end_body
+\end_document
-- 
2.39.5

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to