diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main.tex | 339 |
1 files changed, 263 insertions, 76 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main.tex index 4850378c8e8..0384b1a2d32 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-main.tex @@ -12,13 +12,49 @@ % generic/pgf/utilities/pgfrcs.code.tex \def\xcolorversion{2.00} -\def\xkeyvalversion{1.8} -\usepackage[version=0.96]{pgf} - -\usepackage{tikz} - -\usetikzlibrary{arrows,patterns,plotmarks,shapes,snakes,er,3d,automata,backgrounds,topaths,trees,petri,mindmap,matrix,calendar,folding} +\usepackage[version=latest]{pgf} + +\usepackage{xkeyval,calc,listings,tikz} + +% We need lots of libraries... +\usetikzlibrary{% + arrows,% + calc,% + fit,% + patterns,% + plotmarks,% + shapes.geometric,% + shapes.misc,% + shapes.symbols,% + shapes.arrows,% + shapes.callouts,% + shapes.multipart,% + shapes.gates.logic.US,% + shapes.gates.logic.IEC,% + er,% + automata,% + backgrounds,% + chains,% + topaths,% + trees,% + petri,% + mindmap,% + matrix,% + calendar,% + folding,% + fadings,% + through,% + positioning,% + scopes,% + decorations.fractals,% + decorations.shapes,% + decorations.text,% + decorations.pathmorphing,% + decorations.pathreplacing,% + decorations.footprints,% + decorations.markings,% + shadows} \usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead]{geometry} \usepackage{amsmath,amssymb} @@ -40,49 +76,191 @@ %\includeonly{} % Global styles: -\tikzstyle{every plot}=[prefix=plots/pgf-] -\tikzstyle{shape example}=[color=black!30,draw,fill=yellow!30,line width=.5cm,inner xsep=2.5cm,inner ysep=0.5cm] +\tikzset{ + every plot/.style={prefix=plots/pgf-}, + shape example/.style={ + color=black!30, + draw, + fill=yellow!30, + line width=.5cm, + inner xsep=2.5cm, + inner ysep=0.5cm} +} -\index{Options for graphics|see{Graphic options}} +\index{Options for graphics|see{Graphic options and styles}} +\index{Styles for graphics|see{Graphic options and styles}} \index{Options for packages|see{Package options}} +\index{Handlers for keys|see{Key handlers}} \index{File|see{Packages and files}} \index{Layout|see{Page layout}} \index{Node|see{Predefined node}} \begin{document} -%\include{pgfmanual-en-base-external} +%\include{pgfmanual-en-base-decorations} %\end{document} -{ - \parindent0pt -\vbox{} -\vskip 3.5cm -\Huge -\tikzname\ and \pgfname -\Large -Manual for version \pgfversion -\vskip 3cm +% The titlepage -\begin{codeexample}[graphic=white] -\tikzstyle{level 1}=[sibling angle=120] -\tikzstyle{level 2}=[sibling angle=60] -\tikzstyle{level 3}=[sibling angle=30] -\tikzstyle{every node}=[fill] -\tikzstyle{edge from parent}=[snake=expanding waves,segment length=1mm,segment angle=10,draw] - -\tikz [grow cyclic,shape=circle,very thick,level distance=13mm,cap=round] - \node {} child [color=\A] foreach \A in {red,green,blue} - { node {} child [color=\A!50!\B] foreach \B in {red,green,blue} - { node {} child [color=\A!50!\B!50!\C] foreach \C in {black,gray,white} - { node {} } - } - }; -\end{codeexample} -\vskip 0cm plus 1.5fill -\vbox{} +{ + \parindent0pt + \null + \colorlet{mintgreen}{green!50!black!50} + + \thispagestyle{empty} + \vskip3cm + \vfill + \hfil + \begin{tikzpicture}[overlay] + \coordinate (front) at (0,0); + \coordinate (horizon) at (0,.31\paperheight); + \coordinate (bottom) at (0,-.6\paperheight); + \coordinate (sky) at (0,.57\paperheight); + \coordinate (left) at (-.51\paperwidth,0); + \coordinate (right) at (.51\paperwidth,0); + + \shade [bottom color=blue!30!black!10,top color=blue!30!black!50] + ([yshift=-5mm]horizon -| left) rectangle (sky -| right); + \shade [bottom color=black!70!green!25,top color=black!70!green!10] + (front -| left) -- (horizon -| left) + decorate [decoration=random steps] { -- (horizon -| right) } + -- (front -| right) -- cycle; + \shade [top color=black!70!green!25,bottom color=black!25] + ([yshift=-5mm-1pt]front -| left) rectangle ([yshift=1pt]front -| right); + \fill [black!25] (bottom -| left) rectangle ([yshift=-5mm]front -| right); + + \def\nodeshadowed[#1]#2;{\node[scale=2,above,#1]{#2};\node[scale=2,above,#1,yscale=-1,scope fading=south,opacity=0.4]{#2};} + + \nodeshadowed [at={(-5,5 )},yslant=0.05] {\Huge Ti\textcolor{orange}{\emph{k}}Z}; + \nodeshadowed [at={( 0,5.3)}] {\huge \textcolor{mintgreen}{\&}}; + \nodeshadowed [at={( 5,5 )},yslant=-0.05] {\Huge \textsc{PGF}}; + \nodeshadowed [at={( 0,2 )}] {Manual for Version \pgftypesetversion}; + + \foreach \i in {0.5,0.6,...,2} + \fill [white,decoration=Koch snowflake,opacity=.9] + [shift=(horizon),shift={(rand*11,rnd*7)},scale=\i] + [double copy shadow={opacity=0.2,shadow xshift=0pt,shadow + yshift=3*\i pt,fill=white,draw=none}] + decorate { + decorate { + decorate { + (0,0) -- ++(60:1) -- ++(-60:1) -- cycle + } + } + }; + + \node (left text) [text width=.5\paperwidth-2cm,below right,at={(-.5\paperwidth+1cm,-1.5cm)}] + { + \fontfamily{pcr} + \def\textbraceleft{\char`\{} + \def\textbraceright{\char`\}} + \def\textbackslash{\char`\\} + \begin{lstlisting}[basicstyle=\scriptsize\color{black}, + keywordstyle=\bfseries\color{white}, + identifierstyle=\bfseries\color{black}, + keywords={tikzpicture,shade,fill,draw,path,node}, + literate={-}{{-}}1] +\begin{tikzpicture} + \coordinate (front) at (0,0); + \coordinate (horizon) at (0,.31\paperheight); + \coordinate (bottom) at (0,-.6\paperheight); + \coordinate (sky) at (0,.57\paperheight); + \coordinate (left) at (-.51\paperwidth,0); + \coordinate (right) at (.51\paperwidth,0); + + \shade [bottom color=white, + top color=blue!30!black!50] + ([yshift=-5mm]horizon -| left) + rectangle (sky -| right); + + \shade [bottom color=black!70!green!25, + top color=black!70!green!10] + (front -| left) -- (horizon -| left) + decorate [decoration=random steps] { + -- (horizon -| right) } + -- (front -| right) -- cycle; + + \shade [top color=black!70!green!25, + bottom color=black!25] + ([yshift=-5mm-1pt]front -| left) + rectangle ([yshift=1pt]front -| right); + + \fill [black!25] + (bottom -| left) + rectangle ([yshift=-5mm]front -| right); + + \def\nodeshadowed[#1]#2;{ + \node[scale=2,above,#1]{#2}; + \node[scale=2,above,#1,yscale=-1, + scope fading=south,opacity=0.4]{#2}; + } +\end{lstlisting} +}; + + \node (right text) [text width=.5\paperwidth-2cm,below right,at={(1cm,-1.5cm)}] + { + \fontfamily{pcr} + \def\textbraceleft{\char`\{} + \def\textbraceright{\char`\}} + \def\textbackslash{\char`\\} + \begin{lstlisting}[basicstyle=\scriptsize\color{black}, + keywordstyle=\bfseries\color{white}, + identifierstyle=\bfseries\color{black}, + keywords={tikzpicture,shade,fill,draw,path,node}, + literate={-}{{-}}1] + \nodeshadowed [at={(-5,8 )},yslant=0.05] + {\Huge Ti\textcolor{orange}{\emph{k}}Z}; + \nodeshadowed [at={( 0,8.3)}] + {\huge \textcolor{green!50!black!50}{\&}}; + \nodeshadowed [at={( 5,8 )},yslant=-0.05] + {\Huge \textsc{PGF}}; + \nodeshadowed [at={( 0,5 )}] + {Manual for Version \pgftypesetversion}; + + \foreach \i in {0.5,0.6,...,2} + \fill + [white,opacity=\i/2, + decoration=Koch snowflake, + shift=(horizon),shift={(rand*11,rnd*7)}, + scale=\i,double copy shadow={ + opacity=0.2,shadow xshift=0pt, + shadow yshift=3*\i pt, + fill=white,draw=none}] + decorate { + decorate { + decorate { + (0,0)- ++(60:1) -- ++(-60:1) -- cycle + } } }; + + \node (left text) ... + \node (right text) ... + + \fill [decorate, + decoration={footprints,foot of=gnome}, + opacity=.5,brown] (left text.south) + to [out=-45,in=135] (right text.north); + \fill [decorate, + decoration={footprints,foot of=felis silvestris, + foot length=5pt,stride length=15pt,foot angle=0}, + opacity=.5,green!50!black] (left text.south) + to [out=20,in=180] (right text.north west); +\end{tikzpicture} + \end{lstlisting} + }; + + \fill [decorate,decoration=footprints, + decoration={footprints,foot of=gnome}, + opacity=.5,brown] (left text.south) + to [out=-45,in=135] (right text.north); + \fill [decorate,decoration={footprints,foot length=5pt,foot of=felis + silvestris,stride length=15pt,foot angle=0}, + opacity=.5,green!50!black] (left text.south) + to [out=20,in=180] (right text.north west); +\end{tikzpicture} +\vfill +\vbox{} \clearpage } @@ -166,6 +344,8 @@ some guidelines on how you should proceed when creating graphics using \include{pgfmanual-en-tutorial} \include{pgfmanual-en-tutorial-nodes} +\include{pgfmanual-en-tutorial-Euclid} +\include{pgfmanual-en-tutorial-chains} \include{pgfmanual-en-guidelines} @@ -183,17 +363,17 @@ this is not the case and you are the poor fellow who has to do the installation, read the present part. -\vskip2cm +\vskip1cm \begin{codeexample}[graphic=white] -\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,semithick] - \tikzstyle{every state}=[fill=red,draw=none,text=white] +\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,on grid,semithick, + every state/.style={fill=red,draw=none,circular drop shadow,text=white}] \node[initial,state] (A) {$q_a$}; - \node[state] (B) [above right of=A] {$q_b$}; - \node[state] (D) [below right of=A] {$q_d$}; - \node[state] (C) [below right of=B] {$q_c$}; - \node[state] (E) [below of=D] {$q_e$}; + \node[state] (B) [above right=of A] {$q_b$}; + \node[state] (D) [below right=of A] {$q_d$}; + \node[state] (C) [below right=of B] {$q_c$}; + \node[state] (E) [below=of D] {$q_e$}; \path (A) edge node {0,1,L} (B) edge node {1,1,R} (C) @@ -205,7 +385,7 @@ installation, read the present part. edge node {0,1,R} (A) (E) edge [bend left] node {1,0,R} (A); - \node [right=1cm,text width=8cm,font=\footnotesize] at (C) + \node [right=1cm,text width=8cm] at (C) { The current candidate for the busy beaver for five states. It is presumed that this Turing machine writes a maximum number of @@ -273,6 +453,8 @@ installation, read the present part. \include{pgfmanual-en-tikz-matrices} \include{pgfmanual-en-tikz-trees} \include{pgfmanual-en-tikz-plots} +\include{pgfmanual-en-tikz-transparency} +\include{pgfmanual-en-tikz-decorations} \include{pgfmanual-en-tikz-transformations} @@ -287,25 +469,22 @@ installation, read the present part. \noindent In this part the library packages are documented. They provide additional predefined graphic objects like new arrow heads or -new plot marks. These are not loaded by default since many users will -not need them. +new plot marks, but also sometimes extensions of the basic \pgfname\ +or \tikzname\ system. The libraries are not loaded by default since +many users will not need them. \medskip \noindent \begin{codeexample}[graphic=white] -\tikzstyle{level 1}= - [level distance=4.5mm, trunk, line width=1ex ,sibling angle=60] -\tikzstyle{level 2}= - [level distance=3.5mm, trunk!80!leaf a,line width=.8ex,sibling angle=56] -\tikzstyle{level 3}= - [level distance=2.75mm,trunk!60!leaf a,line width=.6ex,sibling angle=52] -\tikzstyle{level 4}= - [level distance=2mm, trunk!40!leaf a,line width=.4ex,sibling angle=48] -\tikzstyle{level 5}= - [level distance=1mm, trunk!20!leaf a,line width=.3ex,sibling angle=44] -\tikzstyle{level 6}= - [level distance=1.75mm,leaf a, line width=.2ex,sibling angle=40] - +\tikzset{ + ld/.style={level distance=#1},lw/.style={line width=#1}, + level 1/.style={ld=4.5mm, trunk, lw=1ex ,sibling angle=60}, + level 2/.style={ld=3.5mm, trunk!80!leaf a,lw=.8ex,sibling angle=56}, + level 3/.style={ld=2.75mm,trunk!60!leaf a,lw=.6ex,sibling angle=52}, + level 4/.style={ld=2mm, trunk!40!leaf a,lw=.4ex,sibling angle=48}, + level 5/.style={ld=1mm, trunk!20!leaf a,lw=.3ex,sibling angle=44}, + level 6/.style={ld=1.75mm,leaf a, lw=.2ex,sibling angle=40}, +} \pgfarrowsdeclare{leaf}{leaf} {\pgfarrowsleftextend{-2pt} \pgfarrowsrightextend{1pt}} { @@ -315,7 +494,7 @@ not need them. \pgfusepathqfill } -\newcommand{\tcslogo}[5] +\newcommand{\logo}[5] { \colorlet{border}{#1} \colorlet{trunk}{#2} @@ -330,14 +509,14 @@ not need them. \coordinate (root) [grow cyclic,rotate=90] child { - child [cap=round] foreach \a in {0,1} { + child [line cap=round] foreach \a in {0,1} { child foreach \b in {0,1} { child foreach \c in {0,1} { child foreach \d in {0,1} { child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor,-#5] } } } } - } edge from parent [shorten >=-1pt,serif cm-,cap=butt] + } edge from parent [shorten >=-1pt,serif cm-,line cap=butt] }; \node [text centered,text width=2cm,below] at (0pt,-.5ex) @@ -346,10 +525,10 @@ not need them. \end{tikzpicture} } \begin{minipage}{3cm} - \tcslogo{green!80!black}{green!25!black}{green}{green!80}{leaf}\\ - \tcslogo{green!50!black}{black}{green!80!black}{red!80!green}{leaf}\\ - \tcslogo{red!75!black}{red!25!black}{red!75!black}{orange}{leaf}\\ - \tcslogo{black!50}{black}{black!50}{black!25}{} + \logo{green!80!black}{green!25!black}{green}{green!80}{leaf}\\ + \logo{green!50!black}{black}{green!80!black}{red!80!green}{leaf}\\ + \logo{red!75!black}{red!25!black}{red!75!black}{orange}{leaf}\\ + \logo{black!50}{black}{black!50}{black!25}{} \end{minipage} \end{codeexample} @@ -357,18 +536,23 @@ not need them. \include{pgfmanual-en-library-automata} \include{pgfmanual-en-library-backgrounds} \include{pgfmanual-en-library-calendar} +\include{pgfmanual-en-library-chains} +\include{pgfmanual-en-library-decorations} \include{pgfmanual-en-library-er} -\include{pgfmanual-en-library-folding} +\include{pgfmanual-en-library-fadings} +\include{pgfmanual-en-library-fit} \include{pgfmanual-en-library-matrices} \include{pgfmanual-en-library-mindmaps} +\include{pgfmanual-en-library-folding} \include{pgfmanual-en-library-patterns} \include{pgfmanual-en-library-petri} \include{pgfmanual-en-library-plot-handlers} \include{pgfmanual-en-library-plot-marks} +\include{pgfmanual-en-library-shadows} \include{pgfmanual-en-library-shapes} -\include{pgfmanual-en-library-snakes} %\include{pgfmanual-en-library-3d} \include{pgfmanual-en-library-edges} +\include{pgfmanual-en-library-through} \include{pgfmanual-en-library-trees} @@ -395,7 +579,7 @@ depend on \pgfname\ or they are designed to work well together with \shade[top color=blue,bottom color=gray!50] (0,0) parabola (1.5,2.25) |- (0,0); \draw (1.05cm,2pt) node[above] {$\displaystyle\int_0^{3/2} \!\!x^2\mathrm{d}x$}; - \draw[style=help lines] (0,0) grid (3.9,3.9) + \draw[help lines] (0,0) grid (3.9,3.9) [step=0.25cm] (1,2) grid +(1,1); \draw[->] (-0.2,0) -- (4,0) node[right] {$x$}; @@ -411,6 +595,7 @@ depend on \pgfname\ or they are designed to work well together with \end{tikzpicture} \end{codeexample} +\include{pgfmanual-en-pgfkeys} \include{pgfmanual-en-pgffor} \include{pgfmanual-en-pgfcalendar} \include{pgfmanual-en-pages} @@ -440,7 +625,7 @@ but the mathematical engine can also be used independently of \pgfmathsetseed{1} \foreach \col in {black,red,green,blue} { - \begin{tikzpicture}[x=10pt,y=10pt,ultra thick,baseline,cap=round] + \begin{tikzpicture}[x=10pt,y=10pt,ultra thick,baseline,line cap=round] \coordinate (current point) at (0,0); \coordinate (old velocity) at (0,0); \coordinate (new velocity) at (rand,rand); @@ -504,18 +689,19 @@ but the mathematical engine can also be used independently of \include{pgfmanual-en-base-scopes} \include{pgfmanual-en-base-points} \include{pgfmanual-en-base-paths} -\include{pgfmanual-en-base-snakes} +\include{pgfmanual-en-base-decorations} \include{pgfmanual-en-base-actions} \include{pgfmanual-en-base-arrows} \include{pgfmanual-en-base-nodes} \include{pgfmanual-en-base-matrices} \include{pgfmanual-en-base-transformations} \include{pgfmanual-en-base-patterns} -\include{pgfmanual-en-base-images} +%\include{pgfmanual-en-base-images} \include{pgfmanual-en-base-external} -\include{pgfmanual-en-base-shadings} \include{pgfmanual-en-base-plots} \include{pgfmanual-en-base-layers} +\include{pgfmanual-en-base-shadings} +\include{pgfmanual-en-base-transparency} \include{pgfmanual-en-base-quick} @@ -542,8 +728,9 @@ workings of the |graphics| package and that you know what \vskip1cm \begin{codeexample}[graphic=white] -\begin{tikzpicture}[shorten >=1pt,->] - \tikzstyle{vertex}=[circle,fill=black!25,minimum size=17pt,inner sep=0pt] +\begin{tikzpicture} + [shorten >=1pt,->, + vertex/.style={circle,fill=black!25,minimum size=17pt,inner sep=0pt}] \foreach \name/\x in {s/1, 2/2, 3/3, 4/4, 15/11, 16/12, 17/13, 18/14, 19/15, t/16} \node[vertex] (G-\name) at (\x,0) {$\name$}; @@ -577,7 +764,7 @@ workings of the |graphics| package and that you know what \vskip1cm \begin{codeexample}[graphic=white] \begin{tikzpicture} - \draw[line width=0.3cm,color=red!30,cap=round,join=round] (0,0)--(2,0)--(2,5); + \draw[line width=0.3cm,color=red!30,line cap=round,line join=round] (0,0)--(2,0)--(2,5); \draw[help lines] (-2.5,-2.5) grid (5.5,7.5); \draw[very thick] (1,-1)--(-1,-1)--(-1,1)--(0,1)--(0,0)-- (1,0)--(1,-1)--(3,-1)--(3,2)--(2,2)--(2,3)--(3,3)-- |