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

Generating a timeline


By using a basic TikZ function, it's not too hard to create a line and add some ticks, date values, and annotations. But it can require a lot of work, until it looks nice.

This recipe will show you another colorful and predesigned way: using the timeline library.

Getting ready

Until the timelime library officially becomes part of TikZ or becomes available on CTAN, you can download the tikzlibrarytimeline.code.tex file from its author's repository at https://github.com/cfiandra/timeline. You can install it in the TeX tree like any other package, but the easiest way is to simply put it into the same folder as your main TeX document.

How to do it...

The timelime library builds on TikZ, but also provides its own high-level commands. Follow these steps:

  1. Start with a document class whose paper size is big enough:

    \documentclass[a3paper]{article}
  2. Load the geometry package with the landscape option, since your diagram will be wider than it is high:

    \usepackage[landscape]{geometry}
  3. Load...