rake4latex 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/{lib/call_rake4latex.rb → call_rake4latex.rb} +21 -9
  2. data/lib/rake4latex.rb +113 -180
  3. data/lib/rake4latex/base.rb +205 -0
  4. data/lib/rake4latex/clean.rb +53 -0
  5. data/lib/rake4latex/latexdependencies.rb +2 -0
  6. data/lib/rake4latex/latexrunner.rb +31 -15
  7. data/lib/rake4latex/rake4latex.yaml +76 -0
  8. data/lib/rake4latex/rules.rb +90 -18
  9. data/lib/rake4latex/splitindex.rb +5 -2
  10. data/lib/rake4latex/template.rb +60 -0
  11. data/lib/rake4latex/tex_statistic.rb +8 -3
  12. data/lib/rake4latex_dvipdfm.rb +40 -0
  13. data/lib/rake4latex_lualatex.rb +22 -0
  14. data/lib/rake4latex_pdflatex.rb +22 -0
  15. data/lib/rake4latex_ps2pdf.rb +27 -0
  16. data/lib/rake4latex_xelatex.rb +22 -0
  17. data/license.txt +15 -0
  18. data/readme.html +70 -23
  19. data/readme.txt +58 -18
  20. data/readme_call_rake4latex.txt +25 -0
  21. data/test/_expected/bibtex_test.txt +10 -0
  22. data/test/_expected/bibtex_test_bib.txt +5 -0
  23. data/test/_expected/dvipdfm_test.txt +7 -0
  24. data/test/_expected/gloss_test.txt +16 -0
  25. data/test/_expected/gloss_test_bib.txt +8 -0
  26. data/test/_expected/includes_test.txt +8 -0
  27. data/test/_expected/index_test.txt +7 -0
  28. data/test/_expected/longtable_test.txt +6 -0
  29. data/test/_expected/minitoc_test.txt +8 -0
  30. data/test/_expected/ps2pdf_test.txt +8 -0
  31. data/test/_expected/rail_test.txt +7 -0
  32. data/test/_expected/rail_test_error.txt +10 -0
  33. data/test/_expected/splitindex_test.txt +8 -0
  34. data/test/_expected/supertabular_test.txt +6 -0
  35. data/test/_expected/supertabular_test_statistic.txt +30 -0
  36. data/test/_expected/z_complex_test.txt +12 -0
  37. data/test/_test_call/test_call.rb +14 -0
  38. data/test/_test_call/testdocument.tex +18 -0
  39. data/test/bibtex/rakefile.rb +11 -5
  40. data/test/bibtex/testdocument.bib +1 -0
  41. data/test/dvipdfm/rakefile.rb +43 -0
  42. data/test/dvipdfm/testdocument.tex +10 -0
  43. data/test/gloss/rakefile.rb +65 -0
  44. data/test/gloss/test_gloss.bib +4 -0
  45. data/test/gloss/testdocument.tex +31 -0
  46. data/test/includes/rakefile.rb +4 -4
  47. data/test/index/rakefile.rb +1 -1
  48. data/test/longtable/rakefile.rb +1 -1
  49. data/test/ps2pdf/rakefile.rb +43 -0
  50. data/test/ps2pdf/testdocument.tex +10 -0
  51. data/test/rail/rakefile.rb +10 -19
  52. data/test/rail/testrail.tex +2 -6
  53. data/test/rail/testrail_error.tex +58 -0
  54. data/test/supertabular/rakefile.rb +1 -1
  55. data/test/unittest_rake4latex.rb +66 -0
  56. data/test/z_complex/rakefile.rb +2 -2
  57. metadata +64 -6
