metanorma-plugin-asciichem 0.1.3 → 0.1.5

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: 9423e115983c7cdf4da2234ddfbeced5839aaf5f1b5ba0dc533fb631f547ad28
4
- data.tar.gz: 41ab2cdc3484acaae7dc62b396ec052377d465685581c7703fb1a69770ecf7f8
3
+ metadata.gz: 84942e4a2f90dd500f99e9359179468edf4fd66b68da858b17f15a08b2fc3165
4
+ data.tar.gz: 7c11fa96ac9fca3b53f4f00c9670c5919a8b17af05fb4e6b98fe520dedd0c2d6
5
5
  SHA512:
6
- metadata.gz: 9034ef15253bf6b9051cc970a6d146104c9b15577d607cd772f17a0e730053370faeb51656a04658da5597bd770dd373b3af9ad128dab5ad355eb6fd3ec9f73c
7
- data.tar.gz: 2b547bbb5eaa55d47a5e6b9a29f9beba46c52e1214d794172076052fc33fd5f5eea06dc250a162fa3584783dd1888e94e8daccbf05baadf53c69a46a8edd9275
6
+ metadata.gz: b6663eb9527815932458e0afad281d461026b1625dca1c0497aaa2cca10b097c1c0965c774872aa58e6a2337c40e293b37243f10de7e5572f8617df778397d92
7
+ data.tar.gz: dce01af80541f8d33f6c4fc3ed7a78249bf3bec6d70e4b52325e335cb4a79d9b22b53291ab9a292a6d276419ece3492564f63a8d618464f4818c5876dd037598
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
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
+
5
15
  ## [0.1.3] - 2026-10-19
6
16
 
7
17
  ### Changed
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[].
@@ -3,7 +3,7 @@
3
3
  module Metanorma
4
4
  module Plugin
5
5
  module Asciichem
6
- VERSION = '0.1.3'
6
+ VERSION = '0.1.5'
7
7
  end
8
8
  end
9
9
  end
@@ -34,5 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.require_paths = ['lib']
35
35
 
36
36
  spec.add_dependency 'asciichem', '~> 0.30', '>= 0.30.1'
37
- spec.add_dependency 'moxml', '~> 0.5'
37
+ # moxml 0.6 removed the Opal surface (lutaml/moxml#516); owner
38
+ # call to forward-pin the 0.6 series.
39
+ spec.add_dependency 'moxml', '~> 0.6.0'
38
40
  end
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.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -35,14 +35,14 @@ dependencies:
35
35
  requirements:
36
36
  - - "~>"
37
37
  - !ruby/object:Gem::Version
38
- version: '0.5'
38
+ version: 0.6.0
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
43
  - - "~>"
44
44
  - !ruby/object:Gem::Version
45
- version: '0.5'
45
+ version: 0.6.0
46
46
  description: 'Adds [chem] blocks and chem:[] inline macros to Metanorma AsciiDoc:
47
47
  chemistry written in AsciiChem parses to MathML for rendering, and @cite-annotated
48
48
  molecules resolve to dataset-type Relaton bibitems - one per (source, substance),
@@ -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