Skip to content

New glossary entry makes pdflatex fail #294

@felixvuo

Description

@felixvuo

I have added a new entry to my glossary and although latexdiff still makes a changes.tex, the generated file no longer compiles to pdf with pdflatex. Here's a minimum (not)working example:

Old:

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[automake,toc,nopostdot,nogroupskip]{glossaries-extra}
\preto\chapter{\glsresetall}
\makeglossaries
\begin{document}
\newglossaryentry{dfs}{
name={depth first search (DFS)},
first={depth first search (DFS)},
text={DFS},
description={Diving headlong into the space.}
}
\frontmatter
\title{Searching}
\author{Me}
\date{Now}
\printglossary[title={Glossary}]
\mainmatter
\chapter{Introduction: Searching for something}
The only way is \gls{dfs}. It's great, \gls{dfs}.
\end{document}

New:

\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[automake,toc,nopostdot,nogroupskip]{glossaries-extra}
\preto\chapter{\glsresetall}
\makeglossaries
\begin{document}
\newglossaryentry{dfs}{
name={depth first search (DFS)},
first={depth first search (DFS)},
text={DFS},
description={Diving headlong into the space.}
}
\newglossaryentry{bfs}{
name={breadth-first search (BFS)},
first={breadth-first search (BFS)},
text={BFS},
description={Cautiously exploring all options one step at a time.}
}
\frontmatter
\title{Searching}
\author{Me}
\date{Now}
\printglossary[title={Glossary}]
\mainmatter
\chapter{Introduction: Searching for something}
One way is \gls{dfs} and the other is \gls{bfs}.  They're both great, \gls{dfs} and \gls{bfs}.
\end{document}

Command: latexdiff --append-context2cmd=newglossaryentry mwe-old.tex mwe-new.tex > changes.tex which produces changes.tex with no errors reported

But then pdflatex changes.tex produces:

! Use of \@s@lective@sanitize doesn't match its definition.
\@ifnextchar ... \reserved@d =#1\def \reserved@a {
                                                  #2}\def \reserved@b {#3}\f...
l.64 }

line 64 is the last line, with closing brace, of this snippet:

\DIFaddbegin \newglossaryentry{bfs}{
\DIFadd{name=}{\DIFadd{breadth-first search (BFS)}}\DIFadd{,
first=}{\DIFadd{breadth-first search (BFS)}}\DIFadd{,
text=}{\DIFadd{BFS}}\DIFadd{,
description=}{\DIFadd{Cautiously exploring all options one step at a time.}}
}

Anything I can try to solve this? Many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions