Thanks Martin, that tool would have been nice to have but I did not know.
I converted html-files to rst and I just saw now that the ligatures were in the html already.
One is always wiser afterwards but of course I should have checked. Next time I know.
I have to think about the pre-commit hooks; at the moment I have no idea if and how it would be possible in the readthedocs context.
Cheers,
Timo
On 07/04/20 17:08, "Konrad, Martin" <
konrad at frib.msu.edu> wrote:
Hi Timo,
Finally I was able to track the reason to pdflatex producing too many
errors because it could not handle “ligatures” in the UTF-8 files.
Yeah, LaTeX doesn't want you to use ligatures in the source. It will of
course automatically use them in the output to improve readability. So
whenever you are copying text from a LaTeX-generated PDF file into your
source you run into this problem.
Here is a Python solution [1] that might help with replacing them. Would
it make sense to turn that into a Git pre-commit hook? This would also
give us the opportunity to run additional style checks in the future
(e.g. prevent users from committing files with spaces at the end of a
line etc.). The downside of pre-commit hooks is that they aren't copied
automatically when cloning a repo.
-Martin
[1]
https://stackoverflow.com/a/9175406/7583635
--
Martin Konrad
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: konrad at frib.msu.edu