Book Image

LaTeX Graphics with TikZ

By : Stefan Kottwitz
5 (3)
Book Image

LaTeX Graphics with TikZ

5 (3)
By: Stefan Kottwitz

Overview of this book

In this first-of-its-kind TikZ book, you’ll embark on a journey to discover the fascinating realm of TikZ—what it’s about, the philosophy behind it, and what sets it apart from other graphics libraries. From installation procedures to the intricacies of its syntax, this comprehensive guide will help you use TikZ to create flawless graphics to captivate your audience in theses, articles, or books. You’ll learn all the details starting with drawing nodes, edges, and arrows and arranging them with perfect alignment. As you explore advanced features, you’ll gain proficiency in using colors and transparency for filling and shading, and clipping image parts. You’ll learn to define TikZ styles and work with coordinate calculations and transformations. That’s not all! You’ll work with layers, overlays, absolute positioning, and adding special decorations and take it a step further using add-on packages for drawing diagrams, charts, and plots. By the end of this TikZ book, you’ll have mastered the finer details of image creation, enabling you to achieve visually stunning graphics with great precision.
Table of Contents (18 chapters)

What this book covers

Chapter 1, Getting Started with TikZ, introduces TikZ. It discusses alternative graphics packages and emphasizes TikZ’s benefits. You’ll thoroughly understand what TikZ is all about and its unique philosophy. You’ll receive guidance on installing TikZ, and you will walk through creating a small drawing. Additionally, you will get helpful tips for accessing TikZ’s and other packages’ documentation.

Chapter 2, Creating the First TikZ Images, walks you through creating a LaTeX document with a drawing from scratch. You will gain a solid understanding of the TikZ syntax and learn about cartesian and polar coordinates in two and three dimensions. Additionally, you’ll learn how to create basic geometric shapes and incorporate color into your designs.

Chapter 3, Drawing and Positioning Nodes, introduces the fundamental concept of nodes. You’ll learn how to draw nodes in various shapes, position and align them, and add text, images, and labels.

Chapter 4, Drawing Edges and Arrows, shows how to connect nodes by edges, straight and curvy lines, and arrows. You’ll see how to add text labels on the edges and adjust alignment, position, and orientation. You’ll learn to use line styles and customized arrow tips in one or both directions.

Chapter 5, Using Styles and Pics, teaches you how to define and apply global and local styles for TikZ elements. You will learn how to use styles on nodes and edges and apply them to entire pictures or selected parts of a picture using scopes. Additionally, you will learn about using mini TikZ pictures as building blocks.

Chapter 6, Drawing Trees and Graphs, guides you through creating tree structures to depict parent-child relationships hierarchically. It shows how to draw mind maps to visualize ideas and introduces a concise syntax for generating graphs. Additionally, this chapter offers a practical technique for arranging objects in a matrix format similar to LaTeX’s tabular environment.

Chapter 7, Filling, Clipping, and Shading, starts with more advanced techniques. You’ll learn how to fill complex paths, clip pictures to specific areas, and add shading that transitions smoothly from one color to another.

Chapter 8, Decorating Paths, introduces techniques for adding creative effects to lines and curves, such as making them wavy, zigzag, or bumpy. You’ll also learn how to print text along a curved path and apply multiple actions on a single path.

Chapter 9, Using Layers, Overlays, and Transparency, demonstrates how to create drawings on different layers, allowing you to place objects behind text or images. You will learn how to use transparency to improve this effect. Additionally, you will discover how to superimpose TikZ annotations on top of regular LaTeX text and add background images to document pages, similar to watermarks.

Chapter 10, Calculating with Coordinates and Paths, shows the efficient way of letting TikZ calculate coordinate values. This chapter covers coordinate calculation, distance and projection calculation, and calculating intersections of paths. You’ll also discover how to save time and streamline your code by using loops to repeat commands.

Chapter 11, Transforming Coordinates and Canvas, focuses on shifting, rotating, and scaling nodes and coordinates using transformations. You’ll learn skills that enable you to make precise adjustments and repositioning, whether you need to make minor tweaks or complex changes to your drawings.

Chapter 12, Drawing Smooth Curves, explores different methods to draw easy curves smoothly with gentle slopes, smooth transitions, and without sharp corners or spikes, similar to freehand-like drawings.

Chapter 13, Plotting in 2D and 3D, deals with visualizing data in a coordinate system. It covers customizing Cartesian and polar axes and adding legends, plotting explicit and parametric functions in 2D and 3D, calculating plot intersections, and filling between plots.

Chapter 14, Drawing Diagrams, shows how to create flowcharts, relationship diagrams, descriptive diagrams, and quantitative diagrams. The emphasis is on using packages to generate whole diagrams in a more automated way.

Chapter 15, Having Fun with TikZ, showcases examples of how skilled TikZ users enjoyed programming add-on packages and sharing them with the TikZ community. You’ll see how to draw cute animals, human shapes, nation flags, and game pieces.