Permalink
Browse files

Made a cleaner directory structure

  • Loading branch information...
1 parent e334589 commit 4644f93c393e0a43a4aa349e6a19b6f0e22e3889 @duairc committed Jul 4, 2009
View
@@ -1,7 +1,8 @@
*
!*.rb
!*.tex
-!*.png
+!chapters/*
+!images/*
!*.pdf
!README.*
!.gitignore
View
BIN book.pdf
Binary file not shown.
View
@@ -29,7 +29,7 @@
\makeatother
\newcommand{\chap}[1]{\chapter{#1}\label{chap:\thechapter}
-\begin{center}\phantomsection\label{img:\thechapter}\includegraphics[scale=0.5]{chapter\thechapter.png}\end{center}}
+\begin{center}\phantomsection\label{img:\thechapter}\includegraphics[scale=0.5]{images/chapter\thechapter.png}\end{center}}
\newcommand{\sect}[1]{\section{#1}\label{sec:\thesection}}
\pagestyle{fancy}
@@ -143,9 +143,9 @@
\pagenumbering{roman}
\tableofcontents\newpage
\pagenumbering{arabic}
-\input{chapter1.tex}
-\input{chapter2.tex}
-\input{chapter3.tex}
-\input{chapter4.tex}
-\input{chapter5.tex}
+\input{chapters/chapter1.tex}
+\input{chapters/chapter2.tex}
+\input{chapters/chapter3.tex}
+\input{chapters/chapter4.tex}
+\input{chapters/chapter5.tex}
\end{document}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
View
@@ -1,6 +1,7 @@
class Array;def mi;i=0;map!{|t|x=yield(i,t);i+=1;x};end;end
-def write;$chapters.each_index{|i|c=$chapters[i];File.open("chapter#{i + 1}.tex", 'w'){|f|f.write c}};nil;end
-def read;$chapters=(1..21).map{|i|File.read("chapter#{i}.tex")};end
+def write;$chapters.each_index{|i|c=$chapters[i];File.open("chapters/chapter#{i
++ 1}.tex", 'w'){|f|f.write c}};nil;end
+def read;$chapters=(1..21).map{|i|File.read("chapters/chapter#{i}.tex")};end
def preview;$saved=read;write;end
def revert;$chapters=$saved;write;end
def replace(r,s=nil,&k);read;a=0;$chapters.mi{|i,x|x.gsub(r){$d=$~;a+=1;(k||lambda{|*o|t=$~;s.gsub(/\\(\d)/){t[$1.to_i]}}).call(i,x)||x}};a;end

0 comments on commit 4644f93

Please sign in to comment.