Unleash the power of LaTeX to create professional text, articles, diagrams, and charts using TikZ and its wide range of features for stunning 2D and 3D effects
Key Features
• Achieve native construction of images and diagrams in your LaTex theses, articles, or books with enhanced quality
• Discover comprehensive explanations and real-world use cases to apply in your own endavors
• Explore customizations and tweaks to grasp the synergy of LaTeX and TikZ graphics
Book Description
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.
What you will learn
• Understand the TikZ language and how to use its libraries and packages
• Draw geometric shapes with text and add arrows, labels, and decorations
• Apply transformations and use transparency, shading, fading, and filling features
• Define styles and program with loops to streamline your code
• Build trees, graphs, and mind maps and draw easy curves with smooth transitions
• Produce block diagrams and flow charts to visualize process steps
• Generate line charts and bar charts to showcase your data
• Plot data sets and mathematical functions in two and three dimensions
Who this book is for
This book is for LaTeX users, including students and academic authors, seeking to incorporate figures such as diagrams, plots, and graphics to their theses, articles, and books. If you're familiar with LaTeX basics from beginner's books or tutorials, you'll be able to effortlessly explore the graphics topics in this book.
Author(s): Stefan Kottwitz
Edition: 1
Publisher: Packt Publishing
Year: 2023
Language: English
Commentary: Publisher's PDF
Pages: 304
City: Birmingham, UK
Tags: LaTeX; Charts; Typography; TikZ; Plots
Cover
Title Page
Copyright
Dedication
Contributors
Table of Contents
Preface
Chapter 1: Getting Started with TikZ
Technical requirements
What is TikZ?
Alternative graphics packages
The LaTeX picture environment
MetaPost
Asymptote
PSTricks
Benefits of TikZ
Installing TikZ
With a vanilla TeX distribution
With an operating system TeX installation
Installing from sources
Working with the TikZ documentation
Creating our first TikZ figure
Summary
Further reading
Chapter 2: Creating the First TikZ Images
Technical requirements
Using the tikzpicture environment
Working with coordinates
Cartesian coordinates
Polar coordinates
Three-dimensional coordinates
Using relative coordinates
Using units
Drawing geometric shapes
Using colors
Summary
Further reading
Chapter 3: Drawing and Positioning Nodes
Technical requirements
Understanding nodes
Using shapes and anchors
A rectangle shape
The circle and ellipse shapes
The coordinate shape
More shapes
Spacing within and around nodes
Positioning and aligning nodes
Using anchors and relative positioning
Placing nodes along a line
Aligning nodes at the text baseline
Aligning whole pictures at a node text baseline
Adding labels and pins
Putting images into nodes
Summary
Further reading
Chapter 4: Drawing Edges and Arrows
Technical requirements
Connecting nodes by edges
Adding text to edges
Diving deeper into edge options
Path options
Connection options
Drawing arrows
Mathematical arrow tips
Barbed arrow tips
Geometric arrow tips
Customizing arrow tips
Using the to operation
Summary
Further reading
Chapter 5: Using Styles and Pics
Technical requirements
Understanding styles
Defining and using styles
Inheriting styles
Using styles globally and locally
Giving arguments to styles
Creating and using pics
Summary
Further reading
Chapter 6: Drawing Trees and Graphs
Technical requirements
Drawing trees
Creating mind maps
Producing graphs
Positioning in a matrix
Summary
Further reading
Chapter 7: Filling, Clipping, and Shading
Technical requirements
Filling an area
Understanding the path interior
The nonzero rule
The even odd rule
Comparing the nonzero rule and the even odd rule
Clipping a drawing
Reverse clipping
Shading an area
Axis shading
Radial shading
Ball shading
Bilinear interpolation
Color wheel
Summary
Further reading
Chapter 8: Decorating Paths
Technical requirements
Pre- and post-actions for using a path multiple times
Understanding decorations
Exploring the available decoration types
Morphing paths
Replacing paths with ticks
Decorating paths with text
Adding markings
Adjusting decorations
Summary
Further reading
Chapter 9: Using Layers, Overlays, and Transparency
Technical requirements
Using transparency
Drawing on background and foreground layers
Overlaying LaTeX content with TikZ drawings
Positioning pictures on the background of a page
Summary
Further reading
Chapter 10: Calculating with Coordinates and Paths
Technical requirements
Repeating in loops
Calculating with coordinates
Adding and subtracting coordinates
Computing points between coordinates
Projecting on a line
Adding angles
Evaluating loop variables
Counting loop repetitions
Evaluating the loop variable
Remembering the loop variable
Calculating intersections of paths
Summary
Further reading
Chapter 11: Transforming Coordinates and Canvas
Technical requirements
Shifting nodes and coordinates
Rotating, scaling, and slanting
Transforming the canvas
Summary
Further reading
Chapter 12: Drawing Smooth Curves
Technical requirements
Manually creating a smooth curve through chosen points
Using a smooth plot to connect points
Specifying cubic Bézier curves
Using Bézier splines to connect given points
Using the Hobby algorithm for smoothly connecting points
Summary
Further reading
Chapter 13: Plotting in 2D and 3D
Technical requirements
Introducing plotting
Creating and customizing Cartesian axes, ticks, and labels
Understanding axis environments
Customizing ticks and labels
Using plotting commands and options
Filling the area between plots
Calculating plot intersections
Adding a legend
Using the polar coordinate system
Parametric plotting
Plotting in three dimensions
Summary
Further reading
Chapter 14: Drawing Diagrams
Technical requirements
Creating flowcharts
Linear flow diagrams
Circular flow diagrams
Building relationship diagrams
Writing descriptive diagrams
Producing quantitative diagrams
Line charts
Bar charts
Pie charts
Wheel charts
Summary
Further reading
Chapter 15: Having Fun with TikZ
Technical requirements
Drawing cute creatures
Playing with rubber ducks
Meeting the TikZlings
Building snowmen
Playing with penguins
Picturing people
Playing and crafting
Creating jigsaw puzzles
Building with bricks
Drawing world flags
Index
About Packt
Other Books You May Enjoy