2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

added partially labeled network image

This commit is contained in:
Martin Thoma 2013-11-05 20:11:32 +01:00
parent 8390f141fd
commit 43b0b5fd37
10 changed files with 74 additions and 0 deletions

View file

@ -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

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -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}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB