I have a problem which is in my opinion quite reasonable and common, still I cannot find an answer anywhere.
I have two .tex files and I just want to check whether pdflatex
will produce exactly the same pdf.
It is easy to generate two different .tex files which give - as far as i understand - exactly the same pdf. Just think about
- two .tex files with different line breaks
- a .tex file the does \newcommand{c1}{c}
and calls c1 and another calling directly c
- a .tex file doing \input{blabla.tex}
and the other containing exactly the same content as blabla.tex
The background is that I have a repository with tex files. Quite often, I find myself doing changes which are not supposed to change the output pdfs at all (e.g. changes like those of the examples above) but I have no way to check.
Things that I already thought of:
- using a tool to directly compare pdf's: ideally I'd like the thing to be more automatic and radical.
- using latexdiff: I cannot use perl and again I'd like something more automatic and radical.
- Using tools like latexpand, flatex, flatten: no go, since this just expands inputs/includes.
An interesting clue I found is this How to prevent different checksums for different typesets but I cannot make it work.
Of course, not being a computer expert, I don't quite know how to precisely define "two pdf's are exactly the same". I would define as in "if you put them one on top of the other on a bright window, they look like just one of them".
If it matters, I m using Win7 and pdflatex (through TeXnicCenter).