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
514 stars 72 forks source link

--flatten does not handle import package commands (\import, \subimport, etc) #172

Closed jasonmccsmith closed 5 years ago

jasonmccsmith commented 5 years ago

This one is beyond my capacity to figure out, bumping it up to the issues list.

I've recently encountered a need to use the import package (https://ctan.org/pkg/import) to handle some complicated document structures. Specifically, I am using the \subimport command:

\subimport{relative_directory}{file}

This sets subsequent uses of \input, \include, etc within file to be calibrated to the directory indicated.

flatten would be the proper place for this, but my perl fu is not up to the task. Happy to help test.

jasonmccsmith commented 5 years ago

As a followup: I first considered handling this in an external script ala issue #165 / #167 , but latexdiff's native flatten needs to know about the updated relative directories, this probably needs to be handled within flatten.

jasonmccsmith commented 5 years ago

Pull request for fix. Perl fu leveled up.

ftilmann commented 5 years ago

Pull request was merged - I close this issue but note 'homework' in my comments to PR