2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00
This commit is contained in:
Martin Thoma 2014-10-13 10:15:38 +02:00
parent 13f3ff6518
commit a53b07116e
7 changed files with 151 additions and 0 deletions

View file

@ -0,0 +1,35 @@
SOURCE = quotes
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,26 @@
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\usepackage{amssymb,amsmath,amsfonts} % nice math rendering
\usepackage{braket} % needed for \Set
\usepackage{algorithm,algpseudocode}
\begin{document}
\begin{preview}
This is a 'samle' with some "quotes".
\begin{algorithm}[H]
\begin{algorithmic}
\State $a \gets \Call{map}{~}$
\State $a['x'] \gets 42$
\State $a["x"] \gets 1337$
\end{algorithmic}
\caption{Algorithmus von Stoer und Wanger}
\label{alg:seq1}
\end{algorithm}
\end{preview}
\end{document}

View file

@ -0,0 +1,33 @@
SOURCE = hyperbolic-triangle-exterior-angles
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-width=$(WIDTH) --export-plain-svg=$(SOURCE)1.svg
rsvg-convert -a -w 720 -f svg $(SOURCE)1.svg -o $(SOURCE).svg
rm $(SOURCE)1.svg

View file

@ -0,0 +1,3 @@
Compiled example
----------------
![Example](hyperbolic-triangle-exterior-angles.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -0,0 +1,54 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
% Thanks to Jan Hlavacek for giving an example
% (http://tex.stackexchange.com/a/16749/5645)
\begin{document}
\begin{tikzpicture}[scale=3]
\tkzDefPoint(0,0){O}
\tkzDefPoint(1,0){Z}
% Define points
\tkzDefPoint(-0.7,-0.1){A}
\tkzDefPoint(0.4,-0.3){B}
\tkzDefPoint(0.1,0.4){C}
% Draw big circle
\tkzDrawCircle[fill=white](O,Z)
% I have no idea what this does,
% but when I remove it the rest of the image (the big circles)
% get visible. So it seems to crop the image to the size of the circle
\tkzClipCircle(O,Z)
% Draw angles
\tkzMarkAngles[fill= orange,size=0.3cm,opacity=.3](B,A,C)
\tkzLabelAngle[pos=0.2](B,A,C){$\alpha$}
\tkzMarkAngles[fill= orange,size=0.3cm,opacity=.3](C,B,A)
\tkzLabelAngle[pos=0.2](C,B,A){$\beta$}
\tkzMarkAngles[fill= orange,size=0.3cm,opacity=.3](A,C,B)
\tkzLabelAngle[pos=0.2](A,C,B){$\gamma$}
% "Clip" angles
\tkzDrawCircle[fill,orthogonal through=A and B,color=white](O,Z)
\tkzDrawCircle[fill,orthogonal through=A and C,color=white](O,Z)
\tkzDrawCircle[fill,orthogonal through=B and C,color=white](O,Z)
% Draw big circle
\tkzDrawCircle(O,Z)
% Draw lines
\tkzDrawCircle[orthogonal through=A and B,color=green](O,Z)
\tkzDrawCircle[orthogonal through=A and C,color=blue](O,Z)
\tkzDrawCircle[orthogonal through=B and C,color=red](O,Z)
% Draw points and label them
\tkzDrawPoints[color=black,fill=red,size=5](A,B,C)
\tkzLabelPoints(A,B,C)
\end{tikzpicture}
\end{document}