latexmath 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/latexmath/converter.rb +1 -1
- data/lib/latexmath/tokenizer.rb +7 -4
- data/lib/latexmath/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81fc79f8e8badb13f6f9a8010b81fa23cc6d610ecb2f5b61d88c5c4ef2c48e52
|
4
|
+
data.tar.gz: adc01e90660d4b963a5ed955bc10e5972a399b37a94fd72eed607c48bd5cc5fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cd75a8fcf7e4eac4cf4b29fffa12ac0d75f178c9e3307e4f8b5d31dc993bc903ceefda271c747e9206f081fc7c62cd0ddb3b28c480e40e7f0cbc85bd06dc814
|
7
|
+
data.tar.gz: 19714d6f9fdfbdd5c1bb90764ae4c7590e386b895042b27f671bb306137f03efa133ac2e37edd63cfd680e08b1edfed9fdee1446922f5fa2eeef8f89b1e71e75
|
data/Gemfile.lock
CHANGED
data/lib/latexmath/converter.rb
CHANGED
data/lib/latexmath/tokenizer.rb
CHANGED
@@ -9,6 +9,11 @@ module Latexmath
|
|
9
9
|
exp << token
|
10
10
|
end
|
11
11
|
|
12
|
+
if exp.first == '\[' && exp.last == '\]'
|
13
|
+
exp.pop
|
14
|
+
exp.shift
|
15
|
+
end
|
16
|
+
|
12
17
|
exp
|
13
18
|
end
|
14
19
|
|
@@ -24,10 +29,8 @@ module Latexmath
|
|
24
29
|
end
|
25
30
|
elsif scan(/{\\bf [^}]+}/)
|
26
31
|
matches = matched.match(/{\\bf ([^}]+)}/)
|
27
|
-
symbol = "\\mathbf{#{matches[1]}}"
|
28
|
-
if
|
29
|
-
"&#x#{Latexmath::Symbol.get(symbol)};"
|
30
|
-
end
|
32
|
+
symbol = Latexmath::Symbol.get("\\mathbf{#{matches[1]}}")
|
33
|
+
"&#x#{symbol};" if symbol
|
31
34
|
elsif scan(/\\\\\[\d+mm\]/)
|
32
35
|
'\\\\' # matched
|
33
36
|
elsif scan(/\\mbox{[^\}]+}/)
|
data/lib/latexmath/version.rb
CHANGED