-
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
latexdiff --lua : swap ulem for lua-ul #277
Comments
Adding |
This hack just changes in the DATA section: ulem -> lua-ul [normalem] -> \sout -> \strikeThrough \uwave -> \underLine When this is used, output must be compiled with lualatex. Some thoughts on implementing this in upstream latexdiff: 1. To make this an actual option, instead of hardcoding this change, one would probably want to make general commands that call the right ulem or lua-ul commnad, with separate preamble sections for either ulem: \RequirePackage[normalem]{ulem} \newcommand[1]{\DIFstrikethrough}{\sout{ftilmann#1}} \newcommand[1]{\DIFunderline}{\uwave{ftilmann#1}} or lua-ul \RequirePackage{lua-ul} \newcommand[1]{\DIFstrikethrough}{\strikeThrough{ftilmann#1}} \newcommand[1]{\DIFunderline}{\underLine{ftilmann#1}} and then could make these changes instead \RequirePackage[normalem]{ulem} -> \sout -> \DIFstrikethrough \uwave -> \underLine This, however, would require adding in the logic to have either lua-ul or ulem into the code. I also hope the indirection like this won't break some LaTeX macro somewhere but can't be sure of that. Other options I considered would be: - duplicating all these sections to have a ulem and a lua-ul version (yuck) - searching for these words and replacing them when reading in preamble sections (D:) - simply eliminating ulem support (working around it certainly seems to have caused a lot of headaches for the creators of latexdiff) 2. lua-ul doesn't have the capacity out of the box to produce wavy underlines like ulem, but is very configurable and it could be added. Instructions are even in the lua-ul manual.
cb6c513 is a fork that hard-codes the switch to |
Also unsure why direct use of |
The simplest implementation would be to introduce another markupstyle UNDERLINE_LUA which would be activated with |
That makes sense.
I think many people might discover this via Googling an error message and ending up here.
Many LuaLaTeX or XeLaTeX documents will load either the
Yes, I believe |
First of all: thank you for the fork, I tested it and after installing perl-Algorith-Diff it worked. Looks way better in my case, two-column text, partially in tcolorboxes, where hyphenation is essential. Great! I found out that the changebar package doesn't work with luatex, will write to the maintainers. The package luacolor is only needed for highlighting text, apologies for my wrong assumption in my first post. So if somebody implemented the UNDERLINE_LUA option (and the maintainers of changebar add luatex support) that would be very helpful! |
As of yesterday the maintainer of changebar published a new version including support for LuaTeX. |
This seems to be solved by the merged #299 PR |
As far as I can see, latexdiff uses the ulem packages. The latter has issues with hyphenation. I swapped ulem for the package lua-ul in the diff.tex and got proper hyphenation.
Ok, but then we need luacolor as well. For both you need to compile with Lua(La)TeX.
LuaLaTeX became so fast recently that I'm finally starting to move everything to LuaLaTeX, away from pdfLaTeX. So at least to me a switch that made latexdiff use lua-ul and luacolor came just in time.
By the way: I don't know how you are doing it but latexdiff does a better job than its counterpart software in text processing software. It is an indispensable piece of software in the realms of TeX.
The text was updated successfully, but these errors were encountered: