summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-20 03:00:48 +0000
committerNorbert Preining <norbert@preining.info>2019-12-20 03:00:48 +0000
commit18d9ec0eba21e6b8c55cdd50afb91c56e02ce7bf (patch)
tree56de5f55a6575a68557d5a384f57e3e8566c536d /graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
parent3b24b0599bb35e1a3338fa33bfb24044a6125ba4 (diff)
CTAN sync 201912200300
Diffstat (limited to 'graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex')
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex16
1 files changed, 11 insertions, 5 deletions
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
index 614177a7fa..04ec7082d9 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-tutorial.tex
@@ -471,6 +471,11 @@ use another color.
\end{tikzpicture}
\end{codeexample}
+ In this example, the definition of the style |Karl's grid| is given as an
+ optional argument to the |{tikzpicture}| environment. Additional styles for other
+ elements would follow after a comma. With many styles in effect, the optional
+ argument of the environment may easily happen to be longer than the actual
+ contents.
\subsection{Drawing Options}
@@ -609,6 +614,7 @@ It is also possible to place the bend somewhere else:
The operations |sin| and |cos| add a sine or cosine curve in the interval
$[0,\pi/2]$ such that the previous current point is at the start of the curve
and the curve ends at the given end point. Here are two examples:
+%
\begin{codeexample}[]
A sine \tikz \draw[x=1ex,y=1ex] (0,0) sin (1.57,1); curve.
\end{codeexample}
@@ -868,7 +874,7 @@ do not care about arrow tips.
It turns out that adding arrow tips is pretty easy: Karl adds the option |->|
to the drawing commands for the axes:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{intersections}}]
\begin{tikzpicture}[scale=3]
\clip (-0.1,-0.2) rectangle (1.1,1.51);
\draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
@@ -918,7 +924,7 @@ specification. For example, if Karl says |>=Stealth|, then he tells \tikzname\
that he would like ``stealth-fighter-like'' arrow tips:
\todosp{remaining instance of bug \#473}
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{arrows.meta}}]
\begin{tikzpicture}[>=Stealth]
\draw [->] (0,0) arc [start angle=180, end angle=30, radius=10pt];
\draw [<<-,very thick] (1,0) -- (1.5cm,10pt) -- (2cm,0pt) -- (2.5cm,10pt);
@@ -1040,7 +1046,7 @@ All of these can be used together with \tikzname, so if you are familiar with
them, feel free to use them. \tikzname\ introduces yet another command, called
|\foreach|, which I introduced since I could never remember the syntax of the
other packages. |\foreach| is defined in the package |pgffor| and can be used
-independently \tikzname, but \tikzname\ includes it automatically.
+independently of \tikzname, but \tikzname\ includes it automatically.
In its basic form, the |\foreach| command is easy to use:
%
@@ -1232,7 +1238,7 @@ this places the label in the middle of the line, but the |pos=| options can be
used to modify this. Also, options like |near start| and |near end| can be used
to modify this position:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{intersections}}]
\begin{tikzpicture}[scale=3]
\clip (-2,-0.2) rectangle (2,0.8);
\draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
@@ -1369,7 +1375,7 @@ The |angle| pic draws an angle between the two lines $BA$ and $BC$, where $A$,
$B$, and $C$ are three coordinates. In our case, $B$ is the origin, $A$ is
somewhere on the $x$-axis and $C$ is somewhere on a line at $30^\circ$.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{angles,quotes}}]
\begin{tikzpicture}[scale=3]
\coordinate (A) at (1,0);
\coordinate (B) at (0,0);