public this repo is viewable by everyone
Description: Ruby LaTeX to PDF preprocessor (and Rails plugin)
Homepage: http://rtex.rubyforge.org
Clone URL: git://github.com/bruce/rtex.git
Click here to lend your support to: rtex and make a donation at www.pledgie.com !
Change 'RTex' references to 'RTeX'
bruce (author)
24 days ago
commit  6dd96a728c9af0a44fc9e7fbd136f27c52666faa
tree    a09bcbba26018f332f2be09c0ee64085b148a95f
parent  418116fa7bd14d96ff71ab1cbce1fe26fd54064f
...
1
2
3
 
4
5
6
...
1
2
 
3
4
5
6
0
@@ -1,6 +1,6 @@
0
 2008-04-20
0
 
0
-Released RTex v1.99.0 as a Rubygem, with a standalone executable for PDF generation
0
+Released RTeX v1.99.0 as a Rubygem, with a standalone executable for PDF generation
0
 and support for plugin installation from the executable.
0
 
0
 This release requires Rails >= 2.0.1
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-= RTex: TeX/PDF Generation for Ruby
0
+= RTeX: TeX/PDF Generation for Ruby
0
 
0
 Project homepage: http://rtex.rubyforge.org
0
 
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-= RTex Rails plugin
0
+= RTeX Rails plugin
0
 
0
 == Installation
0
 
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,6 +15,6 @@ PROJ.test_opts = []
0
 PROJ.description = "LaTeX preprocessor for PDF generation; Rails plugin"
0
 PROJ.summary = PROJ.description
0
 
0
-PROJ.version = RTex::Version::STRING
0
+PROJ.version = RTeX::Version::STRING
0
 
0
 task 'gem:package' => 'manifest:assert'
0
\ No newline at end of file
...
10
11
12
13
 
14
15
16
...
32
33
34
35
 
36
37
38
...
60
61
62
63
 
64
65
66
 
67
68
69
...
10
11
12
 
13
14
15
16
...
32
33
34
 
35
36
37
38
...
60
61
62
 
63
64
65
 
66
67
68
69
0
@@ -10,7 +10,7 @@ options = {}
0
 opts = OptionParser.new do |opts|
0
   
0
   opts.banner = [
0
- "RTex v#{RTex::Version::STRING} (c) 2006-2007 Bruce Williams, Wiebe Cazemier",
0
+ "RTeX v#{RTeX::Version::STRING} (c) 2006-2007 Bruce Williams, Wiebe Cazemier",
0
     "USAGE: rtex [OPTIONS]"
0
   ].join("\n")
0
   
0
@@ -32,7 +32,7 @@ opts = OptionParser.new do |opts|
0
     options[:outfile] = path
0
   end
0
   
0
- filters = RTex.filters.keys.map { |k| k.to_s }.sort.join(', ')
0
+ filters = RTeX.filters.keys.map { |k| k.to_s }.sort.join(', ')
0
   opts.on('-f FILTER', '--filter FILTER', "Filter input (supported: #{filters})", "(Wraps in a basic `article' document; use --layout to customize)") do |filter|
0
     options[:filter] = filter
0
   end
0
@@ -60,10 +60,10 @@ opts.parse!(ARGV)
0
 
0
 if options[:filter] && !options[:layout]
0
   STDERR.puts "Warning: Using default `article' layout (see --help on '--layout')"
0
- options[:layout] = RTex.basic_layout
0
+ options[:layout] = RTeX.basic_layout
0
 end
0
 
0
-document = RTex::Document.new(ARGF.read, options)
0
+document = RTeX::Document.new(ARGF.read, options)
0
 location = File.expand_path(options[:outfile]) rescue nil
0
 document.to_pdf(nil) do |filename|
0
   if location
...
1
2
3
 
4
...
1
 
2
3
4
0
@@ -1,2 +1,2 @@
0
 require 'rtex'
0
-RTex.framework :rails
0
\ No newline at end of file
0
+RTeX.framework :rails
0
\ No newline at end of file
...
3
4
5
6
 