@@ -0,0 +1,25 @@
1
+ Usage: call_rake4latex.rb [options] filename
2
+ Call LaTeX as often as needed.
3
+
4
+ Examples:
5
+ call_rake4latex testdocument.pdf
6
+ Create testdocument.pdf via pdflatex
7
+ Starts only if testdocument.tex is newer then testdocument.pdf.
8
+
9
+ call_rake4latex -e testdocument
10
+ Touch 'testdocument.tex' (set the modification date)
11
+ Create testdocument.pdf via pdflatex
12
+
13
+ Specific options:
14
+ -e, --enforce Enforce an initial TeX-run
15
+ -f, --format FORMAT Set the format for TeX-run (pdflatex, xelatex, lualatex)
16
+ --dep, --dependecies Build dependecies (rakefile recommended)
17
+ -i, --ignore, --ignore-error Allow LaTeX errors
18
+ -s, --statistic Show the statistic after TeX-run
19
+ -c, --clean Clean after TeX-run (delete auxiliary files)
20
+ --touch FILE Touch FILE
21
+ --task TASK Define a rake-task
22
+ --task_after TASK Define a rake-task after the TeX-run
23
+ --maxrun MAXRUN Maximum MAXRUN TeX calls
24
+ -l, --loglevel LEVEL Log Level for the logger (1=debug, 2=info(default), 3=warn 4=error)
25
+ -v, --version Version
@@ -0,0 +1,10 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.bbl (testdocument.aux changed)
6
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
7
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
8
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.bbl (testdocument.aux changed)
9
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
10
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 3 runs
@@ -0,0 +1,5 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.bbl (testdocument.bib changed)
5
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 1 run
@@ -0,0 +1,7 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute latex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Excute latex -interaction=batchmode testdocument.tex
6
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 2 runs
7
+ INFO LaTeXRunner testdocument.tex: Call dvipdfm for <testdocument.dvi>
@@ -0,0 +1,16 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Define additional rule <animals.bbl> (gloss.sty)
5
+ INFO LaTeXRunner testdocument.tex: Define additional rule <gls.bbl> (gloss.sty)
6
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
7
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.animals.bbl (testdocument.animals.aux changed)
8
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.gls.bbl (testdocument.gls.aux changed)
9
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
10
+ INFO LaTeXRunner testdocument.tex: Define additional rule <animals.bbl> (gloss.sty)
11
+ INFO LaTeXRunner testdocument.tex: Define additional rule <gls.bbl> (gloss.sty)
12
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
13
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
14
+ INFO LaTeXRunner testdocument.tex: Define additional rule <animals.bbl> (gloss.sty)
15
+ INFO LaTeXRunner testdocument.tex: Define additional rule <gls.bbl> (gloss.sty)
16
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 3 runs
@@ -0,0 +1,8 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Define additional rule <animals.bbl> (gloss.sty)
5
+ INFO LaTeXRunner testdocument.tex: Define additional rule <gls.bbl> (gloss.sty)
6
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.animals.bbl (test_gloss.bib changed)
7
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.gls.bbl (test_gloss.bib changed)
8
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 1 run
@@ -0,0 +1,8 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
6
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
7
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
8
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 3 runs
@@ -0,0 +1,7 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.ind (testdocument.idx changed)
6
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
7
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 2 runs
@@ -0,0 +1,6 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
6
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 2 runs
@@ -0,0 +1,8 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
6
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
7
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
8
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 3 runs
@@ -0,0 +1,8 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute latex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Excute latex -interaction=batchmode testdocument.tex
6
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 2 runs
7
+ INFO LaTeXRunner testdocument.tex: Call dvips for <testdocument.dvi>
8
+ INFO LaTeXRunner testdocument.tex: Call ps2pdf for <testdocument.ps>
@@ -0,0 +1,7 @@
1
+
2
+ INFO LaTeXRunner testrail.tex: StartLaTeXRunner for testrail.tex
3
+ INFO LaTeXRunner testrail.tex: Excute pdflatex -interaction=batchmode testrail.tex
4
+ INFO LaTeXRunner testrail.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testrail.tex: Call target testrail.rao (testrail.rai changed)
6
+ INFO LaTeXRunner testrail.tex: Excute pdflatex -interaction=batchmode testrail.tex
7
+ INFO LaTeXRunner testrail.tex: TeX-run stopped after 2 runs
@@ -0,0 +1,10 @@
1
+
2
+ INFO LaTeXRunner testrail_error.tex: StartLaTeXRunner for testrail_error.tex
3
+ INFO LaTeXRunner testrail_error.tex: Excute pdflatex -interaction=batchmode testrail_error.tex
4
+ INFO LaTeXRunner testrail_error.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testrail_error.tex: Call target testrail_error.rao (testrail_error.rai changed)
6
+ ERROR LaTeXRunner testrail_error.tex: Rail error: stdin, line 2: syntax error in rule 'block2'
7
+ ERROR LaTeXRunner testrail_error.tex: Rail error: stdin, line 3: syntax error in rule 'block3'
8
+ WARN LaTeXRunner testrail_error.tex: No rail diagramms generated
9
+ INFO LaTeXRunner testrail_error.tex: Excute pdflatex -interaction=batchmode testrail_error.tex
10
+ INFO LaTeXRunner testrail_error.tex: TeX-run stopped after 2 runs
@@ -0,0 +1,8 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.ind (testdocument.idx changed)
6
+ INFO LaTeXRunner testdocument.tex: Build splitindex-files for ["veg", "ani", "idx", "fru"]
7
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
8
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 2 runs
@@ -0,0 +1,6 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
6
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 2 runs
@@ -0,0 +1,30 @@
1
+
2
+ Statistics:
3
+ testdocument.tex:
4
+ ---
5
+ testdocument.log:
6
+ :output:
7
+ :bytes: "60496"
8
+ :kbytes: 59
9
+ :name: testdocument.pdf
10
+ :pages: "7"
11
+ :underfull:
12
+ - badness 1648 at lines 13--13
13
+ - badness 3209 at lines 13--13
14
+ - badness 1845 at lines 13--13
15
+ - badness 1648 at lines 14--14
16
+ - badness 3209 at lines 14--14
17
+ - badness 1845 at lines 14--14
18
+ - badness 1648 at lines 15--15
19
+ - badness 3209 at lines 15--15
20
+ - badness 1845 at lines 15--15
21
+ - badness 1648 at lines 16--16
22
+ - badness 3209 at lines 16--16
23
+ - badness 1845 at lines 16--16
24
+ - badness 1648 at lines 17--17
25
+ - badness 3209 at lines 17--17
26
+ - badness 1845 at lines 17--17
27
+ - badness 1648 at lines 18--18
28
+ - badness 3209 at lines 18--18
29
+ - badness 1845 at lines 18--18
30
+
@@ -0,0 +1,12 @@
1
+
2
+ INFO LaTeXRunner testdocument.tex: StartLaTeXRunner for testdocument.tex
3
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
4
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
5
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.ind (testdocument.idx changed)
6
+ INFO LaTeXRunner testdocument.tex: Build splitindex-files for ["xxx", "veg", "ani", "idx", "fru"]
7
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.bbl (testdocument.aux changed)
8
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
9
+ INFO LaTeXRunner testdocument.tex: Rerun necessary (aux-file changed)
10
+ INFO LaTeXRunner testdocument.tex: Call target testdocument.bbl (testdocument.aux changed)
11
+ INFO LaTeXRunner testdocument.tex: Excute pdflatex -interaction=batchmode testdocument.tex
12
+ INFO LaTeXRunner testdocument.tex: TeX-run stopped after 3 runs
@@ -0,0 +1,14 @@
1
+ #
2
+ #Test, how to use rake4latex as a lib.
3
+ #
4
+
5
+ require 'rake4latex'
6
+ #~ rake4LaTeX.set_latexrunner_default(:loglevel, Log4r::DEBUG)
7
+ #~ rake4LaTeX.set_latexrunner_default(:texerrors_allowed, true)
8
+
9
+ task :touch => 'testdocument.tex'
10
+ task :runtex => [:touch, 'testdocument.pdf', :clean]
11
+ Rake.application[:runtex].invoke
12
+
13
+ #~ task :basefile => 'testdocument.pdf'
14
+ #~ Rake.application[:clobber].invoke
@@ -0,0 +1,18 @@
1
+ \documentclass[english]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ % ----------------------------------------------------------------
7
+ \title{Test document}
8
+ % ----------------------------------------------------------------
9
+ % ----------------------------------------------------------------
10
+ \begin{document}
11
+ \maketitle
12
+
13
+ \tableofcontents
14
+ % ----------------------------------------------------------------
15
+ \blinddocument
16
+ % ----------------------------------------------------------------
17
+ \end{document}
18
+ % ----------------------------------------------------------------
@@ -49,11 +49,17 @@ end
49
49
 
