mathematical 1.7.0 → 1.7.2
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/README.md +10 -2
- data/Rakefile +3 -3
- data/ext/README.md +0 -5
- data/ext/mathematical/extconf.rb +36 -2
- data/lib/mathematical/version.rb +1 -1
- data/lib/mathematical.rb +1 -1
- data/mathematical.gemspec +1 -6
- metadata +14 -70
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 761c6bfc79f5f9ed0a9296a72bb95aabd19dae4a2a1a8b1ce65cabe6c03a1a8f
|
|
4
|
+
data.tar.gz: d49d2840ee8c202e813b365f22fd363ce0d8f456b39f7372219abf96be1d9b4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82d88cb1b9273fed6d42c225b088cd615536d49b411e3752c6c306a04b576d04b3014d682661b0b65a08915885bd997e83d2333fc6014b998ba001ddbb295061
|
|
7
|
+
data.tar.gz: 663cdcf21a032f4b0e2efc377b1d5e9037f861fdbddc99e4e6e77b392eae442b1c7192bff5327178040f8b7be1bf0b3004c55420a88eaa019f4a44d85b79db4b
|
data/README.md
CHANGED
|
@@ -128,11 +128,19 @@ Check out [SUPPORTED.md on the mtex2MML website](https://github.com/gjtorikian/m
|
|
|
128
128
|
|
|
129
129
|
## Building from source
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
This repo uses git submodules for `mtex2MML` and `lasem`. Clone with:
|
|
132
|
+
|
|
133
|
+
$ git clone --recurse-submodules https://github.com/gjtorikian/mathematical.git
|
|
134
|
+
|
|
135
|
+
If you already cloned without `--recurse-submodules`, run this from the repo root:
|
|
136
|
+
|
|
137
|
+
$ git submodule update --init --recursive
|
|
138
|
+
|
|
139
|
+
Then install the development dependencies for your platform:
|
|
132
140
|
|
|
133
141
|
**Linux (Debian/Ubuntu):**
|
|
134
142
|
|
|
135
|
-
$ sudo apt-get install cmake bison flex pkg-config libglib2.0-dev libgdk-
|
|
143
|
+
$ sudo apt-get install cmake bison flex pkg-config libglib2.0-dev libgdk-pixbuf-2.0-dev libcairo2-dev libpango1.0-dev libxml2-dev
|
|
136
144
|
|
|
137
145
|
**macOS:**
|
|
138
146
|
|
data/Rakefile
CHANGED
|
@@ -21,18 +21,18 @@ CROSS_PLATFORMS = [
|
|
|
21
21
|
"x86_64-linux-musl",
|
|
22
22
|
"aarch64-linux-gnu",
|
|
23
23
|
"aarch64-linux-musl",
|
|
24
|
-
]
|
|
24
|
+
].freeze
|
|
25
25
|
|
|
26
26
|
NATIVE_PLATFORMS = [
|
|
27
27
|
"arm64-darwin",
|
|
28
28
|
"x86_64-darwin",
|
|
29
29
|
"x64-mingw-ucrt",
|
|
30
|
-
]
|
|
30
|
+
].freeze
|
|
31
31
|
|
|
32
32
|
ALL_PLATFORMS = CROSS_PLATFORMS + NATIVE_PLATFORMS
|
|
33
33
|
|
|
34
34
|
# Ruby versions to target for precompiled gems
|
|
35
|
-
CROSS_RUBIES = ["3.1.0", "3.2.0", "3.3.0", "3.4.0", "4.0.0"]
|
|
35
|
+
CROSS_RUBIES = ["3.1.0", "3.2.0", "3.3.0", "3.4.0", "4.0.0"].freeze
|
|
36
36
|
|
|
37
37
|
spec = Gem::Specification.load("mathematical.gemspec")
|
|
38
38
|
|
data/ext/README.md
CHANGED
|
@@ -10,11 +10,6 @@ Some documentation can be found here:
|
|
|
10
10
|
* http://blogs.gnome.org/emmanuel/category/lasem/
|
|
11
11
|
* https://git.gnome.org/browse/lasem/
|
|
12
12
|
|
|
13
|
-
### Notes on building for OS X
|
|
14
|
-
|
|
15
|
-
* In *autogen.sh*, rename `libtoolize` to `glibtoolize`
|
|
16
|
-
* Debug with `-d dom,measure,update,render,viewport`
|
|
17
|
-
|
|
18
13
|
* * *
|
|
19
14
|
|
|
20
15
|
mtex2MML transforms itex (a dialect of LaTeX) into MathML. mtex2MML is developed by
|
data/ext/mathematical/extconf.rb
CHANGED
|
@@ -76,6 +76,30 @@ MTEX2MML_BUILD_DIR = File.join(MTEX2MML_DIR, "build")
|
|
|
76
76
|
MTEX2MML_SRC_DIR = File.expand_path(File.join(MTEX2MML_DIR, "src"))
|
|
77
77
|
MTEX2MML_LIB_DIR = File.expand_path(File.join(File.dirname(__FILE__), "lib"))
|
|
78
78
|
|
|
79
|
+
# Friendly hint if the user cloned without `--recurse-submodules`. An
|
|
80
|
+
# uninitialized submodule shows up as an empty directory (or a dir with only
|
|
81
|
+
# a stray `.git` file).
|
|
82
|
+
{ "mtex2MML" => MTEX2MML_DIR, "lasem" => LASEM_DIR }.each do |name, dir|
|
|
83
|
+
next if name == "mtex2MML" && using_system_mtex2mml?
|
|
84
|
+
next if name == "lasem" && using_system_lasem?
|
|
85
|
+
|
|
86
|
+
entries = File.directory?(dir) ? (Dir.entries(dir) - [".", "..", ".git"]) : []
|
|
87
|
+
next unless entries.empty?
|
|
88
|
+
|
|
89
|
+
$stderr.puts <<~MSG
|
|
90
|
+
|
|
91
|
+
[ERROR]: ext/mathematical/#{name} is empty — this is a git submodule.
|
|
92
|
+
Run the following from the repo root and try again:
|
|
93
|
+
|
|
94
|
+
git submodule update --init --recursive
|
|
95
|
+
|
|
96
|
+
(Or pass --use-system-#{name == "mtex2MML" ? "mtex2MML" : "lasem"}
|
|
97
|
+
if you have it installed system-wide.)
|
|
98
|
+
|
|
99
|
+
MSG
|
|
100
|
+
exit 1
|
|
101
|
+
end
|
|
102
|
+
|
|
79
103
|
if OS == :macos
|
|
80
104
|
# Homebrew paths must come before X11 so we get newer versions of libs like cairo
|
|
81
105
|
homebrew_prefix = %x(brew --prefix 2>/dev/null).chomp
|
|
@@ -142,8 +166,8 @@ end
|
|
|
142
166
|
|
|
143
167
|
puts "*** Library work completed ***"
|
|
144
168
|
|
|
145
|
-
LIB_DIRS = [MTEX2MML_LIB_DIR, LASEM_LIB_DIR]
|
|
146
|
-
HEADER_DIRS = [MTEX2MML_SRC_DIR, LASEM_SRC_DIR]
|
|
169
|
+
LIB_DIRS = [MTEX2MML_LIB_DIR, LASEM_LIB_DIR].freeze
|
|
170
|
+
HEADER_DIRS = [MTEX2MML_SRC_DIR, LASEM_SRC_DIR].freeze
|
|
147
171
|
|
|
148
172
|
dir_config("mathematical", HEADER_DIRS, LIB_DIRS)
|
|
149
173
|
|
|
@@ -167,6 +191,16 @@ $LIBS << " #{pkg_libs}"
|
|
|
167
191
|
$LDFLAGS << " #{RPATH}" unless RPATH.empty?
|
|
168
192
|
$CFLAGS << " #{flag} #{%x(pkg-config --cflags glib-2.0 gdk-pixbuf-2.0 cairo pango).chomp}"
|
|
169
193
|
|
|
194
|
+
# On macOS, don't link libruby into the bundle. The bundle is loaded by an
|
|
195
|
+
# already-running Ruby process, so Ruby symbols resolve dynamically at load
|
|
196
|
+
# time. Linking libruby explicitly stamps the build host's libruby path
|
|
197
|
+
# (e.g. /Users/runner/hostedtoolcache/...) into the bundle's load commands,
|
|
198
|
+
# which can break the precompiled gem on other machines. See issue #146.
|
|
199
|
+
if OS == :macos
|
|
200
|
+
$LIBRUBYARG = $LIBRUBYARG_SHARED = $LIBRUBYARG_STATIC = ""
|
|
201
|
+
$LDFLAGS << " -Wl,-undefined,dynamic_lookup"
|
|
202
|
+
end
|
|
203
|
+
|
|
170
204
|
# fPIC is needed for linking static libs into the shared extension
|
|
171
205
|
$CFLAGS << " -fPIC" unless OS == :windows
|
|
172
206
|
|
data/lib/mathematical/version.rb
CHANGED
data/lib/mathematical.rb
CHANGED
data/mathematical.gemspec
CHANGED
|
@@ -24,11 +24,6 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.require_paths = ["lib"]
|
|
25
25
|
spec.extensions = ["ext/mathematical/extconf.rb"]
|
|
26
26
|
|
|
27
|
+
spec.add_dependency("base64")
|
|
27
28
|
spec.add_dependency("ruby-enum", ">= 0.4", "< 2.0")
|
|
28
|
-
|
|
29
|
-
spec.add_development_dependency("benchmark")
|
|
30
|
-
spec.add_development_dependency("math-to-itex", "~> 0.3")
|
|
31
|
-
spec.add_development_dependency("minitest", "~> 5.6")
|
|
32
|
-
spec.add_development_dependency("nokogiri", "~> 1.10")
|
|
33
|
-
spec.add_development_dependency("rake-compiler", "~> 1.2")
|
|
34
29
|
end
|
metadata
CHANGED
|
@@ -1,43 +1,23 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mathematical
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Garen Torikian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.4'
|
|
20
|
-
- - "<"
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: '2.0'
|
|
23
|
-
type: :runtime
|
|
24
|
-
prerelease: false
|
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
-
requirements:
|
|
27
|
-
- - ">="
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '0.4'
|
|
30
|
-
- - "<"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '2.0'
|
|
33
|
-
- !ruby/object:Gem::Dependency
|
|
34
|
-
name: benchmark
|
|
14
|
+
name: base64
|
|
35
15
|
requirement: !ruby/object:Gem::Requirement
|
|
36
16
|
requirements:
|
|
37
17
|
- - ">="
|
|
38
18
|
- !ruby/object:Gem::Version
|
|
39
19
|
version: '0'
|
|
40
|
-
type: :
|
|
20
|
+
type: :runtime
|
|
41
21
|
prerelease: false
|
|
42
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
23
|
requirements:
|
|
@@ -45,61 +25,25 @@ dependencies:
|
|
|
45
25
|
- !ruby/object:Gem::Version
|
|
46
26
|
version: '0'
|
|
47
27
|
- !ruby/object:Gem::Dependency
|
|
48
|
-
name:
|
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - "~>"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0.3'
|
|
54
|
-
type: :development
|
|
55
|
-
prerelease: false
|
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - "~>"
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0.3'
|
|
61
|
-
- !ruby/object:Gem::Dependency
|
|
62
|
-
name: minitest
|
|
28
|
+
name: ruby-enum
|
|
63
29
|
requirement: !ruby/object:Gem::Requirement
|
|
64
30
|
requirements:
|
|
65
|
-
- - "
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '5.6'
|
|
68
|
-
type: :development
|
|
69
|
-
prerelease: false
|
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - "~>"
|
|
31
|
+
- - ">="
|
|
73
32
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '
|
|
75
|
-
-
|
|
76
|
-
name: nokogiri
|
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - "~>"
|
|
33
|
+
version: '0.4'
|
|
34
|
+
- - "<"
|
|
80
35
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '
|
|
82
|
-
type: :
|
|
36
|
+
version: '2.0'
|
|
37
|
+
type: :runtime
|
|
83
38
|
prerelease: false
|
|
84
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
85
40
|
requirements:
|
|
86
|
-
- - "
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '1.10'
|
|
89
|
-
- !ruby/object:Gem::Dependency
|
|
90
|
-
name: rake-compiler
|
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - "~>"
|
|
41
|
+
- - ">="
|
|
94
42
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
96
|
-
|
|
97
|
-
prerelease: false
|
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
99
|
-
requirements:
|
|
100
|
-
- - "~>"
|
|
43
|
+
version: '0.4'
|
|
44
|
+
- - "<"
|
|
101
45
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '
|
|
46
|
+
version: '2.0'
|
|
103
47
|
description: A very fast way to turn TeX math equations into beautifully rendered
|
|
104
48
|
SVGs, to embed on the web. This library is mostly written in C and is a general
|
|
105
49
|
purpose wrapper to GNOME's Lasem.
|