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

Producing an index


Longer documents, such as technical books, often contain an index. This is usually placed at the end of the document. It contains a list of words and the page numbers at which a reader can find them in the document. Such a list may contain key words, topics, or person's names.

How to do it...

Indexing may be done at the very end. Reading through the document, a command \index{keyword} should be placed for each place relevant to that key word. A good place can be right before the occurrence of that key word in the text. Don't leave a space between the \index{...} command and the indexed word.

We will use the makeidx package. We will now insert the indexing commands while writing by following these steps:

  1. Start with a document class. We will use the same class that we used in the previous recipes:

    \documentclass[parskip=half]{scrartcl}
  2. Load the makeidx package:

    \usepackage{makeidx}
  3. Use the this command to generate the index:

    \makeindex
  4. Begin the document:

    \begin{document}
  5. Write the...