DiffIgnore

DiffIgnore

Diff 及相关函数的一个选项,指定计算 diff 时忽略哪些元素.

更多信息

  • DiffIgnore{elem1,elem2,} 将在计算 diff 时忽略给定的元素.
  • 比较笔记本或单元时,支持的元素包括:
  • "BoxOptions"忽略所有框符选项
    "CellOptions"忽略所有单元选项
    "CellStyles"忽略所有单元样式
    "InlineCellOptions"忽略所有内嵌的单元选项
    "InlineCellStyles"忽略所有内嵌的单元样式
    "NotebookOptions"忽略所有笔记本选项
    elem{item1,item2,}忽略给定元素的特定选项名称或样式

范例

打开所有单元关闭所有单元

基本范例  (3)

比较单元时,除了内容上的变化,Diff 还会查找任何样式和选项修改:

DiffIgnore 忽略所有样式和选项修改:

DiffIgnore 忽略特定的单元选项:

比较笔记本时,Diff 的结果将包含笔记本选项的变化:

DiffIgnore 忽略特定的笔记本选项:

可能存在的问题  (1)

构建要比较的笔记本表达式:

忽略单元选项 ExpressionUUID 可能会导致不同的对齐结果:

Wolfram Research (2024),DiffIgnore,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DiffIgnore.html.

文本

Wolfram Research (2024),DiffIgnore,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DiffIgnore.html.

CMS

Wolfram 语言. 2024. "DiffIgnore." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/DiffIgnore.html.

APA

Wolfram 语言. (2024). DiffIgnore. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DiffIgnore.html 年

BibTeX

@misc{reference.wolfram_2024_diffignore, author="Wolfram Research", title="{DiffIgnore}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/DiffIgnore.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_diffignore, organization={Wolfram Research}, title={DiffIgnore}, year={2024}, url={https://reference.wolfram.com/language/ref/DiffIgnore.html}, note=[Accessed: 21-November-2024 ]}