Book Image

LaTeX Cookbook

By : Stefan Kottwitz
Book Image

LaTeX Cookbook

By: Stefan Kottwitz

Overview of this book

LaTeX is a high-quality typesetting software and is very popular, especially among scientists. Its programming language gives you full control over every aspect of your documents, no matter how complex they are. LaTeX's huge amount of customizable templates and supporting packages cover most aspects of writing with embedded typographic expertise. With this book you will learn to leverage the capabilities of the latest document classes and explore the functionalities of the newest packages. The book starts with examples of common document types. It provides you with samples for tuning text design, using fonts, embedding images, and creating legible tables. Common document parts such as the bibliography, glossary, and index are covered, with LaTeX's modern approach.You will learn how to create excellent graphics directly within LaTeX, including diagrams and plots quickly and easily. Finally, you will discover how to use the new engines XeTeX and LuaTeX for advanced programming and calculating with LaTeX. The example-driven approach of this book is sure to increase your productivity.
Table of Contents (19 chapters)
LaTeX Cookbook
About the Author
About the Reviewers

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 Let's proceed:

  1. Load the package babel with your document languages as options. Use the preferred language as the last option:

  2. If you would like to use handy shortcuts of the ngerman package with English too, add the following lines of code:

  3. Load the fontenc package with the T1 option set:

  4. Load the microtype package for improved micro-typography: