Add README.md and rendered png to all folders except for /documents
The examples were found by ```bash $ find . -not -path '*/\.*' -type d '!' -exec test -e "{}/README.md" ';' -print ``` To do so, a cleanup-script .meta/add_readme.py was created.
3
.gitattributes
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.gif diff=image
|
||||
*.jpg diff=image
|
||||
*.png diff=image
|
37
.meta/add_readme.py
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
from os import listdir
|
||||
from os.path import isfile, join
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
|
||||
level=logging.DEBUG,
|
||||
stream=sys.stdout)
|
||||
|
||||
|
||||
def create_readme(directory):
|
||||
project_name = os.path.basename(directory)
|
||||
onlyfiles = [f.lower()
|
||||
for f in listdir(directory)
|
||||
if isfile(join(directory, f))]
|
||||
if ('%s.tex' % project_name) not in onlyfiles:
|
||||
logging.warning("Dir '%s' has no standard .tex filename.", directory)
|
||||
return
|
||||
text = "Compiled example\n"
|
||||
text += "----------------\n"
|
||||
text += "\n" % project_name
|
||||
with open(os.path.join(directory, "README.md"), 'w') as f:
|
||||
f.write(text)
|
||||
os.system("make png -C %s" % directory)
|
||||
|
||||
subdirs = [x[0] for x in os.walk('.')]
|
||||
subdirs = [f for f in subdirs
|
||||
if not any([True for e in f.split('/')
|
||||
if e.startswith('.') and len(e) > 1])]
|
||||
for subdir in subdirs:
|
||||
onlyfiles = [f.lower() for f in listdir(subdir) if isfile(join(subdir, f))]
|
||||
if 'readme.md' not in onlyfiles:
|
||||
create_readme(subdir)
|
3
documents/chess-chessboard-4x4/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
documents/chess-chessboard-4x4/chess-chessboard-4x4.png
Normal file
After Width: | Height: | Size: 22 KiB |
3
documents/chess-chessboard-shortest-game/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
After Width: | Height: | Size: 48 KiB |
3
documents/chess-chessboard-simple-example/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
After Width: | Height: | Size: 39 KiB |
3
documents/chess-skak-simple-example/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
After Width: | Height: | Size: 32 KiB |
|
@ -1,7 +1,33 @@
|
|||
SOURCE = eaz
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out
|
||||
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
|
||||
|
|
3
documents/eaz/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
documents/eaz/eaz.png
Normal file
After Width: | Height: | Size: 49 KiB |
3
documents/math-euklidische-normalform/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
After Width: | Height: | Size: 8.9 KiB |
3
documents/math-sylvester-diagonal-matrix/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
After Width: | Height: | Size: 6.9 KiB |
|
@ -1,10 +1,33 @@
|
|||
SOURCE = size
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf # first run for the aux file
|
||||
makeindex $(SOURCE) # now the index is generated
|
||||
pdflatex $(SOURCE).tex -output-format=pdf # pdf with index :-)
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg
|
||||
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
|
||||
|
|
3
documents/size/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
documents/size/size.png
Normal file
After Width: | Height: | Size: 16 KiB |
1
documents/table-multiple-pages/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
Example with a very long table over multiple pages
|
2
documents/zwischenmiete-vertrag/README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
Example for a contract - in German - about giving your apartment to somebody
|
||||
else for a short time.
|
|
@ -1,8 +1,34 @@
|
|||
SOURCE = basic
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg
|
||||
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
|
||||
|
|
1
images/basic/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
Just include an image in a document in its original size
|
|
@ -1,8 +1,33 @@
|
|||
SOURCE = float
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg
|
||||
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
|
||||
|
|
3
images/float/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
images/float/float.png
Normal file
After Width: | Height: | Size: 61 KiB |
|
@ -1,8 +1,33 @@
|
|||
SOURCE = scaling
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg
|
||||
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
|
||||
|
|
3
images/scaling/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
images/scaling/scaling.png
Normal file
After Width: | Height: | Size: 228 KiB |
|
@ -1,4 +1,7 @@
|
|||
SOURCE = side-by-side-subfig
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
|
@ -6,4 +9,26 @@ make:
|
|||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg
|
||||
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
|
||||
|
|
BIN
images/side-by-side-subfig/side-by-side-subfig.png
Normal file
After Width: | Height: | Size: 174 KiB |
|
@ -1,4 +1,7 @@
|
|||
SOURCE = side-by-side
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
|
@ -6,4 +9,26 @@ make:
|
|||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg
|
||||
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
|
||||
|
|
3
images/side-by-side/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
images/side-by-side/side-by-side.png
Normal file
After Width: | Height: | Size: 174 KiB |
3
math/commutative-diagramm/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
math/commutative-diagramm/commutative-diagramm.png
Normal file
After Width: | Height: | Size: 9.7 KiB |
1
presentations/Tutorenschlung/presentation/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
Presentation of a softskill course at KIT.
|
3
source-code/Pseudocode/quotes/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 8.1 KiB |
3
tikz/b-tree-2-small-2/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/b-tree-2-small-2/b-tree-2-small-2.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
3
tikz/b-tree-2-small-3/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/b-tree-2-small-3/b-tree-2-small-3.png
Normal file
After Width: | Height: | Size: 10 KiB |
3
tikz/b-tree-2-small-4/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/b-tree-2-small-4/b-tree-2-small-4.png
Normal file
After Width: | Height: | Size: 10 KiB |
|
@ -1,14 +1,14 @@
|
|||
SOURCE = b-tree-2-small
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 500
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
|
||||
|
||||
gif:
|
||||
pdfcrop $(SOURCE).pdf
|
||||
|
@ -28,4 +28,6 @@ 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
|
||||
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
|
||||
|
|
3
tikz/b-tree-2-small/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/b-tree-2-small/b-tree-2-small.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
3
tikz/b-tree-3-evolution/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/b-tree-3-evolution/b-tree-3-evolution.png
Normal file
After Width: | Height: | Size: 16 KiB |
3
tikz/b-tree-node/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/b-tree-node/b-tree-node.png
Normal file
After Width: | Height: | Size: 14 KiB |
3
tikz/binary-search-tree/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/binary-search-tree/binary-search-tree.png
Normal file
After Width: | Height: | Size: 24 KiB |
3
tikz/bounding-box-lines-1/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/bounding-box-lines-1/bounding-box-lines-1.png
Normal file
After Width: | Height: | Size: 14 KiB |
3
tikz/bounding-box-lines-2/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/bounding-box-lines-2/bounding-box-lines-2.png
Normal file
After Width: | Height: | Size: 11 KiB |
3
tikz/bounding-box-lines-3/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/bounding-box-lines-3/bounding-box-lines-3.png
Normal file
After Width: | Height: | Size: 11 KiB |
3
tikz/bounding-box-lines-4/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/bounding-box-lines-4/bounding-box-lines-4.png
Normal file
After Width: | Height: | Size: 11 KiB |
3
tikz/cache-4-way-associative/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/cache-4-way-associative/cache-4-way-associative.png
Normal file
After Width: | Height: | Size: 15 KiB |
3
tikz/chemistry-example/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/chemistry-example/chemistry-example.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
3
tikz/circle-convex-metric-space/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/circle-convex-metric-space/circle-convex-metric-space.png
Normal file
After Width: | Height: | Size: 15 KiB |
3
tikz/circles-closed/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/circles-closed/circles-closed.png
Normal file
After Width: | Height: | Size: 27 KiB |
3
tikz/circular-cone/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/circular-sector-centroid/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/circular-sector-centroid/circular-sector-centroid.png
Normal file
After Width: | Height: | Size: 27 KiB |
3
tikz/cmos-nor/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/cmos-sram-cell/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
3
tikz/countable-sets/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/countable-sets/countable-sets.png
Normal file
After Width: | Height: | Size: 21 KiB |
|
@ -1,7 +1,7 @@
|
|||
SOURCE = cubic-function
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 500
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
|
@ -28,4 +28,6 @@ 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
|
||||
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
|
||||
|
|
3
tikz/cubic-function/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/cubic-function/cubic-function.png
Normal file
After Width: | Height: | Size: 40 KiB |
3
tikz/dijkstra-fail/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
|
@ -1,25 +0,0 @@
|
|||
SOURCE = dot-product-1
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
|
||||
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
|
||||
|
||||
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
|
|
@ -1,2 +0,0 @@
|
|||
Das ist nicht fertig!
|
||||
TODO: Fertig stellen
|
|
@ -1,93 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
class Node(object):
|
||||
""" A node. """
|
||||
|
||||
def __init__(self, x, y, data):
|
||||
self._data = data # data connected to the node
|
||||
self._x = x # x-position
|
||||
self._y = y # y-position
|
||||
|
||||
data = property(fget=lambda self: self._data)
|
||||
x = property(fget=lambda self: self._x)
|
||||
y = property(fget=lambda self: self._y)
|
||||
|
||||
def __str__(self):
|
||||
return "{(%i,%i)/%s}" % (self.x, self.y, str(self.data))
|
||||
|
||||
def __repr__(self):
|
||||
return "{(%i,%i)/%s}" % (self.x, self.y, str(self.data))
|
||||
|
||||
class Edge(object):
|
||||
""" An edge. """
|
||||
|
||||
def __init__(self, startNode, endNode, weight=0, directed=False):
|
||||
self._startNode = startNode
|
||||
self._endNode = endNode
|
||||
self._weight = weight
|
||||
self._directed = directed
|
||||
|
||||
startNode = property(fget=lambda self: self._startNode)
|
||||
endNode = property(fget=lambda self: self._endNode)
|
||||
weight = property(fget=lambda self: self._weight)
|
||||
directed = property(fget=lambda self: self._directed)
|
||||
|
||||
def __str__(self):
|
||||
return "%s/%s/%i" % (str(id(self.startNode)), str(id(self.endNode)), self.weight)
|
||||
|
||||
def __repr__(self):
|
||||
return "%s/%s/%i" % (str(id(self.startNode)), str(id(self.endNode)), self.weight)
|
||||
|
||||
class Graph(object):
|
||||
""" A graph. """
|
||||
|
||||
def __init__(self, directed=False):
|
||||
self._directed = directed
|
||||
self._edges = []
|
||||
self._vertices = []
|
||||
|
||||
directed = property(fget=lambda self: self._directed)
|
||||
edges = property(fget=lambda self: self._edges)
|
||||
vertices = property(fget=lambda self: self._vertices)
|
||||
|
||||
def printVertices(self):
|
||||
vertexString = ""
|
||||
for vertex in self.vertices:
|
||||
vertexString += str(vertex)
|
||||
return vertexString
|
||||
|
||||
def printEdges(self):
|
||||
edgeString = "% Connect vertices with edges and draw weights\n"
|
||||
edgeString += "\\foreach \source/ \dest /\weight in {"
|
||||
for i, edge in enumerate(self.edges):
|
||||
if i != 0:
|
||||
edgeString += ", "
|
||||
edgeString += str(edge)
|
||||
edgeString += "}\n"
|
||||
edgeString += "\path[edge] (\source) -- node[weight] {$\weight$} (\dest);"
|
||||
return edgeString
|
||||
|
||||
def printGraph(self):
|
||||
print("\\begin{tikzpicture}[scale=1.8, auto,swap]")
|
||||
print("\\foreach \pos/\\name in {" + self.printVertices() + "}")
|
||||
print("\t\\node[vertex] (\\name) at \pos {$\\name$};")
|
||||
print(self.printEdges())
|
||||
print("\end{tikzpicture}")
|
||||
|
||||
if '__main__' == __name__:
|
||||
graph = Graph()
|
||||
k1 = Node(1,2, 1)
|
||||
k2 = Node(3,0, 2)
|
||||
k3 = Node(3,3, 3)
|
||||
k6 = Node(1,4, 6)
|
||||
k5 = Node(4,5, 5)
|
||||
k4 = Node(5,3, 4)
|
||||
graph._vertices.append(k1)
|
||||
graph._vertices.append(k2)
|
||||
graph._vertices.append(k3)
|
||||
graph._vertices.append(k4)
|
||||
graph._vertices.append(k5)
|
||||
graph._vertices.append(k6)
|
||||
graph._edges.append(Edge(k1,k2, 7))
|
||||
graph.printGraph()
|
|
@ -1,24 +0,0 @@
|
|||
\documentclass{article}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows,positioning}
|
||||
\tikzset{
|
||||
%Define standard arrow tip
|
||||
>=stealth',
|
||||
% Define arrow style
|
||||
pil/.style={
|
||||
->,
|
||||
thick}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}
|
||||
\draw[fill=green!30] (0,0) -- (90:.75cm) arc (90:27:.75cm);
|
||||
\draw[pil,color=black] (0,0) -- node[right=2pt] {$\vec a$} (27:2.2cm);
|
||||
\draw[pil,color=black] (0,0) -- node[near end, right=-3pt] {$\vec b$} (90:2cm);
|
||||
\draw(60:0.5cm) node {$\varphi$};
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
3
tikz/dot-product-1/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/dot-product-2/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/dot-product-4/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/dot-product-5/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/dot-product-6/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
3
tikz/doubly-linked-list/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
|
@ -25,11 +25,9 @@ transparentGif:
|
|||
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
|
||||
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
|
||||
|
|
3
tikz/earth-skizze-2/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 30 KiB |
3
tikz/earth-skizze/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|