Skip to content

Include exceptions from hyphenex #17

Open

Description

@SabrinaJewson

This hyphenation exceptions log, as given by the hyphenex package, details cases in US English where the default TeX hyphenation is not correct. Examples include:

  • codesigner is given as code-signer, when it should be co-designer;
  • dataset is unhyphenated, but should be given as data-set;
  • buzzword is given as buz-zword, when it should be buzz-word.

But there are pages and pages of these, and most for words that are in no way esoteric. (As it happens, when making this issue I encountered a word not listed on that list: coauthor should probably be co·author or and not coau·thor – so there are likely many more undocumented exceptions that exist.)

As a user, this goes against my expectations for how this library would behave. It is possible that people can configure individual words on a case-by-case basis, but I argue that this library should attempt to provide defaults that work in as many cases as possible, because we cannot expect the majority of users to know anything about hyphenation, especially not enough to configure it in such a fine-grained way.

Hence, I suggest that this library takes into account these exceptions (it is a public domain/very permissively-licensed list, so this should be no problem) by default. It’s possible it could allow disabling them with a feature flag, but to be honest I don’t see the use case for this.

Activity

  1. Enivex commented on Jun 16, 2025

    @Enivex
    Contributor

    I wonder how the original patterns were produced in the first place. Surely the correct way to go about this would be to produce a new hyphenation file that can handle the additional words, instead of tacking on exceptions

    Edit: https://linux.die.net/man/1/patgen

  2. akx commented on Jun 3, 2026

    @akx
    Contributor

    This ties a little into #32: generic Liang patterns can't capture all correct hyphenation without further morphological information...

    Also, looking at ushyphex.tex, there's a whole bunch of loan words or non-English words in there, including Hel-sinki 🇫🇮 or For-schungs-in-sti-tut 🇩🇪, which, sure, are nice to be correctly hyphenated in TeXnical writing, but vendoring a likely ever-growing list of exceptions into a library that wants to be small (even small enough to be no-alloc) doesn't sound great?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions