Is there a way to make latexdiff work with the 'subfiles' package ?
I use subfiles to include parts of the document from different .tex files. Latexdiff does not seem to mark changes in the subfiles.
The --flatten option does not help. Latexdiff version is 1.0.2.
Example :
main.tex
\documentclass[10pt]{article}
\usepackage{subfiles}
\begin{document}
\subfile{includeme.tex}
\end{document}
includeme.tex
\documentclass[main.tex]{subfiles}
\begin{document}
Text!
\end{document}
Running
latexdiff d1/main.tex d2/main.tex --flatten > mydiff.tex
the resulting document simply does not include the contents of the subfile.
mydiff.tex
\documentclass[10pt]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF (...)
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
\subfile{includeme.tex}
\end{document}
So yes, the problem lies with the flatten pipeline/workflow, which does not seem to be made to work with \subfile{includeme.tex} includes.
flattenalternatives discussed here: http://tex.stackexchange.com/questions/21838/replace-inputfilex-by-the-content-of-filex-automatically – Jörg Mar 26 '14 at 10:51subfilesincludes subsidiary files. – frederik Mar 26 '14 at 11:14\subfileargument. You can adapt some of the scripts mentioned in the link before to use\subfilein a similar way as\input, but as your example ofincludeme.texincludes adocumentclassI think it's not going to be compilable. – Jörg Mar 26 '14 at 14:28latexdiff version 1.1.1, using the--flattenoption worked for me with subfiles. It took a little tweaking of the file-structure to get it to work, then I had to manually modify the resultingmydiff.texslightly to get it to build into a PDF... but it worked. – DilithiumMatrix Jun 01 '17 at 12:58