ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
506 stars 72 forks source link

Fixed a bug that prevented finding nested subfiles #271

Closed zalgo3 closed 1 year ago

zalgo3 commented 2 years ago

When we use the package \subfiles and if we load nested files with relative paths, e.g., if we have more \subfiles in a file read by \subfile, which is in some different directory, latexdiff cannot deal with the inner \subfile.

This is due to the fact that when expanding the \subfile, the argument to flatten is $filename, i.e. the current path. https://github.com/ftilmann/latexdiff/blob/9d3a00aec26984018fdca1086ddff97af9678541/latexdiff#L1795 By changing $filename to $fullfile, i.e., the path of the file to read, the program can find the file even when there is nesting.

ftilmann commented 1 year ago

Thanks for fixing finding this issue and fixing it.