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

Visualizing boxes of letters and symbols


LaTeX puts text and symbols in boxes and arranges them. There are boxes of whole paragraphs, but also of single letters and symbols. In this recipe, we will closely examine the dimensions of those boxes. We will also take a look at the spacing in between and the resulting dimensions of dynamically adjusted space. This will give us a better understanding of the typesetting.

How to do it...

We will additionally load the package lua-visual-debug. Then, we will compile the document with LuaLaTeX, as follows:

  1. Open your document or any sample file. Again, we will use the document from our first recipe in Chapter 1, The Variety of Document Types.

  2. Add the following line at the end of your preamble:

    \usepackage{lua-visual-debug}
  3. Switch to LuaLaTeX in your editor for typesetting and compile the document. Take a look at these cutouts of the output. The text has some annotations, as follows:

    Formulae consist of many small boxes:

Examining the boxes may give you ideas...