mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
misc
This commit is contained in:
parent
9598bd0055
commit
1d2bd1f9f3
7 changed files with 161 additions and 10589 deletions
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 82 KiB |
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 880 KiB |
35
tikz/circles-closed/Makefile
Normal file
35
tikz/circles-closed/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
SOURCE = circles-closed
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 500
|
||||
|
||||
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
|
51
tikz/circles-closed/circles-closed.tex
Normal file
51
tikz/circles-closed/circles-closed.tex
Normal file
|
@ -0,0 +1,51 @@
|
|||
\documentclass[varwidth=true, border=2pt]{standalone}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{shapes, calc, shapes, arrows, 3d, fadings}
|
||||
\usepackage{amsmath,amssymb}
|
||||
|
||||
\usepackage{xcolor}
|
||||
\definecolor{xvectorcolor}{HTML}{77933C}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
\newcommand\radiusBig{2.5}
|
||||
\newcommand\radiusSmall{1}
|
||||
|
||||
% Center for the second (outer) circle
|
||||
\path (-30:{\radiusBig+\radiusSmall}) coordinate (X);
|
||||
\path (210:{\radiusBig-\radiusSmall}) coordinate (Y);
|
||||
\path ( 0:0) coordinate (Z);
|
||||
|
||||
%\fill[even odd rule,inner color=blue!70,outer color=white] (X) circle (1);
|
||||
% Lines to center
|
||||
\draw[green] (0,0) -- (X);
|
||||
\draw[green] (0,0) -- (Y);
|
||||
|
||||
% The big circle
|
||||
\draw[red,thick,fill=red!20] (0,0) circle (\radiusBig); % the circle
|
||||
\draw[thick, red] (0,0) -- (45:\radiusBig); % the radius line
|
||||
\fill[red] (Z) circle (2pt); % the dot
|
||||
\node (c) at ($(0,0)!0.5!(45:\radiusBig)$) [below, red] {r};
|
||||
\draw[red] (Z) node [below] {$x$};
|
||||
|
||||
% The right small outer circle
|
||||
\begin{scope}[shift={(X)}]
|
||||
\node (radEnd) at (45:\radiusSmall+0.18) {};
|
||||
\end{scope}
|
||||
\draw[blue,thick,fill=blue!20] (X) circle (\radiusSmall); % the circle
|
||||
\draw[blue,thick] (X) -- (radEnd); % the radius line
|
||||
\fill[blue] (X) circle (2pt); % the dot
|
||||
\node (c) at ($(X)!0.5!(radEnd)$) [right, blue] {$\varepsilon_2$};
|
||||
\draw[blue] (X) node [right] {$y_2$};
|
||||
|
||||
% The left small inner circle
|
||||
\begin{scope}[shift={(Y)}]
|
||||
\node (radEnd2) at (-45:\radiusSmall+0.18) {};
|
||||
\end{scope}
|
||||
\draw[blue,thick,fill=blue!80!red!30!white] (Y) circle (\radiusSmall); % the circle
|
||||
\draw[blue,thick] (Y) -- (radEnd2); % the radius line
|
||||
\fill[blue] (Y) circle (2pt); % the dot
|
||||
\node (c) at ($(Y)!0.5!(radEnd2)$) [above, blue] {$\varepsilon_1$};
|
||||
\draw[blue] (Y) node [left] {$y_1$};
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
35
tikz/udp-package-scheme/Makefile
Normal file
35
tikz/udp-package-scheme/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
SOURCE = udp-package-scheme
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 500
|
||||
|
||||
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
|
21
tikz/udp-package-scheme/udp-package-scheme.tex
Normal file
21
tikz/udp-package-scheme/udp-package-scheme.tex
Normal file
|
@ -0,0 +1,21 @@
|
|||
\documentclass{article}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{shapes.multipart, calc, decorations.pathreplacing}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}[array/.style={rectangle split,rectangle split horizontal, rectangle split parts=#1,draw, anchor=center, rectangle split part fill={blue!20, green!20, blue!20!green!90}}]
|
||||
\node[array=3] (a) {
|
||||
\nodepart{one}IP-Header
|
||||
\nodepart{two}UDP-Header
|
||||
\nodepart{three}UDP-Daten
|
||||
};
|
||||
|
||||
\draw [decoration={brace,raise=2pt},decorate] (a.north west) -- node[above=3pt]{IP-Datagramm}(a.north east);
|
||||
\draw [decoration={brace,mirror,raise=2pt},decorate] ($(a.two) + (-0.13,-0.14)$) -- node[below=3pt]{UDP-Datagramm}(a.south east);
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue