rake4latex 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,46 @@
1
+ \def\batchfile{blindtext.ins}
2
+ \input docstrip.tex
3
+
4
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
+ \preamble
6
+ ----------------------------------------------------------------------
7
+ The original file is loadable from CTAN on:
8
+ tex-archive/latex/contrib/blindtext
9
+
10
+ Name of contribution: blindtext
11
+ Name and email: Knut Lickert <knut@lickert.net>
12
+ Location on CTAN: tex-archive/macros/latex/contrib/blindtext
13
+ Summary description: Package for writing text
14
+ License type: Free
15
+
16
+ Announcement text:
17
+ blindtext.sty:
18
+ Style to create text.
19
+ Can be used to create examples with a lot text to become a feeling
20
+ for the look of classes, packages...
21
+
22
+ There are macros to create dummy text, dummy lists and
23
+ dummy documents with sections, text and lists.
24
+
25
+ For more information visit
26
+ http://tex.lickert.net/packages/blindtext/index.html
27
+ ----------------------------------------------------------------------
28
+ \endpreamble
29
+
30
+ \generateFile{blindtext.sty}{f}{
31
+ \from{blindtext.dtx}{package}
32
+ \from{blindtext_texts.dtx}{package}
33
+ \from{blindtext.dtx}{packageend}
34
+ }
35
+ %\generateFile{blind_texts.sty}{f}{\from{generator_text/blind_texts.dtx}{package}}
36
+
37
+ \Msg{***************************************************************}
38
+ \Msg{*}
39
+ \Msg{* To finish the installation you have to copy the files }
40
+ \Msg{*}
41
+ \Msg{*\space\space *.sty into a directory searched by TeX}
42
+ \Msg{*}
43
+ \Msg{***************************************************************}
44
+
45
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46
+ \endinput
@@ -3,8 +3,8 @@
3
3
  #http://theoval.cmp.uea.ac.uk/~nlct/latex/packages/glossaries/glossaries-manual.html
4
4
  #
5
5
  Dir.chdir('../../lib'){
6
- require 'rake4latex'
7
- require 'rake4latex/glossaries'
6
+ require './rake4latex'
7
+ require './rake4latex/glossaries'
8
8
  }
9
9
  #~ require 'glossaries'
10
10
 
@@ -34,6 +34,12 @@ if $0 == __FILE__
34
34
  #~ Rake4LaTeX.set_latexrunner_default(:loglevel, Log4r::DEBUG)
35
35
  #~ Rake4LaTeX.set_latexrunner_default(:texerrors_allowed, true)
36
36
  #~ app[:default].invoke
37
- #~ app[:test].invoke
37
+ app[:test].invoke
38
38
  #~ app[:clean].invoke
39
- end
39
+ end
40
+ __END__
41
+ 2011-08-18:
42
+ test not successfull with win7.
43
+
44
+ Analyse of rail.exe does ot show error., stderr seems to be empty
45
+ See rules.rb, line 194
@@ -39,7 +39,11 @@ task :test_build_rakefile => [ :build_rakefile ]
39
39
 
40
40
  if $0 == __FILE__
41
41
  app = Rake.application
42
+ #~ Rake4LaTeX::DEFAULT_SETTINGS[:texerrors_allowed] = true
43
+ #~ app[:clean].invoke
42
44
  #~ app[:default].invoke
43
45
  app[:test].invoke
44
46
  #~ app[:test_build_rakefile].invoke
45
- end
47
+ end
48
+
49
+ __END__
@@ -180,15 +180,5 @@ xx
180
180
  assert_equal( {"gls"=>["./test_gloss.bib"], "[animals]"=>["./test_gloss.bib"]}, testfile.gloss )
181
181
  }
182
182
  end
183
- def test_splitindex()
184
- Dir.chdir('splitindex'){
185
- testfile = TeXfile.new('testdocument.tex')
186
- assert_equal( ['testdocument.tex'], testfile.tree )
187
- assert_equal( {"veg"=>"[Index of Vegetables]",
188
- "ani"=>"[Index of Animals]",
189
- "idx"=>"[GeneralIndex]",
190
- "fru"=>"[Index of Fruits]"},
191
- testfile.splitindex )
192
- }
193
- end
183
+
194
184
  end
@@ -1,6 +1,7 @@
1
1
  #
2
2
  #Checks the test cases (May take some time, makes a lot TeX-runs).
3
3
  #
4
+ gem 'test-unit'
4
5
  require 'test/unit'
5
6
  gem 'more_unit_test', '>0.0.2'
6
7
  require 'more_unit_test/assert_equal_filecontent'
@@ -52,7 +53,8 @@ class Test_testdocument < Test::Unit::TestCase
52
53
  end
53
54
 
54
55
  assert_equal_filecontent( "../_expected/#{dir}_#{testcase}.txt", result,
55
- "../_failure#{Date.today}"
56
+ "../_failure#{Date.today}",
57
+ "Testcase #{dir}/#{testcase} changed content"
56
58
  )
57
59
  }#loop on test-tasks
58
60
  }#File rakefile
@@ -75,6 +77,8 @@ class Test_testdocument < Test::Unit::TestCase
75
77
  next if dir =~ /^_/ #files for assert_equal_filecontent
76
78
 
77
79
 
80
+ #~ next unless dir =~ /bibte/
81
+ #~ next unless dir =~ /dtx/
78
82
  #~ next unless dir =~ /includes/
79
83
  #~ next unless dir =~ /complex/
80
84
  #~ next unless dir =~ /vario/