7
8
9
10
 
11
12
13
...
3
4
5
 
6
7
8
9
 
10
11
12
13
0
@@ -3,11 +3,11 @@ $:.unshift(File.dirname(__FILE__) << '/rtex')
0
 require 'document'
0
 require 'version'
0
 
0
-module RTex
0
+module RTeX
0
     
0
   def self.framework(name)
0
     require File.dirname(__FILE__) << "/rtex/framework/#{name}"
0
- framework = ::RTex::Framework.const_get(name.to_s.capitalize)
0
+ framework = ::RTeX::Framework.const_get(name.to_s.capitalize)
0
     framework.setup
0
   end
0
   
...
6
7
8
9
 
10
11
12
...
45
46
47
48
 
49
50
51
...
6
7
8
 
9
10
11
12
...
45
46
47
 
48
49
50
51
0
@@ -6,7 +6,7 @@ require 'escaping'
0
 require 'tempdir'
0
 
0
 
0
-module RTex
0
+module RTeX
0
   
0
   class Document
0
     
0
@@ -45,7 +45,7 @@ module RTex
0
     
0
     def filter(text)
0
       return text unless @options[:filter]
0
- if (process = RTex.filters[@options[:filter]])
0
+ if (process = RTeX.filters[@options[:filter]])
0
         process[text]
0
       else
0
         raise FilterError, "No `#{@options[:filter]}' filter"
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-module RTex
0
+module RTeX
0
   
0
   module Escaping
0
     
...
1
 
2
3
4
...
 
1
2
3
4
0
@@ -1,4 +1,4 @@
0
-module RTex
0
+module RTeX
0
   
0
   module Framework
0
     
...
1
2
3
 
4
5
6
7
8
 
9
10
11
...
27
28
29
30
 
31
32
33
...
46
47
48
49
 
50
51
52
...
1
2
 
3
4
5
6
7
 
8
9
10
11
...
27
28
29
 
30
31
32
33
...
46
47
48
 
49
50
51
52
0
@@ -1,11 +1,11 @@
0
 require 'tempfile'
0
 
0
-module RTex
0
+module RTeX
0
   module Framework
0
     module Rails
0
       
0
       def self.setup
0
- RTex::Document.options[:tempdir] = File.expand_path(File.join(RAILS_ROOT, 'tmp'))
0
+ RTeX::Document.options[:tempdir] = File.expand_path(File.join(RAILS_ROOT, 'tmp'))
0
         ActionView::Base.register_template_handler(:rtex, Template)
0
         ActionController::Base.send(:include, ControllerMethods)
0
         ActionView::Base.send(:include, HelperMethods)
0
@@ -27,7 +27,7 @@ module RTex
0
           result = render_without_rtex(options, *args, &block)
0
           if result.is_a?(String) && @template.template_format == :pdf
0
             options ||= {}
0
- ::RTex::Document.new(result, options.merge(:processed => true)).to_pdf do |filename|
0
+ ::RTeX::Document.new(result, options.merge(:processed => true)).to_pdf do |filename|
0
               serve_file = Tempfile.new('rtex-pdf')
0
               FileUtils.mv filename, serve_file.path
0
               send_file serve_file.path,
0
@@ -46,7 +46,7 @@ module RTex
0
       
0
       module HelperMethods
0
         def latex_escape(s)
0
- RTex::Document.escape(s)
0
+ RTeX::Document.escape(s)
0
         end
0
         alias :l :latex_escape
0
       end
...
1
2
3
 
4
5
6
7
 
8
9
10
...
1
2
 
3
4
5
6
 
7
8
9
10
0
@@ -1,10 +1,10 @@
0
 require 'fileutils'
0
 
0
-module RTex
0
+module RTeX
0
   
0
   class Tempdir
0
         
0
- def self.open(parent_path=RTex::Document.options[:tempdir])
0
+ def self.open(parent_path=RTeX::Document.options[:tempdir])
0
       tempdir = new(parent_path)
0
       FileUtils.mkdir_p tempdir.path
