Improving justification and hyphenation
Occasionally, you may get warnings such as “overfull \hbox" or notice words hanging into the margin. This indicates that LaTeX had severe problems with justification. Now, we will look at how to improve such a situation by ensuring proper hyphenation and integrating microtypographic support.
How to do it...
We can start with any document. We will optimize it by applying particular settings in the preamble. If you don’t have a document readily available, you can take one from the code package for this book, specifically for the first chapter, or download one from https://latex-cookbook.net. Take the following steps:
- Load the babel package with your document languages as options. Use the preferred language as the last option:
\usepackage[ngerman,english]{babel}
- If you would like to use handy shortcuts of ngerman with English too, add the following lines:
\useshorthands{"} \addto\extrasenglish{\languageshorthands...