diff options
author | Karl Berry <karl@freefriends.org> | 2009-02-25 22:36:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-02-25 22:36:03 +0000 |
commit | d9dd9480bc3b5fb14f356606582679b66111069a (patch) | |
tree | b8389124cfd3781c731d4ca67c9405f5acf4bfbb /Master/texmf-dist/doc/latex/dot2texi/examples | |
parent | b75d77ca0161fba7c869bb47d94d70c16d3c68cb (diff) |
install dot2texi, John Owens request 24 Feb 2009 21:24:13
git-svn-id: svn://tug.org/texlive/trunk@12232 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/dot2texi/examples')
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.pdf | bin | 0 -> 16124 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.tex | 44 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.pdf | bin | 0 -> 36420 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.tex | 86 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.pdf | bin | 0 -> 65014 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.tex | 307 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/dot2texi/examples/docgraphsorig.pdf | bin | 0 -> 68584 bytes |
7 files changed, 437 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.pdf b/Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.pdf Binary files differnew file mode 100644 index 00000000000..4df1b0b515a --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.pdf diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.tex b/Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.tex new file mode 100644 index 00000000000..bf413502c78 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/d2tpstexamples.tex @@ -0,0 +1,44 @@ +\documentclass[a4paper]{article} +\usepackage{pstricks} +\usepackage{pstricks-add} + +\usepackage[pstricks]{dot2texi} + +\begin{document} + +\begin{dot2tex}[mathmode,autosize] +digraph G{ + d2toptions="--nominsize"; + a -> b; + a -> c; + b -> d; + d -> a; +} +\end{dot2tex} + +\begin{dot2tex}[dot] +graph G { + node [shape=circle]; + 1 -- 2; + 1 -- 5; + 2 -- 5; + 2 -- 4; + 2 -- 3; + 3 -- 4; +} +\end{dot2tex} + +\begin{dot2tex}[circo] +digraph G { + graph [mindist=0.5]; + node [texmode="math", fixedsize=true, shape=circle, width=0.4]; + c -> n_1 [style="arrows=->"]; + c -> n_2 [style="arrows=->>"]; + c -> n_3 [style="arrows=-<"]; + c -> n_4 [style="arrows=-*"]; + c -> n_5 [style="arrows=-{]}"]; + c -> n_6 [style="arrows=-o"]; + c -> n_7 [style="arrows=-H"]; +} +\end{dot2tex} +\end{document} diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.pdf b/Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.pdf Binary files differnew file mode 100644 index 00000000000..dac129be61c --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.pdf diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.tex b/Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.tex new file mode 100644 index 00000000000..d9875314abc --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/d2ttikzexamples.tex @@ -0,0 +1,86 @@ +\documentclass[a4paper]{article} +\usepackage{tikz} +\usetikzlibrary{shapes,automata,snakes,backgrounds} +\usepackage{dot2texi} + +\begin{document} + +\begin{figure} +\centering +\begin{dot2tex}[circo] +digraph G { + mindist = 0.5; + node [shape="circle"]; + a -> b [topath="bend right"]; + c -> b [topath="bend left"]; + c -> a [topath="out=10,in=-90"]; + b -> b [topath="loop above"]; +} +\end{dot2tex} +\caption{Simple graph with custom paths} +\end{figure} + +\begin{dot2tex}[neato,tikzedgelabels] +graph G { + node [shape=circle,style="fill=red!20"]; + edge [lblstyle="fill=black!10,inner sep=1pt,sloped"]; + K -- F [label="120"]; + H -- S [label="650"]; + H -- M [label="780"]; + D -- B [label="490"]; + D -- M [label="600"]; + B -- M [label="580"]; + H -- N [label="600"]; + F -- H [label="490"]; + S -- B [label="630"]; + S -- N [label="210"]; + S -- M [label="230"]; + F --M [label="100"]; + M -- K [label="test"]; +} +\end{dot2tex} + +\begin{dot2tex}[neato,tikz] +digraph G { + d2tfigpreamble = "\tikzstyle{every state}= \ + [draw=blue!50,very thick,fill=blue!20]"; + node [style="state"]; + edge [lblstyle="auto",topath="bend left"]; + A [style="state, initial"]; + A -> B [label=2]; + A -> D [label=7]; + B -> A [label=1]; + B -> B [label=3,topath="loop above"]; + B -> C [label=4]; + C -> F [label=5]; + F -> B [label=8]; + F -> D [label=7]; + D -> E [label=2]; + E -> A [label="1,6"]; + F [style="state,accepting"]; +} +\end{dot2tex} + +\begin{dot2tex}[straightedges,fdp] +graph G { + node [shape=circle, fixedsize=True, width="0.2", + style="ball color =green", label=""]; + edge [style="snake=zigzag, green"]; + a_1 -- c -- a_2; + c [style="ball color=black"]; + edge [style="snake=snake, blue"]; + node [style="ball color = red", label=""]; + a_3 -- c -- a_4 --a_3; +} +\end{dot2tex} + +\begin{dot2tex}[mathmode,autosize] +digraph G { + node [shape=circle]; + a_1 [texlbl="$x^2+\frac{\sin y}{y^2+\cos \beta}+\gamma_3$"]; + a_1 -> a_2 [label=" ", texlbl="$x_1+x_3^2+z+c+v~~$"]; + a_2 -> a_1; +} +\end{dot2tex} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.pdf b/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.pdf Binary files differnew file mode 100644 index 00000000000..b8006f894dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.pdf diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.tex b/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.tex new file mode 100644 index 00000000000..44115490714 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphs.tex @@ -0,0 +1,307 @@ +% Examples from the dot2tex documentation +\documentclass[a4paper]{article} +\usepackage{tikz} +\usetikzlibrary{shapes,automata,snakes,backgrounds,arrows} + +\usepackage[pgf,outputdir={docgraphs/}]{dot2texi} + +\usepackage[active,tightpage]{preview} + +\begin{document} + + +\begin{preview}% +\begin{tabular}{cc}% +\begin{dot2tex}[mathmode,pgf] +digraph G { + a_1-> a_2 -> a_3 -> a_1; +} +\end{dot2tex} +&\begin{dot2tex}[pgf] +digraph G { + a_1-> a_2 -> a_3 -> a_1; +} +\end{dot2tex} +\end{tabular}% +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf] +digraph G { + a_1 [texlbl="$\frac{\gamma}{x^2}$"]; + a_1-> a_2 -> a_3 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf] +digraph G { + a_1 [texlbl="$\frac{\gamma}{2x^2+y^3}$"]; + a_1 -> a_2 -> a_3 -> a_1 + node [texmode="math"]; + a_1 -> b_1 -> b_2 -> a_3; + b_1 [label="\\frac{\\gamma}{x^2}"]; + node [texmode="verbatim"] + b_4 [label="\\beta"] + a_3 -> b_4 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf,autosize] +digraph G { + a_1 [texlbl="$\frac{\gamma}{2x^2+y^3}$"]; + a_1 -> a_2 -> a_3 -> a_1 + node [texmode="math"]; + a_1 -> b_1 -> b_2 -> a_3; + b_1 [label="\\frac{\\gamma}{x^2}"]; + node [texmode="verbatim"] + b_4 [label="\\beta"] + a_3 -> b_4 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf] +digraph G { + node0 [label="{left|right}", shape=record]; + node1 [shape=rectangle, label="node 1"]; + node0 -> node1; + rankdir=LR; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf,options=--valignmode dot] +digraph G { + node0 [label="{left|right}", shape=record]; + node1 [shape=rectangle, label="node 1"]; + node0 -> node1; + rankdir=LR; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf] +digraph G { + d2toptions="--valignmode=dot"; + d2tgraphstyle="anchor=base"; + node0 [label="{left|right}", shape=record]; + node1 [shape=rectangle, label="node 1"]; + node0 -> node1; + rankdir=LR; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[pgf] +digraph G { + d2toptions="--valignmode=dot"; + d2tgraphstyle="anchor=base"; + node [fontsize=10]; + node0 [label="{left|right}", shape=record]; + node1 [shape=rectangle, label="node 1"]; + node0 -> node1; + rankdir=LR; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[mathmode] +digraph G { + node [shape=circle]; + a_1 [texlbl="$x^2+\frac{\sin y}{y^2+\cos \beta}+\gamma_3$"]; + a_1 -> a_2 [label=" ", texlbl="$x_1+x_3^2+z+c+v~~$"]; + a_2 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[mathmode,autosize] +digraph G { + node [shape=circle]; + a_1 [texlbl="$x^2+\frac{\sin y}{y^2+\cos \beta}+\gamma_3$"]; + a_1 -> a_2 [label=" ", texlbl="$x_1+x_3^2+z+c+v~~$"]; + a_2 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[mathmode,autosize] +digraph G { + node [shape=rectangle]; + a_1 [margin="0"]; + a_2 [margin="0.7,0.4"]; + a_3 [width="2",height="1"]; + a_1-> a_2 -> a_3 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex} +digraph G { + d2toptions="-tmath --autosize --nominsize"; + node [shape=rectangle]; + a_1 [margin="0"]; + a_2 [margin="0.7,0.4"]; + a_3 [width="2",height="1"]; + a_1-> a_2 -> a_3 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[fdp,straightedges] +graph G { + node [shape=circle, fixedsize=True, width="0.2", + style="ball color =green", label=""]; + edge [style="snake=zigzag, green"]; + a_1 -- c -- a_2; + c [style="ball color=black"]; + edge [style="snake=snake, blue"]; + node [style="ball color = red", label=""]; + a_3 -- c -- a_4 --a_3; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[circo,mathmode,shell] +digraph G { + graph [mindist=0.5]; + node [fixedsize=true, shape=circle, width=0.4, style="fill=green!20"]; + c -> n_1 [style="-stealth"]; + c -> n_2 [style="-to"]; + c -> n_3 [style="-latex"]; + c -> n_4 [style="-diamond"]; + c -> n_5 [style="-o"]; + c -> n_6 [style="{-]}"]; + c -> n_7 [style="-triangle 90"]; + c -> n_8 [style="-hooks"]; + c -> n_9 [style="->>"]; + c [style="fill=red!80"]; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex} +digraph G { + node [shape=circle]; + a -> b [label="label",lblstyle="draw=red,cross out"]; + b -> c [label="test",lblstyle="below=0.5cm,rotate=20,fill=blue!20"]; + a [label="aa",lblstyle="blue"]; + b [lblstyle="font=\Huge"]; + c [label="ccc", lblstyle="red,rotate=90"]; + label="Graph label"; + lblstyle="draw,fill=red!20"; + rankdir=LR; + } +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[tikz,circo] +digraph G { + mindist = 0.5; + node [shape="circle"]; + a -> b [topath="bend right"]; + c -> b [topath="bend left"]; + c -> a [topath="out=10,in=-90"]; + b -> b [topath="loop above"]; + } +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[tikz,neato,tikzedgelabels,styleonly] +digraph G { + d2tfigpreamble = "\tikzstyle{every state}= \ + [draw=blue!50,very thick,fill=blue!20]"; + node [style="state"]; + edge [lblstyle="auto",topath="bend left"]; + A [style="state, initial"]; + A -> B [label=2]; + A -> D [label=7]; + B -> A [label=1]; + B -> B [label=3,topath="loop above"]; + B -> C [label=4]; + C -> F [label=5]; + F -> B [label=8]; + F -> D [label=7]; + D -> E [label=2]; + E -> A [label="1,6"]; + F [style="state,accepting"]; + } +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[mathmode,shell] +digraph G { + d2tfigpreamble="\Huge"; + a_1-> a_2 -> a_3 -> a_1; +} +\end{dot2tex} +\end{preview} + +\begin{preview} +\begin{dot2tex}[tikz,shell,prog=neato,mathmode] +digraph G { + node [shape="circle"]; + a_1 -> a_2 -> a_3 -> a_4 -> a_1; +} +\end{dot2tex} +\end{preview} + +% Define layers +\pgfdeclarelayer{background} +\pgfdeclarelayer{foreground} +\pgfsetlayers{background,main,foreground} +% The scale option is useful for adjusting spacing between nodes. +% Note that this works best when straight lines are used to connect +% the nodes. +\begin{preview} +\begin{tikzpicture}[>=latex',scale=0.8] + % set node style + \tikzstyle{n} = [draw,shape=circle,minimum size=2em, + inner sep=0pt,fill=red!20] + \begin{dot2tex}[dot,tikz,codeonly,options=-s --styleonly -tmath] + digraph G { + node [style="n"]; + A_1 -> B_1; A_1 -> B_2; A_1 -> B_3; + B_1 -> C_1; B_1 -> C_2; + B_2 -> C_2; B_2 -> C_3; + B_3 -> C_3; B_3 -> C_4; + } + \end{dot2tex} + % annotations + \node[left=1em] at (C_1.west) (l3) {Level 3}; + \node at (l3 |- B_1) (l2){Level 2}; + \node at (l3 |- A_1) (l1) {Level 1}; + % Draw lines to separate the levels. First we need to calculate + % where the middle is. + \path (l3) -- coordinate (l32) (l2) -- coordinate (l21) (l1); + \draw[dashed] (C_1 |- l32) -- (l32 -| C_4); + \draw[dashed] (C_1 |- l21) -- (l21 -| C_4); + \draw[<->,red] (A_1) to[out=-120,in=90] (C_2); + % Highlight the A_1 -> B_1 -> C_2 path. Use layers to draw + % behind everything. + \begin{pgfonlayer}{background} + \draw[rounded corners=2em,line width=3em,blue!20,cap=round] + (A_1.center) -- (B_1.west) -- (C_2.center); + \end{pgfonlayer} +\end{tikzpicture} +\end{preview} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphsorig.pdf b/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphsorig.pdf Binary files differnew file mode 100644 index 00000000000..abc0d3b4546 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dot2texi/examples/docgraphsorig.pdf |