DiffAlignmentMethod
✖
DiffAlignmentMethod
is an option to Diff and related functions that specifies how to align cells when comparing notebooks.
Details

- Possible settings for DiffAlignmentMethod include:
-
"CellEditDistance" align cells based upon pairwise values of EditDistance and ByteCount "ExpressionUUID" align cells with matching ExpressionUUID values "SequenceAlignment" align cells according to the alignment determined by SequenceAlignment - The default value of DiffAlignmentMethodAutomatic is usually equivalent to "ExpressionUUID". In unusual cases where cells in one or both notebooks are missing ExpressionUUID values, Automatic effectively reverts to "CellEditDistance".
Examples
Basic Examples (1)Summary of the most common use cases
Construct notebook expressions to compare:

https://wolfram.com/xid/0bnifwfmceu42-jl5fxf
Align the cells based on their ExpressionUUID values:

https://wolfram.com/xid/0bnifwfmceu42-tast12

Align the cells based on an analysis of the cell contents:

https://wolfram.com/xid/0bnifwfmceu42-q6acw7

Do not attempt to align individual cells with one another in a block of changed cells:

https://wolfram.com/xid/0bnifwfmceu42-su3kq8

Wolfram Research (2024), DiffAlignmentMethod, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html.
Text
Wolfram Research (2024), DiffAlignmentMethod, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html.
Wolfram Research (2024), DiffAlignmentMethod, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html.
CMS
Wolfram Language. 2024. "DiffAlignmentMethod." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html.
Wolfram Language. 2024. "DiffAlignmentMethod." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html.
APA
Wolfram Language. (2024). DiffAlignmentMethod. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html
Wolfram Language. (2024). DiffAlignmentMethod. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html
BibTeX
@misc{reference.wolfram_2025_diffalignmentmethod, author="Wolfram Research", title="{DiffAlignmentMethod}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html}", note=[Accessed: 28-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_diffalignmentmethod, organization={Wolfram Research}, title={DiffAlignmentMethod}, year={2024}, url={https://reference.wolfram.com/language/ref/DiffAlignmentMethod.html}, note=[Accessed: 28-April-2025
]}