# British English hyphenation does not work properly. What is wrong with my code?

\documentclass[12pt,a4paper]{report}
\usepackage[british]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=false]{microtype}
\DisableLigatures[f]{encoding = T1}
\microtypecontext{spacing=nonfrench}
\usepackage{geometry}
\geometry{
left=2cm,
right=2cm,
top=2cm,
bottom=2cm,
bindingoffset=0mm
}
\begin{document}
\noindent Note that the word “values” is not hyphenated as “val-ues”.
\begin{enumerate}
\item it could list every single one of them so that one knows that there are multiple mode values in a data set.
\item it could list every single one of them so that one knows that there are multiple mode val- ues in a data set.
\end{enumerate}
\noindent\rule{\textwidth}{0.1mm}\\

\noindent In the following example, the word “determined” is not hyphenated.
\vspace{3mm}

\noindent In a statistical hypothesis test, the \textbf{probability of an alpha error} (error probability) is determined. If the latter is low, $H_0$ can be rejected in favour of $H_1$!
\vspace{3mm}

\noindent In a statistical hypothesis test, the \textbf{probability of an alpha error} (error probability) is deter- mined. If the latter is low, $H_0$ can be rejected in favour of $H_1$!
\end{document}


• since the line can be broken without hyphenation why do you expect it to be hyphenated. More serious is the reported underfull hbox with (maximum) badness of 10000 from the mis-use of \\  – David Carlisle Jan 15 '18 at 19:16
• I would like everything to be hyphenated if it is possible. What you mean with hbox? The horizontal line? This line is not important. It is just an example. – Nemgathos Jan 15 '18 at 19:24
• I mean your example produces the warning Underfull \hbox (badness 10000) in paragraph at lines 22--23 You would need to define "hyphenated if possible" tex assigns a cost to hyphenation and a cost to stretching space and does a least cost optimisation over the whole paragraph. Unlike Word it does not just fill line by line breaking wherever possible. If you make the cost of hyphenation sufficiently low tex will break at every possible hyphenation point and you will only have one syllable per line, presumably you do not want that? – David Carlisle Jan 15 '18 at 19:27
• you could put \pretolerance=0 \hyphenpenalty=-10000 after \begin{document} to make it hyphenate as much as possible (but don't:-) Or you could use \setlength\spaceskip{.3em plus .1em minus .1em} to restrict the interword stretch/shrink, or lots of other possibilities, but hyphenation is working properly in the original. – David Carlisle Jan 15 '18 at 19:43
• that isn't achievable, if you are using left justified text you can fix the inter word space as all flexibility can be placed to the right, but for justified text (even with microtype) you need to allow interword space to stretch /shrink. \spacekip only has one parameter, a skip value that is used between words, replacing the font specified interword space. But a general discussion of tex's line breaking and white space parameters is way beyond the scope of the question as phrased, which is about hyphenation. – David Carlisle Jan 15 '18 at 20:37

There is nothing wrong with the hyphenation in your example. Line breaks are chosen to avoid too many hyphens, and your examples allow good breaking between words. To see what hyphenation points are allowed in a given word you can use \showhyphens. In your document

   \showhyphens{values determined}


prints

   [] \T1/cmr/m/n/12 val-ues de-term-ined


in the log file, demonstrating indeed that both words have valid breaking points. As suggested in the comments you can force some of these into use by providing different parameters to the paragraph breaking algorithm, but you are not improving the printed output.

\documentclass[12pt,a4paper]{report}

\usepackage[british]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{ragged2e}
\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=false]{microtype}
\DisableLigatures[f]{encoding = T1}
\microtypecontext{spacing=nonfrench}
\usepackage{geometry}
\geometry{
left=2cm,
right=2cm,
top=2cm,
bottom=2cm,
bindingoffset=0mm
}
\begin{document}

\pretolerance=0 \hyphenpenalty=-5000  \RaggedRight \setlength\spaceskip{.25em}

\begin{enumerate}
\item it could list every single one of them so that one knows that there are multiple mode values in a data set.
\end{enumerate}
\vspace{3mm}

\noindent In a statistical hypothesis test, the \textbf{probability of
an alpha error} (error probability) is determined. If the latter is
low, $H_0$ can be rejected in favour of $H_1$!

\end{document}