rake4latex 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/bin/call_rake4latex.rb +7 -1
  2. data/bin/readme_call_rake4latex.txt +1 -0
  3. data/lib/rake4latex.rb +15 -14
  4. data/lib/rake4latex/analyse_texfile.rb +6 -4
  5. data/lib/rake4latex/base.rb +191 -63
  6. data/lib/rake4latex/clean.rb +9 -6
  7. data/lib/rake4latex/glossaries.rb +101 -0
  8. data/lib/rake4latex/latexrunner.rb +16 -27
  9. data/lib/rake4latex/rules.rb +81 -54
  10. data/lib/rake4latex/splitindex.rb +0 -1
  11. data/lib/rake4latex/tex_statistic.rb +18 -6
  12. data/lib/rake4latex_dtx.rb +3 -3
  13. data/lib/rake4latex_dvipdfm.rb +2 -2
  14. data/readme.html +32 -14
  15. data/readme.txt +21 -11
  16. data/test/_expected/bibtex_test.txt +9 -9
  17. data/test/_expected/bibtex_test_bib.txt +4 -4
  18. data/test/_expected/bibtex_test_build_rakefile.txt +3 -0
  19. data/test/_expected/dtx_test.txt +11 -11
  20. data/test/_expected/dvipdfm_test.txt +6 -6
  21. data/test/_expected/error_test.txt +3 -3
  22. data/test/_expected/error_test_ignore_error.txt +4 -4
  23. data/test/_expected/error_test_overview.txt +7 -2
  24. data/test/_expected/error_test_statistic.txt +2 -2
  25. data/test/_expected/gloss_test.txt +15 -15
  26. data/test/_expected/gloss_test_bib.txt +7 -7
  27. data/test/_expected/gloss_test_build_rakefile.txt +3 -0
  28. data/test/_expected/glossaries_test.txt +12 -0
  29. data/test/_expected/includes_test.txt +7 -7
  30. data/test/_expected/includes_test_build_rakefile.txt +3 -0
  31. data/test/_expected/index_test.txt +6 -6
  32. data/test/_expected/longtable_test.txt +5 -5
  33. data/test/_expected/minitoc_test.txt +7 -7
  34. data/test/_expected/ps2pdf_test.txt +7 -7
  35. data/test/_expected/rail_error_test.txt +9 -9
  36. data/test/_expected/rail_test.txt +6 -6
  37. data/test/_expected/splitindex_test.txt +7 -7
  38. data/test/_expected/splitindex_test_build_rakefile.txt +9 -6
  39. data/test/_expected/supertabular_test.txt +5 -5
  40. data/test/_expected/supertabular_test_statistic.txt +1 -1
  41. data/test/_expected/two_tasks_test.txt +15 -0
  42. data/test/_expected/two_tasks_test_statistic.txt +11 -0
  43. data/test/_expected/varioref_test.txt +5 -5
  44. data/test/_expected/varioref_test_ignore_error.txt +7 -7
  45. data/test/_expected/z_complex_test.txt +12 -11
  46. data/test/_expected/z_complex_test_overview.txt +24 -9
  47. data/test/_expected/z_complex_test_overview_file.txt +2 -0
  48. data/test/_expected/z_complex_test_statistic.txt +2 -2
  49. data/test/bibtex/rakefile.rb +4 -2
  50. data/test/dtx/rakefile.rb +3 -3
  51. data/test/dvipdfm/rakefile.rb +4 -2
  52. data/test/error/rakefile.rb +10 -6
  53. data/test/gloss/rakefile.rb +3 -2
  54. data/test/glossaries/rakefile.rb +50 -0
  55. data/test/glossaries/sample.tex +133 -0
  56. data/test/includes/rakefile.rb +7 -6
  57. data/test/index/rakefile.rb +3 -2
  58. data/test/longtable/rakefile.rb +3 -2
  59. data/test/minitoc/rakefile.rb +3 -2
  60. data/test/ps2pdf/rakefile.rb +3 -2
  61. data/test/rail/rakefile.rb +5 -4
  62. data/test/rail_error/rakefile.rb +3 -2
  63. data/test/splitindex/rakefile.rb +7 -5
  64. data/test/supertabular/rakefile.rb +3 -2
  65. data/test/two_tasks/rakefile.rb +50 -0
  66. data/test/two_tasks/testdocument_1.tex +10 -0
  67. data/test/two_tasks/testdocument_2.tex +10 -0
  68. data/test/unittest_rake4latex.rb +27 -4
  69. data/test/unittest_rake4latex_testcases.rb +27 -11
  70. data/test/varioref/rakefile.rb +11 -5
  71. data/test/z_complex/rakefile.rb +8 -6
  72. data/test/z_complex/testdocument.tex +12 -1
  73. metadata +149 -28