50
50
  if $0 == __FILE__
51
51
  app = Rake.application
52
- #~ app.set_latexrunner_default(:maxruns, 1)
53
- #~ app.set_latexrunner_default(:loglevel, Log4r::DEBUG)
54
- #~ app[:default].invoke
52
+ #~ Rake4LaTeX.set_latexrunner_default(:maxruns, 1)
53
+ #~ Rake4LaTeX.set_latexrunner_default(:loglevel, Log4r::DEBUG)
54
+ app[:default].invoke
55
55
 
56
56
  #~ app[:clean].invoke
57
- #~ app[:test].invoke
58
- app[:test_bib].invoke
57
+
58
+ #Simulate the unit test and build expected
59
+ #~ [ :test, :test_bib, :clean ].each{|testcase|
60
+ #~ stdout, stderr = catch_screen_output{
61
+ #~ app[testcase].invoke
62
+ #~ }
63
+ #~ File.open("#{File.basename(Dir.pwd)}_#{testcase}.txt", 'w'){ |f| f << stdout }
64
+ #~ }
59
65
  end
@@ -1,6 +1,7 @@
1
1
  %
2
2
  % Literaturdatenbank
3
3
  %
4
+ % Extract http://ftp.uni-koeln.de/tex/info/biblio/dtk.bib
4
5
 
5
6
  % Remark for testing:
6
7
  % If you want to test, if changes in the bibfile force a new bibtex and
