Skip to content

PDF render with lang: de-CH fails when hyphen-german is not installed #15027

Closed

Description

@cderv

When rendering to PDF with lang: de-CH on a TinyTeX that has no German hyphenation patterns, Quarto installs babel-german but the compilation still fails, and hyphen-german is never installed.

First reported at rstudio/tinytex#515.

Reproduction

TinyTeX without hyphen-german and babel-german (fresh install, or after tinytex::tlmgr_remove()):

---
title: "Untitled"
lang: de-CH
format: pdf
---

Hallo Welt.

Actual behavior

babel-german is installed automatically, then the render aborts:

! Package babel Error: You haven't defined the language 'ngerman' yet.
(babel)                Perhaps you misspelled it or your installation
(babel)                is not complete.

babel-german checks \iflanguage{ngerman} at \begin{document}, and without the hyphenation patterns of hyphen-german babel treats the language as undefined. Missing hyphenation patterns are only handled by Quarto when babel reports them as a warning on a successful compile, so this fatal error finds nothing to install.

I can reproduce on current main (a57cc76). After the failed render, tinytex::tlmgr_install("hyphen-german") makes the same document render.

Expected behavior

Quarto installs hyphen-german and the render succeeds, as it does for other languages.

We could detect this babel error on the failure path and install the matching hyphen-<lang> package.

Related: #12732, #10291

Activity

  1. added
    bugSomething isn't working
    latexLaTeX engines related libraries and technologies
    on Oct 12, 2026
  2. self-assigned this
    on Oct 12, 2026
  3. added this to the v1.11 milestone on Oct 12, 2026
  4. added 2 commits that reference this issue on Oct 12, 2026
    db1d1c7
    cbb00db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglatexLaTeX engines related libraries and technologies

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions