\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}
Asked
Active
Viewed 679 times
0
Nemgathos
- 545
- 3
- 15
1 Answers
2
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}
Andrew Swann
- 95,762


\\– David Carlisle Jan 15 '18 at 19:16hbox? The horizontal line? This line is not important. It is just an example. – Nemgathos Jan 15 '18 at 19:24Underfull \hbox (badness 10000) in paragraph at lines 22--23You 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\pretolerance=0 \hyphenpenalty=-10000after\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\spaceskipa little further? I would just like to have at least the minimum width of spaces everywhere. By that, I mean the width of spaces used when writing left-justified text. In essence, I would like to have a hyphenation like in Word, OpenOffice or Libre Office if that is possible. – Nemgathos Jan 15 '18 at 20:12\spacekiponly 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