@@ -69,12 +69,16 @@ opts.on("-i", "--ignore", "--ignore-error", "Allow LaTeX errors") { |v|
69
69
  puts "Allow LaTeX errors" if PARSE_MESSAGES
70
70
  Rake4LaTeX.set_latexrunner_default(:texerrors_allowed, true)
71
71
  }
72
-
73
72
  opts.on("-s", "--statistic", "Show the statistic after TeX-run") { |v|
74
73
  puts "Show the statistic after TeX-run" if PARSE_MESSAGES
75
74
  TASK_BEFORE_TeX << :statistic #Set filename
76
75
  TASK_AFTER_TeX << :statistic
77
76
  }
77
+ opts.on("-o", "--overview", "Create a log-overview file") { |v|
78
+ puts "Create a log-overview file after TeX-run" if PARSE_MESSAGES
79
+ TASK_BEFORE_TeX << :statistic #Set filename
80
+ TASK_AFTER_TeX << :log_overview_file
81
+ }
78
82
  opts.on("-c", "--clean", "Clean after TeX-run (delete auxiliary files)") { |v|
79
83
  puts "Clean after TeX-run" if PARSE_MESSAGES
80
84
  TASK_AFTER_TeX << :clean
@@ -143,6 +147,8 @@ begin
143
147
  }
144
148
  when :statistic
145
149
  task (:statistic => target.ext('tex'))
150
+ when :log_overview_file
151
+ task (:log_overview_file => target.ext('tex'))
146
152
  else
147
153
  raise ArgumentError, "Undefined option #{task.inspect}"
148
154
  end
@@ -16,6 +16,7 @@ Specific options:
16
16
  --dep, --dependecies Build dependecies (rakefile recommended)
17
17
  -i, --ignore, --ignore-error Allow LaTeX errors
18
18
  -s, --statistic Show the statistic after TeX-run
19
+ -o, --overview Create a log-overview file
19
20
  -c, --clean Clean after TeX-run (delete auxiliary files)
20
21
  --touch FILE Touch FILE
21
22
  --task TASK Define a rake-task
data/lib/rake4latex.rb CHANGED
@@ -5,7 +5,7 @@ This file contains definitions to build a rakefile for LaTeX-documents.
5
5
  A not-so minimal rakefile looks like this:
6
6
  require 'rake4latex'
7
7
  #Needed for some actions without a previous TeX-call
8
- task :basefile => 'testdocument.tex'
8
+ Rake4LaTeX::Basefile.set('testdocument.tex')
9
9
  #We want to build a PDF
10
10
  file 'testdocument.pdf' => 'testdocument.tex'
11
11
 
@@ -52,7 +52,7 @@ Example:
52
52
  task :touch => 'testdocument.tex'
53
53
  task :runtex => [:touch, 'testdocument.pdf', :clean]
54
54
  Rake.application[:runtex].invoke
55
- #~ task :basefile => 'testdocument.pdf'
55
+ #~ Rake4LaTeX::Basefile.set('testdocument.pdf')
56
56
  #~ Rake.application[:clean].invoke
57
57
 
