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

Absolute positioning of text


LaTeX takes care of full justification, text height balancing, and placing floating objects such as figures and tables. It does a great job, but sometimes one may need to tell LaTeX to place text or an image exactly at a certain position on a page.

Most positioning commands work in relation to the current position in the document. Now we would like to output text at an absolute position.

How to do it...

We will use the eso-pic package for positioning. We will print text at the edge of the page, in the middle, and at specific positions. We will break down the code in to fine steps. However, you can copy the code as a whole from the book's website at https://www.packtpub.com or from http://latex-cookbook.org.

Follow these steps:

  1. Start with any document class. We chose the article package with A5 paper here:

    \documentclass[a5paper]{article}
  2. Load the lipsum package so that you can generate dummy text:

    \usepackage{lipsum}
  3. Load the graphicx package; we will later use its rotating...