I am in the process of rewriting a big file, where I need to produce the diff file of the new file with respect to the older version. Owing to the large number of symbols, I find it is good to have a table of symbols for which I want to use the glossaries package and \gls{} command. But the problem is this causes changes being highlighted in the final diff file generated using latexdiff, even though they are not real changes. My question is
- Is there a way to make
latexdiffskip the changes due to a redefined symbols in the glossaries package? Or - Is there a way to output a latex file where the glossary redefinitions are replaced by their actual latex command?
I will give an example here and I hope it makes it more clear what I want to do.
File1.tex:
\documentclass{article}
\begin{document}
\[
\mathbf{A}
\]
\end{document}
File2.tex (Using glossaries)
\documentclass{article}
\usepackage{glossaries}
\newglossaryentry{matA}
{
name={\ensuremath{\mathbf{A}}},
description={Adjacency Matrix}
}
\begin{document}
\[
\gls{matA}
\]
\end{document}
To me, these two files are the same and hence the diff file generated as latexdiff file1.tex file2.tex > diff.tex , should generate a diff.tex with no changes. But in reality it does register unnecessary changes. Any help is appreciated.
PS: The only related question I found is is there an option in latexdiff to ignore whole environments? and it has no answers right now.