Skip to content

Install dehyph-exptl for pinned German hyphenation patterns - #15076

Merged
cderv merged 5 commits into
mainfrom
fix/issue-15035
Oct 16, 2026
Merged

cderv merged 5 commits into
mainfrom
fix/issue-15035

Conversation

@cderv

@cderv cderv commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #15029 (fix for #15027). The hyphenation table in parse-error.ts was a hand-written copy of the one in tinytex and had drifted. tinytex now generates it from texlive.tlpdb and exports it as hyphen.json (rstudio/tinytex#517, follow-up to rstudio/tinytex#516).

With \begin{hyphenrules}{ngerman-x-latest} and no dehyph-exptl installed, babel stops with You haven't defined the language 'ngerman-x-latest' yet. The map held suffixes and the package was always built as hyphen-<name>, so tlmgr was asked for the non-existent hyphen-ngerman-x-latest and the render failed. The package that provides these patterns is dehyph-exptl.

Fix

Detection now follows tinytex main (hyphen_pkgs(), check_babel(), detect_hyphen(), check_polyglossia() in R/latex.R):

  • kHyphenationPackageNames holds full package names and has the 41 entries of tinytex's hyphen.json, including the 4 dehyph-exptl ones. The language name is validated (^[a-z0-9-]+$) instead of the resulting package name.
  • A language given as a description keeps its first word, so German (current orthography) gives hyphen-german.
  • The babel regex only reads warning blocks, as tinytex's latex_warning() does, instead of matching any (babel) line once a babel warning exists.
  • Every warned language is returned, not only the first, and Package polyglossia Warning: No hyphenation patterns were loaded is detected. Packages are deduplicated and installed together, so an extra language no longer costs one more compilation.
  • verify-tinytex-patterns.yml also compares hyphen.json, so the existing tinytex-patterns issue reports changes to the map. The cache key changes: the first run after merge sets a new baseline for both files and opens no issue. When the daily release can't be downloaded, the run reports the comparison as skipped (warning and summary) instead of "No changes detected", and nothing is cached.

The chinese skip list (#10291), the Hyphen rules for '...' set to \l@nil fallback and unquoted names in the babel error regex only exist here and are kept.

Out of scope, tracked in rstudio/tinytex#518 and left for Quarto to follow after tinytex: \babelprovide[hyphenrules=...] warnings, hyphsubst "Unknown pattern" errors, and the Swiss German (1901) mapping to hyphen-swiss.

A document with lang: de and ngerman-x-latest, rendered with the dev build without dehyph-exptl installed, now logs installing dehyph-exptl and produces the PDF.

Fixes #15035

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clones of quarto-cli and rstudio/tinytex (R/latex.R, R/hyphen.R)
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.

cderv added 4 commits October 15, 2026 18:23
The map held suffixes and the package was always built as
`hyphen-<name>`, so `ngerman-x-latest` (from `\selectlanguage{ngerman-x-latest}`
or the `hyphenrules` environment without dehyph-exptl) asked tlmgr for the
nonexistent `hyphen-ngerman-x-latest`. The map now holds full package
names and the language name is validated instead of the package name,
following rstudio/tinytex#517.

Also apply the first-word rule for babel-german descriptions such as
`German (current orthography)`, as in tinytex's `hyphen_pkgs()`.

The babel regex now only reads warning blocks, like tinytex's
`latex_warning()`, instead of the old "any babel warning in the log"
guard, so a `(babel)` continuation of an Info message can't produce a
package. That Info message is only seen in babel's source, not observed
in real logs.

Part of #15035.
…yglossia

Only the first babel warning was used, so each extra language cost one
more full compilation, and polyglossia warnings were not detected at
all. Use the same regexes as tinytex's `check_babel()` and
`check_polyglossia()`, collect every match, and install the
deduplicated packages in one go.

Part of #15035.
The hyphenation package table was a hand copy that drifted (4
dehyph-exptl names were missing). tinytex exports it as `hyphen.json`
since rstudio/tinytex#517, so the existing daily check now reports its
changes too, next to `regex.json`.

The cache key changes, so the first run sets a baseline for both files
without opening an issue. If `hyphen.json` is absent from the release
asset the workflow warns and keeps comparing `regex.json`.

Part of #15035.
The first-run step counted names inside an `echo` argument, so a failing
`jq` did not fail the step and an invalid `hyphen.json` was cached as the
baseline. Later runs format the cached copy with `jq` before opening an
issue or refreshing the cache, so that step would fail on every run, even
after upstream fixed the file, until the cache was deleted by hand.

Use a checked assignment, as already done for `regex.json`, so invalid
JSON fails the step before anything is cached.

Part of #15035.
@posit-snyk-bot

posit-snyk-bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

When the daily release can't be downloaded the download step exits
successfully with a warning and sets no file list. With a cache already
present, the compare step then looped over nothing and printed "No
changes detected", so a check that never ran looked like a clean one.

Detect the empty file list in the compare step, emit a warning and a
`skipped` output, and report the skip in the final summary. Nothing is
cached or reported in that case.

Part of #15035.
@cderv
cderv merged commit cbb00db into main Oct 16, 2026
51 checks passed
@cderv
cderv deleted the fix/issue-15035 branch October 16, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install dehyph-exptl for pinned German patterns and follow the tinytex hyphenation map

2 participants