@@ -0,0 +1,86 @@
1
+ gem 'test-unit'
2
+ require 'test/unit'
3
+ #~ require 'assert_equal_filecontent'
4
+ if $0 == __FILE__
5
+ $:.unshift('../lib')
6
+ else
7
+ #Change the directory. Relevant, if called from rakefile_rake4latex.rb
8
+ Dir.chdir(File.dirname(__FILE__))
9
+ end
10
+ require 'rake4latex'
11
+ include Rake4LaTeX
12
+
13
+
14
+ class Test_Splitindex < Test::Unit::TestCase
15
+ def self.startup
16
+ @@testidx_file = '_tmp_splitindex.idx'
17
+ @@delete_at_teardown = []
18
+ @@delete_at_teardown << @@testidx_file
19
+ File.open(@@testidx_file, 'w'){|f|
20
+ f << <<idx
21
+ \indexentry[fru]{apple|hyperpage}{1}
22
+ \indexentry[fru]{orange|hyperpage}{1}
23
+ \indexentry{fruits|hyperpage}{1}
24
+ \indexentry[veg]{tomato|hyperpage}{1}
25
+ \indexentry{vegetables|hyperpage}{1}
26
+ \indexentry[ani]{cat|hyperpage}{1}
27
+ \indexentry[idx]{animals|hyperpage}{1}
28
+ idx
29
+ }
30
+ end
31
+ def self.shutdown
32
+ @@delete_at_teardown.each{|filename|
33
+ File.delete(filename) if File.exist?(filename)
34
+ }
35
+ end
36
+ def setup
37
+ @log = Log4r::Logger.new('log')
38
+ end
39
+ #~ def test_interface
40
+ #no exception thrown, only logger error
41
+ #~ assert_raise(ArgumentError, 'idx-file not found'){
42
+ #~ Rake4LaTeX::Splitindex.new(@@testidx_file * 2, @log)
43
+ #~ }
44
+ #~ end
45
+
46
+ def test_splitindex
47
+ sidx = nil
48
+ assert_nothing_raised{ sidx = Rake4LaTeX::Splitindex.new(@@testidx_file, @log)}
49
+ assert_equal(["fru", "idx", "veg", "ani"], sidx.indices)
50
+ assert_equal(sidx.indices, sidx.targets.keys)
51
+
52
+ #test ani
53
+ assert_equal(["\\indexentry{cat|hyperpage}{1}"], sidx.targets['ani'])
54
+
55
+ #test veg
56
+ assert_equal(["\\indexentry{tomato|hyperpage}{1}"], sidx.targets['veg'])
57
+
58
+ #test fru
59
+ assert_equal([
60
+ "\\indexentry{apple|hyperpage}{1}",
61
+ "\\indexentry{orange|hyperpage}{1}",
62
+ ], sidx.targets['fru'])
63
+
64
+ #test idx
65
+ assert_equal([
66
+ "\\indexentry{fruits|hyperpage}{1}",
67
+ "\\indexentry{vegetables|hyperpage}{1}",
68
+ "\\indexentry{animals|hyperpage}{1}"
69
+ ], sidx.targets['idx'])
70
+ end
71
+ end #Test_Splitindex
72
+
73
+
74
+ class Test_analyse < Test::Unit::TestCase
75
+ def test_splitindex()
76
+ Dir.chdir('splitindex'){
77
+ testfile = TeXfile.new('testdocument.tex')
78
+ assert_equal( ['testdocument.tex'], testfile.tree )
79
+ assert_equal( {"veg"=>"[Index of Vegetables]",
80
+ "ani"=>"[Index of Animals]",
81
+ "idx"=>"[GeneralIndex]",
82
+ "fru"=>"[Index of Fruits]"},
83
+ testfile.splitindex )
84
+ }
85
+ end
86
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake4latex
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Knut Lickert
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-14 00:00:00 +02:00
18
+ date: 2011-08-19 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -150,6 +150,8 @@ files:
150
150
  - test/bibtex/rakefile.rb
151
151
  - test/bibtex/testdocument.bib
152
152
  - test/bibtex/testdocument.tex
153
+ - test/dtx/blindtext.dtx
154
+ - test/dtx/blindtext.ins
153
155
  - test/dtx/rakefile.rb
154
156
  - test/dvipdfm/rakefile.rb
155
157
  - test/dvipdfm/testdocument.tex
@@ -186,6 +188,7 @@ files:
186
188
  - test/two_tasks/testdocument_2.tex
187
189
  - test/unittest_rake4latex.rb
188
190
  - test/unittest_rake4latex_testcases.rb
191
+ - test/unittest_splitindex.rb
189
192
  - test/varioref/rakefile.rb
190
193
  - test/varioref/testdocument.tex
191
194
  - test/z_complex/rakefile.rb
@@ -266,6 +269,8 @@ test_files:
266
269
  - test/bibtex/rakefile.rb
267
270
  - test/bibtex/testdocument.bib
268
271
  - test/bibtex/testdocument.tex
272
+ - test/dtx/blindtext.dtx
273
+ - test/dtx/blindtext.ins
269
274
  - test/dtx/rakefile.rb
270
275
  - test/dvipdfm/rakefile.rb
271
276
  - test/dvipdfm/testdocument.tex
@@ -305,6 +310,8 @@ test_files:
305
310
  - test/unittest_rake4latex.rb
306
311
  - test/unittest_rake4latex_testcases.rb
307
312
  - test/unittest_rake4latex_testcases.rb
313
+ - test/unittest_splitindex.rb
314
+ - test/unittest_splitindex.rb
308
315
  - test/varioref/rakefile.rb
309
316
  - test/varioref/testdocument.tex
310
317
  - test/z_complex/rakefile.rb