Improving justification and hyphenation

Sometimes, you may get warnings like overfull \hbox, or you may notice words hanging in the margin. This is a sign that LaTeX has had serious problems with justification. Now, we will take a look at how to improve that.

How to do it...

You can start with any document. We will optimize it with settings in the preamble. If you don't have one at hand, you can take one from the code package for this book, specifically for the first chapter, or download one at http://latex-cookbook.net. Let's proceed:

  1. Load the package babel with your document languages as options. Use the preferred language as the last option:
    \usepackage[ngerman,english]{babel}
  2. If you would like to use handy shortcuts of the ngerman package with ...

Get LaTeX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.