Quellcode durchsuchen

added more examples; added links to README

Martin Thoma vor 13 Jahren
Ursprung
Commit
b7cec5fb0b

+ 5 - 1
README.md

@@ -1,4 +1,8 @@
 LaTeX-examples
 ==============
 
-Examples for the usage of LaTeX
+Examples for the usage of LaTeX
+
+Most examples can be found on [my Wikpedia Commons user page](http://commons.wikimedia.org/wiki/User:MartinThoma#Galerie)
+
+You might also be interested in [my Blog](http://martin-thoma.com/tag/tikz/)

+ 31 - 0
tikz/earth-skizze-2/Makefile

@@ -0,0 +1,31 @@
+SOURCE = earth-skizze-2
+DELAY = 80
+DENSITY = 300
+WIDTH = 500
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux
+
+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

+ 55 - 0
tikz/earth-skizze-2/earth-skizze-2.tex

@@ -0,0 +1,55 @@
+\documentclass{article}
+
+\usepackage{xcolor}
+\definecolor{sky}{HTML}{AAEEEE}
+\definecolor{lgreen}{HTML}{77DD11}
+
+\usepackage[pdftex,active,tightpage]{preview}
+\setlength\PreviewBorder{2mm}
+\usepackage{tikz}
+\usetikzlibrary{calc, decorations.pathmorphing, decorations.text}
+
+\begin{document}
+\begin{preview}
+\begin{tikzpicture}[scale=3.5,dot/.style={circle,fill=black,minimum size=4pt,inner sep=0pt,
+            outer sep=-1pt}]
+    \draw[fill=sky!20] (180:1.2cm) arc (180:0:1.2cm);
+    \draw[fill=brown!20] (180:1cm) arc (180:0:1cm);
+    \draw (-1.2cm,0) -- node {} (1.2cm, 0);
+    \draw (0,0) -- node {} (0, 1cm);
+    \node at (0,1.1cm) {N} ;
+
+    \coordinate (DEnd) at (0.867cm,0.5cm) ;
+    \draw[dashed] (-0.86cm,0.5cm) -- node[above] {} (DEnd);
+
+    \node[above] at (-0.4cm, 0.45cm) {25. Breitengrad};
+    \node[above, text width=1cm] at (0.15cm, 0.5cm) {\scriptsize Burdsch\\Chalifa};
+    \node[above, text width=1cm] at (0.7cm, 0.5cm) {\scriptsize Mileiha};
+
+    \path [decorate,
+            decoration={
+                text along path,
+                text={6370 km},
+                text align={align=center}
+            }
+          ] (0,0) -- (DEnd);
+    \draw (0,0) -- node {} (DEnd);
+    \draw[arrows={stealth-stealth}] (-1cm,-0.05cm) -- node[below] {6370 km} (0,-0.05cm);
+
+    \node[dot, lgreen] at (0.2cm,0.5cm) (S) {};
+    \node[dot, lgreen] at (0.5cm,0.5cm) (E) {};
+
+
+
+    \draw[lgreen, thick] (S) -- node {} (E);
+
+    \begin{scope}[shift={(DEnd)}]
+        \draw[fill=gray!20] (0,0) -- (180:0.3cm)  arc (180:210:0.3cm);
+        \draw (195:0.2cm) node {$\scriptstyle 25^\circ$};
+    \end{scope}
+
+
+
+\end{tikzpicture}
+\end{preview}
+\end{document}

+ 31 - 0
tikz/earth-skizze/Makefile

@@ -0,0 +1,31 @@
+SOURCE = earth-skizze
+DELAY = 80
+DENSITY = 300
+WIDTH = 500
+
+make:
+	pdflatex $(SOURCE).tex -output-format=pdf
+	make clean
+
+clean:
+	rm -rf  $(TARGET) *.class *.html *.log *.aux
+
+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

+ 40 - 0
tikz/earth-skizze/earth-skizze.tex

@@ -0,0 +1,40 @@
+\documentclass{article}
+
+\usepackage{xcolor}
+\definecolor{sky}{HTML}{AAEEEE}
+
+\usepackage[pdftex,active,tightpage]{preview}
+\setlength\PreviewBorder{2mm}
+\usepackage{tikz}
+\usetikzlibrary{calc}
+
+\begin{document}
+\begin{preview}
+\begin{tikzpicture}[scale=1.2]
+    \draw[fill=sky] (0, 0) circle (1.5cm);
+    \draw[fill=brown] (0, 0) circle (1cm);
+
+    %tangente
+    \begin{scope}[shift={(-1.35cm,0)}, rotate=48]
+        \draw (0,0) -- node {} (2.5cm, 0);
+    \end{scope}
+
+    \draw (0,0) -- node {} (0, 1.5cm);
+    \draw (0,0) -- node[anchor=east] {$r$} (138:1cm);
+
+    % angle
+    \draw[fill=gray!30] (0,0) -- (138:0.75cm) arc (138:90:0.75cm);
+    \draw (110:0.5cm) node {$\varphi$};
+
+    % winkelbogen
+    \draw[lime] (138:1cm) arc (138:90:1cm);
+    \node[lime] at (-0.2,0.85) {$x$} ;
+
+    % height
+    \draw[blue] (0,1cm) -- node[anchor=west] {$h$} (0, 1.5cm);
+
+    \node at (0,-0.2) {Erde} ;
+
+\end{tikzpicture}
+\end{preview}
+\end{document}