Replies: 1 comment
|
Confirmed from your writeup plus the repo's own layout - and the diagnosis pattern (renders correctly twice, fails only on exact comparison) is well caught. Two notes for the PR you're offering: (a) the one-line |
|
Confirmed from your writeup plus the repo's own layout - and the diagnosis pattern (renders correctly twice, fails only on exact comparison) is well caught. Two notes for the PR you're offering: (a) the one-line |
Uh oh!
There was an error while loading. Please reload this page.
Idea: one-line
fontenchardening for the pdflatex fallback (accented CVs)TL;DR: this does not reproduce on the documented
lualatexpath. It only bitesusers who fall back to
pdflatex, where the CV's text layer comes out decomposed andtools/verify_pdf.py --requiresilently fails on any accented string. Asking whether aone-line defensive
\usepackage[T1]{fontenc}is wanted before I open a PR, perCONTRIBUTING's "an Idea thread costs nothing".
How I hit it
lualatexbroke on my machine (luatexbase.stynot found, no PDF produced), so I fellback to
pdflatex, which compiles the stock template cleanly. Everything looked correct:2 pages, right colours, clean visual inspection, and the extracted text read fine in the
terminal. The ATS keyword check still failed on every accented term.
What's actually happening
Without
fontenc, pdflatex writes accented characters into the text layer decomposed(NFD) rather than precomposed (NFC):
èU+0065 U+0300(e+ combining grave)U+00E8U+00E8It hides well because it renders correctly twice — the PDF page looks right, and most
terminals display
e+U+0300 asè. Only exact comparison fails.normalize_text()intools/verify_pdf.pyis whitespace-only (" ".join(text.split())), so a--requirestring typed as NFC never matches an NFD text layer.
Reproduction on the real path
Stock
cv/main_example.texat79cd383, placeholders filled with the kind of accentedcontent
/applyproduces for a non-English market (Genève,Université,Lefèvre,Zürich,Chargée). Compiled per the documented commands, extracted through bothbackends
verify_pdf.pyuses:--require "Genève"Both extractors agree under lualatex, so there's no backend-dependence to worry about.
5/5 accented keywords intact with T1 under pdflatex; 0/5 without.
Why I'm not just opening a PR
Because on your documented path this isn't a bug.
05-cv-templates.mdsays compile withlualatex, CI smoke-tests with lualatex, and lualatex is correct with or without the change.
By the standard in CONTRIBUTING — reproduce on the real path, not a constructed input — the
premise fails, and I'd rather ask than send you a PR whose framing is wrong.
The counter-argument, which is why I'm raising it at all: the repo already acknowledges
pdflatex gets used (
05-cv-templates.mdnotes pdflatex "often fails on modern MiKTeX withfontawesome5 font-expansion errors", which implies people try it), and a broken lualatex
install pushes users there with no warning that their text layer is now degraded. The
failure is silent and passes every existing check.
What a PR would contain, if wanted
\usepackage[T1]{fontenc}incv/main_example.texand in the documented preamble in05-cv-templates.md. No-op under lualatex, protective under pdflatex.framework_versionbump on05-cv-templates.md, CHANGELOG entry under Fixed.Roughly ten lines, one concern.
Two alternatives that may fit your philosophy better, and I have no attachment to mine:
tools/verify_pdf.pyinstead —unicodedata.normalize("NFC", ...)innormalize_text(). Fixes the detection rather than the cause, helps any CV regardless ofengine or template, and is arguably where the bug really is: the verifier's job is to
catch text-layer problems and this one slips through it.
a pdflatex fallback needs
fontencand why.Happy to build whichever, or none. Also happy to be told the answer is "install lualatex
properly", which is fair.
All reactions