mathtype_to_mathml_plus 0.0.8 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0d7a2cafb7ebf7215d919139933493434e2adbb28eef0e1b5454147246217fe
4
- data.tar.gz: 7171abda1cc4e10bd2d3183e00885048eaee2e39d0a3640b29e74b01e0e50608
3
+ metadata.gz: 67f28b4614c6ea1668d0f0cbd40e39b42271c38ffee8d0d6a68640313afaff01
4
+ data.tar.gz: e743c7cbd14fcda8239f6c64e09ba56870402f50e386e3e607382ceada2b6a64
5
5
  SHA512:
6
- metadata.gz: ddc97e1f19c6db5e1112d875270a40c2d26954b7d393c7f65bfbbc860fe2863c0dcb7e151135878c25a59aaded99ae437b364403b257baad18cf5e0b5c85da2e
7
- data.tar.gz: 3e44ee439201b4da295c4bf106a86b8de494b0dae91723fa9f62c78c5450f2ec2368ece0551fd0cd879d6c87becc64349fb029ac04737b8e42f4a6fe09cef8dc
6
+ metadata.gz: 4015d2219c1ffc8f075609fbe0d21b5f960ab8db17a1779859420c4e52016126fc78d191cdcc2ad935e93402a6bd6a12df8ba1bf5321d35e4bdec5910d6b3eeb
7
+ data.tar.gz: a38e176f9e15b8c55d27ab148e59b24671b7b9a6b2246a5e84c7b99d32319b508ad4bb2325ae5bf7795fde47cb8c7703b987e724d26ef3212ff5d64a4f944051
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MathTypeToMathML
1
+ # MathTypeToMathMLPlus
2
2
 
3
3
  This gem can be used to convert MathType equations from a binary format (e.g. embedded in Word documents) to an open MathML representation. It achieves that in several stages, first using the [`mathtype`](https://github.com/jure/mathtype) gem to convert from a binary to an XML form of MTEF, and second, using XSLTs to convert XML to MathML.
4
4
 
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
  To convert a MathType equation embedded in a Word document (the file is usually named something like `oleObject1.bin`):
24
24
 
25
25
  ```
26
- mathml = MathTypeToMathML::Converter.new(`oleObject1.bin`).convert
26
+ mathml = MathTypeToMathMLPlus::Converter.new(`oleObject1.bin`).convert
27
27
  ```
28
28
 
29
29
  This will return a MathML string of the MathType equation.
@@ -9,7 +9,7 @@ require "nokogiri"
9
9
 
10
10
 
11
11
 
12
- module MathTypeToMathML
12
+ module MathTypeToMathMLPlus
13
13
  class CharReplacer
14
14
  UNSUPPORTED = "Unsupported (Char)"
15
15
 
@@ -20,7 +20,7 @@ require "nokogiri"
20
20
  # Additionally, Mover inverts <emb>ellishments from <char><emb></emb></char> to
21
21
  # <emb><char></char></emb>.
22
22
 
23
- module MathTypeToMathML
23
+ module MathTypeToMathMLPlus
24
24
  class Mover
25
25
  attr_reader :mathtype
26
26
  attr_accessor :last_preceding_siblings
@@ -1,3 +1,3 @@
1
- module MathTypeToMathML
2
- VERSION = "0.0.8"
1
+ module MathTypeToMathMLPlus
2
+ VERSION = "0.0.9"
3
3
  end
@@ -4,7 +4,7 @@ require "mathtype"
4
4
  require_relative "mathtype_to_mathml/mover"
5
5
  require_relative "mathtype_to_mathml/char_replacer"
6
6
 
7
- module MathTypeToMathML
7
+ module MathTypeToMathMLPlus
8
8
  class Converter
9
9
  def initialize(mathtype)
10
10
  @xslt = Nokogiri::XSLT(File.open(path_to_xslt))
@@ -5,7 +5,7 @@ require 'mathtype_to_mathml/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "mathtype_to_mathml_plus"
8
- spec.version = MathTypeToMathML::VERSION
8
+ spec.version = MathTypeToMathMLPlus::VERSION
9
9
  spec.authors = ["Jure Triglav"]
10
10
  spec.email = ["juretriglav@gmail.com"]
11
11
  spec.summary = %q{Converts from a binary MathType format (MTEF) to MathML.}
data/spec/html_output.rb CHANGED
@@ -10,7 +10,7 @@ builder = Nokogiri::HTML::Builder.new do |html|
10
10
  div.h3 equation
11
11
  div.p "Output", "style" => "text-align: center;"
12
12
  div.p do |p|
13
- p << MathTypeToMathML::Converter.new(equation).convert
13
+ p << MathTypeToMathMLPlus::Converter.new(equation).convert
14
14
  end
15
15
  expected_xml = "#{File.basename(equation, ".*")}.xml"
16
16
  expected = File.open("spec/fixtures/expected/" + expected_xml).read
@@ -1,13 +1,13 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe MathTypeToMathML do
3
+ RSpec.describe MathTypeToMathMLPlus do
4
4
  it 'has a version number' do
5
- expect(MathTypeToMathML::VERSION).not_to be nil
5
+ expect(MathTypeToMathMLPlus::VERSION).not_to be nil
6
6
  end
7
7
 
8
8
  Dir.glob("spec/fixtures/input/*.bin") do |equation|
9
9
  it "converted #{equation} matches expected output" do
10
- xml = MathTypeToMathML::Converter.new(equation).convert
10
+ xml = MathTypeToMathMLPlus::Converter.new(equation).convert
11
11
  expected_xml = "#{File.basename(equation, ".*")}.xml"
12
12
  expected = File.open("spec/fixtures/expected/" + expected_xml).read
13
13
  expect(xml).to be_equivalent_to(expected)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mathtype_to_mathml_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jure Triglav