latexdiff icon indicating copy to clipboard operation
latexdiff copied to clipboard

Control over graphics diff or verbatim diff styles

Open nealkruis opened this issue 1 year ago • 1 comments

If I use the --preamble option to customize my diff style, it appears I only have control over the following commands:

  • \DIFaddtex
  • \DIFdeltex
  • \DIFaddbegin
  • \DIFaddend
  • \DIFdelbegin
  • \DIFdelend
  • \DIFmodbegin
  • \DIFmodend
  • \DIFaddtexFL
  • \DIFdeltexFL
  • \DIFaddbeginFL
  • \DIFaddendFL
  • \DIFdelbeginFL
  • \DIFdelendFL

However, I can't seem to modify the styles of:

  • \DIFaddincludegraphics
  • \DIFdelincludegraphics
  • \lstdefinelanguage{DIFcode}

in my preamble, it seems like those lines are generated and appended to the preamble by latexdiff anyway and override any definitions I provide. Is there a way to customize these?

nealkruis avatar Sep 26 '24 17:09 nealkruis

@ftilmann I think my feature request would be to add options for users to choose the color and style commands for both additions and deletions. Something like:

latexdiff --add-color=blue --del-color=red --add-style="\uwave" --del-style="\sout"

These could be applied to normal text, graphics, and listings.

Full control over a custom preamble would also be good.

nealkruis avatar Oct 01 '24 15:10 nealkruis

latexdiff should now be more 'polite' about respecting definitions of graphics and line markup in the custom preamble. Please have a try. There are some heuristics in there which I am not a 100% respect your use case.

The idea to make colors in color-markup styles configurable is reasonable but is a different feature request. Feel free to make a new issue for that.

ftilmann avatar Nov 09 '24 10:11 ftilmann