rubbr 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,13 @@
1
+ == 1.1.3 / 2008-06-20
2
+
3
+ * Overfull and underfull hbox output can now be shown specifically with -V
4
+ switch.
5
+
6
+ == 1.1.2 / 2008-04-08
7
+
8
+ * BiBTeX style files (*.bst) now are copied from the vendor dir to
9
+ the build dir if needed.
10
+
1
11
  == 1.1.1 / 2008-04-07
2
12
 
3
13
  * Bugfix: lib/rubbr/change.rb not included because of faulty manifest.
data/bin/rubbr CHANGED
File without changes
@@ -2,7 +2,7 @@ require 'optparse'
2
2
  $:.unshift File.dirname(__FILE__)
3
3
 
4
4
  module Rubbr
5
- VERSION = '1.1.2'
5
+ VERSION = '1.1.3'
6
6
 
7
7
  autoload :Options, 'rubbr/options'
8
8
  autoload :Cli, 'rubbr/cli'
@@ -48,7 +48,7 @@ module Rubbr
48
48
  @@cmd_opts[:verbose] = true
49
49
  end
50
50
 
51
- opts.on('-V', '--verboser', 'Enable very verbose feedback') do
51
+ opts.on('-V', '--verboser', 'Enable verbose feedback for hboxes') do
52
52
  @@cmd_opts[:verbose] = true
53
53
  @@cmd_opts[:verboser] = true
54
54
  end
@@ -23,19 +23,28 @@ module Rubbr
23
23
  copy_vendor_files
24
24
  copy_graphic_files
25
25
 
26
+ # first run
26
27
  latex = preprocessor.new(base_latex_file)
28
+
27
29
  if base_bibtex_file && latex.warnings.join =~ /No file .+\.bbl/
28
30
  bibtex = Rubbr::Runner::BibTeX.new(base_bibtex_file)
29
31
  end
32
+
30
33
  if latex.warnings.join =~ /No file .+\.(aux|toc)/
31
34
  latex = preprocessor.new(base_latex_file)
32
35
  end
36
+
33
37
  if latex.warnings.join =~ /There were undefined citations/
34
38
  latex = preprocessor.new(base_latex_file)
35
39
  end
40
+
36
41
  if latex.warnings.join =~ /Label\(s\) may have changed\. Rerun/
37
42
  latex = preprocessor.new(base_latex_file)
38
43
  end
44
+
45
+ # last run needed to get lof to be proper
46
+ latex = preprocessor.new(base_latex_file)
47
+
39
48
  latex.feedback
40
49
  if bibtex
41
50
  bibtex.feedback
@@ -59,11 +68,11 @@ module Rubbr
59
68
  end
60
69
 
61
70
  def copy_vendor_files
62
- copy_files(Rubbr.options[:vendor_dir], %w(sty clo cls cfg))
71
+ copy_files(Rubbr.options[:vendor_dir], %w(sty clo cls cfg bst))
63
72
  end
64
73
 
65
74
  def copy_graphic_files
66
- copy_files(Rubbr.options[:graphics_dir], %w(eps png))
75
+ copy_files(Rubbr.options[:graphics_dir], %w(eps mps png))
67
76
  end
68
77
 
69
78
  def copy_files(source_dir, file_extensions)
@@ -22,6 +22,7 @@ module Rubbr
22
22
  def initialize(input_file, executable)
23
23
  @input_file = input_file
24
24
  @executable = valid_executable executable
25
+ @warnings = []
25
26
  @errors = []
26
27
 
27
28
  if File.exists? @input_file
@@ -35,10 +36,23 @@ module Rubbr
35
36
  def run
36
37
  disable_stdinn do # No input in case of error correction dialogue
37
38
  messages = /^(Overfull|Underfull|No file|Package \w+ Warning:|LaTeX Warning:)/
39
+ verbose_messages = /^(Overfull \\hbox|Underfull \\hbox)/
40
+
38
41
  run = `#@executable #@input_file`
39
- puts run if Rubbr.options[:verboser]
40
- @warnings = run.grep(messages).sort
41
42
  lines = run.split("\n")
43
+
44
+ if Rubbr.options[:verboser]
45
+
46
+ lines.each_with_index do |line, i|
47
+ if line =~ verbose_messages
48
+ @warnings << line
49
+ @warnings << lines[i+1]
50
+ end
51
+ end
52
+ else
53
+ @warnings = run.grep(messages).sort
54
+ end
55
+
42
56
  while lines.shift
43
57
  if lines.first =~ /^!/ # LaTeX Error, processing halted
44
58
  3.times { @errors << lines.shift }
@@ -48,7 +62,6 @@ module Rubbr
48
62
  end
49
63
 
50
64
  def feedback
51
- return if Rubbr.options[:verboser] # No preformatted output.
52
65
  unless @warnings.empty?
53
66
  notice "Warnings from #@executable:"
54
67
  @warnings.each do |message|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eivind Uggedal
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-07 00:00:00 +02:00
12
+ date: 2008-06-20 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.5.1
22
+ version: 1.5.3
23
23
  version:
24
24
  description: Build LaTeX documents.
25
25
  email: eu@redflavor.com
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  requirements: []
83
83
 
84
84
  rubyforge_project: rubbr
85
- rubygems_version: 1.0.1
85
+ rubygems_version: 1.1.1
86
86
  signing_key:
87
87
  specification_version: 2
88
88
  summary: LaTeX builder