diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex index 614177a7fa5..04ec7082d9b 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex +++ b/Master/texmf-dist/doc/generic/pgf/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); |