瀏覽代碼

added partially labeled network image

Martin Thoma 11 年之前
父節點
當前提交
43b0b5fd37

+ 31 - 0
tikz/partially-labeled-network/Makefile

@@ -0,0 +1,31 @@
+SOURCE = partially-labeled-network
+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:
+	#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

+ 10 - 0
tikz/partially-labeled-network/Readme.md

@@ -0,0 +1,10 @@
+Compiled example
+----------------
+![Example](partially-labeled-network.png)
+
+Credit
+------
+
+Image source:
+
+https://commons.wikimedia.org/wiki/File:Crystal_Clear_app_personal.png

二進制
tikz/partially-labeled-network/label.png


二進制
tikz/partially-labeled-network/labels.jpg


二進制
tikz/partially-labeled-network/partially-labeled-network.png


+ 33 - 0
tikz/partially-labeled-network/partially-labeled-network.tex

@@ -0,0 +1,33 @@
+\documentclass{article}
+\usepackage[pdftex,active,tightpage]{preview}
+\setlength\PreviewBorder{2mm}
+
+\usepackage{tikz}
+\usetikzlibrary{arrows,positioning}
+\pgfdeclareimage{user}{user}
+\pgfdeclareimage{schwarz}{user-schwarz}
+\pgfdeclareimage{rot}{user-rot}
+
+\begin{document}
+\begin{preview}
+\begin{tikzpicture}[scale=2]
+    \node[text width=2.2cm,align=center] (a) at (0,1) {\pgfuseimage{user}\newline Anna};
+    \node[text width=2.2cm,align=center] (b) at (5,1) {\pgfuseimage{schwarz}\newline Berta};
+    \node[text width=2.2cm,align=center] (c) at (8,0) {\pgfuseimage{rot}\newline Charlie};
+    \node[text width=2.2cm,align=center] (d) at (9,2) {\pgfuseimage{user}\newline Doris};
+    \node[text width=2.2cm,align=center] (e) at (4,3) {\pgfuseimage{schwarz}\newline Erich};
+    \node[text width=2.2cm,align=center] (f) at (6,3) {\pgfuseimage{rot}\newline Fritz};
+    \node[text width=2.2cm,align=center] (g) at (7,4) {\pgfuseimage{user}\newline Gerd};
+
+    \draw (a) -- (b);
+    \draw (a) -- (e);
+    \draw (b) -- (e);
+    \draw (b) -- (f);
+    \draw (b) -- (c);
+    \draw (c) -- (d);
+    \draw (e) -- (f);
+    \draw (e) -- (g);
+    \draw (f) -- (g);
+\end{tikzpicture}
+\end{preview}
+\end{document}

二進制
tikz/partially-labeled-network/user (copy).png


二進制
tikz/partially-labeled-network/user-rot.png


二進制
tikz/partially-labeled-network/user-schwarz.png


二進制
tikz/partially-labeled-network/user.png