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

Constructing a flowchart


In the previous recipe, Building smart diagrams, we used predefined chart types. In a case when we would need more flexibility, we can do it ourselves from scratch. It's also not too hard, and it's a very good way of learning to draw with TikZ.

We will create a flowchart depicting the decision-making procedure for choosing a math environment.

Similar to what we saw in our description diagram of the first recipe, we will do the following:

  1. Define shapes and colors.

  2. Place nodes using a matrix.

  3. Insert labeled arrows between selected nodes.

Of course, whatever is done in each step may be modified at any time. It's usual to place nodes and arrows at first, and then start fine-tuning shapes and colors.

So let's tackle it. Go through the following steps, and also look at the graphical output shown after them to understand the meaning of your drawing tasks:

  1. Start with a document class:

    \documentclass{article}
  2. We load the geometry package and specify a vertical margin so that the long...