diff --git a/tikz/graph-content-and-structure/Makefile b/tikz/graph-content-and-structure/Makefile new file mode 100644 index 0000000..3fd28ba --- /dev/null +++ b/tikz/graph-content-and-structure/Makefile @@ -0,0 +1,35 @@ +SOURCE = graph-content-and-structure +DELAY = 80 +DENSITY = 300 +WIDTH = 512 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + make + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg + rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg + inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg + rm $(SOURCE)2.svg diff --git a/tikz/graph-content-and-structure/README.md b/tikz/graph-content-and-structure/README.md new file mode 100644 index 0000000..5a155b2 --- /dev/null +++ b/tikz/graph-content-and-structure/README.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](graph-content-and-structure.png) diff --git a/tikz/graph-content-and-structure/graph-content-and-structure.png b/tikz/graph-content-and-structure/graph-content-and-structure.png new file mode 100644 index 0000000..e53588d Binary files /dev/null and b/tikz/graph-content-and-structure/graph-content-and-structure.png differ diff --git a/tikz/graph-content-and-structure/graph-content-and-structure.tex b/tikz/graph-content-and-structure/graph-content-and-structure.tex new file mode 100644 index 0000000..ca247e4 --- /dev/null +++ b/tikz/graph-content-and-structure/graph-content-and-structure.tex @@ -0,0 +1,42 @@ +\documentclass[varwidth=true, border=2pt]{standalone} +\usepackage{tikz} + +\begin{document} +\tikzstyle{vertex}=[draw,black,circle,minimum size=10pt,inner sep=0pt] +\tikzstyle{edge}=[very thick] +\begin{tikzpicture}[scale=1.3] + \node (a)[vertex] at (0,0) {}; + \node (b)[vertex] at (0,1) {}; + \node (c)[vertex] at (0,2) {}; + \node (d)[vertex] at (1,0) {}; + \node (e)[vertex] at (1,1) {}; + \node (f)[vertex] at (1,2) {}; + \node (g)[vertex] at (2,0) {}; + \node (h)[vertex] at (2,1) {}; + \node (i)[vertex] at (2,2) {}; + + \node (x)[vertex] at (4,0) {}; + \node (y)[vertex] at (4,1) {}; + \node (z)[vertex] at (4,2) {}; + + \draw[edge] (a) -- (d); + \draw[edge] (b) -- (d); + \draw[edge] (b) -- (c); + \draw[edge] (c) -- (d); + \draw[edge] (d) -- (e); + \draw[edge] (d) edge[bend left] (f); + \draw[edge] (d) edge[bend right] (x); + \draw[edge] (g) edge (x); + \draw[edge] (h) edge (x); + \draw[edge] (h) edge (y); + \draw[edge] (h) edge (e); + \draw[edge] (e) edge (z); + \draw[edge] (i) edge (y); + + \draw [dashed] (-0.3,-0.3) rectangle (2.3,2.3); + \draw [dashed] (2.5,2.3) rectangle (5, -0.3); + + \node (struktur)[label={[label distance=0cm]0:Sturkturknoten}] at (-0.1,2.5) {}; + \node (struktur)[label={[label distance=0cm]0:Wortknoten}] at (2.7,2.5) {}; +\end{tikzpicture} +\end{document}