typst / typst/hypher

Variable penalty?

Open
#16 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
142
Forks
20
PR merge metrics
No merged PRs in 30d

Description

It would be amazing if this could support dictionaries with variable penalties for hyphenation, like in Hunspell-like dictionaries.

For example, hyph_pl_PL.dic might include entries like:

.nie8ch9że.

where . I believe mean word boundaries (as there might be more generic rulesand digits mean the penalties, thusniechżewith the minimum value of 8 might be hyphenated asnie-ch-żeand 9 asniech-że` only.

One could also implement a weighted approach, with the library trying to find the lowest penalty hyphenation along with the best alignment of the text.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by locating the dictionary parsing and hyphenation entry points, then determine how a Hunspell-like entry such as .nie8ch9że. should represent penalties; done means variable-penalty dictionaries are parsed and produce the requested lowest-penalty hyphenation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.