metanorma-plugin-asciichem 0.1.0 → 0.1.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/CHANGELOG.md +27 -25
- data/README.md +6 -3
- data/lib/metanorma/plugin/asciichem/citations.rb +4 -4
- data/lib/metanorma/plugin/asciichem/version.rb +1 -1
- data/lib/metanorma/plugin/asciichem.rb +0 -1
- data/metanorma-plugin-asciichem.gemspec +2 -9
- metadata +10 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38557a9ad544255e0a1d900860ed6e90a1113cccb568d32007f4c4e7ffc3c123
|
|
4
|
+
data.tar.gz: 8a68e216ad44f73faea707a37c0e2ca417540ba37180e131db29035636634d89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91aaca9dd9733d33b6238c1da2c45cf1f6380ae639fd5bccb08395e5ca70f5a5710a55c46449a7c2970cecccfb6e3f0c789006c6b030e6085957f849d09faab3
|
|
7
|
+
data.tar.gz: fe94c46d1bda2827cdc99728ab69eecd99e7b31323d3a06f9717e01864eb24f4b188c39bf21c44bb5e2af2b4c5d2359ea2cbd154d186a962b22a9a591904f79e
|
data/CHANGELOG.md
CHANGED
|
@@ -6,17 +6,26 @@ All notable changes to this project will be documented in this file.
|
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
- Runtime dependencies slimmed: `asciidoctor` and `nokogiri` are
|
|
10
|
+
gone. The host provides asciidoctor (metanorma-standoc requires
|
|
11
|
+
and registers the gem); the one direct XML touchpoint (setting
|
|
12
|
+
the InChIKey anchor on the emitted bibitem) now goes through
|
|
13
|
+
`moxml` (`~> 0.5`), the same adapter layer the rest of the
|
|
14
|
+
lutaml ecosystem uses.
|
|
15
|
+
|
|
16
|
+
## [0.1.1] - 2026-09-22
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
- Dependency floors raised to the suite-validated versions,
|
|
21
|
+
pessimistically: `asciichem ~> 0.29, >= 0.29.2`, `nokogiri
|
|
22
|
+
~> 1.18`; `asciidoctor` unchanged.
|
|
23
|
+
|
|
24
|
+
## [0.1.0] - 2026-09-22
|
|
25
|
+
|
|
26
|
+
First release, published under the final name and namespace (the
|
|
27
|
+
rename from the pre-release `asciichem/metanorma-asciichem` layout
|
|
28
|
+
happened before anything shipped, so it is invisible to users).
|
|
20
29
|
|
|
21
30
|
### Added
|
|
22
31
|
|
|
@@ -25,24 +34,17 @@ All notable changes to this project will be documented in this file.
|
|
|
25
34
|
Metanorma semantic XML). Block ids and titles carry over; invalid
|
|
26
35
|
sources log an error and keep the block as sourcecode.
|
|
27
36
|
- `chem:[]` inline macro (target and attribute forms) for inline
|
|
28
|
-
chemistry
|
|
37
|
+
chemistry, emitting the core-stem node shape so metanorma
|
|
38
|
+
converters dispatch it correctly.
|
|
29
39
|
- Substance citations: `@cite`-annotated molecules in `[chem]` blocks
|
|
30
40
|
resolve through `AsciiChem::Citation` to dataset-type Relaton
|
|
31
41
|
bibitems, one per (source, substance), deduplicated, anchored by
|
|
32
42
|
InChIKey, appended as a `[bibliography]` section.
|
|
33
43
|
- `:asciichem-cache-dir:` document attribute for offline,
|
|
34
44
|
reproducible citation resolution.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
following the plugin-family convention (lutaml, glossarist,
|
|
42
|
-
plantuml). Namespace is now `Metanorma::Plugin::Asciichem` with
|
|
43
|
-
lib at `metanorma/plugin/asciichem`; the require-by-name entry is
|
|
44
|
-
`metanorma-plugin-asciichem`. Per the plugin contract the gem no
|
|
45
|
-
longer self-registers with Asciidoctor — metanorma-standoc
|
|
46
|
-
requires and registers it (as it does for lutaml/glossarist).
|
|
47
|
-
Not released under the previous name, so the rename is invisible
|
|
48
|
-
to users.
|
|
45
|
+
- End-to-end metanorma-standoc compile spec (`standoc_spec.rb`);
|
|
46
|
+
per the plugin contract the gem exposes extension classes and the
|
|
47
|
+
host (metanorma-standoc) registers them, as it does for
|
|
48
|
+
lutaml/glossarist.
|
|
49
|
+
- Citation anchors are derived from the emitted bibitem XML (works
|
|
50
|
+
under both relaton-bib major lines) instead of vendor object APIs.
|
data/README.md
CHANGED
|
@@ -111,9 +111,12 @@ A worked example document ships in `docs/example.adoc`.
|
|
|
111
111
|
|
|
112
112
|
## Compatibility
|
|
113
113
|
|
|
114
|
-
Runtime dependencies are `asciichem` (
|
|
115
|
-
`
|
|
116
|
-
needs no Metanorma gem to run.
|
|
114
|
+
Runtime dependencies are `asciichem` (`~> 0.29`, `>= 0.29.2`) and
|
|
115
|
+
`moxml` — the extension operates at the Asciidoctor AST level and
|
|
116
|
+
needs no Metanorma gem to run. Asciidoctor itself is provided by the
|
|
117
|
+
host (metanorma-standoc requires and registers this gem; outside
|
|
118
|
+
Metanorma, bring your own asciidoctor and register the extension as
|
|
119
|
+
shown under Installation).
|
|
117
120
|
|
|
118
121
|
The full metanorma-standoc compile is exercised by the suite:
|
|
119
122
|
`spec/metanorma/plugin/asciichem/standoc_spec.rb` compiles a document
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require '
|
|
3
|
+
require 'moxml'
|
|
4
4
|
|
|
5
5
|
module Metanorma
|
|
6
6
|
module Plugin
|
|
@@ -89,9 +89,9 @@ module Metanorma
|
|
|
89
89
|
# docidentifier; the anchor (InChIKey) replaces it so document
|
|
90
90
|
# cross-references <<INCHIKEY>> land on the entry.
|
|
91
91
|
def with_anchor(xml, anchor)
|
|
92
|
-
|
|
93
|
-
root['id'] = anchor
|
|
94
|
-
|
|
92
|
+
doc = Moxml.parse(xml)
|
|
93
|
+
doc.root['id'] = anchor
|
|
94
|
+
doc.to_xml
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
def bibliography_section(document, entries)
|
|
@@ -33,13 +33,6 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
end
|
|
34
34
|
spec.require_paths = ['lib']
|
|
35
35
|
|
|
36
|
-
spec.add_dependency 'asciichem', '>= 0.29.2'
|
|
37
|
-
spec.add_dependency '
|
|
38
|
-
spec.add_dependency 'nokogiri', '~> 1.16'
|
|
39
|
-
|
|
40
|
-
# metanorma-standoc lives in the Gemfile dev group: it is the
|
|
41
|
-
# integration-test backend (spec/metanorma/plugin/asciichem/
|
|
42
|
-
# standoc_spec.rb), not a runtime requirement — following the
|
|
43
|
-
# plugin contract, metanorma-standoc requires and registers this
|
|
44
|
-
# gem, like it does for metanorma-plugin-lutaml.
|
|
36
|
+
spec.add_dependency 'asciichem', '~> 0.29', '>= 0.29.2'
|
|
37
|
+
spec.add_dependency 'moxml', '~> 0.5'
|
|
45
38
|
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.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -13,44 +13,36 @@ dependencies:
|
|
|
13
13
|
name: asciichem
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.29
|
|
19
|
-
type: :runtime
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
18
|
+
version: '0.29'
|
|
23
19
|
- - ">="
|
|
24
20
|
- !ruby/object:Gem::Version
|
|
25
21
|
version: 0.29.2
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: asciidoctor
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - "~>"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '2.0'
|
|
33
22
|
type: :runtime
|
|
34
23
|
prerelease: false
|
|
35
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
25
|
requirements:
|
|
37
26
|
- - "~>"
|
|
38
27
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
28
|
+
version: '0.29'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 0.29.2
|
|
40
32
|
- !ruby/object:Gem::Dependency
|
|
41
|
-
name:
|
|
33
|
+
name: moxml
|
|
42
34
|
requirement: !ruby/object:Gem::Requirement
|
|
43
35
|
requirements:
|
|
44
36
|
- - "~>"
|
|
45
37
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
38
|
+
version: '0.5'
|
|
47
39
|
type: :runtime
|
|
48
40
|
prerelease: false
|
|
49
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
42
|
requirements:
|
|
51
43
|
- - "~>"
|
|
52
44
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
45
|
+
version: '0.5'
|
|
54
46
|
description: 'Adds [chem] blocks and chem:[] inline macros to Metanorma AsciiDoc:
|
|
55
47
|
chemistry written in AsciiChem parses to MathML for rendering, and @cite-annotated
|
|
56
48
|
molecules resolve to dataset-type Relaton bibitems - one per (source, substance),
|