metanorma-iso 3.5.28 → 3.5.30
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/.gitignore +1 -0
- data/.rspec +0 -1
- data/Gemfile +0 -1
- data/TODO.docx/P0-001-sectpr-header-footer-refs.md +3 -1
- data/TODO.docx/P0-002-sectpr-header-footer-refs-detail.md +6 -0
- data/TODO.docx/P0-003-body-sectpr-differences.md +3 -1
- data/TODO.docx/P0-004-body-sectpr-structure.md +19 -0
- data/TODO.docx/P0-005-word-unreadable-content.md +5 -2
- data/TODO.docx/P1-001-missing-images.md +3 -1
- data/TODO.docx/P1-002-figures-images-content.md +11 -0
- data/TODO.docx/P1-003-subfigure-descriptions.md +3 -0
- data/TODO.docx/P1-004-copyright-on-cover-page.md +15 -1
- data/TODO.docx/P1-005-copyright-address-block.md +12 -0
- data/TODO.docx/P1-006-duplicate-boilerplate.md +12 -3
- data/TODO.docx/P1-007-missing-page-breaks.md +3 -1
- data/TODO.docx/P1-008-missing-bookmarks-hyperlinks.md +36 -0
- data/TODO.docx/P1-009-bookmarks-hyperlinks-detail.md +36 -0
- data/TODO.docx/P1-010-normref-formatting.md +16 -0
- data/TODO.docx/P1-011-normref-footnote-markers.md +7 -2
- data/TODO.docx/P1-012-normref-style-and-markers.md +5 -4
- data/TODO.docx/P1-013-inline-math-omml.md +21 -4
- data/TODO.docx/P2-001-character-styles-gap.md +13 -0
- data/TODO.docx/P2-002-style-alignment-gaps.md +93 -2
- data/TODO.docx/P2-003-missing-rstyles.md +33 -1
- data/TODO.docx/P2-004-toc-entries-wiring.md +9 -2
- data/TODO.docx/P2-005-toc-tab-separator.md +16 -0
- data/TODO.docx/P2-006-cover-from-model.md +3 -1
- data/TODO.docx/P2-007-cover-page-structure.md +11 -0
- data/TODO.docx/P2-008-cover-page-detail.md +11 -0
- data/TODO.docx/P2-009-boilerplate-from-model.md +11 -41
- data/TODO.docx/P2-010-note-example-count.md +14 -35
- data/TODO.docx/P2-011-paragraph-count-mismatch.md +127 -25
- data/TODO.docx/P2-012-section-breaks-headers.md +19 -4
- data/TODO.docx/P2-013-list-item-style.md +11 -1
- data/TODO.docx/P2-014-xref-text-concatenation.md +13 -8
- data/TODO.docx/P2-015-fallback-chain-elimination.md +16 -0
- data/TODO.docx/P2-016-style-exclusion-list.md +7 -0
- data/TODO.docx/P3-001-sts-roundtrip-gaps.md +4 -0
- data/TODO.docx/P3-002-sts-gap-analysis.md +27 -16
- data/TODO.docx/P3-003-sts-spec-coverage.md +15 -0
- data/TODO.docx/P3-004-sts-missing-transformers.md +11 -0
- data/TODO.docx/P3-005-e2e-rice-spec.md +40 -14
- data/TODO.docx/P3-006-amendment-doctype.md +6 -1
- data/TODO.docx/P3-007-verify-word-opens.md +5 -1
- data/TODO.docx/P3-008-architecture-root-cause.md +9 -31
- data/data/generate_docx_spec_fixtures.rb +77 -0
- data/data/iso-dis/style_mapping.yml +226 -1
- data/data/iso-dis/styles.yml +45 -0
- data/data/iso-dis/template.docx +0 -0
- data/data/iso-simple/style_mapping.yml +8 -2
- data/data/iso-simple/styles.yml +76 -0
- data/data/iso-simple/template.dotx +0 -0
- data/data/relaton_core_shadow_fix.rb +12 -0
- data/lib/isodoc/iso/docx/adapter.rb +202 -7
- data/lib/isodoc/iso/docx/amendment_doctype.rb +35 -0
- data/lib/isodoc/iso/docx/bibdata_text.rb +35 -4
- data/lib/isodoc/iso/docx/boilerplate_renderer.rb +51 -38
- data/lib/isodoc/iso/docx/box_wrapper.rb +1 -0
- data/lib/isodoc/iso/docx/context.rb +87 -5
- data/lib/isodoc/iso/docx/core_properties_builder.rb +7 -4
- data/lib/isodoc/iso/docx/cover_renderer.rb +65 -5
- data/lib/isodoc/iso/docx/formula_renderer.rb +24 -3
- data/lib/isodoc/iso/docx/header_footer_renderer.rb +23 -23
- data/lib/isodoc/iso/docx/inline.rb +230 -8
- data/lib/isodoc/iso/docx/inline_renderers/bookmark_renderer.rb +3 -1
- data/lib/isodoc/iso/docx/inline_renderers/eref_renderer.rb +6 -5
- data/lib/isodoc/iso/docx/inline_renderers/fmt_xref_renderer.rb +1 -1
- data/lib/isodoc/iso/docx/inline_renderers/footnote_renderer.rb +30 -1
- data/lib/isodoc/iso/docx/inline_renderers/raw_paragraph_renderer.rb +6 -2
- data/lib/isodoc/iso/docx/inline_renderers/registry.rb +2 -0
- data/lib/isodoc/iso/docx/inline_renderers/xref_renderer.rb +1 -1
- data/lib/isodoc/iso/docx/math_conversion.rb +53 -15
- data/lib/isodoc/iso/docx/mhtml_parity.rb +182 -14
- data/lib/isodoc/iso/docx/middle_title_renderer.rb +37 -15
- data/lib/isodoc/iso/docx/model_utils.rb +25 -0
- data/lib/isodoc/iso/docx/preface_renderer.rb +5 -1
- data/lib/isodoc/iso/docx/renderers/admonition_renderer.rb +1 -0
- data/lib/isodoc/iso/docx/renderers/annex_renderer.rb +75 -0
- data/lib/isodoc/iso/docx/renderers/base.rb +75 -9
- data/lib/isodoc/iso/docx/renderers/bibliography_renderer.rb +2 -2
- data/lib/isodoc/iso/docx/renderers/clause_renderer.rb +17 -1
- data/lib/isodoc/iso/docx/renderers/definition_list_renderer.rb +75 -23
- data/lib/isodoc/iso/docx/renderers/figure_renderer.rb +18 -1
- data/lib/isodoc/iso/docx/renderers/list_item_content.rb +67 -0
- data/lib/isodoc/iso/docx/renderers/note_renderer.rb +5 -3
- data/lib/isodoc/iso/docx/renderers/ordered_list_renderer.rb +27 -19
- data/lib/isodoc/iso/docx/renderers/paragraph_renderer.rb +91 -4
- data/lib/isodoc/iso/docx/renderers/quote_renderer.rb +2 -0
- data/lib/isodoc/iso/docx/renderers/references_renderer.rb +4 -2
- data/lib/isodoc/iso/docx/renderers/section_renderer.rb +91 -4
- data/lib/isodoc/iso/docx/renderers/table_cell_element/base.rb +7 -3
- data/lib/isodoc/iso/docx/renderers/table_cell_element/cell_target.rb +3 -2
- data/lib/isodoc/iso/docx/renderers/table_cell_element/definition_list_handler.rb +92 -0
- data/lib/isodoc/iso/docx/renderers/table_cell_element/list_handler.rb +2 -2
- data/lib/isodoc/iso/docx/renderers/table_cell_element/registry.rb +15 -1
- data/lib/isodoc/iso/docx/renderers/table_cell_element.rb +1 -0
- data/lib/isodoc/iso/docx/renderers/table_column_widths.rb +60 -0
- data/lib/isodoc/iso/docx/renderers/table_footnotes.rb +70 -0
- data/lib/isodoc/iso/docx/renderers/table_renderer.rb +160 -32
- data/lib/isodoc/iso/docx/renderers/table_row_spans.rb +86 -0
- data/lib/isodoc/iso/docx/renderers/term_renderer.rb +18 -0
- data/lib/isodoc/iso/docx/renderers/unordered_list_renderer.rb +5 -13
- data/lib/isodoc/iso/docx/renderers.rb +4 -0
- data/lib/isodoc/iso/docx/section_manager.rb +62 -8
- data/lib/isodoc/iso/docx/style_mapping_validator.rb +8 -7
- data/lib/isodoc/iso/docx/style_resolver.rb +25 -6
- data/lib/isodoc/iso/docx/toc_builder.rb +110 -18
- data/lib/isodoc/iso/docx.rb +1 -0
- data/lib/isodoc/iso/docx_style_mapping.rb +8 -0
- data/lib/isodoc/iso/word_dis_convert.rb +5 -2
- data/lib/metanorma/iso/mathml4-content.rng +1568 -0
- data/lib/metanorma/iso/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/iso/processor.rb +20 -3
- data/lib/metanorma/iso/sts/transformer/block_dispatcher.rb +25 -15
- data/lib/metanorma/iso/sts/transformer/dl_transformer.rb +2 -1
- data/lib/metanorma/iso/sts/transformer/document_transformer.rb +12 -3
- data/lib/metanorma/iso/sts/transformer/figure_transformer.rb +74 -14
- data/lib/metanorma/iso/sts/transformer/formula_transformer.rb +1 -1
- data/lib/metanorma/iso/sts/transformer/id_generator.rb +46 -3
- data/lib/metanorma/iso/sts/transformer/iso_meta_transformer.rb +15 -8
- data/lib/metanorma/iso/sts/transformer/list_transformer.rb +2 -2
- data/lib/metanorma/iso/sts/transformer/nbsp_processor.rb +1 -1
- data/lib/metanorma/iso/sts/transformer/paragraph_transformer.rb +80 -7
- data/lib/metanorma/iso/sts/transformer/reference_transformer.rb +82 -8
- data/lib/metanorma/iso/sts/transformer/section_transformer.rb +21 -28
- data/lib/metanorma/iso/sts/transformer/source_document.rb +8 -4
- data/lib/metanorma/iso/sts/transformer/source_order.rb +58 -0
- data/lib/metanorma/iso/sts/transformer/table_transformer.rb +2 -2
- data/lib/metanorma/iso/sts/transformer.rb +1 -0
- data/lib/metanorma/iso/validation/rules/asset_cited_first_rule.rb +8 -3
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/tasks/docx_parity.rake +6 -2
- data/metanorma-iso.gemspec +1 -1
- metadata +15 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 745936ce47dbb8bdbaded38f291338eea0e359bd9db23cd06897f72e2e502d35
|
|
4
|
+
data.tar.gz: 8a7307dde4d3ff75ea4dcec56609531fe204fd77528a60612e453067682d981e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 349ff695bc9a564f2010add4ba83a9f6640c83d6a8b96a716683d3a98e0f471c828ac797792ee15bcbd05b57d852100cf1af4c185e5184e5645e205b60d1e2be
|
|
7
|
+
data.tar.gz: 36e68ee389a32d6d78232c9ab908ee163a810c1e2741b2b42c5cf959d8395acd1ab29a9a8557269de45775907ccf2f3113563a19f214d9a7a0df32cefe5179c5
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/Gemfile
CHANGED
|
@@ -20,7 +20,6 @@ gem "rubocop-rake"
|
|
|
20
20
|
gem "simplecov"
|
|
21
21
|
gem "timecop"
|
|
22
22
|
gem "webmock"
|
|
23
|
-
gem "uniword", path: "../uniword" if File.exist?(File.expand_path("../uniword/Gemfile", __dir__))
|
|
24
23
|
gem "lutaml-model", "~> 0.8"
|
|
25
24
|
# html2doc >= 1.12 is required for correct OMML math handling in Word output
|
|
26
25
|
# (isodoc main also pins ~> 1.12).
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-001 - Fix cover page sectPr position and header/footer refs
|
|
3
3
|
priority: P0
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
depends_on: []
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 108-001: Fix Cover Page Section Break Position and Header/Footer Refs
|
|
9
9
|
|
|
10
|
+
The DIS regression in `spec/isodoc/docx/section_manager_spec.rb` verifies the break position, page break before Contents, and references to dedicated blank cover parts. The package allocates its own relationship IDs and part names.
|
|
11
|
+
|
|
10
12
|
## Problem
|
|
11
13
|
|
|
12
14
|
The cover page section break is in the WRONG position and MISSING header/footer references.
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: done
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Done: fixed by #1782 (62faf403). Cover sectPr #0 carries headerReference even, footerReference even and footerReference default, each pointing to a dedicated blank part, and no titlePg (matches the reference). Pinned by `spec/isodoc/docx/section_manager_spec.rb` ("writes the three DIS sections with the cover break before copyright"), which now also asserts no titlePg on the cover. Not checked: opening the file in real Word.
|
|
6
|
+
|
|
1
7
|
# 058: Fix Missing Cover Page Section Headers/Footers
|
|
2
8
|
|
|
3
9
|
## Problem
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-008 - Fix section property differences
|
|
3
3
|
priority: P1
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
depends_on: [108-001]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 108-008: Fix Section Property Differences
|
|
9
9
|
|
|
10
|
+
The DIS section spec verifies the cover references, page sizes, margins, columns, document grids, and front matter numbering as `w:fmt="lowerRoman"`. Body revision IDs are generated by Uniword.
|
|
11
|
+
|
|
10
12
|
## Problem
|
|
11
13
|
|
|
12
14
|
The three sectPr elements have structural differences from the reference.
|
|
@@ -51,3 +51,22 @@ Output body sectPr:
|
|
|
51
51
|
## Location
|
|
52
52
|
- `lib/isodoc/iso/docx/adapter.rb` — body sectPr generation
|
|
53
53
|
- `lib/isodoc/iso/docx/document_properties.rb` — pgSz and sectPr property generation
|
|
54
|
+
|
|
55
|
+
## Status: DONE — premise stale; decided as intended (2026-11-19)
|
|
56
|
+
Measured on rice output (base a7b854e7): no `titlePg` and no `w:code="9"` on
|
|
57
|
+
any sectPr (cover and front matter never had them; the body sectPr is built
|
|
58
|
+
fresh, not copied from the template, whose body pgSz does carry code=9).
|
|
59
|
+
Body `headerReference` even/default are kept on purpose: the DIS template body
|
|
60
|
+
section carries running headers (rId25/26) and the DIS header text is part of
|
|
61
|
+
the output; the 2016 CD reference has none and is not an oracle. The footer
|
|
62
|
+
refs match. pgMar order differs only in serialization. Body margins now come
|
|
63
|
+
from the template (see P2-012). Pinned by `section_manager_spec.rb`
|
|
64
|
+
(cover has no titlePg/pgNumType; sections have header+footer refs).
|
|
65
|
+
|
|
66
|
+
### Re-measured on batch4 tip 6455ca2f (2026-11-19, no code change)
|
|
67
|
+
rice output vs spec/examples/rice.docx, all 3 sectPr: no `titlePg`, no
|
|
68
|
+
`w:code` on any pgSz (output and reference). Only remaining body differences:
|
|
69
|
+
headerReference even/default (kept on purpose, see above), body pgMar
|
|
70
|
+
right/bottom/gutter taken from the DIS template (851/567/0 vs 737/284/567),
|
|
71
|
+
pgNumType start=1 present in both. Items 2 and 3 of the problem do not
|
|
72
|
+
reproduce; item 1 is the documented decision.
|
|
@@ -24,5 +24,8 @@ User reports `rice-dis-output-latest.docx` won't open in Word.
|
|
|
24
24
|
1. Remove `docProps/custom.xml` and its content type override
|
|
25
25
|
2. Test opening after each removal to isolate the cause
|
|
26
26
|
|
|
27
|
-
## Status
|
|
28
|
-
|
|
27
|
+
## Status: DONE (verified in Microsoft Word, 2026-11-19)
|
|
28
|
+
|
|
29
|
+
## Verification (2026-11-19)
|
|
30
|
+
- rice.presentation.xml rendered to DOCX at ac2393fb (lane/1728-cards-batch4), opened in Microsoft Word read-only: no "unreadable content" or repair dialog.
|
|
31
|
+
- Table of contents entries clicked in Word jump to their headings.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-006 - Fix missing image (5th image for Annex C subfigures)
|
|
3
3
|
priority: P1
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# 108-006: Fix Missing Image
|
|
8
8
|
|
|
9
|
+
Verified by `spec/isodoc/docx/renderers/figure_renderer_spec.rb` (one image part per subfigure a/b/c); the DIS fixture converted through `Metanorma::Iso::Processor#output(..., :docx)` produces all 5 image parts and placements, matching the reference count, with no renderer change needed.
|
|
10
|
+
|
|
9
11
|
## Problem
|
|
10
12
|
|
|
11
13
|
Reference has 5 images, latest has 4. The missing image is likely the second subfigure in Annex C.
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
status: done
|
|
2
|
+
note: Measured 2026-11-19 on a7b854e7 against rice.presentation.xml. 5 of 6 items were already fixed or edition differences; one real defect (figure Key heading) fixed.
|
|
3
|
+
verdicts:
|
|
4
|
+
1 images: (a) already fixed. word/media has 5 PNGs and 5 w:drawing (reference: 6 w:pict, VML vs DrawingML is not a defect).
|
|
5
|
+
2 Annex C figures: (a) already fixed. Figure C.1 and C.2 captions, body text and the key entries are present.
|
|
6
|
+
3 Annex D table: (a) already fixed. Table D.1 has 10 rows with full content (2016 reference has 11 incl. a footnote row, an edition difference).
|
|
7
|
+
4 Annex E heading: (a) already fixed. ANNEX style numbers "Annex %1" via numbering.xml; "(informative)" and the title follow. Same mechanism as the reference.
|
|
8
|
+
5 Key paragraphs: (c) real defect, fixed. dt/dd entries rendered but the key's own name "Key" was dropped. FigureRenderer now emits a bold keep-with-next "Key" paragraph. Spec red with the call removed, green with it.
|
|
9
|
+
6 sub-figures C.2 a/b/c: (a) already fixed (P1-003).
|
|
10
|
+
note-order: reference puts Key before the figure NOTE; 2023 output puts NOTE first. Not changed, edition layout.
|
|
11
|
+
|
|
1
12
|
# 068: Fix Missing Content — Figures, Images, Annex Content
|
|
2
13
|
|
|
3
14
|
## Problem
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# 081: Missing sub-figure descriptions for Figure C.2 a/b/c
|
|
2
2
|
|
|
3
|
+
status: done
|
|
4
|
+
note: Already renders on 7774b78e (a/b/c as Figuretitle); pinned by rice_docx_structural_fixes_spec.rb.
|
|
5
|
+
|
|
3
6
|
## Problem
|
|
4
7
|
Reference has detailed descriptions for Figure C.2's sub-figures (a/b/c). Output is missing these paragraphs.
|
|
5
8
|
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-004 - Move copyright block to separate page after cover
|
|
3
3
|
priority: P1
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
depends_on: [108-001]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 108-004: Move Copyright Block to Separate Page After Cover
|
|
9
9
|
|
|
10
|
+
## Resolution
|
|
11
|
+
|
|
12
|
+
Already fixed: `spec/isodoc/docx/section_manager_spec.rb:12`, added in
|
|
13
|
+
`62faf403`, verifies the cover section break precedes copyright and a page
|
|
14
|
+
break separates copyright from Contents.
|
|
15
|
+
|
|
16
|
+
Verified through `Metanorma::Iso::Processor#output(..., :docx)` on
|
|
17
|
+
2026-11-18 using `spec/fixtures/iso/is/document-en.dis.presentation.xml`,
|
|
18
|
+
the ISO 5878 submission dated 20260429, and the ISO 2533 English submission
|
|
19
|
+
dated 20260907. All three follow the expected ordering below: every
|
|
20
|
+
copyright paragraph follows the cover section break, with a page break
|
|
21
|
+
before Contents. Submitted content was used only for measurement and was
|
|
22
|
+
not added to the repo. No production-code change is needed for this item.
|
|
23
|
+
|
|
10
24
|
## Problem
|
|
11
25
|
|
|
12
26
|
In the latest output, the copyright block (© ISO year, All rights reserved, address, "Published in Switzerland") appears on the COVER PAGE, right before the section break. In the reference, it starts on a SEPARATE PAGE (after the first section break).
|
|
@@ -26,3 +26,15 @@ In `render_copyright_block`, consolidate all address lines into a single paragra
|
|
|
26
26
|
|
|
27
27
|
## Location
|
|
28
28
|
- `lib/isodoc/iso/docx/adapter.rb` — `render_copyright_block`
|
|
29
|
+
|
|
30
|
+
## Status: DONE (verified at base 6455ca2f, no code change)
|
|
31
|
+
Re-measured by converting spec/examples/rice.presentation.xml with Processor#output(..., :docx) and comparing with spec/examples/rice.docx.
|
|
32
|
+
|
|
33
|
+
- Reference: ONE paragraph, style `zzaddress` (ind left 505), lines separated by `<w:r><w:br/><w:t>line</w:t></w:r>`, email as a hyperlink run, `boilerplate-address` bookmark.
|
|
34
|
+
- Output: ONE paragraph, style `zzCopyrightaddress`, lines separated by `<w:r><w:br/></w:r>`, email kept as a hyperlink run, `boilerplate-address` bookmark kept. The five-paragraph split is gone (fixed earlier; spec/isodoc/docx/boilerplate_renderer_spec.rb "with the full ISO address paragraph", 16 examples green).
|
|
35
|
+
|
|
36
|
+
Resolved on lane/1728-cards-batch4 (commit "Trim leading space after line breaks in the copyright address block"):
|
|
37
|
+
- Leading space after a break: `BoilerplateRenderer#trim_after_breaks` strips leading whitespace from the run that follows a `w:br`, only in the copyright address paragraph (the source writes `<br/> line`). Other paragraphs keep their spaces. Spec: boilerplate_renderer_spec "starts each line after a break without a leading space".
|
|
38
|
+
|
|
39
|
+
Remaining difference, deliberately not changed:
|
|
40
|
+
- Style id: the DIS template (template.docx and data/iso-dis/styles.yml) defines `zzCopyrightaddress` and has no `zzaddress`. The reference is a CD 2016 document using a CD-era style. Emitting `zzaddress` would reference a style missing from the DIS template, so Word would fall back to Normal. The DIS style is the correct id for this template.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-009 - Fix duplicate terms boilerplate text
|
|
3
3
|
priority: P2
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# 108-009: Fix Duplicate Terms Boilerplate Text
|
|
@@ -38,8 +38,17 @@ In the terms section (clause 3), the latest output renders BOTH the old and new
|
|
|
38
38
|
|
|
39
39
|
Both the reference AND latest have the duplicate boilerplate! This is not a bug in our adapter — it's present in the source XML. The presentation XML contains two sets of boilerplate text (one from localized-strings, one from the terms section content).
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
This comparison records the historical duplicated output; it does not describe the current processor output.
|
|
42
42
|
|
|
43
43
|
## Resolution
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Already fixed by the renderer introduced in `32aed33b`; `spec/isodoc/docx/renderers/terms_section_renderer_spec.rb` verifies the document's wording occurs once and preserves HTTPS link text and targets.
|
|
46
|
+
|
|
47
|
+
Verified through `Metanorma::Iso::Processor#output(..., :docx)` on
|
|
48
|
+
2026-11-18 using `spec/fixtures/iso/is/document-en.dis.presentation.xml`,
|
|
49
|
+
the ISO 5878 submission dated 20260429, and the ISO 2533 English submission
|
|
50
|
+
dated 20260907. Each emits one introductory sentence, one database sentence,
|
|
51
|
+
and one address for each terminology database, unlike the historical reference
|
|
52
|
+
above. ISO 5878 retains its own wording referring to ISO 2533:2026.
|
|
53
|
+
Submitted content was used only for measurement and was not added to the repo.
|
|
54
|
+
No production-code change is needed.
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-003 - Add page breaks before Contents, Foreword, Introduction
|
|
3
3
|
priority: P1
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
depends_on: [108-001]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 108-003: Add Page Breaks Before Contents, Foreword, Introduction
|
|
9
9
|
|
|
10
|
+
Verified by `spec/isodoc/docx/preface_page_breaks_spec.rb` through `Processor#output(..., :docx)` on `spec/fixtures/iso/is/document-en.dis.presentation.xml`: the existing renderer supplies all three preface breaks, five annex breaks, and the ninth boundary through BiblioTitle's `pageBreakBefore`; no renderer change is needed.
|
|
11
|
+
|
|
10
12
|
## Problem
|
|
11
13
|
|
|
12
14
|
The reference DOCX has 9 page breaks. The latest only has 6. Three are missing:
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# 070: Fix Missing Bookmarks and Hyperlinks
|
|
2
2
|
|
|
3
|
+
status: done (remainder classified as non-defects, see Status update)
|
|
4
|
+
|
|
5
|
+
## Status (measured on rice, base 7774b78e)
|
|
6
|
+
- Before: 125 bookmarks, 76 hyperlinks. After: 195 bookmarks (all unique), 85 hyperlinks. Reference: 293 / 120.
|
|
7
|
+
- Figures, tables, formulas, headings, terms and bib items already had bookmarks; the premise that figures/tables lacked them was false.
|
|
8
|
+
- Fixed: paragraphs with an id now get a bookmark (+70); fmt-concept now renders its xref as a hyperlink (+9, also restores the "(3.1)" display text).
|
|
9
|
+
- Remaining delta: ~26 _Toc hyperlinks (toc_builder lane); ~98 bookmarks the reference carries on notes, lists, dl, termnote/termexample, quote, sourcecode and some clauses (Word-authored GUID bookmarks, no xref targets them); term anchors differ (ref `paddy`, source `term-paddy`); 11 table-footnote hyperlinks.
|
|
10
|
+
|
|
11
|
+
- Classification (lane 1728-xref-links, measured at e6c302ba): every source xref/fmt-xref/eref target (77 fmt-xref) yields exactly one internal hyperlink; all anchors resolve to bookmarks; no emitted-link defect remains. Locked by spec/isodoc/docx/rice_xref_links_spec.rb.
|
|
12
|
+
- Reference-only links are edition differences (reference = 2016 CD, source = 2023 DIS): table1a..d (7x table1c), tableD-1a, figureC-1a are Word-authored bookmarks on in-table footnote text; the source has no such targets (table fn are `fn` + fmt-footnote-container, rendered by us as native Word footnotes with bodies in footnotes.xml). IEC61010-2, AnnexA(+1), figureA-1(+1) have no/fewer xrefs in the source (IEC61010-2: 0; AnnexA: 2 fmt-xref vs 3 in ref; figureA-1: 1 vs 2). Term anchors differ by naming (ref `paddy`, ours `term-paddy`).
|
|
13
|
+
- Remaining delta: _Toc hyperlinks (toc_builder lane) only; the rest is not a defect.
|
|
14
|
+
|
|
15
|
+
## Status update (lane 1728-bookmarks2, base 2e463195) - status: done, remainder documented as non-defects
|
|
16
|
+
Measured on rice (Metanorma::Iso::Processor output, docx) vs reference spec/examples/rice.docx (2016 CD):
|
|
17
|
+
|
|
18
|
+
| Kind | Reference | Before (2e463195) | After |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| Bookmarks, total | 293 | 231 | 368 (all unique, longest name 37 chars, limit 40) |
|
|
21
|
+
| - semantic ids (clause/term/figure/table/boilerplate names) | 82 | 79 | 85 |
|
|
22
|
+
| - GUID-style ids (`_xxxxxxxx-...`, one per block/paragraph) | 201 | 126 | 257 |
|
|
23
|
+
| - _Toc (heading, for the TOC) | 0 (ref TOC links dangle) | 26 | 26 |
|
|
24
|
+
| - _Ref (Word cross-ref helpers) | 10 | 0 | 0 (documented, no source) |
|
|
25
|
+
| Hyperlinks, total | 120 | 111 | 111 |
|
|
26
|
+
| - internal anchor | 113 | 103 | 103 (26 _Toc + 77 xref) |
|
|
27
|
+
| - external | 7 | 8 | 8 |
|
|
28
|
+
| Dangling hyperlink anchors | 32 (26 _Toc + 6 table/figure fn) | 0 | 0 |
|
|
29
|
+
|
|
30
|
+
Real gap fixed (+137 bookmarks; 368 now exceeds the reference because we anchor every id-bearing block, which the 2016 CD did not): ids on note, termnote, termexample, example, admonition, quote, sourcecode, ul/ol, li, the p inside li/dd/termnote/definition/boilerplate, dl/dt/dd, fmt-definition, figure notes, and the boilerplate statement clauses/paragraphs now become bookmarks (anchor on the first paragraph the block emits). Names are claimed once (Context#claim_bookmark_name), so duplicates and names over 40 chars are never emitted. Locked by spec/isodoc/docx/anchored_block_bookmarks_spec.rb.
|
|
31
|
+
|
|
32
|
+
Not defects (classified, not fixed):
|
|
33
|
+
- Reference is above ours on 5 bookmark kinds that no source element carries: 10 _Ref* (Word-generated cross-reference helpers on normref/bibliography/term text), ftntable1a..d/ftnfigureC-1a/ftntableD-1a (Word-authored in-table footnote text of the 2016 CD; ours are native Word footnotes). Edition differences / Word-generated.
|
|
34
|
+
- Term anchors: reference `paddy`, `husked_rice`, `HDK`, `gelatinization`, `gel_state`; ours `term-paddy` etc. (naming, xrefs resolve either way).
|
|
35
|
+
- Hyperlinks: reference-only links are table1a..d, tableD-1a, figureC-1a (table footnotes of the 2016 CD) and IEC61010-2 (no xref in the 2023 source), and the 26 reference _Toc links point at bookmarks that do not exist in the reference; ours point at real _Toc bookmarks. Every source xref/eref yields one hyperlink (rice_xref_links_spec).
|
|
36
|
+
- Source elements deliberately not bookmarked: annotation/fmt-annotation-* and the ul/li inside annotation-container (rendered as Word comments); the 5 `<bookmark>` elements in annex titles and refterm are review-annotation range ends (from/to of annotations), carried by the comment ranges; link/xref/eref/stem/identifier/title/fmt-name/td/tr/th inline or structural nodes that are not anchor targets.
|
|
37
|
+
- Not done: dl ids in figure-key/formula-key/symbol tables (2 of 4 dl; the dl renders as table cells with no body paragraph to hold the range); p ids inside table-cell fn bodies and footnotes.xml; modification/source p (3).
|
|
38
|
+
|
|
3
39
|
## Problem
|
|
4
40
|
The reference has 293 bookmarks and 120 hyperlinks. The output has only 98 bookmarks and 75 hyperlinks. Missing bookmarks mean cross-references and internal links may be broken.
|
|
5
41
|
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# 089: Missing 190 bookmarks and 45 hyperlinks
|
|
2
2
|
|
|
3
|
+
status: done (remainder classified as non-defects, see Status update)
|
|
4
|
+
|
|
5
|
+
## Status (measured on rice, base 7774b78e)
|
|
6
|
+
- Before: 125 bookmarks, 76 hyperlinks. After: 195 bookmarks (all unique), 85 hyperlinks. Reference: 293 / 120.
|
|
7
|
+
- Figures, tables, formulas, headings, terms and bib items already had bookmarks; the premise that figures/tables lacked them was false.
|
|
8
|
+
- Fixed: paragraphs with an id now get a bookmark (+70); fmt-concept now renders its xref as a hyperlink (+9, also restores the "(3.1)" display text).
|
|
9
|
+
- Remaining delta: ~26 _Toc hyperlinks (toc_builder lane); ~98 bookmarks the reference carries on notes, lists, dl, termnote/termexample, quote, sourcecode and some clauses (Word-authored GUID bookmarks, no xref targets them); term anchors differ (ref `paddy`, source `term-paddy`); 11 table-footnote hyperlinks.
|
|
10
|
+
|
|
11
|
+
- Classification (lane 1728-xref-links, measured at e6c302ba): every source xref/fmt-xref/eref target (77 fmt-xref) yields exactly one internal hyperlink; all anchors resolve to bookmarks; no emitted-link defect remains. Locked by spec/isodoc/docx/rice_xref_links_spec.rb.
|
|
12
|
+
- Reference-only links are edition differences (reference = 2016 CD, source = 2023 DIS): table1a..d (7x table1c), tableD-1a, figureC-1a are Word-authored bookmarks on in-table footnote text; the source has no such targets (table fn are `fn` + fmt-footnote-container, rendered by us as native Word footnotes with bodies in footnotes.xml). IEC61010-2, AnnexA(+1), figureA-1(+1) have no/fewer xrefs in the source (IEC61010-2: 0; AnnexA: 2 fmt-xref vs 3 in ref; figureA-1: 1 vs 2). Term anchors differ by naming (ref `paddy`, ours `term-paddy`).
|
|
13
|
+
- Remaining delta: _Toc hyperlinks (toc_builder lane) only; the rest is not a defect.
|
|
14
|
+
|
|
15
|
+
## Status update (lane 1728-bookmarks2, base 2e463195) - status: done, remainder documented as non-defects
|
|
16
|
+
Measured on rice (Metanorma::Iso::Processor output, docx) vs reference spec/examples/rice.docx (2016 CD):
|
|
17
|
+
|
|
18
|
+
| Kind | Reference | Before (2e463195) | After |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| Bookmarks, total | 293 | 231 | 368 (all unique, longest name 37 chars, limit 40) |
|
|
21
|
+
| - semantic ids (clause/term/figure/table/boilerplate names) | 82 | 79 | 85 |
|
|
22
|
+
| - GUID-style ids (`_xxxxxxxx-...`, one per block/paragraph) | 201 | 126 | 257 |
|
|
23
|
+
| - _Toc (heading, for the TOC) | 0 (ref TOC links dangle) | 26 | 26 |
|
|
24
|
+
| - _Ref (Word cross-ref helpers) | 10 | 0 | 0 (documented, no source) |
|
|
25
|
+
| Hyperlinks, total | 120 | 111 | 111 |
|
|
26
|
+
| - internal anchor | 113 | 103 | 103 (26 _Toc + 77 xref) |
|
|
27
|
+
| - external | 7 | 8 | 8 |
|
|
28
|
+
| Dangling hyperlink anchors | 32 (26 _Toc + 6 table/figure fn) | 0 | 0 |
|
|
29
|
+
|
|
30
|
+
Real gap fixed (+137 bookmarks; 368 now exceeds the reference because we anchor every id-bearing block, which the 2016 CD did not): ids on note, termnote, termexample, example, admonition, quote, sourcecode, ul/ol, li, the p inside li/dd/termnote/definition/boilerplate, dl/dt/dd, fmt-definition, figure notes, and the boilerplate statement clauses/paragraphs now become bookmarks (anchor on the first paragraph the block emits). Names are claimed once (Context#claim_bookmark_name), so duplicates and names over 40 chars are never emitted. Locked by spec/isodoc/docx/anchored_block_bookmarks_spec.rb.
|
|
31
|
+
|
|
32
|
+
Not defects (classified, not fixed):
|
|
33
|
+
- Reference is above ours on 5 bookmark kinds that no source element carries: 10 _Ref* (Word-generated cross-reference helpers on normref/bibliography/term text), ftntable1a..d/ftnfigureC-1a/ftntableD-1a (Word-authored in-table footnote text of the 2016 CD; ours are native Word footnotes). Edition differences / Word-generated.
|
|
34
|
+
- Term anchors: reference `paddy`, `husked_rice`, `HDK`, `gelatinization`, `gel_state`; ours `term-paddy` etc. (naming, xrefs resolve either way).
|
|
35
|
+
- Hyperlinks: reference-only links are table1a..d, tableD-1a, figureC-1a (table footnotes of the 2016 CD) and IEC61010-2 (no xref in the 2023 source), and the 26 reference _Toc links point at bookmarks that do not exist in the reference; ours point at real _Toc bookmarks. Every source xref/eref yields one hyperlink (rice_xref_links_spec).
|
|
36
|
+
- Source elements deliberately not bookmarked: annotation/fmt-annotation-* and the ul/li inside annotation-container (rendered as Word comments); the 5 `<bookmark>` elements in annex titles and refterm are review-annotation range ends (from/to of annotations), carried by the comment ranges; link/xref/eref/stem/identifier/title/fmt-name/td/tr/th inline or structural nodes that are not anchor targets.
|
|
37
|
+
- Not done: dl ids in figure-key/formula-key/symbol tables (2 of 4 dl; the dl renders as table cells with no body paragraph to hold the range); p ids inside table-cell fn bodies and footnotes.xml; modification/source p (3).
|
|
38
|
+
|
|
3
39
|
## Problem
|
|
4
40
|
Output has 103 bookmarks vs reference 293 (-190). Output has 75 hyperlinks vs reference 120 (-45).
|
|
5
41
|
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: done
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> **Proof (2026-11-19):** Reproduced on the real fixture `spec/fixtures/iso/is/document-en.presentation.xml`
|
|
6
|
+
> (7 RefNorm paragraphs). All card items are already satisfied or are not defects:
|
|
7
|
+
> - `)` footnote marker and ` , ` separator: present on the two flagged entries (ISO 712 and ISO 16634:—),
|
|
8
|
+
> fixed by #1781 (P1-011/P1-012) and now pinned against the real fixture in
|
|
9
|
+
> `spec/isodoc/docx/renderers/bibliography_renderer_spec.rb`.
|
|
10
|
+
> - `RefNorm` vs `normref`: not a defect. `normref` is the legacy Word-HTML style name of the reference
|
|
11
|
+
> rice.docx; `data/iso-dis/style_mapping.yml` maps `normref: RefNorm`, `RefNorm` is defined in the output
|
|
12
|
+
> styles.xml, and `word_dis_styles.rb` uses the same name.
|
|
13
|
+
> - "ISO 712:2009" vs output "ISO 712": comes from the fixture's biblio-tag (no year), not the renderer.
|
|
14
|
+
> - Reference count 7 vs 8 RefNorm in the card: current output has 7 (also pinned by
|
|
15
|
+
> rice_docx_structural_fixes_spec).
|
|
16
|
+
|
|
1
17
|
# 069: Fix Normative Reference Formatting
|
|
2
18
|
|
|
3
19
|
## Problem
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: done
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# 078: Normative references missing `)` footnote markers
|
|
2
6
|
|
|
7
|
+
The normative reference regression in `spec/isodoc/docx/renderers/bibliography_renderer_spec.rb` verifies the superscript closing parenthesis and separator for both fresh and cached footnotes.
|
|
8
|
+
|
|
3
9
|
## Problem
|
|
4
10
|
Reference normref entries have `)` markers after some ISO identifiers to indicate footnotes. Output is missing these markers.
|
|
5
11
|
|
|
@@ -24,5 +30,4 @@ The `render_bib_item_content` method renders the biblio_tag text but may not inc
|
|
|
24
30
|
Check how the presentation XML formats the biblio-tag with footnote markers. The `)` should appear as superscript text in the bib entry, with a footnote reference linking to the footnote content. The inline renderer needs to handle `fn` elements inside biblio-tag elements.
|
|
25
31
|
|
|
26
32
|
## Location
|
|
27
|
-
- `lib/isodoc/iso/docx/
|
|
28
|
-
- `lib/isodoc/iso/docx/inline.rb` — footnote rendering in bib context
|
|
33
|
+
- `lib/isodoc/iso/docx/inline_renderers/footnote_renderer.rb` — `InlineRenderers::FootnoteRenderer`
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-019 - Fix normative reference formatting
|
|
3
3
|
priority: P2
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# 108-019: Fix Normative Reference Formatting
|
|
8
8
|
|
|
9
|
+
The normative reference regression in `spec/isodoc/docx/renderers/bibliography_renderer_spec.rb` verifies the footnote marker after the year, the following separator, and the `RefNorm` style.
|
|
10
|
+
|
|
9
11
|
## Problem
|
|
10
12
|
|
|
11
13
|
Normative reference entries have formatting differences:
|
|
@@ -40,7 +42,6 @@ The inline renderer may not be rendering footnote markers inside bibliographic i
|
|
|
40
42
|
2. Render footnote markers as proper `<w:footnoteReference>` elements
|
|
41
43
|
3. Ensure the `)` is part of the footnote marker rendering
|
|
42
44
|
|
|
43
|
-
##
|
|
45
|
+
## Location
|
|
44
46
|
|
|
45
|
-
- `lib/isodoc/iso/docx/
|
|
46
|
-
- `lib/isodoc/iso/docx/inline.rb` — footnote reference rendering
|
|
47
|
+
- `lib/isodoc/iso/docx/inline_renderers/footnote_renderer.rb` — `InlineRenderers::FootnoteRenderer`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 15: Definition lists + math (plurimath / OMML) —
|
|
1
|
+
# 15: Definition lists + math (plurimath / OMML) — DONE
|
|
2
2
|
|
|
3
|
-
## Status:
|
|
3
|
+
## Status: DONE (block and inline math both render as OMML)
|
|
4
4
|
|
|
5
5
|
## Fixed
|
|
6
6
|
|
|
@@ -19,15 +19,32 @@ DefinitionListRenderer renders definition lists with context-aware
|
|
|
19
19
|
styles (KeyTitle/KeyText in formula/figure zones, Definition
|
|
20
20
|
elsewhere). The "where" clause + symbol list pattern works.
|
|
21
21
|
|
|
22
|
-
## Still pending
|
|
22
|
+
## Still pending (HISTORICAL — resolved by inline OMML, #1800)
|
|
23
23
|
|
|
24
24
|
Inline math (inside `<stem>` elements in `<dt>`/`<dd>`/body text)
|
|
25
25
|
still renders as text via StemRenderer.stem_fallback_text. To
|
|
26
26
|
properly render inline OMML, StemRenderer needs to call plurimath
|
|
27
27
|
and emit `<m:oMath>` runs.
|
|
28
28
|
|
|
29
|
-
## Verification
|
|
29
|
+
## Verification (superseded, see Measurement 2026-11-19)
|
|
30
30
|
|
|
31
31
|
Block formula count in output: 4
|
|
32
32
|
With `<m:oMathPara>`: 3
|
|
33
33
|
With text fallback: 1 (no MathML in source)
|
|
34
|
+
|
|
35
|
+
## Measurement 2026-11-19 (rice, base 2e463195)
|
|
36
|
+
|
|
37
|
+
Rice converted with `Metanorma::Iso::Processor#output(..., :docx)`:
|
|
38
|
+
|
|
39
|
+
- source `fmt-stem` elements: 32 = 4 block (`formula/fmt-stem`) + 28 other;
|
|
40
|
+
of the 28, 2 live in `fn` / `fmt-fn-body` copies rendered in
|
|
41
|
+
footnotes.xml, leaving **26 inline stems in the body**.
|
|
42
|
+
- document.xml: **4 `m:oMathPara`** (= 4 block formulas; the card's
|
|
43
|
+
"3 of 4" is stale) and **26 `m:oMath` that are not inside an
|
|
44
|
+
`m:oMathPara`** (= 26 inline stems), every one a child of a `w:p`.
|
|
45
|
+
- 18 of the 26 sit in a paragraph that also has text runs (the other 8 are
|
|
46
|
+
paragraphs holding only math); e.g. "time necessary for 90 % ... ( t90 )".
|
|
47
|
+
- The distinct math strings match the source (t90 x5 in the body, m1/m2,
|
|
48
|
+
s_r/s_R, w_max, ...); the two missing t90 are the footnote copies.
|
|
49
|
+
|
|
50
|
+
Locked by `spec/isodoc/docx/rice_docx_e2e_spec.rb` ("math (OMML)").
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: resolved-no-code-change
|
|
3
|
+
---
|
|
4
|
+
> **Status 2026-11-19 (lane/1728-rstyles).** Measured on rice, DIS output: 372 Hyperlink,
|
|
5
|
+
> 13 FootnoteReference (all 12 footnoteReference runs plus the marker suffix), 7 zzmovetofollowing;
|
|
6
|
+
> the 6-Hyperlink figure below is stale. Inline stems render as OMML (30 m:oMath), so the
|
|
7
|
+
> `stem` rStyle does not apply. `citesec/citeapp/citefig/citetbl`, `stdpublisher0/stddocnumber/
|
|
8
|
+
> stdyear/stddocpartnumber/stddoctitle`, `notelabel/termnotelabel/examplelabel/tablefootnoteref`
|
|
9
|
+
> are 2016-CD styles that the DIS template does not define and `data/iso-dis/style_mapping.yml`
|
|
10
|
+
> `excluded_styles` bans on purpose (StyleMappingValidator enforces it; adding them turned
|
|
11
|
+
> style_mapping_validator_spec red). Not a gap. The presentation spans keep their text; the DOCX
|
|
12
|
+
> writer drops an rStyle the template lacks. Pinned by spec/isodoc/docx/semantic_run_styles_spec.rb.
|
|
13
|
+
|
|
1
14
|
# 067: Fix Missing rStyle (Run-Level Styles)
|
|
2
15
|
|
|
3
16
|
## Problem
|
|
@@ -1,11 +1,102 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-007 - Align paragraph styles with reference
|
|
3
3
|
priority: P2
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# 108-007: Align Paragraph Styles with Reference
|
|
8
8
|
|
|
9
|
+
## Closed (2026-11-20): measured against the submitted 5878 WD DOCX
|
|
10
|
+
|
|
11
|
+
The private 5878 WD source was converted with the default DIS template and
|
|
12
|
+
compared per `w:pStyle` with the submitted `.docx` (private content stays
|
|
13
|
+
outside the repository). Conversion: about 107 s, 1.1-1.35 GB peak RSS.
|
|
14
|
+
|
|
15
|
+
- Outside tables, every style delta is template-bound, the same pattern as
|
|
16
|
+
rice: ListParagraph/BiblioEntry, TOC1 depth, Tabletitle/AnnexTableTitle,
|
|
17
|
+
ListContinue1/ListNumber1, Formula, FigureGraphic, Figuretitle/FigureTitle.
|
|
18
|
+
`zzCover`, `CoverTitleA1`, `Formula` and `Notice` are DIS template styles;
|
|
19
|
+
the DIS mapping sends the cover warning to `Notice` by design (the Simple
|
|
20
|
+
mapping uses zzwarninghdr/zzwarning). `PAGEBREAK` shows no delta.
|
|
21
|
+
- One real defect came out of it: table `rowspan` produced no vertical-merge
|
|
22
|
+
continuation cells, so cells in covered rows shifted left. Fixed in the
|
|
23
|
+
same change (`table_row_spans.rb`). Table cells after the fix: 27,416 vs
|
|
24
|
+
27,419 in the submission (26,966 before).
|
|
25
|
+
- The last gap was table footnotes. In the submission they are a
|
|
26
|
+
superscript letter in the cell, with the bodies in one final full-width
|
|
27
|
+
row in Note style and no Word footnote reference in any table. The output
|
|
28
|
+
now does the same (`table_footnotes.rb`): 2,085 table rows in both, 0
|
|
29
|
+
footnote references inside tables in both (38 before), and no table
|
|
30
|
+
differs from the submission in row count or Note paragraphs (37 tables).
|
|
31
|
+
|
|
32
|
+
Simple bibliography entries now use `ListParagraph`, covered by
|
|
33
|
+
`bibliography_renderer_spec.rb`. DIS retains `BiblioEntry`, `Warningtext`,
|
|
34
|
+
`Warningtitle`, `Figuretitle`, and `Tabletitle` because its template lacks
|
|
35
|
+
the older reference styles. Simple already defines and maps its annex
|
|
36
|
+
caption styles. Note and example counts remain tracked in P2-010.
|
|
37
|
+
|
|
38
|
+
Parity now treats `Tablebody`/`Tableheader` paragraphs inside table cells
|
|
39
|
+
as equivalent to unstyled/Normal cell paragraphs. Literal heading numbers
|
|
40
|
+
and style-supplied numbering already produce the same structure/style
|
|
41
|
+
tokens. Both equivalences are covered by `spec/isodoc/docx/mhtml_parity_spec.rb`,
|
|
42
|
+
which also preserves heading-level differences and other cell styles.
|
|
43
|
+
The style/count items below were left open at this stage; the 2026-11-20
|
|
44
|
+
measurement above closes them.
|
|
45
|
+
|
|
46
|
+
Measured against submitted `iso-wd-5878-2024.doc` (20241129 submission):
|
|
47
|
+
the 26,977 `Tablebody` paragraphs in `/tmp/5878.docx` no longer produce
|
|
48
|
+
style-only deltas. The report has 466 remaining deltas and completed in
|
|
49
|
+
29.6 seconds. A fresh Processor DOCX conversion of the same submission
|
|
50
|
+
has 467 remaining deltas (55.7 seconds). Private source content remains
|
|
51
|
+
outside the repository.
|
|
52
|
+
|
|
53
|
+
## Remaining list (2026-11-19 re-check)
|
|
54
|
+
|
|
55
|
+
The private `/tmp/5878.docx` and the delta tool are not on this machine, so
|
|
56
|
+
no bucket was re-measured against the submission. Checked from the repository
|
|
57
|
+
instead (rice fixture `spec/fixtures/iso/is/document-en.presentation.xml`,
|
|
58
|
+
default DIS template, per-style `w:pStyle` counts):
|
|
59
|
+
|
|
60
|
+
- Items 1 and 4 (ListParagraph, AnnexFigureTitle/AnnexTableTitle) are done in
|
|
61
|
+
the Simple mapping. Items 2 and 3 (zzwarning/zzwarninghdr) cannot be done:
|
|
62
|
+
neither template defines those styles (DIS keeps Warningtext/Warningtitle).
|
|
63
|
+
- Items 6 and 7 (note/example counts) are closed by P2-010.
|
|
64
|
+
- Item 8 (`a3` over-use): the 18 `a3` paragraphs in the rice fixture are
|
|
65
|
+
level-3 annex clause titles (for example "Sample divider,", "Preparation of
|
|
66
|
+
test sample"), which is the intended `annex_heading3` mapping. `a3` is not a
|
|
67
|
+
fallback style; no code change. A different count in the submission needs
|
|
68
|
+
the submission to diagnose.
|
|
69
|
+
- Still open, needs the private source: which of the 466 deltas remain, and
|
|
70
|
+
`zzCover`, `CoverTitleA1`, `Formula`, `PAGEBREAK` differences.
|
|
71
|
+
|
|
72
|
+
## Rice measurement (2026-11-19, lane/1728-pstyles @ 2e463195)
|
|
73
|
+
|
|
74
|
+
Processor DOCX of `spec/examples/rice.presentation.xml` against the reference
|
|
75
|
+
`spec/examples/rice.docx` (2016 CD), per-style `w:pStyle` counts. Output has
|
|
76
|
+
434 styled paragraphs of 514; the reference 207 of 515 (it leaves most body
|
|
77
|
+
paragraphs unstyled). No code change came out of it: every delta is
|
|
78
|
+
template-bound or edition-bound.
|
|
79
|
+
|
|
80
|
+
| Style (out vs ref) | Verdict |
|
|
81
|
+
|---|---|
|
|
82
|
+
| Tablebody 132/0, Tableheader 12/0 | Template styles; parity already treats as Normal (item 5). |
|
|
83
|
+
| a3 18/1 | Edition: source has 18 level-3 annex titles (item 8). |
|
|
84
|
+
| BiblioEntry 15 / ListParagraph 0 vs 14 | DIS template has no ListParagraph (Simple maps it). |
|
|
85
|
+
| ListContinue1 12, ListNumber1 9 vs 0 | Ref leaves list paragraphs unstyled; DIS defines both. |
|
|
86
|
+
| zzCover 10, CoverTitleA1/2, MainTitle1/2 | Cover/title layout differs in the 2016 reference. |
|
|
87
|
+
| Note 5 + Noteindent 6 vs Note 15 | Source has 9 notes + 5 termnotes; P2-010 matches each one. |
|
|
88
|
+
| TermsAdmitted 8 vs AltTerms 6 | DIS template has no AltTerms/DeprecatedTerms. |
|
|
89
|
+
| RefNorm 7 vs normref 7 | DIS template has no normref. |
|
|
90
|
+
| Figuretitle 6 vs AnnexFigureTitle 6 | DIS template has no AnnexFigureTitle. |
|
|
91
|
+
| Warningtext/title 2/2 vs zzwarning/hdr 2/1 | DIS template has none (Notice). |
|
|
92
|
+
| Formula, KeyTitle/Text, FigureGraphic, Box-*, Formuladescription | Defined by the DIS template; ref leaves them unstyled. |
|
|
93
|
+
| Code 2 vs 1 | Extra is the code-callout annotation, absent in the 2016 source. |
|
|
94
|
+
| Definition 17 vs 16 | Extra is the "N/A" definition-list entry. |
|
|
95
|
+
|
|
96
|
+
Closing these needs template styles (out of scope: mapping-only rule) or the
|
|
97
|
+
private submission. Superseded by the 2026-11-20 measurement above: these
|
|
98
|
+
deltas are template-bound, not defects.
|
|
99
|
+
|
|
9
100
|
## Problem
|
|
10
101
|
|
|
11
102
|
Many style assignments differ between latest output and reference:
|
|
@@ -45,7 +136,7 @@ Many style assignments differ between latest output and reference:
|
|
|
45
136
|
2. **Warningtext → zzwarning**: Update style mapping for warning paragraphs
|
|
46
137
|
3. **Warningtitle → zzwarninghdr**: Update style mapping for warning title
|
|
47
138
|
4. **Figuretitle → AnnexFigureTitle**: When in annex context, use AnnexFigureTitle
|
|
48
|
-
5. **Tablebody/Tableheader**:
|
|
139
|
+
5. **Tablebody/Tableheader**: Done — keep template styles; normalize equivalent cell paragraphs in MhtmlParity.
|
|
49
140
|
6. **Note count**: Investigate why only 6 notes vs 15
|
|
50
141
|
7. **Example count**: Investigate why only 2 vs 4
|
|
51
142
|
8. **a3 over-use**: Check if a3 is being used as fallback style
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 108-010 - Add missing run styles (rStyles)
|
|
3
3
|
priority: P2
|
|
4
|
-
status:
|
|
4
|
+
status: done
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# 108-010: Add Missing Run Styles (rStyles)
|
|
8
8
|
|
|
9
|
+
> **Status 2026-11-19 (lane/1728-rstyles).** Hyperlink and FootnoteReference are emitted on
|
|
10
|
+
> every link and footnote reference (rice: 372 and 13). The remaining listed styles are
|
|
11
|
+
> CD-edition names (a2/a3 are heading levels, ForewordText/zzCover/normref/Source are paragraph
|
|
12
|
+
> styles; rptBold/rptItalic and EndnoteReference are not in the DIS template or the rice
|
|
13
|
+
> reference). Bold/italic are direct run properties in the DIS output. Nothing real left; see
|
|
14
|
+
> P2-001 for the excluded semantic styles.
|
|
15
|
+
|
|
16
|
+
The current DIS fixture emits `Hyperlink` and `FootnoteReference` run
|
|
17
|
+
styles, covered by `adapter_spec.rb` and `bibliography_renderer_spec.rb`.
|
|
18
|
+
The reference uses `Source` and `normref` as paragraph styles. DIS uses
|
|
19
|
+
`Source` and `RefNorm`, covered by the term and bibliography renderer
|
|
20
|
+
specs. Bold, italic, and math run style parity remains outside this fix.
|
|
21
|
+
|
|
9
22
|
## Problem
|
|
10
23
|
|
|
11
24
|
The reference document has ~810 rStyle uses across runs. The latest output has only 186. This affects formatting precision — bold, italic, superscript, and other character-level formatting.
|
|
@@ -53,3 +66,22 @@ Math/stem elements need a dedicated rStyle.
|
|
|
53
66
|
- `lib/isodoc/iso/docx/inline.rb` — apply rStyles in render methods
|
|
54
67
|
- `lib/isodoc/iso/docx/style_resolver.rb` — add run style resolution
|
|
55
68
|
- `data/iso-dis/style_mapping.yml` — add run style mappings
|
|
69
|
+
|
|
70
|
+
## Simple template disposition (2026-11-19)
|
|
71
|
+
|
|
72
|
+
Checked against `data/iso-simple/styles.yml` and `style_mapping.yml`. The
|
|
73
|
+
Simple set defines one run-style mapping, `hyperlink: Hyperlink`, which the
|
|
74
|
+
link, eref, xref and fmt-xref renderers already apply (integration_spec,
|
|
75
|
+
adapter_spec). No other listed rStyle can be emitted without referencing a
|
|
76
|
+
style the template lacks:
|
|
77
|
+
|
|
78
|
+
| rStyle | Simple | Status |
|
|
79
|
+
|--------|--------|--------|
|
|
80
|
+
| Hyperlink | character style | done (already applied) |
|
|
81
|
+
| a2, a3, ForewordText, Source | paragraph styles only | not applicable as rStyle |
|
|
82
|
+
| zzCover, normref, FootnoteReference, EndnoteReference, rptBold, rptItalic | not defined | not applicable |
|
|
83
|
+
| stem, footnote_reference keys | unmapped in Simple | renderers skip rStyle when unmapped |
|
|
84
|
+
|
|
85
|
+
Pinned by "Simple run styles (P2-003)" in `spec/isodoc/docx/style_mapping_spec.rb`.
|
|
86
|
+
Bold and italic stay direct run properties (no rStyle exists in either set).
|
|
87
|
+
DIS keeps its own FootnoteReference mapping.
|