latex-decode 0.0.12 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.travis.yml +22 -0
- data/Gemfile +2 -1
- data/README.md +5 -3
- data/Rakefile +40 -0
- data/cucumber.yml +1 -0
- data/latex-decode.gemspec +0 -2
- data/lib/latex/decode/compatibility.rb +4 -2
- data/lib/latex/decode/version.rb +1 -1
- metadata +32 -25
data/.gitignore
CHANGED
data/.travis.yml
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.9.3
|
4
|
+
- 1.9.2
|
5
|
+
- 2.0.0
|
6
|
+
- jruby-18mode
|
7
|
+
- jruby-19mode
|
8
|
+
- rbx-18mode
|
9
|
+
- rbx-19mode
|
10
|
+
- ruby-head
|
11
|
+
- jruby-head
|
12
|
+
- 1.8.7
|
13
|
+
- ree
|
14
|
+
notifications:
|
15
|
+
email:
|
16
|
+
- sk@semicolon.at
|
17
|
+
on_success: change
|
18
|
+
on_failure: always
|
19
|
+
matrix:
|
20
|
+
allow_failures:
|
21
|
+
rvm:
|
22
|
+
- rbx-18mode
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
group :development do
|
@@ -6,5 +6,6 @@ group :development do
|
|
6
6
|
gem 'ruby-debug', :platforms => [:mri_18]
|
7
7
|
end
|
8
8
|
|
9
|
+
gem 'rake', :groups => [:test, :development]
|
9
10
|
|
10
11
|
gem 'unicode', '~> 0.4', :platforms => [:mri, :rbx, :mswin, :mingw]
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
LaTeX::Decode
|
2
2
|
=============
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/inukshuk/latex-decode.png?branch=master)](https://travis-ci.org/inukshuk/latex-decode)
|
5
|
+
|
4
6
|
LaTeX::Decode is a Ruby gem to convert LaTeX input to Unicode. Its original
|
5
7
|
use was as an input filter for [BibTeX-Ruby](http://rubygems.org/gems/bibtex-ruby)
|
6
8
|
but can be used independently to decode LaTeX. Many of the patterns used by
|
@@ -10,7 +12,7 @@ this Ruby gem are based on François Charette's equivalent Perl module
|
|
10
12
|
Quickstart
|
11
13
|
----------
|
12
14
|
|
13
|
-
$ [sudo] gem install
|
15
|
+
$ [sudo] gem install latex-decode
|
14
16
|
$ irb
|
15
17
|
>> require 'latex/decode'
|
16
18
|
>> LaTeX.decode "dipl\\^{o}me d'\\'{e}tudes sup\\'erieures"
|
@@ -26,7 +28,7 @@ Issues
|
|
26
28
|
------
|
27
29
|
|
28
30
|
Please use the tracker of the project's
|
29
|
-
[
|
31
|
+
[GitHub repository](https://github.com/inukshuk/latex-decode) to report any
|
30
32
|
issues. When describing intended behaviour, please use the extremely simple
|
31
33
|
syntax of the Cucumber features used by LaTeX::Decode; for instance, you could
|
32
34
|
describe the example above as:
|
@@ -45,7 +47,7 @@ Credits
|
|
45
47
|
Kudos and thanks to all [contributors](https://github.com/inukshuk/latex-decode/contributors)
|
46
48
|
who have made LaTeX::Decode possible!
|
47
49
|
|
48
|
-
Copyright (C) 2011 [Sylvester Keil](sylvester.keil.or.at)
|
50
|
+
Copyright (C) 2011-2013 [Sylvester Keil](sylvester.keil.or.at)
|
49
51
|
|
50
52
|
Copyright (C) 2010 François Charette
|
51
53
|
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'bundler'
|
4
|
+
begin
|
5
|
+
Bundler.setup
|
6
|
+
rescue Bundler::BundlerError => e
|
7
|
+
$stderr.puts e.message
|
8
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
9
|
+
exit e.status_code
|
10
|
+
end
|
11
|
+
|
12
|
+
$:.unshift(File.join(File.dirname(__FILE__), './lib'))
|
13
|
+
require 'latex/decode/version'
|
14
|
+
|
15
|
+
|
16
|
+
desc 'Run an IRB session with LaTeX-Decode loaded'
|
17
|
+
task :console, [:script] do |t,args|
|
18
|
+
ARGV.clear
|
19
|
+
|
20
|
+
require 'irb'
|
21
|
+
require 'latex/decode'
|
22
|
+
|
23
|
+
IRB.conf[:SCRIPT] = args.script
|
24
|
+
IRB.start
|
25
|
+
end
|
26
|
+
|
27
|
+
require 'cucumber/rake/task'
|
28
|
+
Cucumber::Rake::Task.new(:cucumber)
|
29
|
+
|
30
|
+
task :release do |t|
|
31
|
+
system "gem build latex-decode.gemspec"
|
32
|
+
system "git tag #{LaTeX::Decode::VERSION}"
|
33
|
+
system "git push --tags"
|
34
|
+
system "gem push latex-decode-#{LaTeX::Decode::VERSION}.gem"
|
35
|
+
system "gem push latex-decode-#{LaTeX::Decode::VERSION}-java.gem"
|
36
|
+
system "rm latex-decode-#{LaTeX::Decode::VERSION}.gem"
|
37
|
+
system "rm latex-decode-#{LaTeX::Decode::VERSION}-java.gem"
|
38
|
+
end
|
39
|
+
|
40
|
+
task :default => :cucumber
|
data/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
default: --format progress --require features --color
|
data/latex-decode.gemspec
CHANGED
@@ -21,9 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.platform = 'ruby'
|
22
22
|
end
|
23
23
|
|
24
|
-
s.add_development_dependency('rake', '~> 0.8')
|
25
24
|
s.add_development_dependency('bundler', '~> 1.0')
|
26
|
-
s.add_development_dependency('rdoc', '~> 3.6')
|
27
25
|
s.add_development_dependency('rspec', '~> 2.6')
|
28
26
|
s.add_development_dependency('cucumber', "~> 1.0")
|
29
27
|
|
@@ -3,7 +3,7 @@ if RUBY_VERSION < "1.9"
|
|
3
3
|
$KCODE = 'U'
|
4
4
|
|
5
5
|
module LaTeX
|
6
|
-
def self.to_unicode
|
6
|
+
def self.to_unicode(string)
|
7
7
|
string.gsub(/\\?u([\da-f]{4})/i) { |m| [$1.to_i(16)].pack('U') }
|
8
8
|
end
|
9
9
|
end
|
@@ -13,7 +13,9 @@ if RUBY_VERSION < "1.9"
|
|
13
13
|
else
|
14
14
|
|
15
15
|
module LaTeX
|
16
|
-
def self.to_unicode
|
16
|
+
def self.to_unicode(string)
|
17
|
+
string
|
18
|
+
end
|
17
19
|
end
|
18
20
|
|
19
21
|
def ruby_18; false; end
|
data/lib/latex/decode/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latex-decode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: unicode
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,21 +21,15 @@ dependencies:
|
|
21
21
|
version: '0.4'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: rake
|
27
|
-
requirement: &70254890760120 !ruby/object:Gem::Requirement
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
25
|
none: false
|
29
26
|
requirements:
|
30
27
|
- - ~>
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version: '0.
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70254890760120
|
29
|
+
version: '0.4'
|
36
30
|
- !ruby/object:Gem::Dependency
|
37
31
|
name: bundler
|
38
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
34
|
requirements:
|
41
35
|
- - ~>
|
@@ -43,21 +37,15 @@ dependencies:
|
|
43
37
|
version: '1.0'
|
44
38
|
type: :development
|
45
39
|
prerelease: false
|
46
|
-
version_requirements:
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rdoc
|
49
|
-
requirement: &70254890759180 !ruby/object:Gem::Requirement
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
41
|
none: false
|
51
42
|
requirements:
|
52
43
|
- - ~>
|
53
44
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: *70254890759180
|
45
|
+
version: '1.0'
|
58
46
|
- !ruby/object:Gem::Dependency
|
59
47
|
name: rspec
|
60
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
61
49
|
none: false
|
62
50
|
requirements:
|
63
51
|
- - ~>
|
@@ -65,10 +53,15 @@ dependencies:
|
|
65
53
|
version: '2.6'
|
66
54
|
type: :development
|
67
55
|
prerelease: false
|
68
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.6'
|
69
62
|
- !ruby/object:Gem::Dependency
|
70
63
|
name: cucumber
|
71
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
72
65
|
none: false
|
73
66
|
requirements:
|
74
67
|
- - ~>
|
@@ -76,7 +69,12 @@ dependencies:
|
|
76
69
|
version: '1.0'
|
77
70
|
type: :development
|
78
71
|
prerelease: false
|
79
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.0'
|
80
78
|
description: Decodes strings formatted in LaTeX to equivalent Unicode strings.
|
81
79
|
email:
|
82
80
|
- http://sylvester.keil.or.at
|
@@ -87,9 +85,12 @@ extra_rdoc_files:
|
|
87
85
|
- LICENSE
|
88
86
|
files:
|
89
87
|
- .gitignore
|
88
|
+
- .travis.yml
|
90
89
|
- Gemfile
|
91
90
|
- LICENSE
|
92
91
|
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- cucumber.yml
|
93
94
|
- features/brackets.feature
|
94
95
|
- features/diacritics.feature
|
95
96
|
- features/non-latex.feature
|
@@ -127,15 +128,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
128
|
- - ! '>='
|
128
129
|
- !ruby/object:Gem::Version
|
129
130
|
version: '0'
|
131
|
+
segments:
|
132
|
+
- 0
|
133
|
+
hash: -3992129943752612646
|
130
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
135
|
none: false
|
132
136
|
requirements:
|
133
137
|
- - ! '>='
|
134
138
|
- !ruby/object:Gem::Version
|
135
139
|
version: '0'
|
140
|
+
segments:
|
141
|
+
- 0
|
142
|
+
hash: -3992129943752612646
|
136
143
|
requirements: []
|
137
144
|
rubyforge_project:
|
138
|
-
rubygems_version: 1.8.
|
145
|
+
rubygems_version: 1.8.23
|
139
146
|
signing_key:
|
140
147
|
specification_version: 3
|
141
148
|
summary: Decodes LaTeX to Unicode.
|