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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Typesetting in a grid


Besides full horizontal justification, LaTeX also adjusts the page content vertically to get a consistent page height. So, internal spacing is often variable. Furthermore, implicit spaces are often independent of the baseline height.

Consequently, lines of adjacent pages may look shifted. For two-sided prints with very thin paper, matching base lines would look much better. Especially in two-column documents it may be desirable to have baselines of adjacent lines at exactly the same height.

In this recipe, we would like to arrange lines on a grid. Normal text lines will be placed at a baseline grid. Displayed formulas, figures, tables, and captions are allowed to have a different baseline, but the following text should return to the grid.

How to do it...

We will use the grid package, which has been developed for grid typesetting. Follow these steps:

  1. Prepare a small, two-column example with dummy text, where we can apply the grid commands. Here is a simple code snippet that...