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:


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?

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

1 Answer 1


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.
  • 1
    I am a bit dissappointed that latex has no better way to really view all the diffs between two revsions. Microsoft Word is a lot more powerful in this matter. But thanks for the good solution I hope my professor will accecpt this way.
    – Dominik K
    Feb 15, 2019 at 12:21
  • @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.
    – moewe
    Feb 15, 2019 at 12:23

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .