mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 14:28:05 +02:00
added permutation sign
This commit is contained in:
parent
a411fde3ec
commit
385254300a
4 changed files with 74 additions and 0 deletions
35
tikz/permutation-sign/Makefile
Normal file
35
tikz/permutation-sign/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
SOURCE = permutation-sign
|
||||||
|
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:
|
||||||
|
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
|
3
tikz/permutation-sign/Readme.md
Normal file
3
tikz/permutation-sign/Readme.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Compiled example
|
||||||
|
----------------
|
||||||
|

|
BIN
tikz/permutation-sign/permutation-sign.png
Normal file
BIN
tikz/permutation-sign/permutation-sign.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
36
tikz/permutation-sign/permutation-sign.tex
Normal file
36
tikz/permutation-sign/permutation-sign.tex
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
\documentclass{article}
|
||||||
|
\usepackage[pdftex,active,tightpage]{preview}
|
||||||
|
|
||||||
|
\usepackage{tikz}
|
||||||
|
\usetikzlibrary{calc}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\begin{preview}
|
||||||
|
\tikzset{box/.style={fill=black!15,draw,minimum size=13pt,align=center}}
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\draw[very thick] (-1,2.5) -- (-1,1.75);
|
||||||
|
\draw[<-,very thick] (-1,0.5) -- (-1,1.3);
|
||||||
|
|
||||||
|
\draw[very thick] (-0.3,0.5 ) -- (-0.3,1.3);
|
||||||
|
\draw[->,very thick] (-0.3,1.75) -- (-0.3,2.5);
|
||||||
|
|
||||||
|
\draw[very thick] (0.3,2.5) -- (0.3,1.75);
|
||||||
|
\draw[<-,very thick] (0.3,0.5) -- (0.3,1.3);
|
||||||
|
|
||||||
|
\draw[very thick] (1,0.5) -- (1,1.3);
|
||||||
|
\draw[->,very thick] ( 1,1.75) -- (1,2.5);
|
||||||
|
|
||||||
|
\node (one) at (-0.8,2.2) {1};
|
||||||
|
\node (two) at (-0.1,0.8) {2};
|
||||||
|
\node (three) at ( 0.5,2.2) {3};
|
||||||
|
\node (four) at ( 1.2,0.8) {4};
|
||||||
|
|
||||||
|
\node[box] (odd) at (0,3) {gerade\\Permutationen};
|
||||||
|
\node[box] (even) at (0,0) {ungerade\\Permutationen};
|
||||||
|
|
||||||
|
\node (transpositions) at (0,1.5) {Transpositionen};
|
||||||
|
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{preview}
|
||||||
|
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue