# Undefined control sequence. \datalist etc

I am currently writing my bachelor thesis and have to use latex for it. In the past I have never used latex in my whole life. Still things running good but I have to use latexdiff with the --flatten parameter, which is working great it dumps all the differences between two versions of my thesis into a single file.

On compiling there sadly is a problem with citations, latexdiff converts my literature database .db file into an inline \datalist. But this \datalist can't be compiled, because for some strange reason latex doesn't know the commands.

Errors like:

Undefined control sequence. \datalist
Undefined control sequence. \entry
Undefined control sequence. \name


appearing in the log.

The file is generated automatically by latexdiff, so I don't expect any errors in there, unless there is some bug in latexdiff?

I am using biblatex:

\usepackage[backend=bibtex]{biblatex}


For managing latex package versions I am using MiKTeX 2.9 and I updated all packages today, so every package is using the newest version.

• \datalist and the other command are only defined locally when the bbl is read. Feb 14 '19 at 21:40
• @Ulrike Fischer So this is nothing which should be put into a .tex file? Feb 14 '19 at 22:07
• No, outside of the bbl it doesn't make sense. Feb 14 '19 at 22:26

latexdiff's --flatten option does not only flatten \input and \include, it also writes the .bbl file into the document. That works well for BibTeX-based bibliographies, where the .bbl file contains code that can be typeset directly at the place where \bibliography is issued. But it does not work for biblatex, where the .bbl contains the entry data in a machine-readable, but not typesettable format, and where the file is loaded at a particular point at the beginning of the document and not just where \bibliography is placed.
It is possible to include biblatex's .bbl into a .tex file, but it requires a bit of extra work (see for example Biblatex: submitting to a journal) and I would say that it is in general not worth the effort.
Until latexdiff becomes aware of biblatex and handles it differently, you can do one of the following things
1. Ignore the fact that the .bbl bit in the diff output is not compilable. Review it in the source before you compile the diff file and then comment it out.
2. Use \addbibresource{<filename>.bib} instead of \bibliography{<filename>}. latexdiff does not recognise the biblatex command and does not try to input the .bbl there.
• @DominikK I rejected the edit removing the .bib file extension from \addbibresource, because the extension is required with that command (as opposed to \bibliography where the file extension must not be given). On some systems it may work without the extension, but that is only accidental and not guaranteed. Feb 15 '19 at 12:23