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:
- Load the package
babel
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 the
ngerman
package with English too, add the following lines of code:\useshorthands{"} \addto\extrasenglish{\languageshorthands{ngerman}}
- Load the
fontenc
package with theT1
option set:\usepackage[T1]{fontenc}
- Load the
microtype
package for improved micro-typography...