mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
unit-triangle
This commit is contained in:
parent
22c3b5b5f4
commit
d2c4490287
4 changed files with 87 additions and 0 deletions
31
tikz/unit-triangle/Makefile
Normal file
31
tikz/unit-triangle/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
SOURCE = unit-triangle
|
||||
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
|
3
tikz/unit-triangle/README.md
Normal file
3
tikz/unit-triangle/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/unit-triangle/unit-triangle.png
Normal file
BIN
tikz/unit-triangle/unit-triangle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
53
tikz/unit-triangle/unit-triangle.tex
Normal file
53
tikz/unit-triangle/unit-triangle.tex
Normal file
|
@ -0,0 +1,53 @@
|
|||
\documentclass{article}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\usepackage{tikz}
|
||||
\usepackage{tkz-euclide}
|
||||
\usetkzobj{all}
|
||||
\usetikzlibrary{shapes, calc, decorations}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\usepackage{helvet}
|
||||
\usepackage[eulergreek]{sansmath}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}[very thick,font=\sansmath\sffamily]
|
||||
% \tkzInit[xmin=-1,xmax=2,ymin=-1,ymax=2] \tkzGrid
|
||||
|
||||
\tkzDefPoint(0,0){A}
|
||||
\tkzDefPoint(3,0){B}
|
||||
\tkzDefPoint(0,3){C}
|
||||
|
||||
% \tkzLabelPoints[below left,font=\sansmath\sffamily](A)
|
||||
% \tkzLabelPoints[below right,font=\sansmath\sffamily](B)
|
||||
% \tkzLabelPoints[above,font=\sansmath\sffamily](C)
|
||||
|
||||
% Draw polygon
|
||||
\tkzDrawPolygon[thick,fill=gray!10](A,B,C)
|
||||
|
||||
% Mark angles
|
||||
\tkzMarkAngle[arc=l,size=0.3cm,fill=green!30](B,A,C)
|
||||
\tkzLabelAngle[pos=0.15](B,A,C){$\cdot$}
|
||||
|
||||
\tkzMarkAngle[arc=l,size=0.6cm,fill=red!30](C,B,A)
|
||||
% \tkzLabelAngle[pos=0.4](C,B,A){$\beta$}
|
||||
|
||||
\tkzMarkAngle[arc=l,size=0.6cm,fill=red!30](A,C,B)
|
||||
% \tkzLabelAngle[pos=0.4](A,C,B){$\gamma$}
|
||||
|
||||
% Label lines
|
||||
% \tkzLabelSegment[below](A,B){$c$}
|
||||
% \tkzLabelSegment[left](A,C){$b$}
|
||||
% \tkzLabelSegment[right](B,C){$a$}
|
||||
|
||||
% Draw polygon
|
||||
\tkzDrawPolygon[thick](A,B,C)
|
||||
|
||||
\node at (-0.2,-0.2) (AText) {\tiny $(0,0)$};
|
||||
\node at (3,-0.2) (BText) {\tiny $(1,0)$};
|
||||
\node at (0,3.2) (CText) {\tiny $(0,1)$};
|
||||
|
||||
\tkzDrawPoints[size=1](A,B,C)
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue