latexmath 1.0.0 → 1.0.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/CHANGELOG.md +34 -0
- data/README.adoc +5 -1
- data/artifacts/latex.bindings.python.json +1 -1
- data/artifacts/latex.bindings.rs.json +1 -1
- data/artifacts/latex.bindings.ruby.json +1 -1
- data/artifacts/latex.bindings.ts.json +1 -1
- data/artifacts/latex.checksums.txt +14 -14
- data/artifacts/latex.json +1 -1
- data/docs/latex.adoc +289 -0
- data/docs/testsuite-pin.adoc +20 -5
- data/grammars/latex.wrappers.json +1 -1
- data/lib/latexmath/model/nodes.rb +4 -2
- data/lib/latexmath/model.rb +24 -9
- data/lib/latexmath/parser/engine.rb +3 -0
- data/lib/latexmath/version.rb +1 -1
- data/model/latex.lml.checksums.txt +2 -2
- data/model/latex.lml.json +8 -0
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8395cc96bcf0986c8525fce4700f95a79435c79b083fee7ae3ee3a31ebba4e7
|
|
4
|
+
data.tar.gz: 266071c58b2f60c67ec458fbfc80aae0c01ea7bbdac0ecb857e9b30436034453
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a85526463d3d10a43aa69e2d6a2ba3aeddb5b44e0922a7d78abea5b8be71365043691f1d8fc173b545185bd0609874e2a4de1d0583f8165f106ab1e520f8ddcf
|
|
7
|
+
data.tar.gz: d02d62dc2a77c975b4d551e19e8e55eb53f447a61b28a65b664506140802fb2544145bc38e34608810b9a6fbf5b4ef68ba94f5db71feac6e02018bf5e458549a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.0 (unreleased)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- The grammar reads the `cases` environment (`\begin{cases} ... \end{cases}`)
|
|
8
|
+
like the other environments. Before, it was refused.
|
|
9
|
+
- `Latexmath::Model::MathSymbol` carries `value` and `kind` as model
|
|
10
|
+
attributes, so they appear in the LML export (`model/latex.lml.json`)
|
|
11
|
+
as well as on the object. Before, they were only methods and the export
|
|
12
|
+
had only `spelling`. (#58)
|
|
13
|
+
- `docs/latex.adoc` describes the LaTeX math the grammar accepts and which
|
|
14
|
+
model class each construct becomes. The README links to it. (#62)
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Parsanol 1.3.134 or later is required (still within `~> 1.3`). (#59)
|
|
19
|
+
- The pinned testsuite replay in CI runs on Windows and macOS as well as
|
|
20
|
+
Linux. (#60)
|
|
21
|
+
- The testsuite pin moves to latex generation 3, which adds typed-model
|
|
22
|
+
rows beside the raw-tree rows. The replay still compares the raw-tree
|
|
23
|
+
rows. (#61)
|
|
24
|
+
- The pinned testsuite replay (`scripts/replay_corpus.rb`) also replays
|
|
25
|
+
the typed-model rows, through `Latexmath.parse` on both engines. A
|
|
26
|
+
derived attribute that a row does not record, such as `MathSymbol#value`
|
|
27
|
+
and `#kind` in the generation 3 rows, is left out of the comparison and
|
|
28
|
+
listed in the report.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- With `engine: :auto`, input that hits the native engine's recursion limit
|
|
33
|
+
under Parsanol 1.3.134 is parsed again on the Ruby engine instead of
|
|
34
|
+
being reported as a parse error. With `engine: :native` it raises
|
|
35
|
+
`Latexmath::NestingTooDeep`. (#59)
|
|
36
|
+
|
|
3
37
|
## 1.0.0
|
|
4
38
|
|
|
5
39
|
Latexmath is now a LaTeX math parser that returns a typed model, built for
|
data/README.adoc
CHANGED
|
@@ -79,6 +79,9 @@ The rules for each model class are in link:docs/model-contract.adoc[the
|
|
|
79
79
|
model contract], and the accepted syntax and the preprocessing of the input
|
|
80
80
|
in link:docs/parser-contract.adoc[the parser contract].
|
|
81
81
|
|
|
82
|
+
For a description of the LaTeX notation the gem reads and the model each
|
|
83
|
+
construct becomes, see link:docs/latex.adoc[LaTeX notation].
|
|
84
|
+
|
|
82
85
|
== Errors
|
|
83
86
|
|
|
84
87
|
Input that is not valid LaTeX math raises `Latexmath::ParseError`, which
|
|
@@ -126,7 +129,8 @@ The LaTeX cases of
|
|
|
126
129
|
https://github.com/plurimath/plurimath-testsuite[plurimath-testsuite] are
|
|
127
130
|
kept there as numbered, immutable generations. `spec/fixtures/testsuite-pin.yml`
|
|
128
131
|
names the exact commit, generation and digest this gem is tested against, and
|
|
129
|
-
CI replays every raw-tree row of that generation on both
|
|
132
|
+
CI replays every raw-tree and typed-model row of that generation on both
|
|
133
|
+
engines. CI also
|
|
130
134
|
compares the parse tree with the one the pinned Plurimath release produces
|
|
131
135
|
for every LaTeX case of the testsuite. See
|
|
132
136
|
link:docs/testsuite-pin.adoc[the testsuite pin].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"python","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"python","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"a1025ab6e3570568d70bc823e9e61b50da484ecbf203eb318837578954300a44","shape":"parsanol-tree/v2","entries":{"dot":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"comma":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"arabic":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:18cdbd69e1b2851fc9b99ff4581b8a7ae8173118ed7c3eab54ac4e1fb934ca66"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"rs","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"rs","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"a1025ab6e3570568d70bc823e9e61b50da484ecbf203eb318837578954300a44","shape":"parsanol-tree/v2","entries":{"dot":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"comma":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"arabic":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:e2d457b6fb8c72d2668590e1929234947b60449bced3d6bc124520d162bace19"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"ruby","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"ruby","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"a1025ab6e3570568d70bc823e9e61b50da484ecbf203eb318837578954300a44","shape":"parsanol-tree/v2","entries":{"dot":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"comma":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"arabic":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:9cc621387823f0329df6958a7c614a53118b5886a3c19d2044c07a4c5f38f812"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"artifact_kind":"parg-bindings","target":"ts","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"
|
|
1
|
+
{"artifact_kind":"parg-bindings","target":"ts","binding_version":1,"grammar":"Latex","grammar_version":"0.1.0","grammar_source_hash":"a1025ab6e3570568d70bc823e9e61b50da484ecbf203eb318837578954300a44","shape":"parsanol-tree/v2","entries":{"dot":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"comma":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]},"arabic":{"bindings":[{"capture":"latex_tree","path":"latex_tree","type":"raw","card":null,"preprocess":null},{"capture":"latex_tree","path":"model","type":"any","card":null,"preprocess":null}]}},"checksum":"sha256:68697cec37aed894d65dd1afcbaf0848475be69bcbc4f5c5aa8861e411cc3337"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Written by scripts/compile.rb. Envelope checksums are Parsanol's own;
|
|
2
2
|
# the sha256 lines are of the files' bytes.
|
|
3
|
-
artifact_checksum sha256:
|
|
4
|
-
compiler_version 1.3.
|
|
3
|
+
artifact_checksum sha256:b582338f5f0575aca6a9d42d862d4fe63c4b3762ecb1c2f052a8b9093972ae8d
|
|
4
|
+
compiler_version 1.3.134
|
|
5
5
|
edition 2
|
|
6
|
-
source_hash sha256:
|
|
7
|
-
artifacts/latex.json sha256:
|
|
8
|
-
bindings ruby checksum sha256:
|
|
9
|
-
artifacts/latex.bindings.ruby.json sha256:
|
|
10
|
-
bindings rs checksum sha256:
|
|
11
|
-
artifacts/latex.bindings.rs.json sha256:
|
|
12
|
-
bindings ts checksum sha256:
|
|
13
|
-
artifacts/latex.bindings.ts.json sha256:
|
|
14
|
-
bindings python checksum sha256:
|
|
15
|
-
artifacts/latex.bindings.python.json sha256:
|
|
16
|
-
grammars/latex.parg sha256:
|
|
17
|
-
data/latex-atoms.json sha256:
|
|
6
|
+
source_hash sha256:a1025ab6e3570568d70bc823e9e61b50da484ecbf203eb318837578954300a44
|
|
7
|
+
artifacts/latex.json sha256:2e8e17ce8490211ea6d78c6bb55ff7125a47b3537211b72c1bb7677432c7e5b3
|
|
8
|
+
bindings ruby checksum sha256:9cc621387823f0329df6958a7c614a53118b5886a3c19d2044c07a4c5f38f812
|
|
9
|
+
artifacts/latex.bindings.ruby.json sha256:1d95cf3775dd0e28c5b6b58da70044e217f656276e4af95ed9940f3d05aed799
|
|
10
|
+
bindings rs checksum sha256:e2d457b6fb8c72d2668590e1929234947b60449bced3d6bc124520d162bace19
|
|
11
|
+
artifacts/latex.bindings.rs.json sha256:7b034b2e1c25b68fde1b4c13899e29429b31411bc969268fce1d85beb2e7033d
|
|
12
|
+
bindings ts checksum sha256:68697cec37aed894d65dd1afcbaf0848475be69bcbc4f5c5aa8861e411cc3337
|
|
13
|
+
artifacts/latex.bindings.ts.json sha256:d5ab0691054d83b53022f58fcb6d5e39b0381113d1b12b5a9c23b0f0a9f5bd93
|
|
14
|
+
bindings python checksum sha256:18cdbd69e1b2851fc9b99ff4581b8a7ae8173118ed7c3eab54ac4e1fb934ca66
|
|
15
|
+
artifacts/latex.bindings.python.json sha256:49ece376dd5639731a2ce62aac8c5e45ec0edc77ebb65261b4cffa9478dad436
|
|
16
|
+
grammars/latex.parg sha256:a1025ab6e3570568d70bc823e9e61b50da484ecbf203eb318837578954300a44
|
|
17
|
+
data/latex-atoms.json sha256:69d1f126bde8c781324c55dfe5b26c2a1abd558914a3cbfa92c737436fc828e5
|
|
18
18
|
entries dot comma arabic
|
|
19
19
|
order_warnings 31906
|