Use the ‘usenglishmax’ hyphenation patterns from hyph-utf8? (pdfLaTeX, TeXLive, ubuntu)

hyphenationpdftextexlive

I am using pdfLaTeX from TeXLive on Kubuntu 20.04. Suppose that the LaTeX document I am writing is entirely in U.S. English.

How can I use the usenglishmax hyphenation patterns (which are mentioned at the end of this) from hyph-utf8? Does one use it in conjunction with hyphsubst? Does one need to use babel, even if the entire text is in U.S. English?

I find the documentation quite unclear.

In particular, is the following the correct usage?
(This is adapted from the Speravir's comments to this answer.)

\documentclass[10pt]{article}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc} 
\usepackage{hyphsubst} 
\HyphSubstIfExists{hyph-en-us}{\HyphSubstLet{english}{hyph-en-us}}{}  
\usepackage[english]{babel}

\usepackage{testhyphens}

\begin{document}

% just for testing purposes, let's set these to zero
\lefthyphenmin=0
\righthyphenmin=0
% must be done after \begin{document}, because it seems 'babel'
% sets these at that point
%
% The defaults for U.S. English are  
% \lefthyphenmin=2 and \righthyphenmin=3

\thispagestyle{empty}

% testing on the first ten entries from the
% 2021 version of ushyphex.tex
% (https://ctan.org/pkg/hyphenex)

\begin{checkhyphens}{}
academy academies accusative acronym acronyms
acupuncture acupuncturist adamant addable addible
\end{checkhyphens}

\end{document}

Lastly, on what words can I test it (say, using the package testhyphens)? In other words, what are some words that get hyphenated with usenglishmax that are not hyphenated in a LaTeX document that doesn't use usenglishmax?

For what it's worth, in the example above, all ten words get hyphenated that same regardless of whether the lines

\usepackage{hyphsubst} 
\HyphSubstIfExists{hyph-en-us}{\HyphSubstLet{english}{hyph-en-us}}{}

are commented out or not.

On the other hand, if the line \usepackage[english]{babel} is also commented out, then some of the words get hyphenated differently.

Appendix:

enter image description here

Best Answer

You want to change the language name; mentioning the hyphenation pattern file is useless.

\documentclass[10pt]{article}
\usepackage[T1]{fontenc}
\usepackage{hyphsubst}

\HyphSubstLet{english}{usenglishmax}

\usepackage{testhyphens}

\begin{document}

\lefthyphenmin=0
\righthyphenmin=0

\thispagestyle{empty}

\begin{checkhyphens}{}
academy academies accusative acronym acronyms
acupuncture acupuncturist adamant addable addible
algebraically
antiderivative
\end{checkhyphens}

\end{document}

enter image description here

If I comment the substitution line, I get

enter image description here

Thus you see that new patterns are used. Still, you're not guaranteed to get everything is in the hyphenation exception list ushyphex.tex.

With

\HyphSubstLet{english}{usenglishmax}
\input{ushyphex}

one gets

enter image description here

Related Question