58
58
  ==Document creation
@@ -157,6 +157,7 @@ Tasks using basefile are:
157
157
  * touch
158
158
  * statistic
159
159
  * log_overview
160
+ * log_overview_file
160
161
  * log_archive
161
162
  * clean
162
163
  * clobber
@@ -166,7 +167,8 @@ If you build a pdf (or dvi), basefile-actions are done in background.
166
167
  It is recommended to define your main-file as basefile.
167
168
  Without this, clean... may not work correct.
168
169
 
169
-
170
+ Please use instead:
171
+ Rake4LaTeX::Basefile.set('testdocument.tex')
170
172
 
171
173
  ===touch
172
174
  The touch task changes the modification data for the touched file.
@@ -176,36 +178,36 @@ Usage:
176
178
  task :touch => 'myfile.tex'
177
179
  task :default => touch
178
180
 
179
- With
180
- task :basefile => 'myfile'
181
- touch is also connected with your sourcefile.
182
181
 
183
182
  ===statistic
184
183
  Get a very short overview on the log-content.
185
184
  Errors and warnings are counted for each log (TeX, bibTeX, makeindex...)
186
185
 
187
186
  Usage:
188
- task :basefile => 'myfile'
187
+ Rake4LaTeX::Basefile.set('myfile')
189
188
  task :statistic
190
189
  task :default => [ 'myfile.pdf', :statistic ]
191
190
 
192
191
  See also Rake4LaTeX#TeX_Statistic#stat_summary
193
192
 
194
193
  ===log_overview
