rake4latex 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ %
2
+ % Literaturdatenbank
3
+ %
4
+
5
+ % Remark for testing:
6
+ % If you want to test, if changes in the bibfile force a new bibtex and
7
+ %
8
+
9
+ @Article{ dtk00.4:lickert:blindtext,
10
+ author = {Knut Lickert},
11
+ title = {blindtext.sty: Viel {T}ext um {N}ichts},
12
+ journal = dtk,
13
+ year = 2000,
14
+ volume = {4/00},
15
+ altvolume = 4,
16
+ altnumber = 12,
17
+ month = nov,
18
+ pages = {47--50},
19
+ annote = bretter,
20
+ keywords = {},
21
+ abstract = {Mit dem hier beschriebenen Paket \texttt{blindtext.sty}
22
+ kann man schnell Text erzeugen, um Klassen und Pakete zu
23
+ testen. Das Paket ist im CTAN unter
24
+ \texttt{tex\_archive/macros/latex/contrib/supported/minutes/blindtext.dtx}
25
+ verf{\"u}gbar. }
26
+ }
@@ -0,0 +1,16 @@
1
+ \documentclass[english]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ % ----------------------------------------------------------------
7
+ % ----------------------------------------------------------------
8
+ \begin{document}
9
+ \blindtext
10
+
11
+ This text is generated by blindtext.sty, see \cite{dtk00.4:lickert:blindtext}
12
+
13
+ \bibliographystyle{plain}
14
+ \bibliography{testdocument}
15
+ \end{document}
16
+ % ----------------------------------------------------------------
@@ -0,0 +1,36 @@
1
+ #
2
+ # Test includes
3
+ #
4
+ Dir.chdir('../../lib'){ require 'rake4latex'}
5
+
6
+
7
+ deps = [
8
+ 'testdocument.tex', 'testincludes/testinclude1.tex', 'testincludes/testinclude2.tex',
9
+ #~ 'testdocument.ind',
10
+ ]
11
+
12
+ #~ puts LaTeXDependencies.get_dependecies( 'testdocument.tex', :inputs ).inspect
13
+ #~ puts LaTeXDependencies.new('testdocument.tex').get_dependecies( :inputs ).inspect
14
+ #~ puts LaTeXDependencies.new('testdocument.tex').get_dependecies( :inputs, :flat ).inspect
15
+ #~ deps = LaTeXDependencies.new('testdocument.tex').get_dependecies( :inputs, :flat )
16
+
17
+ file 'testdocument.dvi' => deps
18
+ file 'testdocument.pdf' => deps
19
+
20
+ task :basefile => 'testdocument.tex'
21
+ task :touch => 'testdocument.tex' #Zeitstempel anpassen/Kompilation erzwingen
22
+
23
+ task :default => :touch
24
+ #~ task :default => 'testdocument.dvi'
25
+ task :default => 'testdocument.pdf'
26
+ task :default => :clean
27
+
28
+ desc "Testtask for Unittest"
29
+ task :test => [ :touch, 'testdocument.pdf' ]
30
+
31
+ if $0 == __FILE__
32
+ app = Rake.application
33
+ app[:default].invoke
34
+ end
35
+
36
+
@@ -0,0 +1,24 @@
1
+ \documentclass[ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ % ----------------------------------------------------------------
7
+ \begin{document}
8
+ \tableofcontents
9
+ \part{Start}
10
+ %\blinddocument
11
+ \blindtext
12
+
13
+
14
+ \part{Check inputs}
15
+ %Test inputs
16
+ \input{testincludes/testinclude1.tex}
17
+ \input{testincludes/testinclude1}
18
+
19
+ %Recursive include -> Exception
20
+ %But ok, if commented
21
+ %\input{testdocument}
22
+
23
+ \end{document}
24
+ % ----------------------------------------------------------------
@@ -0,0 +1,7 @@
1
+ \section{testinclude1.tex}
2
+ \subsection{Content testinclude1.tex}
3
+ \blindtext
4
+
5
+ And now input the next include:
6
+ \input{testincludes/testinclude2.tex}
7
+
@@ -0,0 +1,2 @@
1
+ \subsection{In testinclude2.tex}
2
+ \blindtext
@@ -0,0 +1,36 @@
1
+ #
2
+ #Test index
3
+ #
4
+ Dir.chdir('../../lib'){ require 'rake4latex'}
5
+
6
+ #~ deps = [
7
+ #~ 'testdocument.tex'
8
+ #~ ]
9
+ #~ file 'testdocument.dvi' => deps
10
+ #~ file 'testdocument.pdf' => deps
11
+
12
+ #~ file 'testdocument.dvi' => LaTeXRunner.find_included_files( 'testdocument.tex' ).flatten.uniq
13
+
14
+ task :basefile => 'testdocument.tex'
15
+ task :touch => 'testdocument.tex' #Zeitstempel anpassen/Kompilation erzwingen
16
+
17
+
18
+ task :default => :touch
19
+ #~ task :default => 'testdocument.dvi'
20
+ task :default => 'testdocument.pdf'
21
+ task :default => :clean
22
+
23
+ #~ task :clean do
24
+ #~ puts CLEAN.inspect
25
+ #~ puts CLOBBER.inspect
26
+ #~ end
27
+
28
+ desc "Testtask for Unittest"
29
+ task :test => [ :touch, 'testdocument.pdf' ]
30
+
31
+
32
+ if $0 == __FILE__
33
+ app = Rake.application
34
+ app.set_latexrunner_default(:loglevel, Log4r::DEBUG)
35
+ app[:default].invoke
36
+ end
@@ -0,0 +1,18 @@
1
+ \documentclass[ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ \usepackage{makeidx}
7
+ % ----------------------------------------------------------------
8
+ \makeindex
9
+ % ----------------------------------------------------------------
10
+ \begin{document}
11
+ \blindtext
12
+ \index{Test}
13
+
14
+ \index{Test2}
15
+
16
+ \printindex
17
+ \end{document}
18
+ % ----------------------------------------------------------------
@@ -0,0 +1,43 @@
1
+ #
2
+ #Test index
3
+ #
4
+ Dir.chdir('../../lib'){ require 'rake4latex'}
5
+
6
+ #Prepeare longtable-content
7
+ #~ 6.times{
8
+ #~ puts "%10i & " % (rand(10).to_s * (rand(9) + 1)) +
9
+ #~ "%10i & " % (rand(10).to_s * (rand(9) + 1)) +
10
+ #~ "\\blindtext\\\\\\\hline"
11
+ #~ }
12
+ #~ exit
13
+
14
+ #~ deps = [
15
+ #~ 'testdocument.tex'
16
+ #~ ]
17
+ #~ file 'testdocument.dvi' => deps
18
+ #~ file 'testdocument.pdf' => deps
19
+
20
+ #~ file 'testdocument.dvi' => LaTeXRunner.find_included_files( 'testdocument.tex' ).flatten.uniq
21
+
22
+ task :basefile => 'testdocument.tex'
23
+ task :touch => 'testdocument.tex' #Zeitstempel anpassen/Kompilation erzwingen
24
+
25
+ task :default => [:touch]
26
+ #~ task :default => 'testdocument.dvi'
27
+ task :default => 'testdocument.pdf'
28
+ task :default => :clean
29
+
30
+ #~ task :clean do
31
+ #~ puts CLEAN.inspect
32
+ #~ puts CLOBBER.inspect
33
+ #~ end
34
+
35
+ desc "Testtask for Unittest"
36
+ task :test => [ :touch, 'testdocument.pdf' ]
37
+
38
+
39
+ if $0 == __FILE__
40
+ app = Rake.application
41
+ app.set_latexrunner_default(:loglevel, Log4r::DEBUG)
42
+ app[:default].invoke
43
+ end
@@ -0,0 +1,28 @@
1
+ \documentclass[10pt,ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ \usepackage{longtable}
7
+ % ----------------------------------------------------------------
8
+ \setlength\LTchunksize{1}%force bad calculation
9
+ %see Vossen, Tabellen in LaTeX, page 119
10
+ % ----------------------------------------------------------------
11
+ \begin{document}
12
+ \blindtext
13
+
14
+ {\scriptsize
15
+ \begin{longtable}{l|l|p{0.3\textwidth}}
16
+ 4444444 & 33333 & \blindtext\\\hline
17
+ 0 & 222 & \blindtext\\\hline
18
+ 6666 & 222222 & \blindtext\\\hline
19
+ 111111111 & 777777 & \blindtext\\\hline
20
+ 333 & 8888888 & \blindtext\\\hline
21
+ 4444 & 99 & \blindtext\\\hline\pagebreak
22
+ a & b & c \\\hline
23
+ A long text to get a bad layout & b & c \\\hline
24
+ \end{longtable}
25
+ }
26
+
27
+ \end{document}
28
+ % ----------------------------------------------------------------
@@ -0,0 +1,31 @@
1
+ Dir.chdir('../../lib'){ require 'rake4latex'}
2
+
3
+ #~ deps = [
4
+ #~ 'testdocument.tex'
5
+ #~ ]
6
+ #~ file 'testdocument.dvi' => deps
7
+ #~ file 'testdocument.pdf' => deps
8
+
9
+ #~ file 'testdocument.dvi' => LaTeXRunner.find_included_files( 'testdocument.tex' ).flatten.uniq
10
+
11
+ task :basefile => 'testdocument.tex'
12
+ task :touch => 'testdocument.tex' #Zeitstempel anpassen/Kompilation erzwingen
13
+
14
+ task :default => :touch
15
+ #~ task :default => 'testdocument.dvi'
16
+ task :default => 'testdocument.pdf'
17
+ task :default => :clean
18
+
19
+ #~ task :clean do
20
+ #~ puts CLEAN.inspect
21
+ #~ puts CLOBBER.inspect
22
+ #~ end
23
+
24
+ desc "Testtask for Unittest"
25
+ task :test => [ :touch, 'testdocument.pdf' ]
26
+
27
+ if $0 == __FILE__
28
+ app = Rake.application
29
+ app[:default].invoke
30
+ #~ app[:test].invoke
31
+ end
@@ -0,0 +1,30 @@
1
+ \documentclass[ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ % ----------------------------------------------------------------
7
+ \usepackage{minitoc}
8
+ \dosecttoc
9
+ % ----------------------------------------------------------------
10
+ \begin{document}
11
+ \faketableofcontents
12
+
13
+ \section{SectionA}
14
+ \secttoc
15
+ \subsection{SectionA.1}
16
+ \blindtext
17
+ \subsection{SectionA.2}
18
+ \blindtext
19
+
20
+
21
+ \section{SectionB}
22
+ \secttoc
23
+ \subsection{SectionB.1}
24
+ \blindtext
25
+ \subsection{SectionB.2}
26
+ \blindtext
27
+
28
+
29
+ \end{document}
30
+ % ----------------------------------------------------------------
@@ -0,0 +1,51 @@
1
+ #
2
+ #Test index
3
+ #
4
+ Dir.chdir('../../lib'){ require 'rake4latex'}
5
+
6
+ desc "Call Rail"
7
+ tex_postrule '.rao' => '.rai' do |t|
8
+ stdout, stderr = catch_screen_output{
9
+ #fixme: Dateinamen l�nger 8 stellen
10
+ cmd = "C:/usr/texmf/tex/Latex/rail/rail.exe -t #{t.source.ext('')}"
11
+ puts cmd
12
+ puts `#{cmd}`
13
+ }
14
+ if $? != 0
15
+ Rake.application.latexrunner.logger.fatal("There where Rail errors. \n#{stdout}")
16
+ end
17
+ #~ puts stdout
18
+ end
19
+
20
+ #~ deps = [
21
+ #~ 'testrail.tex'
22
+ #~ ]
23
+ #~ file 'testrail.dvi' => deps
24
+ #~ file 'testrail.pdf' => deps
25
+
26
+ #~ file 'testrail.dvi' => LaTeXRunner.find_included_files( 'testrail.tex' ).flatten.uniq
27
+
28
+ task :basefile => 'testrail.tex'
29
+ task :touch => 'testrail.tex' #Zeitstempel anpassen/Kompilation erzwingen
30
+
31
+ task :default => :touch
32
+ #~ task :default => 'testrail.dvi'
33
+ task :default => 'testrail.pdf'
34
+ task :default => :clean
35
+
36
+ #~ task :clean do
37
+ #~ puts CLEAN.inspect
38
+ #~ puts CLOBBER.inspect
39
+ #~ end
40
+
41
+ desc "Testtask for Unittest"
42
+ task :test => [ :touch, 'testrail.pdf' ]
43
+
44
+
45
+ if $0 == __FILE__
46
+ app = Rake.application
47
+ #~ app.set_latexrunner_default(:loglevel, Log4r::DEBUG)
48
+ #~ app.set_latexrunner_default(:texerrors_allowed, true)
49
+ #~ app[:default].invoke
50
+ app[:test].invoke
51
+ end
@@ -0,0 +1,32 @@
1
+ \documentclass[ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{hyperref}
5
+ % ----------------------------------------------------------------
6
+ \usepackage{rail}
7
+
8
+ \title{Rail-Diagramms in Creole}
9
+ \hypersetup{pdftitle={Rail-Diagramms in Creole}}
10
+
11
+ % ----------------------------------------------------------------
12
+ \begin{document}
13
+ \section{Rail-Diagramms}
14
+ \subsection{Via Ruby-object}
15
+
16
+
17
+ %
18
+ % Define a rail-diagramm block
19
+ %
20
+ \begin{rail}
21
+ block :
22
+ ( lbrace | 'begin' )
23
+ ( ( '|' ( variable + ',' ) '|' ) | [Keine Blockvariablen] )
24
+ comm
25
+ ( rbrace | 'end' )
26
+ ;
27
+ \end{rail}
28
+
29
+
30
+
31
+ \end{document}
32
+ % ----------------------------------------------------------------
@@ -0,0 +1,36 @@
1
+ #
2
+ #Testcase splitindex
3
+ #
4
+ Dir.chdir('../../lib'){ require 'rake4latex'}
5
+
6
+ #~ deps = [
7
+ #~ 'testdocument.tex'
8
+ #~ ]
9
+ #~ file 'testdocument.dvi' => deps
10
+ #~ file 'testdocument.pdf' => deps
11
+
12
+ #~ file 'testdocument.dvi' => LaTeXRunner.find_included_files( 'testdocument.tex' ).flatten.uniq
13
+
14
+ task :basefile => 'testdocument.tex'
15
+ task :touch => 'testdocument.tex' #Zeitstempel anpassen/Kompilation erzwingen
16
+
17
+ #Not detected by set4clean:
18
+ CLEAN.add("testdocument-*") #splitidx-helpfiles
19
+
20
+ task :default => :touch
21
+ #~ task :default => 'testdocument.dvi'
22
+ task :default => 'testdocument.pdf'
23
+ task :default => :clean
24
+
25
+ #~ task :clean do
26
+ #~ puts CLEAN.inspect
27
+ #~ puts CLOBBER.inspect
28
+ #~ end
29
+
30
+ desc "Testtask for Unittest"
31
+ task :test => [ :touch, 'testdocument.pdf' ]
32
+
33
+ if $0 == __FILE__
34
+ app = Rake.application
35
+ app[:default].invoke
36
+ end
@@ -0,0 +1,29 @@
1
+ \documentclass[ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{splitidx}\makeindex
5
+ \usepackage{blindtext}
6
+ \usepackage{hyperref}
7
+ % ----------------------------------------------------------------
8
+ \newindex[GeneralIndex]{idx} % Nameandshortcutofthe1stindex
9
+ \newindex[Index of Animals]{ani} % ...2ndindex
10
+ \newindex[Index of Fruits]{fru} % ...3rdindex
11
+ \newindex[Index of Vegetables]{veg} % ...4thindex
12
+ % ----------------------------------------------------------------
13
+ \begin{document}
14
+ \blindtext
15
+
16
+ Apples\sindex[fru]{apple} and oranges\sindex[fru]{orange}
17
+ are fruits\sindex{fruits}.
18
+
19
+ \blindtext
20
+
21
+ Tomatoes\sindex[veg]{tomato} are vegetables\index{vegetables}.
22
+ Cats\sindex[ani]{cat} are animals\sindex[idx]{animals}.
23
+
24
+ \printindex
25
+ \printindex[ani]
26
+ \printindex[fru]
27
+ \printindex[veg]
28
+ \end{document}
29
+ % ----------------------------------------------------------------