@@ -0,0 +1,43 @@
1
+ #
2
+ #Test index
3
+ #
4
+ Dir.chdir('../../lib'){ require 'rake4latex_dvipdfm'}
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
+ #~ Rake4LaTeX.set_latexrunner_default(:loglevel, Log4r::DEBUG)
42
+ app[:default].invoke
43
+ end
@@ -0,0 +1,10 @@
1
+ \documentclass[10pt,ngerman]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ % ----------------------------------------------------------------
7
+ \begin{document}
8
+ \blinddocument
9
+ \end{document}
10
+ % ----------------------------------------------------------------
@@ -0,0 +1,65 @@
1
+ #
2
+ #Test gloss
3
+ #Glossaries auf Basis von BibTeX
4
+ #
5
+ Dir.chdir('../../lib'){ require 'rake4latex'}
6
+ =begin
7
+ Erzeugt .gls.aux bzw. test_gloss_newgloss.animals.aux
8
+ Diese normal verwenden.
9
+ =end
10
+
11
+ deps = [
12
+ 'testdocument.tex',
13
+ ]
14
+
15
+ #Aditional dependecy to recognize bib-changes
16
+ deps << 'test_gloss.bib'
17
+ file 'testdocument.gls.bbl' => 'test_gloss.bib'
18
+ file 'testdocument.gls.bbl' => 'testdocument.aux'
19
+ file 'testdocument.animals.bbl' => 'test_gloss.bib'
20
+ file 'testdocument.animals.bbl' => 'testdocument.aux'
21
+
22
+
23
+ file 'testdocument.dvi' => deps
24
+ file 'testdocument.pdf' => deps
25
+
26
+ #~ file 'testdocument.dvi' => LaTeXRunner.find_included_files( 'testdocument.tex' ).flatten.uniq
27
+
28
+ task :basefile => 'testdocument.tex'
29
+ task :touch => 'testdocument.tex' ##Zeitstempel anpassen/Kompilation erzwingen
30
+
31
+ task :default => :touch
32
+ #~ task :default => 'testdocument.dvi'
33
+ task :default => 'testdocument.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, 'testdocument.pdf' ]
43
+ desc "Check if bib-change restarts the TeX-process"
44
+ task :test_bib => [ :touch_bib, 'testdocument.pdf' ]
45
+
46
+ task :touch_bib do
47
+ FileUtils.touch('test_gloss.bib')
48
+ end
49
+
50
+ if $0 == __FILE__
51
+ app = Rake.application
52
+ #~ Rake4LaTeX.set_latexrunner_default(:maxruns, 1)
53
+ #~ Rake4LaTeX.set_latexrunner_default(:loglevel, Log4r::DEBUG)
54
+ app[:default].invoke
55
+
56
+ #~ app[:clean].invoke
57
+
58
+ #Simulate the unit test and build expected
59
+ #~ [ :test, :test_bib, :clean ].each{|testcase|
60
+ #~ stdout, stderr = catch_screen_output{
61
+ #~ app[testcase].invoke
62
+ #~ }
63
+ #~ File.open("#{File.basename(Dir.pwd)}_#{testcase}.txt", 'w'){ |f| f << stdout }
64
+ #~ }
65
+ end
@@ -0,0 +1,4 @@
1
+ @gd{gnu,
2
+ word = {gnu},
3
+ definition = {Extrange animal}
4
+ }
@@ -0,0 +1,31 @@
1
+ \documentclass[english]{scrartcl}
2
+ \usepackage{babel}
3
+ \usepackage[ansinew]{inputenc}
4
+ \usepackage{blindtext}
5
+ \usepackage{hyperref}
6
+ % ----------------------------------------------------------------
7
+ \usepackage{gloss}
8
+ \makegloss %Default glossary
9
+ \newgloss{animals}{.animals}{Animals}{glsplain} %Additional glossary
10
+
11
+ % ----------------------------------------------------------------
12
+ \begin{document}
13
+
14
+ %
15
+ %Define the texts with two glossars
16
+ %
17
+ \gloss{gnu}
18
+ \gloss[animals]{gnu}
19
+ \blindtext
20
+ \gloss[animals]{gnu}
21
+
22
+ %
23
+ %Print the glossaries
24
+ %
25
+ \printgloss{test_gloss}
26
+ \printgloss[animals]{test_gloss}
27
+
28
+
29
+ %\printgloss{test_gloss}
30
+ \end{document}
31
+ % ----------------------------------------------------------------
@@ -9,10 +9,10 @@ deps = [
9
9
  #~ 'testdocument.ind',
10
10
  ]
11
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 )
12
+ #~ puts Rake4LaTeX::LaTeXDependencies.get_dependecies( 'testdocument.tex', :inputs ).to_yaml
13
+ #~ puts Rake4LaTeX::LaTeXDependencies.new('testdocument.tex').get_dependecies( :inputs ).inspect
14
+ #~ puts Rake4LaTeX::LaTeXDependencies.new('testdocument.tex').get_dependecies( :inputs, :flat ).inspect
15
+ #~ deps = Rake4LaTeX::LaTeXDependencies.new('testdocument.tex').get_dependecies( :inputs, :flat )
16
16
 
17
17
  file 'testdocument.dvi' => deps
18
18
  file 'testdocument.pdf' => deps