For a certain journal I have to follow this structure:

  1. Main text
  2. References
  3. Figures, one per page
  4. Extra text

I've managed to accomplish that by using package endfloat that moves the figures to the end, and \AtEndDocument, which allows me to put the extra text after the figures.

I have now to submit a revised version, with changes marked. I intended to do this with latexdiff, but it seems it does not highlight changes in the extra text. Unfortunately this is where many changes will be located.

Perhaps relevant to this is that I'm using the --flatten option of latexdiff, since the sources are split in several .tex files (some of them being included within an \AtEndDocument).

I'd like a solution that does not involve separate documents so page numbering is kept, and there is only one master file. Alas, I'm stuck here.

Do you know any way around this? Probably getting rid of \AtEndDocument. Thanks in advance.


1 Answer 1


After some digging around, it turns out that one can use


to flush the floats at that point, removing the need for \AtEndDocument. latexdiff works as expected now.

You must log in to answer this question.

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