浏览代码

added wiki-example

Martin Thoma 13 年之前
父节点
当前提交
ae10773107
共有 2 个文件被更改,包括 44 次插入0 次删除
  1. 32 0
      tikz/wiki-example/Makefile
  2. 12 0
      tikz/wiki-example/wiki-example.tex

+ 32 - 0
tikz/wiki-example/Makefile

@@ -0,0 +1,32 @@
+SOURCE = wiki-example
+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:
+	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

+ 12 - 0
tikz/wiki-example/wiki-example.tex

@@ -0,0 +1,12 @@
+\documentclass[varwidth=true, border=2pt]{standalone}
+\usepackage{amsmath}
+\usepackage{xypic}
+
+\begin{document}
+\begin{equation*}
+  \xymatrix@R+2em@C+2em{
+  A \ar[r]^-f \ar[d]_-\varphi & B \ar[d]^-\psi \\
+  C \ar[r]_-g & D
+  }
+ \end{equation*}
+\end{document}