mathematical 0.1.0 → 0.1.1
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/ext/mathematical/extconf.rb +14 -0
- data/ext/mathematical/itex2MML.h +63 -0
- data/ext/mathematical/lasemrender.c +257 -0
- data/ext/mathematical/lex.yy.c +6548 -0
- data/ext/mathematical/lsm.c +31 -0
- data/ext/mathematical/lsm.h +39 -0
- data/ext/mathematical/lsmattributes.c +279 -0
- data/ext/mathematical/lsmattributes.h +75 -0
- data/ext/mathematical/lsmcairo.c +598 -0
- data/ext/mathematical/lsmcairo.h +51 -0
- data/ext/mathematical/lsmdebug.c +183 -0
- data/ext/mathematical/lsmdebug.h +73 -0
- data/ext/mathematical/lsmdom.h +43 -0
- data/ext/mathematical/lsmdomcharacterdata.c +114 -0
- data/ext/mathematical/lsmdomcharacterdata.h +59 -0
- data/ext/mathematical/lsmdomdocument.c +255 -0
- data/ext/mathematical/lsmdomdocument.h +75 -0
- data/ext/mathematical/lsmdomdocumentfragment.c +81 -0
- data/ext/mathematical/lsmdomdocumentfragment.h +55 -0
- data/ext/mathematical/lsmdomelement.c +148 -0
- data/ext/mathematical/lsmdomelement.h +62 -0
- data/ext/mathematical/lsmdomentities.c +2166 -0
- data/ext/mathematical/lsmdomentities.h +35 -0
- data/ext/mathematical/lsmdomenumtypes.c +99 -0
- data/ext/mathematical/lsmdomenumtypes.h +26 -0
- data/ext/mathematical/lsmdomimplementation.c +82 -0
- data/ext/mathematical/lsmdomimplementation.h +41 -0
- data/ext/mathematical/lsmdomnamednodemap.c +118 -0
- data/ext/mathematical/lsmdomnamednodemap.h +64 -0
- data/ext/mathematical/lsmdomnode.c +737 -0
- data/ext/mathematical/lsmdomnode.h +122 -0
- data/ext/mathematical/lsmdomnodelist.c +70 -0
- data/ext/mathematical/lsmdomnodelist.h +58 -0
- data/ext/mathematical/lsmdomparser.c +461 -0
- data/ext/mathematical/lsmdomparser.h +54 -0
- data/ext/mathematical/lsmdomtext.c +82 -0
- data/ext/mathematical/lsmdomtext.h +55 -0
- data/ext/mathematical/lsmdomtypes.h +44 -0
- data/ext/mathematical/lsmdomview.c +422 -0
- data/ext/mathematical/lsmdomview.h +94 -0
- data/ext/mathematical/lsmitex.c +76 -0
- data/ext/mathematical/lsmitex.h +36 -0
- data/ext/mathematical/lsmmathml.h +66 -0
- data/ext/mathematical/lsmmathmlactionelement.c +93 -0
- data/ext/mathematical/lsmmathmlactionelement.h +57 -0
- data/ext/mathematical/lsmmathmlaligngroupelement.c +102 -0
- data/ext/mathematical/lsmmathmlaligngroupelement.h +56 -0
- data/ext/mathematical/lsmmathmlalignmarkelement.c +102 -0
- data/ext/mathematical/lsmmathmlalignmarkelement.h +56 -0
- data/ext/mathematical/lsmmathmlattributes.c +197 -0
- data/ext/mathematical/lsmmathmlattributes.h +126 -0
- data/ext/mathematical/lsmmathmldocument.c +304 -0
- data/ext/mathematical/lsmmathmldocument.h +61 -0
- data/ext/mathematical/lsmmathmlelement.c +491 -0
- data/ext/mathematical/lsmmathmlelement.h +107 -0
- data/ext/mathematical/lsmmathmlenums.c +429 -0
- data/ext/mathematical/lsmmathmlenums.h +182 -0
- data/ext/mathematical/lsmmathmlenumtypes.c +666 -0
- data/ext/mathematical/lsmmathmlenumtypes.h +90 -0
- data/ext/mathematical/lsmmathmlerrorelement.c +58 -0
- data/ext/mathematical/lsmmathmlerrorelement.h +56 -0
- data/ext/mathematical/lsmmathmlfencedelement.c +178 -0
- data/ext/mathematical/lsmmathmlfencedelement.h +65 -0
- data/ext/mathematical/lsmmathmlfractionelement.c +253 -0
- data/ext/mathematical/lsmmathmlfractionelement.h +62 -0
- data/ext/mathematical/lsmmathmlglyphtableams.c +597 -0
- data/ext/mathematical/lsmmathmlglyphtableams.h +45 -0
- data/ext/mathematical/lsmmathmlitexelement.c +187 -0
- data/ext/mathematical/lsmmathmlitexelement.h +60 -0
- data/ext/mathematical/lsmmathmllayoututils.c +191 -0
- data/ext/mathematical/lsmmathmllayoututils.h +58 -0
- data/ext/mathematical/lsmmathmlmathelement.c +204 -0
- data/ext/mathematical/lsmmathmlmathelement.h +81 -0
- data/ext/mathematical/lsmmathmloperatordictionary.c +3332 -0
- data/ext/mathematical/lsmmathmloperatordictionary.h +54 -0
- data/ext/mathematical/lsmmathmloperatorelement.c +307 -0
- data/ext/mathematical/lsmmathmloperatorelement.h +73 -0
- data/ext/mathematical/lsmmathmlpaddedelement.c +58 -0
- data/ext/mathematical/lsmmathmlpaddedelement.h +56 -0
- data/ext/mathematical/lsmmathmlphantomelement.c +71 -0
- data/ext/mathematical/lsmmathmlphantomelement.h +56 -0
- data/ext/mathematical/lsmmathmlpresentationcontainer.c +43 -0
- data/ext/mathematical/lsmmathmlpresentationcontainer.h +54 -0
- data/ext/mathematical/lsmmathmlpresentationtoken.c +303 -0
- data/ext/mathematical/lsmmathmlpresentationtoken.h +83 -0
- data/ext/mathematical/lsmmathmlradicalelement.c +266 -0
- data/ext/mathematical/lsmmathmlradicalelement.h +71 -0
- data/ext/mathematical/lsmmathmlrowelement.c +58 -0
- data/ext/mathematical/lsmmathmlrowelement.h +56 -0
- data/ext/mathematical/lsmmathmlscriptelement.c +282 -0
- data/ext/mathematical/lsmmathmlscriptelement.h +78 -0
- data/ext/mathematical/lsmmathmlsemanticselement.c +84 -0
- data/ext/mathematical/lsmmathmlsemanticselement.h +56 -0
- data/ext/mathematical/lsmmathmlspaceelement.c +142 -0
- data/ext/mathematical/lsmmathmlspaceelement.h +60 -0
- data/ext/mathematical/lsmmathmlstringelement.c +123 -0
- data/ext/mathematical/lsmmathmlstringelement.h +58 -0
- data/ext/mathematical/lsmmathmlstyle.c +130 -0
- data/ext/mathematical/lsmmathmlstyle.h +81 -0
- data/ext/mathematical/lsmmathmlstyleelement.c +307 -0
- data/ext/mathematical/lsmmathmlstyleelement.h +87 -0
- data/ext/mathematical/lsmmathmltablecellelement.c +122 -0
- data/ext/mathematical/lsmmathmltablecellelement.h +62 -0
- data/ext/mathematical/lsmmathmltableelement.c +545 -0
- data/ext/mathematical/lsmmathmltableelement.h +78 -0
- data/ext/mathematical/lsmmathmltablerowelement.c +120 -0
- data/ext/mathematical/lsmmathmltablerowelement.h +64 -0
- data/ext/mathematical/lsmmathmltraits.c +819 -0
- data/ext/mathematical/lsmmathmltraits.h +119 -0
- data/ext/mathematical/lsmmathmltypes.h +66 -0
- data/ext/mathematical/lsmmathmlunderoverelement.c +485 -0
- data/ext/mathematical/lsmmathmlunderoverelement.h +82 -0
- data/ext/mathematical/lsmmathmlutils.c +170 -0
- data/ext/mathematical/lsmmathmlutils.h +50 -0
- data/ext/mathematical/lsmmathmlview.c +1048 -0
- data/ext/mathematical/lsmmathmlview.h +164 -0
- data/ext/mathematical/lsmproperties.c +418 -0
- data/ext/mathematical/lsmproperties.h +85 -0
- data/ext/mathematical/lsmstr.c +231 -0
- data/ext/mathematical/lsmstr.h +114 -0
- data/ext/mathematical/lsmsvg.h +67 -0
- data/ext/mathematical/lsmsvgaelement.c +73 -0
- data/ext/mathematical/lsmsvgaelement.h +55 -0
- data/ext/mathematical/lsmsvgattributes.h +118 -0
- data/ext/mathematical/lsmsvgcircleelement.c +153 -0
- data/ext/mathematical/lsmsvgcircleelement.h +59 -0
- data/ext/mathematical/lsmsvgclippathelement.c +134 -0
- data/ext/mathematical/lsmsvgclippathelement.h +59 -0
- data/ext/mathematical/lsmsvgcolors.c +212 -0
- data/ext/mathematical/lsmsvgcolors.h +39 -0
- data/ext/mathematical/lsmsvgdefselement.c +74 -0
- data/ext/mathematical/lsmsvgdefselement.h +55 -0
- data/ext/mathematical/lsmsvgdocument.c +288 -0
- data/ext/mathematical/lsmsvgdocument.h +64 -0
- data/ext/mathematical/lsmsvgelement.c +373 -0
- data/ext/mathematical/lsmsvgelement.h +81 -0
- data/ext/mathematical/lsmsvgellipseelement.c +158 -0
- data/ext/mathematical/lsmsvgellipseelement.h +60 -0
- data/ext/mathematical/lsmsvgenums.c +544 -0
- data/ext/mathematical/lsmsvgenums.h +357 -0
- data/ext/mathematical/lsmsvgenumtypes.c +1083 -0
- data/ext/mathematical/lsmsvgenumtypes.h +111 -0
- data/ext/mathematical/lsmsvgfilterblend.c +105 -0
- data/ext/mathematical/lsmsvgfilterblend.h +58 -0
- data/ext/mathematical/lsmsvgfiltercomposite.c +109 -0
- data/ext/mathematical/lsmsvgfiltercomposite.h +58 -0
- data/ext/mathematical/lsmsvgfilterelement.c +266 -0
- data/ext/mathematical/lsmsvgfilterelement.h +66 -0
- data/ext/mathematical/lsmsvgfilterflood.c +86 -0
- data/ext/mathematical/lsmsvgfilterflood.h +55 -0
- data/ext/mathematical/lsmsvgfiltergaussianblur.c +114 -0
- data/ext/mathematical/lsmsvgfiltergaussianblur.h +57 -0
- data/ext/mathematical/lsmsvgfiltermerge.c +98 -0
- data/ext/mathematical/lsmsvgfiltermerge.h +55 -0
- data/ext/mathematical/lsmsvgfiltermergenode.c +87 -0
- data/ext/mathematical/lsmsvgfiltermergenode.h +57 -0
- data/ext/mathematical/lsmsvgfilteroffset.c +112 -0
- data/ext/mathematical/lsmsvgfilteroffset.h +58 -0
- data/ext/mathematical/lsmsvgfilterprimitive.c +168 -0
- data/ext/mathematical/lsmsvgfilterprimitive.h +66 -0
- data/ext/mathematical/lsmsvgfilterspecularlighting.c +127 -0
- data/ext/mathematical/lsmsvgfilterspecularlighting.h +60 -0
- data/ext/mathematical/lsmsvgfiltersurface.c +455 -0
- data/ext/mathematical/lsmsvgfiltersurface.h +66 -0
- data/ext/mathematical/lsmsvgfiltertile.c +102 -0
- data/ext/mathematical/lsmsvgfiltertile.h +57 -0
- data/ext/mathematical/lsmsvggelement.c +73 -0
- data/ext/mathematical/lsmsvggelement.h +55 -0
- data/ext/mathematical/lsmsvggradientelement.c +151 -0
- data/ext/mathematical/lsmsvggradientelement.h +68 -0
- data/ext/mathematical/lsmsvgimageelement.c +261 -0
- data/ext/mathematical/lsmsvgimageelement.h +67 -0
- data/ext/mathematical/lsmsvglength.c +152 -0
- data/ext/mathematical/lsmsvglength.h +65 -0
- data/ext/mathematical/lsmsvglineargradientelement.c +271 -0
- data/ext/mathematical/lsmsvglineargradientelement.h +60 -0
- data/ext/mathematical/lsmsvglineelement.c +153 -0
- data/ext/mathematical/lsmsvglineelement.h +60 -0
- data/ext/mathematical/lsmsvgmarkerelement.c +266 -0
- data/ext/mathematical/lsmsvgmarkerelement.h +74 -0
- data/ext/mathematical/lsmsvgmaskelement.c +232 -0
- data/ext/mathematical/lsmsvgmaskelement.h +64 -0
- data/ext/mathematical/lsmsvgmatrix.c +205 -0
- data/ext/mathematical/lsmsvgmatrix.h +59 -0
- data/ext/mathematical/lsmsvgpathelement.c +115 -0
- data/ext/mathematical/lsmsvgpathelement.h +59 -0
- data/ext/mathematical/lsmsvgpatternelement.c +398 -0
- data/ext/mathematical/lsmsvgpatternelement.h +69 -0
- data/ext/mathematical/lsmsvgpolygonelement.c +106 -0
- data/ext/mathematical/lsmsvgpolygonelement.h +57 -0
- data/ext/mathematical/lsmsvgpolylineelement.c +106 -0
- data/ext/mathematical/lsmsvgpolylineelement.h +57 -0
- data/ext/mathematical/lsmsvgradialgradientelement.c +323 -0
- data/ext/mathematical/lsmsvgradialgradientelement.h +61 -0
- data/ext/mathematical/lsmsvgrectelement.c +184 -0
- data/ext/mathematical/lsmsvgrectelement.h +62 -0
- data/ext/mathematical/lsmsvgstopelement.c +106 -0
- data/ext/mathematical/lsmsvgstopelement.h +57 -0
- data/ext/mathematical/lsmsvgstyle.c +560 -0
- data/ext/mathematical/lsmsvgstyle.h +217 -0
- data/ext/mathematical/lsmsvgsvgelement.c +260 -0
- data/ext/mathematical/lsmsvgsvgelement.h +71 -0
- data/ext/mathematical/lsmsvgswitchelement.c +103 -0
- data/ext/mathematical/lsmsvgswitchelement.h +55 -0
- data/ext/mathematical/lsmsvgsymbolelement.c +74 -0
- data/ext/mathematical/lsmsvgsymbolelement.h +55 -0
- data/ext/mathematical/lsmsvgtextelement.c +203 -0
- data/ext/mathematical/lsmsvgtextelement.h +60 -0
- data/ext/mathematical/lsmsvgtraits.c +1232 -0
- data/ext/mathematical/lsmsvgtraits.h +104 -0
- data/ext/mathematical/lsmsvgtransformable.c +106 -0
- data/ext/mathematical/lsmsvgtransformable.h +54 -0
- data/ext/mathematical/lsmsvgtspanelement.c +174 -0
- data/ext/mathematical/lsmsvgtspanelement.h +60 -0
- data/ext/mathematical/lsmsvgtypes.h +77 -0
- data/ext/mathematical/lsmsvguseelement.c +237 -0
- data/ext/mathematical/lsmsvguseelement.h +69 -0
- data/ext/mathematical/lsmsvgview.c +2583 -0
- data/ext/mathematical/lsmsvgview.h +179 -0
- data/ext/mathematical/lsmtraits.c +119 -0
- data/ext/mathematical/lsmtraits.h +49 -0
- data/ext/mathematical/lsmtypes.h +36 -0
- data/ext/mathematical/lsmutils.c +54 -0
- data/ext/mathematical/lsmutils.h +56 -0
- data/ext/mathematical/mathematical.c +145 -0
- data/ext/mathematical/y.tab.c +6179 -0
- data/ext/mathematical/y.tab.h +389 -0
- data/lib/mathematical/version.rb +1 -1
- data/mathematical.gemspec +8 -6
- data/test/mathematical/basic_test.rb +9 -0
- data/test/mathematical/fixtures/after/brackets_display.html +1 -0
- data/test/mathematical/fixtures/after/compliance_accents.html +17 -0
- data/test/mathematical/fixtures/after/compliance_arrows.html +71 -0
- data/test/mathematical/fixtures/after/compliance_colors.html +4 -0
- data/test/mathematical/fixtures/after/compliance_greek_letters.html +42 -0
- data/test/mathematical/fixtures/after/compliance_large_math.html +19 -0
- data/test/mathematical/fixtures/after/compliance_log_symbols.html +34 -0
- data/test/mathematical/fixtures/after/compliance_operators.html +262 -0
- data/test/mathematical/fixtures/after/dollar_sign_inline.html +1 -0
- data/test/mathematical/fixtures/after/equation_display.html +1 -0
- data/test/mathematical/fixtures/after/multiple_dollar_inline.html +1 -0
- data/test/mathematical/fixtures/after/parens_inline.html +1 -0
- data/test/mathematical/fixtures/before/brackets_display.text +1 -0
- data/test/mathematical/fixtures/before/compliance_accents.text +17 -0
- data/test/mathematical/fixtures/before/compliance_arrows.text +71 -0
- data/test/mathematical/fixtures/before/compliance_colors.text +4 -0
- data/test/mathematical/fixtures/before/compliance_greek_letters.text +42 -0
- data/test/mathematical/fixtures/before/compliance_large_math.text +19 -0
- data/test/mathematical/fixtures/before/compliance_log_symbols.text +34 -0
- data/test/mathematical/fixtures/before/compliance_operators.text +262 -0
- data/test/mathematical/fixtures/before/dollar_sign_inline.text +1 -0
- data/test/mathematical/fixtures/before/equation_display.text +1 -0
- data/test/mathematical/fixtures/before/multiple_dollar_inline.text +1 -0
- data/test/mathematical/fixtures/before/parens_inline.text +1 -0
- data/test/mathematical/fixtures/performance/big_file.text +1767 -0
- data/test/mathematical/fixtures_test.rb +45 -0
- data/test/mathematical/maliciousness_test.rb +45 -0
- data/test/mathematical/performance_test.rb +15 -0
- data/test/test_helper.rb +5 -0
- metadata +301 -14
- data/lib/mathematical.bundle +0 -0
- data/lib/mathematical/mathematical.bundle +0 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class Mathematical::FixturesTest < Test::Unit::TestCase
|
4
|
+
# the same SVGs sometimes get random id values, throwing off the tests
|
5
|
+
def strip_id(blob)
|
6
|
+
blob.gsub(/id="surface.+?"/, '')
|
7
|
+
end
|
8
|
+
|
9
|
+
Dir['test/mathematical/fixtures/before/*.text'].each do |before|
|
10
|
+
name = before.split('/').last
|
11
|
+
|
12
|
+
define_method "test_#{name}" do
|
13
|
+
source = File.read(before)
|
14
|
+
|
15
|
+
actual = MathToItex(source).convert do |eq, type|
|
16
|
+
svg_content = Mathematical::Render.new(:base64 => true).render(eq)
|
17
|
+
|
18
|
+
%|<img class="#{type.to_s}-math" data-math-type="#{type.to_s}-math" src="#{svg_content}"/>|
|
19
|
+
end.rstrip
|
20
|
+
|
21
|
+
expected_file = before.sub(/before/, "after").sub(/text/, "html")
|
22
|
+
|
23
|
+
File.open(expected_file, "w") { |file| file.write(actual) } unless ENV['DEBUG_MATHEMATICAL'].nil?
|
24
|
+
|
25
|
+
expected = File.read(expected_file)
|
26
|
+
|
27
|
+
expected = (MathToItex(expected).convert {|string| Mathematical::Render.new.render(string)}).rstrip
|
28
|
+
|
29
|
+
# Travis and OS X each render SVGs differently. For now, let's just be happy
|
30
|
+
# that something renders at all.
|
31
|
+
unless actual.match("PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My")
|
32
|
+
diff = IO.popen("diff -u - #{expected_file}", 'r+') do |f|
|
33
|
+
f.write actual
|
34
|
+
f.close_write
|
35
|
+
f.read
|
36
|
+
end
|
37
|
+
|
38
|
+
assert expected == actual, <<-eos
|
39
|
+
#{File.basename expected_file}'s contents don't match command output:
|
40
|
+
#{diff}
|
41
|
+
eos
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class Mathematical::MaliciousnessTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_it_does_not_error_on_unrecognized_commands
|
6
|
+
render = Mathematical::Render.new
|
7
|
+
output = nil
|
8
|
+
assert_nothing_raised { output = render.render('$\align$') }
|
9
|
+
assert_equal output, '$\align$'
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_it_does_not_blow_up_on_bad_arguments
|
13
|
+
# need to pass a hash here
|
14
|
+
assert_raise TypeError do
|
15
|
+
render = Mathematical::Render.new("not a hash")
|
16
|
+
end
|
17
|
+
|
18
|
+
# need to pass a string here
|
19
|
+
render = Mathematical::Render.new
|
20
|
+
assert_raise TypeError do
|
21
|
+
Mathematical::Render.new.render(123)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_it_does_not_blow_up_on_bad_options
|
26
|
+
assert_raise TypeError do
|
27
|
+
render = Mathematical::Render.new({:ppi => "not a number"})
|
28
|
+
end
|
29
|
+
|
30
|
+
assert_raise TypeError do
|
31
|
+
render = Mathematical::Render.new({:zoom => "not a number"})
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
def test_it_does_not_blow_up_on_bad_input
|
37
|
+
assert_raise TypeError do
|
38
|
+
render = Mathematical::Render.new.render(23)
|
39
|
+
end
|
40
|
+
|
41
|
+
assert_raise ArgumentError do
|
42
|
+
render = Mathematical::Render.new.render("No dollars")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
require 'benchmark'
|
3
|
+
|
4
|
+
class Mathematical::BasicTest < Test::Unit::TestCase
|
5
|
+
def test_it_handles_big_files
|
6
|
+
assert_nothing_raised do
|
7
|
+
big_file = File.read('test/mathematical/fixtures/performance/big_file.text')
|
8
|
+
speed = Benchmark.realtime do
|
9
|
+
MathToItex(big_file).convert { |equation| Mathematical::Render.new.render(equation) }
|
10
|
+
end
|
11
|
+
|
12
|
+
assert_operator speed, :<=, 5
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mathematical
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.9'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,34 +56,290 @@ dependencies:
|
|
56
56
|
name: math-to-itex
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '0.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '0.1'
|
69
69
|
description: 'A very fast way to turn itex math equations into beautifully rendered
|
70
70
|
SVGs, to embed on the web. This library is a general purpose wrapper to GNOME''s
|
71
71
|
Lasem. '
|
72
72
|
email:
|
73
73
|
- gjtorikian@gmail.com
|
74
74
|
executables: []
|
75
|
-
extensions:
|
75
|
+
extensions:
|
76
|
+
- ext/mathematical/extconf.rb
|
76
77
|
extra_rdoc_files: []
|
77
78
|
files:
|
78
79
|
- LICENSE.txt
|
79
80
|
- README.md
|
80
81
|
- Rakefile
|
81
|
-
-
|
82
|
+
- ext/mathematical/extconf.rb
|
83
|
+
- ext/mathematical/itex2MML.h
|
84
|
+
- ext/mathematical/lasemrender.c
|
85
|
+
- ext/mathematical/lex.yy.c
|
86
|
+
- ext/mathematical/lsm.c
|
87
|
+
- ext/mathematical/lsm.h
|
88
|
+
- ext/mathematical/lsmattributes.c
|
89
|
+
- ext/mathematical/lsmattributes.h
|
90
|
+
- ext/mathematical/lsmcairo.c
|
91
|
+
- ext/mathematical/lsmcairo.h
|
92
|
+
- ext/mathematical/lsmdebug.c
|
93
|
+
- ext/mathematical/lsmdebug.h
|
94
|
+
- ext/mathematical/lsmdom.h
|
95
|
+
- ext/mathematical/lsmdomcharacterdata.c
|
96
|
+
- ext/mathematical/lsmdomcharacterdata.h
|
97
|
+
- ext/mathematical/lsmdomdocument.c
|
98
|
+
- ext/mathematical/lsmdomdocument.h
|
99
|
+
- ext/mathematical/lsmdomdocumentfragment.c
|
100
|
+
- ext/mathematical/lsmdomdocumentfragment.h
|
101
|
+
- ext/mathematical/lsmdomelement.c
|
102
|
+
- ext/mathematical/lsmdomelement.h
|
103
|
+
- ext/mathematical/lsmdomentities.c
|
104
|
+
- ext/mathematical/lsmdomentities.h
|
105
|
+
- ext/mathematical/lsmdomenumtypes.c
|
106
|
+
- ext/mathematical/lsmdomenumtypes.h
|
107
|
+
- ext/mathematical/lsmdomimplementation.c
|
108
|
+
- ext/mathematical/lsmdomimplementation.h
|
109
|
+
- ext/mathematical/lsmdomnamednodemap.c
|
110
|
+
- ext/mathematical/lsmdomnamednodemap.h
|
111
|
+
- ext/mathematical/lsmdomnode.c
|
112
|
+
- ext/mathematical/lsmdomnode.h
|
113
|
+
- ext/mathematical/lsmdomnodelist.c
|
114
|
+
- ext/mathematical/lsmdomnodelist.h
|
115
|
+
- ext/mathematical/lsmdomparser.c
|
116
|
+
- ext/mathematical/lsmdomparser.h
|
117
|
+
- ext/mathematical/lsmdomtext.c
|
118
|
+
- ext/mathematical/lsmdomtext.h
|
119
|
+
- ext/mathematical/lsmdomtypes.h
|
120
|
+
- ext/mathematical/lsmdomview.c
|
121
|
+
- ext/mathematical/lsmdomview.h
|
122
|
+
- ext/mathematical/lsmitex.c
|
123
|
+
- ext/mathematical/lsmitex.h
|
124
|
+
- ext/mathematical/lsmmathml.h
|
125
|
+
- ext/mathematical/lsmmathmlactionelement.c
|
126
|
+
- ext/mathematical/lsmmathmlactionelement.h
|
127
|
+
- ext/mathematical/lsmmathmlaligngroupelement.c
|
128
|
+
- ext/mathematical/lsmmathmlaligngroupelement.h
|
129
|
+
- ext/mathematical/lsmmathmlalignmarkelement.c
|
130
|
+
- ext/mathematical/lsmmathmlalignmarkelement.h
|
131
|
+
- ext/mathematical/lsmmathmlattributes.c
|
132
|
+
- ext/mathematical/lsmmathmlattributes.h
|
133
|
+
- ext/mathematical/lsmmathmldocument.c
|
134
|
+
- ext/mathematical/lsmmathmldocument.h
|
135
|
+
- ext/mathematical/lsmmathmlelement.c
|
136
|
+
- ext/mathematical/lsmmathmlelement.h
|
137
|
+
- ext/mathematical/lsmmathmlenums.c
|
138
|
+
- ext/mathematical/lsmmathmlenums.h
|
139
|
+
- ext/mathematical/lsmmathmlenumtypes.c
|
140
|
+
- ext/mathematical/lsmmathmlenumtypes.h
|
141
|
+
- ext/mathematical/lsmmathmlerrorelement.c
|
142
|
+
- ext/mathematical/lsmmathmlerrorelement.h
|
143
|
+
- ext/mathematical/lsmmathmlfencedelement.c
|
144
|
+
- ext/mathematical/lsmmathmlfencedelement.h
|
145
|
+
- ext/mathematical/lsmmathmlfractionelement.c
|
146
|
+
- ext/mathematical/lsmmathmlfractionelement.h
|
147
|
+
- ext/mathematical/lsmmathmlglyphtableams.c
|
148
|
+
- ext/mathematical/lsmmathmlglyphtableams.h
|
149
|
+
- ext/mathematical/lsmmathmlitexelement.c
|
150
|
+
- ext/mathematical/lsmmathmlitexelement.h
|
151
|
+
- ext/mathematical/lsmmathmllayoututils.c
|
152
|
+
- ext/mathematical/lsmmathmllayoututils.h
|
153
|
+
- ext/mathematical/lsmmathmlmathelement.c
|
154
|
+
- ext/mathematical/lsmmathmlmathelement.h
|
155
|
+
- ext/mathematical/lsmmathmloperatordictionary.c
|
156
|
+
- ext/mathematical/lsmmathmloperatordictionary.h
|
157
|
+
- ext/mathematical/lsmmathmloperatorelement.c
|
158
|
+
- ext/mathematical/lsmmathmloperatorelement.h
|
159
|
+
- ext/mathematical/lsmmathmlpaddedelement.c
|
160
|
+
- ext/mathematical/lsmmathmlpaddedelement.h
|
161
|
+
- ext/mathematical/lsmmathmlphantomelement.c
|
162
|
+
- ext/mathematical/lsmmathmlphantomelement.h
|
163
|
+
- ext/mathematical/lsmmathmlpresentationcontainer.c
|
164
|
+
- ext/mathematical/lsmmathmlpresentationcontainer.h
|
165
|
+
- ext/mathematical/lsmmathmlpresentationtoken.c
|
166
|
+
- ext/mathematical/lsmmathmlpresentationtoken.h
|
167
|
+
- ext/mathematical/lsmmathmlradicalelement.c
|
168
|
+
- ext/mathematical/lsmmathmlradicalelement.h
|
169
|
+
- ext/mathematical/lsmmathmlrowelement.c
|
170
|
+
- ext/mathematical/lsmmathmlrowelement.h
|
171
|
+
- ext/mathematical/lsmmathmlscriptelement.c
|
172
|
+
- ext/mathematical/lsmmathmlscriptelement.h
|
173
|
+
- ext/mathematical/lsmmathmlsemanticselement.c
|
174
|
+
- ext/mathematical/lsmmathmlsemanticselement.h
|
175
|
+
- ext/mathematical/lsmmathmlspaceelement.c
|
176
|
+
- ext/mathematical/lsmmathmlspaceelement.h
|
177
|
+
- ext/mathematical/lsmmathmlstringelement.c
|
178
|
+
- ext/mathematical/lsmmathmlstringelement.h
|
179
|
+
- ext/mathematical/lsmmathmlstyle.c
|
180
|
+
- ext/mathematical/lsmmathmlstyle.h
|
181
|
+
- ext/mathematical/lsmmathmlstyleelement.c
|
182
|
+
- ext/mathematical/lsmmathmlstyleelement.h
|
183
|
+
- ext/mathematical/lsmmathmltablecellelement.c
|
184
|
+
- ext/mathematical/lsmmathmltablecellelement.h
|
185
|
+
- ext/mathematical/lsmmathmltableelement.c
|
186
|
+
- ext/mathematical/lsmmathmltableelement.h
|
187
|
+
- ext/mathematical/lsmmathmltablerowelement.c
|
188
|
+
- ext/mathematical/lsmmathmltablerowelement.h
|
189
|
+
- ext/mathematical/lsmmathmltraits.c
|
190
|
+
- ext/mathematical/lsmmathmltraits.h
|
191
|
+
- ext/mathematical/lsmmathmltypes.h
|
192
|
+
- ext/mathematical/lsmmathmlunderoverelement.c
|
193
|
+
- ext/mathematical/lsmmathmlunderoverelement.h
|
194
|
+
- ext/mathematical/lsmmathmlutils.c
|
195
|
+
- ext/mathematical/lsmmathmlutils.h
|
196
|
+
- ext/mathematical/lsmmathmlview.c
|
197
|
+
- ext/mathematical/lsmmathmlview.h
|
198
|
+
- ext/mathematical/lsmproperties.c
|
199
|
+
- ext/mathematical/lsmproperties.h
|
200
|
+
- ext/mathematical/lsmstr.c
|
201
|
+
- ext/mathematical/lsmstr.h
|
202
|
+
- ext/mathematical/lsmsvg.h
|
203
|
+
- ext/mathematical/lsmsvgaelement.c
|
204
|
+
- ext/mathematical/lsmsvgaelement.h
|
205
|
+
- ext/mathematical/lsmsvgattributes.h
|
206
|
+
- ext/mathematical/lsmsvgcircleelement.c
|
207
|
+
- ext/mathematical/lsmsvgcircleelement.h
|
208
|
+
- ext/mathematical/lsmsvgclippathelement.c
|
209
|
+
- ext/mathematical/lsmsvgclippathelement.h
|
210
|
+
- ext/mathematical/lsmsvgcolors.c
|
211
|
+
- ext/mathematical/lsmsvgcolors.h
|
212
|
+
- ext/mathematical/lsmsvgdefselement.c
|
213
|
+
- ext/mathematical/lsmsvgdefselement.h
|
214
|
+
- ext/mathematical/lsmsvgdocument.c
|
215
|
+
- ext/mathematical/lsmsvgdocument.h
|
216
|
+
- ext/mathematical/lsmsvgelement.c
|
217
|
+
- ext/mathematical/lsmsvgelement.h
|
218
|
+
- ext/mathematical/lsmsvgellipseelement.c
|
219
|
+
- ext/mathematical/lsmsvgellipseelement.h
|
220
|
+
- ext/mathematical/lsmsvgenums.c
|
221
|
+
- ext/mathematical/lsmsvgenums.h
|
222
|
+
- ext/mathematical/lsmsvgenumtypes.c
|
223
|
+
- ext/mathematical/lsmsvgenumtypes.h
|
224
|
+
- ext/mathematical/lsmsvgfilterblend.c
|
225
|
+
- ext/mathematical/lsmsvgfilterblend.h
|
226
|
+
- ext/mathematical/lsmsvgfiltercomposite.c
|
227
|
+
- ext/mathematical/lsmsvgfiltercomposite.h
|
228
|
+
- ext/mathematical/lsmsvgfilterelement.c
|
229
|
+
- ext/mathematical/lsmsvgfilterelement.h
|
230
|
+
- ext/mathematical/lsmsvgfilterflood.c
|
231
|
+
- ext/mathematical/lsmsvgfilterflood.h
|
232
|
+
- ext/mathematical/lsmsvgfiltergaussianblur.c
|
233
|
+
- ext/mathematical/lsmsvgfiltergaussianblur.h
|
234
|
+
- ext/mathematical/lsmsvgfiltermerge.c
|
235
|
+
- ext/mathematical/lsmsvgfiltermerge.h
|
236
|
+
- ext/mathematical/lsmsvgfiltermergenode.c
|
237
|
+
- ext/mathematical/lsmsvgfiltermergenode.h
|
238
|
+
- ext/mathematical/lsmsvgfilteroffset.c
|
239
|
+
- ext/mathematical/lsmsvgfilteroffset.h
|
240
|
+
- ext/mathematical/lsmsvgfilterprimitive.c
|
241
|
+
- ext/mathematical/lsmsvgfilterprimitive.h
|
242
|
+
- ext/mathematical/lsmsvgfilterspecularlighting.c
|
243
|
+
- ext/mathematical/lsmsvgfilterspecularlighting.h
|
244
|
+
- ext/mathematical/lsmsvgfiltersurface.c
|
245
|
+
- ext/mathematical/lsmsvgfiltersurface.h
|
246
|
+
- ext/mathematical/lsmsvgfiltertile.c
|
247
|
+
- ext/mathematical/lsmsvgfiltertile.h
|
248
|
+
- ext/mathematical/lsmsvggelement.c
|
249
|
+
- ext/mathematical/lsmsvggelement.h
|
250
|
+
- ext/mathematical/lsmsvggradientelement.c
|
251
|
+
- ext/mathematical/lsmsvggradientelement.h
|
252
|
+
- ext/mathematical/lsmsvgimageelement.c
|
253
|
+
- ext/mathematical/lsmsvgimageelement.h
|
254
|
+
- ext/mathematical/lsmsvglength.c
|
255
|
+
- ext/mathematical/lsmsvglength.h
|
256
|
+
- ext/mathematical/lsmsvglineargradientelement.c
|
257
|
+
- ext/mathematical/lsmsvglineargradientelement.h
|
258
|
+
- ext/mathematical/lsmsvglineelement.c
|
259
|
+
- ext/mathematical/lsmsvglineelement.h
|
260
|
+
- ext/mathematical/lsmsvgmarkerelement.c
|
261
|
+
- ext/mathematical/lsmsvgmarkerelement.h
|
262
|
+
- ext/mathematical/lsmsvgmaskelement.c
|
263
|
+
- ext/mathematical/lsmsvgmaskelement.h
|
264
|
+
- ext/mathematical/lsmsvgmatrix.c
|
265
|
+
- ext/mathematical/lsmsvgmatrix.h
|
266
|
+
- ext/mathematical/lsmsvgpathelement.c
|
267
|
+
- ext/mathematical/lsmsvgpathelement.h
|
268
|
+
- ext/mathematical/lsmsvgpatternelement.c
|
269
|
+
- ext/mathematical/lsmsvgpatternelement.h
|
270
|
+
- ext/mathematical/lsmsvgpolygonelement.c
|
271
|
+
- ext/mathematical/lsmsvgpolygonelement.h
|
272
|
+
- ext/mathematical/lsmsvgpolylineelement.c
|
273
|
+
- ext/mathematical/lsmsvgpolylineelement.h
|
274
|
+
- ext/mathematical/lsmsvgradialgradientelement.c
|
275
|
+
- ext/mathematical/lsmsvgradialgradientelement.h
|
276
|
+
- ext/mathematical/lsmsvgrectelement.c
|
277
|
+
- ext/mathematical/lsmsvgrectelement.h
|
278
|
+
- ext/mathematical/lsmsvgstopelement.c
|
279
|
+
- ext/mathematical/lsmsvgstopelement.h
|
280
|
+
- ext/mathematical/lsmsvgstyle.c
|
281
|
+
- ext/mathematical/lsmsvgstyle.h
|
282
|
+
- ext/mathematical/lsmsvgsvgelement.c
|
283
|
+
- ext/mathematical/lsmsvgsvgelement.h
|
284
|
+
- ext/mathematical/lsmsvgswitchelement.c
|
285
|
+
- ext/mathematical/lsmsvgswitchelement.h
|
286
|
+
- ext/mathematical/lsmsvgsymbolelement.c
|
287
|
+
- ext/mathematical/lsmsvgsymbolelement.h
|
288
|
+
- ext/mathematical/lsmsvgtextelement.c
|
289
|
+
- ext/mathematical/lsmsvgtextelement.h
|
290
|
+
- ext/mathematical/lsmsvgtraits.c
|
291
|
+
- ext/mathematical/lsmsvgtraits.h
|
292
|
+
- ext/mathematical/lsmsvgtransformable.c
|
293
|
+
- ext/mathematical/lsmsvgtransformable.h
|
294
|
+
- ext/mathematical/lsmsvgtspanelement.c
|
295
|
+
- ext/mathematical/lsmsvgtspanelement.h
|
296
|
+
- ext/mathematical/lsmsvgtypes.h
|
297
|
+
- ext/mathematical/lsmsvguseelement.c
|
298
|
+
- ext/mathematical/lsmsvguseelement.h
|
299
|
+
- ext/mathematical/lsmsvgview.c
|
300
|
+
- ext/mathematical/lsmsvgview.h
|
301
|
+
- ext/mathematical/lsmtraits.c
|
302
|
+
- ext/mathematical/lsmtraits.h
|
303
|
+
- ext/mathematical/lsmtypes.h
|
304
|
+
- ext/mathematical/lsmutils.c
|
305
|
+
- ext/mathematical/lsmutils.h
|
306
|
+
- ext/mathematical/mathematical.c
|
307
|
+
- ext/mathematical/y.tab.c
|
308
|
+
- ext/mathematical/y.tab.h
|
82
309
|
- lib/mathematical.rb
|
83
|
-
- lib/mathematical/mathematical.bundle
|
84
310
|
- lib/mathematical/render.rb
|
85
311
|
- lib/mathematical/version.rb
|
86
312
|
- mathematical.gemspec
|
313
|
+
- test/mathematical/basic_test.rb
|
314
|
+
- test/mathematical/fixtures/after/brackets_display.html
|
315
|
+
- test/mathematical/fixtures/after/compliance_accents.html
|
316
|
+
- test/mathematical/fixtures/after/compliance_arrows.html
|
317
|
+
- test/mathematical/fixtures/after/compliance_colors.html
|
318
|
+
- test/mathematical/fixtures/after/compliance_greek_letters.html
|
319
|
+
- test/mathematical/fixtures/after/compliance_large_math.html
|
320
|
+
- test/mathematical/fixtures/after/compliance_log_symbols.html
|
321
|
+
- test/mathematical/fixtures/after/compliance_operators.html
|
322
|
+
- test/mathematical/fixtures/after/dollar_sign_inline.html
|
323
|
+
- test/mathematical/fixtures/after/equation_display.html
|
324
|
+
- test/mathematical/fixtures/after/multiple_dollar_inline.html
|
325
|
+
- test/mathematical/fixtures/after/parens_inline.html
|
326
|
+
- test/mathematical/fixtures/before/brackets_display.text
|
327
|
+
- test/mathematical/fixtures/before/compliance_accents.text
|
328
|
+
- test/mathematical/fixtures/before/compliance_arrows.text
|
329
|
+
- test/mathematical/fixtures/before/compliance_colors.text
|
330
|
+
- test/mathematical/fixtures/before/compliance_greek_letters.text
|
331
|
+
- test/mathematical/fixtures/before/compliance_large_math.text
|
332
|
+
- test/mathematical/fixtures/before/compliance_log_symbols.text
|
333
|
+
- test/mathematical/fixtures/before/compliance_operators.text
|
334
|
+
- test/mathematical/fixtures/before/dollar_sign_inline.text
|
335
|
+
- test/mathematical/fixtures/before/equation_display.text
|
336
|
+
- test/mathematical/fixtures/before/multiple_dollar_inline.text
|
337
|
+
- test/mathematical/fixtures/before/parens_inline.text
|
338
|
+
- test/mathematical/fixtures/performance/big_file.text
|
339
|
+
- test/mathematical/fixtures_test.rb
|
340
|
+
- test/mathematical/maliciousness_test.rb
|
341
|
+
- test/mathematical/performance_test.rb
|
342
|
+
- test/test_helper.rb
|
87
343
|
homepage: https://github.com/gjtorikian/mathematical
|
88
344
|
licenses:
|
89
345
|
- MIT
|
@@ -92,6 +348,7 @@ post_install_message:
|
|
92
348
|
rdoc_options: []
|
93
349
|
require_paths:
|
94
350
|
- lib
|
351
|
+
- ext
|
95
352
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
353
|
requirements:
|
97
354
|
- - ">="
|
@@ -108,4 +365,34 @@ rubygems_version: 2.2.2
|
|
108
365
|
signing_key:
|
109
366
|
specification_version: 4
|
110
367
|
summary: Quickly convert math equations into beautiful SVGs.
|
111
|
-
test_files:
|
368
|
+
test_files:
|
369
|
+
- test/mathematical/basic_test.rb
|
370
|
+
- test/mathematical/fixtures/after/brackets_display.html
|
371
|
+
- test/mathematical/fixtures/after/compliance_accents.html
|
372
|
+
- test/mathematical/fixtures/after/compliance_arrows.html
|
373
|
+
- test/mathematical/fixtures/after/compliance_colors.html
|
374
|
+
- test/mathematical/fixtures/after/compliance_greek_letters.html
|
375
|
+
- test/mathematical/fixtures/after/compliance_large_math.html
|
376
|
+
- test/mathematical/fixtures/after/compliance_log_symbols.html
|
377
|
+
- test/mathematical/fixtures/after/compliance_operators.html
|
378
|
+
- test/mathematical/fixtures/after/dollar_sign_inline.html
|
379
|
+
- test/mathematical/fixtures/after/equation_display.html
|
380
|
+
- test/mathematical/fixtures/after/multiple_dollar_inline.html
|
381
|
+
- test/mathematical/fixtures/after/parens_inline.html
|
382
|
+
- test/mathematical/fixtures/before/brackets_display.text
|
383
|
+
- test/mathematical/fixtures/before/compliance_accents.text
|
384
|
+
- test/mathematical/fixtures/before/compliance_arrows.text
|
385
|
+
- test/mathematical/fixtures/before/compliance_colors.text
|
386
|
+
- test/mathematical/fixtures/before/compliance_greek_letters.text
|
387
|
+
- test/mathematical/fixtures/before/compliance_large_math.text
|
388
|
+
- test/mathematical/fixtures/before/compliance_log_symbols.text
|
389
|
+
- test/mathematical/fixtures/before/compliance_operators.text
|
390
|
+
- test/mathematical/fixtures/before/dollar_sign_inline.text
|
391
|
+
- test/mathematical/fixtures/before/equation_display.text
|
392
|
+
- test/mathematical/fixtures/before/multiple_dollar_inline.text
|
393
|
+
- test/mathematical/fixtures/before/parens_inline.text
|
394
|
+
- test/mathematical/fixtures/performance/big_file.text
|
395
|
+
- test/mathematical/fixtures_test.rb
|
396
|
+
- test/mathematical/maliciousness_test.rb
|
397
|
+
- test/mathematical/performance_test.rb
|
398
|
+
- test/test_helper.rb
|