瀏覽代碼

added csv2piechart example; corrected error in CFB mode decryption

Martin Thoma 12 年之前
父節點
當前提交
8d67c61e5e

+ 5 - 0
README.md

@@ -41,3 +41,8 @@ Re-use
 =======
 =======
 Feel free to use and modify the examples of this repository.
 Feel free to use and modify the examples of this repository.
 But please add a link to this repository or martin-thoma.com
 But please add a link to this repository or martin-thoma.com
+
+Other resources
+===============
+* [LaTeX Templates](http://www.latextemplates.com/)
+* [LaTeX templates for writing a thesis](http://tex.stackexchange.com/q/326/5645)

二進制
tikz/CFB-Mode-Decryption/CFB-Mode-Decryption.png


+ 1 - 1
tikz/CFB-Mode-Decryption/CFB-Mode-Decryption.tex

@@ -22,7 +22,7 @@ TODO
     \foreach \nr in {1, ..., \n}{
     \foreach \nr in {1, ..., \n}{
         \node (C\nr)            at (0,{(\n-\nr)*3}) {$C_\nr$};
         \node (C\nr)            at (0,{(\n-\nr)*3}) {$C_\nr$};
         \node (x\nr)[XOR]   at (2,{(\n-\nr)*3}) {};
         \node (x\nr)[XOR]   at (2,{(\n-\nr)*3}) {};
-        \node (D\nr)[encrypt]       at (2,{(\n-\nr)*3+1}) {$D$};
+        \node (D\nr)[encrypt]       at (2,{(\n-\nr)*3+1}) {$E$};
         \node (K\nr)            at (2,{(\n-\nr)*3+2}) {$K$};
         \node (K\nr)            at (2,{(\n-\nr)*3+2}) {$K$};
         \node (M\nr)            at (4,{(\n-\nr)*3}) {$M_\nr$};
         \node (M\nr)            at (4,{(\n-\nr)*3}) {$M_\nr$};
 
 

+ 31 - 0
tikz/local-disk-space-piechart/Makefile

@@ -0,0 +1,31 @@
+SOURCE = local-disk-space-piechart
+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:
+	#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

+ 11 - 0
tikz/local-disk-space-piechart/local-disk-space-piechart-2013-07-08.csv

@@ -0,0 +1,11 @@
+Part,Space
+programs,18124.8
+movies,21606.4
+source code,6246.4
+VMs,3788.8
+Android SDK,1228.8
+Audio files,917.0
+.cache,832.1
+.config,358.5
+Desktop,341.3
+misc,829.44

+ 14 - 0
tikz/local-disk-space-piechart/local-disk-space-piechart.tex

@@ -0,0 +1,14 @@
+\documentclass{article}
+\usepackage[pdftex,active,tightpage]{preview}
+\setlength\PreviewBorder{2mm}
+\usepackage{datapie}
+\DTLsetpiesegmentcolor{9}{cyan}
+\DTLsetpiesegmentcolor{10}{brown}
+
+\begin{document}
+\begin{preview}
+    \DTLloaddb{myDB}{local-disk-space-piechart-2013-07-08.csv}
+    \DTLdisplaydb{myDB}
+    \DTLpiechart{variable=\Space,outerlabel=\Part}{myDB}{\Part=Part,\Space=Space}
+\end{preview}
+\end{document}