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)

Using styles globally and locally

Using the \tikzset command, you can define styles globally for your whole document. This is especially useful when you have several similar drawings in your document. For example, in a book about graph theory, you` probably want to have the same styles for vertices, edges, and labels in all drawings throughout the book, so it’s good to use \tikzset in the preamble.

In older documents, you will see the \tikzstyle command with the following form:

\tikzstyle{my style} = [options]

That command is deprecated and should not be used anymore, according to the TikZ creator, so bear this in mind when you see it in older code on the internet.

In situations where styles between drawings are different, it can be preferable to define styles locally, so they are only valid in a single picture. That can be done by setting the styles as options in the tikzpicture environment. For example, if you have a drawing where you want to have a particular...