Repository navigation
Install hyphen-* packages when babel can't define the language #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+107
−9
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
addc754
Install hyphen-* packages when missing patterns cause a babel error (…
cderv 1038ac7
Only keep valid package names inferred from babel/polyglossia messages
cderv dd739fe
Map Indic language names to hyphen-indic
cderv d33c079
Map older hyphenation language names to their packages
cderv 0997537
Update NEWS for hyphen package name validation and extra mappings
cderv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to retrieve these names programmatically (from
language.dat/texlive.tlpdb) so we don't need to hardcode them here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I did get all them from
texlive.tlpdbbut I think I needed to download it and it was not locally available in my install. Though it was quick.So I can see if I can extract the logic to either generate this list on a schedule basis or before each release we do, instead of dynamically.
but you're right - this list came from an analysis of some data I made.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked again at where these names came from, and I don't think we can read them from the local files.
language.datand the localtexlive.tlpdbonly contain the packages that are installed. The package we are looking for is the missing one, so it is never in there. The full list is only in the remotetexlive.tlpdb, in theexecute AddHyphen name=... synonyms=...lines of each package.tlmgr does keep a cached copy of the remote db (
tlpkg/texlive.tlpdb.main.<md5>, ~20MB) and it has all the names. But we delete these files ourselves when building the bundles, and also withoptions(tinytex.delete_tlpdb = TRUE):tinytex/R/tlmgr.R
Lines 258 to 262 in 0997537
So we can't count on it, and we would still need the table as a fallback. Using
tlmgr dump-tlpdb --remoteinstead would download the full db each time this error happens, which seems too much for this.What we could do is generate the table instead: a script in
tools/that downloadstexlive.tlpdb.xzfrom CTAN, parses theAddHyphenlines, and writes the table as R code, keeping only the names whose package is nothyphen-<name>. We could run it before each release, or in a scheduled workflow that opens a PR when the table changes. I tried a quick version and it gives the same 37 entries as here, plus the 4german-x-*names from dehyph-exptl that I listed as not handled in the PR description.I would do this in a follow-up PR, and we can discuss there the best way ?