Absolute positioning of text
LaTeX takes care of full justification, balancing text height, and positioning floating objects such as figures and tables. It does a great job, but sometimes, we may need to tell LaTeX to put text or an image precisely at a specific 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 precise positioning. We will print text at the edge of the page, in the middle, and at specific positions. We will break down the code into small steps. However, you can copy the entire code from GitHub or the book’s website at https://latex-cookbook.net.
Follow these steps:
- Start with any document class. We chose the article class with A5 paper size.
\documentclass[a5paper]{article}
- Load the lipsum package so that you can generate placeholder text:
\usepackage{lipsum}
- Load the graphicx...