-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--flatten tries to expand \input commands even if they depend on argument to a user-defined command (e.g. \input{#1.tex} ) #112
Comments
If you use the |
thanks @ftilmann . I've tried the keep-intermediate option and I noticed several things:
|
Did you run:
(with ED1,2 your extracted old and new directories, and master.tex your top-level tex file). If so and it still fails, I would need more information. Please use the '--debug' option and paste the output as well as the result of ls on both directories. |
Is this file From the diagnosis so far the fault is with the latexdiff --flatten option, not with latexdiff-git, so it is enough to have old and new directory, no actual repository needed; it might be enough to just make one directory and supply this both as old and new). It should latex OK with all the files provided in the tar, but create equivalent error for latexdiff. I think you can attach the tar to a comment, or use email (you should be able to find it by Google - my institution is FU Berlin) |
I have a hint on what's happening. The below if-else statement of the preamble controls which directory is used to include figures (coloured or black and white). Notice the {./picsBW/#1.pdf} bit and specially the \input{} option. Latexdiff got jammed there.
I've then tried to change this section into simply
submitting two minor commits and running latexdiff again. The returned error now is So it is the new includesvg command alone that is scrambling latexdiff, due to the \input{} bit!! The flatten option from latexdiff is trying to place the figures and is loosing track of what's happening. |
Wouldn't be sensible if |
I was trying to experiment with the --exclude-textcmd option, like so |
Your suggestion in the comment one up is not a bad one, but not quite trivial to implement and in some contexts one might wish for input within \newcommand to be expanded. What would be easier to implement is to never expand \input arguments containing a hash (#) symbol as they are likely arguments in a \newcommand environments. That would solve your problem but again might be undesirable in some situations (I will leave the issue open to remind me to implement this special check) I can suggest three possible workarounds, but all require you to fiddle with the 'old' files, so you have to change history or do some pre-processing after extraction.
In every case, you then have to be careful where you latex the diff.tex file, as it will need to be able to find the included figures. PS You should be able to get rid of the 'Deprecated' warnings by upgrading to the latest version of latexdiff |
Brilliant! For me number 2 was the easiest and worked near perfectly. Thank you so much.
and set it as the new masterfile. Minor thing but just wanted to mention it. |
I have changed the processing now such that files not found in this phase lead to a warning rather than an error (the input command is left alone in this case). For 'filenames' contain #0-9, it is assumed that there are part of a command definition and not even a warning is issued. So the workaround should no longer be necessary Commit: 4c20a8b |
…ommand unexpanded -- inspired by issue #112
I know this is not the first time this error appears in latexdiff but I don't understand what I am doing wrong.
Essentially I want to apply latexdiff-git between two commits of my thesis. I am using version 1.1.1 of Latexdiff. Since I have several \input{} commands I think (correct me if wrong) that the correct sintax is
latexdiff-git --flatten -r com1 -r com2 thesis.tex
,where com1 and com2 are the commit ref numbers.
Specifically the error states:
Couldn't open /tmp/vwLfCZssA7/latexdiff-vc-/picsBW/#1.pdf_tex: No such file or directory at /usr/bin/latexdiff line 1432.
Remarks
Do you have any suggestions that I might try? Running latexdiff between the latest commit and the current files also didn't work.
The text was updated successfully, but these errors were encountered: