erbtex 0.2.0 → 0.3.0
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.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/.gitignore +4 -1
- data/Gemfile.lock +40 -4
- data/README.org +137 -0
- data/Rakefile +10 -13
- data/bin/erbtex +3 -44
- data/erbtex.gemspec +11 -7
- data/examples/TrigTable.tex +3 -3
- data/examples/TrigTable2.tex +10 -6
- data/examples/{roots.tex → roots.tex.erb} +0 -0
- data/examples/{testbind.tex → testbind.tex.erb} +0 -0
- data/lib/erbtex/command_line.rb +79 -109
- data/lib/erbtex/runner.rb +163 -56
- data/lib/erbtex/version.rb +1 -1
- data/lib/erbtex.rb +8 -3
- data/spec/lib/command_line_spec.rb +146 -0
- data/spec/lib/find_executable_spec.rb +43 -0
- data/spec/spec_helper.rb +26 -0
- metadata +66 -31
- data/README.md +0 -127
- data/bin/etex +0 -49
- data/bin/latex +0 -49
- data/bin/lualatex +0 -49
- data/bin/luatex +0 -49
- data/bin/pdfetex +0 -49
- data/bin/pdflatex +0 -49
- data/bin/pdftex +0 -49
- data/bin/pslatex +0 -49
- data/bin/tex +0 -49
- data/bin/xelatex +0 -49
- data/bin/xetex +0 -49
- data/test/test_command_line.rb +0 -181
- data/test/test_find_executable.rb +0 -44
- data/test/test_helper.rb +0 -10
data/README.md
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
ErbTeX: Ruby pre-processing for TeX and LaTeX Documents
|
2
|
-
==========
|
3
|
-
|
4
|
-
# Description
|
5
|
-
|
6
|
-
erbtex is a ruby gem that provides a command line program the
|
7
|
-
pre-processes TeX and LaTeX source files with ruby's erubis and then
|
8
|
-
passes the resulting file along to a real TeX program.
|
9
|
-
|
10
|
-
# Installation
|
11
|
-
|
12
|
-
Install it with:
|
13
|
-
|
14
|
-
gem install erbtex
|
15
|
-
|
16
|
-
# Usage
|
17
|
-
|
18
|
-
After the gem is installed, erbtex is placed in your PATH in front of
|
19
|
-
the real TeX and LaTeX programs, along with links to erbtex having the
|
20
|
-
names pdftex, pdflatex, luatex, and several other TeX processing
|
21
|
-
programs. Thus, invoking, for example, `pdflatex` runs `erbtex`
|
22
|
-
instead of the real `pdflatex` program.
|
23
|
-
|
24
|
-
It will then read the input file and execute any ruby code between the special
|
25
|
-
markers markers `{:` and `:}` and then find the real program further along
|
26
|
-
your path and run it on the pre-processed output. The result is that you can
|
27
|
-
use the ruby programming language to greatly increase the computational
|
28
|
-
capabilities of a normal TeX or LaTeX file.
|
29
|
-
|
30
|
-
erbtex simply uses the `erubis` program to pre-process the input, except that
|
31
|
-
it uses the `{: :}` delimiters instead of the erubis default of `<% %>`. The
|
32
|
-
brace-colon form of delimiters is less disruptive of syntax highlighting than
|
33
|
-
the default delimiters, which get confused with TeX and LaTeX comments.
|
34
|
-
|
35
|
-
If the opening delimiter has an `=` appended to it, the contained expression
|
36
|
-
is converted into a string and inserted in-place into the TeX manuscript at
|
37
|
-
that point. Without the `=` the code is simply executed. Loops started in
|
38
|
-
one ruby fragment can be continued or terminated in a later fragment, and
|
39
|
-
variables defined in one fragment in one fragment are visible in later
|
40
|
-
fragments according to Ruby's usual scoping rules.
|
41
|
-
|
42
|
-
# Example
|
43
|
-
|
44
|
-
For example, the following LaTeX file will produce a table of square
|
45
|
-
roots when run through erbtex. It uses a ruby iterator to supply the
|
46
|
-
rows of the table, a feat that would tedious at best with bare TeX or
|
47
|
-
LaTeX.
|
48
|
-
|
49
|
-
\documentclass{article}
|
50
|
-
\usepackage[mathbf]{euler}
|
51
|
-
\usepackage{longtable}
|
52
|
-
|
53
|
-
\begin{document}
|
54
|
-
\begin{longtable}[c]{r|r}
|
55
|
-
\hline\hline
|
56
|
-
\multicolumn{1}{c|}{\mathversion{bold}$x$}&
|
57
|
-
\multicolumn{1}{c}{\mathversion{bold}\rule{0pt}{12pt}$\sqrt{x}$}\\
|
58
|
-
\hline\hline
|
59
|
-
\endhead
|
60
|
-
\hline\hline
|
61
|
-
\endfoot
|
62
|
-
% The following line starts a ruby enumerator loop but does not
|
63
|
-
% produce any output, since the delimiters are {: :}.
|
64
|
-
{: 0.upto(100).each do |x| :}
|
65
|
-
% But the following two lines produce output since the opening
|
66
|
-
% delimiter is '{:='. Both call the sprintf method in ruby via the
|
67
|
-
% percent operator, and the second line calls ruby's Math module to
|
68
|
-
% compute the square root.
|
69
|
-
{:= "\\mathversion{bold}$%0.4f$" % x :}&
|
70
|
-
{:= "$%0.8f$" % Math.sqrt(x) :}\\
|
71
|
-
{: end :}
|
72
|
-
\end{longtable}
|
73
|
-
\end{document}
|
74
|
-
|
75
|
-
With the above in file `roots.tex`, running `$ pdflatex roots.tex` at
|
76
|
-
the command line will generate a `PDF` file with a nicely typeset
|
77
|
-
table of square roots.
|
78
|
-
|
79
|
-
As a by-product, the pre-processed file `roots.etx` is left in the
|
80
|
-
same directory, so you can see what the effect of the erbtex fragments
|
81
|
-
were. This is often very handy when you are trying to debug the
|
82
|
-
document; otherwise, it can be deleted. Here, for example is a
|
83
|
-
portion of the `roots.etx` file generated by the foregoing:
|
84
|
-
|
85
|
-
\begin{document}
|
86
|
-
\begin{longtable}[c]{r|r}
|
87
|
-
\hline\hline
|
88
|
-
\multicolumn{1}{c|}{\mathversion{bold}$x$}&
|
89
|
-
\multicolumn{1}{c}{\mathversion{bold}\rule{0pt}{12pt}$\sqrt{x}$}\\
|
90
|
-
\hline\hline
|
91
|
-
\endhead
|
92
|
-
\hline\hline
|
93
|
-
\endfoot
|
94
|
-
\mathversion{bold}$0.0000$&
|
95
|
-
$0.00000000$\\
|
96
|
-
\mathversion{bold}$1.0000$&
|
97
|
-
$1.00000000$\\
|
98
|
-
\mathversion{bold}$2.0000$&
|
99
|
-
$1.41421356$\\
|
100
|
-
\mathversion{bold}$3.0000$&
|
101
|
-
$1.73205081$\\
|
102
|
-
\mathversion{bold}$4.0000$&
|
103
|
-
$2.00000000$\\
|
104
|
-
\mathversion{bold}$5.0000$&
|
105
|
-
$2.23606798$\\
|
106
|
-
\mathversion{bold}$6.0000$&
|
107
|
-
$2.44948974$\\
|
108
|
-
\mathversion{bold}$7.0000$&
|
109
|
-
$2.64575131$\\
|
110
|
-
\mathversion{bold}$8.0000$&
|
111
|
-
$2.82842712$\\
|
112
|
-
\mathversion{bold}$9.0000$&
|
113
|
-
$3.00000000$\\
|
114
|
-
\mathversion{bold}$10.0000$&
|
115
|
-
$3.16227766$\\
|
116
|
-
\mathversion{bold}$11.0000$&
|
117
|
-
$3.31662479$\\
|
118
|
-
\mathversion{bold}$12.0000$&
|
119
|
-
$3.46410162$\\
|
120
|
-
\mathversion{bold}$13.0000$&
|
121
|
-
$3.60555128$\\
|
122
|
-
\mathversion{bold}$14.0000$&
|
123
|
-
|
124
|
-
And many more lines like it.
|
125
|
-
|
126
|
-
The examples directory installed with the erbtex gem has a few more
|
127
|
-
examples.
|
data/bin/etex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/latex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/lualatex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/luatex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/pdfetex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/pdflatex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/pdftex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/pslatex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/tex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/xelatex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|
data/bin/xetex
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
verbose = true
|
4
|
-
|
5
|
-
# This adds our lib subdirectory to the ruby load path
|
6
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
|
7
|
-
|
8
|
-
# This adds our RUBYLIB env to ruby load path
|
9
|
-
if ENV['RUBYLIB']
|
10
|
-
STDERR.puts "ENV['RUBYLIB']:" if verbose
|
11
|
-
ENV['RUBYLIB'].split(':').each do |p|
|
12
|
-
$LOAD_PATH.unshift p
|
13
|
-
STDERR.puts "\t#{p}" if verbose
|
14
|
-
end
|
15
|
-
else
|
16
|
-
STDERR.puts "ENV['RUBYLIB'] is EMPTY" if verbose
|
17
|
-
end
|
18
|
-
|
19
|
-
require 'erbtex'
|
20
|
-
|
21
|
-
progname = File.basename($0)
|
22
|
-
commandline = progname
|
23
|
-
ARGV.each do |a|
|
24
|
-
if a =~ /\s/
|
25
|
-
a = "'" + a + "'"
|
26
|
-
end
|
27
|
-
commandline += " #{a}"
|
28
|
-
end
|
29
|
-
|
30
|
-
if verbose
|
31
|
-
STDERR.puts "Program name: #{progname}"
|
32
|
-
STDERR.puts "Command line: #{commandline}"
|
33
|
-
STDERR.puts "Ruby Load path:"
|
34
|
-
$:.each do |p|
|
35
|
-
STDERR.puts "\t#{p}"
|
36
|
-
end
|
37
|
-
STDERR.puts 'ARGV:'
|
38
|
-
ARGV.each do |a|
|
39
|
-
STDERR.puts "\t#{a}"
|
40
|
-
end
|
41
|
-
STDERR.puts 'PATH:'
|
42
|
-
ENV['PATH'].split(':').each do |p|
|
43
|
-
STDERR.puts "\t#{p}"
|
44
|
-
end
|
45
|
-
STDERR.puts "Executable: "
|
46
|
-
STDERR.puts ErbTeX.find_executable($0)
|
47
|
-
end
|
48
|
-
|
49
|
-
ErbTeX.run(commandline)
|