metanorma-plugin-asciichem 0.1.2 → 0.1.4
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 +13 -1
- data/README.md +10 -0
- data/examples/pilot/aspirin.adoc +48 -0
- data/lib/metanorma/plugin/asciichem/version.rb +1 -1
- data/metanorma-plugin-asciichem.gemspec +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7813bcd17aeb298dc1d48636722de4525fd392c774d366bb31eb18c5d13fb7ce
|
|
4
|
+
data.tar.gz: 840dbf4d360c94b86888454a88b51408c94a12f619fda40f5d1d87dd98ddcaf4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e906bfa2ff839b97af0c235aa4a868b3e20ce16b9b061ce7652cf16f110a9e9dd60414038ebbb4236a00899d817179cdd72a6b25aef7ff66aab7ed7660fa82c9
|
|
7
|
+
data.tar.gz: 6945587ff2786be1424c1fca844af58461a4f2edb5cec0738d85def100d034c14d92c04d4468acc8b8ec4b956d9fece1c4039eb734df25405323503e7dec7f8f
|
data/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [0.1.4] - 2026-10-21
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Pilot document: `examples/pilot/aspirin.adoc` — aspirin end to end
|
|
9
|
+
through standoc (a `[chem]` block rendering as MathML plus an
|
|
10
|
+
`@cite` dataset bibitem), compiled in CI.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- README: pilot document section.
|
|
14
|
+
|
|
15
|
+
## [0.1.3] - 2026-10-19
|
|
6
16
|
|
|
7
17
|
### Changed
|
|
8
18
|
|
|
19
|
+
- `asciichem` floor raised to `~> 0.30`, `>= 0.30.1` (moxml-based XML layer, CML group round-trip fix) and validated: the plugin suite passes against asciichem 0.30.1 with moxml 0.5.146 (the release carrying the namespace-bound XPath fix, lutaml/moxml#398).
|
|
20
|
+
|
|
9
21
|
- Runtime dependencies slimmed: `asciidoctor` and `nokogiri` are
|
|
10
22
|
gone. The host provides asciidoctor (metanorma-standoc requires
|
|
11
23
|
and registers the gem); the one direct XML touchpoint (setting
|
data/README.md
CHANGED
|
@@ -129,6 +129,16 @@ constraint to `< 3` so asciichem and current metanorma gems
|
|
|
129
129
|
co-resolve in one bundle. Citation anchors read the emitted wire XML,
|
|
130
130
|
so both relaton-bib major lines (1.x and 2.x keyword nestings) work.
|
|
131
131
|
|
|
132
|
+
## Pilot document
|
|
133
|
+
|
|
134
|
+
`examples/pilot/aspirin.adoc` is a small ISO-flavoured Metanorma
|
|
135
|
+
document exercising the whole document layer: `[chem]` blocks render as
|
|
136
|
+
MathML stems, typed condition roles (`[cat: H_2SO_4]`) survive, and a
|
|
137
|
+
cited substance becomes a dataset bibitem anchored by InChIKey.
|
|
138
|
+
`spec/metanorma/plugin/asciichem/pilot_spec.rb` compiles it through
|
|
139
|
+
metanorma-standoc in CI (resolution is seeded from a recorded PubChem
|
|
140
|
+
record so the check is offline).
|
|
141
|
+
|
|
132
142
|
## Development
|
|
133
143
|
|
|
134
144
|
```sh
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
= Acetylsalicylic acid: synthesis and identity
|
|
2
|
+
:no-isobib:
|
|
3
|
+
:no-valid:
|
|
4
|
+
:asciichem-cache-dir: /tmp/asciichem-pilot-cache
|
|
5
|
+
|
|
6
|
+
== Scope
|
|
7
|
+
|
|
8
|
+
This pilot document exercises the AsciiChem document layer end to end:
|
|
9
|
+
`[chem]` blocks render as MathML formula stems, conditions carry typed
|
|
10
|
+
role entries, and a cited substance resolves to a dataset-type
|
|
11
|
+
bibliographic record anchored by InChIKey.
|
|
12
|
+
|
|
13
|
+
== Synthesis
|
|
14
|
+
|
|
15
|
+
Acetylsalicylic acid is prepared by O-acetylation of salicylic acid
|
|
16
|
+
with acetic anhydride: chem:C_7H_6O_3 + C_4H_6O_3 ->[cat: H_2SO_4] C_9H_8O_4 + C_2H_4O_2[].
|
|
17
|
+
|
|
18
|
+
[chem]
|
|
19
|
+
----
|
|
20
|
+
C_7H_6O_3 + C_4H_6O_3 ->[cat: H_2SO_4] C_9H_8O_4 + C_2H_4O_2
|
|
21
|
+
----
|
|
22
|
+
|
|
23
|
+
The product is the substance in <<sub-aspirin>>.
|
|
24
|
+
|
|
25
|
+
== Identity
|
|
26
|
+
|
|
27
|
+
[[sub-aspirin]]
|
|
28
|
+
=== Acetylsalicylic acid
|
|
29
|
+
|
|
30
|
+
[chem]
|
|
31
|
+
----
|
|
32
|
+
CC(=O)OC1=CC=CC=C1C(=O)O @name("aspirin") @cite("pubchem")
|
|
33
|
+
----
|
|
34
|
+
|
|
35
|
+
Its identity is machine-checkable: the InChIKey is the join key, and
|
|
36
|
+
the citation record names the source that asserted it.
|
|
37
|
+
|
|
38
|
+
== Conditions and roles
|
|
39
|
+
|
|
40
|
+
The catalyst is written as a typed condition role, so the above/below
|
|
41
|
+
convention is not needed to interpret it:
|
|
42
|
+
|
|
43
|
+
[chem]
|
|
44
|
+
----
|
|
45
|
+
C_7H_6O_3 + C_4H_6O_3 ->[cat: H_2SO_4; solv: none] C_9H_8O_4 + C_2H_4O_2
|
|
46
|
+
----
|
|
47
|
+
|
|
48
|
+
Inline chemistry also works: chem:H_2O[].
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-plugin-asciichem
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -15,20 +15,20 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '0.
|
|
18
|
+
version: '0.30'
|
|
19
19
|
- - ">="
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.
|
|
21
|
+
version: 0.30.1
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - "~>"
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '0.
|
|
28
|
+
version: '0.30'
|
|
29
29
|
- - ">="
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version: 0.
|
|
31
|
+
version: 0.30.1
|
|
32
32
|
- !ruby/object:Gem::Dependency
|
|
33
33
|
name: moxml
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -63,6 +63,7 @@ files:
|
|
|
63
63
|
- README.md
|
|
64
64
|
- Rakefile
|
|
65
65
|
- docs/example.adoc
|
|
66
|
+
- examples/pilot/aspirin.adoc
|
|
66
67
|
- lib/metanorma-plugin-asciichem.rb
|
|
67
68
|
- lib/metanorma/plugin/asciichem.rb
|
|
68
69
|
- lib/metanorma/plugin/asciichem/citations.rb
|