0
       result = Dir.chdir(tempdir.path) do
...
21
22
23
24
 
25
26
27
...
21
22
23
 
24
25
26
27
0
@@ -21,7 +21,7 @@
0
 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
0
 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
0
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0
-module RTex
0
+module RTeX
0
   
0
     
0
   # A class for describing the current version of a library. The version
...
11
12
13
14
 
15
16
17
...
11
12
13
 
14
15
16
17
0
@@ -11,7 +11,7 @@ context "Document Generation" do
0
   end
0
   
0
   specify "can escape characters" do
0
- assert_equal '\textbackslash{}\textasciitilde{}', RTex::Document.escape('\~')
0
+ assert_equal '\textbackslash{}\textasciitilde{}', RTeX::Document.escape('\~')
0
   end
0
   
0
   specify "documents can use a to_pdf block to move a file to a relative path" do
...
9
10
11
12
 
13
14
15
...
18
19
20
21
 
22
23
24
25
26
27
28
 
29
30
31
...
33
34
35
36
 
37
38
39
...
41
42
43
44
 
45
46
47
...
51
52
53
54
 
55
56
57
...
9
10
11
 
12
13
14
15
...
18
19
20
 
21
22
23
24
25
26
27
 
28
29
30
31
...
33
34
35
 
36
37
38
39
...
41
42
43
 
44
45
46
47
...
51
52
53
 
54
55
56
57
0
@@ -9,7 +9,7 @@ context "Creating a temporary directory" do
0
   specify "changes directory" do
0
     old_location = Dir.pwd
0
     block_location = nil
0
- RTex::Tempdir.open do
0
+ RTeX::Tempdir.open do
0
       assert_not_equal old_location, Dir.pwd
0
       block_location = Dir.pwd
0
     end
0
@@ -18,14 +18,14 @@ context "Creating a temporary directory" do
0
   end
0
   
0
   specify "uses a 'rtex' name prefix" do
0
- RTex::Tempdir.open do
0
+ RTeX::Tempdir.open do
0
       assert_equal 'rtex-', File.basename(Dir.pwd)[0,5]
0
     end
0
   end
0
   
0
   specify "by default, removes the directory after use if no exception occurs" do
0
     path = nil
0
- RTex::Tempdir.open do
0
+ RTeX::Tempdir.open do
0
       path = Dir.pwd
0
       assert File.exists?(path)
0
     end
0
@@ -33,7 +33,7 @@ context "Creating a temporary directory" do
0
   end
0
   
0
   specify "returns result of last statment if automatically removing the directory" do
0
- result = RTex::Tempdir.open do
0
+ result = RTeX::Tempdir.open do
0
       :last
0
     end
0
     assert_equal :last, :last
0
@@ -41,7 +41,7 @@ context "Creating a temporary directory" do
0
   
0
   specify "returns result of last statment if not automatically removing the directory" do
0
     tempdir = nil # to capture value
0
- result = RTex::Tempdir.open do |tempdir|
0
+ result = RTeX::Tempdir.open do |tempdir|
0
       :last
0
     end
0
     tempdir.remove!
0
@@ -51,7 +51,7 @@ context "Creating a temporary directory" do
0
   specify "does not remove the directory after use if an exception occurs" do
0
     path = nil
0
     assert_raises RuntimeError do
0
- RTex::Tempdir.open do
0
+ RTeX::Tempdir.open do
0
         path = Dir.pwd
0
         assert File.directory?(path)
0
         raise "Test exception!"
...
16
17
18
19
 
20
21
22
...
16
17
18
 
19
20
21
22
0
@@ -16,7 +16,7 @@ class Test::Unit::TestCase
0
   def document(name, options={})
0
     name = name.kind_of?(Symbol) ? "#{name}.tex.erb" : name
0
     template = File.read(File.dirname(__FILE__) << "/fixtures/#{name}")
0
- RTex::Document.new(template, options)
0
+ RTeX::Document.new(template, options)
0
   end
0
 
0
 end

Comments

    No one has commented yet.