[Tex/LaTex] Undefined control sequence. \datalist etc

biblatexbibtexciting

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.

Can anyone please help me what I am doing wrong?

Best Answer

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.