3

Drawing and Positioning Nodes

Text elements of TikZ pictures are called nodes. This feature gives you excellent control over placing and arranging text in graphics, and you can combine it with additional drawing elements.

In this chapter, you will learn how to draw nodes with various shapes containing text and how to position them.

We will deal with the following topics:

  • Understanding nodes
  • Using shapes and anchors
  • Positioning and aligning nodes
  • Adding labels and pins
  • Spacing within and around nodes
  • Putting images into nodes

By the end of this chapter, you will be ready to draw your first images with text elements.

Technical requirements

You need either a local LaTeX installation on your PC or an online compiler such as Overleaf or the book’s ...

Get LaTeX Graphics with TikZ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.