195
- A log-file is created with a log-summary (TeX_Statistic#stat_summary),
194
+ A more detailed log is created with a log-summary (TeX_Statistic#stat_summary),
196
195
  all errors and warnings from TeX and the tools and
197
196
  a detailed analyse for the TeX-log.
198
197
 
199
198
  You should do this task always _before_ a clean-task.
200
199
 
201
200
  Usage:
202
- task :basefile => 'myfile'
201
+ Rake4LaTeX::Basefile.set('myfile')
203
202
  task :log_overview
204
203
  task :default => [ 'myfile.pdf', :log_overview ]
205
204
 
206
-
207
205
  See also Rake4LaTeX#TeX_Statistic#overview
208
206
 
207
+ With task log_overview_file the detailed log will be saved in a file
208
+ for detailed analyses.
209
+
210
+
209
211
  ===clean
210
212
  TeX and the related tools build a lot of auxiliary files.
211
213
  When you have them, you can delete the auxiliary files.
@@ -216,7 +218,7 @@ If you also want to delete the results (pdf...) you can use the task
216
218
  _clobber_.
217
219
 
218
220
  Usage:
219
- task :basefile => 'myfile'
221
+ Rake4LaTeX::Basefile.set('myfile')
220
222
  task :default => [ 'myfile.pdf', :clean ]
221
223
 
222
224
 
@@ -232,7 +234,7 @@ in case of errors you can make analyses in the archived logs.
232
234
  You should do this task always _before_ a clean-task.
233
235
 
234
236
  Usage:
235
- task :basefile => 'myfile'
237
+ Rake4LaTeX::Basefile.set('myfile')
236
238
  task :default => [ 'myfile.pdf', :log_archive, :clean ]
237
239
 
238
240
 
@@ -304,7 +306,6 @@ There are additional packages requiring additonal runs.
304
306
 
305
307
  =end
306
308
 
307
-
308
309
  #
309
310
  #Load the base functions and load subfiles.
310
311
  #
@@ -313,7 +314,7 @@ require 'rake4latex/base'
313
314
  #
314
315
  #Define the pdf-creation via pdflatex
315
316
  #
316
- #This definition maust be first.
317
+ #This definition must be first.
317
318
  #If not, the way via ps2pdf would be the default.
318
319
  desc "Build a pdf-file with pdfLaTeX"
319
320
  rule '.pdf' => '.tex' do |t|
@@ -1,4 +1,3 @@
1
-
2
1
  if $0 == __FILE__
3
2
  require 'rake4latex'
4
3
  end
@@ -89,7 +88,7 @@ Search dependecies by sanning for
89
88
  =end
90
89
  def analyse(content )
91
90
 
92
- content.each{ |line|
91
+ content.each_line{ |line|
93
92
  #Skip comments
94
93
  #Remarks/Bug:
95
94
  #* \% is not detected.
@@ -218,6 +217,7 @@ def self.build_rakefile( filename, *options )
218
217
  Rakefile for LaTeX-project #{basename}
219
218
 
220
219
  Generated by Rake4LaTeX.build_rakefile, #{Date.today}
220
+ Options: #{options.inspect}
221
221
 
222
222
  =end
223
223
  require 'rake4latex'
@@ -239,9 +239,9 @@ Template
239
239
  includes = texfile.includes(:uniq, :recursive)
240
240
  if ! includes.empty?
241
241
  template << <<Template
242
- #{texfile.tree.to_yaml.map{|line| "# #{line}"}}
242
+ #{texfile.tree.to_yaml.gsub(/^/, "# ")}
243
243
  dependecies = [
244
- #{includes.map{|f| " \"#{f}\",\n"}}]
244
+ #{includes.map{|f| " \"#{f}\",\n"}.join}]
245
245
  Template
246
246
  template << "file '#{pdf_name}' => dependecies\n" if options.include?(:pdf)
247
247
  template << "file '#{dvi_name}' => dependecies\n" if options.include?(:dvi)
@@ -316,6 +316,8 @@ Template
316
316
  Closing Tasks
317
317
  =end
318
318
  task :default => :statistic #Get an overview on errors and warnings
319
+ #~ task :default => :log_overview #Show log overview-file
320
+ #~ task :default => :log_overview_file #Build a log overview-file
319
321
  task :default => :clean #delete helpfiles
320
322
 
321
323
  Template
@@ -3,10 +3,16 @@ Base definitions of rake4latex.
3
3
  This file must be loaded by all specific rake4file-variants.
4
4
  =end
5
5
 
6
-
7
6
  #~ gem 'rake', '=0.8.7'
8
7
  require 'rake'
9
- require 'md5'
8
+ case RUBY_VERSION
9
+ when /1.8/;
10
+ require 'md5' # defines MD5 and Digest::MD5
11
+ when /1.9/;
12
+ require 'digest/md5' #defines Digest::MD5
13
+ require 'yaml'
14
+ else; raise "Undefined ruby version #{RUBY_VERSION}"
15
+ end
10
16
  require 'log4r' #1.0.5
11
17
 
12
18
  module Rake
@@ -22,41 +28,33 @@ end
22
28
 
23
29
 
24
30
  module Rake4LaTeX
25
- VERSION = '0.1.1'
26
-
31
+ VERSION = '0.1.2'
32
+
27
33
  #With this creation we define the constants Log4r::DEBUG...
28
34
  Logger = Log4r::Logger.new("LaTeXRunner")
29
35
  Logger.outputters = Log4r::StdoutOutputter.new('log_stdout')
30
36
 
31
- =begin rdoc
32
- Sets a default option for the LaTeXRunner.
33
-
34
- The options are stored and used for new LaTeXRunners.
35
-
36
- Examples:
37
- Rake4LaTeX.set_latexrunner_default(:maxruns, 1)
38
- Rake4LaTeX.set_latexrunner_default(:loglevel, Log4r::DEBUG)
39
- Rake4LaTeX.set_latexrunner_default(:program, xelatex)
40
- Rake4LaTeX.set_latexrunner_default(:texerrors_allowed, true)
37
+ #
38
+ #Define the main settings for the runner.
39
+ #
40
+ #This values can be overwritten for each base file:
41
+ # basefile = Rake4LaTeX::Basefile.set('filename')
42
+ # basefile[:maxruns] = 1
43
+ # basefile[:loglevel] = Log4r::DEBUG
44
+ # basefile[:program] = :xelatex
45
+ # basefile[:texerrors_allowed] = true
46
+ #
47
+ DEFAULT_SETTINGS = {
48
+ :main_file => nil, #only needed for key-check. Must be defined later.
49
+ :maxruns => 5,
50
+ :program => :pdflatex, #Valid entries see PROGRAMS
51
+ :loglevel => Log4r::INFO,
52
+ :texerrors_allowed => false,
53
+ }
41
54
 
42
- You could also access LaTeXRunner::DEFAULT_SETTINGS directly.
43
- But with this method you get also a check if the option exists.
44
- =end
45
- def self.set_latexrunner_default( key, option )
46
- if ! LaTeXRunner::DEFAULT_SETTINGS.keys.include?(key)
47
- raise ArgumentError, "Undefined key #{key.inspect} for LaTeXRunner" unless @latexrunner
48
- Rake4LaTeX::Logger.warn("Undefined key #{key.inspect} for LaTeXRunner") if Rake4LaTeX::Logger.warn?
49
- end
50
- LaTeXRunner::DEFAULT_SETTINGS[key] = option
51
- case key
52
- when :program
53
- if LaTeXRunner::PROGRAMS.keys.include?( option.to_sym )
54
- LaTeXRunner::DEFAULT_SETTINGS[key] = option.to_sym
55
- else
56
- Rake4LaTeX::Logger.warn("Undefined programm #{option.inspect} for LaTeXRunner") if Rake4LaTeX::Logger.warn?
57
- end
58
- end
59
- end
55
+ #Adaption per file:
56
+ # Rake4LaTeX::Basefile.set(basename)[:loglevel] = Log4r::DEBUG
57
+ Logger.level = DEFAULT_SETTINGS[:loglevel]
60
58
 
61
59
  =begin rdoc
62
60
  Definition of the programms and there call parameters.
@@ -86,6 +84,7 @@ Load the Programs with parameters for Rake4LaTeX.build_cmd.
86
84
  #a src\lib\rake4latex\rake4latex.yaml
87
85
  #a lib\ruby\gems\1.8\gems\rake4latex-0.1.0\lib\rake4latex\base.rb
88
86
  "#{File.dirname(__FILE__)}/../../../../../../../../src/lib/rake4latex/rake4latex.yaml", #for ocra-version (exe)
87
+ #fixme: user/local system specific settings
89
88
  "./rake4latex.yaml", #local re-definition
90
89
  ].each{| setting_file |
91
90
  if File.exist?(setting_file)
@@ -97,7 +96,6 @@ Load the Programs with parameters for Rake4LaTeX.build_cmd.
97
96
  raise "No program settings found"
98
97
  end
99
98
 
100
-
101
99
  =begin rdoc
102
100
  Build the command line to call a tool.
103
101
 
@@ -137,47 +135,177 @@ The keys must fit to the settings in Rake4LaTeX::Programms .
137
135
 
138
136
  cmd
139
137
  end
138
+ =begin rdoc
139
+ Define a basename.
140
+
141
+ Set the file for clean/clobber, offers the possibility to set defaults,
142
+ define a logger.
143
+ =end
144
+ class Basefile
145
+
146
+ @@all = {}
147
+
148
+ =begin rdoc
149
+ Get the basefile object or create a a new instance.
150
+ =end
151
+ def self.set( basename, options = {} )
152
+ basename = basename.ext()
153
+ @@all[basename] = new(basename) unless @@all[basename]
154
+ options.each{|key, value| @@all[basename][key] = value }
155
+ @@all[basename]
156
+ end #set
157
+
158
+ =begin rdoc
159
+ Get the basefile object.
160
+ =end
161
+ def self.[](key)
162
+ @@all[key.ext()]
163
+ end
164
+ =begin rdoc
165
+ Loop on all defined base files
166
+ =end
167
+ def self.each()
168
+ @@all.each{|key, basefile| yield basefile }
169
+ end
170
+
171
+ =begin rdoc
172
+ Create a new basefile object.
173
+
174
+ This is a private method.
175
+ To create new objects, use Rake4LaTeX::Basefile.set
176
+ =end
177
+ def initialize( basename, options = {} )
178
+ @basename = basename.ext('')
179
+
180
+ @settings4LaTeXRunner = DEFAULT_SETTINGS.dup
181
+
182
+ @logger = Log4r::Logger.new(@basename)
183
+ @logger.level = @settings4LaTeXRunner[:loglevel]
184
+
185
+ options.each{|key, value| self[key] = value }
186
+
187
+ @logger.outputters = Log4r::StdoutOutputter.new('log_stdout')
188
+ #~ @logger.info("Define base file #{@basename}")
189
+
190
+
191
+ set4clean()
192
+ define_tasks()
193
+ end #basename#initialze
194
+ private_class_method :new #make it private
195
+
196
+ #Basename of the Basefile.
197
+ attr_reader :basename
198
+ #Get the logger
199
+ attr_reader :logger
200
+ #Settings for the LaTeXRunner. May be changed with Rake4LaTeX::Basefile#[]=
201
+ attr_reader :settings4LaTeXRunner
202
+ =begin rdoc
203
+ Defines document specific tasks (statistic, set clean and clobber)
204
+ =end
205
+ def define_tasks()
206
+
207
+ namespace @basename do
208
+ desc "Create the statistic for #{@basename}"
209
+ task :statistic do
210
+ stat = Rake4LaTeX::TeX_Statistic.new(@basename)
211
+ puts "Statistic for #{@basename}:"
212
+ puts stat.stat_summary.map{|e| " #{e}"}
213
+ end
214
+
215
+ desc "Build a log-overview for #{@basename}"
216
+ task :log_overview do
217
+ stat = Rake4LaTeX::TeX_Statistic.new(@basename)
218
+ puts stat.overview()
219
+ end
220
+
221
+ desc "Build a log-overview file for #{@basename}"
222
+ task :log_overview_file do
223
+ stat = Rake4LaTeX::TeX_Statistic.new(@basename)
224
+ #Filename also used in set4clean
225
+ File.open("#{@basename}.overview.txt", 'w'){|f|
226
+ puts "Create #{f.path}"
227
+ f << stat.overview()
228
+ }
229
+ end
230
+
231
+ end #namespace
232
+
233
+ #Define the 'global' tasks.
234
+ task :statistic => "#{@basename}:statistic"
235
+ task :log_overview => "#{@basename}:log_overview"
236
+ task :log_overview_file => "#{@basename}:log_overview_file"
237
+ end #define_tasks()
238
+
239
+
140
240
  =begin rdoc
141
241
  Define the files to be deleted with clean and clobber.
142
242
 
143
243
  There is no global definition to delete all files,
144
244
  only the help file for the selected basename is taken.
145
245
 
146
- Helpfiles for splitindex are not added. You can do it manual:
147
- CLEAN.add("testdocument-*") #splitidx-helpfiles
246
+ This method is called by task 'basename' (Basefile#initialize)
247
+ =end
248
+ def set4clean()
249
+ cleanlist = FileList.new("#{@basename}.{aux,log,out,toc,lot,lof,nav,snm}")
250
+ cleanlist.add("#{@basename}.{ilg,idx,ind}") #Index
251
+ cleanlist.add("#{@basename}-*.{ilg,idx,ind}") #splitindex.sty
252
+ cleanlist.add("#{@basename}.{blg,bbl}") #BibTeX
253
+ cleanlist.add("#{@basename}-blx.{bib}") #auxiliary file used by the 'biblatex' package
254
+ cleanlist.add("#{@basename}.*.{blg,bbl,aux}") #gloss.sty
255
+ cleanlist.add("#{@basename}.{maf,ptc*,mtc*,stc*}") #minitoc.sty (stc1, stc2...)
256
+ cleanlist.add("#{@basename}.{glo,gls}") #glossary.sty
257
+ #~ cleanlist.add("#{@basename}.{rai,rao,RAO}") #rail/rail.sty
258
+ cleanlist.add("#{@basename}.{rai,rao}") #rail/rail.sty
259
+ cleanlist.add("#{@basename}.{tdo}") #tdo: todonotes.sty
260
+ cleanlist.add("#{@basename}.{vrb}") #vrb: beamer.sty (verbatim)
261
+
262
+ clobberlist = FileList.new("#{@basename}.{dvi,pdf,ps}")
263
+ #The * is needed.else the filename is added always. With '*' it is checked for existence
264
+ clobberlist.add("#{@basename}.overview*.txt") #rake4latex, task :log_overview
265
+
266
+ CLEAN.include(cleanlist)
267
+ CLOBBER.include(clobberlist)
268
+
269
+ CLEAN.uniq!
270
+ CLOBBER.uniq!
271
+
272
+ end #set4clean
273
+
274
+ =begin rdoc
275
+ Sets a default option for the LaTeXRunner.
276
+
277
+ The options are stored and used for new LaTeXRunners.
278
+
279
+ Examples:
280
+
281
+ basefile = Rake4LaTeX::Basefile.set('filename')
282
+ basefile[:maxruns] = 1
283
+ basefile[:loglevel] = Log4r::DEBUG
284
+ basefile[:program] = :xelatex
285
+ basefile[:texerrors_allowed] = true
148
286
 
149
- This method is called by task 'basename'.
150
287
  =end
151
- def self.set4clean( basename )
152
- #fixme splitindex-dateien
153
- FileList["#{basename.ext('*')}"].each do |file|
154
- #Set the cleaning actions
155
- case file
156
- when /\.(tex)\Z/
157
- when /\.(aux|log|out|toc|lot|lof|nav|snm)\Z/
158
- CLEAN.include(file)
159
- when /\.(maf|ptc\d*|mtc\d*|stc\d*)\Z/ #minitoc
160
- CLEAN.include(file)
161
- when /\.(ilg|idx|ind)\Z/ #Index-Files
162
- CLEAN.include(file)
163
- when /\.(glo|gls)\Z/ #Glossary-Files
164
- CLEAN.include(file)
165
- when /\.(blg|bbl)\Z/ #BibTeX-Files
166
- CLEAN.include(file)
167
- when /\.(rai|rao|RAO)\Z/ #Rail-Files
168
- CLEAN.include(file)
169
- when /\.(dvi|pdf|ps)\Z/
170
- CLOBBER.include(file)
171
- when /\.overview.txt\Z/ #rake4latex, task :log_overview
172
- CLOBBER.include(file)
173
- else
174
- #~ @logger.warn("Unknown help file #{file}")
288
+ def []=( key, option )
289
+ if ! settings4LaTeXRunner.keys.include?(key)
290
+ raise ArgumentError, "Undefined key #{key.inspect} for LaTeXRunner" unless @latexrunner
291
+ @ogger.warn("Undefined key #{key.inspect} for LaTeXRunner") if @ogger.warn?
292
+ end
293
+ settings4LaTeXRunner[key] = option
294
+ case key
295
+ when :program
296
+ if LaTeXRunner::PROGRAMS.keys.include?( option.to_sym )
297
+ settings4LaTeXRunner[key] = option.to_sym
298
+ else
299
+ @ogger.warn("Undefined programm #{option.inspect} for LaTeXRunner") if @logger.warn?
175
300
  end
176
301
  end
177
- CLEAN.uniq!
178
- CLOBBER.uniq!
179
- end #set4clean
302
+ end
180
303
 
304
+
305
+ def inspect()
306
+ "#<Rake4LaTeX::Basefile #{@basename}>"
307
+ end
308
+ end #Basefile
181
309
  end #Rake4LaTeX
182
310
 
183
311