latex3 / babel

The babel system for LaTeX, LuaLaTeX and XeLaTeX
LaTeX Project Public License v1.3c
125 stars 34 forks source link

typos in \babelposthyphenation should NOT remain silent #188

Closed ghost closed 1 year ago

ghost commented 1 year ago

Running lualatex on

\documentclass{standalone}
\usepackage[USenglish]{babel}
\babelposthyphenation{USenglish}{in|sert}
{
  {}, {},        % in
  {pre=-, penatly=1000, data=2}, %%% a typo; „penatly“ doesn't exist
  {}, {}, {}, {} % sert
}
\showoutput
\begin{document}
  insert
\end{document}

doesn't raise any eyebrow: the misspelling penatly is silently swallowed. No warning, error, a message on undefined stuff, or a message on missing stuff is issued. The output is as if we had penalty=50 instead of penatly=1000. Such errors can be caught only if someone really turns on \showoutput and scrutinizes the output with the best of their eyesight.

We wish that any unknown stuff in \babelhyphenation is complained about, e.g., by issuing an error.

jbezos commented 1 year ago

And this isn’t the only case. Another one is \babelprovide, among others. I’ll improve it in the next versions.